From owner-dev-commits-src-all@freebsd.org Mon Feb 15 01:22:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A966C543EDC; Mon, 15 Feb 2021 01: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 4Df5vQ4NpJz4qSm; Mon, 15 Feb 2021 01: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 897BF14BE0; Mon, 15 Feb 2021 01: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 11F1MwMG070474; Mon, 15 Feb 2021 01: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 11F1Mwq8070473; Mon, 15 Feb 2021 01:22:58 GMT (envelope-from git) Date: Mon, 15 Feb 2021 01:22:58 GMT Message-Id: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: ee10666327b6 - main - Links for bmake and bmake.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee10666327b622c2f20a4ac17e7a5673b04e7c9a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 01:22:58 -0000 The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ee10666327b622c2f20a4ac17e7a5673b04e7c9a commit ee10666327b622c2f20a4ac17e7a5673b04e7c9a Author: Simon J. Gerraty AuthorDate: 2021-02-15 01:20:10 +0000 Commit: Simon J. Gerraty CommitDate: 2021-02-15 01:22:21 +0000 Links for bmake and bmake.1 Some folk forget that make is bmake, and want the links... MFC after: 1 week --- usr.bin/bmake/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 96431c19d2af..8c4cb659e1d8 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -9,6 +9,8 @@ .if exists(${.CURDIR}/tests) PROG= make +LINKS= make bmake +MLINKS= ${MAN} b${MAN} .endif .if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} == "no" From owner-dev-commits-src-all@freebsd.org Mon Feb 15 01:23:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B17CB543FFC; Mon, 15 Feb 2021 01:23: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 4Df5w34f75z4qss; Mon, 15 Feb 2021 01:23: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 923F015024; Mon, 15 Feb 2021 01:23: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 11F1NVSv070670; Mon, 15 Feb 2021 01:23:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F1NVBa070669; Mon, 15 Feb 2021 01:23:31 GMT (envelope-from git) Date: Mon, 15 Feb 2021 01:23:31 GMT Message-Id: <202102150123.11F1NVBa070669@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: cd580a4c8a16 - stable/13 - ssh: diff reduction against OpenBSD, remove unused includes 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: cd580a4c8a16d2c826286f765b3476886dbfe494 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 01:23:31 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cd580a4c8a16d2c826286f765b3476886dbfe494 commit cd580a4c8a16d2c826286f765b3476886dbfe494 Author: Ed Maste AuthorDate: 2021-02-12 01:41:02 +0000 Commit: Ed Maste CommitDate: 2021-02-15 01:21:58 +0000 ssh: diff reduction against OpenBSD, remove unused includes These appear to be leftovers from ca86bcf2531c7 and f7167e0ea0bf5 MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit 154adbbeb8fc2a0d183ec3a4db32cd13668205e8) --- crypto/openssh/misc.c | 1 - crypto/openssh/sshconnect.c | 1 - 2 files changed, 2 deletions(-) diff --git a/crypto/openssh/misc.c b/crypto/openssh/misc.c index 662d6bf48716..bdc06fdb3332 100644 --- a/crypto/openssh/misc.c +++ b/crypto/openssh/misc.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index 2776be920a2c..b50029de71b8 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -27,7 +27,6 @@ __RCSID("$FreeBSD$"); #include #include #include -#include #include #include From owner-dev-commits-src-all@freebsd.org Mon Feb 15 01:23:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DA6145442C5; Mon, 15 Feb 2021 01:23: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 4Df5w45rCSz4qst; Mon, 15 Feb 2021 01:23: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 BB35214C4D; Mon, 15 Feb 2021 01:23: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 11F1NWjP070692; Mon, 15 Feb 2021 01:23:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F1NWoe070691; Mon, 15 Feb 2021 01:23:32 GMT (envelope-from git) Date: Mon, 15 Feb 2021 01:23:32 GMT Message-Id: <202102150123.11F1NWoe070691@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: cc489905bab0 - stable/13 - ssh: remove ssh-hpn leftovers 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: cc489905bab0f0cc9009566686bf60133bf340ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 01:23:32 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cc489905bab0f0cc9009566686bf60133bf340ee commit cc489905bab0f0cc9009566686bf60133bf340ee Author: Ed Maste AuthorDate: 2021-02-12 14:09:00 +0000 Commit: Ed Maste CommitDate: 2021-02-15 01:22:22 +0000 ssh: remove ssh-hpn leftovers This was introduced in 8998619212f3a, and left behind when the hpn-ssh patches were removed in 60c59fad8806. Although Being able to log SO_RCVBUF in debug mode might have some small value on its own, it's not worth carrying an extra diff against upstream. Reviewed by: kevans MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28610 (cherry picked from commit a62dc346f6171ef1bd52bb8795eaf2d64394ac24) --- crypto/openssh/sshd.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 06fa7b8de339..532e5dc04fc2 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -1056,8 +1056,6 @@ listen_on_addrs(struct listenaddr *la) int ret, listen_sock; struct addrinfo *ai; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; - int socksize; - socklen_t len; for (ai = la->addrs; ai; ai = ai->ai_next) { if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) @@ -1103,10 +1101,6 @@ listen_on_addrs(struct listenaddr *la) debug("Bind to port %s on %s.", strport, ntop); - len = sizeof(socksize); - getsockopt(listen_sock, SOL_SOCKET, SO_RCVBUF, &socksize, &len); - debug("Server TCP RWIN socket size: %d", socksize); - /* Bind the socket to the desired port. */ if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { error("Bind to port %s on %s failed: %.200s.", From owner-dev-commits-src-all@freebsd.org Mon Feb 15 01:23:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A94BA543F94; Mon, 15 Feb 2021 01:23:34 +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 4Df5w612Lgz4qn7; Mon, 15 Feb 2021 01:23: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 EF68015025; Mon, 15 Feb 2021 01:23: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 11F1NXQ4070711; Mon, 15 Feb 2021 01:23:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F1NXTP070710; Mon, 15 Feb 2021 01:23:33 GMT (envelope-from git) Date: Mon, 15 Feb 2021 01:23:33 GMT Message-Id: <202102150123.11F1NXTP070710@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: 7278d812fccb - stable/13 - ssh: remove unused variable 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: 7278d812fccb464062310adf63710621abb10298 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 01:23:35 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7278d812fccb464062310adf63710621abb10298 commit 7278d812fccb464062310adf63710621abb10298 Author: Ed Maste AuthorDate: 2021-02-12 03:21:40 +0000 Commit: Ed Maste CommitDate: 2021-02-15 01:22:43 +0000 ssh: remove unused variable This was introduced in 03f6c5cd93ec, which added use of sysctl net.inet.ip.portrange.reservedhigh instead of IPPORT_RESERVED, but it appears the rest of that change was lost in some subsequent update. The change should probably be restored, but until then there is no reason to leave an unused variable around. MFC after: 3 days Sponsored by: The FreeBSD Foundation (cherry picked from commit 9e14b918f956c532d0b81c945160bd9bc85c5604) --- crypto/openssh/readconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/readconf.c b/crypto/openssh/readconf.c index 434da47ce9e2..75fbd4ca222f 100644 --- a/crypto/openssh/readconf.c +++ b/crypto/openssh/readconf.c @@ -336,7 +336,7 @@ void add_local_forward(Options *options, const struct Forward *newfwd) { struct Forward *fwd; - int i, ipport_reserved; + int i; /* Don't add duplicates */ for (i = 0; i < options->num_local_forwards; i++) { From owner-dev-commits-src-all@freebsd.org Mon Feb 15 02:19:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 180A6544FD7; Mon, 15 Feb 2021 02:19: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 4Df78X0Bwvz4tH3; Mon, 15 Feb 2021 02:19: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 ED94F158A7; Mon, 15 Feb 2021 02:19: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 11F2JNwT037710; Mon, 15 Feb 2021 02:19:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F2JNVY037707; Mon, 15 Feb 2021 02:19:23 GMT (envelope-from git) Date: Mon, 15 Feb 2021 02:19:23 GMT Message-Id: <202102150219.11F2JNVY037707@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: a0698341cd89 - main - getdirentries.2: fix for NFS mounts 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/main X-Git-Reftype: branch X-Git-Commit: a0698341cd894ba4a640e9a9bb0f72c2133d1228 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 02:19:24 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=a0698341cd894ba4a640e9a9bb0f72c2133d1228 commit a0698341cd894ba4a640e9a9bb0f72c2133d1228 Author: Rick Macklem AuthorDate: 2021-02-15 02:16:58 +0000 Commit: Rick Macklem CommitDate: 2021-02-15 02:16:58 +0000 getdirentries.2: fix for NFS mounts It was reported that getdirentries(2) was returning dirents with d_off set to 0 for an NFS mount. This is believed to be correct behaviour at this time (it may change for some NFS mounts in the future), but is inconsistent with what the getdirentries(2) man page says. This patch fixes the man page. This is a content change. PR: 253428 Reviewed by: asomers MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28664 --- lib/libc/sys/getdirentries.2 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2 index f2d1c05240d5..658be9459af5 100644 --- a/lib/libc/sys/getdirentries.2 +++ b/lib/libc/sys/getdirentries.2 @@ -28,7 +28,7 @@ .\" @(#)getdirentries.2 8.2 (Berkeley) 5/3/95 .\" $FreeBSD$ .\" -.Dd March 30, 2020 +.Dd February 14, 2021 .Dt GETDIRENTRIES 2 .Os .Sh NAME @@ -89,7 +89,7 @@ have the same .Fa d_fileno . The .Fa d_off -field returns a cookie which can be used with +field returns a cookie which, if non-zero, can be used with .Xr lseek 2 to position the directory descriptor to the next entry. The @@ -148,14 +148,16 @@ only .Pc , a value returned in the .Fa d_off -field, +field if it is non-zero, or zero. .Sh IMPLEMENTATION NOTES The .Fa d_off -field is being used as a cookie to readdir for nfs servers. -These cookies can be cached and allow to read directory entries at a specific -offset on demand. +field is currently set to 0 by the NFS client, since the +directory offset cookies returned by an NFS server cannot +be used by +.Xr lseek 2 +at this time. .Sh RETURN VALUES If successful, the number of bytes actually transferred is returned. Otherwise, -1 is returned and the global variable From owner-dev-commits-src-all@freebsd.org Mon Feb 15 02:39:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D42DB5461C6; Mon, 15 Feb 2021 02:39: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 4Df7bW4d7Wz4vND; Mon, 15 Feb 2021 02:39: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 91F34158F6; Mon, 15 Feb 2021 02:39: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 11F2dJw8063544; Mon, 15 Feb 2021 02:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F2dJYs063543; Mon, 15 Feb 2021 02:39:19 GMT (envelope-from git) Date: Mon, 15 Feb 2021 02:39:19 GMT Message-Id: <202102150239.11F2dJYs063543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Philip Paeps Subject: git: be2003ccfa1b - main - ifconfig: fix incorrect wg allowed-ips netmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be2003ccfa1b12f372fa1329c38c29fe035f232f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 02:39:19 -0000 The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=be2003ccfa1b12f372fa1329c38c29fe035f232f commit be2003ccfa1b12f372fa1329c38c29fe035f232f Author: Michael Chiu AuthorDate: 2021-02-15 00:38:26 +0000 Commit: Philip Paeps CommitDate: 2021-02-15 02:39:05 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 MFC after: 1 day --- sbin/ifconfig/ifwg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifwg.c b/sbin/ifconfig/ifwg.c index 8956e3427dd1..a2b22d2dfbef 100644 --- a/sbin/ifconfig/ifwg.c +++ b/sbin/ifconfig/ifwg.c @@ -309,7 +309,7 @@ dump_peer(const nvlist_t *nvl_peer) sa = __DECONST(void *, &aips[i].a_addr); bitmask = __DECONST(void *, - ((const struct sockaddr *)&aips->a_mask)->sa_data); + ((const struct sockaddr *)&(&aips[i])->a_mask)->sa_data); family = aips[i].a_addr.ss_family; getnameinfo(sa, sa->sa_len, addr_buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 08:22:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 54B0A54D351; Mon, 15 Feb 2021 08:22: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 4DfHBx20zJz3lQW; Mon, 15 Feb 2021 08:22: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 37C591A808; Mon, 15 Feb 2021 08:22: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 11F8M15M018530; Mon, 15 Feb 2021 08:22:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F8M1tM018529; Mon, 15 Feb 2021 08:22:01 GMT (envelope-from git) Date: Mon, 15 Feb 2021 08:22:01 GMT Message-Id: <202102150822.11F8M1tM018529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: 76702e90d007 - stable/13 - vt: terminal size can grow too big with small font MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 76702e90d0072452da5105033931532ae013dbf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 08:22:01 -0000 The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=76702e90d0072452da5105033931532ae013dbf1 commit 76702e90d0072452da5105033931532ae013dbf1 Author: Toomas Soome AuthorDate: 2021-01-21 22:18:56 +0000 Commit: Toomas Soome CommitDate: 2021-02-14 21:37:45 +0000 vt: terminal size can grow too big with small font vt is using static buffers for on screen data, the buffer size is calculated based on maximum supported screen size and 8x16 font. When using hi-res graphics and very smaller than 8x16 font, we need to be careful not to overflow static buffers in vt. Testing: I did test by building smaller buffers than vt currently is using, royger was testing on actual 4k capable hardware. MFC after: 1 week Tested by: royger (cherry-picked from 32bf05ad89aaa93f4dd27e3721f4cb52cf57fa03) --- sys/dev/vt/vt_core.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 05c383829f49..e4a8288962c4 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -640,8 +640,10 @@ vt_termsize(struct vt_device *vd, struct vt_font *vf, term_pos_t *size) size->tp_row -= vt_logo_sprite_height; size->tp_col = vd->vd_width; if (vf != NULL) { - size->tp_row /= vf->vf_height; - size->tp_col /= vf->vf_width; + size->tp_row = MIN(size->tp_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + size->tp_col = MIN(size->tp_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } @@ -660,8 +662,10 @@ vt_termrect(struct vt_device *vd, struct vt_font *vf, term_rect_t *rect) rect->tr_begin.tp_row = howmany(rect->tr_begin.tp_row, vf->vf_height); - rect->tr_end.tp_row /= vf->vf_height; - rect->tr_end.tp_col /= vf->vf_width; + rect->tr_end.tp_row = MIN(rect->tr_end.tp_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + rect->tr_end.tp_col = MIN(rect->tr_end.tp_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } @@ -675,8 +679,10 @@ vt_winsize(struct vt_device *vd, struct vt_font *vf, struct winsize *size) size->ws_row = size->ws_ypixel; size->ws_col = size->ws_xpixel = vd->vd_width; if (vf != NULL) { - size->ws_row /= vf->vf_height; - size->ws_col /= vf->vf_width; + size->ws_row = MIN(size->ws_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + size->ws_col = MIN(size->ws_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 09:54:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D1C5A54FF5B; Mon, 15 Feb 2021 09:54: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 4DfKFG5X8Dz3s4q; Mon, 15 Feb 2021 09:54: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 B0A441B763; Mon, 15 Feb 2021 09:54: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 11F9sAFc039329; Mon, 15 Feb 2021 09:54:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11F9sAG2039327; Mon, 15 Feb 2021 09:54:10 GMT (envelope-from git) Date: Mon, 15 Feb 2021 09:54:10 GMT Message-Id: <202102150954.11F9sAG2039327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: f15e18a642cb - main - zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f15e18a642cb3f7ebc747f8e9cdf11274140107d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 09:54:10 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=f15e18a642cb3f7ebc747f8e9cdf11274140107d commit f15e18a642cb3f7ebc747f8e9cdf11274140107d Author: Martin Matuska AuthorDate: 2021-02-15 07:40:27 +0000 Commit: Martin Matuska CommitDate: 2021-02-15 09:50:10 +0000 zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681 --- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 10 -- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- .../tests/functional/redundancy/Makefile.am | 1 + .../functional/redundancy/redundancy_raidz.ksh | 198 +++++++++++++++++++++ 4 files changed, 202 insertions(+), 12 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c index 989b90dc2635..5b152f38bd63 100644 --- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c +++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c @@ -1922,16 +1922,6 @@ raidz_parity_verify(zio_t *zio, raidz_row_t *rr) if (checksum == ZIO_CHECKSUM_NOPARITY) return (ret); - /* - * All data columns must have been successfully read in order - * to use them to generate parity columns for comparison. - */ - for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) { - rc = &rr->rr_col[c]; - if (!rc->rc_tried || rc->rc_error != 0) - return (ret); - } - for (c = 0; c < rr->rr_firstdatacol; c++) { rc = &rr->rr_col[c]; if (!rc->rc_tried || rc->rc_error != 0) diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run index 171db4c0c022..c0bfc09ac5b3 100644 --- a/sys/contrib/openzfs/tests/runfiles/common.run +++ b/sys/contrib/openzfs/tests/runfiles/common.run @@ -727,8 +727,9 @@ tags = ['functional', 'raidz'] [tests/functional/redundancy] tests = ['redundancy_draid1', 'redundancy_draid2', 'redundancy_draid3', 'redundancy_draid_spare1', 'redundancy_draid_spare2', - 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz1', - 'redundancy_raidz2', 'redundancy_raidz3', 'redundancy_stripe'] + 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz', + 'redundancy_raidz1', 'redundancy_raidz2', 'redundancy_raidz3', + 'redundancy_stripe'] tags = ['functional', 'redundancy'] [tests/functional/refquota] diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am index b2d4414b2906..7b85d6a1bf5f 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am @@ -9,6 +9,7 @@ dist_pkgdata_SCRIPTS = \ redundancy_draid_spare2.ksh \ redundancy_draid_spare3.ksh \ redundancy_mirror.ksh \ + redundancy_raidz.ksh \ redundancy_raidz1.ksh \ redundancy_raidz2.ksh \ redundancy_raidz3.ksh \ diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh new file mode 100644 index 000000000000..8d32e0603ae8 --- /dev/null +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh @@ -0,0 +1,198 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2020 by vStack. All rights reserved. +# Copyright (c) 2021 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/redundancy/redundancy.kshlib + +# +# DESCRIPTION: +# RAIDZ should provide redundancy +# +# STRATEGY: +# 1. Create block device files for the test raidz pool +# 2. For each parity value [1..3] +# - create raidz pool +# - fill it with some directories/files +# - verify resilver by replacing devices +# - verify scrub by zeroing devices +# - destroy the raidz pool + +typeset -r devs=6 +typeset -r dev_size_mb=512 + +typeset -a disks + +prefetch_disable=$(get_tunable PREFETCH_DISABLE) + +function cleanup +{ + poolexists "$TESTPOOL" && destroy_pool "$TESTPOOL" + + for i in {0..$devs}; do + rm -f "$TEST_BASE_DIR/dev-$i" + done + + set_tunable32 PREFETCH_DISABLE $prefetch_disable +} + +function test_resilver # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool +} + +function test_scrub # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + typeset combrec=$4 + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool +} + +log_onexit cleanup + +log_must set_tunable32 PREFETCH_DISABLE 1 + +# Disk files which will be used by pool +for i in {0..$(($devs - 1))}; do + device=$TEST_BASE_DIR/dev-$i + log_must truncate -s ${dev_size_mb}M $device + disks[${#disks[*]}+1]=$device +done + +# Disk file which will be attached +log_must truncate -s 512M $TEST_BASE_DIR/dev-$devs + +for nparity in 1 2 3; do + raid=raidz$nparity + dir=$TEST_BASE_DIR + + log_must zpool create -f -o cachefile=none $TESTPOOL $raid ${disks[@]} + log_must zfs set primarycache=metadata $TESTPOOL + + log_must zfs create $TESTPOOL/fs + log_must fill_fs /$TESTPOOL/fs 1 512 100 1024 R + + log_must zfs create -o compress=on $TESTPOOL/fs2 + log_must fill_fs /$TESTPOOL/fs2 1 512 100 1024 R + + log_must zfs create -o compress=on -o recordsize=8k $TESTPOOL/fs3 + log_must fill_fs /$TESTPOOL/fs3 1 512 100 1024 R + + typeset pool_size=$(get_pool_prop size $TESTPOOL) + + log_must zpool export $TESTPOOL + log_must zpool import -o cachefile=none -d $dir $TESTPOOL + + log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + test_resilver $TESTPOOL $nparity $dir + test_scrub $TESTPOOL $nparity $dir + + log_must zpool destroy "$TESTPOOL" +done + +log_pass "raidz redundancy test succeeded." From owner-dev-commits-src-all@freebsd.org Mon Feb 15 10:00:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BA1FC54FDBF; Mon, 15 Feb 2021 10:00: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 4DfKN24v2Rz3sK6; Mon, 15 Feb 2021 10:00: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 9ACB81B94F; Mon, 15 Feb 2021 10:00: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 11FA02Bu041728; Mon, 15 Feb 2021 10:00:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FA02Y5041725; Mon, 15 Feb 2021 10:00:02 GMT (envelope-from git) Date: Mon, 15 Feb 2021 10:00:02 GMT Message-Id: <202102151000.11FA02Y5041725@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 5dce03847fdc - main - zfs: Avoid updating the L2ARC device header unnecessarily MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dce03847fdc7bc6eb959282c0ae2117b1991746 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 10:00:02 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=5dce03847fdc7bc6eb959282c0ae2117b1991746 commit 5dce03847fdc7bc6eb959282c0ae2117b1991746 Author: Martin Matuska AuthorDate: 2021-02-15 08:10:01 +0000 Commit: Martin Matuska CommitDate: 2021-02-15 09:56:08 +0000 zfs: Avoid updating the L2ARC device header unnecessarily From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis MFC after: 3 days Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682 --- sys/contrib/openzfs/module/zfs/arc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c index e05b11d51942..fecc752e16ff 100644 --- a/sys/contrib/openzfs/module/zfs/arc.c +++ b/sys/contrib/openzfs/module/zfs/arc.c @@ -9062,6 +9062,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) l2arc_write_callback_t *cb = NULL; zio_t *pio, *wzio; uint64_t guid = spa_load_guid(spa); + l2arc_dev_hdr_phys_t *l2dhdr = dev->l2ad_dev_hdr; ASSERT3P(dev->l2ad_vdev, !=, NULL); @@ -9293,7 +9294,8 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) * Although we did not write any buffers l2ad_evict may * have advanced. */ - l2arc_dev_hdr_update(dev); + if (dev->l2ad_evict != l2dhdr->dh_evict) + l2arc_dev_hdr_update(dev); return (0); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 10:50:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 956C35294E8; Mon, 15 Feb 2021 10:50: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 4DfLVW3pt9z3wKY; Mon, 15 Feb 2021 10:50: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 765051C3B9; Mon, 15 Feb 2021 10:50: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 11FAohEN013807; Mon, 15 Feb 2021 10:50:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FAohn9013806; Mon, 15 Feb 2021 10:50:43 GMT (envelope-from git) Date: Mon, 15 Feb 2021 10:50:43 GMT Message-Id: <202102151050.11FAohn9013806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 9f46322cad47 - stable/13 - [udp] fix possible mbuf and lock leak in udp_input(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9f46322cad4797932c70da1b9aa96a93cc8491ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 10:50:43 -0000 The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=9f46322cad4797932c70da1b9aa96a93cc8491ba commit 9f46322cad4797932c70da1b9aa96a93cc8491ba Author: Andrey V. Elsukov AuthorDate: 2021-02-11 08:55:39 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-02-15 10:48:10 +0000 [udp] fix possible mbuf and lock leak in udp_input(). In error case we can leave `inp' locked, also we need to free mbuf chain `m' in the same case. Release the lock and use `badunlocked' label to exit with freed mbuf. Also modify UDP error statistic to match the IPv6 code. Remove redundant INP_RUNLOCK() from the `if (last == NULL)' block, there are no ways to reach this point with locked `inp'. Obtained from: Yandex LLC Sponsored by: Yandex LLC (cherry picked from commit c6ded47d0bae801589b564dbe01dccd474edaed0) --- sys/netinet/udp_usrreq.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 52304ddd6584..c2ad9381850e 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -610,9 +610,11 @@ udp_input(struct mbuf **mp, int *offp, int proto) uh); if (udp_append(last, ip, n, iphlen, udp_in)) { - goto inp_lost; + INP_RUNLOCK(inp); + goto badunlocked; } } + /* Release PCB lock taken on previous pass. */ INP_RUNLOCK(last); } last = inp; @@ -635,9 +637,11 @@ udp_input(struct mbuf **mp, int *offp, int proto) * to send an ICMP Port Unreachable for a broadcast * or multicast datgram.) */ - UDPSTAT_INC(udps_noportbcast); - if (inp) - INP_RUNLOCK(inp); + UDPSTAT_INC(udps_noport); + if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) + UDPSTAT_INC(udps_noportmcast); + else + UDPSTAT_INC(udps_noportbcast); goto badunlocked; } if (proto == IPPROTO_UDPLITE) @@ -646,7 +650,6 @@ udp_input(struct mbuf **mp, int *offp, int proto) UDP_PROBE(receive, NULL, last, ip, last, uh); if (udp_append(last, ip, m, iphlen, udp_in) == 0) INP_RUNLOCK(last); - inp_lost: return (IPPROTO_DONE); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 10:51:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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 342AA5298ED; Mon, 15 Feb 2021 10:51: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 4DfLWK0yFBz3wQX; Mon, 15 Feb 2021 10:51: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 13DEC1C252; Mon, 15 Feb 2021 10:51: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 11FApO6W014015; Mon, 15 Feb 2021 10:51:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FApOSw014014; Mon, 15 Feb 2021 10:51:24 GMT (envelope-from git) Date: Mon, 15 Feb 2021 10:51:24 GMT Message-Id: <202102151051.11FApOSw014014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 8cb4c3631630 - stable/13 - [udp6] fix possible panic due to lack of locking. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8cb4c363163062bceec92383eae43f5a32049c73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 10:51:25 -0000 The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=8cb4c363163062bceec92383eae43f5a32049c73 commit 8cb4c363163062bceec92383eae43f5a32049c73 Author: Andrey V. Elsukov AuthorDate: 2021-02-11 08:38:41 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-02-15 10:48:56 +0000 [udp6] fix possible panic due to lack of locking. The lookup for a IPv6 multicast addresses corresponding to the destination address in the datagram is protected by the NET_EPOCH section. Access to each PCB is protected by INP_RLOCK during comparing. But access to socket's so_options field is not protected. And in some cases it is possible, that PCB pointer is still valid, but inp_socket is not. The patch wides lock holding to protect access to inp_socket. It copies locking strategy from IPv4 UDP handling. PR: 232192 Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D28232 (cherry picked from commit 3c782d9c91666886d868426f0aea040d1a1a8ee4) --- sys/netinet6/udp6_usrreq.c | 61 +++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 1535be90e1b0..3a001fea077d 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -353,6 +353,13 @@ skip_checksum: continue; } + INP_RLOCK(inp); + + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(inp); + continue; + } + /* * XXXRW: Because we weren't holding either the inpcb * or the hash lock when we checked for a match @@ -365,16 +372,10 @@ skip_checksum: * and source-specific multicast. [RFC3678] */ imo = inp->in6p_moptions; - if (imo && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + if (imo != NULL) { struct sockaddr_in6 mcaddr; int blocked; - INP_RLOCK(inp); - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - INP_RUNLOCK(inp); - continue; - } - bzero(&mcaddr, sizeof(struct sockaddr_in6)); mcaddr.sin6_len = sizeof(struct sockaddr_in6); mcaddr.sin6_family = AF_INET6; @@ -389,33 +390,30 @@ skip_checksum: if (blocked == MCAST_NOTSMEMBER || blocked == MCAST_MUTED) UDPSTAT_INC(udps_filtermcast); - INP_RUNLOCK(inp); /* XXX */ + INP_RUNLOCK(inp); continue; } - - INP_RUNLOCK(inp); } + if (last != NULL) { struct mbuf *n; if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) { - INP_RLOCK(last); - if (__predict_true(last->inp_flags2 & INP_FREED) == 0) { - if (nxt == IPPROTO_UDPLITE) - UDPLITE_PROBE(receive, NULL, last, - ip6, last, uh); - else - UDP_PROBE(receive, NULL, last, - ip6, last, uh); - if (udp6_append(last, n, off, fromsa)) { - /* XXX-BZ do we leak m here? */ - *mp = NULL; - return (IPPROTO_DONE); - } + if (nxt == IPPROTO_UDPLITE) + UDPLITE_PROBE(receive, NULL, + last, ip6, last, uh); + else + UDP_PROBE(receive, NULL, last, + ip6, last, uh); + if (udp6_append(last, n, off, + fromsa)) { + INP_RUNLOCK(inp); + goto badunlocked; } - INP_RUNLOCK(last); } + /* Release PCB lock taken on previous pass. */ + INP_RUNLOCK(last); } last = inp; /* @@ -441,15 +439,12 @@ skip_checksum: UDPSTAT_INC(udps_noportmcast); goto badunlocked; } - INP_RLOCK(last); - if (__predict_true(last->inp_flags2 & INP_FREED) == 0) { - if (nxt == IPPROTO_UDPLITE) - UDPLITE_PROBE(receive, NULL, last, ip6, last, uh); - else - UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, m, off, fromsa) == 0) - INP_RUNLOCK(last); - } else + + if (nxt == IPPROTO_UDPLITE) + UDPLITE_PROBE(receive, NULL, last, ip6, last, uh); + else + UDP_PROBE(receive, NULL, last, ip6, last, uh); + if (udp6_append(last, m, off, fromsa) == 0) INP_RUNLOCK(last); *mp = NULL; return (IPPROTO_DONE); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 11:01:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B51B25295FE; Mon, 15 Feb 2021 11:01:31 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfLkz34HZz4Qwn; Mon, 15 Feb 2021 11:01:30 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613386888; bh=vjSsJEAYvc+X9a2WfFNX1RHQZL5gJaoV6WAz8o7vD4Q=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=HIS6PdaYr9ISXRaekvpUBUJ6KoLhEi/nkUP6/W0qq2nzaK2pWT1528C+7QSRp8Crx NtJD/nl5w8uQ9pz8r/ed3xJ3SHBEDfUysKUA9RaDOYqRN83ZeY5S7pXLq65GoU08NW LtMz8Zwk47Hu+BSEVTg5Q6fmy57sy7Z4NYoSLiAE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from freyja ([46.88.87.16]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N79yQ-1lwzdE27f2-017UCd; Mon, 15 Feb 2021 12:01:28 +0100 Date: Mon, 15 Feb 2021 12:01:26 +0100 From: "O. Hartmann" To: "Simon J. Gerraty" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 Message-ID: <20210215120126.5c5c4779@freyja> In-Reply-To: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:uKobnrFMDpkgOEgL9JXJdcWusssTv05DMRv9Tyeol5BopQo5i3L Dk1CeP4NSSeZqJnQ05p2AbOHzVjNTTxFvZA00ck3vMrlsQ3H5D802NFCw7D8bwbgcaRznf/ Owb3RvZMN9Q1gLIH0NN2vQvTzYQGVv1cz6U0L/O7fzfidhbEUjlTcg22FRsThIZD+Dm5EdX xGwazRpx8zX2tuKHixoQw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:Q6gaK+0HuQ8=:KpdRpvkKGnZBw0NS5bS1NI 70Xx1hHrdrvkkFvP8BJOIjsbuh/jg9FtAAVW/1XbsonJQBx13Yzg5YsKap22didYkteMPPCI+ mjIAaiRMsirhr6f8uOi8LWKr+mNkC/HyFnn6AyIyKN4N5Ps0EiMeYZMF2JgtedfssT5Y0CSUh kedSZ49dm78Pzt1oBgpQL0TfBzmRf9w3YP8hQNDvu6Vezdn8eXj0ju6j2QjBLauFrCzNqc9i+ 0lGfdsrHXMvcMcDSforD3tLFdhx38Qbzv1ygrsJIB82RwatWGOPvgw7npYh75tisNdQ1X9TU1 x8bIkr5vpHyixwYmlCF25XWhOy3qdjh/Y/FE5q/47kE9MtW33ky7Lu19SJwqQKAD0wSbg3Iql Dj2N96fpRt690ZXuOB8kq8ZL9AtyFBooEjfjU6DNWyNm9D6SvJ+TIsDQc4s0DatQtFBuSOysa GRSVFtOA039EHuTE9qS0LpyDybGGiFdXNleXkGMalO1wN/yoL+jCVAmo+kuMOD5U3Zhtr59an jGrJSA9NvdaAyRkTBMDdAAFdwq/GxWLYR7dTp0ucT0ZLbLXn+r6yPhJ7AVPMQYJbaf683nvl0 Zl6qcHqCRmoyRoVT2kEaq6cHG7JwC2fY51clSuO92e2NomhTYS39VbPL+7Xu/ai5bHWkC14fz Ej+JzgVaAwUqk4DRv32+ZqsNvshOy01AiuTyr5NFKl+cg3+n+6dsquuZ0GCFTnlyc7wkwShwZ vIYpvx04ohPIgWzb9JXFy3BlbNNTYaVeT37XrJ6Aonwlhm/IsmRi9BszUPB/sQv5QmeAoviUk tGttFOtPFuNo0epo71E80PwKabaM8AeDI9YHl4hgg5fO+iVS8OQWK6TOVvdC6+p1XK+gyGTsk EMxvrY7VZ8ZCYLGjLafQ== X-Rspamd-Queue-Id: 4DfLkz34HZz4Qwn X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 11:01:31 -0000 On Mon, 15 Feb 2021 01:22:58 GMT "Simon J. Gerraty" wrote: > The branch main has been updated by sjg: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dee10666327b622c2f20a4ac17e7a56= 73b04e7c9a > > commit ee10666327b622c2f20a4ac17e7a5673b04e7c9a > Author: Simon J. Gerraty > AuthorDate: 2021-02-15 01:20:10 +0000 > Commit: Simon J. Gerraty > CommitDate: 2021-02-15 01:22:21 +0000 > > Links for bmake and bmake.1 > > Some folk forget that make is bmake, and want the links... > > MFC after: 1 week > --- > usr.bin/bmake/Makefile.inc | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc > index 96431c19d2af..8c4cb659e1d8 100644 > --- a/usr.bin/bmake/Makefile.inc > +++ b/usr.bin/bmake/Makefile.inc > @@ -9,6 +9,8 @@ > > .if exists(${.CURDIR}/tests) > PROG=3D make > +LINKS=3D make bmake > +MLINKS=3D ${MAN} b${MAN} > .endif > > .if !defined(MK_SHARED_TOOLCHAIN) || ${MK_SHARED_TOOLCHAIN} =3D=3D "no" > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to > "dev-commits-src-main-unsubscribe@freebsd.org" This commit seems to break updating and installation of jail's base system based on 14-CURRENT. # poudriere jail -l headamd64 14.0-CURRENT 1400004 amd64 src=3D/pool/sources/CURRENT/src/ = \ 2021-02-12 15:07:33 /pool/poudriere/jails/headamd64 #poudriere jail -j _somejailname_ -u -b [...] =2D-- realinstall_subdir_usr.bin --- rm -f /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1 /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz; install -N /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root -g wheel -m 444 /pool/poudriere/jails/headamd64/usr/share/man/man1/make.1.gz /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz --- _install= links =2D-- install -N /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root = -g wheel -m 555 /pool/poudriere/jails/headamd64make /pool/poudriere/jails/headamd64bmake install: link /pool/poudriere/jails/headamd64make -> /pool/poudriere/jails/headamd64bmak= e: No such file or directory *** [_installlinks] Error code 71 make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmake 1 error make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmake =2D-- realinstall_subdir_share --- From owner-dev-commits-src-all@freebsd.org Mon Feb 15 13:14:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4BC1952DAD2; Mon, 15 Feb 2021 13:14:26 +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 4DfPhL1lWJz4Z5d; Mon, 15 Feb 2021 13:14: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 2B00D1DFCC; Mon, 15 Feb 2021 13:14: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 11FDEQm3001398; Mon, 15 Feb 2021 13:14:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FDEQWP001397; Mon, 15 Feb 2021 13:14:26 GMT (envelope-from git) Date: Mon, 15 Feb 2021 13:14:26 GMT Message-Id: <202102151314.11FDEQWP001397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: cc743b050acf - main - linux: drop unneeded casts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc743b050acf59862b268296d50923d6e5f0e86f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 13:14:26 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=cc743b050acf59862b268296d50923d6e5f0e86f commit cc743b050acf59862b268296d50923d6e5f0e86f Author: Edward Tomasz Napierala AuthorDate: 2021-02-15 12:34:10 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-02-15 13:14:15 +0000 linux: drop unneeded casts No functional changes. Sponsored By: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28533 --- sys/amd64/linux/linux_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index c2aebcf7df19..e44f5c320c39 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -136,7 +136,7 @@ int linux_mmap2(struct thread *td, struct linux_mmap2_args *args) { - return (linux_mmap_common(td, PTROUT(args->addr), args->len, args->prot, + return (linux_mmap_common(td, args->addr, args->len, args->prot, args->flags, args->fd, args->pgoff)); } @@ -144,14 +144,14 @@ int linux_mprotect(struct thread *td, struct linux_mprotect_args *uap) { - return (linux_mprotect_common(td, PTROUT(uap->addr), uap->len, uap->prot)); + return (linux_mprotect_common(td, uap->addr, uap->len, uap->prot)); } int linux_madvise(struct thread *td, struct linux_madvise_args *uap) { - return (linux_madvise_common(td, PTROUT(uap->addr), uap->len, uap->behav)); + return (linux_madvise_common(td, uap->addr, uap->len, uap->behav)); } int From owner-dev-commits-src-all@freebsd.org Mon Feb 15 13:58:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9F15A52E953; Mon, 15 Feb 2021 13:58: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 4DfQgc46Gtz4bx1; Mon, 15 Feb 2021 13:58: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 801011EAB7; Mon, 15 Feb 2021 13:58: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 11FDwq4l054141; Mon, 15 Feb 2021 13:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FDwqRp054140; Mon, 15 Feb 2021 13:58:52 GMT (envelope-from git) Date: Mon, 15 Feb 2021 13:58:52 GMT Message-Id: <202102151358.11FDwqRp054140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: eac22dd48079 - main - lockmgr: shrink struct lock by 8 bytes on LP64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eac22dd48079d5cccecb07f4e60b44bb692167f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 13:58:52 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=eac22dd48079d5cccecb07f4e60b44bb692167f8 commit eac22dd48079d5cccecb07f4e60b44bb692167f8 Author: Mateusz Guzik AuthorDate: 2021-02-15 04:24:17 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-15 13:57:25 +0000 lockmgr: shrink struct lock by 8 bytes on LP64 Currently the struct has a 4 byte padding stemming from 3 ints. 1. prio comfortably fits in short, unfortunately there is no dedicated type for it and plumbing it throughout the codebase is not worth it right now, instead an assert is added which covers also flags for safety 2. lk_exslpfail can in principle exceed u_short, but the count is already not considered reliable and it only ever gets modified straight to 0. In other words it can be incrementing with an upper bound of USHRT_MAX With these in place struct lock shrinks from 48 to 40 bytes. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D28680 --- sys/kern/kern_lock.c | 18 +++++++++++++----- sys/kern/subr_lock.c | 1 + sys/sys/_lockmgr.h | 4 ++-- sys/sys/param.h | 7 ++++--- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 091abcda2a1e..5cefcf7a597b 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -61,6 +62,12 @@ __FBSDID("$FreeBSD$"); PMC_SOFT_DECLARE( , , lock, failed); #endif +/* + * Hack. There should be prio_t or similar so that this is not necessary. + */ +_Static_assert((PRILASTFLAG * 2) - 1 <= USHRT_MAX, + "prio flags wont fit in u_short pri in struct lock"); + CTASSERT(LK_UNLOCKED == (LK_UNLOCKED & ~(LK_ALL_WAITERS | LK_EXCLUSIVE_SPINNERS))); @@ -280,8 +287,10 @@ sleeplk(struct lock *lk, u_int flags, struct lock_object *ilk, if (flags & LK_INTERLOCK) class->lc_unlock(ilk); - if (queue == SQ_EXCLUSIVE_QUEUE && (flags & LK_SLEEPFAIL) != 0) - lk->lk_exslpfail++; + if (queue == SQ_EXCLUSIVE_QUEUE && (flags & LK_SLEEPFAIL) != 0) { + if (lk->lk_exslpfail < USHRT_MAX) + lk->lk_exslpfail++; + } GIANT_SAVE(); sleepq_add(&lk->lock_object, NULL, wmesg, SLEEPQ_LK | (catch ? SLEEPQ_INTERRUPTIBLE : 0), queue); @@ -345,7 +354,7 @@ retry_sleepq: realexslp = sleepq_sleepcnt(&lk->lock_object, SQ_EXCLUSIVE_QUEUE); if ((x & LK_EXCLUSIVE_WAITERS) != 0 && realexslp != 0) { - if (lk->lk_exslpfail < realexslp) { + if (lk->lk_exslpfail != USHRT_MAX && lk->lk_exslpfail < realexslp) { lk->lk_exslpfail = 0; queue = SQ_EXCLUSIVE_QUEUE; v |= (x & LK_SHARED_WAITERS); @@ -362,7 +371,6 @@ retry_sleepq: SLEEPQ_LK, 0, SQ_EXCLUSIVE_QUEUE); queue = SQ_SHARED_QUEUE; } - } else { /* * Exclusive waiters sleeping with LK_SLEEPFAIL on @@ -1170,7 +1178,7 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje MPASS((x & LK_EXCLUSIVE_SPINNERS) == 0); realexslp = sleepq_sleepcnt(&lk->lock_object, SQ_EXCLUSIVE_QUEUE); if ((x & LK_EXCLUSIVE_WAITERS) != 0 && realexslp != 0) { - if (lk->lk_exslpfail < realexslp) { + if (lk->lk_exslpfail != USHRT_MAX && lk->lk_exslpfail < realexslp) { lk->lk_exslpfail = 0; queue = SQ_EXCLUSIVE_QUEUE; v |= (x & LK_SHARED_WAITERS); diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index b69ee349482c..a74f7e62db4a 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include diff --git a/sys/sys/_lockmgr.h b/sys/sys/_lockmgr.h index 62e50df1ac4e..b0d164bdb4dc 100644 --- a/sys/sys/_lockmgr.h +++ b/sys/sys/_lockmgr.h @@ -40,9 +40,9 @@ struct lock { struct lock_object lock_object; volatile uintptr_t lk_lock; - u_int lk_exslpfail; + u_short lk_exslpfail; + u_short lk_pri; int lk_timo; - int lk_pri; #ifdef DEBUG_LOCKS struct stack lk_stack; #endif diff --git a/sys/sys/param.h b/sys/sys/param.h index 058aef99e077..fa02b55d1f1b 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -227,9 +227,10 @@ ((off_t)(db) << DEV_BSHIFT) #endif -#define PRIMASK 0x0ff -#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ -#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ +#define PRIMASK 0x0ff +#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ +#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ +#define PRILASTFLAG 0x200 /* Last flag defined above */ #define NZERO 0 /* default "nice" */ From owner-dev-commits-src-all@freebsd.org Mon Feb 15 14:37:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 51CD352F4CF; Mon, 15 Feb 2021 14:37: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 4DfRX01trfz4dvN; Mon, 15 Feb 2021 14:37: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 328121F0C5; Mon, 15 Feb 2021 14:37: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 11FEbKh6006214; Mon, 15 Feb 2021 14:37:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FEbKKt006213; Mon, 15 Feb 2021 14:37:20 GMT (envelope-from git) Date: Mon, 15 Feb 2021 14:37:20 GMT Message-Id: <202102151437.11FEbKKt006213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 467f2b64dbc3 - stable/13 - mrsas: update man page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 467f2b64dbc3da664bf1808fd6fc0f8a7f2c6842 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 14:37:20 -0000 The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=467f2b64dbc3da664bf1808fd6fc0f8a7f2c6842 commit 467f2b64dbc3da664bf1808fd6fc0f8a7f2c6842 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-04 06:13:13 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-15 17:34:14 +0000 mrsas: update man page update mrsas(4) since big-endian is supported since e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Reviewed by: bdragon, gbe Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit 20e1817f9a68abd9a232367e04d2afeaf4a3c2f8) --- share/man/man4/mrsas.4 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index fb2288d91f80..0528ee2fa1bd 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2019 +.Dd February 4, 2021 .Dt MRSAS 4 .Os .Sh NAME @@ -385,8 +385,6 @@ The driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . .Sh TODO -The driver does not support big-endian architectures at this time. -.Pp The driver does not support alias for device name (it is required when the user switches between two drivers and does not want to edit .Pa /etc/fstab From owner-dev-commits-src-all@freebsd.org Mon Feb 15 14:37:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6B4AC52F624; Mon, 15 Feb 2021 14:37: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 4DfRX12Yxwz4fBs; Mon, 15 Feb 2021 14:37: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 497FF1F4A3; Mon, 15 Feb 2021 14:37: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 11FEbLFn006233; Mon, 15 Feb 2021 14:37:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FEbLw0006232; Mon, 15 Feb 2021 14:37:21 GMT (envelope-from git) Date: Mon, 15 Feb 2021 14:37:21 GMT Message-Id: <202102151437.11FEbLw0006232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 928cbdbe3910 - stable/13 - [POWERPC64LE] add mrsas to GENERIC64LE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 928cbdbe39109cdc0075e4cc1a6aa144a8ef8146 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 14:37:21 -0000 The branch stable/13 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=928cbdbe39109cdc0075e4cc1a6aa144a8ef8146 commit 928cbdbe39109cdc0075e4cc1a6aa144a8ef8146 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-04 06:12:38 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-15 17:34:28 +0000 [POWERPC64LE] add mrsas to GENERIC64LE Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit eaffd270d8729c4d79f6ce268275ef4c0e6f7b04) --- sys/powerpc/conf/GENERIC64LE | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index d3b00a63c31f..b94eac412b1e 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -127,6 +127,7 @@ device ahc # AHA2940 and onboard AIC7xxx devices options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D From owner-dev-commits-src-all@freebsd.org Mon Feb 15 16:55:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 43014532614; Mon, 15 Feb 2021 16:55: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 4DfVbP1P6wz4mwj; Mon, 15 Feb 2021 16:55: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 2291D21404; Mon, 15 Feb 2021 16:55: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 11FGtTu2088874; Mon, 15 Feb 2021 16:55:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FGtS0Z088872; Mon, 15 Feb 2021 16:55:28 GMT (envelope-from git) Date: Mon, 15 Feb 2021 16:55:28 GMT Message-Id: <202102151655.11FGtS0Z088872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 78968ce3ddbf - stable/13 - Merge bmake-20210206 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 78968ce3ddbf56ac7f7b548cfe8d39707f9989d8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 16:55:29 -0000 The branch stable/13 has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=78968ce3ddbf56ac7f7b548cfe8d39707f9989d8 commit 78968ce3ddbf56ac7f7b548cfe8d39707f9989d8 Author: Simon J. Gerraty AuthorDate: 2021-02-11 06:01:59 +0000 Commit: Simon J. Gerraty CommitDate: 2021-02-15 16:53:34 +0000 Merge bmake-20210206 Changes of interest o unit-tests: use private TMPDIR to avoid errors from other users o avoid strdup in mkTempFile o always use vfork o job.c: do not create empty shell files in jobs mode reduce unnecessary calls to waitpid o cond.c: fix debug output for comparison operators in conditionals (cherry picked from commit dba7b0ef928af88caa38728a73657b837aeeac93) Approved by: re --- contrib/bmake/ChangeLog | 73 +++ contrib/bmake/FILES | 6 + contrib/bmake/VERSION | 2 +- contrib/bmake/arch.c | 24 +- contrib/bmake/bmake.1 | 6 +- contrib/bmake/bmake.cat1 | 4 +- contrib/bmake/buf.c | 59 +- contrib/bmake/buf.h | 25 +- contrib/bmake/compat.c | 18 +- contrib/bmake/cond.c | 655 ++++++++++--------- contrib/bmake/config.h.in | 3 + contrib/bmake/configure | 36 +- contrib/bmake/configure.in | 15 +- contrib/bmake/dir.c | 454 +++++++------ contrib/bmake/dir.h | 10 +- contrib/bmake/enum.c | 16 +- contrib/bmake/enum.h | 33 +- contrib/bmake/filemon/filemon.h | 4 +- contrib/bmake/filemon/filemon_dev.c | 6 +- contrib/bmake/filemon/filemon_ktrace.c | 13 +- contrib/bmake/for.c | 253 ++++---- contrib/bmake/hash.c | 13 +- contrib/bmake/job.c | 260 ++++---- contrib/bmake/job.h | 3 +- contrib/bmake/lst.c | 17 +- contrib/bmake/lst.h | 4 +- contrib/bmake/main.c | 316 ++++----- contrib/bmake/make.1 | 6 +- contrib/bmake/make.c | 154 +++-- contrib/bmake/make.h | 104 +-- contrib/bmake/make_malloc.c | 6 +- contrib/bmake/make_malloc.h | 4 +- contrib/bmake/meta.c | 87 +-- contrib/bmake/metachar.c | 7 +- contrib/bmake/metachar.h | 6 +- contrib/bmake/mk/ChangeLog | 9 + contrib/bmake/mk/dirdeps.mk | 10 +- contrib/bmake/mk/install-mk | 4 +- contrib/bmake/mk/meta.stage.mk | 7 +- contrib/bmake/nonints.h | 58 +- contrib/bmake/parse.c | 306 ++++----- contrib/bmake/str.c | 22 +- contrib/bmake/suff.c | 66 +- contrib/bmake/targ.c | 30 +- contrib/bmake/trace.c | 10 +- contrib/bmake/trace.h | 6 +- contrib/bmake/unit-tests/Makefile | 80 ++- .../bmake/unit-tests/cmdline-redirect-stdin.exp | 1 + contrib/bmake/unit-tests/cmdline-redirect-stdin.mk | 34 + contrib/bmake/unit-tests/cmdline.exp | 4 +- contrib/bmake/unit-tests/cmdline.mk | 4 +- contrib/bmake/unit-tests/cond-cmp-numeric-eq.exp | 1 - contrib/bmake/unit-tests/cond-cmp-numeric.exp | 8 +- contrib/bmake/unit-tests/cond-cmp-string.exp | 5 +- contrib/bmake/unit-tests/cond-cmp-string.mk | 30 +- contrib/bmake/unit-tests/cond-func-defined.exp | 6 +- contrib/bmake/unit-tests/cond-func.exp | 9 +- contrib/bmake/unit-tests/cond-op-not.exp | 5 +- contrib/bmake/unit-tests/cond-op-not.mk | 9 +- contrib/bmake/unit-tests/cond-op-parentheses.exp | 6 +- contrib/bmake/unit-tests/cond-op-parentheses.mk | 19 +- contrib/bmake/unit-tests/cond-op.exp | 4 + contrib/bmake/unit-tests/cond-op.mk | 40 +- contrib/bmake/unit-tests/cond-token-plain.exp | 31 +- contrib/bmake/unit-tests/cond-token-plain.mk | 97 ++- contrib/bmake/unit-tests/cond-token-string.exp | 20 +- contrib/bmake/unit-tests/cond-token-string.mk | 47 +- contrib/bmake/unit-tests/cond1.exp | 2 +- contrib/bmake/unit-tests/dir.mk | 4 +- contrib/bmake/unit-tests/directive-error.exp | 5 +- contrib/bmake/unit-tests/directive-error.mk | 13 +- contrib/bmake/unit-tests/directive-export-impl.exp | 8 +- contrib/bmake/unit-tests/directive-for-escape.exp | 43 +- contrib/bmake/unit-tests/directive-for-escape.mk | 28 +- contrib/bmake/unit-tests/directive-ifdef.exp | 2 + contrib/bmake/unit-tests/directive-ifdef.mk | 17 +- .../bmake/unit-tests/directive-include-fatal.mk | 4 +- contrib/bmake/unit-tests/envfirst.mk | 4 +- contrib/bmake/unit-tests/export.exp | 1 + contrib/bmake/unit-tests/gnode-submake.exp | 16 +- contrib/bmake/unit-tests/include-main.exp | 9 +- contrib/bmake/unit-tests/include-main.mk | 6 +- contrib/bmake/unit-tests/include-subsub.mk | 4 +- contrib/bmake/unit-tests/jobs-empty-commands.exp | 2 + contrib/bmake/unit-tests/jobs-empty-commands.mk | 18 + contrib/bmake/unit-tests/lint.mk | 13 +- contrib/bmake/unit-tests/objdir-writable.exp | 6 +- contrib/bmake/unit-tests/opt-debug-graph1.exp | 16 +- contrib/bmake/unit-tests/opt-debug-graph2.exp | 92 ++- contrib/bmake/unit-tests/opt-debug-graph2.mk | 22 +- contrib/bmake/unit-tests/opt-debug-graph3.exp | 92 ++- contrib/bmake/unit-tests/opt-debug-graph3.mk | 22 +- contrib/bmake/unit-tests/opt-no-action-touch.exp | 11 + contrib/bmake/unit-tests/opt-no-action-touch.mk | 48 ++ contrib/bmake/unit-tests/opt-touch-jobs.mk | 8 +- .../bmake/unit-tests/opt-warnings-as-errors.exp | 4 +- contrib/bmake/unit-tests/opt-warnings-as-errors.mk | 7 +- contrib/bmake/unit-tests/suff-incomplete.exp | 4 +- contrib/bmake/unit-tests/suff-main-several.exp | 16 +- contrib/bmake/unit-tests/suff-transform-debug.exp | 2 +- contrib/bmake/unit-tests/var-op-append.exp | 6 +- contrib/bmake/unit-tests/var-op-append.mk | 14 +- contrib/bmake/unit-tests/var-op-assign.exp | 2 +- contrib/bmake/unit-tests/var-op-shell.exp | 4 +- contrib/bmake/unit-tests/var-op-shell.mk | 13 +- contrib/bmake/unit-tests/vardebug.exp | 36 +- contrib/bmake/unit-tests/vardebug.mk | 4 +- contrib/bmake/unit-tests/varmisc.mk | 10 +- contrib/bmake/unit-tests/varmod-assign.mk | 3 +- contrib/bmake/unit-tests/varmod-gmtime.exp | 20 +- contrib/bmake/unit-tests/varmod-gmtime.mk | 19 +- contrib/bmake/unit-tests/varmod-ifelse.mk | 4 +- contrib/bmake/unit-tests/varmod-indirect.exp | 32 +- contrib/bmake/unit-tests/varmod-localtime.exp | 20 +- contrib/bmake/unit-tests/varmod-localtime.mk | 21 +- contrib/bmake/unit-tests/varmod-loop.mk | 6 +- contrib/bmake/unit-tests/varmod-match-escape.exp | 16 +- contrib/bmake/unit-tests/varmod-match-escape.mk | 20 +- contrib/bmake/unit-tests/varname-dot-shell.mk | 6 +- contrib/bmake/unit-tests/varname-empty.exp | 38 +- contrib/bmake/unit-tests/varname-empty.mk | 9 +- .../varname-make_print_var_on_error-jobs.mk | 4 +- .../unit-tests/varname-make_print_var_on_error.mk | 4 +- contrib/bmake/unit-tests/varname.exp | 10 +- contrib/bmake/unit-tests/varparse-dynamic.mk | 6 +- contrib/bmake/util.c | 10 +- contrib/bmake/var.c | 713 ++++++++++++--------- usr.bin/bmake/Makefile.config | 2 +- usr.bin/bmake/config.h | 7 +- usr.bin/bmake/unit-tests/Makefile | 80 ++- 130 files changed, 3225 insertions(+), 2153 deletions(-) diff --git a/contrib/bmake/ChangeLog b/contrib/bmake/ChangeLog index 5cf7f1f45384..5cf6f9d8fe57 100644 --- a/contrib/bmake/ChangeLog +++ b/contrib/bmake/ChangeLog @@ -1,3 +1,76 @@ +2021-02-06 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210206 + Merge with NetBSD make, pick up + o unit-tests: use private TMPDIR to avoid errors from other users + +2021-02-05 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210205 + Merge with NetBSD make, pick up + o avoid strdup in mkTempFile + o always use vfork + o rename context and ctxt to scope + o rename some VAR constants to SCOPE + o Var_ functions, move the scope to the front + o use shortcut functions Global_Set and Global_Append + o add shortcut Global_Delete for deleting a global variable + o rename Var_Delete to Var_DeleteExpand, Var_DeleteVar to Var_Delete + o compat.c: when exiting due to an error, print graph information + o enum.c: remove overengineered Enum_ValueToString + o make.c: remove unused INTERNAL flag + remove unused return type of MakeBuildParent + o parse.c: replace parse error "Need an operator" with better message + o var.c: improve documentation about variable scopes + rename Var_ValueDirect to GNode_ValueDirect + rename old Var_SetWithFlags to Var_SetExpandWithFlags + merge SetVar into Var_SetWithFlags + split Var_Exists into plain Var_Exists and Var_ExistsExpand + split Var_Append into Var_Append and Var_AppendExpand + replace enum bit-set with bit-field + o unit-tests/var-op-shell: use kill rather than kill -14 + which broke on darwin with recent update. + +2021-02-01 Simon J Gerraty + + * configure.in: check for sig_atomic_t and define it as 'int' + if missing. + + * VERSION (_MAKE_VERSION): 20210201 + Merge with NetBSD make, pick up + o use sig_atomic_t for caught_sigchld + +2021-01-30 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210130 + Merge with NetBSD make, pick up + o more unit tests + o convert SearchPath to struct + o split Buf_Destroy into Buf_Done and Buf_DoneData + o for.c: split For_Eval into separate functions + rename struct For to struct ForLoop + o job.c: do not create empty shell files in jobs mode + rename JobOpenTmpFile to JobWriteShellCommands + reduce unnecessary calls to waitpid + o parse.c: in -dp mode, print stack trace with each diagnostic + +2021-01-23 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210123 + Merge with NetBSD make, pick up + o rename Dir_Expand to SearchPath_Expand + o rename Dir_AddDir, reorder parameters of SearchPath_ToFlags + o cond.c: fix debug output for comparison operators in conditionals + o dir.c: split Dir_FindFile into separate functions + +2021-01-20 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20210120 + Merge with NetBSD make, pick up + o fix some more lint nits + o refine some unit tests for portability + o cond.c: rework parsing + 2021-01-10 Simon J Gerraty * VERSION (_MAKE_VERSION): 20210110 diff --git a/contrib/bmake/FILES b/contrib/bmake/FILES index 8e2513e1c183..5e7b8301da87 100644 --- a/contrib/bmake/FILES +++ b/contrib/bmake/FILES @@ -83,6 +83,8 @@ unit-tests/cmd-errors.exp unit-tests/cmd-errors.mk unit-tests/cmd-interrupt.exp unit-tests/cmd-interrupt.mk +unit-tests/cmdline-redirect-stdin.exp +unit-tests/cmdline-redirect-stdin.mk unit-tests/cmdline-undefined.exp unit-tests/cmdline-undefined.mk unit-tests/cmdline.exp @@ -397,6 +399,8 @@ unit-tests/job-flags.exp unit-tests/job-flags.mk unit-tests/job-output-long-lines.exp unit-tests/job-output-long-lines.mk +unit-tests/jobs-empty-commands.exp +unit-tests/jobs-empty-commands.mk unit-tests/jobs-error-indirect.exp unit-tests/jobs-error-indirect.mk unit-tests/jobs-error-nested-make.exp @@ -501,6 +505,8 @@ unit-tests/opt-no-action-at-all.exp unit-tests/opt-no-action-at-all.mk unit-tests/opt-no-action-runflags.exp unit-tests/opt-no-action-runflags.mk +unit-tests/opt-no-action-touch.exp +unit-tests/opt-no-action-touch.mk unit-tests/opt-no-action.exp unit-tests/opt-no-action.mk unit-tests/opt-query.exp diff --git a/contrib/bmake/VERSION b/contrib/bmake/VERSION index 70e0f68a60b0..0af794962680 100644 --- a/contrib/bmake/VERSION +++ b/contrib/bmake/VERSION @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20210110 +_MAKE_VERSION=20210206 diff --git a/contrib/bmake/arch.c b/contrib/bmake/arch.c index 037f6bc548cf..e5c0a5e4ac0f 100644 --- a/contrib/bmake/arch.c +++ b/contrib/bmake/arch.c @@ -1,4 +1,4 @@ -/* $NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $ */ +/* $NetBSD: arch.c,v 1.197 2021/02/05 05:15:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -147,7 +147,7 @@ struct ar_hdr { #include "dir.h" /* "@(#)arch.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: arch.c,v 1.193 2021/01/09 16:06:09 rillig Exp $"); +MAKE_RCSID("$NetBSD: arch.c,v 1.197 2021/02/05 05:15:12 rillig Exp $"); typedef struct List ArchList; typedef struct ListNode ArchListNode; @@ -225,14 +225,14 @@ ArchFree(void *ap) * Input: * pp The start of the specification. * gns The list on which to place the nodes. - * ctxt The context in which to expand variables. + * scope The scope in which to expand variables. * * Output: * return TRUE if it was a valid specification. * *pp Points to the first non-space after the archive spec. */ Boolean -Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) +Arch_ParseArchive(char **pp, GNodeList *gns, GNode *scope) { char *cp; /* Pointer into line */ GNode *gn; /* New node */ @@ -255,7 +255,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) Boolean isError; /* XXX: is expanded twice: once here and once below */ - (void)Var_Parse(&nested_p, ctxt, + (void)Var_Parse(&nested_p, scope, VARE_WANTRES | VARE_UNDEFERR, &result); /* TODO: handle errors */ isError = result.str == var_Error; @@ -272,7 +272,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) *cp++ = '\0'; if (expandLibName) { char *expanded; - (void)Var_Subst(libName.str, ctxt, + (void)Var_Subst(libName.str, scope, VARE_WANTRES | VARE_UNDEFERR, &expanded); /* TODO: handle errors */ libName = MFStr_InitOwn(expanded); @@ -298,7 +298,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) Boolean isError; const char *nested_p = cp; - (void)Var_Parse(&nested_p, ctxt, + (void)Var_Parse(&nested_p, scope, VARE_WANTRES | VARE_UNDEFERR, &result); /* TODO: handle errors */ @@ -355,7 +355,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) char *p; char *unexpandedMemName = memName; - (void)Var_Subst(memName, ctxt, + (void)Var_Subst(memName, scope, VARE_WANTRES | VARE_UNDEFERR, &memName); /* TODO: handle errors */ @@ -379,7 +379,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) gn->type |= OP_ARCHV; Lst_Append(gns, gn); - } else if (!Arch_ParseArchive(&p, gns, ctxt)) { + } else if (!Arch_ParseArchive(&p, gns, scope)) { /* Error in nested call. */ free(fullName); /* XXX: does unexpandedMemName leak? */ @@ -390,7 +390,7 @@ Arch_ParseArchive(char **pp, GNodeList *gns, GNode *ctxt) } else if (Dir_HasWildcards(memName)) { StringList members = LST_INIT; - Dir_Expand(memName, &dirSearchPath, &members); + SearchPath_Expand(&dirSearchPath, memName, &members); while (!Lst_IsEmpty(&members)) { char *member = Lst_Dequeue(&members); @@ -1022,9 +1022,9 @@ Arch_FindLib(GNode *gn, SearchPath *path) free(libName); #ifdef LIBRARIES - Var_Set(TARGET, gn->name, gn); + Var_Set(gn, TARGET, gn->name); #else - Var_Set(TARGET, gn->path == NULL ? gn->name : gn->path, gn); + Var_Set(gn, TARGET, GNode_Path(gn)); #endif } diff --git a/contrib/bmake/bmake.1 b/contrib/bmake/bmake.1 index f35c14cc1eee..e0d8267994c1 100644 --- a/contrib/bmake/bmake.1 +++ b/contrib/bmake/bmake.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.295 2020/12/23 13:49:12 rillig Exp $ +.\" $NetBSD: make.1,v 1.296 2021/02/04 21:42:46 rillig Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -99,7 +99,7 @@ is equivalent to .It Fl D Ar variable Define .Ar variable -to be 1, in the global context. +to be 1, in the global scope. .It Fl d Ar [-]flags Turn on debugging, and specify which portions of .Nm @@ -355,7 +355,7 @@ Do not build any targets. Multiple instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or undefined variable. -The value printed is extracted from the global context after all +The value printed is extracted from the global scope after all makefiles have been read. By default, the raw variable contents (which may include additional unexpanded variable references) are shown. diff --git a/contrib/bmake/bmake.cat1 b/contrib/bmake/bmake.cat1 index 9ed1dcdd9018..d9723b35cf7f 100644 --- a/contrib/bmake/bmake.cat1 +++ b/contrib/bmake/bmake.cat1 @@ -37,7 +37,7 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) -C /etc. -D variable - Define variable to be 1, in the global context. + Define variable to be 1, in the global scope. -d [-]flags Turn on debugging, and specify which portions of bmake are to @@ -224,7 +224,7 @@ BMAKE(1) FreeBSD General Commands Manual BMAKE(1) instances of this option may be specified; the variables will be printed one per line, with a blank line for each null or unde- fined variable. The value printed is extracted from the global - context after all makefiles have been read. By default, the raw + scope after all makefiles have been read. By default, the raw variable contents (which may include additional unexpanded vari- able references) are shown. If variable contains a `$' then the value will be recursively expanded to its complete resultant text diff --git a/contrib/bmake/buf.c b/contrib/bmake/buf.c index b6a2e9192b60..cef082247278 100644 --- a/contrib/bmake/buf.c +++ b/contrib/bmake/buf.c @@ -1,4 +1,4 @@ -/* $NetBSD: buf.c,v 1.47 2020/12/30 10:03:16 rillig Exp $ */ +/* $NetBSD: buf.c,v 1.51 2021/01/30 21:18:14 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -75,7 +75,7 @@ #include "make.h" /* "@(#)buf.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: buf.c,v 1.47 2020/12/30 10:03:16 rillig Exp $"); +MAKE_RCSID("$NetBSD: buf.c,v 1.51 2021/01/30 21:18:14 rillig Exp $"); /* Make space in the buffer for adding at least 16 more bytes. */ void @@ -92,7 +92,7 @@ Buf_AddBytes(Buffer *buf, const char *bytes, size_t bytes_len) size_t old_len = buf->len; char *end; - if (__predict_false(old_len + bytes_len >= buf->cap)) { + if (old_len + bytes_len >= buf->cap) { size_t minIncr = bytes_len + 16; buf->cap += buf->cap > minIncr ? buf->cap : minIncr; buf->data = bmake_realloc(buf->data, buf->cap); @@ -135,21 +135,6 @@ Buf_AddInt(Buffer *buf, int n) Buf_AddBytes(buf, str, len); } -/* - * Get the data (usually a string) from the buffer. - * The returned data is valid until the next modifying operation - * on the buffer. - * - * Returns the data and optionally the length of the data. - */ -char * -Buf_GetAll(Buffer *buf, size_t *out_len) -{ - if (out_len != NULL) - *out_len = buf->len; - return buf->data; -} - /* Mark the buffer as empty, so it can be filled with data again. */ void Buf_Empty(Buffer *buf) @@ -175,22 +160,35 @@ Buf_Init(Buffer *buf) } /* - * Reset the buffer. - * If freeData is TRUE, the data from the buffer is freed as well. - * Otherwise it is kept and returned. + * Free the data from the buffer. + * Leave the buffer itself in an indeterminate state. + */ +void +Buf_Done(Buffer *buf) +{ + free(buf->data); + +#ifdef CLEANUP + buf->cap = 0; + buf->len = 0; + buf->data = NULL; +#endif +} + +/* + * Return the data from the buffer. + * Leave the buffer itself in an indeterminate state. */ char * -Buf_Destroy(Buffer *buf, Boolean freeData) +Buf_DoneData(Buffer *buf) { char *data = buf->data; - if (freeData) { - free(data); - data = NULL; - } +#ifdef CLEANUP buf->cap = 0; buf->len = 0; buf->data = NULL; +#endif return data; } @@ -200,22 +198,23 @@ Buf_Destroy(Buffer *buf, Boolean freeData) #endif /* - * Reset the buffer and return its data. + * Return the data from the buffer. + * Leave the buffer itself in an indeterminate state. * * If the buffer size is much greater than its content, * a new buffer will be allocated and the old one freed. */ char * -Buf_DestroyCompact(Buffer *buf) +Buf_DoneDataCompact(Buffer *buf) { #if BUF_COMPACT_LIMIT > 0 if (buf->cap - buf->len >= BUF_COMPACT_LIMIT) { /* We trust realloc to be smart */ char *data = bmake_realloc(buf->data, buf->len + 1); data[buf->len] = '\0'; /* XXX: unnecessary */ - Buf_Destroy(buf, FALSE); + Buf_DoneData(buf); return data; } #endif - return Buf_Destroy(buf, FALSE); + return Buf_DoneData(buf); } diff --git a/contrib/bmake/buf.h b/contrib/bmake/buf.h index 942b115c76e6..594e9651dbfb 100644 --- a/contrib/bmake/buf.h +++ b/contrib/bmake/buf.h @@ -1,4 +1,4 @@ -/* $NetBSD: buf.h,v 1.38 2020/12/28 15:42:53 rillig Exp $ */ +/* $NetBSD: buf.h,v 1.42 2021/01/30 21:25:10 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -81,16 +81,11 @@ /* An automatically growing null-terminated buffer of characters. */ typedef struct Buffer { - size_t cap; /* Allocated size of the buffer, including the null */ - size_t len; /* Number of bytes in buffer, excluding the null */ + size_t cap; /* Allocated size of the buffer, including the '\0' */ + size_t len; /* Number of bytes in buffer, excluding the '\0' */ char *data; /* The buffer itself (always null-terminated) */ } Buffer; -/* If we aren't on NetBSD, __predict_false() might not be defined. */ -#ifndef __predict_false -#define __predict_false(x) (x) -#endif - void Buf_Expand(Buffer *); /* Buf_AddByte adds a single byte to a buffer. */ @@ -99,19 +94,13 @@ Buf_AddByte(Buffer *buf, char byte) { size_t old_len = buf->len++; char *end; - if (__predict_false(old_len + 1 >= buf->cap)) + if (old_len + 1 >= buf->cap) Buf_Expand(buf); end = buf->data + old_len; end[0] = byte; end[1] = '\0'; } -MAKE_INLINE size_t -Buf_Len(const Buffer *buf) -{ - return buf->len; -} - MAKE_INLINE Boolean Buf_EndsWith(const Buffer *buf, char ch) { @@ -122,11 +111,11 @@ void Buf_AddBytes(Buffer *, const char *, size_t); void Buf_AddBytesBetween(Buffer *, const char *, const char *); void Buf_AddStr(Buffer *, const char *); void Buf_AddInt(Buffer *, int); -char *Buf_GetAll(Buffer *, size_t *); void Buf_Empty(Buffer *); void Buf_Init(Buffer *); void Buf_InitSize(Buffer *, size_t); -char *Buf_Destroy(Buffer *, Boolean); -char *Buf_DestroyCompact(Buffer *); +void Buf_Done(Buffer *); +char *Buf_DoneData(Buffer *); +char *Buf_DoneDataCompact(Buffer *); #endif /* MAKE_BUF_H */ diff --git a/contrib/bmake/compat.c b/contrib/bmake/compat.c index 6c7238318959..59190d8c4354 100644 --- a/contrib/bmake/compat.c +++ b/contrib/bmake/compat.c @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.219 2021/01/10 21:20:46 rillig Exp $ */ +/* $NetBSD: compat.c,v 1.224 2021/02/05 05:15:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -69,7 +69,7 @@ * SUCH DAMAGE. */ -/*- +/* * compat.c -- * The routines in this file implement the full-compatibility * mode of PMake. Most of the special functionality of PMake @@ -99,7 +99,7 @@ #include "pathnames.h" /* "@(#)compat.c 8.2 (Berkeley) 3/19/94" */ -MAKE_RCSID("$NetBSD: compat.c,v 1.219 2021/01/10 21:20:46 rillig Exp $"); +MAKE_RCSID("$NetBSD: compat.c,v 1.224 2021/02/05 05:15:12 rillig Exp $"); static GNode *curTarg = NULL; static pid_t compatChild; @@ -260,7 +260,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) /* * Append the expanded command, to prevent the * local variables from being interpreted in the - * context of the .END node. + * scope of the .END node. * * A probably unintended side effect of this is that * the expanded command will be expanded again in the @@ -360,7 +360,7 @@ Compat_RunCommand(const char *cmdp, GNode *gn, StringListNode *ln) /* * Fork and execute the single command. If the fork fails, we abort. */ - compatChild = cpid = vFork(); + compatChild = cpid = vfork(); if (cpid < 0) { Fatal("Could not fork"); } @@ -512,7 +512,7 @@ MakeUnmade(GNode *gn, GNode *pgn) } if (Lst_FindDatum(&gn->implicitParents, pgn) != NULL) - Var_Set(IMPSRC, GNode_VarTarget(gn), pgn); + Var_Set(pgn, IMPSRC, GNode_VarTarget(gn)); /* * All the children were made ok. Now youngestChild->mtime contains the @@ -605,7 +605,7 @@ MakeOther(GNode *gn, GNode *pgn) if (Lst_FindDatum(&gn->implicitParents, pgn) != NULL) { const char *target = GNode_VarTarget(gn); - Var_Set(IMPSRC, target != NULL ? target : "", pgn); + Var_Set(pgn, IMPSRC, target != NULL ? target : ""); } switch (gn->made) { @@ -752,6 +752,10 @@ Compat_Run(GNodeList *targs) } if (errorNode != NULL) { + if (DEBUG(GRAPH2)) + Targ_PrintGraph(2); + else if (DEBUG(GRAPH3)) + Targ_PrintGraph(3); PrintOnError(errorNode, "\nStop."); exit(1); } diff --git a/contrib/bmake/cond.c b/contrib/bmake/cond.c index 1a8aba637fe9..8f36fda22f12 100644 --- a/contrib/bmake/cond.c +++ b/contrib/bmake/cond.c @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.235 2021/01/10 21:20:46 rillig Exp $ */ +/* $NetBSD: cond.c,v 1.256 2021/02/05 05:15:12 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -95,53 +95,65 @@ #include "dir.h" /* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */ -MAKE_RCSID("$NetBSD: cond.c,v 1.235 2021/01/10 21:20:46 rillig Exp $"); +MAKE_RCSID("$NetBSD: cond.c,v 1.256 2021/02/05 05:15:12 rillig Exp $"); /* * The parsing of conditional expressions is based on this grammar: - * E -> F || E - * E -> F - * F -> T && F - * F -> T - * T -> defined(variable) - * T -> make(target) - * T -> exists(file) - * T -> empty(varspec) - * T -> target(name) - * T -> commands(name) - * T -> symbol - * T -> $(varspec) op value - * T -> $(varspec) == "string" - * T -> $(varspec) != "string" - * T -> "string" - * T -> ( E ) - * T -> ! T - * op -> == | != | > | < | >= | <= + * Or -> And '||' Or + * Or -> And + * And -> Term '&&' And + * And -> Term + * Term -> Function '(' Argument ')' + * Term -> Leaf Operator Leaf + * Term -> Leaf + * Term -> '(' Or ')' + * Term -> '!' Term + * Leaf -> "string" + * Leaf -> Number + * Leaf -> VariableExpression + * Leaf -> Symbol + * Operator -> '==' | '!=' | '>' | '<' | '>=' | '<=' * - * 'symbol' is some other symbol to which the default function is applied. + * 'Symbol' is an unquoted string literal to which the default function is + * applied. * * The tokens are scanned by CondToken, which returns: - * TOK_AND for '&' or '&&' - * TOK_OR for '|' or '||' + * TOK_AND for '&&' + * TOK_OR for '||' * TOK_NOT for '!' * TOK_LPAREN for '(' * TOK_RPAREN for ')' + * * Other terminal symbols are evaluated using either the default function or * the function given in the terminal, they return either TOK_TRUE or * TOK_FALSE. - * - * TOK_FALSE is 0 and TOK_TRUE 1 so we can directly assign C comparisons. - * - * All non-terminal functions (CondParser_Expr, CondParser_Factor and - * CondParser_Term) return either TOK_FALSE, TOK_TRUE, or TOK_ERROR on error. */ typedef enum Token { - TOK_FALSE = 0, TOK_TRUE = 1, TOK_AND, TOK_OR, TOK_NOT, + TOK_FALSE, TOK_TRUE, TOK_AND, TOK_OR, TOK_NOT, TOK_LPAREN, TOK_RPAREN, TOK_EOF, TOK_NONE, TOK_ERROR } Token; +typedef enum CondResult { + CR_FALSE, CR_TRUE, CR_ERROR +} CondResult; + +typedef enum ComparisonOp { + LT, LE, GT, GE, EQ, NE +} ComparisonOp; + typedef struct CondParser { - const struct If *if_info; /* Info for current statement */ + + /* + * The plain '.if ${VAR}' evaluates to true if the value of the + * expression has length > 0. The other '.if' variants delegate + * to evalBare instead. + */ + Boolean plain; + + /* The function to apply on unquoted bare words. */ + Boolean (*evalBare)(size_t, const char *); + Boolean negateEvalBare; + const char *p; /* The remaining condition to parse */ Token curr; /* Single push-back token used in parsing */ @@ -154,11 +166,13 @@ typedef struct CondParser { Boolean printedError; } CondParser; -static Token CondParser_Expr(CondParser *par, Boolean); +static CondResult CondParser_Or(CondParser *par, Boolean); static unsigned int cond_depth = 0; /* current .if nesting level */ static unsigned int cond_min_depth = 0; /* depth at makefile open */ +static const char *opname[] = { "<", "<=", ">", ">=", "==", "!=" }; + /* * Indicate when we should be strict about lhs of comparisons. * In strict mode, the lhs must be a variable expression or a string literal @@ -214,7 +228,7 @@ CondParser_SkipWhitespace(CondParser *par) * Return the length of the argument, or 0 on error. */ static size_t -ParseFuncArg(const char **pp, Boolean doEval, const char *func, +ParseFuncArg(CondParser *par, const char **pp, Boolean doEval, const char *func, char **out_arg) { const char *p = *pp; @@ -254,7 +268,7 @@ ParseFuncArg(const char **pp, Boolean doEval, const char *func, ? VARE_WANTRES | VARE_UNDEFERR : VARE_NONE; FStr nestedVal; - (void)Var_Parse(&p, VAR_CMDLINE, eflags, &nestedVal); + (void)Var_Parse(&p, SCOPE_CMDLINE, eflags, &nestedVal); /* TODO: handle errors */ Buf_AddStr(&argBuf, nestedVal.str); FStr_Done(&nestedVal); @@ -268,16 +282,15 @@ ParseFuncArg(const char **pp, Boolean doEval, const char *func, p++; } - *out_arg = Buf_GetAll(&argBuf, &argLen); - Buf_Destroy(&argBuf, FALSE); + argLen = argBuf.len; + *out_arg = Buf_DoneData(&argBuf); cpp_skip_hspace(&p); if (func != NULL && *p++ != ')') { - Parse_Error(PARSE_WARNING, - "Missing closing parenthesis for %s()", - func); - /* The PARSE_FATAL follows in CondEvalExpression. */ + Parse_Error(PARSE_FATAL, + "Missing closing parenthesis for %s()", func); + par->printedError = TRUE; return 0; } @@ -290,7 +303,7 @@ ParseFuncArg(const char **pp, Boolean doEval, const char *func, static Boolean FuncDefined(size_t argLen MAKE_ATTR_UNUSED, const char *arg) { - FStr value = Var_Value(arg, VAR_CMDLINE); + FStr value = Var_Value(SCOPE_CMDLINE, arg); Boolean result = value.str != NULL; FStr_Done(&value); return result; @@ -390,7 +403,70 @@ is_separator(char ch) return ch == '\0' || ch_isspace(ch) || strchr("!=><)", ch) != NULL; } -/*- +/* + * In a quoted or unquoted string literal or a number, parse a variable + * expression. + * + * Example: .if x${CENTER}y == "${PREFIX}${SUFFIX}" || 0x${HEX} + */ +static Boolean +CondParser_StringExpr(CondParser *par, const char *start, + Boolean const doEval, Boolean const quoted, + Buffer *buf, FStr *const inout_str) +{ + VarEvalFlags eflags; + const char *nested_p; + Boolean atStart; + VarParseResult parseResult; + + /* if we are in quotes, an undefined variable is ok */ + eflags = doEval && !quoted ? VARE_WANTRES | VARE_UNDEFERR + : doEval ? VARE_WANTRES + : VARE_NONE; + + nested_p = par->p; + atStart = nested_p == start; + parseResult = Var_Parse(&nested_p, SCOPE_CMDLINE, eflags, inout_str); + /* TODO: handle errors */ + if (inout_str->str == var_Error) { + if (parseResult == VPR_ERR) { + /* + * FIXME: Even if an error occurs, there is no + * guarantee that it is reported. + * + * See cond-token-plain.mk $$$$$$$$. + */ + par->printedError = TRUE; + } + /* + * XXX: Can there be any situation in which a returned + * var_Error requires freeIt? + */ + FStr_Done(inout_str); + /* + * Even if !doEval, we still report syntax errors, which is + * what getting var_Error back with !doEval means. + */ + *inout_str = FStr_InitRefer(NULL); + return FALSE; + } + par->p = nested_p; + + /* + * If the '$' started the string literal (which means no quotes), and + * the variable expression is followed by a space, looks like a + * comparison operator or is the end of the expression, we are done. + */ + if (atStart && is_separator(par->p[0])) + return FALSE; + + Buf_AddStr(buf, inout_str->str); + FStr_Done(inout_str); + *inout_str = FStr_InitRefer(NULL); /* not finished yet */ + return TRUE; +} + +/* * Parse a string from a variable reference or an optionally quoted * string. This is called for the lhs and rhs of string comparisons. * @@ -399,19 +475,14 @@ is_separator(char ch) * Sets out_quoted if the string was quoted. * Sets out_freeIt. */ -/* coverity:[+alloc : arg-*4] */ static void CondParser_String(CondParser *par, Boolean doEval, Boolean strictLHS, FStr *out_str, Boolean *out_quoted) { Buffer buf; FStr str; - Boolean atStart; - const char *nested_p; Boolean quoted; const char *start; - VarEvalFlags eflags; - VarParseResult parseResult; Buf_Init(&buf); str = FStr_InitRefer(NULL); @@ -430,12 +501,10 @@ CondParser_String(CondParser *par, Boolean doEval, Boolean strictLHS, } continue; case '"': - if (quoted) { - par->p++; /* skip the closing quote */ - goto got_str; - } - Buf_AddByte(&buf, par->p[0]); /* likely? */ par->p++; + if (quoted) + goto got_str; /* skip the closing quote */ + Buf_AddByte(&buf, '"'); continue; case ')': /* see is_separator */ case '!': @@ -450,47 +519,9 @@ CondParser_String(CondParser *par, Boolean doEval, Boolean strictLHS, par->p++; continue; case '$': - /* if we are in quotes, an undefined variable is ok */ - eflags = - doEval && !quoted ? VARE_WANTRES | VARE_UNDEFERR : - doEval ? VARE_WANTRES : - VARE_NONE; - - nested_p = par->p; - atStart = nested_p == start; - parseResult = Var_Parse(&nested_p, VAR_CMDLINE, eflags, - &str); - /* TODO: handle errors */ - if (str.str == var_Error) { - if (parseResult == VPR_ERR) - par->printedError = TRUE; - /* *** 10768 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Mon Feb 15 17:09:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0C7BA532EE1; Mon, 15 Feb 2021 17:09:49 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfVvw4xhVz4p5w; Mon, 15 Feb 2021 17:09:48 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108159.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11FH0Y4R003336; Mon, 15 Feb 2021 09:09:46 -0800 Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2170.outbound.protection.outlook.com [104.47.56.170]) by mx0a-00273201.pphosted.com with ESMTP id 36pdm4argb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 09:09:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O/Mba467bUug1SRmTvdbHUczPphqp5EmbSFU57KTKa2z3ElmSIc3oR1pwz4v7EA+MRH1Q4XQAzpkJk1i4AWfvc52NWAb7CA2+QPUrByA9hLKXMrQ44ZxPW9p+81gzchIH5xSa3ksf1dIg1mKxA1lFxxp4VrUCCNjhzAyjuvD8zG0ZP7v83XyUjxsUxtKtHAjFPErcFlfw+g2kB0fTMJLjI5xqYVceVsGq5MdLN42v411BYTDRuPbPiTti9eSoqpZNJh5EEBD59XCiI23AbQ5qWUHybFhPdvJ+y2R5RnRWzVldco1HnqrMpcisr3haPCCuxMjl9CqH2orbgzKGsd1gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hemsrNGOwBqZeAAibqZwyjWZdJK/8CZKAnfJ1NnwVBU=; b=lLXL+PDjHiKmNXdlxIQi+vB6mz9RyU0FcLmJriWGZu9zVjjub5645P1Bn5YFgHahyJf61hxUbZGh0q9/3s8jaeTxD1UFyJI1BwuEjUz6Re0xvGb1jgxjTuevEskU4e5DMF0xbOnY0KRgk5WiCyoYoTXBiMSbXsYnBVipcUFYThOrmFAAwEu0F+diKz73QjA3/+WIwL9QX08+djQ1o0dmB2HbYSNZ1PHlZktdNZuF4XTh7+FCPubL8cUOJIbdmjHJW7IY0URgmxJImequR5e8V50DbfLtop6SHxLui/lb4Ws77VIL2Jv6qhI0uJh2T+V0342Doz7L3deiZMbLstV2Dg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=walstatt.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from MW4PR04CA0405.namprd04.prod.outlook.com (2603:10b6:303:80::20) by DM6PR05MB4633.namprd05.prod.outlook.com (2603:10b6:5:16::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.17; Mon, 15 Feb 2021 17:09:45 +0000 Received: from MW2NAM12FT051.eop-nam12.prod.protection.outlook.com (2603:10b6:303:80:cafe::6b) by MW4PR04CA0405.outlook.office365.com (2603:10b6:303:80::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25 via Frontend Transport; Mon, 15 Feb 2021 17:09:44 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; walstatt.org; dkim=none (message not signed) header.d=none;walstatt.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by MW2NAM12FT051.mail.protection.outlook.com (10.13.181.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3868.20 via Frontend Transport; Mon, 15 Feb 2021 17:09:44 +0000 Received: from P-EXBEND-EQX-02.jnpr.net (10.104.8.53) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Feb 2021 09:09:43 -0800 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-02.jnpr.net (10.104.8.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Feb 2021 09:09:43 -0800 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 15 Feb 2021 09:09:43 -0800 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 11FH9hke020957; Mon, 15 Feb 2021 09:09:43 -0800 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 085F02AF90; Mon, 15 Feb 2021 09:09:43 -0800 (PST) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 07EC12AF3B; Mon, 15 Feb 2021 09:09:43 -0800 (PST) To: "O. Hartmann" CC: , , , Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 In-Reply-To: <20210215120126.5c5c4779@freyja> References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> <20210215120126.5c5c4779@freyja> Comments: In-reply-to: "O. Hartmann" message dated "Mon, 15 Feb 2021 12:01:26 +0100." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19732.1613408983.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Feb 2021 09:09:43 -0800 Message-ID: <23679.1613408983@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7e56f5e9-9221-4ceb-036d-08d8d1d47da8 X-MS-TrafficTypeDiagnostic: DM6PR05MB4633: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bGiXRg3EOkj7d5kih4Wvpa/AoF8nLA0L7IOXLnef9ZNjc+UF8ZLcXtUL2xlpPSxfagpVZj2vX1ZFeMxaqmIEViEDMkli+mHcu34Bt9KcUCbikZ+m2/m1aNpMLr4Cs+3B1svm7rB9mfpxCyqcy0a40xk12S1yPNNkerRcp4eVNlISin5haHc2w+arjAlRQku/lOcclTx4CMVeSeuy/Vajy/LjS19aUBTqeu4XeMnGKB3LUaKKfSiMB1y/GWT6/pm+1BsI2097kwK3nF2PZZnWcPkFg7h8SK1LZsyELGmj/zpUH7M8qacgcm5mGSsuLglQGldAX22+591BXsVjufWltt1/c4/iSdZ6+lMPvKBiTn50LH6ztl6iTQ+N0yiOrGlklG64guzTfgKrCnxt4vc/LYTfCbFzWwvr87mHstGhQxR9GiOc9ovN9rBW6Wugq7vLdytexOlER2iVDaVDqlUf4iAyvRhRVdIfQwlyscPrY+zvE6swAHTyHLV4Cg00fNPHzdpWuWudYr7hnpW/gOjeawOTb7lKX/g8WF0R/nEqV5h22zuCXmDVHHcCSq/Pg36hWxQYG+9TffdbSkhoWkqFOtlv4+pVXnGsACWSFU+Oed4Sj9uxewJlTMS12FmtNgtcN2Bs7MSrfG2L8Qfp3Vf310Bq0mb/gZuvWmEJ4K00rNNEQgSEqjapXmTDkfbirxc0 X-Forefront-Antispam-Report: CIP:66.129.239.12; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-01.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(39860400002)(396003)(376002)(136003)(346002)(46966006)(36840700001)(82310400003)(316002)(47076005)(8676002)(26005)(478600001)(54906003)(70586007)(36860700001)(6916009)(6266002)(336012)(186003)(55016002)(7696005)(4326008)(2906002)(107886003)(356005)(8936002)(7126003)(5660300002)(70206006)(81166007)(82740400003)(9686003)(86362001)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 17:09:44.3360 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e56f5e9-9221-4ceb-036d-08d8d1d47da8 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT051.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB4633 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-15_13:2021-02-12, 2021-02-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 clxscore=1011 impostorscore=0 malwarescore=0 mlxscore=0 adultscore=0 spamscore=0 mlxlogscore=772 bulkscore=0 phishscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102150132 X-Rspamd-Queue-Id: 4DfVvw4xhVz4p5w X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 17:09:49 -0000 O. Hartmann wrote: > > .if exists(${.CURDIR}/tests) > > PROG=3D make > > +LINKS=3D make bmake > > +MLINKS=3D ${MAN} b${MAN} > > .endif > > > = > This commit seems to break updating and installation of jail's base syst= em > based on 14-CURRENT. > = > # poudriere jail -l > headamd64 14.0-CURRENT 1400004 amd64 src=3D/pool/sources/CURRENT/src= / \ > 2021-02-12 15:07:33 /pool/poudriere/jails/headamd64 > = > #poudriere jail -j _somejailname_ -u -b > = > [...] > --- realinstall_subdir_usr.bin --- > rm -f /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1 > /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz; install = -N > /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root -g wheel -m 444 > /pool/poudriere/jails/headamd64/usr/share/man/man1/make.1.gz > /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz --- _insta= lllinks Is this process using something other than *.mk from share/mk ? It seems a bug to react to ${[M]LINKS} but not have the implementation. I'm not familiar with the above - any pointers? > --- install -N /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root = -g > wheel -m 555 /pool/poudriere/jails/headamd64make > /pool/poudriere/jails/headamd64bmake install: link > /pool/poudriere/jails/headamd64make -> /pool/poudriere/jails/headamd64bm= ake: No > such file or directory *** [_installlinks] Error code 71 > = > make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmak= e > 1 error > = > make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmak= e > --- realinstall_subdir_share --- From owner-dev-commits-src-all@freebsd.org Mon Feb 15 17:51:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EA3FD533BFF; Mon, 15 Feb 2021 17:51:08 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfWqc1k0wz4qjK; Mon, 15 Feb 2021 17:51:08 +0000 (UTC) (envelope-from yuripv@yuripv.dev) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 534385801E3; Mon, 15 Feb 2021 12:41:43 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 15 Feb 2021 12:41:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yuripv.dev; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=8 2d6bYcKMjA3HqtB7/3feGy9QWXHHc+7Ie3R2iUoLoc=; b=car+KBwpB1RWsO64O FXtbVUfhd24GfB2HbFXrWLL0OhAO5XfqDGWiGDCsezuF1cZCzq5MD0QD1S6LHFdd /7+G7WnaHIneWQijzlEHEKFiBLhDwXTeVd+dqNRRXGzx5iPwOkSpgozx68PA2dSG Ue7pqMIsl8OdUKTr/wRVC5pGJa2VW7SuHK7K9+GUodKA8bKrf9pKudlcYBx5lTa7 qvYGZZ8WEyQQXcFL19Ulp+h4mjXuJxP9u8L/BKHr/fM9CdG3XSbzdjtPwKVQIIDe XQst6ja7XT2fe5m8DzXggUDC+16Bkr3qIvZuPIhxruaLvfE8pJnbTcTQpwC+fRyU C0bZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=82d6bYcKMjA3HqtB7/3feGy9QWXHHc+7Ie3R2iUoL oc=; b=ldkuvIwK3o1zHnUv9rn2Eh7KkXOavoRqJeG6CukrDUWPAshF9Xj6GDhda uF/WQ8aldZwlSefgPoVEoVN7i7n9ENkDQeEevhEJQGB/Nfw+UfFFdzmH7hoqiLbN 8ARzUlC28CL2igTbYlCJ7OMyXGfoRoUtP3Bb9IjvZ2yC7jOF2mO4VdfY6IkL8/r9 D8x0OlBRtvVVYA/fs0EjfkC2FGnuMM1XY9J4CeDUVEYD0466K+zZSHxOrA63gXkk prhjIfZTTQlXAhVdmhIRdz8myjJ0QAKTd6EnlEJjUSGFXKeygg96XP8vRpScgFNa va4iMsP8zbvwQOL7/4HMkrvlND5ig== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrieekgdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpegjuhhrihcu rfgrnhhkohhvuceohihurhhiphhvseihuhhrihhpvhdruggvvheqnecuggftrfgrthhtvg hrnhepffehvdekgeeijeevledvfffgveeuvefggfejhfelueeuveetvddvvdfgieetffet necukfhppeeluddrvdegtddruddvgedrudefjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpeihuhhrihhpvheshihurhhiphhvrdguvghv X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.137]) by mail.messagingengine.com (Postfix) with ESMTPA id AC0C124005C; Mon, 15 Feb 2021 12:41:41 -0500 (EST) Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 To: "Simon J. Gerraty" , "O. Hartmann" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> <20210215120126.5c5c4779@freyja> <23679.1613408983@kaos.jnpr.net> From: Yuri Pankov Message-ID: <52e7ab03-96a0-a569-800d-6430370be582@yuripv.dev> Date: Mon, 15 Feb 2021 20:41:40 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <23679.1613408983@kaos.jnpr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DfWqc1k0wz4qjK X-Spamd-Bar: +++++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yuripv.dev header.s=fm1 header.b=car+KBwp; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=ldkuvIwK; dmarc=none; spf=pass (mx1.freebsd.org: domain of yuripv@yuripv.dev designates 66.111.4.221 as permitted sender) smtp.mailfrom=yuripv@yuripv.dev X-Spamd-Result: default: False [7.89 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:66.111.4.221:c]; RWL_MAILSPIKE_GOOD(0.00)[66.111.4.221:from]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[yuripv.dev:+,messagingengine.com:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.111.4.221:from]; ASN(0.00)[asn:11403, ipnet:66.111.4.0/24, country:US]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.221:from]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.137:received]; R_DKIM_ALLOW(0.00)[yuripv.dev:s=fm1,messagingengine.com:s=fm2]; FREEFALL_USER(0.00)[yuripv]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.99)[0.994]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[yuripv.dev]; NEURAL_SPAM_MEDIUM(1.00)[0.999]; BAD_REP_POLICIES(0.10)[]; SPAMHAUS_ZRD(0.00)[66.111.4.221:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000]; GREYLIST(0.00)[pass,body]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-Spam: Yes X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 17:51:09 -0000 Simon J. Gerraty wrote: > O. Hartmann wrote: >>> .if exists(${.CURDIR}/tests) >>> PROG= make >>> +LINKS= make bmake >>> +MLINKS= ${MAN} b${MAN} >>> .endif >>> >> >> This commit seems to break updating and installation of jail's base system >> based on 14-CURRENT. >> >> # poudriere jail -l >> headamd64 14.0-CURRENT 1400004 amd64 src=/pool/sources/CURRENT/src/ \ >> 2021-02-12 15:07:33 /pool/poudriere/jails/headamd64 >> >> #poudriere jail -j _somejailname_ -u -b >> >> [...] >> --- realinstall_subdir_usr.bin --- >> rm -f /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1 >> /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz; install -N >> /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root -g wheel -m 444 >> /pool/poudriere/jails/headamd64/usr/share/man/man1/make.1.gz >> /pool/poudriere/jails/headamd64/usr/share/man/man1/bmake.1.gz --- _installlinks > > Is this process using something other than *.mk from share/mk ? > It seems a bug to react to ${[M]LINKS} but not have the implementation. > > I'm not familiar with the above - any pointers? That should be the following instead: LINKS= ${BINDIR}/make ${BINDIR}/bmake >> --- install -N /pool/poudriere/jails/headamd64/usr/src/etc -l h -o root -g >> wheel -m 555 /pool/poudriere/jails/headamd64make >> /pool/poudriere/jails/headamd64bmake install: link >> /pool/poudriere/jails/headamd64make -> /pool/poudriere/jails/headamd64bmake: No >> such file or directory *** [_installlinks] Error code 71 >> >> make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmake >> 1 error >> >> make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/bmake >> --- realinstall_subdir_share --- From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:05:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8CB4E534551; Mon, 15 Feb 2021 18:05: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 4DfX883ZcKz4s3b; Mon, 15 Feb 2021 18:05: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 6D97A220A9; Mon, 15 Feb 2021 18:05: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 11FI5SRW080911; Mon, 15 Feb 2021 18:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FI5Sj7080910; Mon, 15 Feb 2021 18:05:28 GMT (envelope-from git) Date: Mon, 15 Feb 2021 18:05:28 GMT Message-Id: <202102151805.11FI5Sj7080910@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 85d6747a694a - main - bsd.links.mk wants full paths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 85d6747a694a6da2619e9f627d005a0aee87dd34 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:05:28 -0000 The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=85d6747a694a6da2619e9f627d005a0aee87dd34 commit 85d6747a694a6da2619e9f627d005a0aee87dd34 Author: Simon J. Gerraty AuthorDate: 2021-02-15 18:05:00 +0000 Commit: Simon J. Gerraty CommitDate: 2021-02-15 18:05:00 +0000 bsd.links.mk wants full paths The values in LINKS need to be full paths. --- usr.bin/bmake/Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/bmake/Makefile.inc b/usr.bin/bmake/Makefile.inc index 8c4cb659e1d8..9960f0ceeb2d 100644 --- a/usr.bin/bmake/Makefile.inc +++ b/usr.bin/bmake/Makefile.inc @@ -9,7 +9,7 @@ .if exists(${.CURDIR}/tests) PROG= make -LINKS= make bmake +LINKS= ${BINDIR}/make ${BINDIR}/bmake MLINKS= ${MAN} b${MAN} .endif From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:13:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4CB08534FB3; Mon, 15 Feb 2021 18:13: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 4DfXKM1mCgz4svC; Mon, 15 Feb 2021 18:13: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 24B9F22068; Mon, 15 Feb 2021 18:13: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 11FIDRgg093486; Mon, 15 Feb 2021 18:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FIDR9h093485; Mon, 15 Feb 2021 18:13:27 GMT (envelope-from git) Date: Mon, 15 Feb 2021 18:13:27 GMT Message-Id: <202102151813.11FIDR9h093485@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: 720600023287 - stable/13 - Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 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: 720600023287cd029894b79477fb2bd4a5183ba4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:13:27 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=720600023287cd029894b79477fb2bd4a5183ba4 commit 720600023287cd029894b79477fb2bd4a5183ba4 Author: Steve Kargl AuthorDate: 2021-02-08 19:45:30 +0000 Commit: Dimitry Andric CommitDate: 2021-02-15 18:08:20 +0000 Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 This adjusts the check to trigger overflow/underflow to a slightly lower value. Before: powf(9.999995e-01, -1.342177e+08) -> inf After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31 (cherry picked from commit 93fc67896550548f91b307dbe3053f11db5d4a8a) Add test case for 93fc67896550 (incorrect powf(3) result) This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it is currently the only place testing pow(3) and friends. (cherry picked from commit 51af03328755c9095e94d20858a8d10acfe412ae) --- contrib/netbsd-tests/lib/libm/t_pow.c | 22 ++++++++++++++++++++++ lib/msun/src/e_powf.c | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_pow.c b/contrib/netbsd-tests/lib/libm/t_pow.c index 7afee9f6dffa..09e72be7311b 100644 --- a/contrib/netbsd-tests/lib/libm/t_pow.c +++ b/contrib/netbsd-tests/lib/libm/t_pow.c @@ -637,6 +637,27 @@ ATF_TC_BODY(powf_zero_y, tc) } } +ATF_TC(powf_near_one_x_huge_y); +ATF_TC_HEAD(powf_near_one_x_huge_y, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test powf(->1, huge) != inf"); +} + +ATF_TC_BODY(powf_near_one_x_huge_y, tc) +{ + const float x = 0x1.ffffeep-1f; /* 9.999995e-01f */ + const float y = -0x1.000002p+27f; /* -1.342177e+08f */ + const float e = 0x1.d53532p+103f; /* 1.858724e+31f */ + const float ulp = __FLT_EPSILON__; + float z; + + z = powf(x, y); + + ATF_CHECK(isinf(z) == 0); + ATF_CHECK(fabsf(z - e) <= 2 * ulp); +} + + ATF_TP_ADD_TCS(tp) { @@ -661,6 +682,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, powf_one_pos_x); ATF_TP_ADD_TC(tp, powf_zero_x); ATF_TP_ADD_TC(tp, powf_zero_y); + ATF_TP_ADD_TC(tp, powf_near_one_x_huge_y); return atf_no_error(); } diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index 53f1d37d6bec..33eedad50b16 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -136,7 +136,7 @@ __ieee754_powf(float x, float y) /* |y| is huge */ if(iy>0x4d000000) { /* if |y| > 2**27 */ /* over/underflow if x is not close to one */ - if(ix<0x3f7ffff8) return (hy<0)? sn*huge*huge:sn*tiny*tiny; + if(ix<0x3f7ffff7) return (hy<0)? sn*huge*huge:sn*tiny*tiny; if(ix>0x3f800007) return (hy>0)? sn*huge*huge:sn*tiny*tiny; /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:13:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BB609534D7E; Mon, 15 Feb 2021 18:13: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 4DfXKg4wfBz4smb; Mon, 15 Feb 2021 18:13: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 91DB222069; Mon, 15 Feb 2021 18:13: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 11FIDhDJ093630; Mon, 15 Feb 2021 18:13:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FIDh8W093629; Mon, 15 Feb 2021 18:13:43 GMT (envelope-from git) Date: Mon, 15 Feb 2021 18:13:43 GMT Message-Id: <202102151813.11FIDh8W093629@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: cedb8de26ccc - stable/12 - Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 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: cedb8de26ccc46a9b8215dad58f411b93d101db5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:13:43 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=cedb8de26ccc46a9b8215dad58f411b93d101db5 commit cedb8de26ccc46a9b8215dad58f411b93d101db5 Author: Steve Kargl AuthorDate: 2021-02-08 19:45:30 +0000 Commit: Dimitry Andric CommitDate: 2021-02-15 18:10:40 +0000 Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 This adjusts the check to trigger overflow/underflow to a slightly lower value. Before: powf(9.999995e-01, -1.342177e+08) -> inf After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31 (cherry picked from commit 93fc67896550548f91b307dbe3053f11db5d4a8a) Add test case for 93fc67896550 (incorrect powf(3) result) This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it is currently the only place testing pow(3) and friends. (cherry picked from commit 51af03328755c9095e94d20858a8d10acfe412ae) --- contrib/netbsd-tests/lib/libm/t_pow.c | 22 ++++++++++++++++++++++ lib/msun/src/e_powf.c | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_pow.c b/contrib/netbsd-tests/lib/libm/t_pow.c index 7afee9f6dffa..09e72be7311b 100644 --- a/contrib/netbsd-tests/lib/libm/t_pow.c +++ b/contrib/netbsd-tests/lib/libm/t_pow.c @@ -637,6 +637,27 @@ ATF_TC_BODY(powf_zero_y, tc) } } +ATF_TC(powf_near_one_x_huge_y); +ATF_TC_HEAD(powf_near_one_x_huge_y, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test powf(->1, huge) != inf"); +} + +ATF_TC_BODY(powf_near_one_x_huge_y, tc) +{ + const float x = 0x1.ffffeep-1f; /* 9.999995e-01f */ + const float y = -0x1.000002p+27f; /* -1.342177e+08f */ + const float e = 0x1.d53532p+103f; /* 1.858724e+31f */ + const float ulp = __FLT_EPSILON__; + float z; + + z = powf(x, y); + + ATF_CHECK(isinf(z) == 0); + ATF_CHECK(fabsf(z - e) <= 2 * ulp); +} + + ATF_TP_ADD_TCS(tp) { @@ -661,6 +682,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, powf_one_pos_x); ATF_TP_ADD_TC(tp, powf_zero_x); ATF_TP_ADD_TC(tp, powf_zero_y); + ATF_TP_ADD_TC(tp, powf_near_one_x_huge_y); return atf_no_error(); } diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index 53f1d37d6bec..33eedad50b16 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -136,7 +136,7 @@ __ieee754_powf(float x, float y) /* |y| is huge */ if(iy>0x4d000000) { /* if |y| > 2**27 */ /* over/underflow if x is not close to one */ - if(ix<0x3f7ffff8) return (hy<0)? sn*huge*huge:sn*tiny*tiny; + if(ix<0x3f7ffff7) return (hy<0)? sn*huge*huge:sn*tiny*tiny; if(ix>0x3f800007) return (hy>0)? sn*huge*huge:sn*tiny*tiny; /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:16:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ECFFD5350A6; Mon, 15 Feb 2021 18:16: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 4DfXNf5zxsz4tL8; Mon, 15 Feb 2021 18:16: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 BE5A02206A; Mon, 15 Feb 2021 18:16: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 11FIGIgf094120; Mon, 15 Feb 2021 18:16:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FIGIEb094119; Mon, 15 Feb 2021 18:16:18 GMT (envelope-from git) Date: Mon, 15 Feb 2021 18:16:18 GMT Message-Id: <202102151816.11FIGIEb094119@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: 182881658138 - stable/11 - Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 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: 182881658138a3b074a78649acd4e768c204b44f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:16:19 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=182881658138a3b074a78649acd4e768c204b44f commit 182881658138a3b074a78649acd4e768c204b44f Author: Steve Kargl AuthorDate: 2021-02-08 19:45:30 +0000 Commit: Dimitry Andric CommitDate: 2021-02-15 18:12:09 +0000 Fix incorrect powf(3) result with x near 1 and |y| much larger than 1 This adjusts the check to trigger overflow/underflow to a slightly lower value. Before: powf(9.999995e-01, -1.342177e+08) -> inf After: powf(9.999995e-01, -1.342177e+08) -> 1.858724e+31 (cherry picked from commit 93fc67896550548f91b307dbe3053f11db5d4a8a) Add test case for 93fc67896550 (incorrect powf(3) result) This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it is currently the only place testing pow(3) and friends. (cherry picked from commit 51af03328755c9095e94d20858a8d10acfe412ae) --- contrib/netbsd-tests/lib/libm/t_pow.c | 22 ++++++++++++++++++++++ lib/msun/src/e_powf.c | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_pow.c b/contrib/netbsd-tests/lib/libm/t_pow.c index 7afee9f6dffa..09e72be7311b 100644 --- a/contrib/netbsd-tests/lib/libm/t_pow.c +++ b/contrib/netbsd-tests/lib/libm/t_pow.c @@ -637,6 +637,27 @@ ATF_TC_BODY(powf_zero_y, tc) } } +ATF_TC(powf_near_one_x_huge_y); +ATF_TC_HEAD(powf_near_one_x_huge_y, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test powf(->1, huge) != inf"); +} + +ATF_TC_BODY(powf_near_one_x_huge_y, tc) +{ + const float x = 0x1.ffffeep-1f; /* 9.999995e-01f */ + const float y = -0x1.000002p+27f; /* -1.342177e+08f */ + const float e = 0x1.d53532p+103f; /* 1.858724e+31f */ + const float ulp = __FLT_EPSILON__; + float z; + + z = powf(x, y); + + ATF_CHECK(isinf(z) == 0); + ATF_CHECK(fabsf(z - e) <= 2 * ulp); +} + + ATF_TP_ADD_TCS(tp) { @@ -661,6 +682,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, powf_one_pos_x); ATF_TP_ADD_TC(tp, powf_zero_x); ATF_TP_ADD_TC(tp, powf_zero_y); + ATF_TP_ADD_TC(tp, powf_near_one_x_huge_y); return atf_no_error(); } diff --git a/lib/msun/src/e_powf.c b/lib/msun/src/e_powf.c index d7611e571731..0a2c77e4b017 100644 --- a/lib/msun/src/e_powf.c +++ b/lib/msun/src/e_powf.c @@ -136,7 +136,7 @@ __ieee754_powf(float x, float y) /* |y| is huge */ if(iy>0x4d000000) { /* if |y| > 2**27 */ /* over/underflow if x is not close to one */ - if(ix<0x3f7ffff8) return (hy<0)? sn*huge*huge:sn*tiny*tiny; + if(ix<0x3f7ffff7) return (hy<0)? sn*huge*huge:sn*tiny*tiny; if(ix>0x3f800007) return (hy>0)? sn*huge*huge:sn*tiny*tiny; /* now |1-x| is tiny <= 2**-20, suffice to compute log(x) by x-x^2/2+x^3/3-x^4/4 */ From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:37:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D69CE535E12; Mon, 15 Feb 2021 18:37:01 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfXrY41ymz4vZg; Mon, 15 Feb 2021 18:37:01 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11FIPAbn018206; Mon, 15 Feb 2021 10:37:00 -0800 Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102]) by mx0a-00273201.pphosted.com with ESMTP id 36penuats7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 10:36:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ckFB4mwRqYxqP5XHYDTUT7PChpsqQedCjzy3I1HdMtVeByhuihJbHTOyudpjfTDdtNaVz+pQds4JFGiPeViRbvAvLWmeGfal5617qL7KVb0JjWlVZn7S9pSQenee992y7nswwDkOLXY3KGkVJZapmpLHAaoQ+56FaOSUFp/le00T5KXqLHhIymy/qzuLAqp1TBn5J9g9qP1MpVnHYWcGyVdlqpkXF6OmQAjFN3h3ykXdLb6Ng69fX7WYXdyJ0HYfG8KjpAnm9LcPIZwAghvcs8mJzwbZEnZiaOIa4rrZmeEVO8v2ylUixODdJ79Q5W3i9JccEKdCQd64kDkgxv9ehg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m2B8+0MHpmFXOPpD0RZpVWKbDZ8fPjIq6zXm8iJu2Ao=; b=Vk6dPhat9DaDTdsvMLvEHz6VfG0bT9S3/9y3d4M1NmKaGkO2xJBaasKVyougtZRgsguD7yXdsDY2/MSBjev2GW8dPN5OA/aw3WpayY2kNfYUWLCzxhdzMOoiRkUc2sw1RCuml6kPzD4b50t1r8AoC64vjxY4s9mM2FjDF6J9gU+AdQ38mraagbn0Bx6K7mLeJvDga9SfXWiFPzNOLiquExuAha5wphS4ZWGCh9k93VjYxclosUf9idqg6GOrq9ukb5S5S02ZYUMJarD9Yzc0L9TpvEepxWEo13yoeD4ApzA3fyfdkauQcRRirz3+wFDNHE0zNEGVL9ccTqEagUBxpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.13) smtp.rcpttodomain=freebsd.org smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from DM5PR16CA0023.namprd16.prod.outlook.com (2603:10b6:3:c0::33) by DM6PR05MB6074.namprd05.prod.outlook.com (2603:10b6:5:11c::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.11; Mon, 15 Feb 2021 18:36:58 +0000 Received: from DM6NAM12FT027.eop-nam12.prod.protection.outlook.com (2603:10b6:3:c0:cafe::c0) by DM5PR16CA0023.outlook.office365.com (2603:10b6:3:c0::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.25 via Frontend Transport; Mon, 15 Feb 2021 18:36:58 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.13) smtp.mailfrom=juniper.net; FreeBSD.org; dkim=none (message not signed) header.d=none;FreeBSD.org; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.13 as permitted sender) Received: from P-EXFEND-EQX-02.jnpr.net (66.129.239.13) by DM6NAM12FT027.mail.protection.outlook.com (10.13.178.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3868.20 via Frontend Transport; Mon, 15 Feb 2021 18:36:57 +0000 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXFEND-EQX-02.jnpr.net (10.104.8.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Feb 2021 10:36:54 -0800 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 15 Feb 2021 10:36:54 -0800 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 11FIas7W002347; Mon, 15 Feb 2021 10:36:54 -0800 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 219362A464; Mon, 15 Feb 2021 10:36:54 -0800 (PST) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 200582AF9A; Mon, 15 Feb 2021 10:36:54 -0800 (PST) To: Yuri Pankov CC: "O. Hartmann" , , , , Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 In-Reply-To: <52e7ab03-96a0-a569-800d-6430370be582@yuripv.dev> References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> <20210215120126.5c5c4779@freyja> <23679.1613408983@kaos.jnpr.net> <52e7ab03-96a0-a569-800d-6430370be582@yuripv.dev> Comments: In-reply-to: Yuri Pankov message dated "Mon, 15 Feb 2021 20:41:40 +0300." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <73925.1613414214.1@kaos.jnpr.net> Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Feb 2021 10:36:54 -0800 Message-ID: <76759.1613414214@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4c706755-5917-4737-79a8-08d8d1e0acec X-MS-TrafficTypeDiagnostic: DM6PR05MB6074: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: b8vVqM8gorZB7OLgoU3meNsnhaPUO6JUXANtOQNiVRGyQvpeZtUx7Y+Zg+itHQPUIqaeN0hswQSzNzII0nkIPvRcF1LrIkB7x3mBEURQU9iUT/Q/tdHZn+BIkAiX9bSW5pticffdTk59BWcruICtRn+9zEQr4q1pIuaG/Yi5aSSVjeP+mDA93qDqaw+vR9chKylwrW3oUwdeVBHfw1vG/VVrFbtC3kxoudfdElR77l+cMB7N6yXwK27WCM4BZoPellLxPvLcIUyzxYx1sblzYmUjcoRdkiFfDrTWcV/fjn7uzP/DFVGv8v4BAAFzqXMEyXpVk2VyMFKZvRzQXqP/HSqWAGL07pqYa9h1XVNFUFBFLlIubr5wFRFQw1iS0vXdn3qbv5XMMMldQdqaMVzRQkKFxwfdPzlZCjasSxUcdxJn7EVqHaVYBOWYawFoT3+AHeO6XzkT0li5SYaGQKIOToGGd0hlHTShEn60qbhJDtoCSvP9ymk+392mVHU5q6ytkq19+srRVGJPzSu4sQafsSUD4kp69NaDVoQk371r36td8aHIDRmWQmNynnKkvbe1dt9UnrwIIt7U+MsBx3yILzzA1fa5h9hMKJo432iqUhomuj+zRpbKe8aLRL1GD2dKzuaPFP6YO2CDddZe2Tja56kjngoo6kqmr2DmxGlIElwUdfTHtuVoqu1wEWh5+y3y X-Forefront-Antispam-Report: CIP:66.129.239.13; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-02.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(376002)(136003)(346002)(39860400002)(396003)(46966006)(36840700001)(86362001)(55016002)(336012)(9686003)(316002)(356005)(6916009)(26005)(186003)(8676002)(82740400003)(478600001)(81166007)(8936002)(107886003)(6266002)(4326008)(82310400003)(4744005)(5660300002)(70586007)(36860700001)(2906002)(70206006)(54906003)(7126003)(47076005)(7696005)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2021 18:36:57.5694 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4c706755-5917-4737-79a8-08d8d1e0acec X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.13]; Helo=[P-EXFEND-EQX-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT027.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR05MB6074 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-15_14:2021-02-12, 2021-02-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 mlxscore=0 suspectscore=0 clxscore=1011 lowpriorityscore=0 malwarescore=0 mlxlogscore=556 priorityscore=1501 phishscore=0 spamscore=0 adultscore=0 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102150143 X-Rspamd-Queue-Id: 4DfXrY41ymz4vZg X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:37:01 -0000 Yuri Pankov wrote: > That should be the following instead: > = > LINKS=3D ${BINDIR}/make ${BINDIR}/bmake Yes, thanks - I committed that a little while ago after reading the error again... > = > >> --- install -N /pool/poudriere/jails/headamd64/usr/src/etc -l h -o ro= ot -g > >> wheel -m 555 /pool/poudriere/jails/headamd64make > >> /pool/poudriere/jails/headamd64bmake install: link > >> /pool/poudriere/jails/headamd64make -> /pool/poudriere/jails/headamd6= 4bmake: No > >> such file or directory *** [_installlinks] Error code 71 > >> > >> make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/b= make > >> 1 error > >> > >> make[5]: stopped in /pool/poudriere/jails/headamd64/usr/src/usr.bin/b= make > >> --- realinstall_subdir_share --- From owner-dev-commits-src-all@freebsd.org Mon Feb 15 18:37:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F079B535D41; Mon, 15 Feb 2021 18:37: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 4DfXrl0LbNz4vcV; Mon, 15 Feb 2021 18:37: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 94213222E9; Mon, 15 Feb 2021 18:37: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 11FIb9Bd020819; Mon, 15 Feb 2021 18:37:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FIb9hE020818; Mon, 15 Feb 2021 18:37:09 GMT (envelope-from git) Date: Mon, 15 Feb 2021 18:37:09 GMT Message-Id: <202102151837.11FIb9hE020818@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 41032835dc2d - main - Fix divide-by-zero panic when ASLR is enabled and superpages disabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41032835dc2d489ec7841d7529f74f6389329cd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 18:37:12 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=41032835dc2d489ec7841d7529f74f6389329cd3 commit 41032835dc2d489ec7841d7529f74f6389329cd3 Author: Jason A. Harmening AuthorDate: 2021-02-15 02:47:22 +0000 Commit: Jason A. Harmening CommitDate: 2021-02-15 18:38:04 +0000 Fix divide-by-zero panic when ASLR is enabled and superpages disabled When locating the anonymous memory region for a vm_map with ASLR enabled, we try to keep the slid base address aligned on a superpage boundary to minimize pagetable fragmentation and maximize the potential usage of superpage mappings. We can't (portably) do this if superpages have been disabled by loader tunable and pagesizes[1] is 0, and it would be less beneficial in that case anyway. PR: 253511 Reported by: johannes@jo-t.de MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28678 --- sys/kern/imgact_elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index dae11ab92a6c..245894926ee1 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1287,7 +1287,8 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) maxv1 = maxv / 2 + addr / 2; MPASS(maxv1 >= addr); /* No overflow */ map->anon_loc = __CONCAT(rnd_, __elfN(base))(map, addr, maxv1, - MAXPAGESIZES > 1 ? pagesizes[1] : pagesizes[0]); + (MAXPAGESIZES > 1 && pagesizes[1] != 0) ? + pagesizes[1] : pagesizes[0]); } else { map->anon_loc = addr; } @@ -1297,7 +1298,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) if (interp != NULL) { VOP_UNLOCK(imgp->vp); if ((map->flags & MAP_ASLR) != 0) { - /* Assume that interpeter fits into 1/4 of AS */ + /* Assume that interpreter fits into 1/4 of AS */ maxv1 = maxv / 2 + addr / 2; MPASS(maxv1 >= addr); /* No overflow */ addr = __CONCAT(rnd_, __elfN(base))(map, addr, From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:18:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 830C1536A55; Mon, 15 Feb 2021 19:18:18 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "vtr.rulingia.com", Issuer "R3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DfYm96fppz3Dyq; Mon, 15 Feb 2021 19:18:17 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.16.1/8.15.2) with ESMTPS id 11FJI1kj036783 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Feb 2021 06:18:07 +1100 (AEDT) (envelope-from peter@rulingia.com) DKIM-Filter: OpenDKIM Filter v2.10.3 vtr.rulingia.com 11FJI1kj036783 X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.16.1/8.16.1) with ESMTPS id 11FJHuJq033873 (version=TLSv1.3 cipher=AEAD-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 16 Feb 2021 06:17:56 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.16.1/8.16.1/Submit) id 11FJHuoo033872; Tue, 16 Feb 2021 06:17:56 +1100 (AEDT) (envelope-from peter) Date: Tue, 16 Feb 2021 06:17:56 +1100 From: Peter Jeremy To: "Simon J. Gerraty" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 Message-ID: References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="twrE+vEe3Pbt6a+X" Content-Disposition: inline In-Reply-To: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 4DfYm96fppz3Dyq X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:18:18 -0000 --twrE+vEe3Pbt6a+X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2021-Feb-15 01:22:58 +0000, "Simon J. Gerraty" wrote: >The branch main has been updated by sjg: > >URL: https://cgit.FreeBSD.org/src/commit/?id=3Dee10666327b622c2f20a4ac17e7= a5673b04e7c9a > >commit ee10666327b622c2f20a4ac17e7a5673b04e7c9a >Author: Simon J. Gerraty >AuthorDate: 2021-02-15 01:20:10 +0000 >Commit: Simon J. Gerraty >CommitDate: 2021-02-15 01:22:21 +0000 > > Links for bmake and bmake.1 > =20 > Some folk forget that make is bmake, and want the links... This breaks installworld with DESTDIR set: =2E.. install -o root -g wheel -m 444 /usr/src/usr.bin/bmake/tests/variables/t= 0/expected.stdout.1 /mnt/usr/tests/usr.bin/bmake/variables/t0/expected.stdo= ut.1 install -o root -g wheel -m 444 Kyuafile /mnt/usr/tests/usr.bin/bmake/va= riables/t0/Kyuafile install -l h -o root -g wheel -m 555 /mntmake /mntbmake install: link /mntmake -> /mntbmake: No such file or directory *** Error code 71 I suspect you want something like: LINKS=3D ${BINDIR}/make ${BINDIR}/bmake Also, it seems odd that you only want the link if tests are enabled - this would seem likely to create more confusion, rather than less. --=20 Peter Jeremy --twrE+vEe3Pbt6a+X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAmAqyMFfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTz+g/+LtEZ8vAieqw9FimgXwoYlqdl+PskdnGvOo3p02iJAz5NttAwpwRPlS36 Hy/RuJY1Ewhv3TxQUwGuynZuqNnCsCO86ICZdeI+YNPFKo5SMDIwiPxo9HRfZIOz c99ZwfhFIutEVKycxG8cQNFCTG9N2ac+Mezn4/fU1yh6f4SH2CyUoxbYMgE/qvhe skvD/vvL5wgWO5WGIp/d/qgdyrk7WtELxOxGJ/U9ZwR2BqY5RYJpN5CbcHqkHLvN RiECPON0GeFIeEIxXiTzan5qrIRZeGNUE7zgfQHGxK5XmmvSdZlI5ZbbQKfEBTJd PBJPDuyDJL+bi/VdVgCKV0sqYl5BD6myNOAonFiB45H2LAIdiANH9+XSpkvcZXil aYDZwClPkc46w/06DVRreXrYru1y0ZNNNHhhO1i/k98G8bZO2EniFuxdMH7Rk072 prdg5wlH9WEmg2YTZeVEE4ePVBcPoJ1c5bU/YQe5OVVu2SzOiLrCddXDH2uBL/0b E/LXt7RfLGThGo8BUkup7zviR9Iutckyo30kBOChH7HU3xuq5xgkUGLWF8jzAQMh 8ebhf0J4OGSQS0TmIdrF6UPp0eh6eP/NnfVOsgmOKYhsqHEYFrOO1qz5zffpBj12 BNwniQ+T6/vQgdLIpZ9LHZgmniGf+J+xLQcXTuoYVt/qMzaEOIo= =ZcRd -----END PGP SIGNATURE----- --twrE+vEe3Pbt6a+X-- From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:23:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 07EF4536D3C; Mon, 15 Feb 2021 19:23: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 4DfYtf6qTDz3FZH; Mon, 15 Feb 2021 19:23:54 +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 DD3FD231A2; Mon, 15 Feb 2021 19:23:54 +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 11FJNsXY085255; Mon, 15 Feb 2021 19:23:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJNsk2085254; Mon, 15 Feb 2021 19:23:54 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:23:54 GMT Message-Id: <202102151923.11FJNsk2085254@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: 03bb5b837d89 - stable/13 - mlx4, mthca: Silence warnings about no-op alignment operations 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: 03bb5b837d891defeed9b9d812c7b62b60917136 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:23:55 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=03bb5b837d891defeed9b9d812c7b62b60917136 commit 03bb5b837d891defeed9b9d812c7b62b60917136 Author: Mark Johnston AuthorDate: 2021-02-11 15:16:59 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:12:10 +0000 mlx4, mthca: Silence warnings about no-op alignment operations Since commit 8fa6abb6f4f64f ("Expose clang's alignment builtins and use them for roundup2/rounddown2"), clang emits warnings for several alignment operations in these drivers because the operation is a no-op. The compiler is arguably being too strict here, but in the meantime let's silence the warnings by conditionally compiling the alignment operations. Reviewed by: arichardson, hselasky Differential Revision: https://reviews.freebsd.org/D28576 (cherry picked from commit 29ed53850e72ab1b470b978d150561281addc0fc) --- sys/dev/mlx4/mlx4_core/icm.h | 6 ++---- sys/dev/mlx4/mlx4_core/mlx4_fw.c | 4 ++++ sys/dev/mthca/mthca_cmd.c | 4 ++++ sys/dev/mthca/mthca_memfree.h | 8 +++----- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/sys/dev/mlx4/mlx4_core/icm.h b/sys/dev/mlx4/mlx4_core/icm.h index 30dac5174f6d..e658f1dd0383 100644 --- a/sys/dev/mlx4/mlx4_core/icm.h +++ b/sys/dev/mlx4/mlx4_core/icm.h @@ -43,10 +43,8 @@ ((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ (sizeof (struct scatterlist))) -enum { - MLX4_ICM_PAGE_SHIFT = 12, - MLX4_ICM_PAGE_SIZE = 1 << MLX4_ICM_PAGE_SHIFT, -}; +#define MLX4_ICM_PAGE_SHIFT 12 +#define MLX4_ICM_PAGE_SIZE (1 << MLX4_ICM_PAGE_SHIFT) struct mlx4_icm_chunk { struct list_head list; diff --git a/sys/dev/mlx4/mlx4_core/mlx4_fw.c b/sys/dev/mlx4/mlx4_core/mlx4_fw.c index 8ad31b812428..0ac45e1297b9 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_fw.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_fw.c @@ -1707,9 +1707,11 @@ int mlx4_QUERY_FW(struct mlx4_dev *dev) * Round up number of system pages needed in case * MLX4_ICM_PAGE_SIZE < PAGE_SIZE. */ +#if MLX4_ICM_PAGE_SIZE < PAGE_SIZE fw->fw_pages = ALIGN(fw->fw_pages, PAGE_SIZE / MLX4_ICM_PAGE_SIZE) >> (PAGE_SHIFT - MLX4_ICM_PAGE_SHIFT); +#endif mlx4_dbg(dev, "Clear int @ %llx, BAR %d\n", (unsigned long long) fw->clr_int_base, fw->clr_int_bar); @@ -2546,8 +2548,10 @@ int mlx4_SET_ICM_SIZE(struct mlx4_dev *dev, u64 icm_size, u64 *aux_pages) * Round up number of system pages needed in case * MLX4_ICM_PAGE_SIZE < PAGE_SIZE. */ +#if MLX4_ICM_PAGE_SIZE < PAGE_SIZE *aux_pages = ALIGN(*aux_pages, PAGE_SIZE / MLX4_ICM_PAGE_SIZE) >> (PAGE_SHIFT - MLX4_ICM_PAGE_SHIFT); +#endif return 0; } diff --git a/sys/dev/mthca/mthca_cmd.c b/sys/dev/mthca/mthca_cmd.c index adb76bc9edbd..b4c0dc2f6f1d 100644 --- a/sys/dev/mthca/mthca_cmd.c +++ b/sys/dev/mthca/mthca_cmd.c @@ -852,9 +852,11 @@ int mthca_QUERY_FW(struct mthca_dev *dev) * Round up number of system pages needed in case * MTHCA_ICM_PAGE_SIZE < PAGE_SIZE. */ +#if MTHCA_ICM_PAGE_SIZE < PAGE_SIZE dev->fw.arbel.fw_pages = ALIGN(dev->fw.arbel.fw_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >> (PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT); +#endif mthca_dbg(dev, "Clear int @ %llx, EQ arm @ %llx, EQ set CI @ %llx\n", (unsigned long long) dev->fw.arbel.clr_int_base, @@ -1588,8 +1590,10 @@ int mthca_SET_ICM_SIZE(struct mthca_dev *dev, u64 icm_size, u64 *aux_pages) * Round up number of system pages needed in case * MTHCA_ICM_PAGE_SIZE < PAGE_SIZE. */ +#if MTHCA_ICM_PAGE_SIZE < PAGE_SIZE *aux_pages = ALIGN(*aux_pages, PAGE_SIZE / MTHCA_ICM_PAGE_SIZE) >> (PAGE_SHIFT - MTHCA_ICM_PAGE_SHIFT); +#endif return 0; } diff --git a/sys/dev/mthca/mthca_memfree.h b/sys/dev/mthca/mthca_memfree.h index da9b8f9b884f..9aa10a6a47e1 100644 --- a/sys/dev/mthca/mthca_memfree.h +++ b/sys/dev/mthca/mthca_memfree.h @@ -42,11 +42,9 @@ ((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ (sizeof (struct scatterlist))) -enum { - MTHCA_ICM_PAGE_SHIFT = 12, - MTHCA_ICM_PAGE_SIZE = 1 << MTHCA_ICM_PAGE_SHIFT, - MTHCA_DB_REC_PER_PAGE = MTHCA_ICM_PAGE_SIZE / 8 -}; +#define MTHCA_ICM_PAGE_SHIFT 12 +#define MTHCA_ICM_PAGE_SIZE (1 << MTHCA_ICM_PAGE_SHIFT) +#define MTHCA_DB_REC_PER_PAGE (MTHCA_ICM_PAGE_SIZE / 8) struct mthca_icm_chunk { struct list_head list; From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:23:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6849D536EA7; Mon, 15 Feb 2021 19:23: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 4DfYtj2PTsz3FLs; Mon, 15 Feb 2021 19:23: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 3605E22FD8; Mon, 15 Feb 2021 19:23: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 11FJNvrj085298; Mon, 15 Feb 2021 19:23:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJNv4i085297; Mon, 15 Feb 2021 19:23:57 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:23:57 GMT Message-Id: <202102151923.11FJNv4i085297@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: 8eebd9592e3d - stable/13 - mca: Handle inconsistent CMCI capability reporting 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: 8eebd9592e3daf80c2c743666614119d6c862186 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:23:57 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8eebd9592e3daf80c2c743666614119d6c862186 commit 8eebd9592e3daf80c2c743666614119d6c862186 Author: Mark Johnston AuthorDate: 2021-02-08 19:42:54 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:12:41 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) --- sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index 03100e77d455..801e18073a52 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -1070,6 +1070,20 @@ cmci_monitor(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* + * It is possible for some APs to report CMCI support even if the BSP + * does not, apparently due to a BIOS bug. + */ + if (cmc_state == NULL) { + if (bootverbose) { + printf( + "AP %d (%d,%d) reports CMCI support but the BSP does not\n", + PCPU_GET(cpuid), PCPU_GET(apic_id), + PCPU_GET(acpi_id)); + } + return; + } + ctl = rdmsr(MSR_MC_CTL2(i)); if (ctl & MC_CTL2_CMCI_EN) /* Already monitored by another CPU. */ @@ -1114,6 +1128,10 @@ cmci_resume(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* See cmci_monitor(). */ + if (cmc_state == NULL) + return; + /* Ignore banks not monitored by this CPU. */ if (!(PCPU_GET(cmci_mask) & 1 << i)) return; From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:23:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2C03A536CE5; Mon, 15 Feb 2021 19:23:56 +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 4DfYth0msMz3FTR; Mon, 15 Feb 2021 19:23:56 +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 0BEDB22EF1; Mon, 15 Feb 2021 19:23:56 +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 11FJNt50085276; Mon, 15 Feb 2021 19:23:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJNtX4085275; Mon, 15 Feb 2021 19:23:55 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:23:55 GMT Message-Id: <202102151923.11FJNtX4085275@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: 78534b222b99 - stable/13 - binmiscctl: Avoid segfault with "binmiscctl add" and no extra params 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: 78534b222b99f516f1f464675ad0bd92f880f3cf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:23:56 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=78534b222b99f516f1f464675ad0bd92f880f3cf commit 78534b222b99f516f1f464675ad0bd92f880f3cf Author: Mark Johnston AuthorDate: 2021-02-08 14:20:38 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:12:25 +0000 binmiscctl: Avoid segfault with "binmiscctl add" and no extra params (cherry picked from commit c7fcb36f5670b1d6c1f80c3c29d9d2ba374807f7) --- usr.sbin/binmiscctl/binmiscctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/binmiscctl/binmiscctl.c b/usr.sbin/binmiscctl/binmiscctl.c index 471f4c2c68dd..3c5e19def67b 100644 --- a/usr.sbin/binmiscctl/binmiscctl.c +++ b/usr.sbin/binmiscctl/binmiscctl.c @@ -284,6 +284,8 @@ add_cmd(__unused int argc, char *argv[], ximgact_binmisc_entry_t *xbe) char *magic = NULL, *mask = NULL; int sz; + if (argc == 0) + usage("Required argument missing\n"); if (strlen(argv[0]) > IBE_NAME_MAX) usage("'%s' string length longer than IBE_NAME_MAX (%d)", IBE_NAME_MAX); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:24:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9DC1D53709D; Mon, 15 Feb 2021 19:24: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 4DfYtn3lJCz3FJP; Mon, 15 Feb 2021 19:24: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 B77DB22F39; Mon, 15 Feb 2021 19:24: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 11FJO0jZ085360; Mon, 15 Feb 2021 19:24:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJO0AM085359; Mon, 15 Feb 2021 19:24:00 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:24:00 GMT Message-Id: <202102151924.11FJO0AM085359@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: 0c9ee60a24f3 - stable/13 - ktls: Make configuration sysctls available as tunables 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: 0c9ee60a24f3896148fd48422a19d69dda710c57 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:24:03 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0c9ee60a24f3896148fd48422a19d69dda710c57 commit 0c9ee60a24f3896148fd48422a19d69dda710c57 Author: Mark Johnston AuthorDate: 2021-02-08 14:19:02 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:13:18 +0000 ktls: Make configuration sysctls available as tunables Reviewed by: gallatin, jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28499 (cherry picked from commit b5aa9ad43aead288dca0eb94fb4621991917f4e1) --- sys/kern/uipc_ktls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 700206681965..a83a58088e73 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -125,12 +125,12 @@ SYSCTL_INT(_kern_ipc_tls_stats, OID_AUTO, threads, CTLFLAG_RD, "Number of TLS threads in thread-pool"); static bool ktls_offload_enable; -SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, enable, CTLFLAG_RW, +SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, enable, CTLFLAG_RWTUN, &ktls_offload_enable, 0, "Enable support for kernel TLS offload"); static bool ktls_cbc_enable = true; -SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, cbc_enable, CTLFLAG_RW, +SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, cbc_enable, CTLFLAG_RWTUN, &ktls_cbc_enable, 1, "Enable Support of AES-CBC crypto for kernel TLS"); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:24:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7F331536E33; Mon, 15 Feb 2021 19:24: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 4DfYtl08wNz3Ffh; Mon, 15 Feb 2021 19:23: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 61B5322FD9; Mon, 15 Feb 2021 19:23: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 11FJNwiY085320; Mon, 15 Feb 2021 19:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJNw8S085317; Mon, 15 Feb 2021 19:23:58 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:23:58 GMT Message-Id: <202102151923.11FJNw8S085317@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: 859d72fa6538 - stable/13 - iflib: Free resources in a consistent order during detach 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: 859d72fa6538deb19121f5169172107b15777cbf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:24:00 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=859d72fa6538deb19121f5169172107b15777cbf commit 859d72fa6538deb19121f5169172107b15777cbf Author: Sai Rajesh Tallamraju AuthorDate: 2021-02-01 16:13:00 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:12:55 +0000 iflib: Free resources in a consistent order during detach Memory and PCI resources are freed with no particular order. This could cause use-after-frees when detaching following a failed attach. For instance, iflib_tx_structures_free() frees ctx->ifc_txqs[] but iflib_tqg_detach() attempts to access this array. Similarly, adapter queues gets freed by IFDI_QUEUES_FREE() but IFDI_DETACH() attempts to access adapter queues to free PCI resources. Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D27634 (cherry picked from commit 38bfc6dee33bedb290e1ea2540f97a86fe3caee0) --- sys/dev/e1000/if_em.c | 19 ++++++------------- sys/dev/ixl/if_ixl.c | 2 +- sys/net/iflib.c | 22 +++++++++++++--------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index b71e64b214c2..11d11e7bf790 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -1102,10 +1102,11 @@ em_if_attach_post(if_ctx_t ctx) struct adapter *adapter = iflib_get_softc(ctx); struct e1000_hw *hw = &adapter->hw; int error = 0; - + /* Setup OS specific network interface */ error = em_setup_interface(ctx); if (error != 0) { + device_printf(adapter->dev, "Interface setup failed: %d\n", error); goto err_late; } @@ -1123,14 +1124,10 @@ em_if_attach_post(if_ctx_t ctx) INIT_DEBUGOUT("em_if_attach_post: end"); - return (error); + return (0); err_late: - em_release_hw_control(adapter); - em_free_pci_resources(ctx); - em_if_queues_free(ctx); - free(adapter->mta, M_DEVBUF); - + /* upon attach_post() error, iflib calls _if_detach() to free resources. */ return (error); } @@ -1155,6 +1152,8 @@ em_if_detach(if_ctx_t ctx) em_release_manageability(adapter); em_release_hw_control(adapter); em_free_pci_resources(ctx); + free(adapter->mta, M_DEVBUF); + adapter->mta = NULL; return (0); } @@ -2982,12 +2981,6 @@ em_if_queues_free(if_ctx_t ctx) free(adapter->rx_queues, M_DEVBUF); adapter->rx_queues = NULL; } - - em_release_hw_control(adapter); - - if (adapter->mta != NULL) { - free(adapter->mta, M_DEVBUF); - } } /********************************************************************* diff --git a/sys/dev/ixl/if_ixl.c b/sys/dev/ixl/if_ixl.c index 50eb448a1154..097d4b480891 100644 --- a/sys/dev/ixl/if_ixl.c +++ b/sys/dev/ixl/if_ixl.c @@ -1253,7 +1253,7 @@ ixl_if_queues_free(if_ctx_t ctx) struct ixl_pf *pf = iflib_get_softc(ctx); struct ixl_vsi *vsi = &pf->vsi; - if (!vsi->enable_head_writeback) { + if (vsi->tx_queues != NULL && !vsi->enable_head_writeback) { struct ixl_tx_queue *que; int i = 0; diff --git a/sys/net/iflib.c b/sys/net/iflib.c index cfc6972bf987..cce56d0e7335 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -4900,7 +4900,7 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct device_printf(dev, "Cannot use iflib with only 1 MSI-X interrupt!\n"); err = ENODEV; - goto fail_intr_free; + goto fail_queues; } ether_ifattach(ctx->ifc_ifp, ctx->ifc_mac.octet); @@ -4936,13 +4936,14 @@ iflib_device_register(device_t dev, void *sc, if_shared_ctx_t sctx, if_ctx_t *ct fail_detach: ether_ifdetach(ctx->ifc_ifp); -fail_intr_free: - iflib_free_intr_mem(ctx); fail_queues: + iflib_tqg_detach(ctx); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); - iflib_tqg_detach(ctx); IFDI_DETACH(ctx); + IFDI_QUEUES_FREE(ctx); +fail_intr_free: + iflib_free_intr_mem(ctx); fail_unlock: CTX_UNLOCK(ctx); iflib_deregister(ctx); @@ -5139,11 +5140,12 @@ iflib_pseudo_register(device_t dev, if_shared_ctx_t sctx, if_ctx_t *ctxp, fail_detach: ether_ifdetach(ctx->ifc_ifp); fail_queues: + iflib_tqg_detach(ctx); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); - iflib_tqg_detach(ctx); fail_iflib_detach: IFDI_DETACH(ctx); + IFDI_QUEUES_FREE(ctx); fail_unlock: CTX_UNLOCK(ctx); iflib_deregister(ctx); @@ -5173,6 +5175,8 @@ iflib_pseudo_deregister(if_ctx_t ctx) iflib_tqg_detach(ctx); iflib_tx_structures_free(ctx); iflib_rx_structures_free(ctx); + IFDI_DETACH(ctx); + IFDI_QUEUES_FREE(ctx); iflib_deregister(ctx); @@ -5233,8 +5237,12 @@ iflib_device_deregister(if_ctx_t ctx) led_destroy(ctx->ifc_led_dev); iflib_tqg_detach(ctx); + iflib_tx_structures_free(ctx); + iflib_rx_structures_free(ctx); + CTX_LOCK(ctx); IFDI_DETACH(ctx); + IFDI_QUEUES_FREE(ctx); CTX_UNLOCK(ctx); /* ether_ifdetach calls if_qflush - lock must be destroy afterwards*/ @@ -5242,9 +5250,6 @@ iflib_device_deregister(if_ctx_t ctx) bus_generic_detach(dev); - iflib_tx_structures_free(ctx); - iflib_rx_structures_free(ctx); - iflib_deregister(ctx); device_set_softc(ctx->ifc_dev, NULL); @@ -5828,7 +5833,6 @@ iflib_tx_structures_free(if_ctx_t ctx) } free(ctx->ifc_txqs, M_IFLIB); ctx->ifc_txqs = NULL; - IFDI_QUEUES_FREE(ctx); } /********************************************************************* From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:24:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BBA36536D43; Mon, 15 Feb 2021 19:24: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 4DfYtr3j0dz3FVC; Mon, 15 Feb 2021 19:24: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 B0F42230FC; Mon, 15 Feb 2021 19:24: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 11FJO1xK085382; Mon, 15 Feb 2021 19:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJO1qA085381; Mon, 15 Feb 2021 19:24:01 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:24:01 GMT Message-Id: <202102151924.11FJO1qA085381@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: 75704436e23e - stable/13 - ktls: Use COUNTER_U64_DEFINE_EARLY 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: 75704436e23ec3022881966c2d38c04bcfa9f850 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:24:04 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=75704436e23ec3022881966c2d38c04bcfa9f850 commit 75704436e23ec3022881966c2d38c04bcfa9f850 Author: Mark Johnston AuthorDate: 2021-02-08 14:18:51 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:13:28 +0000 ktls: Use COUNTER_U64_DEFINE_EARLY This makes it a bit more straightforward to add new counters when debugging. No functional change intended. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28498 (cherry picked from commit 1755b2b9891bb1bfa7a58383ef5126821f7e46e3) --- sys/kern/uipc_ktls.c | 63 +++++++++++++++-------------------------------- sys/opencrypto/ktls_ocf.c | 35 ++++++-------------------- 2 files changed, 28 insertions(+), 70 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index a83a58088e73..26912e410239 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -134,51 +134,51 @@ SYSCTL_BOOL(_kern_ipc_tls, OID_AUTO, cbc_enable, CTLFLAG_RWTUN, &ktls_cbc_enable, 1, "Enable Support of AES-CBC crypto for kernel TLS"); -static counter_u64_t ktls_tasks_active; +static COUNTER_U64_DEFINE_EARLY(ktls_tasks_active); SYSCTL_COUNTER_U64(_kern_ipc_tls, OID_AUTO, tasks_active, CTLFLAG_RD, &ktls_tasks_active, "Number of active tasks"); -static counter_u64_t ktls_cnt_tx_queued; +static COUNTER_U64_DEFINE_EARLY(ktls_cnt_tx_queued); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, sw_tx_inqueue, CTLFLAG_RD, &ktls_cnt_tx_queued, "Number of TLS records in queue to tasks for SW encryption"); -static counter_u64_t ktls_cnt_rx_queued; +static COUNTER_U64_DEFINE_EARLY(ktls_cnt_rx_queued); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, sw_rx_inqueue, CTLFLAG_RD, &ktls_cnt_rx_queued, "Number of TLS sockets in queue to tasks for SW decryption"); -static counter_u64_t ktls_offload_total; +static COUNTER_U64_DEFINE_EARLY(ktls_offload_total); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, offload_total, CTLFLAG_RD, &ktls_offload_total, "Total successful TLS setups (parameters set)"); -static counter_u64_t ktls_offload_enable_calls; +static COUNTER_U64_DEFINE_EARLY(ktls_offload_enable_calls); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, enable_calls, CTLFLAG_RD, &ktls_offload_enable_calls, "Total number of TLS enable calls made"); -static counter_u64_t ktls_offload_active; +static COUNTER_U64_DEFINE_EARLY(ktls_offload_active); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, active, CTLFLAG_RD, &ktls_offload_active, "Total Active TLS sessions"); -static counter_u64_t ktls_offload_corrupted_records; +static COUNTER_U64_DEFINE_EARLY(ktls_offload_corrupted_records); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, corrupted_records, CTLFLAG_RD, &ktls_offload_corrupted_records, "Total corrupted TLS records received"); -static counter_u64_t ktls_offload_failed_crypto; +static COUNTER_U64_DEFINE_EARLY(ktls_offload_failed_crypto); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, failed_crypto, CTLFLAG_RD, &ktls_offload_failed_crypto, "Total TLS crypto failures"); -static counter_u64_t ktls_switch_to_ifnet; +static COUNTER_U64_DEFINE_EARLY(ktls_switch_to_ifnet); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, switch_to_ifnet, CTLFLAG_RD, &ktls_switch_to_ifnet, "TLS sessions switched from SW to ifnet"); -static counter_u64_t ktls_switch_to_sw; +static COUNTER_U64_DEFINE_EARLY(ktls_switch_to_sw); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, switch_to_sw, CTLFLAG_RD, &ktls_switch_to_sw, "TLS sessions switched from ifnet to SW"); -static counter_u64_t ktls_switch_failed; +static COUNTER_U64_DEFINE_EARLY(ktls_switch_failed); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats, OID_AUTO, switch_failed, CTLFLAG_RD, &ktls_switch_failed, "TLS sessions unable to switch between SW and ifnet"); @@ -191,34 +191,34 @@ SYSCTL_NODE(_kern_ipc_tls, OID_AUTO, toe, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "TOE TLS session stats"); #endif -static counter_u64_t ktls_sw_cbc; +static COUNTER_U64_DEFINE_EARLY(ktls_sw_cbc); SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, cbc, CTLFLAG_RD, &ktls_sw_cbc, "Active number of software TLS sessions using AES-CBC"); -static counter_u64_t ktls_sw_gcm; +static COUNTER_U64_DEFINE_EARLY(ktls_sw_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, gcm, CTLFLAG_RD, &ktls_sw_gcm, "Active number of software TLS sessions using AES-GCM"); -static counter_u64_t ktls_ifnet_cbc; +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_cbc); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, cbc, CTLFLAG_RD, &ktls_ifnet_cbc, "Active number of ifnet TLS sessions using AES-CBC"); -static counter_u64_t ktls_ifnet_gcm; +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, gcm, CTLFLAG_RD, &ktls_ifnet_gcm, "Active number of ifnet TLS sessions using AES-GCM"); -static counter_u64_t ktls_ifnet_reset; +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_reset); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, reset, CTLFLAG_RD, &ktls_ifnet_reset, "TLS sessions updated to a new ifnet send tag"); -static counter_u64_t ktls_ifnet_reset_dropped; +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_reset_dropped); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, reset_dropped, CTLFLAG_RD, &ktls_ifnet_reset_dropped, "TLS sessions dropped after failing to update ifnet send tag"); -static counter_u64_t ktls_ifnet_reset_failed; +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_reset_failed); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, reset_failed, CTLFLAG_RD, &ktls_ifnet_reset_failed, "TLS sessions that failed to allocate a new ifnet send tag"); @@ -229,12 +229,12 @@ SYSCTL_UINT(_kern_ipc_tls_ifnet, OID_AUTO, permitted, CTLFLAG_RWTUN, "Whether to permit hardware (ifnet) TLS sessions"); #ifdef TCP_OFFLOAD -static counter_u64_t ktls_toe_cbc; +static COUNTER_U64_DEFINE_EARLY(ktls_toe_cbc); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, cbc, CTLFLAG_RD, &ktls_toe_cbc, "Active number of TOE TLS sessions using AES-CBC"); -static counter_u64_t ktls_toe_gcm; +static COUNTER_U64_DEFINE_EARLY(ktls_toe_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, gcm, CTLFLAG_RD, &ktls_toe_gcm, "Active number of TOE TLS sessions using AES-GCM"); @@ -359,29 +359,6 @@ ktls_init(void *dummy __unused) cpuset_t mask; int count, domain, error, i; - ktls_tasks_active = counter_u64_alloc(M_WAITOK); - ktls_cnt_tx_queued = counter_u64_alloc(M_WAITOK); - ktls_cnt_rx_queued = counter_u64_alloc(M_WAITOK); - ktls_offload_total = counter_u64_alloc(M_WAITOK); - ktls_offload_enable_calls = counter_u64_alloc(M_WAITOK); - ktls_offload_active = counter_u64_alloc(M_WAITOK); - ktls_offload_corrupted_records = counter_u64_alloc(M_WAITOK); - ktls_offload_failed_crypto = counter_u64_alloc(M_WAITOK); - ktls_switch_to_ifnet = counter_u64_alloc(M_WAITOK); - ktls_switch_to_sw = counter_u64_alloc(M_WAITOK); - ktls_switch_failed = counter_u64_alloc(M_WAITOK); - ktls_sw_cbc = counter_u64_alloc(M_WAITOK); - ktls_sw_gcm = counter_u64_alloc(M_WAITOK); - ktls_ifnet_cbc = counter_u64_alloc(M_WAITOK); - ktls_ifnet_gcm = counter_u64_alloc(M_WAITOK); - ktls_ifnet_reset = counter_u64_alloc(M_WAITOK); - ktls_ifnet_reset_dropped = counter_u64_alloc(M_WAITOK); - ktls_ifnet_reset_failed = counter_u64_alloc(M_WAITOK); -#ifdef TCP_OFFLOAD - ktls_toe_cbc = counter_u64_alloc(M_WAITOK); - ktls_toe_gcm = counter_u64_alloc(M_WAITOK); -#endif - rm_init(&ktls_backends_lock, "ktls backends"); LIST_INIT(&ktls_backends); diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index d66ad88729b1..7f9ece99ccb1 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -72,37 +72,37 @@ static SYSCTL_NODE(_kern_ipc_tls_stats, OID_AUTO, ocf, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "Kernel TLS offload via OCF stats"); -static counter_u64_t ocf_tls10_cbc_crypts; +static COUNTER_U64_DEFINE_EARLY(ocf_tls10_cbc_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls10_cbc_crypts, CTLFLAG_RD, &ocf_tls10_cbc_crypts, "Total number of OCF TLS 1.0 CBC encryption operations"); -static counter_u64_t ocf_tls11_cbc_crypts; +static COUNTER_U64_DEFINE_EARLY(ocf_tls11_cbc_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls11_cbc_crypts, CTLFLAG_RD, &ocf_tls11_cbc_crypts, "Total number of OCF TLS 1.1/1.2 CBC encryption operations"); -static counter_u64_t ocf_tls12_gcm_crypts; +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_gcm_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_crypts, CTLFLAG_RD, &ocf_tls12_gcm_crypts, "Total number of OCF TLS 1.2 GCM encryption operations"); -static counter_u64_t ocf_tls13_gcm_crypts; +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_crypts, CTLFLAG_RD, &ocf_tls13_gcm_crypts, "Total number of OCF TLS 1.3 GCM encryption operations"); -static counter_u64_t ocf_inplace; +static COUNTER_U64_DEFINE_EARLY(ocf_inplace); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, inplace, CTLFLAG_RD, &ocf_inplace, "Total number of OCF in-place operations"); -static counter_u64_t ocf_separate_output; +static COUNTER_U64_DEFINE_EARLY(ocf_separate_output); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, separate_output, CTLFLAG_RD, &ocf_separate_output, "Total number of OCF operations with a separate output buffer"); -static counter_u64_t ocf_retries; +static COUNTER_U64_DEFINE_EARLY(ocf_retries); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, retries, CTLFLAG_RD, &ocf_retries, "Number of OCF encryption operation retries"); @@ -698,30 +698,11 @@ struct ktls_crypto_backend ocf_backend = { static int ktls_ocf_modevent(module_t mod, int what, void *arg) { - int error; - switch (what) { case MOD_LOAD: - ocf_tls10_cbc_crypts = counter_u64_alloc(M_WAITOK); - ocf_tls11_cbc_crypts = counter_u64_alloc(M_WAITOK); - ocf_tls12_gcm_crypts = counter_u64_alloc(M_WAITOK); - ocf_tls13_gcm_crypts = counter_u64_alloc(M_WAITOK); - ocf_inplace = counter_u64_alloc(M_WAITOK); - ocf_separate_output = counter_u64_alloc(M_WAITOK); - ocf_retries = counter_u64_alloc(M_WAITOK); return (ktls_crypto_backend_register(&ocf_backend)); case MOD_UNLOAD: - error = ktls_crypto_backend_deregister(&ocf_backend); - if (error) - return (error); - counter_u64_free(ocf_tls10_cbc_crypts); - counter_u64_free(ocf_tls11_cbc_crypts); - counter_u64_free(ocf_tls12_gcm_crypts); - counter_u64_free(ocf_tls13_gcm_crypts); - counter_u64_free(ocf_inplace); - counter_u64_free(ocf_separate_output); - counter_u64_free(ocf_retries); - return (0); + return (ktls_crypto_backend_deregister(&ocf_backend)); default: return (EOPNOTSUPP); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:24:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9DC7A536CEA; Mon, 15 Feb 2021 19:24: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 4DfYtm2mwsz3FTq; Mon, 15 Feb 2021 19:24: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 8DADB231A3; Mon, 15 Feb 2021 19:23: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 11FJNxrE085338; Mon, 15 Feb 2021 19:23:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJNxTQ085337; Mon, 15 Feb 2021 19:23:59 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:23:59 GMT Message-Id: <202102151923.11FJNxTQ085337@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: 313cd76a2aac - stable/13 - armv8crypto: Extract GCM state into a structure 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: 313cd76a2aacdc37667cb9df34e027ba08a74f97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:24:04 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=313cd76a2aacdc37667cb9df34e027ba08a74f97 commit 313cd76a2aacdc37667cb9df34e027ba08a74f97 Author: Mark Johnston AuthorDate: 2021-02-08 14:19:10 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:13:06 +0000 armv8crypto: Extract GCM state into a structure This makes it easier to refactor the GCM code to operate on crypto_buffer_cursors rather than plain contiguous buffers, with the aim of minimizing the amount of copying and zeroing done today. No functional change intended. Reviewed by: jhb Sponsored by: Ampere Computing Submitted by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28500 (cherry picked from commit 7509b677b413b9551c15b483ec2ed9ce655d2455) --- sys/crypto/armv8/armv8_crypto_wrap.c | 135 +++++++++++++++++------------------ 1 file changed, 65 insertions(+), 70 deletions(-) diff --git a/sys/crypto/armv8/armv8_crypto_wrap.c b/sys/crypto/armv8/armv8_crypto_wrap.c index 2f880258bf46..eb4a431d33e9 100644 --- a/sys/crypto/armv8/armv8_crypto_wrap.c +++ b/sys/crypto/armv8/armv8_crypto_wrap.c @@ -234,6 +234,14 @@ armv8_aes_decrypt_xts(AES_key_t *data_schedule, break; \ } while (0) +struct armv8_gcm_state { + __uint128_val_t EK0; + __uint128_val_t EKi; + __uint128_val_t Xi; + __uint128_val_t lenblock; + uint8_t aes_counter[AES_BLOCK_LEN]; +}; + void armv8_aes_encrypt_gcm(AES_key_t *aes_key, size_t len, const uint8_t *from, uint8_t *to, @@ -242,36 +250,34 @@ armv8_aes_encrypt_gcm(AES_key_t *aes_key, size_t len, const uint8_t iv[static AES_GCM_IV_LEN], const __uint128_val_t *Htable) { - size_t i; + struct armv8_gcm_state s; const uint64_t *from64; uint64_t *to64; - uint8_t aes_counter[AES_BLOCK_LEN]; uint8_t block[AES_BLOCK_LEN]; - size_t trailer; - __uint128_val_t EK0, EKi, Xi, lenblock; + size_t i, trailer; - bzero(&aes_counter, AES_BLOCK_LEN); - memcpy(aes_counter, iv, AES_GCM_IV_LEN); + bzero(&s.aes_counter, AES_BLOCK_LEN); + memcpy(s.aes_counter, iv, AES_GCM_IV_LEN); /* Setup the counter */ - aes_counter[AES_BLOCK_LEN - 1] = 1; + s.aes_counter[AES_BLOCK_LEN - 1] = 1; /* EK0 for a final GMAC round */ - aes_v8_encrypt(aes_counter, EK0.c, aes_key); + aes_v8_encrypt(s.aes_counter, s.EK0.c, aes_key); /* GCM starts with 2 as counter, 1 is used for final xor of tag. */ - aes_counter[AES_BLOCK_LEN - 1] = 2; + s.aes_counter[AES_BLOCK_LEN - 1] = 2; - memset(Xi.c, 0, sizeof(Xi.c)); + memset(s.Xi.c, 0, sizeof(s.Xi.c)); trailer = authdatalen % AES_BLOCK_LEN; if (authdatalen - trailer > 0) { - gcm_ghash_v8(Xi.u, Htable, authdata, authdatalen - trailer); + gcm_ghash_v8(s.Xi.u, Htable, authdata, authdatalen - trailer); authdata += authdatalen - trailer; } if (trailer > 0 || authdatalen == 0) { memset(block, 0, sizeof(block)); memcpy(block, authdata, trailer); - gcm_ghash_v8(Xi.u, Htable, block, AES_BLOCK_LEN); + gcm_ghash_v8(s.Xi.u, Htable, block, AES_BLOCK_LEN); } from64 = (const uint64_t*)from; @@ -279,11 +285,11 @@ armv8_aes_encrypt_gcm(AES_key_t *aes_key, size_t len, trailer = len % AES_BLOCK_LEN; for (i = 0; i < (len - trailer); i += AES_BLOCK_LEN) { - aes_v8_encrypt(aes_counter, EKi.c, aes_key); - AES_INC_COUNTER(aes_counter); - to64[0] = from64[0] ^ EKi.u[0]; - to64[1] = from64[1] ^ EKi.u[1]; - gcm_ghash_v8(Xi.u, Htable, (uint8_t*)to64, AES_BLOCK_LEN); + aes_v8_encrypt(s.aes_counter, s.EKi.c, aes_key); + AES_INC_COUNTER(s.aes_counter); + to64[0] = from64[0] ^ s.EKi.u[0]; + to64[1] = from64[1] ^ s.EKi.u[1]; + gcm_ghash_v8(s.Xi.u, Htable, (uint8_t*)to64, AES_BLOCK_LEN); to64 += 2; from64 += 2; @@ -293,31 +299,27 @@ armv8_aes_encrypt_gcm(AES_key_t *aes_key, size_t len, from += (len - trailer); if (trailer) { - aes_v8_encrypt(aes_counter, EKi.c, aes_key); - AES_INC_COUNTER(aes_counter); + aes_v8_encrypt(s.aes_counter, s.EKi.c, aes_key); + AES_INC_COUNTER(s.aes_counter); memset(block, 0, sizeof(block)); for (i = 0; i < trailer; i++) { - block[i] = to[i] = from[i] ^ EKi.c[i]; + block[i] = to[i] = from[i] ^ s.EKi.c[i]; } - gcm_ghash_v8(Xi.u, Htable, block, AES_BLOCK_LEN); + gcm_ghash_v8(s.Xi.u, Htable, block, AES_BLOCK_LEN); } /* Lengths block */ - lenblock.u[0] = lenblock.u[1] = 0; - lenblock.d[1] = htobe32(authdatalen * 8); - lenblock.d[3] = htobe32(len * 8); - gcm_ghash_v8(Xi.u, Htable, lenblock.c, AES_BLOCK_LEN); - - Xi.u[0] ^= EK0.u[0]; - Xi.u[1] ^= EK0.u[1]; - memcpy(tag, Xi.c, GMAC_DIGEST_LEN); - - explicit_bzero(aes_counter, sizeof(aes_counter)); - explicit_bzero(Xi.c, sizeof(Xi.c)); - explicit_bzero(EK0.c, sizeof(EK0.c)); - explicit_bzero(EKi.c, sizeof(EKi.c)); - explicit_bzero(lenblock.c, sizeof(lenblock.c)); + s.lenblock.u[0] = s.lenblock.u[1] = 0; + s.lenblock.d[1] = htobe32(authdatalen * 8); + s.lenblock.d[3] = htobe32(len * 8); + gcm_ghash_v8(s.Xi.u, Htable, s.lenblock.c, AES_BLOCK_LEN); + + s.Xi.u[0] ^= s.EK0.u[0]; + s.Xi.u[1] ^= s.EK0.u[1]; + memcpy(tag, s.Xi.c, GMAC_DIGEST_LEN); + + explicit_bzero(&s, sizeof(s)); } int @@ -328,70 +330,68 @@ armv8_aes_decrypt_gcm(AES_key_t *aes_key, size_t len, const uint8_t iv[static AES_GCM_IV_LEN], const __uint128_val_t *Htable) { - size_t i; + struct armv8_gcm_state s; const uint64_t *from64; uint64_t *to64; - uint8_t aes_counter[AES_BLOCK_LEN]; uint8_t block[AES_BLOCK_LEN]; - size_t trailer; - __uint128_val_t EK0, EKi, Xi, lenblock; + size_t i, trailer; int error; error = 0; - bzero(&aes_counter, AES_BLOCK_LEN); - memcpy(aes_counter, iv, AES_GCM_IV_LEN); + bzero(&s.aes_counter, AES_BLOCK_LEN); + memcpy(s.aes_counter, iv, AES_GCM_IV_LEN); /* Setup the counter */ - aes_counter[AES_BLOCK_LEN - 1] = 1; + s.aes_counter[AES_BLOCK_LEN - 1] = 1; /* EK0 for a final GMAC round */ - aes_v8_encrypt(aes_counter, EK0.c, aes_key); + aes_v8_encrypt(s.aes_counter, s.EK0.c, aes_key); - memset(Xi.c, 0, sizeof(Xi.c)); + memset(s.Xi.c, 0, sizeof(s.Xi.c)); trailer = authdatalen % AES_BLOCK_LEN; if (authdatalen - trailer > 0) { - gcm_ghash_v8(Xi.u, Htable, authdata, authdatalen - trailer); + gcm_ghash_v8(s.Xi.u, Htable, authdata, authdatalen - trailer); authdata += authdatalen - trailer; } if (trailer > 0 || authdatalen == 0) { memset(block, 0, sizeof(block)); memcpy(block, authdata, trailer); - gcm_ghash_v8(Xi.u, Htable, block, AES_BLOCK_LEN); + gcm_ghash_v8(s.Xi.u, Htable, block, AES_BLOCK_LEN); } trailer = len % AES_BLOCK_LEN; if (len - trailer > 0) - gcm_ghash_v8(Xi.u, Htable, from, len - trailer); + gcm_ghash_v8(s.Xi.u, Htable, from, len - trailer); if (trailer > 0) { memset(block, 0, sizeof(block)); memcpy(block, from + len - trailer, trailer); - gcm_ghash_v8(Xi.u, Htable, block, AES_BLOCK_LEN); + gcm_ghash_v8(s.Xi.u, Htable, block, AES_BLOCK_LEN); } /* Lengths block */ - lenblock.u[0] = lenblock.u[1] = 0; - lenblock.d[1] = htobe32(authdatalen * 8); - lenblock.d[3] = htobe32(len * 8); - gcm_ghash_v8(Xi.u, Htable, lenblock.c, AES_BLOCK_LEN); - - Xi.u[0] ^= EK0.u[0]; - Xi.u[1] ^= EK0.u[1]; - if (timingsafe_bcmp(tag, Xi.c, GMAC_DIGEST_LEN) != 0) { + s.lenblock.u[0] = s.lenblock.u[1] = 0; + s.lenblock.d[1] = htobe32(authdatalen * 8); + s.lenblock.d[3] = htobe32(len * 8); + gcm_ghash_v8(s.Xi.u, Htable, s.lenblock.c, AES_BLOCK_LEN); + + s.Xi.u[0] ^= s.EK0.u[0]; + s.Xi.u[1] ^= s.EK0.u[1]; + if (timingsafe_bcmp(tag, s.Xi.c, GMAC_DIGEST_LEN) != 0) { error = EBADMSG; goto out; } /* GCM starts with 2 as counter, 1 is used for final xor of tag. */ - aes_counter[AES_BLOCK_LEN - 1] = 2; + s.aes_counter[AES_BLOCK_LEN - 1] = 2; from64 = (const uint64_t*)from; to64 = (uint64_t*)to; for (i = 0; i < (len - trailer); i += AES_BLOCK_LEN) { - aes_v8_encrypt(aes_counter, EKi.c, aes_key); - AES_INC_COUNTER(aes_counter); - to64[0] = from64[0] ^ EKi.u[0]; - to64[1] = from64[1] ^ EKi.u[1]; + aes_v8_encrypt(s.aes_counter, s.EKi.c, aes_key); + AES_INC_COUNTER(s.aes_counter); + to64[0] = from64[0] ^ s.EKi.u[0]; + to64[1] = from64[1] ^ s.EKi.u[1]; to64 += 2; from64 += 2; } @@ -400,18 +400,13 @@ armv8_aes_decrypt_gcm(AES_key_t *aes_key, size_t len, from += (len - trailer); if (trailer) { - aes_v8_encrypt(aes_counter, EKi.c, aes_key); - AES_INC_COUNTER(aes_counter); + aes_v8_encrypt(s.aes_counter, s.EKi.c, aes_key); + AES_INC_COUNTER(s.aes_counter); for (i = 0; i < trailer; i++) - to[i] = from[i] ^ EKi.c[i]; + to[i] = from[i] ^ s.EKi.c[i]; } out: - explicit_bzero(aes_counter, sizeof(aes_counter)); - explicit_bzero(Xi.c, sizeof(Xi.c)); - explicit_bzero(EK0.c, sizeof(EK0.c)); - explicit_bzero(EKi.c, sizeof(EKi.c)); - explicit_bzero(lenblock.c, sizeof(lenblock.c)); - + explicit_bzero(&s, sizeof(s)); return (error); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:28:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2D9F1537555; Mon, 15 Feb 2021 19:28: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 4DfZ000h8zz3Gfn; Mon, 15 Feb 2021 19:28: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 097D622EF5; Mon, 15 Feb 2021 19:28: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 11FJSVY8086194; Mon, 15 Feb 2021 19:28:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJSV46086193; Mon, 15 Feb 2021 19:28:31 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:28:31 GMT Message-Id: <202102151928.11FJSV46086193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Reifenberger Subject: git: 8d06c3e7a408 - main - Improve size readability. Preserve more space for swap devise names. Prevent line overflow with long devise name. Don't draw a bar when swap is not used at all. Simplify and optimize code. Change the label to end at end of 100%. PR: 251655 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27496 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d06c3e7a40831ac139d83b85b282206229b426f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:28:32 -0000 The branch main has been updated by mr: URL: https://cgit.FreeBSD.org/src/commit/?id=8d06c3e7a40831ac139d83b85b282206229b426f commit 8d06c3e7a40831ac139d83b85b282206229b426f Author: Michael Reifenberger AuthorDate: 2021-02-15 19:23:32 +0000 Commit: Michael Reifenberger CommitDate: 2021-02-15 19:23:32 +0000 Improve size readability. Preserve more space for swap devise names. Prevent line overflow with long devise name. Don't draw a bar when swap is not used at all. Simplify and optimize code. Change the label to end at end of 100%. PR: 251655 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27496 --- lib/libc/gen/getbsize.3 | 5 +-- usr.bin/systat/extern.h | 1 + usr.bin/systat/swap.c | 116 +++++++++++++----------------------------------- usr.bin/systat/sysput.c | 21 ++++++--- 4 files changed, 51 insertions(+), 92 deletions(-) diff --git a/lib/libc/gen/getbsize.3 b/lib/libc/gen/getbsize.3 index c0b46bf9e235..acbe409a8456 100644 --- a/lib/libc/gen/getbsize.3 +++ b/lib/libc/gen/getbsize.3 @@ -45,10 +45,9 @@ The .Fn getbsize function returns a preferred block size for reporting by system utilities .Xr df 1 , -.Xr du 1 , -.Xr ls 1 +.Xr du 1 and -.Xr systat 1 , +.Xr ls 1 , based on the value of the .Ev BLOCKSIZE environment variable. diff --git a/usr.bin/systat/extern.h b/usr.bin/systat/extern.h index 6e3117bece4e..322065f79312 100644 --- a/usr.bin/systat/extern.h +++ b/usr.bin/systat/extern.h @@ -168,6 +168,7 @@ char *sysctl_dynread(const char *, size_t *); void sysputpage(WINDOW* , int, int, int, uint64_t, int); void sysputspaces(WINDOW* , int, int, int); void sysputstrs(WINDOW* , int, int, int); +void sysputXs(WINDOW* , int, int, int); void sysputuint64(WINDOW* , int, int, int, uint64_t, int); void sysputwuint64(WINDOW* , int, int, int, uint64_t, int); diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c index fc44db7d7d42..29b04df0157f 100644 --- a/usr.bin/systat/swap.c +++ b/usr.bin/systat/swap.c @@ -3,7 +3,7 @@ * * Copyright (c) 1980, 1992, 1993 * The Regents of the University of California. All rights reserved. - * Copyright (c) 2017 Yoshihiro Ota + * Copyright (c) 2017, 2020 Yoshihiro Ota * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -58,22 +58,19 @@ static const char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95"; #include "extern.h" #include "devs.h" -static char *header; -static long blocksize; -static int dlen, odlen; -static int hlen; -static int ulen, oulen; -static int pagesize; +static int pathlen; WINDOW * openswap(void) { - return (subwin(stdscr, LINES-3-1, 0, MAINWIN_ROW, 0)); + + return (subwin(stdscr, LINES - 3 - 1, 0, MAINWIN_ROW, 0)); } void closeswap(WINDOW *w) { + if (w == NULL) return; wclear(w); @@ -92,29 +89,6 @@ closeswap(WINDOW *w) static struct kvm_swap kvmsw[NSWAP]; static int kvnsw, okvnsw; -static void calclens(void); - -#define CONVERT(v) ((int)((int64_t)(v) * pagesize / blocksize)) - -static void -calclens(void) -{ - int i, n; - int len; - - dlen = sizeof("Disk"); - for (i = 0; i < kvnsw; ++i) { - len = strlen(kvmsw[i].ksw_devname); - if (dlen < len) - dlen = len; - } - - ulen = sizeof("Used"); - for (n = CONVERT(kvmsw[kvnsw].ksw_used), len = 2; n /= 10; ++len); - if (ulen < len) - ulen = len; -} - int initswap(void) { @@ -123,22 +97,13 @@ initswap(void) if (once) return (1); - header = getbsize(&hlen, &blocksize); - pagesize = getpagesize(); - if ((kvnsw = kvm_getswapinfo(kd, kvmsw, NSWAP, 0)) < 0) { error("systat: kvm_getswapinfo failed"); return (0); } - okvnsw = kvnsw; - - calclens(); - odlen = dlen; - oulen = ulen; - - once = 1; - + pathlen = 80 - 50 /* % */ - 5 /* Used */ - 5 /* Size */ - 3 /* space */; dsinit(12); + once = 1; return (1); } @@ -146,16 +111,13 @@ initswap(void) void fetchswap(void) { + okvnsw = kvnsw; if ((kvnsw = kvm_getswapinfo(kd, kvmsw, NSWAP, 0)) < 0) { error("systat: kvm_getswapinfo failed"); return; } - odlen = dlen; - oulen = ulen; - calclens(); - struct devinfo *tmp_dinfo; tmp_dinfo = last_dev.dinfo; @@ -172,24 +134,23 @@ labelswap(void) const char *name; int i; - fetchswap(); - werase(wnd); - mvwprintw(wnd, 0, 0, "%*s%*s%*s %s", - -dlen, "Disk", hlen, header, ulen, "Used", - "/0% /10 /20 /30 /40 /50 /60 /70 /80 /90 /100"); + dslabel(12, 0, 18); + + if (kvnsw <= 0) { + mvwprintw(wnd, 0, 0, "(swap not configured)"); + return; + } + + mvwprintw(wnd, 0, 0, "%*s%5s %5s %s", + -pathlen, "Device/Path", "Size", "Used", + "|0% /10 /20 /30 /40 / 60\\ 70\\ 80\\ 90\\ 100|"); for (i = 0; i <= kvnsw; ++i) { - if (i == kvnsw) { - if (kvnsw == 1) - break; - name = "Total"; - } else - name = kvmsw[i].ksw_devname; - mvwprintw(wnd, i + 1, 0, "%*s", -dlen, name); + name = i == kvnsw ? "Total" : kvmsw[i].ksw_devname; + mvwprintw(wnd, 1 + i, 0, "%-*.*s", pathlen, pathlen - 1, name); } - dslabel(12, 0, 18); } void @@ -198,36 +159,23 @@ showswap(void) int count; int i; - if (kvnsw != okvnsw || dlen != odlen || ulen != oulen) + if (kvnsw != okvnsw) labelswap(); - for (i = 0; i <= kvnsw; ++i) { - if (i == kvnsw) { - if (kvnsw == 1) - break; - } - - if (kvmsw[i].ksw_total == 0) { - mvwprintw( - wnd, - i + 1, - dlen + hlen + ulen + 1, - "(swap not configured)" - ); - continue; - } - - wmove(wnd, i + 1, dlen); + dsshow(12, 0, 18, &cur_dev, &last_dev); - wprintw(wnd, "%*d", hlen, CONVERT(kvmsw[i].ksw_total)); - wprintw(wnd, "%*d", ulen, CONVERT(kvmsw[i].ksw_used)); + if (kvnsw <= 0) + return; - count = 50.0 * kvmsw[i].ksw_used / kvmsw[i].ksw_total + 1; + for (i = 0; i <= kvnsw; ++i) { + sysputpage(wnd, i + 1, pathlen, 5, kvmsw[i].ksw_total, 0); + sysputpage(wnd, i + 1, pathlen + 5 + 1, 5, kvmsw[i].ksw_used, + 0); - waddch(wnd, ' '); - while (count--) - waddch(wnd, 'X'); + if (kvmsw[i].ksw_used > 0) { + count = 50 * kvmsw[i].ksw_used / kvmsw[i].ksw_total; + sysputXs(wnd, i + 1, pathlen + 5 + 1 + 5 + 1, count); + } wclrtoeol(wnd); } - dsshow(12, 0, 18, &cur_dev, &last_dev); } diff --git a/usr.bin/systat/sysput.c b/usr.bin/systat/sysput.c index 31c9127a83b7..10401cee772a 100644 --- a/usr.bin/systat/sysput.c +++ b/usr.bin/systat/sysput.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2019 Yoshihiro Ota + * Copyright (c) 2019, 2020 Yoshihiro Ota * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,17 +43,28 @@ __FBSDID("$FreeBSD$"); void sysputspaces(WINDOW *wd, int row, int col, int width) { - static char str40[] = " "; + static char str60[] = " " + " "; - mvwaddstr(wd, row, col, str40 + sizeof(str40) - width - 1); + mvwaddstr(wd, row, col, str60 + sizeof(str60) - width - 1); } void sysputstrs(WINDOW *wd, int row, int col, int width) { - static char str40[] = "****************************************"; + static char str60[] = "********************" + "****************************************"; - mvwaddstr(wnd, row, col, str40 + sizeof(str40) - width - 1); + mvwaddstr(wnd, row, col, str60 + sizeof(str60) - width - 1); +} + +void +sysputXs(WINDOW *wd, int row, int col, int width) +{ + static char str60[] = "XXXXXXXXXXXXXXXXXXXX" + "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; + + mvwaddstr(wnd, row, col, str60 + sizeof(str60) - width - 1); } void From owner-dev-commits-src-all@freebsd.org Mon Feb 15 19:47:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7A1BF537B8B; Mon, 15 Feb 2021 19:47: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 4DfZPV35bVz3HqC; Mon, 15 Feb 2021 19:47: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 5D2F123632; Mon, 15 Feb 2021 19:47: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 11FJlAcw012479; Mon, 15 Feb 2021 19:47:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FJlAv6012478; Mon, 15 Feb 2021 19:47:10 GMT (envelope-from git) Date: Mon, 15 Feb 2021 19:47:10 GMT Message-Id: <202102151947.11FJlAv6012478@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: dadf603f0f7b - stable/12 - mca: Handle inconsistent CMCI capability reporting 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/12 X-Git-Reftype: branch X-Git-Commit: dadf603f0f7b54c65fa5f16f552ae6da12f8210b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 19:47:10 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dadf603f0f7b54c65fa5f16f552ae6da12f8210b commit dadf603f0f7b54c65fa5f16f552ae6da12f8210b Author: Mark Johnston AuthorDate: 2021-02-08 19:42:54 +0000 Commit: Mark Johnston CommitDate: 2021-02-15 19:47:04 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) --- sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index d1488ff0ff82..1d2cc56e117d 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -913,6 +913,20 @@ cmci_monitor(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* + * It is possible for some APs to report CMCI support even if the BSP + * does not, apparently due to a BIOS bug. + */ + if (cmc_state == NULL) { + if (bootverbose) { + printf( + "AP %d (%d,%d) reports CMCI support but the BSP does not\n", + PCPU_GET(cpuid), PCPU_GET(apic_id), + PCPU_GET(acpi_id)); + } + return; + } + ctl = rdmsr(MSR_MC_CTL2(i)); if (ctl & MC_CTL2_CMCI_EN) /* Already monitored by another CPU. */ @@ -957,6 +971,10 @@ cmci_resume(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* See cmci_monitor(). */ + if (cmc_state == NULL) + return; + /* Ignore banks not monitored by this CPU. */ if (!(PCPU_GET(cmci_mask) & 1 << i)) return; From owner-dev-commits-src-all@freebsd.org Mon Feb 15 20:41:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E6669539523 for ; Mon, 15 Feb 2021 20:41:16 +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 4Dfbbw651xz3M5J; Mon, 15 Feb 2021 20:41:16 +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 C394524044; Mon, 15 Feb 2021 20:41:16 +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 11FKfGk5089048; Mon, 15 Feb 2021 20:41:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FKfGiu089047; Mon, 15 Feb 2021 20:41:16 GMT (envelope-from git) Date: Mon, 15 Feb 2021 20:41:16 GMT Message-Id: <202102152041.11FKfGiu089047@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: b3cfe07d74a9 - releng/13.0 - 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: b3cfe07d74a9ee4b726e2333ff327d154181572d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 20:41:17 -0000 The branch releng/13.0 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=b3cfe07d74a9ee4b726e2333ff327d154181572d commit b3cfe07d74a9ee4b726e2333ff327d154181572d Author: Randall Stewart AuthorDate: 2021-02-15 20:39:11 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-15 20:39:11 +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. Approved by: re(gjb) Reviewed By: gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D28377 (cherry picked from commit 538a81520b557f9964c5ebe912f9dff5996bed56) --- sys/netinet6/nd6.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 386eb7cca922..497c0bfc10e8 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2460,6 +2460,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-all@freebsd.org Mon Feb 15 20:41:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0DF785392B5 for ; Mon, 15 Feb 2021 20:41: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 4Dfbbx6zqCz3Lrc; Mon, 15 Feb 2021 20:41: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 E10C5240C3; Mon, 15 Feb 2021 20:41: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 11FKfHC2089503; Mon, 15 Feb 2021 20:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FKfHxv089493; Mon, 15 Feb 2021 20:41:17 GMT (envelope-from git) Date: Mon, 15 Feb 2021 20:41:17 GMT Message-Id: <202102152041.11FKfHxv089493@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 2f4f3e251245 - releng/13.0 - Fix ifa refcount leak during route addition. 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 2f4f3e25124574ea041ae06240633597bc0f82c6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 20:41:18 -0000 The branch releng/13.0 has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=2f4f3e25124574ea041ae06240633597bc0f82c6 commit 2f4f3e25124574ea041ae06240633597bc0f82c6 Author: Alexander V. Chernikov AuthorDate: 2021-02-15 20:39:33 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-15 20:41:05 +0000 Fix ifa refcount leak during route addition. Reported by: rstone Reviewed by: rstone Approved by: re(gjb) (cherry picked from commit 11304949deb36d2f9abbcda87d398496e892dcec) --- sys/net/route/route_ctl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 6b0869196d12..9aedfb9d5855 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -594,14 +594,12 @@ create_rtentry(struct rib_head *rnh, struct rt_addrinfo *info, } error = nhop_create_from_info(rnh, info, &nh); - if (error != 0) { - ifa_free(info->rti_ifa); + ifa_free(info->rti_ifa); + if (error != 0) return (error); - } rt = uma_zalloc(V_rtzone, M_NOWAIT | M_ZERO); if (rt == NULL) { - ifa_free(info->rti_ifa); nhop_free(nh); return (ENOBUFS); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 20:51:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 74A0653966E; Mon, 15 Feb 2021 20:51:07 +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 4DfbqH2wv8z3N02; Mon, 15 Feb 2021 20:51:07 +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 579452434C; Mon, 15 Feb 2021 20:51:07 +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 11FKp7tN002728; Mon, 15 Feb 2021 20:51:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FKp71J002727; Mon, 15 Feb 2021 20:51:07 GMT (envelope-from git) Date: Mon, 15 Feb 2021 20:51:07 GMT Message-Id: <202102152051.11FKp71J002727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 64d5c2777731 - main - Remove now-unused RTF_RNH_LOCKED route flag. 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/main X-Git-Reftype: branch X-Git-Commit: 64d5c2777731c1376dd44b6a5fdb68b168d073dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 20:51:07 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=64d5c2777731c1376dd44b6a5fdb68b168d073dc commit 64d5c2777731c1376dd44b6a5fdb68b168d073dc Author: Alexander V. Chernikov AuthorDate: 2021-02-14 13:45:14 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-15 20:49:59 +0000 Remove now-unused RTF_RNH_LOCKED route flag. MFC after: 1 week --- sys/net/route.h | 2 +- sys/net/rtsock.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/net/route.h b/sys/net/route.h index f9928ab6a776..ab6e1aabc5ae 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -197,7 +197,7 @@ VNET_DECLARE(u_int, fib_hash_outbound); /* 0x8000000 and up unassigned */ #define RTF_STICKY 0x10000000 /* always route dst->src */ -#define RTF_RNH_LOCKED 0x40000000 /* radix node head is locked */ +/* 0x40000000 unused, was RTF_RNH_LOCKED */ #define RTF_GWFLAG_COMPAT 0x80000000 /* a compatibility bit for interacting with existing routing apps */ diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index f8e741d87a10..3a98b366dfc3 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -635,8 +635,6 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, u_int fibnum, struct rt_addrinfo * if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, info)) return (EINVAL); - if (rtm->rtm_flags & RTF_RNH_LOCKED) - return (EINVAL); info->rti_flags = rtm->rtm_flags; if (info->rti_info[RTAX_DST] == NULL || info->rti_info[RTAX_DST]->sa_family >= AF_MAX || From owner-dev-commits-src-all@freebsd.org Mon Feb 15 21:49:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B336053BB6F; Mon, 15 Feb 2021 21:49: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 4Dfd6z4lTDz3hrw; Mon, 15 Feb 2021 21:49: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 954B625043; Mon, 15 Feb 2021 21:49: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 11FLnl8e070671; Mon, 15 Feb 2021 21:49:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FLnlXU070670; Mon, 15 Feb 2021 21:49:47 GMT (envelope-from git) Date: Mon, 15 Feb 2021 21:49:47 GMT Message-Id: <202102152149.11FLnlXU070670@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: cef784ce8965 - stable/13 - Adding PRR sysctls to tcp(4) man page 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: cef784ce89652b01e17f819c346237e3890ff086 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 21:49:47 -0000 The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=cef784ce89652b01e17f819c346237e3890ff086 commit cef784ce89652b01e17f819c346237e3890ff086 Author: Richard Scheffenegger AuthorDate: 2021-02-12 11:32:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-15 21:16:11 +0000 Adding PRR sysctls to tcp(4) man page Documenting the newly added, and enabled by default, Proportional Rate Reduction algorithm's governing sysctls. Reviewed by: kbowling, rgrimes MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28568 (cherry picked from commit a78fee8182614593992e841fbb0d4a958f70da0f) --- share/man/man4/tcp.4 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index dee4040c0a98..431bcd95513b 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 January 14, 2021 +.Dd February 11, 2021 .Dt TCP 4 .Os .Sh NAME @@ -544,9 +544,22 @@ This gently reduces the congestion window during periods, where TCP is application limited and the network bandwidth is not utilized completely. That prevents self-inflicted packet losses once the application starts to transmit data at a higher speed. +.It Va do_prr +Perform SACK loss recovery using the Proportional Rate Reduction (PRR) algorithm +described in RFC6937. +This improves the effectiveness of retransmissions particular in environments +with ACK thinning or burst loss events, as chances to run out of the ACK clock +are reduced, preventing lengthy and performance reducing RTO based loss recovery +(default is true). +.It Va do_prr_conservative +While doing Proportional Rate Reduction, remain strictly in a packet conserving +mode, sending only one new packet for each ACK received. +Helpful when a misconfigured token bucket traffic policer causes persistent +high losses leading to RTO, but reduces PRR effectiveness in more common settings +(default is false). .It Va rfc6675_pipe Calculate the bytes in flight using the algorithm described in RFC 6675, and -is also a prerequisite to enable Proportional Rate Reduction. +is also an improvement when Proportional Rate Reduction is enabled. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window From owner-dev-commits-src-all@freebsd.org Mon Feb 15 21:56:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C23EB53BF3D for ; Mon, 15 Feb 2021 21:56:56 +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 4DfdHD5BVbz3jDd; Mon, 15 Feb 2021 21:56:56 +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 A125E24F7F; Mon, 15 Feb 2021 21:56:56 +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 11FLuu1l083274; Mon, 15 Feb 2021 21:56:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FLuulB083273; Mon, 15 Feb 2021 21:56:56 GMT (envelope-from git) Date: Mon, 15 Feb 2021 21:56:56 GMT Message-Id: <202102152156.11FLuulB083273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Richard Scheffenegger Subject: git: 1e76911d62ed - releng/13.0 - Adding PRR sysctls to tcp(4) man page 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 1e76911d62ed4b66bc21cfc22101ef6b20cd6630 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 21:56:56 -0000 The branch releng/13.0 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=1e76911d62ed4b66bc21cfc22101ef6b20cd6630 commit 1e76911d62ed4b66bc21cfc22101ef6b20cd6630 Author: Richard Scheffenegger AuthorDate: 2021-02-12 11:32:48 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-15 21:56:39 +0000 Adding PRR sysctls to tcp(4) man page Documenting the newly added, and enabled by default, Proportional Rate Reduction algorithm's governing sysctls. Reviewed by: kbowling, rgrimes Approved by: re(gjb) MFC after: 3 days Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28568 (cherry picked from commit a78fee8182614593992e841fbb0d4a958f70da0f) --- share/man/man4/tcp.4 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index dee4040c0a98..431bcd95513b 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 January 14, 2021 +.Dd February 11, 2021 .Dt TCP 4 .Os .Sh NAME @@ -544,9 +544,22 @@ This gently reduces the congestion window during periods, where TCP is application limited and the network bandwidth is not utilized completely. That prevents self-inflicted packet losses once the application starts to transmit data at a higher speed. +.It Va do_prr +Perform SACK loss recovery using the Proportional Rate Reduction (PRR) algorithm +described in RFC6937. +This improves the effectiveness of retransmissions particular in environments +with ACK thinning or burst loss events, as chances to run out of the ACK clock +are reduced, preventing lengthy and performance reducing RTO based loss recovery +(default is true). +.It Va do_prr_conservative +While doing Proportional Rate Reduction, remain strictly in a packet conserving +mode, sending only one new packet for each ACK received. +Helpful when a misconfigured token bucket traffic policer causes persistent +high losses leading to RTO, but reduces PRR effectiveness in more common settings +(default is false). .It Va rfc6675_pipe Calculate the bytes in flight using the algorithm described in RFC 6675, and -is also a prerequisite to enable Proportional Rate Reduction. +is also an improvement when Proportional Rate Reduction is enabled. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:06:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A22C853C6C0; Mon, 15 Feb 2021 22:06: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 4DfdVH48sMz3kYx; Mon, 15 Feb 2021 22:06: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 820572560E; Mon, 15 Feb 2021 22:06: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 11FM6VIH096960; Mon, 15 Feb 2021 22:06:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FM6VNb096959; Mon, 15 Feb 2021 22:06:31 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:06:31 GMT Message-Id: <202102152206.11FM6VNb096959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: c90fb7acf099 - main - pxeboot(8): remove antiquated information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c90fb7acf099f1dc982f8d6087aa92809ae43727 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:06:31 -0000 The branch main has been updated by ygy (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=c90fb7acf099f1dc982f8d6087aa92809ae43727 commit c90fb7acf099f1dc982f8d6087aa92809ae43727 Author: Guangyuan Yang AuthorDate: 2021-02-15 22:03:37 +0000 Commit: Guangyuan Yang CommitDate: 2021-02-15 22:03:37 +0000 pxeboot(8): remove antiquated information While I was there: - Fix some typos - Fix an excessive argument "indent" reported by mandoc -Tlint - Replace a dead link with the one suggested by https://www.uefi.org/uefi Submitted by: linimon (in part) Reviewed by: bcr MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27774 --- stand/i386/pxeldr/pxeboot.8 | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/stand/i386/pxeldr/pxeboot.8 b/stand/i386/pxeldr/pxeboot.8 index c9fa434b3028..58b1f06bcd0f 100644 --- a/stand/i386/pxeldr/pxeboot.8 +++ b/stand/i386/pxeldr/pxeboot.8 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 25, 2018 +.Dd February 15, 2021 .Dt PXEBOOT 8 .Os .Sh NAME @@ -97,19 +97,19 @@ from the specified server before loading any other files. .Pp Valid .Va option root-path -Syntax is the following -.Bl -tag -width ://ip/path indent +syntax is the following +.Bl -tag -width ://ip/path .It /path path to the root filesystem on the NFS server -.It ip:/path +.It ip://path path to the root filesystem on the NFS server .Ar ip -.It nfs:/path +.It nfs://path path to the root filesystem on the NFS server .It nfs://ip/path path to the root filesystem on the NFS server .Ar ip -.It tftp:/path +.It tftp://path path to the root filesystem on the TFTP server .It tftp://ip/path path to the root filesystem on the TFTP server @@ -129,18 +129,9 @@ In all other respects, acts just like .Xr loader 8 . .Pp -As PXE is still in its infancy, some firmware versions may not work -properly. -The -.Nm -bootloader has been extensively tested on version 0.99 of Intel firmware; -pre-release versions of the newer 2.0 firmware are known to have -problems. -Check with the device's manufacturer for their latest stable release. -.Pp For further information on Intel's PXE specifications and Wired for Management (WfM) systems, see -.Li http://www.intel.com/design/archives/wfm/ . +.Li http://www.pix.net/software/pxeboot/archive/pxespec.pdf . .Sh SEE ALSO .Xr loader 8 .Sh HISTORY From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:33:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 60E9653D135; Mon, 15 Feb 2021 22:33: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 4Dff5Q2G6Bz3mQY; Mon, 15 Feb 2021 22:33: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 4027525C90; Mon, 15 Feb 2021 22:33: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 11FMXUVY035928; Mon, 15 Feb 2021 22:33:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMXULT035927; Mon, 15 Feb 2021 22:33:30 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:33:30 GMT Message-Id: <202102152233.11FMXULT035927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 605284b89474 - main - Enforce net epoch in in6_selectsrc(). 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/main X-Git-Reftype: branch X-Git-Commit: 605284b894748d23136b30a202689493d8f8af52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:33:30 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=605284b894748d23136b30a202689493d8f8af52 commit 605284b894748d23136b30a202689493d8f8af52 Author: Alexander V. Chernikov AuthorDate: 2021-02-13 14:32:10 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-15 22:33:12 +0000 Enforce net epoch in in6_selectsrc(). in6_selectsrc() may call fib6_lookup() in some cases, which requires epoch. Wrap in6_selectsrc* calls into epoch inside its users. Mark it as requiring epoch by adding NET_EPOCH_ASSERT(). MFC after: 1 weeek Differential Revision: https://reviews.freebsd.org/D28647 --- sys/fs/nfsclient/nfs_clport.c | 3 +++ sys/netinet6/icmp6.c | 3 +++ sys/netinet6/in6_pcb.c | 3 +++ sys/netinet6/in6_src.c | 1 + sys/netinet6/nd6_nbr.c | 4 ++++ sys/netinet6/raw_ip6.c | 5 +++++ sys/netinet6/send.c | 3 +++ 7 files changed, 22 insertions(+) diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index 9c0ac5c4364e..81a0e05c3234 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -1006,15 +1006,18 @@ nfscl_getmyip(struct nfsmount *nmp, struct in6_addr *paddr, int *isinet6p) #endif #ifdef INET6 if (nmp->nm_nam->sa_family == AF_INET6) { + struct epoch_tracker et; struct sockaddr_in6 *sin6; int error; sin6 = (struct sockaddr_in6 *)nmp->nm_nam; + NET_EPOCH_ENTER(et); CURVNET_SET(CRED_TO_VNET(nmp->nm_sockreq.nr_cred)); error = in6_selectsrc_addr(fibnum, &sin6->sin6_addr, sin6->sin6_scope_id, NULL, paddr, NULL); CURVNET_RESTORE(); + NET_EPOCH_EXIT(et); if (error != 0) return (NULL); diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 1a08dad7de64..6208b7be78a2 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -260,6 +260,7 @@ icmp6_error(struct mbuf *m, int type, int code, int param) { struct ip6_hdr *oip6, *nip6; struct icmp6_hdr *icmp6; + struct epoch_tracker et; u_int preplen; int off; int nxt; @@ -379,7 +380,9 @@ icmp6_error(struct mbuf *m, int type, int code, int param) icmp6->icmp6_pptr = htonl((u_int32_t)param); ICMP6STAT_INC(icp6s_outhist[type]); + NET_EPOCH_ENTER(et); icmp6_reflect(m, sizeof(struct ip6_hdr)); /* header order: IPv6 - ICMPv6 */ + NET_EPOCH_EXIT(et); return; diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 567a7918f159..5fce9fcafa33 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -352,6 +352,7 @@ in6_pcbladdr(struct inpcb *inp, struct sockaddr *nam, int error = 0; int scope_ambiguous = 0; struct in6_addr in6a; + struct epoch_tracker et; INP_WLOCK_ASSERT(inp); INP_HASH_WLOCK_ASSERT(inp->inp_pcbinfo); /* XXXRW: why? */ @@ -379,8 +380,10 @@ in6_pcbladdr(struct inpcb *inp, struct sockaddr *nam, if ((error = prison_remote_ip6(inp->inp_cred, &sin6->sin6_addr)) != 0) return (error); + NET_EPOCH_ENTER(et); error = in6_selectsrc_socket(sin6, inp->in6p_outputopts, inp, inp->inp_cred, scope_ambiguous, &in6a, NULL); + NET_EPOCH_EXIT(et); if (error) return (error); diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 7a756030f01c..2224d568e121 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -191,6 +191,7 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, int error; struct ip6_moptions *mopts; + NET_EPOCH_ASSERT(); KASSERT(srcp != NULL, ("%s: srcp is NULL", __func__)); dst = dstsock->sin6_addr; /* make a copy for local operation */ diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index ab55c4dfc697..42e901bdd2a4 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -413,6 +413,8 @@ nd6_ns_output_fib(struct ifnet *ifp, const struct in6_addr *saddr6, int maxlen; caddr_t mac; + NET_EPOCH_ASSERT(); + if (IN6_IS_ADDR_MULTICAST(taddr6)) return; @@ -947,6 +949,8 @@ nd6_na_output_fib(struct ifnet *ifp, const struct in6_addr *daddr6_0, struct in6_addr daddr6, dst6, src6; uint32_t scopeid; + NET_EPOCH_ASSERT(); + int icmp6len, maxlen, error; caddr_t mac = NULL; diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index aea99add4391..8d71c40455a1 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -478,8 +478,10 @@ rip6_output(struct mbuf *m, struct socket *so, ...) /* * Source address selection. */ + NET_EPOCH_ENTER(et); error = in6_selectsrc_socket(dstsock, optp, inp, so->so_cred, scope_ambiguous, &in6a, &hlim); + NET_EPOCH_EXIT(et); if (error) goto bad; @@ -795,6 +797,7 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct inpcb *inp; struct sockaddr_in6 *addr = (struct sockaddr_in6 *)nam; struct in6_addr in6a; + struct epoch_tracker et; int error = 0, scope_ambiguous = 0; inp = sotoinpcb(so); @@ -823,8 +826,10 @@ rip6_connect(struct socket *so, struct sockaddr *nam, struct thread *td) INP_INFO_WLOCK(&V_ripcbinfo); INP_WLOCK(inp); /* Source address selection. XXX: need pcblookup? */ + NET_EPOCH_ENTER(et); error = in6_selectsrc_socket(addr, inp->in6p_outputopts, inp, so->so_cred, scope_ambiguous, &in6a, NULL); + NET_EPOCH_EXIT(et); if (error) { INP_WUNLOCK(inp); INP_INFO_WUNLOCK(&V_ripcbinfo); diff --git a/sys/netinet6/send.c b/sys/netinet6/send.c index bc9880c82267..fbe53924c91f 100644 --- a/sys/netinet6/send.c +++ b/sys/netinet6/send.c @@ -115,6 +115,7 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) struct ip6_hdr *ip6; struct sockaddr_in6 dst; struct icmp6_hdr *icmp6; + struct epoch_tracker et; int icmp6len; /* @@ -150,7 +151,9 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) */ switch (icmp6->icmp6_type) { case ND_NEIGHBOR_SOLICIT: + NET_EPOCH_ENTER(et); nd6_ns_input(m, sizeof(struct ip6_hdr), icmp6len); + NET_EPOCH_EXIT(et); break; case ND_NEIGHBOR_ADVERT: nd6_na_input(m, sizeof(struct ip6_hdr), icmp6len); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:33:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7809F53D48E; Mon, 15 Feb 2021 22:33: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 4Dff5R329kz3mH6; Mon, 15 Feb 2021 22:33: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 5AD7625A9B; Mon, 15 Feb 2021 22:33: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 11FMXVLq035950; Mon, 15 Feb 2021 22:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMXVQ7035949; Mon, 15 Feb 2021 22:33:31 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:33:31 GMT Message-Id: <202102152233.11FMXVQ7035949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 8268d82cff1b - main - Remove per-packet ifa refcounting from IPv6 fast path. 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/main X-Git-Reftype: branch X-Git-Commit: 8268d82cff1bcd7969e5b3c676f28684784a7a43 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:33:31 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=8268d82cff1bcd7969e5b3c676f28684784a7a43 commit 8268d82cff1bcd7969e5b3c676f28684784a7a43 Author: Alexander V. Chernikov AuthorDate: 2021-02-15 21:59:21 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-15 22:33:12 +0000 Remove per-packet ifa refcounting from IPv6 fast path. Currently ip6_input() calls in6ifa_ifwithaddr() for every local packet, in order to check if the target ip belongs to the local ifa in proper state and increase its counters. in6ifa_ifwithaddr() references found ifa. With epoch changes, both `ip6_input()` and all other current callers of `in6ifa_ifwithaddr()` do not need this reference anymore, as epoch provides stability guarantee. Given that, update `in6ifa_ifwithaddr()` to allow it to return ifa without referencing it, while preserving option for getting referenced ifa if so desired. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28648 --- sys/netinet/tcp_input.c | 10 ++-------- sys/netinet6/frag6.c | 6 ++---- sys/netinet6/icmp6.c | 8 ++------ sys/netinet6/in6.c | 7 ++++--- sys/netinet6/in6_ifattach.c | 4 +--- sys/netinet6/in6_src.c | 8 ++------ sys/netinet6/in6_var.h | 2 +- sys/netinet6/ip6_input.c | 4 +--- sys/netinet6/send.c | 12 +++++++----- 9 files changed, 22 insertions(+), 39 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 459b78cd444a..b7baef5bc0d6 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -592,16 +592,13 @@ tcp6_input(struct mbuf **mp, int *offp, int proto) * better place to put this in? */ ip6 = mtod(m, struct ip6_hdr *); - ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); if (ia6 && (ia6->ia6_flags & IN6_IFF_ANYCAST)) { - ifa_free(&ia6->ia_ifa); icmp6_error(m, ICMP6_DST_UNREACH, ICMP6_DST_UNREACH_ADDR, (caddr_t)&ip6->ip6_dst - (caddr_t)ip6); *mp = NULL; return (IPPROTO_DONE); } - if (ia6) - ifa_free(&ia6->ia_ifa); *mp = m; return (tcp_input(mp, offp, proto)); @@ -1249,10 +1246,9 @@ tfo_socket_result: if (isipv6 && !V_ip6_use_deprecated) { struct in6_ifaddr *ia6; - ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); if (ia6 != NULL && (ia6->ia6_flags & IN6_IFF_DEPRECATED)) { - ifa_free(&ia6->ia_ifa); if ((s = tcp_log_addrs(&inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: Listen socket: " "Connection attempt to deprecated " @@ -1261,8 +1257,6 @@ tfo_socket_result: rstreason = BANDLIM_RST_OPENPORT; goto dropwithreset; } - if (ia6) - ifa_free(&ia6->ia_ifa); } #endif /* INET6 */ /* diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index c22e931dee33..f227930743b7 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -396,11 +396,9 @@ frag6_input(struct mbuf **mp, int *offp, int proto) dstifp = NULL; /* Find the destination interface of the packet. */ - ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); - if (ia6 != NULL) { + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); + if (ia6 != NULL) dstifp = ia6->ia_ifp; - ifa_free(&ia6->ia_ifa); - } /* Jumbo payload cannot contain a fragment header. */ if (ip6->ip6_plen == 0) { diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 6208b7be78a2..e17f82a54951 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1221,19 +1221,17 @@ ni6_input(struct mbuf *m, int off, struct prison *pr) goto bad; /* else it's a link-local multicast, fine */ } else { /* unicast or anycast */ - ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + ia6 = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); if (ia6 == NULL) goto bad; /* XXX impossible */ if ((ia6->ia6_flags & IN6_IFF_TEMPORARY) && !(V_icmp6_nodeinfo & ICMP6_NODEINFO_TMPADDROK)) { - ifa_free(&ia6->ia_ifa); nd6log((LOG_DEBUG, "ni6_input: ignore node info to " "a temporary address in %s:%d", __FILE__, __LINE__)); goto bad; } - ifa_free(&ia6->ia_ifa); } /* validate query Subject field. */ @@ -2104,7 +2102,7 @@ icmp6_reflect(struct mbuf *m, size_t off) * destined to a duplicated address of ours. */ if (!IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { - ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); if (ia != NULL && !(ia->ia6_flags & (IN6_IFF_ANYCAST|IN6_IFF_NOTREADY))) { src6 = ia->ia_addr.sin6_addr; @@ -2116,8 +2114,6 @@ icmp6_reflect(struct mbuf *m, size_t off) } else hlim = V_ip6_defhlim; } - if (ia != NULL) - ifa_free(&ia->ia_ifa); } if (srcp == NULL) { diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 057c0ee91e02..4665a21c28fd 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1550,10 +1550,10 @@ in6ifa_ifpforlinklocal(struct ifnet *ifp, int ignoreflags) /* * find the interface address corresponding to a given IPv6 address. - * ifaddr is returned referenced. + * ifaddr is returned referenced if @referenced flag is set. */ struct in6_ifaddr * -in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid) +in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid, bool referenced) { struct rm_priotracker in6_ifa_tracker; struct in6_ifaddr *ia; @@ -1564,7 +1564,8 @@ in6ifa_ifwithaddr(const struct in6_addr *addr, uint32_t zoneid) if (zoneid != 0 && zoneid != ia->ia_addr.sin6_scope_id) continue; - ifa_ref(&ia->ia_ifa); + if (referenced) + ifa_ref(&ia->ia_ifa); break; } } diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 1a07fb13b179..02d6a2b230b4 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -713,11 +713,9 @@ in6_ifattach(struct ifnet *ifp, struct ifnet *altifp) /* * check that loopback address doesn't exist yet. */ - ia = in6ifa_ifwithaddr(&in6addr_loopback, 0); + ia = in6ifa_ifwithaddr(&in6addr_loopback, 0, false); if (ia == NULL) in6_ifattach_loopback(ifp); - else - ifa_free(&ia->ia_ifa); } /* diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 2224d568e121..7f623709de13 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -252,15 +252,11 @@ in6_selectsrc(uint32_t fibnum, struct sockaddr_in6 *dstsock, * ancillary data. */ if ((inp->inp_flags & INP_BINDANY) == 0) { - ia = in6ifa_ifwithaddr(&tmp, 0 /* XXX */); + ia = in6ifa_ifwithaddr(&tmp, 0 /* XXX */, false); if (ia == NULL || (ia->ia6_flags & (IN6_IFF_ANYCAST | - IN6_IFF_NOTREADY))) { - if (ia != NULL) - ifa_free(&ia->ia_ifa); + IN6_IFF_NOTREADY))) return (EADDRNOTAVAIL); - } bcopy(&ia->ia_addr.sin6_addr, srcp, sizeof(*srcp)); - ifa_free(&ia->ia_ifa); } else bcopy(&tmp, srcp, sizeof(*srcp)); pi->ipi6_addr = tmp; /* XXX: this overrides pi */ diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index 5f4364c6fba0..1caa4511a2b1 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -899,7 +899,7 @@ void in6_setmaxmtu(void); int in6_if2idlen(struct ifnet *); struct in6_ifaddr *in6ifa_ifpforlinklocal(struct ifnet *, int); struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, const struct in6_addr *); -struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t); +struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t, bool); struct in6_ifaddr *in6ifa_llaonifp(struct ifnet *); int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *); int in6_matchlen(struct in6_addr *, struct in6_addr *); diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 8f500cb87bfe..80e5acc62548 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -803,7 +803,7 @@ passin: * XXX: For now we keep link-local IPv6 addresses with embedded * scope zone id, therefore we use zero zoneid here. */ - ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */); + ia = in6ifa_ifwithaddr(&ip6->ip6_dst, 0 /* XXX */, false); if (ia != NULL) { if (ia->ia6_flags & IN6_IFF_NOTREADY) { char ip6bufs[INET6_ADDRSTRLEN]; @@ -813,13 +813,11 @@ passin: "ip6_input: packet to an unready address %s->%s\n", ip6_sprintf(ip6bufs, &ip6->ip6_src), ip6_sprintf(ip6bufd, &ip6->ip6_dst))); - ifa_free(&ia->ia_ifa); goto bad; } /* Count the packet in the ip address stats */ counter_u64_add(ia->ia_ifa.ifa_ipackets, 1); counter_u64_add(ia->ia_ifa.ifa_ibytes, m->m_pkthdr.len); - ifa_free(&ia->ia_ifa); ours = 1; goto hbhcheck; } diff --git a/sys/netinet6/send.c b/sys/netinet6/send.c index fbe53924c91f..0c839519b724 100644 --- a/sys/netinet6/send.c +++ b/sys/netinet6/send.c @@ -117,6 +117,7 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) struct icmp6_hdr *icmp6; struct epoch_tracker et; int icmp6len; + int error; /* * Receive incoming (SeND-protected) or outgoing traffic @@ -143,17 +144,17 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) ip6 = mtod(m, struct ip6_hdr *); icmp6 = (struct icmp6_hdr *)(ip6 + 1); + error = 0; /* * Output the packet as icmp6.c:icpm6_input() would do. * The mbuf is always consumed, so we do not have to * care about that. */ + NET_EPOCH_ENTER(et); switch (icmp6->icmp6_type) { case ND_NEIGHBOR_SOLICIT: - NET_EPOCH_ENTER(et); nd6_ns_input(m, sizeof(struct ip6_hdr), icmp6len); - NET_EPOCH_EXIT(et); break; case ND_NEIGHBOR_ADVERT: nd6_na_input(m, sizeof(struct ip6_hdr), icmp6len); @@ -169,9 +170,11 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) break; default: m_freem(m); - return (ENOSYS); + error = ENOSYS; } - return (0); + NET_EPOCH_EXIT(et); + + return (error); case SND_OUT: if (m->m_len < sizeof(struct ip6_hdr)) { @@ -199,7 +202,6 @@ send_output(struct mbuf *m, struct ifnet *ifp, int direction) * XXX-BZ as we added data, what about fragmenting, * if now needed? */ - int error; error = ((*ifp->if_output)(ifp, m, (struct sockaddr *)&dst, NULL)); if (error) From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:54:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AB35F53D050; Mon, 15 Feb 2021 22:54: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 4DffYz4RFMz3p0W; Mon, 15 Feb 2021 22:54: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 8B0E525BFF; Mon, 15 Feb 2021 22:54: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 11FMslcT061842; Mon, 15 Feb 2021 22:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMsllK061841; Mon, 15 Feb 2021 22:54:47 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:54:47 GMT Message-Id: <202102152254.11FMsllK061841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 04e34c0202ea - main - libpmc: fix linking with C programs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04e34c0202ea50cea67d5779f54bc612c74e6532 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:54:47 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=04e34c0202ea50cea67d5779f54bc612c74e6532 commit 04e34c0202ea50cea67d5779f54bc612c74e6532 Author: Alan Somers AuthorDate: 2021-02-15 22:51:31 +0000 Commit: Alan Somers CommitDate: 2021-02-15 22:54:18 +0000 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Reported-by: Dom Dwyer Reviewed By: vangyzen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28550 --- lib/libpmc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 01554e9b1526..42aa14e58471 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -6,6 +6,7 @@ SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat +LDADD+= -lc++ .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:55:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1330553D9C9; Mon, 15 Feb 2021 22:55:48 +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 4Dffb804jyz3p2x; Mon, 15 Feb 2021 22:55:48 +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 E98F425EB5; Mon, 15 Feb 2021 22:55: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 11FMtl3d062121; Mon, 15 Feb 2021 22:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMtlO9062120; Mon, 15 Feb 2021 22:55:47 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:55:47 GMT Message-Id: <202102152255.11FMtlO9062120@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: a7b42c4b7f7a - main - msun: ctanh/ctanhf: Import fix from musl libc MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:55:48 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2 commit a7b42c4b7f7ad7bd1b22ab57ed9185bdcea6f0a2 Author: Alex Richardson AuthorDate: 2021-02-15 22:06:41 +0000 Commit: Alex Richardson CommitDate: 2021-02-15 22:55:12 +0000 msun: ctanh/ctanhf: Import fix from musl libc This applies musl commit b02eed9c4841913d690a2d0029737d72615384fe by Szabolcs Nagy and updates the tests accordingly. This also allows removing an XFAIL from the test. musl commit message: complex: fix ctanh(+-0+i*nan) and ctanh(+-0+-i*inf) These cases were incorrect in C11 as described by http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1886.htm PR: 217528 Reviewed By: dim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28578 --- lib/msun/src/s_ctanh.c | 8 +++++--- lib/msun/src/s_ctanhf.c | 2 +- lib/msun/tests/ctrig_test.c | 23 ++++++++--------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/msun/src/s_ctanh.c b/lib/msun/src/s_ctanh.c index 13eb9d40b678..93e5ad444501 100644 --- a/lib/msun/src/s_ctanh.c +++ b/lib/msun/src/s_ctanh.c @@ -111,11 +111,13 @@ ctanh(double complex z) } /* - * ctanh(x + I NaN) = d(NaN) + I d(NaN) - * ctanh(x +- I Inf) = dNaN + I dNaN + * ctanh(+-0 + i NAN) = +-0 + i NaN + * ctanh(+-0 +- i Inf) = +-0 + i NaN + * ctanh(x + i NAN) = NaN + i NaN + * ctanh(x +- i Inf) = NaN + i NaN */ if (!isfinite(y)) - return (CMPLX(y - y, y - y)); + return (CMPLX(x ? y - y : x, y - y)); /* * ctanh(+-huge +- I y) ~= +-1 +- I 2sin(2y)/exp(2x), using the diff --git a/lib/msun/src/s_ctanhf.c b/lib/msun/src/s_ctanhf.c index 7d375eafd2ae..164a2c23df9e 100644 --- a/lib/msun/src/s_ctanhf.c +++ b/lib/msun/src/s_ctanhf.c @@ -61,7 +61,7 @@ ctanhf(float complex z) } if (!isfinite(y)) - return (CMPLXF(y - y, y - y)); + return (CMPLXF(ix ? y - y : x, y - y)); if (ix >= 0x41300000) { /* |x| >= 11 */ float exp_mx = expf(-fabsf(x)); diff --git a/lib/msun/tests/ctrig_test.c b/lib/msun/tests/ctrig_test.c index 45b2b78b0416..b40373fed29b 100644 --- a/lib/msun/tests/ctrig_test.c +++ b/lib/msun/tests/ctrig_test.c @@ -138,13 +138,6 @@ ATF_TC_BODY(test_zero_input, tc) { long double complex zero = CMPLXL(0.0, 0.0); -#if defined(__amd64__) -#if defined(__clang__) && \ - ((__clang_major__ >= 4)) - atf_tc_expect_fail("test fails with clang 4.x+ - bug 217528"); -#endif -#endif - /* csinh(0) = ctanh(0) = 0; ccosh(0) = 1 (no exceptions raised) */ testall_odd(csinh, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); testall_odd(csin, zero, zero, ALL_STD_EXCEPT, 0, CS_BOTH); @@ -171,8 +164,8 @@ ATF_TC_BODY(test_nan_inputs, tc) * NaN,finite NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] * NaN,Inf NaN,NaN [inval] NaN,NaN [inval] NaN,NaN [inval] * Inf,NaN +-Inf,NaN Inf,NaN 1,+-0 - * 0,NaN +-0,NaN NaN,+-0 NaN,NaN [inval] - * NaN,0 NaN,0 NaN,+-0 NaN,0 + * 0,NaN +-0,NaN NaN,+-0 +-0,NaN + * NaN,0 NaN,0 NaN,+-0 NaN,+-0 */ z = nan_nan; testall_odd(csinh, z, nan_nan, ALL_STD_EXCEPT, 0, 0); @@ -219,9 +212,9 @@ ATF_TC_BODY(test_nan_inputs, tc) testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); z = CMPLXL(0, NAN); - testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, 0); + testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); - testall_odd(ctanh, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctanh, z, CMPLXL(0, NAN), OPT_INVALID, 0, CS_REAL); testall_odd(csin, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); testall_odd(ctan, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL); @@ -232,7 +225,7 @@ ATF_TC_BODY(test_nan_inputs, tc) testall_odd(ctanh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, 0); - testall_odd(ctan, z, nan_nan, OPT_INVALID, 0, 0); + testall_odd(ctan, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG); } ATF_TC(test_inf_inputs); @@ -252,7 +245,7 @@ ATF_TC_BODY(test_inf_inputs, tc) * IN CSINH CCOSH CTANH * Inf,Inf +-Inf,NaN inval +-Inf,NaN inval 1,+-0 * Inf,finite Inf cis(finite) Inf cis(finite) 1,0 sin(2 finite) - * 0,Inf +-0,NaN inval NaN,+-0 inval NaN,NaN inval + * 0,Inf +-0,NaN inval NaN,+-0 inval +-0,NaN * finite,Inf NaN,NaN inval NaN,NaN inval NaN,NaN inval */ z = CMPLXL(INFINITY, INFINITY); @@ -286,11 +279,11 @@ ATF_TC_BODY(test_inf_inputs, tc) z = CMPLXL(0, INFINITY); testall_odd(csinh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); testall_even(ccosh, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); - testall_odd(ctanh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctanh, z, CMPLXL(0, NAN), ALL_STD_EXCEPT, FE_INVALID, CS_REAL); z = CMPLXL(INFINITY, 0); testall_odd(csin, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); testall_even(ccos, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0); - testall_odd(ctan, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); + testall_odd(ctan, z, CMPLXL(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, CS_IMAG); z = CMPLXL(42, INFINITY); testall_odd(csinh, z, CMPLXL(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:55:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3596353DC05; Mon, 15 Feb 2021 22:55:49 +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 4Dffb914MPz3npD; Mon, 15 Feb 2021 22:55:49 +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 17A4A25EB6; Mon, 15 Feb 2021 22:55:49 +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 11FMtmbd062144; Mon, 15 Feb 2021 22:55:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMtmlf062143; Mon, 15 Feb 2021 22:55:48 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:55:48 GMT Message-Id: <202102152255.11FMtmlf062143@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 0482d7c9e944 - main - Fix fget_only_user() to return ENOTCAPABLE on a failed capsicum check MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0482d7c9e944433abc98fc27a265ae762abce9a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:55:49 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=0482d7c9e944433abc98fc27a265ae762abce9a0 commit 0482d7c9e944433abc98fc27a265ae762abce9a0 Author: Alex Richardson AuthorDate: 2021-02-15 22:09:33 +0000 Commit: Alex Richardson CommitDate: 2021-02-15 22:55:12 +0000 Fix fget_only_user() to return ENOTCAPABLE on a failed capsicum check After eaad8d1303da500ed691bd774742a4555a05e729 four additional capsicum-test tests started failing. It turns out this is because fget_only_user() was returning EBADF on a failed capsicum check instead of forwarding the return value of cap_check_inline() like fget_unlocked_seq(). capsicum-test failures before this: ``` [ FAILED ] 7 tests, listed below: [ FAILED ] Capability.OperationsForked [ FAILED ] Capability.NoBypassDAC [ FAILED ] Pdfork.OtherUserForked [ FAILED ] PipePdfork.WildcardWait [ FAILED ] OpenatTest.WithFlag [ FAILED ] ForkedOpenatTest_WithFlagInCapabilityMode._ [ FAILED ] Select.LotsOFileDescriptorsForked ``` After: ``` [ FAILED ] 3 tests, listed below: [ FAILED ] Capability.NoBypassDAC [ FAILED ] Pdfork.OtherUserForked [ FAILED ] PipePdfork.WildcardWait ``` Reviewed By: mjg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28691 --- sys/kern/kern_descrip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 059e5123c7b5..43cedfe2199b 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3214,7 +3214,7 @@ fget_only_user(struct filedesc *fdp, int fd, cap_rights_t *needrightsp, haverights = cap_rights_fde_inline(fde); error = cap_check_inline(haverights, needrightsp); if (__predict_false(error != 0)) - return (EBADF); + return (error); *fpp = fp; return (0); } From owner-dev-commits-src-all@freebsd.org Mon Feb 15 22:55:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8A6E653DB6D; Mon, 15 Feb 2021 22:55: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 4DffbB1pMYz3npF; Mon, 15 Feb 2021 22:55: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 2F4A325F20; Mon, 15 Feb 2021 22:55: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 11FMtohq062166; Mon, 15 Feb 2021 22:55:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FMtoH7062165; Mon, 15 Feb 2021 22:55:50 GMT (envelope-from git) Date: Mon, 15 Feb 2021 22:55:50 GMT Message-Id: <202102152255.11FMtoH7062165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 10fc4c321838 - main - Fix two failing tests after ATF update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10fc4c3218381fef7189a5b8d46a757cd1989dff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 22:55:50 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=10fc4c3218381fef7189a5b8d46a757cd1989dff commit 10fc4c3218381fef7189a5b8d46a757cd1989dff Author: Alex Richardson AuthorDate: 2021-02-15 22:11:30 +0000 Commit: Alex Richardson CommitDate: 2021-02-15 22:55:12 +0000 Fix two failing tests after ATF update Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da ATF opens the results file on startup. This fixes problems like capsicumized tests not being able to open the file on exit. However, this test closes all file descriptors just to check that socketpair returns fd 3+4 and thereby also closes the ATF results file. This then results in an EBADF when writing the result so the test is reported as broken. While system calls that create new file descriptors (must?) use the lowest available file descriptor number, it does not seem useful to test this property here. Drop the check for FD==3/4 to unbreak the testsuite. We could also try to re-open the results file in ATF if we get a EBADF error, but that will fail when running under Capsicum. Reviewed By: cem Differential Revision: https://reviews.freebsd.org/D28683 --- contrib/netbsd-tests/lib/libc/sys/t_pipe2.c | 8 +++++--- contrib/netbsd-tests/lib/libc/sys/t_socketpair.c | 21 ++++++++++++++++++--- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c b/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c index 48f973488c7a..1b62fa630fd5 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_pipe2.c @@ -53,17 +53,19 @@ run(int flags) while ((i = open("/", O_RDONLY)) < 3) ATF_REQUIRE(i != -1); -#ifdef __FreeBSD__ - closefrom(3); -#else +#ifdef __NetBSD__ + /* This check is harmful since it closes atf's output file */ ATF_REQUIRE_MSG(closefrom(3) != -1, "closefrom failed: %s", strerror(errno)); #endif ATF_REQUIRE(pipe2(fd, flags) == 0); +#ifdef __NetBSD__ + /* This check is harmful since it requires closing atf's output file */ ATF_REQUIRE(fd[0] == 3); ATF_REQUIRE(fd[1] == 4); +#endif if (flags & O_CLOEXEC) { ATF_REQUIRE((fcntl(fd[0], F_GETFD) & FD_CLOEXEC) != 0); diff --git a/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c b/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c index 246b584d496a..165a42971d64 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c @@ -63,16 +63,18 @@ run(int domain, int type, int flags) while ((i = open("/", O_RDONLY)) < 3) ATF_REQUIRE(i != -1); -#ifdef __FreeBSD__ - closefrom(3); -#else +#ifdef __NetBSD__ + /* This check is harmful since it closes atf's output file */ ATF_REQUIRE(closefrom(3) != -1); #endif ATF_REQUIRE(socketpair(domain, type | flags, 0, fd) == 0); +#if __NetBSD__ + /* This check is harmful since it requires closing atf's output file */ ATF_REQUIRE(fd[0] == 3); ATF_REQUIRE(fd[1] == 4); +#endif connected(fd[0]); connected(fd[1]); @@ -125,12 +127,25 @@ ATF_TC_BODY(null_sv, tc) { int fd; +#ifdef __NetBSD__ + /* This check is harmful since it closes atf's output file */ closefrom(3); +#else + int lowfd = open("/", O_RDONLY); + ATF_REQUIRE(lowfd > 0); + ATF_REQUIRE_EQ(0, close(lowfd)); +#endif ATF_REQUIRE_EQ(socketpair(AF_UNIX, SOCK_DGRAM, 0, NULL), -1); ATF_REQUIRE_EQ(EFAULT, errno); fd = open("/", O_RDONLY); +#ifdef __NetBSD__ ATF_REQUIRE_EQ_MSG(fd, 3, "socketpair(..., NULL) allocated descriptors"); +#else + ATF_REQUIRE_EQ_MSG(fd, lowfd, + "socketpair(..., NULL) allocated descriptors: fd=%d, lowfd=%d", + fd, lowfd); +#endif } ATF_TC(socketpair_basic); From owner-dev-commits-src-all@freebsd.org Mon Feb 15 23:34:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 571F953E952 for ; Mon, 15 Feb 2021 23:34: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 4DfgS120Q1z3rPC; Mon, 15 Feb 2021 23:34: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 377A226549; Mon, 15 Feb 2021 23:34: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 11FNYf7G014424; Mon, 15 Feb 2021 23:34:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FNYfpQ014423; Mon, 15 Feb 2021 23:34:41 GMT (envelope-from git) Date: Mon, 15 Feb 2021 23:34:41 GMT Message-Id: <202102152334.11FNYfpQ014423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 83dd4a9252fd - vendor/openzfs - Update OpenZFS to master-436ab35a5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs X-Git-Reftype: branch X-Git-Commit: 83dd4a9252fd2044038a399d7afc68259d483b8e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 23:34:41 -0000 The branch vendor/openzfs has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=83dd4a9252fd2044038a399d7afc68259d483b8e commit 83dd4a9252fd2044038a399d7afc68259d483b8e Author: Martin Matuska AuthorDate: 2021-02-15 23:33:50 +0000 Commit: Martin Matuska CommitDate: 2021-02-15 23:33:50 +0000 Update OpenZFS to master-436ab35a5 --- include/sys/abd.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/sys/abd.h b/include/sys/abd.h index 55db8c1a05bd..a7eee89ca916 100644 --- a/include/sys/abd.h +++ b/include/sys/abd.h @@ -177,19 +177,19 @@ abd_zero(abd_t *abd, size_t size) static inline boolean_t abd_is_linear(abd_t *abd) { - return ((abd->abd_flags & ABD_FLAG_LINEAR) != 0); + return ((abd->abd_flags & ABD_FLAG_LINEAR) ? B_TRUE : B_FALSE); } static inline boolean_t abd_is_linear_page(abd_t *abd) { - return ((abd->abd_flags & ABD_FLAG_LINEAR_PAGE) != 0); + return ((abd->abd_flags & ABD_FLAG_LINEAR_PAGE) ? B_TRUE : B_FALSE); } static inline boolean_t abd_is_gang(abd_t *abd) { - return ((abd->abd_flags & ABD_FLAG_GANG) != 0); + return ((abd->abd_flags & ABD_FLAG_GANG) ? B_TRUE : B_FALSE); } static inline uint_t From owner-dev-commits-src-all@freebsd.org Mon Feb 15 23:50:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4B55753EC41; Mon, 15 Feb 2021 23:50: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 4DfgpR1Pyrz3rxJ; Mon, 15 Feb 2021 23:50: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 2332F269B1; Mon, 15 Feb 2021 23:50: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 11FNodKM037716; Mon, 15 Feb 2021 23:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11FNodlu037715; Mon, 15 Feb 2021 23:50:39 GMT (envelope-from git) Date: Mon, 15 Feb 2021 23:50:39 GMT Message-Id: <202102152350.11FNodlu037715@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: 046f91f21ac6 - stable/12 - Cirrus-CI: use FreeBSD 12.2 image 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: 046f91f21ac619f7307a8e853f863ded4df7f322 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2021 23:50:39 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=046f91f21ac619f7307a8e853f863ded4df7f322 commit 046f91f21ac619f7307a8e853f863ded4df7f322 Author: Ed Maste AuthorDate: 2021-02-15 22:04:42 +0000 Commit: Ed Maste CommitDate: 2021-02-15 23:49:51 +0000 Cirrus-CI: use FreeBSD 12.2 image Direct commit to stable/12 as main has other changes here, using the llvm package to avoid building the toolchain. --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 1425b21d1eed..ec87c371aca2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ # $FreeBSD$ freebsd_instance: - image: freebsd-12-1-release-amd64 + image: freebsd-12-2-release-amd64 cpu: 8 memory: 24G From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:29:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E3932540372; Tue, 16 Feb 2021 00:29:23 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Thawte RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dfhg70fcHz3wSY; Tue, 16 Feb 2021 00:29:22 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from pps.filterd (m0108163.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 11G0TLkn016904; Mon, 15 Feb 2021 16:29:21 -0800 Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2170.outbound.protection.outlook.com [104.47.59.170]) by mx0b-00273201.pphosted.com with ESMTP id 36pavv3jcw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Feb 2021 16:29:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZkVLgtZOCacq+3E8tkmOCRC/Gs2trnJ10Q9NjzjlgdBhN6sFkavLo1ITUdf1lZzOmJJ9X7v9ZDzAJ5sX7IDT7j7BtdIdYIdvIi+GK237AFByNHRpgSaOSoUiRSj4Uqy/PJyy/i7JAFpHWXEYFHs2m0x/+C635NW21kJHzEAhR802mWF/z9COPsuQ4d8lU9X5F+2KHpQ0TUc6dmLo2SkvfvsUnJJl88CqPnOHq8t0uk69qxib+foVIs1KhGpJy66TrvuP1Xqi2/U3+/4hrIYeNSrIRmOe3PKlvM6KNdeveZMwp65NfbwYGDZkE6OZDlzyWZevXRdFKZdZEiOmqpQlZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yJ9d5w11/fTbdBbHgw/nsXcUQ1e6rMTc7tV4JBFjFnQ=; b=iNQRIbKyuVvhK9lmwCwywwJRxVxdaLVq881Uu8SE/x7haUFxr6/8PecANceZYlM+jUajkhiIZvasrVqC7YpsF/FqB/yhVv/3eI7Sm0XJtrJ69WKiv5vL+vZJ6iKXNVHrJqYqV9K8pfcyn9pWco6Ci/p4JFH19mA2Lp4ZCx5kZM6Hj6ksCYRGWzc14yUjHBWWvOxjXuRloYQbq9jrJTfWBU+z/SFsHtRFMMj8gdtgZy+r1hZPVbHQ8+vzbafUEtqHxTUkcmNxjUIz5tTeWznBV8gf5HJX3NQkkazlzGAYjY86Ge6elI8DSBnknJ3iuhkrnfUdFWnoGVToOSobTXC9QQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.239.12) smtp.rcpttodomain=rulingia.com smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none Received: from MW4PR03CA0280.namprd03.prod.outlook.com (2603:10b6:303:b5::15) by BN7PR05MB5858.namprd05.prod.outlook.com (2603:10b6:408:e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.22; Tue, 16 Feb 2021 00:29:18 +0000 Received: from MW2NAM12FT021.eop-nam12.prod.protection.outlook.com (2603:10b6:303:b5:cafe::4b) by MW4PR03CA0280.outlook.office365.com (2603:10b6:303:b5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3846.27 via Frontend Transport; Tue, 16 Feb 2021 00:29:18 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; rulingia.com; dkim=none (message not signed) header.d=none;rulingia.com; dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender) Received: from P-EXFEND-EQX-01.jnpr.net (66.129.239.12) by MW2NAM12FT021.mail.protection.outlook.com (10.13.180.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3868.20 via Frontend Transport; Tue, 16 Feb 2021 00:29:17 +0000 Received: from P-EXBEND-EQX-02.jnpr.net (10.104.8.53) by P-EXFEND-EQX-01.jnpr.net (10.104.8.54) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Feb 2021 16:29:17 -0800 Received: from P-EXBEND-EQX-01.jnpr.net (10.104.8.52) by P-EXBEND-EQX-02.jnpr.net (10.104.8.53) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 15 Feb 2021 16:29:17 -0800 Received: from p-mailhub01.juniper.net (10.104.20.6) by P-EXBEND-EQX-01.jnpr.net (10.104.8.52) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Mon, 15 Feb 2021 16:29:17 -0800 Received: from kaos.jnpr.net (kaos.jnpr.net [172.23.255.201]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 11G0TFNv007620; Mon, 15 Feb 2021 16:29:16 -0800 (envelope-from sjg@juniper.net) Received: by kaos.jnpr.net (Postfix, from userid 1377) id 593B42A2FE; Mon, 15 Feb 2021 16:29:16 -0800 (PST) Received: from kaos.jnpr.net (localhost [127.0.0.1]) by kaos.jnpr.net (Postfix) with ESMTP id 57A032A36A; Mon, 15 Feb 2021 16:29:16 -0800 (PST) To: Peter Jeremy CC: , , , Subject: Re: git: ee10666327b6 - main - Links for bmake and bmake.1 In-Reply-To: References: <202102150122.11F1Mwq8070473@gitrepo.freebsd.org> Comments: In-reply-to: Peter Jeremy message dated "Tue, 16 Feb 2021 06:17:56 +1100." From: "Simon J. Gerraty" X-Mailer: MH-E 8.6+git; nmh 1.7.1; GNU Emacs 27.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <73822.1613435356.1@kaos.jnpr.net> Date: Mon, 15 Feb 2021 16:29:16 -0800 Message-ID: <75265.1613435356@kaos.jnpr.net> X-EXCLAIMER-MD-CONFIG: e3cb0ff2-54e7-4646-8a04-0dae4ac7b136 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b520f2b6-f9f9-4406-da79-08d8d211e581 X-MS-TrafficTypeDiagnostic: BN7PR05MB5858: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2089; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JffJsnc4nuJXsxP315S4obodu+LBRM/+DAcWJPPJIcVe96gMvs8wYPREG2IdbsEKQ46OeF24zv0m0EqaHjZzn4a56vri7pZU1NFTa0kmrLARbU9nfJl2vNWBmRDD7FSTnp9yDNRvyMpF1Em4PMvg0htFnuAa/T94KlQIjAAU0oMkMg6hA6WwRzmGyf3zf6IGjjvuu0L7EKP3z7zQXqEGl1ZQ7ZJYpcIvVrX+j2C0X92rTtYu0SnrhcFa4XiuXbd2GqBeHN3DzoPfMzKJvjj904nnuqCSZ0HXFPXC4DDLfgZ7eqrDRRmwJhaQE5y51OCY31ux+N3THfxmGdUVWrXXvVx2PamXSsYIvlbSLM23YZKTtdHx4cgZlgGgdJKFqki4SK7uxYeFlyBYv67y2h2F1heANqDqvoPbSEZEpt00UiPlPCJXTPDG24zjThYrKaRNfZYs7f6vN0W22RsKwggjzHFx8ab9CKzSkyxMvXJaJHGszAsiuGbs8JMveM4LiN3LElNxERuR0h9490fkNOXSF5kDA4map/EQrwFSDXuZxO5Rv+SzV8gqQcDFGvSEXTqStaq9E69A8HAEXv2MYBqhA3pbC48tDRP9pRpJYvShB4xfKCF3R5RUi4CV8HwHGnVJosYps+c/puPXg0lH5W+KujStZ4n5KqadXpPMlwNdhTwpybaUTQVoMwq6XN45xxt/ X-Forefront-Antispam-Report: CIP:66.129.239.12; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:P-EXFEND-EQX-01.jnpr.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(39860400002)(346002)(376002)(396003)(136003)(36840700001)(46966006)(2906002)(36860700001)(86362001)(478600001)(6916009)(82310400003)(81166007)(8676002)(356005)(8936002)(9686003)(7126003)(5660300002)(316002)(7696005)(47076005)(4326008)(54906003)(107886003)(82740400003)(186003)(6266002)(70206006)(336012)(70586007)(55016002)(558084003)(26005)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Feb 2021 00:29:17.8695 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b520f2b6-f9f9-4406-da79-08d8d211e581 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[P-EXFEND-EQX-01.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: MW2NAM12FT021.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR05MB5858 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761 definitions=2021-02-15_16:2021-02-12, 2021-02-15 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 impostorscore=0 mlxscore=0 clxscore=1011 priorityscore=1501 mlxlogscore=581 lowpriorityscore=0 spamscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2102160002 X-Rspamd-Queue-Id: 4Dfhg70fcHz3wSY X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.10 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[juniper.net:s=PPS1017,juniper.net:s=selector1]; FREEFALL_USER(0.00)[sjg]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:67.231.152.164]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; RCPT_COUNT_FIVE(0.00)[5]; RWL_MAILSPIKE_EXCELLENT(0.00)[67.231.152.164:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[juniper.net:+]; DMARC_POLICY_ALLOW(-0.50)[juniper.net,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22843, ipnet:67.231.152.0/24, country:US]; RCVD_COUNT_SEVEN(0.00)[11]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; RCVD_IN_DNSWL_LOW(-0.10)[67.231.152.164:from] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:29:23 -0000 Peter Jeremy wrote: > This breaks installworld with DESTDIR set: Yes, sorry. Fix is in 85d6747a694 From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3E4FF54109B; Tue, 16 Feb 2021 00:46:06 +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 4Dfj2Q1CHYz4S2q; Tue, 16 Feb 2021 00:46:06 +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 1BD8927719; Tue, 16 Feb 2021 00:46:06 +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 11G0k65c006013; Tue, 16 Feb 2021 00:46:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0k5Gv006010; Tue, 16 Feb 2021 00:46:05 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:05 GMT Message-Id: <202102160046.11G0k5Gv006010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 422b6a3048c6 - stable/13 - MFC 4cd1807c7d2a67b633dd0c0bfde15091543a2514: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 422b6a3048c6d52709175dd3d3f9c060912d1d56 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:06 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=422b6a3048c6d52709175dd3d3f9c060912d1d56 commit 422b6a3048c6d52709175dd3d3f9c060912d1d56 Author: Cy Schubert AuthorDate: 2021-01-26 06:24:28 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:48 +0000 MFC 4cd1807c7d2a67b633dd0c0bfde15091543a2514: Retire the K&R/STD C __P prototype declarations. In the old days when K&R C and STD C were each in use a workaround (read hack) was required to allow the same code to work on each without modification. All C compilers support STD C. We can finally put the __P prototype to rest. (cherry picked from commit 4cd1807c7d2a67b633dd0c0bfde15091543a2514) --- contrib/ipfilter/bpf_filter.c | 4 +- contrib/ipfilter/ip_dstlist.c | 70 ++--- contrib/ipfilter/ip_dstlist.h | 4 +- contrib/ipfilter/ip_fil.c | 12 +- contrib/ipfilter/ip_fil_compat.c | 122 ++++---- contrib/ipfilter/ip_msnrpc_pxy.c | 12 +- contrib/ipfilter/ipf.h | 340 ++++++++++----------- contrib/ipfilter/iplang/iplang.h | 2 +- contrib/ipfilter/iplang/iplang_l.l | 16 +- contrib/ipfilter/iplang/iplang_y.y | 162 +++++----- contrib/ipfilter/ipmon.h | 14 +- contrib/ipfilter/ipsend/ipresend.c | 4 +- contrib/ipfilter/ipsend/ipsend.c | 8 +- contrib/ipfilter/ipsend/ipsend.h | 52 ++-- contrib/ipfilter/ipsend/iptest.c | 4 +- contrib/ipfilter/ipsend/resend.c | 2 +- contrib/ipfilter/ipsend/sock.c | 4 +- contrib/ipfilter/ipt.h | 6 +- contrib/ipfilter/kmem.h | 6 +- contrib/ipfilter/lib/facpri.h | 8 +- contrib/ipfilter/lib/inet_addr.c | 2 +- contrib/ipfilter/lib/initparse.c | 2 +- contrib/ipfilter/lib/interror.c | 2 +- contrib/ipfilter/lib/ipft_hx.c | 8 +- contrib/ipfilter/lib/ipft_pc.c | 10 +- contrib/ipfilter/lib/ipft_tx.c | 12 +- contrib/ipfilter/lib/kmem.h | 6 +- contrib/ipfilter/lib/printipfexpr.c | 8 +- contrib/ipfilter/lib/save_execute.c | 8 +- contrib/ipfilter/lib/save_file.c | 12 +- contrib/ipfilter/lib/save_nothing.c | 6 +- contrib/ipfilter/lib/save_syslog.c | 8 +- contrib/ipfilter/lib/save_v1trap.c | 20 +- contrib/ipfilter/lib/save_v2trap.c | 24 +- contrib/ipfilter/lib/var.c | 4 +- contrib/ipfilter/man/ipf.4 | 2 +- contrib/ipfilter/md5.c | 2 +- contrib/ipfilter/md5.h | 6 +- contrib/ipfilter/radix_ipf.c | 20 +- contrib/ipfilter/radix_ipf.h | 24 +- contrib/ipfilter/tools/ipf.c | 32 +- contrib/ipfilter/tools/ipf_y.y | 52 ++-- contrib/ipfilter/tools/ipfcomp.c | 38 +-- contrib/ipfilter/tools/ipfs.c | 28 +- contrib/ipfilter/tools/ipfstat.c | 76 ++--- contrib/ipfilter/tools/ipfsyncd.c | 22 +- contrib/ipfilter/tools/ipftest.c | 40 +-- contrib/ipfilter/tools/ipmon.c | 48 +-- contrib/ipfilter/tools/ipmon_y.y | 22 +- contrib/ipfilter/tools/ipnat.c | 24 +- contrib/ipfilter/tools/ipnat_y.y | 38 +-- contrib/ipfilter/tools/ippool.c | 34 +-- contrib/ipfilter/tools/ippool_y.y | 10 +- contrib/ipfilter/tools/ipscan_y.y | 32 +- contrib/ipfilter/tools/ipsyncm.c | 4 +- contrib/ipfilter/tools/ipsyncs.c | 4 +- contrib/ipfilter/tools/lexer.c | 14 +- contrib/ipfilter/tools/lexer.h | 14 +- sys/contrib/ipfilter/netinet/fil.c | 148 +++++----- sys/contrib/ipfilter/netinet/ip_auth.c | 14 +- sys/contrib/ipfilter/netinet/ip_auth.h | 40 +-- sys/contrib/ipfilter/netinet/ip_compat.h | 38 ++- sys/contrib/ipfilter/netinet/ip_dns_pxy.c | 20 +- sys/contrib/ipfilter/netinet/ip_dstlist.c | 70 ++--- sys/contrib/ipfilter/netinet/ip_dstlist.h | 4 +- sys/contrib/ipfilter/netinet/ip_fil.h | 408 +++++++++++++------------- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 6 +- sys/contrib/ipfilter/netinet/ip_frag.c | 28 +- sys/contrib/ipfilter/netinet/ip_frag.h | 54 ++-- sys/contrib/ipfilter/netinet/ip_ftp_pxy.c | 78 ++--- sys/contrib/ipfilter/netinet/ip_htable.c | 76 ++--- sys/contrib/ipfilter/netinet/ip_htable.h | 6 +- sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c | 20 +- sys/contrib/ipfilter/netinet/ip_irc_pxy.c | 14 +- sys/contrib/ipfilter/netinet/ip_lookup.c | 16 +- sys/contrib/ipfilter/netinet/ip_lookup.h | 92 +++--- sys/contrib/ipfilter/netinet/ip_nat.c | 98 +++---- sys/contrib/ipfilter/netinet/ip_nat.h | 176 +++++------ sys/contrib/ipfilter/netinet/ip_nat6.c | 30 +- sys/contrib/ipfilter/netinet/ip_netbios_pxy.c | 6 +- sys/contrib/ipfilter/netinet/ip_pool.c | 74 ++--- sys/contrib/ipfilter/netinet/ip_pool.h | 2 +- sys/contrib/ipfilter/netinet/ip_pptp_pxy.c | 18 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 4 +- sys/contrib/ipfilter/netinet/ip_proxy.h | 76 ++--- sys/contrib/ipfilter/netinet/ip_raudio_pxy.c | 10 +- sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c | 22 +- sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c | 60 ++-- sys/contrib/ipfilter/netinet/ip_rules.h | 16 +- sys/contrib/ipfilter/netinet/ip_scan.c | 12 +- sys/contrib/ipfilter/netinet/ip_scan.h | 16 +- sys/contrib/ipfilter/netinet/ip_state.c | 72 ++--- sys/contrib/ipfilter/netinet/ip_state.h | 66 ++--- sys/contrib/ipfilter/netinet/ip_sync.c | 18 +- sys/contrib/ipfilter/netinet/ip_sync.h | 34 +-- sys/contrib/ipfilter/netinet/ip_tftp_pxy.c | 26 +- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 16 +- sys/contrib/ipfilter/netinet/radix_ipf.c | 20 +- sys/contrib/ipfilter/netinet/radix_ipf.h | 22 +- 99 files changed, 1795 insertions(+), 1801 deletions(-) diff --git a/contrib/ipfilter/bpf_filter.c b/contrib/ipfilter/bpf_filter.c index bd465761a34e..85a38a88bf57 100644 --- a/contrib/ipfilter/bpf_filter.c +++ b/contrib/ipfilter/bpf_filter.c @@ -71,8 +71,8 @@ static const char rcsid[] = #define int32 bpf_int32 #define u_int32 bpf_u_int32 -static int m_xword __P((mb_t *, int, int *)); -static int m_xhalf __P((mb_t *, int, int *)); +static int m_xword(mb_t *, int, int *); +static int m_xhalf(mb_t *, int, int *); #ifndef LBL_ALIGN /* diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c index 99c7a22668df..14b071b0b95f 100644 --- a/contrib/ipfilter/ip_dstlist.c +++ b/contrib/ipfilter/ip_dstlist.c @@ -73,41 +73,41 @@ typedef struct ipf_dstl_softc_s { } ipf_dstl_softc_t; -static void *ipf_dstlist_soft_create __P((ipf_main_softc_t *)); -static void ipf_dstlist_soft_destroy __P((ipf_main_softc_t *, void *)); -static int ipf_dstlist_soft_init __P((ipf_main_softc_t *, void *)); -static void ipf_dstlist_soft_fini __P((ipf_main_softc_t *, void *)); -static int ipf_dstlist_addr_find __P((ipf_main_softc_t *, void *, int, - void *, u_int)); -static size_t ipf_dstlist_flush __P((ipf_main_softc_t *, void *, - iplookupflush_t *)); -static int ipf_dstlist_iter_deref __P((ipf_main_softc_t *, void *, int, int, - void *)); -static int ipf_dstlist_iter_next __P((ipf_main_softc_t *, void *, ipftoken_t *, - ipflookupiter_t *)); -static int ipf_dstlist_node_add __P((ipf_main_softc_t *, void *, - iplookupop_t *, int)); -static int ipf_dstlist_node_del __P((ipf_main_softc_t *, void *, - iplookupop_t *, int)); -static int ipf_dstlist_stats_get __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_add __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_del __P((ipf_main_softc_t *, void *, - iplookupop_t *)); -static int ipf_dstlist_table_deref __P((ipf_main_softc_t *, void *, void *)); -static void *ipf_dstlist_table_find __P((void *, int, char *)); -static void ipf_dstlist_table_free __P((ipf_dstl_softc_t *, ippool_dst_t *)); -static void ipf_dstlist_table_remove __P((ipf_main_softc_t *, - ipf_dstl_softc_t *, ippool_dst_t *)); -static void ipf_dstlist_table_clearnodes __P((ipf_dstl_softc_t *, - ippool_dst_t *)); -static ipf_dstnode_t *ipf_dstlist_select __P((fr_info_t *, ippool_dst_t *)); -static void *ipf_dstlist_select_ref __P((void *, int, char *)); -static void ipf_dstlist_node_free __P((ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *)); -static int ipf_dstlist_node_deref __P((void *, ipf_dstnode_t *)); -static void ipf_dstlist_expire __P((ipf_main_softc_t *, void *)); -static void ipf_dstlist_sync __P((ipf_main_softc_t *, void *)); +static void *ipf_dstlist_soft_create(ipf_main_softc_t *); +static void ipf_dstlist_soft_destroy(ipf_main_softc_t *, void *); +static int ipf_dstlist_soft_init(ipf_main_softc_t *, void *); +static void ipf_dstlist_soft_fini(ipf_main_softc_t *, void *); +static int ipf_dstlist_addr_find(ipf_main_softc_t *, void *, int, + void *, u_int); +static size_t ipf_dstlist_flush(ipf_main_softc_t *, void *, + iplookupflush_t *); +static int ipf_dstlist_iter_deref(ipf_main_softc_t *, void *, int, int, + void *); +static int ipf_dstlist_iter_next(ipf_main_softc_t *, void *, ipftoken_t *, + ipflookupiter_t *); +static int ipf_dstlist_node_add(ipf_main_softc_t *, void *, + iplookupop_t *, int); +static int ipf_dstlist_node_del(ipf_main_softc_t *, void *, + iplookupop_t *, int); +static int ipf_dstlist_stats_get(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_add(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_del(ipf_main_softc_t *, void *, + iplookupop_t *); +static int ipf_dstlist_table_deref(ipf_main_softc_t *, void *, void *); +static void *ipf_dstlist_table_find(void *, int, char *); +static void ipf_dstlist_table_free(ipf_dstl_softc_t *, ippool_dst_t *); +static void ipf_dstlist_table_remove(ipf_main_softc_t *, + ipf_dstl_softc_t *, ippool_dst_t *); +static void ipf_dstlist_table_clearnodes(ipf_dstl_softc_t *, + ippool_dst_t *); +static ipf_dstnode_t *ipf_dstlist_select(fr_info_t *, ippool_dst_t *); +static void *ipf_dstlist_select_ref(void *, int, char *); +static void ipf_dstlist_node_free(ipf_dstl_softc_t *, ippool_dst_t *, ipf_dstnode_t *); +static int ipf_dstlist_node_deref(void *, ipf_dstnode_t *); +static void ipf_dstlist_expire(ipf_main_softc_t *, void *); +static void ipf_dstlist_sync(ipf_main_softc_t *, void *); ipf_lookup_t ipf_dstlist_backend = { IPLT_DSTLIST, diff --git a/contrib/ipfilter/ip_dstlist.h b/contrib/ipfilter/ip_dstlist.h index e2885e5c47ad..c4acd78dfd94 100644 --- a/contrib/ipfilter/ip_dstlist.h +++ b/contrib/ipfilter/ip_dstlist.h @@ -62,7 +62,7 @@ typedef struct dstlist_stat_s { extern ipf_lookup_t ipf_dstlist_backend; -extern int ipf_dstlist_select_node __P((fr_info_t *, void *, u_32_t *, - frdest_t *)); +extern int ipf_dstlist_select_node(fr_info_t *, void *, u_32_t *, + frdest_t *); #endif /* __IP_DSTLIST_H__ */ diff --git a/contrib/ipfilter/ip_fil.c b/contrib/ipfilter/ip_fil.c index 794d7e205bb3..327f90fc356c 100644 --- a/contrib/ipfilter/ip_fil.c +++ b/contrib/ipfilter/ip_fil.c @@ -23,12 +23,12 @@ static int nifs = 0; struct rtentry; -static void ipf_setifpaddr __P((struct ifnet *, char *)); -void init_ifp __P((void)); -static int no_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); -static int write_output __P((struct ifnet *, struct mbuf *, - struct sockaddr *, struct rtentry *)); +static void ipf_setifpaddr(struct ifnet *, char *); +void init_ifp(void); +static int no_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); +static int write_output(struct ifnet *, struct mbuf *, + struct sockaddr *, struct rtentry *); struct ifaddr { struct sockaddr_storage ifa_addr; diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index 271c2e065738..fbcfc8a0088f 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -73,7 +73,7 @@ typedef struct tcpinfo4 { tcpdata_t ts_data[2]; } tcpinfo4_t; -static void ipf_v5tcpinfoto4 __P((tcpinfo_t *, tcpinfo4_t *)); +static void ipf_v5tcpinfoto4(tcpinfo_t *, tcpinfo4_t *); static void ipf_v5tcpinfoto4(v5, v4) @@ -1190,66 +1190,66 @@ typedef struct ipfrstat_4_1_1 { } ipfrstat_4_1_1_t; /* ------------------------------------------------------------------------ */ -static int ipf_addfrstr __P((char *, int, char *, int)); -static void ipf_v4iptov5 __P((frip4_t *, fr_ip_t *)); -static void ipf_v5iptov4 __P((fr_ip_t *, frip4_t *)); -static void ipfv4tuctov5 __P((frtuc4_t *, frtuc_t *)); -static void ipfv5tuctov4 __P((frtuc_t *, frtuc4_t *)); -static int ipf_v4fripftov5 __P((fripf4_t *, char *)); -static void ipf_v5fripftov4 __P((fripf_t *, fripf4_t *)); -static int fr_frflags4to5 __P((u_32_t)); -static int fr_frflags5to4 __P((u_32_t)); - -static void friostat_current_to_4_1_0 __P((void *, friostat_4_1_0_t *, int)); -static void friostat_current_to_4_1_33 __P((void *, friostat_4_1_33_t *, int)); -static void ipstate_current_to_4_1_0 __P((void *, ipstate_4_1_0_t *)); -static void ipstate_current_to_4_1_16 __P((void *, ipstate_4_1_16_t *)); -static void ipnat_current_to_4_1_0 __P((void *, ipnat_4_1_0_t *)); -static void ipnat_current_to_4_1_14 __P((void *, ipnat_4_1_14_t *)); -static void frauth_current_to_4_1_11 __P((void *, frauth_4_1_11_t *)); -static void frauth_current_to_4_1_23 __P((void *, frauth_4_1_23_t *)); -static void frauth_current_to_4_1_24 __P((void *, frauth_4_1_24_t *)); -static void frauth_current_to_4_1_29 __P((void *, frauth_4_1_29_t *)); -static void frentry_current_to_4_1_0 __P((void *, frentry_4_1_0_t *)); -static void frentry_current_to_4_1_16 __P((void *, frentry_4_1_16_t *)); -static void frentry_current_to_4_1_34 __P((void *, frentry_4_1_34_t *)); -static void fr_info_current_to_4_1_11 __P((void *, fr_info_4_1_11_t *)); -static void fr_info_current_to_4_1_23 __P((void *, fr_info_4_1_23_t *)); -static void fr_info_current_to_4_1_24 __P((void *, fr_info_4_1_24_t *)); -static void nat_save_current_to_4_1_3 __P((void *, nat_save_4_1_3_t *)); -static void nat_save_current_to_4_1_14 __P((void *, nat_save_4_1_14_t *)); -static void nat_save_current_to_4_1_16 __P((void *, nat_save_4_1_16_t *)); -static void ipstate_save_current_to_4_1_0 __P((void *, ipstate_save_4_1_0_t *)); -static void ipstate_save_current_to_4_1_16 __P((void *, ipstate_save_4_1_16_t *)); -static void ips_stat_current_to_4_1_0 __P((void *, ips_stat_4_1_0_t *)); -static void ips_stat_current_to_4_1_21 __P((void *, ips_stat_4_1_21_t *)); -static void natstat_current_to_4_1_0 __P((void *, natstat_4_1_0_t *)); -static void natstat_current_to_4_1_16 __P((void *, natstat_4_1_16_t *)); -static void natstat_current_to_4_1_27 __P((void *, natstat_4_1_27_t *)); -static void natstat_current_to_4_1_32 __P((void *, natstat_4_1_32_t *)); -static void nat_current_to_4_1_3 __P((void *, nat_4_1_3_t *)); -static void nat_current_to_4_1_14 __P((void *, nat_4_1_14_t *)); -static void nat_current_to_4_1_25 __P((void *, nat_4_1_25_t *)); - -static void friostat_4_1_0_to_current __P((friostat_4_1_0_t *, void *)); -static void friostat_4_1_33_to_current __P((friostat_4_1_33_t *, void *)); -static void ipnat_4_1_0_to_current __P((ipnat_4_1_0_t *, void *, int)); -static void ipnat_4_1_14_to_current __P((ipnat_4_1_14_t *, void *, int)); -static void frauth_4_1_11_to_current __P((frauth_4_1_11_t *, void *)); -static void frauth_4_1_23_to_current __P((frauth_4_1_23_t *, void *)); -static void frauth_4_1_24_to_current __P((frauth_4_1_24_t *, void *)); -static void frauth_4_1_29_to_current __P((frauth_4_1_29_t *, void *)); -static void frauth_4_1_32_to_current __P((frauth_4_1_32_t *, void *)); -static void frentry_4_1_0_to_current __P((ipf_main_softc_t *, frentry_4_1_0_t *, void *, int)); -static void frentry_4_1_16_to_current __P((ipf_main_softc_t *, frentry_4_1_16_t *, void *, int)); -static void frentry_4_1_34_to_current __P((ipf_main_softc_t *, frentry_4_1_34_t *, void *, int)); -static void fr_info_4_1_11_to_current __P((fr_info_4_1_11_t *, void *)); -static void fr_info_4_1_23_to_current __P((fr_info_4_1_23_t *, void *)); -static void fr_info_4_1_24_to_current __P((fr_info_4_1_24_t *, void *)); -static void fr_info_4_1_32_to_current __P((fr_info_4_1_32_t *, void *)); -static void nat_save_4_1_3_to_current __P((ipf_main_softc_t *, nat_save_4_1_3_t *, void *)); -static void nat_save_4_1_14_to_current __P((ipf_main_softc_t *, nat_save_4_1_14_t *, void *)); -static void nat_save_4_1_16_to_current __P((ipf_main_softc_t *, nat_save_4_1_16_t *, void *)); +static int ipf_addfrstr(char *, int, char *, int); +static void ipf_v4iptov5(frip4_t *, fr_ip_t *); +static void ipf_v5iptov4(fr_ip_t *, frip4_t *); +static void ipfv4tuctov5(frtuc4_t *, frtuc_t *); +static void ipfv5tuctov4(frtuc_t *, frtuc4_t *); +static int ipf_v4fripftov5(fripf4_t *, char *); +static void ipf_v5fripftov4(fripf_t *, fripf4_t *); +static int fr_frflags4to5(u_32_t); +static int fr_frflags5to4(u_32_t); + +static void friostat_current_to_4_1_0(void *, friostat_4_1_0_t *, int); +static void friostat_current_to_4_1_33(void *, friostat_4_1_33_t *, int); +static void ipstate_current_to_4_1_0(void *, ipstate_4_1_0_t *); +static void ipstate_current_to_4_1_16(void *, ipstate_4_1_16_t *); +static void ipnat_current_to_4_1_0(void *, ipnat_4_1_0_t *); +static void ipnat_current_to_4_1_14(void *, ipnat_4_1_14_t *); +static void frauth_current_to_4_1_11(void *, frauth_4_1_11_t *); +static void frauth_current_to_4_1_23(void *, frauth_4_1_23_t *); +static void frauth_current_to_4_1_24(void *, frauth_4_1_24_t *); +static void frauth_current_to_4_1_29(void *, frauth_4_1_29_t *); +static void frentry_current_to_4_1_0(void *, frentry_4_1_0_t *); +static void frentry_current_to_4_1_16(void *, frentry_4_1_16_t *); +static void frentry_current_to_4_1_34(void *, frentry_4_1_34_t *); +static void fr_info_current_to_4_1_11(void *, fr_info_4_1_11_t *); +static void fr_info_current_to_4_1_23(void *, fr_info_4_1_23_t *); +static void fr_info_current_to_4_1_24(void *, fr_info_4_1_24_t *); +static void nat_save_current_to_4_1_3(void *, nat_save_4_1_3_t *); +static void nat_save_current_to_4_1_14(void *, nat_save_4_1_14_t *); +static void nat_save_current_to_4_1_16(void *, nat_save_4_1_16_t *); +static void ipstate_save_current_to_4_1_0(void *, ipstate_save_4_1_0_t *); +static void ipstate_save_current_to_4_1_16(void *, ipstate_save_4_1_16_t *); +static void ips_stat_current_to_4_1_0(void *, ips_stat_4_1_0_t *); +static void ips_stat_current_to_4_1_21(void *, ips_stat_4_1_21_t *); +static void natstat_current_to_4_1_0(void *, natstat_4_1_0_t *); +static void natstat_current_to_4_1_16(void *, natstat_4_1_16_t *); +static void natstat_current_to_4_1_27(void *, natstat_4_1_27_t *); +static void natstat_current_to_4_1_32(void *, natstat_4_1_32_t *); +static void nat_current_to_4_1_3(void *, nat_4_1_3_t *); +static void nat_current_to_4_1_14(void *, nat_4_1_14_t *); +static void nat_current_to_4_1_25(void *, nat_4_1_25_t *); + +static void friostat_4_1_0_to_current(friostat_4_1_0_t *, void *); +static void friostat_4_1_33_to_current(friostat_4_1_33_t *, void *); +static void ipnat_4_1_0_to_current(ipnat_4_1_0_t *, void *, int); +static void ipnat_4_1_14_to_current(ipnat_4_1_14_t *, void *, int); +static void frauth_4_1_11_to_current(frauth_4_1_11_t *, void *); +static void frauth_4_1_23_to_current(frauth_4_1_23_t *, void *); +static void frauth_4_1_24_to_current(frauth_4_1_24_t *, void *); +static void frauth_4_1_29_to_current(frauth_4_1_29_t *, void *); +static void frauth_4_1_32_to_current(frauth_4_1_32_t *, void *); +static void frentry_4_1_0_to_current(ipf_main_softc_t *, frentry_4_1_0_t *, void *, int); +static void frentry_4_1_16_to_current(ipf_main_softc_t *, frentry_4_1_16_t *, void *, int); +static void frentry_4_1_34_to_current(ipf_main_softc_t *, frentry_4_1_34_t *, void *, int); +static void fr_info_4_1_11_to_current(fr_info_4_1_11_t *, void *); +static void fr_info_4_1_23_to_current(fr_info_4_1_23_t *, void *); +static void fr_info_4_1_24_to_current(fr_info_4_1_24_t *, void *); +static void fr_info_4_1_32_to_current(fr_info_4_1_32_t *, void *); +static void nat_save_4_1_3_to_current(ipf_main_softc_t *, nat_save_4_1_3_t *, void *); +static void nat_save_4_1_14_to_current(ipf_main_softc_t *, nat_save_4_1_14_t *, void *); +static void nat_save_4_1_16_to_current(ipf_main_softc_t *, nat_save_4_1_16_t *, void *); /* ------------------------------------------------------------------------ */ /* In this section is a series of short routines that deal with translating */ diff --git a/contrib/ipfilter/ip_msnrpc_pxy.c b/contrib/ipfilter/ip_msnrpc_pxy.c index 40bc084cbb5d..9cddd398edde 100644 --- a/contrib/ipfilter/ip_msnrpc_pxy.c +++ b/contrib/ipfilter/ip_msnrpc_pxy.c @@ -33,12 +33,12 @@ typedef struct msnrpchdr { u_char mrh_ans; } msnrpchdr_t; -int ippr_msnrpc_init __P((void)); -void ippr_msnrpc_fini __P((void)); -int ippr_msnrpc_new __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_out __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_in __P((fr_info_t *, ap_session_t *, nat_t *)); -int ippr_msnrpc_check __P((ip_t *, msnrpchdr_t *)); +int ippr_msnrpc_init(void); +void ippr_msnrpc_fini(void); +int ippr_msnrpc_new(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_out(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_in(fr_info_t *, ap_session_t *, nat_t *); +int ippr_msnrpc_check(ip_t *, msnrpchdr_t *); static frentry_t msnfr; diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h index 834ba83f51f0..c7f7308a9ba9 100644 --- a/contrib/ipfilter/ipf.h +++ b/contrib/ipfilter/ipf.h @@ -175,12 +175,12 @@ typedef struct proxyrule { #if defined(__NetBSD__) || defined(__FreeBSD_version) || \ SOLARIS # include -typedef int (* ioctlfunc_t) __P((int, ioctlcmd_t, ...)); +typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); #else -typedef int (* ioctlfunc_t) __P((dev_t, ioctlcmd_t, void *)); +typedef int (* ioctlfunc_t)(dev_t, ioctlcmd_t, void *); #endif -typedef int (* addfunc_t) __P((int, ioctlfunc_t, void *)); -typedef int (* copyfunc_t) __P((void *, void *, size_t)); +typedef int (* addfunc_t)(int, ioctlfunc_t, void *); +typedef int (* copyfunc_t)(void *, void *, size_t); extern char thishost[MAXHOSTNAMELEN]; @@ -200,178 +200,178 @@ extern wordtab_t natfields[]; extern wordtab_t poolfields[]; -extern int addicmp __P((char ***, struct frentry *, int)); -extern int addipopt __P((char *, struct ipopt_names *, int, char *)); -extern int addkeep __P((char ***, struct frentry *, int)); -extern alist_t *alist_new __P((int, char *)); -extern void alist_free __P((alist_t *)); -extern void assigndefined __P((char *)); -extern void binprint __P((void *, size_t)); -extern u_32_t buildopts __P((char *, char *, int)); -extern int checkrev __P((char *)); -extern int connecttcp __P((char *, int)); -extern int count6bits __P((u_32_t *)); -extern int count4bits __P((u_32_t)); -extern char *fac_toname __P((int)); -extern int fac_findname __P((char *)); -extern const char *familyname __P((const int)); -extern void fill6bits __P((int, u_int *)); -extern wordtab_t *findword __P((wordtab_t *, char *)); -extern int ftov __P((int)); -extern char *ipf_geterror __P((int, ioctlfunc_t *)); -extern int genmask __P((int, char *, i6addr_t *)); -extern int gethost __P((int, char *, i6addr_t *)); -extern int geticmptype __P((int, char *)); -extern int getport __P((struct frentry *, char *, u_short *, char *)); -extern int getportproto __P((char *, int)); -extern int getproto __P((char *)); -extern char *getnattype __P((struct nat *)); -extern char *getsumd __P((u_32_t)); -extern u_32_t getoptbyname __P((char *)); -extern u_32_t getoptbyvalue __P((int)); -extern u_32_t getv6optbyname __P((char *)); -extern u_32_t getv6optbyvalue __P((int)); -extern char *icmptypename __P((int, int)); -extern void initparse __P((void)); -extern void ipf_dotuning __P((int, char *, ioctlfunc_t)); -extern int ipf_addrule __P((int, ioctlfunc_t, void *)); -extern void ipf_mutex_clean __P((void)); -extern int ipf_parsefile __P((int, addfunc_t, ioctlfunc_t *, char *)); -extern int ipf_parsesome __P((int, addfunc_t, ioctlfunc_t *, FILE *)); -extern void ipf_perror __P((int, char *)); -extern int ipf_perror_fd __P(( int, ioctlfunc_t, char *)); -extern void ipf_rwlock_clean __P((void)); -extern char *ipf_strerror __P((int)); -extern void ipferror __P((int, char *)); -extern int ipmon_parsefile __P((char *)); -extern int ipmon_parsesome __P((FILE *)); -extern int ipnat_addrule __P((int, ioctlfunc_t, void *)); -extern int ipnat_parsefile __P((int, addfunc_t, ioctlfunc_t, char *)); -extern int ipnat_parsesome __P((int, addfunc_t, ioctlfunc_t, FILE *)); -extern int ippool_parsefile __P((int, char *, ioctlfunc_t)); -extern int ippool_parsesome __P((int, FILE *, ioctlfunc_t)); -extern int kmemcpywrap __P((void *, void *, size_t)); -extern char *kvatoname __P((ipfunc_t, ioctlfunc_t)); -extern int load_dstlist __P((struct ippool_dst *, ioctlfunc_t, - ipf_dstnode_t *)); -extern int load_dstlistnode __P((int, char *, struct ipf_dstnode *, - ioctlfunc_t)); -extern alist_t *load_file __P((char *)); -extern int load_hash __P((struct iphtable_s *, struct iphtent_s *, - ioctlfunc_t)); -extern int load_hashnode __P((int, char *, struct iphtent_s *, int, - ioctlfunc_t)); -extern alist_t *load_http __P((char *)); -extern int load_pool __P((struct ip_pool_s *list, ioctlfunc_t)); -extern int load_poolnode __P((int, char *, ip_pool_node_t *, int, ioctlfunc_t)); -extern alist_t *load_url __P((char *)); -extern alist_t *make_range __P((int, struct in_addr, struct in_addr)); -extern void mb_hexdump __P((mb_t *, FILE *)); -extern ipfunc_t nametokva __P((char *, ioctlfunc_t)); -extern void nat_setgroupmap __P((struct ipnat *)); -extern int ntomask __P((int, int, u_32_t *)); -extern u_32_t optname __P((char ***, u_short *, int)); -extern wordtab_t *parsefields __P((wordtab_t *, char *)); -extern int *parseipfexpr __P((char *, char **)); -extern int parsewhoisline __P((char *, addrfamily_t *, addrfamily_t *)); -extern void pool_close __P((void)); -extern int pool_fd __P((void)); -extern int pool_ioctl __P((ioctlfunc_t, ioctlcmd_t, void *)); -extern int pool_open __P((void)); -extern char *portname __P((int, int)); -extern int pri_findname __P((char *)); -extern char *pri_toname __P((int)); -extern void print_toif __P((int, char *, char *, struct frdest *)); -extern void printaps __P((ap_session_t *, int, int)); -extern void printaddr __P((int, int, char *, int, u_32_t *, u_32_t *)); -extern void printbuf __P((char *, int, int)); -extern void printfieldhdr __P((wordtab_t *, wordtab_t *)); -extern void printfr __P((struct frentry *, ioctlfunc_t)); -extern struct iphtable_s *printhash __P((struct iphtable_s *, copyfunc_t, - char *, int, wordtab_t *)); -extern struct iphtable_s *printhash_live __P((iphtable_t *, int, char *, - int, wordtab_t *)); -extern ippool_dst_t *printdstl_live __P((ippool_dst_t *, int, char *, - int, wordtab_t *)); -extern void printhashdata __P((iphtable_t *, int)); -extern struct iphtent_s *printhashnode __P((struct iphtable_s *, +extern int addicmp(char ***, struct frentry *, int); +extern int addipopt(char *, struct ipopt_names *, int, char *); +extern int addkeep(char ***, struct frentry *, int); +extern alist_t *alist_new(int, char *); +extern void alist_free(alist_t *); +extern void assigndefined(char *); +extern void binprint(void *, size_t); +extern u_32_t buildopts(char *, char *, int); +extern int checkrev(char *); +extern int connecttcp(char *, int); +extern int count6bits(u_32_t *); +extern int count4bits(u_32_t); +extern char *fac_toname(int); +extern int fac_findname(char *); +extern const char *familyname(const int); +extern void fill6bits(int, u_int *); +extern wordtab_t *findword(wordtab_t *, char *); +extern int ftov(int); +extern char *ipf_geterror(int, ioctlfunc_t *); +extern int genmask(int, char *, i6addr_t *); +extern int gethost(int, char *, i6addr_t *); +extern int geticmptype(int, char *); +extern int getport(struct frentry *, char *, u_short *, char *); +extern int getportproto(char *, int); +extern int getproto(char *); +extern char *getnattype(struct nat *); +extern char *getsumd(u_32_t); +extern u_32_t getoptbyname(char *); +extern u_32_t getoptbyvalue(int); +extern u_32_t getv6optbyname(char *); +extern u_32_t getv6optbyvalue(int); +extern char *icmptypename(int, int); +extern void initparse(void); +extern void ipf_dotuning(int, char *, ioctlfunc_t); +extern int ipf_addrule(int, ioctlfunc_t, void *); +extern void ipf_mutex_clean(void); +extern int ipf_parsefile(int, addfunc_t, ioctlfunc_t *, char *); +extern int ipf_parsesome(int, addfunc_t, ioctlfunc_t *, FILE *); +extern void ipf_perror(int, char *); +extern int ipf_perror_fd( int, ioctlfunc_t, char *); +extern void ipf_rwlock_clean(void); +extern char *ipf_strerror(int); +extern void ipferror(int, char *); +extern int ipmon_parsefile(char *); +extern int ipmon_parsesome(FILE *); +extern int ipnat_addrule(int, ioctlfunc_t, void *); +extern int ipnat_parsefile(int, addfunc_t, ioctlfunc_t, char *); +extern int ipnat_parsesome(int, addfunc_t, ioctlfunc_t, FILE *); +extern int ippool_parsefile(int, char *, ioctlfunc_t); +extern int ippool_parsesome(int, FILE *, ioctlfunc_t); +extern int kmemcpywrap(void *, void *, size_t); +extern char *kvatoname(ipfunc_t, ioctlfunc_t); +extern int load_dstlist(struct ippool_dst *, ioctlfunc_t, + ipf_dstnode_t *); +extern int load_dstlistnode(int, char *, struct ipf_dstnode *, + ioctlfunc_t); +extern alist_t *load_file(char *); +extern int load_hash(struct iphtable_s *, struct iphtent_s *, + ioctlfunc_t); +extern int load_hashnode(int, char *, struct iphtent_s *, int, + ioctlfunc_t); +extern alist_t *load_http(char *); +extern int load_pool(struct ip_pool_s *list, ioctlfunc_t); +extern int load_poolnode(int, char *, ip_pool_node_t *, int, ioctlfunc_t); +extern alist_t *load_url(char *); +extern alist_t *make_range(int, struct in_addr, struct in_addr); +extern void mb_hexdump(mb_t *, FILE *); +extern ipfunc_t nametokva(char *, ioctlfunc_t); +extern void nat_setgroupmap(struct ipnat *); +extern int ntomask(int, int, u_32_t *); +extern u_32_t optname(char ***, u_short *, int); +extern wordtab_t *parsefields(wordtab_t *, char *); +extern int *parseipfexpr(char *, char **); +extern int parsewhoisline(char *, addrfamily_t *, addrfamily_t *); +extern void pool_close(void); +extern int pool_fd(void); +extern int pool_ioctl(ioctlfunc_t, ioctlcmd_t, void *); +extern int pool_open(void); +extern char *portname(int, int); +extern int pri_findname(char *); +extern char *pri_toname(int); +extern void print_toif(int, char *, char *, struct frdest *); +extern void printaps(ap_session_t *, int, int); +extern void printaddr(int, int, char *, int, u_32_t *, u_32_t *); +extern void printbuf(char *, int, int); +extern void printfieldhdr(wordtab_t *, wordtab_t *); +extern void printfr(struct frentry *, ioctlfunc_t); +extern struct iphtable_s *printhash(struct iphtable_s *, copyfunc_t, + char *, int, wordtab_t *); +extern struct iphtable_s *printhash_live(iphtable_t *, int, char *, + int, wordtab_t *); +extern ippool_dst_t *printdstl_live(ippool_dst_t *, int, char *, + int, wordtab_t *); +extern void printhashdata(iphtable_t *, int); +extern struct iphtent_s *printhashnode(struct iphtable_s *, struct iphtent_s *, - copyfunc_t, int, wordtab_t *)); -extern void printhost __P((int, u_32_t *)); -extern void printhostmask __P((int, u_32_t *, u_32_t *)); -extern void printip __P((int, u_32_t *)); -extern void printlog __P((struct frentry *)); -extern void printlookup __P((char *, i6addr_t *addr, i6addr_t *mask)); -extern void printmask __P((int, u_32_t *)); -extern void printnataddr __P((int, char *, nat_addr_t *, int)); -extern void printnatfield __P((nat_t *, int)); -extern void printnatside __P((char *, nat_stat_side_t *)); -extern void printpacket __P((int, mb_t *)); -extern void printpacket6 __P((int, mb_t *)); -extern struct ippool_dst *printdstlist __P((struct ippool_dst *, copyfunc_t, + copyfunc_t, int, wordtab_t *); +extern void printhost(int, u_32_t *); +extern void printhostmask(int, u_32_t *, u_32_t *); +extern void printip(int, u_32_t *); +extern void printlog(struct frentry *); +extern void printlookup(char *, i6addr_t *addr, i6addr_t *mask); +extern void printmask(int, u_32_t *); +extern void printnataddr(int, char *, nat_addr_t *, int); +extern void printnatfield(nat_t *, int); +extern void printnatside(char *, nat_stat_side_t *); +extern void printpacket(int, mb_t *); +extern void printpacket6(int, mb_t *); +extern struct ippool_dst *printdstlist(struct ippool_dst *, copyfunc_t, char *, int, ipf_dstnode_t *, - wordtab_t *)); -extern void printdstlistdata __P((ippool_dst_t *, int)); -extern ipf_dstnode_t *printdstlistnode __P((ipf_dstnode_t *, copyfunc_t, - int, wordtab_t *)); -extern void printdstlistpolicy __P((ippool_policy_t)); -extern struct ip_pool_s *printpool __P((struct ip_pool_s *, copyfunc_t, - char *, int, wordtab_t *)); -extern struct ip_pool_s *printpool_live __P((struct ip_pool_s *, int, - char *, int, wordtab_t *)); -extern void printpooldata __P((ip_pool_t *, int)); -extern void printpoolfield __P((void *, int, int)); -extern struct ip_pool_node *printpoolnode __P((struct ip_pool_node *, - int, wordtab_t *)); -extern void printproto __P((struct protoent *, int, struct ipnat *)); -extern void printportcmp __P((int, struct frpcmp *)); -extern void printstatefield __P((ipstate_t *, int)); -extern void printtqtable __P((ipftq_t *)); -extern void printtunable __P((ipftune_t *)); -extern void printunit __P((int)); -extern void optprint __P((u_short *, u_long, u_long)); + wordtab_t *); +extern void printdstlistdata(ippool_dst_t *, int); +extern ipf_dstnode_t *printdstlistnode(ipf_dstnode_t *, copyfunc_t, + int, wordtab_t *); +extern void printdstlistpolicy(ippool_policy_t); +extern struct ip_pool_s *printpool(struct ip_pool_s *, copyfunc_t, + char *, int, wordtab_t *); +extern struct ip_pool_s *printpool_live(struct ip_pool_s *, int, + char *, int, wordtab_t *); +extern void printpooldata(ip_pool_t *, int); +extern void printpoolfield(void *, int, int); +extern struct ip_pool_node *printpoolnode(struct ip_pool_node *, + int, wordtab_t *); +extern void printproto(struct protoent *, int, struct ipnat *); +extern void printportcmp(int, struct frpcmp *); +extern void printstatefield(ipstate_t *, int); +extern void printtqtable(ipftq_t *); +extern void printtunable(ipftune_t *); +extern void printunit(int); +extern void optprint(u_short *, u_long, u_long); #ifdef USE_INET6 -extern void optprintv6 __P((u_short *, u_long, u_long)); +extern void optprintv6(u_short *, u_long, u_long); #endif -extern int remove_hash __P((struct iphtable_s *, ioctlfunc_t)); -extern int remove_hashnode __P((int, char *, struct iphtent_s *, ioctlfunc_t)); -extern int remove_pool __P((ip_pool_t *, ioctlfunc_t)); -extern int remove_poolnode __P((int, char *, ip_pool_node_t *, ioctlfunc_t)); -extern u_char tcpflags __P((char *)); -extern void printc __P((struct frentry *)); -extern void printC __P((int)); -extern void emit __P((int, int, void *, struct frentry *)); -extern u_char secbit __P((int)); -extern u_char seclevel __P((char *)); -extern void printfraginfo __P((char *, struct ipfr *)); -extern void printifname __P((char *, char *, void *)); -extern char *hostname __P((int, void *)); -extern struct ipstate *printstate __P((struct ipstate *, int, u_long)); -extern void printsbuf __P((char *)); -extern void printnat __P((struct ipnat *, int)); -extern void printactiveaddress __P((int, char *, i6addr_t *, char *)); -extern void printactivenat __P((struct nat *, int, u_long)); -extern void printhostmap __P((struct hostmap *, u_int)); -extern void printtcpflags __P((u_32_t, u_32_t)); -extern void printipfexpr __P((int *)); -extern void printstatefield __P((ipstate_t *, int)); -extern void printstatefieldhdr __P((int)); -extern int sendtrap_v1_0 __P((int, char *, char *, int, time_t)); -extern int sendtrap_v2_0 __P((int, char *, char *, int)); -extern int vtof __P((int)); - -extern void set_variable __P((char *, char *)); -extern char *get_variable __P((char *, char **, int)); -extern void resetlexer __P((void)); - -extern void debug __P((int, char *, ...)); -extern void verbose __P((int, char *, ...)); -extern void ipfkdebug __P((char *, ...)); -extern void ipfkverbose __P((char *, ...)); +extern int remove_hash(struct iphtable_s *, ioctlfunc_t); +extern int remove_hashnode(int, char *, struct iphtent_s *, ioctlfunc_t); +extern int remove_pool(ip_pool_t *, ioctlfunc_t); +extern int remove_poolnode(int, char *, ip_pool_node_t *, ioctlfunc_t); +extern u_char tcpflags(char *); +extern void printc(struct frentry *); +extern void printC(int); +extern void emit(int, int, void *, struct frentry *); +extern u_char secbit(int); +extern u_char seclevel(char *); +extern void printfraginfo(char *, struct ipfr *); +extern void printifname(char *, char *, void *); +extern char *hostname(int, void *); +extern struct ipstate *printstate(struct ipstate *, int, u_long); +extern void printsbuf(char *); +extern void printnat(struct ipnat *, int); +extern void printactiveaddress(int, char *, i6addr_t *, char *); +extern void printactivenat(struct nat *, int, u_long); +extern void printhostmap(struct hostmap *, u_int); +extern void printtcpflags(u_32_t, u_32_t); +extern void printipfexpr(int *); +extern void printstatefield(ipstate_t *, int); +extern void printstatefieldhdr(int); +extern int sendtrap_v1_0(int, char *, char *, int, time_t); +extern int sendtrap_v2_0(int, char *, char *, int); +extern int vtof(int); + +extern void set_variable(char *, char *); +extern char *get_variable(char *, char **, int); +extern void resetlexer(void); + +extern void debug(int, char *, ...); +extern void verbose(int, char *, ...); +extern void ipfkdebug(char *, ...); +extern void ipfkverbose(char *, ...); #if SOLARIS -extern int gethostname __P((char *, int )); -extern void sync __P((void)); +extern int gethostname(char *, int ); +extern void sync(void); #endif #endif /* __IPF_H__ */ diff --git a/contrib/ipfilter/iplang/iplang.h b/contrib/ipfilter/iplang/iplang.h index 63cc078322a3..f38ef9671701 100644 --- a/contrib/ipfilter/iplang/iplang.h +++ b/contrib/ipfilter/iplang/iplang.h @@ -50,5 +50,5 @@ typedef struct aniphdr { #define ah_udp ah_un.ahu_udp #define ah_icmp ah_un.ahu_icmp -extern int get_arpipv4 __P((char *, char *)); +extern int get_arpipv4(char *, char *); diff --git a/contrib/ipfilter/iplang/iplang_l.l b/contrib/ipfilter/iplang/iplang_l.l index e66867e2a455..f8b1b82d4707 100644 --- a/contrib/ipfilter/iplang/iplang_l.l +++ b/contrib/ipfilter/iplang/iplang_l.l @@ -29,14 +29,14 @@ extern int opts; int lineNum = 0, ipproto = 0, oldipproto = 0, next = -1, laststate = 0; int *prstack = NULL, numpr = 0, state = 0, token = 0; -void yyerror __P((char *)); -void push_proto __P((void)); -void pop_proto __P((void)); -int next_state __P((int, int)); -int next_item __P((int)); -int save_token __P((void)); -void swallow __P((void)); -int yylex __P((void)); +void yyerror(char *); +void push_proto(void); +void pop_proto(void); +int next_state(int, int); +int next_item(int); +int save_token(void); +void swallow(void); +int yylex(void); struct lwordtab { char *word; diff --git a/contrib/ipfilter/iplang/iplang_y.y b/contrib/ipfilter/iplang/iplang_y.y index b4570d390530..f3335636cee1 100644 --- a/contrib/ipfilter/iplang/iplang_y.y +++ b/contrib/ipfilter/iplang/iplang_y.y @@ -59,8 +59,8 @@ arp_t *arplist = NULL, **arptail = &arplist, *carp = NULL; struct in_addr defrouter; send_t sending; char *sclass = NULL; -u_short c_chksum __P((u_short *, u_int, u_long)); -u_long p_chksum __P((u_short *, u_int)); +u_short c_chksum(u_short *, u_int, u_long); +u_long p_chksum(u_short *, u_int); u_long ipbuffer[67584/sizeof(u_long)]; /* 66K */ aniphdr_t *aniphead = NULL, *canip = NULL, **aniptail = &aniphead; @@ -74,85 +74,85 @@ struct statetoopt { int sto_op; }; -struct in_addr getipv4addr __P((char *arg)); -u_short getportnum __P((char *, char *)); -struct ether_addr *geteaddr __P((char *, struct ether_addr *)); -void *new_header __P((int)); -void free_aniplist __P((void)); -void inc_anipheaders __P((int)); -void new_data __P((void)); -void set_datalen __P((char **)); -void set_datafile __P((char **)); -void set_data __P((char **)); -void new_packet __P((void)); -void set_ipv4proto __P((char **)); -void set_ipv4src __P((char **)); -void set_ipv4dst __P((char **)); -void set_ipv4off __P((char **)); -void set_ipv4v __P((char **)); -void set_ipv4hl __P((char **)); -void set_ipv4ttl __P((char **)); -void set_ipv4tos __P((char **)); -void set_ipv4id __P((char **)); -void set_ipv4sum __P((char **)); -void set_ipv4len __P((char **)); -void new_tcpheader __P((void)); -void set_tcpsport __P((char **)); -void set_tcpdport __P((char **)); -void set_tcpseq __P((char **)); -void set_tcpack __P((char **)); -void set_tcpoff __P((char **)); -void set_tcpurp __P((char **)); -void set_tcpwin __P((char **)); -void set_tcpsum __P((char **)); -void set_tcpflags __P((char **)); -void set_tcpopt __P((int, char **)); -void end_tcpopt __P((void)); -void new_udpheader __P((void)); -void set_udplen __P((char **)); -void set_udpsum __P((char **)); -void prep_packet __P((void)); -void packet_done __P((void)); -void new_interface __P((void)); -void check_interface __P((void)); -void set_ifname __P((char **)); -void set_ifmtu __P((int)); -void set_ifv4addr __P((char **)); -void set_ifeaddr __P((char **)); -void new_arp __P((void)); -void set_arpeaddr __P((char **)); -void set_arpv4addr __P((char **)); -void reset_send __P((void)); -void set_sendif __P((char **)); -void set_sendvia __P((char **)); -void set_defaultrouter __P((char **)); -void new_icmpheader __P((void)); -void set_icmpcode __P((int)); -void set_icmptype __P((int)); -void set_icmpcodetok __P((char **)); -void set_icmptypetok __P((char **)); -void set_icmpid __P((int)); -void set_icmpseq __P((int)); -void set_icmpotime __P((int)); -void set_icmprtime __P((int)); -void set_icmpttime __P((int)); -void set_icmpmtu __P((int)); -void set_redir __P((int, char **)); -void new_ipv4opt __P((void)); -void set_icmppprob __P((int)); -void add_ipopt __P((int, void *)); -void end_ipopt __P((void)); -void set_secclass __P((char **)); -void free_anipheader __P((void)); -void end_ipv4 __P((void)); -void end_icmp __P((void)); -void end_udp __P((void)); -void end_tcp __P((void)); -void end_data __P((void)); -void yyerror __P((char *)); -void iplang __P((FILE *)); -int arp_getipv4 __P((char *, char *)); -int yyparse __P((void)); +struct in_addr getipv4addr(char *arg); +u_short getportnum(char *, char *); +struct ether_addr *geteaddr(char *, struct ether_addr *); +void *new_header(int); +void free_aniplist(void); +void inc_anipheaders(int); +void new_data(void); +void set_datalen(char **); +void set_datafile(char **); +void set_data(char **); +void new_packet(void); +void set_ipv4proto(char **); +void set_ipv4src(char **); +void set_ipv4dst(char **); +void set_ipv4off(char **); +void set_ipv4v(char **); +void set_ipv4hl(char **); +void set_ipv4ttl(char **); +void set_ipv4tos(char **); +void set_ipv4id(char **); +void set_ipv4sum(char **); +void set_ipv4len(char **); +void new_tcpheader(void); +void set_tcpsport(char **); +void set_tcpdport(char **); +void set_tcpseq(char **); +void set_tcpack(char **); +void set_tcpoff(char **); +void set_tcpurp(char **); +void set_tcpwin(char **); +void set_tcpsum(char **); +void set_tcpflags(char **); +void set_tcpopt(int, char **); +void end_tcpopt(void); +void new_udpheader(void); +void set_udplen(char **); +void set_udpsum(char **); +void prep_packet(void); +void packet_done(void); +void new_interface(void); +void check_interface(void); +void set_ifname(char **); +void set_ifmtu(int); +void set_ifv4addr(char **); +void set_ifeaddr(char **); +void new_arp(void); +void set_arpeaddr(char **); +void set_arpv4addr(char **); +void reset_send(void); +void set_sendif(char **); +void set_sendvia(char **); +void set_defaultrouter(char **); +void new_icmpheader(void); +void set_icmpcode(int); +void set_icmptype(int); +void set_icmpcodetok(char **); +void set_icmptypetok(char **); +void set_icmpid(int); +void set_icmpseq(int); +void set_icmpotime(int); +void set_icmprtime(int); +void set_icmpttime(int); +void set_icmpmtu(int); +void set_redir(int, char **); +void new_ipv4opt(void); +void set_icmppprob(int); +void add_ipopt(int, void *); *** 4116 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 884F6540C4F; Tue, 16 Feb 2021 00:46:08 +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 4Dfj2S2y6Hz4Rw9; Tue, 16 Feb 2021 00:46: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 52CA72727B; Tue, 16 Feb 2021 00:46: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 11G0k8DA006054; Tue, 16 Feb 2021 00:46:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0k8VO006053; Tue, 16 Feb 2021 00:46:08 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:08 GMT Message-Id: <202102160046.11G0k8VO006053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d81409e2b9ab - stable/13 - MFC 0f34c80f376345b98a972940dd4757e58d7beb06: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d81409e2b9ab9e8cdae07f97fe1b89afe0d6cf6d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:08 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d81409e2b9ab9e8cdae07f97fe1b89afe0d6cf6d commit d81409e2b9ab9e8cdae07f97fe1b89afe0d6cf6d Author: Cy Schubert AuthorDate: 2021-01-28 05:50:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC 0f34c80f376345b98a972940dd4757e58d7beb06: Replace the redundant MENTAT macro with SOLARIS. MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. (cherry picked from commit 0f34c80f376345b98a972940dd4757e58d7beb06) --- contrib/ipfilter/ip_fil_compat.c | 50 +++++++++++++++---------------- contrib/ipfilter/tools/ipmon.c | 4 +-- sys/contrib/ipfilter/netinet/fil.c | 24 +++++++-------- sys/contrib/ipfilter/netinet/ip_auth.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_auth.h | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 10 +++---- sys/contrib/ipfilter/netinet/ip_irc_pxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_log.c | 4 +-- sys/contrib/ipfilter/netinet/ip_nat.c | 18 +++++------ sys/contrib/ipfilter/netinet/ip_nat6.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_proxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_state.c | 2 +- 13 files changed, 69 insertions(+), 71 deletions(-) diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index fbcfc8a0088f..6184502e0f58 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -333,7 +333,7 @@ typedef struct fr_info_4_1_32 { ip_t *ofin_ip; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -371,7 +371,7 @@ typedef struct fr_info_4_1_24 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -408,7 +408,7 @@ typedef struct fr_info_4_1_23 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -444,7 +444,7 @@ typedef struct fr_info_4_1_11 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -933,7 +933,7 @@ typedef struct frauth_4_1_32 { fr_info_4_1_32_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -947,7 +947,7 @@ typedef struct frauth_4_1_29 { fr_info_4_1_24_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -960,7 +960,7 @@ typedef struct frauth_4_1_24 { u_32_t fra_pass; fr_info_4_1_24_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -973,7 +973,7 @@ typedef struct frauth_4_1_23 { u_32_t fra_pass; fr_info_4_1_23_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -986,7 +986,7 @@ typedef struct frauth_4_1_11 { u_32_t fra_pass; fr_info_4_1_11_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -2533,7 +2533,7 @@ frauth_4_1_32_to_current(old, current) fr_info_4_1_32_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2554,7 +2554,7 @@ frauth_4_1_29_to_current(old, current) fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2574,7 +2574,7 @@ frauth_4_1_24_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2594,7 +2594,7 @@ frauth_4_1_23_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_23_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2614,7 +2614,7 @@ frauth_4_1_11_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_11_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2652,7 +2652,7 @@ fr_info_4_1_32_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2690,7 +2690,7 @@ fr_info_4_1_24_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2727,7 +2727,7 @@ fr_info_4_1_23_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2764,7 +2764,7 @@ fr_info_4_1_11_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -4039,7 +4039,7 @@ fr_info_current_to_4_1_24(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4079,7 +4079,7 @@ fr_info_current_to_4_1_23(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4119,7 +4119,7 @@ fr_info_current_to_4_1_11(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4141,7 +4141,7 @@ frauth_current_to_4_1_29(current, old) fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; old->fra_flx = fra->fra_flx; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4161,7 +4161,7 @@ frauth_current_to_4_1_24(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4181,7 +4181,7 @@ frauth_current_to_4_1_23(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_23(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4201,7 +4201,7 @@ frauth_current_to_4_1_11(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_11(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index 005cd316f91a..f14cef832722 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -108,7 +108,7 @@ char *reasons[] = { "natv6_in-fail", }; -#ifdef MENTAT +#if SOLARIS static char *pidfile = "/etc/opt/ipf/ipmon.pid"; #else static char *pidfile = "/var/run/ipmon.pid"; @@ -1108,7 +1108,7 @@ static void print_ipflog(conf, buf, blen) ifname[sizeof(ipf->fl_ifname)] = '\0'; sprintf(t, "%s", ifname); t += strlen(t); -# if defined(MENTAT) +# if SOLARIS if (ISALPHA(*(t - 1))) { sprintf(t, "%d", ipf->fl_unit); t += strlen(t); diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index a79d441284bf..2dca1e754b9e 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -2805,7 +2805,7 @@ ipf_firewall(fin, passp) /* ------------------------------------------------------------------------ */ int ipf_check(ctx, ip, hlen, ifp, out -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS , qif, mp) void *qif; #else @@ -2837,7 +2837,7 @@ ipf_check(ctx, ip, hlen, ifp, out * to hold all the required packet headers. */ #ifdef _KERNEL -# ifdef MENTAT +# if SOLARIS qpktinfo_t *qpi = qif; # ifdef __sparc @@ -2854,7 +2854,7 @@ ipf_check(ctx, ip, hlen, ifp, out bzero((char *)fin, sizeof(*fin)); -# ifdef MENTAT +# if SOLARIS if (qpi->qpi_flags & QF_BROADCAST) fin->fin_flx |= FI_MBCAST|FI_BROADCAST; if (qpi->qpi_flags & QF_MULTICAST) @@ -2862,7 +2862,7 @@ ipf_check(ctx, ip, hlen, ifp, out m = qpi->qpi_m; fin->fin_qfm = m; fin->fin_qpi = qpi; -# else /* MENTAT */ +# else /* SOLARIS */ m = *mp; @@ -2895,7 +2895,7 @@ ipf_check(ctx, ip, hlen, ifp, out m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } # endif /* CSUM_DELAY_DATA */ -# endif /* MENTAT */ +# endif /* SOLARIS */ #else bzero((char *)fin, sizeof(*fin)); m = *mp; @@ -6156,7 +6156,7 @@ ipf_getifname(ifp, buffer) char *buffer; { static char namebuf[LIFNAMSIZ]; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) int unit, space; char temp[20]; char *s; @@ -6166,7 +6166,7 @@ ipf_getifname(ifp, buffer) buffer = namebuf; (void) strncpy(buffer, ifp->if_name, LIFNAMSIZ); buffer[LIFNAMSIZ - 1] = '\0'; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) for (s = buffer; *s; s++) ; unit = ifp->if_unit; @@ -6916,7 +6916,7 @@ ipf_coalesce(fin) DT1(frb_coalesce, fr_info_t *, fin); LBUMP(ipf_stats[fin->fin_out].fr_badcoalesces); -# ifdef MENTAT +# if SOLARIS FREE_MB_T(*fin->fin_mp); # endif fin->fin_reason = FRB_COALESCE; @@ -8397,7 +8397,7 @@ ipf_ipf_ioctl(softc, data, cmd, mode, uid, ctx) error = EPERM; } else { WRITE_ENTER(&softc->ipf_global); -#if (defined(MENTAT) && defined(_KERNEL)) && !defined(INSTANCES) +#if (SOLARIS && defined(_KERNEL)) && !defined(INSTANCES) error = ipfsync(); #else ipf_sync(softc, NULL); @@ -8570,7 +8570,7 @@ ipf_decaps(fin, pass, l5proto) fino = fin; fin = &fin2; elen = hlen; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += elen; #else m->m_data += elen; @@ -8609,7 +8609,7 @@ ipf_decaps(fin, pass, l5proto) if (ipf_makefrip(hlen, ip, fin) == -1) { cantdecaps2: if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; @@ -8642,7 +8642,7 @@ cantdecaps: fino->fin_m = fin->fin_m; m = fin->fin_m; if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 4864a8128494..c40bb1b435f2 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -94,7 +94,7 @@ #include #include "netinet/ip_fil.h" #include "netinet/ip_auth.h" -#if !defined(MENTAT) +#if !SOLARIS # include # ifdef __FreeBSD__ # include @@ -466,7 +466,7 @@ ipf_auth_new(m, fin) { ipf_main_softc_t *softc = fin->fin_main_soft; ipf_auth_softc_t *softa = softc->ipf_auth_soft; -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS qpktinfo_t *qpi = fin->fin_qpi; #endif frauth_t *fra; @@ -508,7 +508,7 @@ ipf_auth_new(m, fin) * them. */ ip = fin->fin_ip; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) if ((ip == (ip_t *)m->b_rptr) && (fin->fin_v == 4)) # endif { diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h index e914dacacdf0..17df74c31de6 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.h +++ b/sys/contrib/ipfilter/netinet/ip_auth.h @@ -22,7 +22,7 @@ typedef struct frauth { fr_info_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 756731480836..490e939f7f37 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -448,7 +448,7 @@ typedef struct ip6_hdr ip6_t; #endif #if defined(_KERNEL) -# if defined(MENTAT) && !defined(INSTANCES) +# if SOLARIS && !defined(INSTANCES) # define COPYDATA mb_copydata # define COPYBACK mb_copyback # else diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 0b5fc7285f93..72def439b3e8 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -402,7 +402,7 @@ typedef struct fr_info { } fin_ipu; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -1626,8 +1626,7 @@ extern void ipfilterattach(int); # endif extern int ipl_enable(void); extern int ipl_disable(void); -# ifdef MENTAT -/* XXX MENTAT is always defined for Solaris */ +# if SOLARIS extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **); # if SOLARIS @@ -1635,8 +1634,7 @@ extern void ipf_prependmbt(fr_info_t *, mblk_t *); extern int ipfioctl(dev_t, int, intptr_t, int, cred_t *, int *); # endif extern int ipf_qout(queue_t *, mblk_t *); -# else /* MENTAT */ -/* XXX MENTAT is never defined for FreeBSD & NetBSD */ +# else /* SOLARIS */ extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); @@ -1648,7 +1646,7 @@ extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif -# endif /* MENTAT */ +# endif /* SOLARIS */ # if defined(__FreeBSD_version) extern int ipf_pfil_hook(void); diff --git a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c index 304fe0c35351..4446b2100645 100644 --- a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c @@ -267,7 +267,7 @@ ipf_p_irc_send(fin, nat) u_int a1; ip_t *ip; mb_t *m; -#ifdef MENTAT +#if SOLARIS mb_t *m1; #endif softc = fin->fin_main_soft; @@ -322,7 +322,7 @@ ipf_p_irc_send(fin, nat) if ((inc + fin->fin_plen) > 65535) return 0; -#ifdef MENTAT +#if SOLARIS for (m1 = m; m1->b_cont; m1 = m1->b_cont) ; if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) { @@ -357,7 +357,7 @@ ipf_p_irc_send(fin, nat) fin->fin_flx |= FI_DOCKSUM; if (inc != 0) { -#if defined(MENTAT) +#if SOLARIS register u_32_t sum1, sum2; sum1 = fin->fin_plen; diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index 76d2e3def1fa..e5bf6a78bf1b 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -488,7 +488,7 @@ ipf_log_pkt(fin, flags) ptrs[0] = (void *)&ipfl; sizes[0] = sizeof(ipfl); types[0] = 0; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) /* * Are we copied from the mblk or an aligned array ? */ @@ -505,7 +505,7 @@ ipf_log_pkt(fin, flags) ptrs[1] = m; sizes[1] = hlen + mlen; types[1] = 1; -# endif /* MENTAT */ +# endif /* SOLARIS */ return ipf_log_items(softc, IPL_LOGIPF, fin, ptrs, sizes, types, 2); } diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index bc0883ac7382..17c1133e145d 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -3661,7 +3661,7 @@ ipf_nat_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -5116,7 +5116,7 @@ ipf_nat_out(fin, nat, natadd, nflags) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0); } -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) else { /* @@ -5179,7 +5179,7 @@ ipf_nat_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -5228,7 +5228,7 @@ ipf_nat_out(fin, nat, natadd, nflags) uh = (udphdr_t *)(ip + 1); uh->uh_ulen += fin->fin_plen; uh->uh_ulen = htons(uh->uh_ulen); -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif @@ -5631,7 +5631,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_ndstip; fin->fin_daddr = nat->nat_ndstaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5648,7 +5648,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_incksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5680,7 +5680,7 @@ ipf_nat_in(fin, nat, natadd, nflags) sum2 += ntohs(ip->ip_off) & IP_DF; CALC_SUMD(sum1, sum2, sumd); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif PREP_MB_T(fin, m); @@ -5706,7 +5706,7 @@ ipf_nat_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -7429,7 +7429,7 @@ ipf_nat_decap(fin, nat) CALC_SUMD(sum1, sum2, sumd); fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, sumd, 0); #endif } diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 388ee9a67e73..b2713aec812a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -1434,7 +1434,7 @@ ipf_nat6_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip6 + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -2858,7 +2858,7 @@ ipf_nat6_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -3321,7 +3321,7 @@ ipf_nat6_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 227ca817f6e4..2c6b4eb6369d 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -914,7 +914,7 @@ ipf_proxy_check(fin, nat) ip_t *ip; short rv; int err; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS u_32_t s1, s2, sd; #endif @@ -942,7 +942,7 @@ ipf_proxy_check(fin, nat) * If there is data in this packet to be proxied then try and * get it all into the one buffer, else drop it. */ -#if defined(MENTAT) || defined(HAVE_M_PULLDOWN) +#if SOLARIS || defined(HAVE_M_PULLDOWN) if ((fin->fin_dlen > 0) && !(fin->fin_flx & FI_COALESCE)) if (ipf_coalesce(fin) == -1) { if (softp->ips_proxy_debug & 0x08) @@ -1006,7 +1006,7 @@ ipf_proxy_check(fin, nat) * packet. */ adjlen = APR_INC(err); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS s1 = LONG_SUM(fin->fin_plen - adjlen); s2 = LONG_SUM(fin->fin_plen); CALC_SUMD(s1, s2, sd); diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 45a641fd86a2..a050a2d324d2 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2739,7 +2739,7 @@ ipf_checkicmpmatchingstate(fin) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + len > (char *)m->b_wptr) { SBUMPDX(ipf_state_stats, iss_icmp_short, iss_icmp_short_2); return NULL; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5501A5410A2; Tue, 16 Feb 2021 00:46:07 +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 4Dfj2R1yc9z4RkG; Tue, 16 Feb 2021 00:46:07 +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 36413273C2; Tue, 16 Feb 2021 00:46:07 +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 11G0k72h006032; Tue, 16 Feb 2021 00:46:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0k7me006031; Tue, 16 Feb 2021 00:46:07 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:07 GMT Message-Id: <202102160046.11G0k7me006031@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d72c88fe2784 - stable/13 - MFC 7071734fae6019d1e3e44daf7deb4478582081cc: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d72c88fe278407cacd55e6406b8a76d07c1d748f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:07 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d72c88fe278407cacd55e6406b8a76d07c1d748f commit d72c88fe278407cacd55e6406b8a76d07c1d748f Author: Cy Schubert AuthorDate: 2021-01-27 15:25:00 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC 7071734fae6019d1e3e44daf7deb4478582081cc: Indentation cleanup resulting from the cleanup of #ifdefs. The conscious decision was made not to perform any indentation or whitespace cleanup while cleaning out old redunant #ifdefs. The reason for this was to avoid confusing future readers of history and diffs with cosmetic changes, making bisection of any possible bugs introduced more difficult. This commit cleans up the whitespace detritus left behind from the previous #ifdef cleanup commits. (cherry picked from commit 7071734fae6019d1e3e44daf7deb4478582081cc) --- sys/contrib/ipfilter/netinet/fil.c | 12 +- sys/contrib/ipfilter/netinet/ip_auth.c | 18 +- sys/contrib/ipfilter/netinet/ip_compat.h | 282 +++++++++++++------------- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 94 ++++----- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 21 +- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- 7 files changed, 215 insertions(+), 216 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 7402437d98c7..a79d441284bf 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -48,7 +48,7 @@ #if !defined(__SVR4) # include #else -# include +# include # if (SOLARIS2 < 5) && defined(sun) # include # endif @@ -4117,11 +4117,11 @@ ipf_sync(softc, ifp) { int i; -# if !SOLARIS +#if !SOLARIS ipf_nat_sync(softc, ifp); ipf_state_sync(softc, ifp); ipf_lookup_sync(softc, ifp); -# endif +#endif WRITE_ENTER(&softc->ipf_mutex); (void) ipf_synclist(softc, softc->ipf_acct[0][softc->ipf_active], ifp); @@ -4168,13 +4168,13 @@ copyinptr(softc, src, dst, size) caddr_t ca; int error; -# if SOLARIS +#if SOLARIS error = COPYIN(src, &ca, sizeof(ca)); if (error != 0) return error; -# else +#else bcopy(src, (caddr_t)&ca, sizeof(ca)); -# endif +#endif error = COPYIN(ca, dst, size); if (error != 0) { IPFERROR(3); diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 18b8f3a65641..4864a8128494 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -81,13 +81,13 @@ # undef KERNEL #endif #include -# if defined(__FreeBSD_version) -# include -# define IF_QFULL _IF_QFULL -# define IF_DROP _IF_DROP -# endif -# include -# include +#if defined(__FreeBSD_version) +# include +# define IF_QFULL _IF_QFULL +# define IF_DROP _IF_DROP +#endif +#include +#include #include #include #include "netinet/ip_compat.h" @@ -298,9 +298,9 @@ ipf_auth_soft_destroy(softc, arg) { ipf_auth_softc_t *softa = arg; -# if SOLARIS && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) cv_destroy(&softa->ipf_auth_wait); -# endif +#endif MUTEX_DESTROY(&softa->ipf_auth_mx); RW_DESTROY(&softa->ipf_authlk); diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 4394b732e10c..756731480836 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -56,16 +56,16 @@ /* * This is a workaround for troubles on FreeBSD and OpenBSD. */ -# ifndef _KERNEL -# define ADD_KERNEL -# define _KERNEL -# define KERNEL -# endif -# include -# ifdef ADD_KERNEL -# undef _KERNEL -# undef KERNEL -# endif +#ifndef _KERNEL +# define ADD_KERNEL +# define _KERNEL +# define KERNEL +#endif +#include +#ifdef ADD_KERNEL +# undef _KERNEL +# undef KERNEL +#endif #define NETBSD_GE_REV(x) (defined(__NetBSD_Version__) && \ (__NetBSD_Version__ >= (x))) @@ -78,108 +78,108 @@ /* ----------------------------------------------------------------------- */ /* F R E E B S D */ /* ----------------------------------------------------------------------- */ -# define HAS_SYS_MD5_H 1 -# if defined(_KERNEL) -# include "opt_bpf.h" -# include "opt_inet6.h" -# if defined(INET6) && !defined(USE_INET6) -# define USE_INET6 -# endif -# else -# if !defined(USE_INET6) && !defined(NOINET6) -# define USE_INET6 -# endif +#define HAS_SYS_MD5_H 1 +#if defined(_KERNEL) +# include "opt_bpf.h" +# include "opt_inet6.h" +# if defined(INET6) && !defined(USE_INET6) +# define USE_INET6 # endif +#else +# if !defined(USE_INET6) && !defined(NOINET6) +# define USE_INET6 +# endif +#endif -# if defined(_KERNEL) -# include -# define p_cred td_ucred -# define p_uid td_ucred->cr_ruid +#if defined(_KERNEL) +# include +# define p_cred td_ucred +# define p_uid td_ucred->cr_ruid /* * When #define'd, the 5.2.1 kernel panics when used with the ftp proxy. * There may be other, safe, kernels but this is not extensively tested yet. */ -# define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) -# include "opt_ipfilter.h" -# endif -# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) -# define COPYOUT(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c)) +# define HAVE_M_PULLDOWN +# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# include "opt_ipfilter.h" +# endif +# define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) +# define COPYOUT(a,b,c) copyout((caddr_t)(a), (caddr_t)(b), (c)) -# else -# include -# endif /* _KERNEL */ +#else +# include +#endif /* _KERNEL */ -# include -# include -# include -# include -# define KRWLOCK_FILL_SZ 56 -# define KMUTEX_FILL_SZ 56 -# include -# define KMUTEX_T struct mtx -# define KRWLOCK_T struct rwlock +#include +#include +#include +#include +#define KRWLOCK_FILL_SZ 56 +#define KMUTEX_FILL_SZ 56 +#include +#define KMUTEX_T struct mtx +#define KRWLOCK_T struct rwlock #ifdef _KERNEL -# define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) -# define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) -# define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) -# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) -# define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) -# define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) -# define RWLOCK_EXIT(x) do { \ +# define READ_ENTER(x) rw_rlock(&(x)->ipf_lk) +# define WRITE_ENTER(x) rw_wlock(&(x)->ipf_lk) +# define MUTEX_DOWNGRADE(x) rw_downgrade(&(x)->ipf_lk) +# define MUTEX_TRY_UPGRADE(x) rw_try_upgrade(&(x)->ipf_lk) +# define RWLOCK_INIT(x,y) rw_init(&(x)->ipf_lk, (y)) +# define RW_DESTROY(x) rw_destroy(&(x)->ipf_lk) +# define RWLOCK_EXIT(x) do { \ if (rw_wowned(&(x)->ipf_lk)) \ rw_wunlock(&(x)->ipf_lk); \ else \ rw_runlock(&(x)->ipf_lk); \ } while (0) -# include -# define GETKTIME(x) microtime((struct timeval *)x) -# define if_addrlist if_addrhead - -# include -# include -# include - -# define USE_MUTEXES -# define MUTEX_ENTER(x) mtx_lock(&(x)->ipf_lk) -# define MUTEX_EXIT(x) mtx_unlock(&(x)->ipf_lk) -# define MUTEX_INIT(x,y) mtx_init(&(x)->ipf_lk, (y), NULL,\ +# include +# define GETKTIME(x) microtime((struct timeval *)x) +# define if_addrlist if_addrhead + +# include +# include +# include + +# define USE_MUTEXES +# define MUTEX_ENTER(x) mtx_lock(&(x)->ipf_lk) +# define MUTEX_EXIT(x) mtx_unlock(&(x)->ipf_lk) +# define MUTEX_INIT(x,y) mtx_init(&(x)->ipf_lk, (y), NULL,\ MTX_DEF) -# define MUTEX_DESTROY(x) mtx_destroy(&(x)->ipf_lk) -# define MUTEX_NUKE(x) bzero((x), sizeof(*(x))) +# define MUTEX_DESTROY(x) mtx_destroy(&(x)->ipf_lk) +# define MUTEX_NUKE(x) bzero((x), sizeof(*(x))) /* * Whilst the sx(9) locks on FreeBSD have the right semantics and interface * for what we want to use them for, despite testing showing they work - * with a WITNESS kernel, it generates LOR messages. */ -# include -# define ATOMIC_INC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)++; \ +# include +# define ATOMIC_INC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)++; \ mtx_unlock(&softc->ipf_rw.ipf_lk); } -# define ATOMIC_DEC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)--; \ +# define ATOMIC_DEC(x) { mtx_lock(&softc->ipf_rw.ipf_lk); (x)--; \ mtx_unlock(&softc->ipf_rw.ipf_lk); } -# define ATOMIC_INCL(x) atomic_add_long(&(x), 1) -# define ATOMIC_INC64(x) ATOMIC_INC(x) -# define ATOMIC_INC32(x) atomic_add_32((u_int *)&(x), 1) -# define ATOMIC_DECL(x) atomic_add_long(&(x), -1) -# define ATOMIC_DEC64(x) ATOMIC_DEC(x) -# define ATOMIC_DEC32(x) atomic_add_32((u_int *)&(x), -1) -# define SPL_X(x) ; -# define SPL_NET(x) ; -# define SPL_IMP(x) ; -# define SPL_SCHED(x) ; -# define GET_MINOR dev2unit -# define MSGDSIZE(m) mbufchainlen(m) -# define M_LEN(m) (m)->m_len -# define M_ADJ(m,x) m_adj(m, x) -# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) -# define M_DUP(m) m_dup(m, M_NOWAIT) -# define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } +# define ATOMIC_INCL(x) atomic_add_long(&(x), 1) +# define ATOMIC_INC64(x) ATOMIC_INC(x) +# define ATOMIC_INC32(x) atomic_add_32((u_int *)&(x), 1) +# define ATOMIC_DECL(x) atomic_add_long(&(x), -1) +# define ATOMIC_DEC64(x) ATOMIC_DEC(x) +# define ATOMIC_DEC32(x) atomic_add_32((u_int *)&(x), -1) +# define SPL_X(x) ; +# define SPL_NET(x) ; +# define SPL_IMP(x) ; +# define SPL_SCHED(x) ; +# define GET_MINOR dev2unit +# define MSGDSIZE(m) mbufchainlen(m) +# define M_LEN(m) (m)->m_len +# define M_ADJ(m,x) m_adj(m, x) +# define M_COPY(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) +# define M_DUP(m) m_dup(m, M_NOWAIT) +# define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } typedef struct mbuf mb_t; #else /* !_KERNEL */ -#ifndef _NET_IF_VAR_H_ +# ifndef _NET_IF_VAR_H_ /* * Userland emulation of struct ifnet. */ @@ -191,14 +191,14 @@ struct ifnet { int (*if_output)(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); }; -#endif /* _NET_IF_VAR_H_ */ +# endif /* _NET_IF_VAR_H_ */ #endif /* _KERNEL */ -# define IFNAME(x) ((struct ifnet *)x)->if_xname -# define COPYIFNAME(v, x, b) \ - (void) strncpy(b, \ - ((struct ifnet *)x)->if_xname, \ - LIFNAMSIZ) +#define IFNAME(x) ((struct ifnet *)x)->if_xname +#define COPYIFNAME(v, x, b) \ + (void) strncpy(b, \ + ((struct ifnet *)x)->if_xname, \ + LIFNAMSIZ) typedef u_long ioctlcmd_t; typedef struct uio uio_t; @@ -226,12 +226,12 @@ typedef u_int32_t u_32_t; * Userland locking primitives */ #ifndef _KERNEL -#if !defined(KMUTEX_FILL_SZ) -# define KMUTEX_FILL_SZ 1 -#endif -#if !defined(KRWLOCK_FILL_SZ) -# define KRWLOCK_FILL_SZ 1 -#endif +# if !defined(KMUTEX_FILL_SZ) +# define KMUTEX_FILL_SZ 1 +# endif +# if !defined(KRWLOCK_FILL_SZ) +# define KRWLOCK_FILL_SZ 1 +# endif #endif typedef struct { @@ -455,54 +455,54 @@ typedef struct ip6_hdr ip6_t; # define COPYDATA m_copydata # define COPYBACK m_copyback # endif -# if (defined(__NetBSD_Version__) && (__NetBSD_Version__ < 105180000)) || \ - defined(__FreeBSD__) -# include -# endif -# if NETBSD_GE_REV(105180000) -# include -# else -# include +# if (defined(__NetBSD_Version__) && (__NetBSD_Version__ < 105180000)) || \ + defined(__FreeBSD__) +# include +# endif +# if NETBSD_GE_REV(105180000) +# include +# else +# include extern vm_map_t kmem_map; -# endif -# include +# endif +# include -# ifdef IPFILTER_M_IPFILTER -# include +# ifdef IPFILTER_M_IPFILTER +# include MALLOC_DECLARE(M_IPFILTER); +# define _M_IPF M_IPFILTER +# else /* IPFILTER_M_IPFILTER */ +# ifdef M_PFIL +# define _M_IPF M_PFIL +# else +# ifdef M_IPFILTER # define _M_IPF M_IPFILTER -# else /* IPFILTER_M_IPFILTER */ -# ifdef M_PFIL -# define _M_IPF M_PFIL # else -# ifdef M_IPFILTER -# define _M_IPF M_IPFILTER -# else -# define _M_IPF M_TEMP -# endif /* M_IPFILTER */ -# endif /* M_PFIL */ -# endif /* IPFILTER_M_IPFILTER */ -# if !defined(KMALLOC) -# define KMALLOC(a, b) (a) = (b)malloc(sizeof(*(a)), _M_IPF, M_NOWAIT) -# endif -# if !defined(KMALLOCS) -# define KMALLOCS(a, b, c) (a) = (b)malloc((c), _M_IPF, M_NOWAIT) -# endif -# if !defined(KFREE) -# define KFREE(x) free((x), _M_IPF) -# endif -# if !defined(KFREES) +# define _M_IPF M_TEMP +# endif /* M_IPFILTER */ +# endif /* M_PFIL */ +# endif /* IPFILTER_M_IPFILTER */ +# if !defined(KMALLOC) +# define KMALLOC(a, b) (a) = (b)malloc(sizeof(*(a)), _M_IPF, M_NOWAIT) +# endif +# if !defined(KMALLOCS) +# define KMALLOCS(a, b, c) (a) = (b)malloc((c), _M_IPF, M_NOWAIT) +# endif +# if !defined(KFREE) +# define KFREE(x) free((x), _M_IPF) +# endif +# if !defined(KFREES) # define KFREES(x,s) free((x), _M_IPF) -# endif -# define UIOMOVE(a,b,c,d) uiomove((caddr_t)a,b,d) -# define SLEEP(id, n) tsleep((id), PPAUSE|PCATCH, n, 0) -# define WAKEUP(id,x) wakeup(id+x) -# if !defined(POLLWAKEUP) -# define POLLWAKEUP(x) selwakeup(softc->ipf_selwait+x) -# endif -# define GETIFP(n, v) ifunit(n) -# define GETIFMTU_4(x) ((struct ifnet *)x)->if_mtu -# define GETIFMTU_6(x) ((struct ifnet *)x)->if_mtu +# endif +# define UIOMOVE(a,b,c,d) uiomove((caddr_t)a,b,d) +# define SLEEP(id, n) tsleep((id), PPAUSE|PCATCH, n, 0) +# define WAKEUP(id,x) wakeup(id+x) +# if !defined(POLLWAKEUP) +# define POLLWAKEUP(x) selwakeup(softc->ipf_selwait+x) +# endif +# define GETIFP(n, v) ifunit(n) +# define GETIFMTU_4(x) ((struct ifnet *)x)->if_mtu +# define GETIFMTU_6(x) ((struct ifnet *)x)->if_mtu # if !defined(USE_MUTEXES) && !defined(SPL_NET) # define SPL_IMP(x) x = splimp() @@ -804,8 +804,8 @@ typedef struct tcpiphdr tcpiphdr_t; #undef IPOPT_AH #define IPOPT_AH 256+IPPROTO_AH -# define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB -# define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB +#define ICMP_UNREACH_ADMIN_PROHIBIT ICMP_UNREACH_FILTER_PROHIB +#define ICMP_UNREACH_FILTER ICMP_UNREACH_FILTER_PROHIB #ifndef IPVERSION # define IPVERSION 4 diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 0c65e4cd6896..11e1a1846d89 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -27,7 +27,7 @@ # endif #endif #include -# include +#include #include #if defined(_KERNEL) && !defined(__SVR4) # include diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 3121e94f1488..0b5fc7285f93 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -11,7 +11,7 @@ #ifndef __IP_FIL_H__ #define __IP_FIL_H__ -# include +#include #include "netinet/ip_compat.h" #include "netinet/ipf_rb.h" @@ -19,7 +19,7 @@ # include #endif #if defined(BSD) && defined(_KERNEL) -# include +# include #endif #ifndef SOLARIS @@ -31,48 +31,48 @@ #endif #ifndef __P -# define __P(x) x +# define __P(x) x #endif -# define SIOCADAFR _IOW('r', 60, struct ipfobj) -# define SIOCRMAFR _IOW('r', 61, struct ipfobj) -# define SIOCSETFF _IOW('r', 62, u_int) -# define SIOCGETFF _IOR('r', 63, u_int) -# define SIOCGETFS _IOWR('r', 64, struct ipfobj) -# define SIOCIPFFL _IOWR('r', 65, int) -# define SIOCIPFFB _IOR('r', 66, int) -# define SIOCADIFR _IOW('r', 67, struct ipfobj) -# define SIOCRMIFR _IOW('r', 68, struct ipfobj) -# define SIOCSWAPA _IOR('r', 69, u_int) -# define SIOCINAFR _IOW('r', 70, struct ipfobj) -# define SIOCINIFR _IOW('r', 71, struct ipfobj) -# define SIOCFRENB _IOW('r', 72, u_int) -# define SIOCFRSYN _IOW('r', 73, u_int) -# define SIOCFRZST _IOWR('r', 74, struct ipfobj) -# define SIOCZRLST _IOWR('r', 75, struct ipfobj) -# define SIOCAUTHW _IOWR('r', 76, struct ipfobj) -# define SIOCAUTHR _IOWR('r', 77, struct ipfobj) -# define SIOCSTAT1 _IOWR('r', 78, struct ipfobj) -# define SIOCSTLCK _IOWR('r', 79, u_int) -# define SIOCSTPUT _IOWR('r', 80, struct ipfobj) -# define SIOCSTGET _IOWR('r', 81, struct ipfobj) -# define SIOCSTGSZ _IOWR('r', 82, struct ipfobj) -# define SIOCSTAT2 _IOWR('r', 83, struct ipfobj) -# define SIOCSETLG _IOWR('r', 84, int) -# define SIOCGETLG _IOWR('r', 85, int) -# define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve) -# define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj) -# define SIOCIPFGET _IOWR('r', 88, struct ipfobj) -# define SIOCIPFSET _IOWR('r', 89, struct ipfobj) -# define SIOCIPFL6 _IOWR('r', 90, int) -# define SIOCIPFITER _IOWR('r', 91, struct ipfobj) -# define SIOCGENITER _IOWR('r', 92, struct ipfobj) -# define SIOCGTABL _IOWR('r', 93, struct ipfobj) -# define SIOCIPFDELTOK _IOWR('r', 94, int) -# define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj) -# define SIOCGTQTAB _IOWR('r', 96, struct ipfobj) -# define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj) -# define SIOCIPFINTERROR _IOR('r', 98, int) +#define SIOCADAFR _IOW('r', 60, struct ipfobj) +#define SIOCRMAFR _IOW('r', 61, struct ipfobj) +#define SIOCSETFF _IOW('r', 62, u_int) +#define SIOCGETFF _IOR('r', 63, u_int) +#define SIOCGETFS _IOWR('r', 64, struct ipfobj) +#define SIOCIPFFL _IOWR('r', 65, int) +#define SIOCIPFFB _IOR('r', 66, int) +#define SIOCADIFR _IOW('r', 67, struct ipfobj) +#define SIOCRMIFR _IOW('r', 68, struct ipfobj) +#define SIOCSWAPA _IOR('r', 69, u_int) +#define SIOCINAFR _IOW('r', 70, struct ipfobj) +#define SIOCINIFR _IOW('r', 71, struct ipfobj) +#define SIOCFRENB _IOW('r', 72, u_int) +#define SIOCFRSYN _IOW('r', 73, u_int) +#define SIOCFRZST _IOWR('r', 74, struct ipfobj) +#define SIOCZRLST _IOWR('r', 75, struct ipfobj) +#define SIOCAUTHW _IOWR('r', 76, struct ipfobj) +#define SIOCAUTHR _IOWR('r', 77, struct ipfobj) +#define SIOCSTAT1 _IOWR('r', 78, struct ipfobj) +#define SIOCSTLCK _IOWR('r', 79, u_int) +#define SIOCSTPUT _IOWR('r', 80, struct ipfobj) +#define SIOCSTGET _IOWR('r', 81, struct ipfobj) +#define SIOCSTGSZ _IOWR('r', 82, struct ipfobj) +#define SIOCSTAT2 _IOWR('r', 83, struct ipfobj) +#define SIOCSETLG _IOWR('r', 84, int) +#define SIOCGETLG _IOWR('r', 85, int) +#define SIOCFUNCL _IOWR('r', 86, struct ipfunc_resolve) +#define SIOCIPFGETNEXT _IOWR('r', 87, struct ipfobj) +#define SIOCIPFGET _IOWR('r', 88, struct ipfobj) +#define SIOCIPFSET _IOWR('r', 89, struct ipfobj) +#define SIOCIPFL6 _IOWR('r', 90, int) +#define SIOCIPFITER _IOWR('r', 91, struct ipfobj) +#define SIOCGENITER _IOWR('r', 92, struct ipfobj) +#define SIOCGTABL _IOWR('r', 93, struct ipfobj) +#define SIOCIPFDELTOK _IOWR('r', 94, int) +#define SIOCLOOKUPITER _IOWR('r', 95, struct ipfobj) +#define SIOCGTQTAB _IOWR('r', 96, struct ipfobj) +#define SIOCMATCHFLUSH _IOWR('r', 97, struct ipfobj) +#define SIOCIPFINTERROR _IOR('r', 98, int) #define SIOCADDFR SIOCADAFR #define SIOCDELFR SIOCRMAFR #define SIOCINSFR SIOCINAFR @@ -1640,14 +1640,14 @@ extern int ipf_qout(queue_t *, mblk_t *); extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); -# ifdef IPFILTER_LKM +# ifdef IPFILTER_LKM extern int ipf_identify(char *); -# endif -# if defined(__FreeBSD_version) +# endif +# if defined(__FreeBSD_version) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); -# elif defined(__NetBSD__) +# elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); -# endif +# endif # endif /* MENTAT */ # if defined(__FreeBSD_version) diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 7fc64cefb4c2..338c4e24c03a 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -34,9 +34,9 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -# include +#include #if defined(__FreeBSD_version) -#include +# include #endif #include #include @@ -44,7 +44,6 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include - #include #include #include @@ -75,19 +74,19 @@ static const char rcsid[] = "@(#)$Id$"; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #ifdef IPFILTER_SCAN -#include "netinet/ip_scan.h" +# include "netinet/ip_scan.h" #endif #include "netinet/ip_pool.h" #include #include #ifdef CSUM_DATA_VALID -#include +# include #endif extern int ip_optcopy(struct ip *, struct ip *); -# ifdef IPFILTER_M_IPFILTER +#ifdef IPFILTER_M_IPFILTER MALLOC_DEFINE(M_IPFILTER, "ipfilter", "IP Filter packet filter data structures"); -# endif +#endif static int ipf_send_ip(fr_info_t *, mb_t *); @@ -98,8 +97,8 @@ VNET_DEFINE(ipf_main_softc_t, ipfmain) = { }; #define V_ipfmain VNET(ipfmain) -# include -# include +#include +#include VNET_DEFINE_STATIC(eventhandler_tag, ipf_arrivetag); VNET_DEFINE_STATIC(eventhandler_tag, ipf_departtag); @@ -278,8 +277,8 @@ ipfdetach(softc) int ipfioctl(dev, cmd, data, mode, p) struct thread *p; -# define p_cred td_ucred -# define p_uid td_ucred->cr_ruid +#define p_cred td_ucred +#define p_uid td_ucred->cr_ruid struct cdev *dev; ioctlcmd_t cmd; caddr_t data; diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index fc2e78bfe27b..51d810baa310 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -732,7 +732,7 @@ ipf_pool_select_add_ref(arg, unit, name) /* */ /* Searches for an exact match of an entry in the pool. */ /* ------------------------------------------------------------------------ */ -extern void printhostmask(int, u_32_t *, u_32_t *)); +extern void printhostmask(int, u_32_t *, u_32_t *); static ip_pool_node_t * ipf_pool_findeq(softp, ipo, addr, mask) ipf_pool_softc_t *softp; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7F094540DE3; Tue, 16 Feb 2021 00:46: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 4Dfj2V2DhWz4S19; Tue, 16 Feb 2021 00:46: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 A75D32727C; Tue, 16 Feb 2021 00:46: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 11G0k97Q006074; Tue, 16 Feb 2021 00:46:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0k92R006073; Tue, 16 Feb 2021 00:46:09 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:09 GMT Message-Id: <202102160046.11G0k92R006073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d751393cdd2a - stable/13 - MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d751393cdd2a2e3757c1eeed43565a85a67daafb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:11 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d751393cdd2a2e3757c1eeed43565a85a67daafb commit d751393cdd2a2e3757c1eeed43565a85a67daafb Author: Cy Schubert AuthorDate: 2021-02-03 03:18:48 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: Simplify BSD macro tests. All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. (cherry picked from commit e673debe7db8ba95e4ee3b549d2570e71d19b596) --- contrib/ipfilter/ipsend/sbpf.c | 3 --- contrib/ipfilter/ipsend/sock.c | 4 ---- contrib/ipfilter/man/ipf.4 | 4 ++-- contrib/ipfilter/tools/ipfsyncd.c | 2 +- contrib/ipfilter/tools/ipmon.c | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 4 ++-- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 4 ---- sys/contrib/ipfilter/netinet/ip_log.c | 2 +- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 8 -------- 9 files changed, 7 insertions(+), 26 deletions(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index fcb66bc9ca2f..97559650f3b4 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,9 +12,6 @@ #include #include #include -#if BSD < 199103 -#include -#endif #if (__FreeBSD_version >= 300000) # include #else diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index a39f9de16345..ddb59eb029f8 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -95,11 +95,7 @@ struct proc *proc; #endif -#if BSD < 199103 -static struct proc *getproc(void); -#else static struct kinfo_proc *getproc(void); -#endif int kmemcpy(buf, pos, n) diff --git a/contrib/ipfilter/man/ipf.4 b/contrib/ipfilter/man/ipf.4 index 9b82e01bfc76..73a17a0cc8d3 100644 --- a/contrib/ipfilter/man/ipf.4 +++ b/contrib/ipfilter/man/ipf.4 @@ -60,7 +60,7 @@ typedef struct frentry { struct frentry *fr_grp; int fr_ref; /* reference count - for grouping */ void *fr_ifa; -#if BSD >= 199306 +#ifdef BSD void *fr_oifa; #endif /* @@ -93,7 +93,7 @@ typedef struct frentry { int (*fr_func)(int, ip_t *, fr_info_t *)); char fr_icode; /* return ICMP code */ char fr_ifname[IFNAMSIZ]; -#if BSD > 199306 +#ifdef BSD char fr_oifname[IFNAMSIZ]; #endif struct frdest fr_tif; /* "to" interface */ diff --git a/contrib/ipfilter/tools/ipfsyncd.c b/contrib/ipfilter/tools/ipfsyncd.c index 0ccc15542f6b..a75075059763 100644 --- a/contrib/ipfilter/tools/ipfsyncd.c +++ b/contrib/ipfilter/tools/ipfsyncd.c @@ -131,7 +131,7 @@ main(argc, argv) if (!debuglevel) { -#if BSD >= 199306 +#ifdef BSD daemon(0, 0); #else int fd = open("/dev/null", O_RDWR); diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index f14cef832722..9022f12b6149 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -1702,7 +1702,7 @@ int main(argc, argv) if (make_daemon && ((config.log != stdout) || (ipmonopts & IPMON_SYSLOG))) { -#if BSD >= 199306 +#ifdef BSD daemon(0, !(ipmonopts & IPMON_SYSLOG)); #else int pid; diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 490e939f7f37..3de517b4559d 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -424,12 +424,12 @@ extern mb_t *allocmbt(size_t); # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long -#else /* BSD > 199306 */ +#else /* BSD */ # if !defined(U_QUAD_T) # define U_QUAD_T u_long # define QUAD_T long # endif -#endif /* BSD > 199306 */ +#endif /* BSD */ #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 338c4e24c03a..39fe0933f417 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -288,14 +288,12 @@ ipfioctl(dev, cmd, data, mode, p) SPL_INT(s); CURVNET_SET(TD_TO_VNET(p)); -#if (BSD >= 199306) if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE)) { V_ipfmain.ipf_interror = 130001; CURVNET_RESTORE(); return EPERM; } -#endif unit = GET_MINOR(dev); if ((IPL_LOGMAX < unit) || (unit < 0)) { @@ -382,11 +380,9 @@ ipf_send_reset(fin) } m->m_len = sizeof(*tcp2) + hlen; -#if (BSD >= 199103) m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len; m->m_pkthdr.rcvif = (struct ifnet *)0; -#endif ip = mtod(m, struct ip *); bzero((char *)ip, hlen); #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index e5bf6a78bf1b..d7acaf1ebf4e 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -734,7 +734,7 @@ ipf_log_read(softc, unit, uio) return EIO; } -# if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__) +# if defined(BSD) uio->uio_rw = UIO_READ; # endif diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 0b9fdb76263e..1f4daf28824d 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -536,12 +536,8 @@ static int ipfclose(dev, flags * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfread(dev, uio, ioflag) int ioflag; -#else -static int ipfread(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else @@ -583,12 +579,8 @@ static int ipfread(dev, uio) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfwrite(dev, uio, ioflag) int ioflag; -#else -static int ipfwrite(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 62E65541027; Tue, 16 Feb 2021 00:46: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 4Dfj2V6Npbz4SB7; Tue, 16 Feb 2021 00:46: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 AEC722771A; Tue, 16 Feb 2021 00:46: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 11G0kA2G006094; Tue, 16 Feb 2021 00:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kANs006093; Tue, 16 Feb 2021 00:46:10 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:10 GMT Message-Id: <202102160046.11G0kANs006093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 5c32dfaaa1a0 - stable/13 - MFC 10990cb46027b4cc4339540b1217117863b2cd15: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5c32dfaaa1a0d8ac4d880c8f00636541d8ecf7e7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:13 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5c32dfaaa1a0d8ac4d880c8f00636541d8ecf7e7 commit 5c32dfaaa1a0d8ac4d880c8f00636541d8ecf7e7 Author: Cy Schubert AuthorDate: 2021-02-03 03:24:05 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC 10990cb46027b4cc4339540b1217117863b2cd15: Simplify FreeBSD check. (cherry picked from commit 10990cb46027b4cc4339540b1217117863b2cd15) --- contrib/ipfilter/ipsend/sbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 97559650f3b4..9b4f20c3fea9 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#if (__FreeBSD_version >= 300000) +#ifdef __FreeBSD_version # include #else # include From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 923FA540DEC; Tue, 16 Feb 2021 00:46: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 4Dfj2X5MzDz4S3D; Tue, 16 Feb 2021 00:46:12 +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 B928A2771B; Tue, 16 Feb 2021 00:46: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 11G0kBHJ006116; Tue, 16 Feb 2021 00:46:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kBZn006115; Tue, 16 Feb 2021 00:46:11 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:11 GMT Message-Id: <202102160046.11G0kBZn006115@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: cee16a2ff033 - stable/13 - MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cee16a2ff033380b149a92082cb0db100ec42869 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:16 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cee16a2ff033380b149a92082cb0db100ec42869 commit cee16a2ff033380b149a92082cb0db100ec42869 Author: Cy Schubert AuthorDate: 2021-02-05 14:26:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation. The ipfilter NAT table host map size is a tunable that defaults to a macro value defined at build time. HOSTMAP_SIZE is saved in softn (the ipnat softc) at initialization. It can be tuned (changed) at runtime using the ipf -T command. If the hostmap_size tunable is adjusted the calculation to determine where to put new entries in the table was incorrect. Use the tunable in the NAT softc instead of the static build time value. (cherry picked from commit 344f1083e128d8d41ca31853dac513ca3efd9d1f) --- sys/contrib/ipfilter/netinet/ip_nat6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index b2713aec812a..13fa6fb6bc30 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -390,7 +390,7 @@ ipf_nat6_hostmap(softn, np, src, dst, map, port) hv += dst->i6[2]; hv += dst->i6[1]; hv += dst->i6[0]; - hv %= HOSTMAP_SIZE; + hv %= softn->ipf_nat_hostmap_sz; for (hm = softn->ipf_hm_maptable[hv]; hm; hm = hm->hm_next) if (IP6_EQ(&hm->hm_osrc6, src) && IP6_EQ(&hm->hm_odst6, dst) && From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E55BD541124; Tue, 16 Feb 2021 00:46: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 4Dfj2Z4BkJz4SBT; Tue, 16 Feb 2021 00:46: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 EB4882778C; Tue, 16 Feb 2021 00:46: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 11G0kDt4006156; Tue, 16 Feb 2021 00:46:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kDhm006155; Tue, 16 Feb 2021 00:46:13 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:13 GMT Message-Id: <202102160046.11G0kDhm006155@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 6bb08afcf971 - stable/13 - MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6bb08afcf971a3aac1ece9578cca8f4def1ce054 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:18 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=6bb08afcf971a3aac1ece9578cca8f4def1ce054 commit 6bb08afcf971a3aac1ece9578cca8f4def1ce054 Author: Cy Schubert AuthorDate: 2021-02-07 03:22:52 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: 57785538c6e0d7e8ca0f161ab95bae10fd304047: Simplify the FreeBSD check using __FreeBSD__ compiler macro. Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week (cherry picked from commit 57785538c6e0d7e8ca0f161ab95bae10fd304047) 1e811efbc591699b872bea42b9de419c373199df: Fix non-IPv6 build post 57785538c6e0d7e8ca0f161ab95bae10fd304047. 57785538c6e0d7e8ca0f161ab95bae10fd304047 change the test for FreeBSD from __FreeBSD_version to __FreeBSD__. However this test was performed before sys/param.h was included, therefore __FreeBSD_version was never defined. As the test was never true opt_random_ip_id.h was never included. Submitted by: bdragon Reported by: bdragon (cherry picked from commit 1e811efbc591699b872bea42b9de419c373199df) --- contrib/ipfilter/ip_dstlist.c | 2 +- contrib/ipfilter/ip_fil_compat.c | 2 +- contrib/ipfilter/ipf.h | 2 +- contrib/ipfilter/ipsend/sbpf.c | 2 +- contrib/ipfilter/ipsend/sock.c | 2 +- sys/contrib/ipfilter/netinet/fil.c | 6 +++--- sys/contrib/ipfilter/netinet/ip_auth.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_compat.h | 6 +++--- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 8 ++++---- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 8 ++------ sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_htable.c | 2 +- sys/contrib/ipfilter/netinet/ip_log.c | 12 ++++++------ sys/contrib/ipfilter/netinet/ip_lookup.c | 2 +- sys/contrib/ipfilter/netinet/ip_nat.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_nat6.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_rules.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_sync.c | 6 +++--- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 18 +++++++++--------- 23 files changed, 63 insertions(+), 67 deletions(-) diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c index 14b071b0b95f..2802ef694aa9 100644 --- a/contrib/ipfilter/ip_dstlist.c +++ b/contrib/ipfilter/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index 6184502e0f58..0b426f5d9c48 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -14,7 +14,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h index c7f7308a9ba9..e178cfc1676e 100644 --- a/contrib/ipfilter/ipf.h +++ b/contrib/ipfilter/ipf.h @@ -172,7 +172,7 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__FreeBSD_version) || \ +#if defined(__NetBSD__) || defined(__FreeBSD__) || \ SOLARIS # include typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 9b4f20c3fea9..f3b8d2f37775 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #else # include diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index ddb59eb029f8..7754ef9d8e1c 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -168,7 +168,7 @@ struct tcpcb *find_tcp(tfd, ti) fd = (struct filedesc *)malloc(sizeof(*fd)); if (fd == NULL) return NULL; -#if defined( __FreeBSD_version) +#if defined( __FreeBSD__) if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1) { fprintf(stderr, "read(%#lx,%#lx) failed\n", diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 2dca1e754b9e..09b4c27a1cb4 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -20,7 +20,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # if !defined(IPFILTER_LKM) # include "opt_inet6.h" # endif @@ -91,7 +91,7 @@ #if defined(IPFILTER_BPF) && defined(_KERNEL) # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include "netinet/ipl.h" @@ -2886,7 +2886,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD__) /* * disable delayed checksums. */ diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index c40bb1b435f2..881dab1aaea8 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -27,7 +27,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -50,7 +50,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__NetBSD__) @@ -81,7 +81,7 @@ # undef KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # define IF_QFULL _IF_QFULL # define IF_DROP _IF_DROP @@ -100,7 +100,7 @@ # include # endif #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 3de517b4559d..5c00f8d37e40 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -101,7 +101,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD__) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) @@ -282,7 +282,7 @@ typedef union { #define ipf_isw ipf_lkun_s.ipf_sw #define ipf_magic ipf_lkun_s.ipf_magic -#if !defined(__GNUC__) || defined(__FreeBSD_version) +#if !defined(__GNUC__) || defined(__FreeBSD__) # ifndef INLINE # define INLINE # endif @@ -290,7 +290,7 @@ typedef union { # define INLINE __inline__ #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) CTASSERT(sizeof(ipfrwlock_t) == KRWLOCK_FILL_SZ); CTASSERT(sizeof(ipfmutex_t) == KMUTEX_FILL_SZ); #endif diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 11e1a1846d89..af584d8e4d72 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 72def439b3e8..8cb988e1fd17 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -1374,7 +1374,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD__) # define CDEV_MAJOR 79 #endif @@ -1567,7 +1567,7 @@ typedef struct ipf_main_softc_s { frentry_t *ipf_rule_explist[2]; ipftoken_t *ipf_token_head; ipftoken_t **ipf_token_tail; -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) struct callout ipf_slow_ch; #endif #if NETBSD_GE_REV(104040000) @@ -1641,14 +1641,14 @@ extern size_t mbufchainlen(mb_t *); # ifdef IPFILTER_LKM extern int ipf_identify(char *); # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif # endif /* SOLARIS */ -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipf_pfil_hook(void); extern int ipf_pfil_unhook(void); extern void ipf_event_reg(void); diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 39fe0933f417..bac73cee4e8b 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -16,14 +16,10 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && \ +#if defined(__FreeBSD__) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && \ - !defined(KLD_MODULE) && !defined(IPFILTER_LKM) -# include "opt_random_ip_id.h" -#endif #include #include #include @@ -35,7 +31,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 0636f27c81e8..93bcc2ed9415 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -24,7 +24,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/sys/contrib/ipfilter/netinet/ip_htable.c index bd76c2b5b0be..bd1a7136086f 100644 --- a/sys/contrib/ipfilter/netinet/ip_htable.c +++ b/sys/contrib/ipfilter/netinet/ip_htable.c @@ -24,7 +24,7 @@ # undef _KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__FreeBSD__) diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index d7acaf1ebf4e..7a80b3e0d4e7 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -39,7 +39,7 @@ # undef _KERNEL # undef KERNEL #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else @@ -52,12 +52,12 @@ # include # endif #endif /* _KERNEL */ -# if defined(NetBSD) || defined(__FreeBSD_version) +# if defined(NetBSD) || defined(__FreeBSD__) # include # include # include # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) # include # endif #if SOLARIS && defined(_KERNEL) @@ -78,7 +78,7 @@ #ifdef sun # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include @@ -102,7 +102,7 @@ #include "netinet/ip_frag.h" #include "netinet/ip_state.h" #include "netinet/ip_auth.h" -#if defined(__FreeBSD_version) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif /* END OF INCLUDES */ @@ -443,7 +443,7 @@ ipf_log_pkt(fin, flags) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else # if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \ - defined(__FreeBSD_version) + defined(__FreeBSD__) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else ipfl.fl_unit = (u_int)ifp->if_unit; diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.c b/sys/contrib/ipfilter/netinet/ip_lookup.c index f25174a752ec..66dec84944a1 100644 --- a/sys/contrib/ipfilter/netinet/ip_lookup.c +++ b/sys/contrib/ipfilter/netinet/ip_lookup.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 17c1133e145d..33d190c61a0a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -31,7 +31,7 @@ struct file; # include # undef KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -55,11 +55,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -90,7 +90,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H @@ -1017,7 +1017,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) KAUTH_REQ_NETWORK_FIREWALL_FW, NULL, NULL, NULL)) # else -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) if (securelevel_ge(curthread->td_ucred, 3) && (mode & FWRITE)) # else if ((securelevel >= 3) && (mode & FWRITE)) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 13fa6fb6bc30..921eefc0ea3f 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -29,7 +29,7 @@ struct file; # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -53,11 +53,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -88,7 +88,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index 51d810baa310..fdd83ebd977f 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -38,7 +38,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 2c6b4eb6369d..b4773bb6f358 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -29,7 +29,7 @@ # include #include #if defined(_KERNEL) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # endif # include @@ -37,7 +37,7 @@ # include # endif #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -51,11 +51,11 @@ # include # include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #endif #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) #include #else #define CURVNET_SET(arg) @@ -80,7 +80,7 @@ #include "netinet/ip_nat.h" #include "netinet/ip_state.h" #include "netinet/ip_proxy.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_rules.c b/sys/contrib/ipfilter/netinet/ip_rules.c index 2fb61e9d91bf..fcf6923adeb3 100644 --- a/sys/contrib/ipfilter/netinet/ip_rules.c +++ b/sys/contrib/ipfilter/netinet/ip_rules.c @@ -12,7 +12,7 @@ #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # if defined(_KERNEL) # include # else diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index a050a2d324d2..0ebebb49297d 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -19,7 +19,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) && \ +#if defined(_KERNEL) && defined(__FreeBSD__) && \ !defined(KLD_MODULE) #include "opt_inet6.h" #endif @@ -31,7 +31,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max) /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; diff --git a/sys/contrib/ipfilter/netinet/ip_sync.c b/sys/contrib/ipfilter/netinet/ip_sync.c index f95cd824544b..66bf88e877f0 100644 --- a/sys/contrib/ipfilter/netinet/ip_sync.c +++ b/sys/contrib/ipfilter/netinet/ip_sync.c @@ -30,14 +30,14 @@ # include # endif # include -# ifdef __FreeBSD_version +# ifdef __FreeBSD__ # include # endif #endif #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) # include #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -79,7 +79,7 @@ #ifdef USE_INET6 #include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 1f4daf28824d..6e49ef77b486 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -22,7 +22,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # include # ifdef _KERNEL @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,7 +68,7 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static int ipfopen(struct cdev*, int, int, struct thread *); static int ipfclose(struct cdev*, int, int, struct thread *); static int ipfread(struct cdev*, struct uio *, int); @@ -135,7 +135,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ip #define CDEV_MAJOR 79 #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); @@ -417,7 +417,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -470,7 +470,7 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -510,7 +510,7 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -538,7 +538,7 @@ static int ipfclose(dev, flags */ static int ipfread(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; @@ -581,7 +581,7 @@ static int ipfread(dev, uio, ioflag) */ static int ipfwrite(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EBD33540C56; Tue, 16 Feb 2021 00:46: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 4Dfj2Z387gz4SHC; Tue, 16 Feb 2021 00:46: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 F070E2706A; Tue, 16 Feb 2021 00:46:12 +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 11G0kCrm006138; Tue, 16 Feb 2021 00:46:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kCZI006137; Tue, 16 Feb 2021 00:46:12 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:12 GMT Message-Id: <202102160046.11G0kCZI006137@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: b3e0463c741c - stable/13 - MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b3e0463c741c3fc713d72e2ed93890cedd3637c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:18 -0000 The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=b3e0463c741c3fc713d72e2ed93890cedd3637c9 commit b3e0463c741c3fc713d72e2ed93890cedd3637c9 Author: Cy Schubert AuthorDate: 2021-02-07 03:15:27 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: Simply FreeBSD check using __FreeBSD__ and remove OpenBSD (cherry picked from commit d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd) --- contrib/ipfilter/lib/printaps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/lib/printaps.c b/contrib/ipfilter/lib/printaps.c index 0304f34c6010..47c8def6106b 100644 --- a/contrib/ipfilter/lib/printaps.c +++ b/contrib/ipfilter/lib/printaps.c @@ -47,7 +47,7 @@ printaps(aps, opts, proto) ap.aps_state[0], ap.aps_state[1], ap.aps_sel[0], ap.aps_sel[1]); #if (defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011)) || \ - (__FreeBSD_version >= 300000) || defined(OpenBSD) + defined(__FreeBSD__) PRINTF("\t\tseq: off %hd/%hd min %x/%x\n", ap.aps_seqoff[0], ap.aps_seqoff[1], ap.aps_seqmin[0], ap.aps_seqmin[1]); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3E0CF540FEA; Tue, 16 Feb 2021 00:46: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 4Dfj2z1Vt4z4SJQ; Tue, 16 Feb 2021 00:46: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 E2E2A2727D; Tue, 16 Feb 2021 00:46: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 11G0kWLB006367; Tue, 16 Feb 2021 00:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kWK8006366; Tue, 16 Feb 2021 00:46:32 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:32 GMT Message-Id: <202102160046.11G0kWK8006366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 624f34ed82b2 - stable/12 - MFC 0f34c80f376345b98a972940dd4757e58d7beb06: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 624f34ed82b2a712316f257a756c9ca76228a5c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:37 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=624f34ed82b2a712316f257a756c9ca76228a5c9 commit 624f34ed82b2a712316f257a756c9ca76228a5c9 Author: Cy Schubert AuthorDate: 2021-01-28 05:50:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:47 +0000 MFC 0f34c80f376345b98a972940dd4757e58d7beb06: Replace the redundant MENTAT macro with SOLARIS. MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. (cherry picked from commit 0f34c80f376345b98a972940dd4757e58d7beb06) --- contrib/ipfilter/ip_fil_compat.c | 50 +++++++++++++++---------------- contrib/ipfilter/tools/ipmon.c | 4 +-- sys/contrib/ipfilter/netinet/fil.c | 24 +++++++-------- sys/contrib/ipfilter/netinet/ip_auth.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_auth.h | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 10 +++---- sys/contrib/ipfilter/netinet/ip_irc_pxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_log.c | 4 +-- sys/contrib/ipfilter/netinet/ip_nat.c | 18 +++++------ sys/contrib/ipfilter/netinet/ip_nat6.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_proxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_state.c | 2 +- 13 files changed, 69 insertions(+), 71 deletions(-) diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index fbcfc8a0088f..6184502e0f58 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -333,7 +333,7 @@ typedef struct fr_info_4_1_32 { ip_t *ofin_ip; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -371,7 +371,7 @@ typedef struct fr_info_4_1_24 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -408,7 +408,7 @@ typedef struct fr_info_4_1_23 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -444,7 +444,7 @@ typedef struct fr_info_4_1_11 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -933,7 +933,7 @@ typedef struct frauth_4_1_32 { fr_info_4_1_32_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -947,7 +947,7 @@ typedef struct frauth_4_1_29 { fr_info_4_1_24_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -960,7 +960,7 @@ typedef struct frauth_4_1_24 { u_32_t fra_pass; fr_info_4_1_24_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -973,7 +973,7 @@ typedef struct frauth_4_1_23 { u_32_t fra_pass; fr_info_4_1_23_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -986,7 +986,7 @@ typedef struct frauth_4_1_11 { u_32_t fra_pass; fr_info_4_1_11_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -2533,7 +2533,7 @@ frauth_4_1_32_to_current(old, current) fr_info_4_1_32_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2554,7 +2554,7 @@ frauth_4_1_29_to_current(old, current) fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2574,7 +2574,7 @@ frauth_4_1_24_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2594,7 +2594,7 @@ frauth_4_1_23_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_23_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2614,7 +2614,7 @@ frauth_4_1_11_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_11_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2652,7 +2652,7 @@ fr_info_4_1_32_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2690,7 +2690,7 @@ fr_info_4_1_24_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2727,7 +2727,7 @@ fr_info_4_1_23_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2764,7 +2764,7 @@ fr_info_4_1_11_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -4039,7 +4039,7 @@ fr_info_current_to_4_1_24(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4079,7 +4079,7 @@ fr_info_current_to_4_1_23(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4119,7 +4119,7 @@ fr_info_current_to_4_1_11(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4141,7 +4141,7 @@ frauth_current_to_4_1_29(current, old) fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; old->fra_flx = fra->fra_flx; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4161,7 +4161,7 @@ frauth_current_to_4_1_24(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4181,7 +4181,7 @@ frauth_current_to_4_1_23(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_23(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4201,7 +4201,7 @@ frauth_current_to_4_1_11(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_11(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index 005cd316f91a..f14cef832722 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -108,7 +108,7 @@ char *reasons[] = { "natv6_in-fail", }; -#ifdef MENTAT +#if SOLARIS static char *pidfile = "/etc/opt/ipf/ipmon.pid"; #else static char *pidfile = "/var/run/ipmon.pid"; @@ -1108,7 +1108,7 @@ static void print_ipflog(conf, buf, blen) ifname[sizeof(ipf->fl_ifname)] = '\0'; sprintf(t, "%s", ifname); t += strlen(t); -# if defined(MENTAT) +# if SOLARIS if (ISALPHA(*(t - 1))) { sprintf(t, "%d", ipf->fl_unit); t += strlen(t); diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index a79d441284bf..2dca1e754b9e 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -2805,7 +2805,7 @@ ipf_firewall(fin, passp) /* ------------------------------------------------------------------------ */ int ipf_check(ctx, ip, hlen, ifp, out -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS , qif, mp) void *qif; #else @@ -2837,7 +2837,7 @@ ipf_check(ctx, ip, hlen, ifp, out * to hold all the required packet headers. */ #ifdef _KERNEL -# ifdef MENTAT +# if SOLARIS qpktinfo_t *qpi = qif; # ifdef __sparc @@ -2854,7 +2854,7 @@ ipf_check(ctx, ip, hlen, ifp, out bzero((char *)fin, sizeof(*fin)); -# ifdef MENTAT +# if SOLARIS if (qpi->qpi_flags & QF_BROADCAST) fin->fin_flx |= FI_MBCAST|FI_BROADCAST; if (qpi->qpi_flags & QF_MULTICAST) @@ -2862,7 +2862,7 @@ ipf_check(ctx, ip, hlen, ifp, out m = qpi->qpi_m; fin->fin_qfm = m; fin->fin_qpi = qpi; -# else /* MENTAT */ +# else /* SOLARIS */ m = *mp; @@ -2895,7 +2895,7 @@ ipf_check(ctx, ip, hlen, ifp, out m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } # endif /* CSUM_DELAY_DATA */ -# endif /* MENTAT */ +# endif /* SOLARIS */ #else bzero((char *)fin, sizeof(*fin)); m = *mp; @@ -6156,7 +6156,7 @@ ipf_getifname(ifp, buffer) char *buffer; { static char namebuf[LIFNAMSIZ]; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) int unit, space; char temp[20]; char *s; @@ -6166,7 +6166,7 @@ ipf_getifname(ifp, buffer) buffer = namebuf; (void) strncpy(buffer, ifp->if_name, LIFNAMSIZ); buffer[LIFNAMSIZ - 1] = '\0'; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) for (s = buffer; *s; s++) ; unit = ifp->if_unit; @@ -6916,7 +6916,7 @@ ipf_coalesce(fin) DT1(frb_coalesce, fr_info_t *, fin); LBUMP(ipf_stats[fin->fin_out].fr_badcoalesces); -# ifdef MENTAT +# if SOLARIS FREE_MB_T(*fin->fin_mp); # endif fin->fin_reason = FRB_COALESCE; @@ -8397,7 +8397,7 @@ ipf_ipf_ioctl(softc, data, cmd, mode, uid, ctx) error = EPERM; } else { WRITE_ENTER(&softc->ipf_global); -#if (defined(MENTAT) && defined(_KERNEL)) && !defined(INSTANCES) +#if (SOLARIS && defined(_KERNEL)) && !defined(INSTANCES) error = ipfsync(); #else ipf_sync(softc, NULL); @@ -8570,7 +8570,7 @@ ipf_decaps(fin, pass, l5proto) fino = fin; fin = &fin2; elen = hlen; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += elen; #else m->m_data += elen; @@ -8609,7 +8609,7 @@ ipf_decaps(fin, pass, l5proto) if (ipf_makefrip(hlen, ip, fin) == -1) { cantdecaps2: if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; @@ -8642,7 +8642,7 @@ cantdecaps: fino->fin_m = fin->fin_m; m = fin->fin_m; if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 4864a8128494..c40bb1b435f2 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -94,7 +94,7 @@ #include #include "netinet/ip_fil.h" #include "netinet/ip_auth.h" -#if !defined(MENTAT) +#if !SOLARIS # include # ifdef __FreeBSD__ # include @@ -466,7 +466,7 @@ ipf_auth_new(m, fin) { ipf_main_softc_t *softc = fin->fin_main_soft; ipf_auth_softc_t *softa = softc->ipf_auth_soft; -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS qpktinfo_t *qpi = fin->fin_qpi; #endif frauth_t *fra; @@ -508,7 +508,7 @@ ipf_auth_new(m, fin) * them. */ ip = fin->fin_ip; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) if ((ip == (ip_t *)m->b_rptr) && (fin->fin_v == 4)) # endif { diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h index e914dacacdf0..17df74c31de6 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.h +++ b/sys/contrib/ipfilter/netinet/ip_auth.h @@ -22,7 +22,7 @@ typedef struct frauth { fr_info_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 756731480836..490e939f7f37 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -448,7 +448,7 @@ typedef struct ip6_hdr ip6_t; #endif #if defined(_KERNEL) -# if defined(MENTAT) && !defined(INSTANCES) +# if SOLARIS && !defined(INSTANCES) # define COPYDATA mb_copydata # define COPYBACK mb_copyback # else diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 0b5fc7285f93..72def439b3e8 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -402,7 +402,7 @@ typedef struct fr_info { } fin_ipu; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -1626,8 +1626,7 @@ extern void ipfilterattach(int); # endif extern int ipl_enable(void); extern int ipl_disable(void); -# ifdef MENTAT -/* XXX MENTAT is always defined for Solaris */ +# if SOLARIS extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **); # if SOLARIS @@ -1635,8 +1634,7 @@ extern void ipf_prependmbt(fr_info_t *, mblk_t *); extern int ipfioctl(dev_t, int, intptr_t, int, cred_t *, int *); # endif extern int ipf_qout(queue_t *, mblk_t *); -# else /* MENTAT */ -/* XXX MENTAT is never defined for FreeBSD & NetBSD */ +# else /* SOLARIS */ extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); @@ -1648,7 +1646,7 @@ extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif -# endif /* MENTAT */ +# endif /* SOLARIS */ # if defined(__FreeBSD_version) extern int ipf_pfil_hook(void); diff --git a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c index 304fe0c35351..4446b2100645 100644 --- a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c @@ -267,7 +267,7 @@ ipf_p_irc_send(fin, nat) u_int a1; ip_t *ip; mb_t *m; -#ifdef MENTAT +#if SOLARIS mb_t *m1; #endif softc = fin->fin_main_soft; @@ -322,7 +322,7 @@ ipf_p_irc_send(fin, nat) if ((inc + fin->fin_plen) > 65535) return 0; -#ifdef MENTAT +#if SOLARIS for (m1 = m; m1->b_cont; m1 = m1->b_cont) ; if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) { @@ -357,7 +357,7 @@ ipf_p_irc_send(fin, nat) fin->fin_flx |= FI_DOCKSUM; if (inc != 0) { -#if defined(MENTAT) +#if SOLARIS register u_32_t sum1, sum2; sum1 = fin->fin_plen; diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index 76d2e3def1fa..e5bf6a78bf1b 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -488,7 +488,7 @@ ipf_log_pkt(fin, flags) ptrs[0] = (void *)&ipfl; sizes[0] = sizeof(ipfl); types[0] = 0; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) /* * Are we copied from the mblk or an aligned array ? */ @@ -505,7 +505,7 @@ ipf_log_pkt(fin, flags) ptrs[1] = m; sizes[1] = hlen + mlen; types[1] = 1; -# endif /* MENTAT */ +# endif /* SOLARIS */ return ipf_log_items(softc, IPL_LOGIPF, fin, ptrs, sizes, types, 2); } diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 3d272e1710df..8dfab21b7e26 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -3661,7 +3661,7 @@ ipf_nat_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -5116,7 +5116,7 @@ ipf_nat_out(fin, nat, natadd, nflags) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0); } -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) else { /* @@ -5179,7 +5179,7 @@ ipf_nat_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -5228,7 +5228,7 @@ ipf_nat_out(fin, nat, natadd, nflags) uh = (udphdr_t *)(ip + 1); uh->uh_ulen += fin->fin_plen; uh->uh_ulen = htons(uh->uh_ulen); -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif @@ -5631,7 +5631,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_ndstip; fin->fin_daddr = nat->nat_ndstaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5648,7 +5648,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_incksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5680,7 +5680,7 @@ ipf_nat_in(fin, nat, natadd, nflags) sum2 += ntohs(ip->ip_off) & IP_DF; CALC_SUMD(sum1, sum2, sumd); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif PREP_MB_T(fin, m); @@ -5706,7 +5706,7 @@ ipf_nat_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -7429,7 +7429,7 @@ ipf_nat_decap(fin, nat) CALC_SUMD(sum1, sum2, sumd); fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, sumd, 0); #endif } diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 388ee9a67e73..b2713aec812a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -1434,7 +1434,7 @@ ipf_nat6_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip6 + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -2858,7 +2858,7 @@ ipf_nat6_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -3321,7 +3321,7 @@ ipf_nat6_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 227ca817f6e4..2c6b4eb6369d 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -914,7 +914,7 @@ ipf_proxy_check(fin, nat) ip_t *ip; short rv; int err; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS u_32_t s1, s2, sd; #endif @@ -942,7 +942,7 @@ ipf_proxy_check(fin, nat) * If there is data in this packet to be proxied then try and * get it all into the one buffer, else drop it. */ -#if defined(MENTAT) || defined(HAVE_M_PULLDOWN) +#if SOLARIS || defined(HAVE_M_PULLDOWN) if ((fin->fin_dlen > 0) && !(fin->fin_flx & FI_COALESCE)) if (ipf_coalesce(fin) == -1) { if (softp->ips_proxy_debug & 0x08) @@ -1006,7 +1006,7 @@ ipf_proxy_check(fin, nat) * packet. */ adjlen = APR_INC(err); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS s1 = LONG_SUM(fin->fin_plen - adjlen); s2 = LONG_SUM(fin->fin_plen); CALC_SUMD(s1, s2, sd); diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 45a641fd86a2..a050a2d324d2 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2739,7 +2739,7 @@ ipf_checkicmpmatchingstate(fin) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + len > (char *)m->b_wptr) { SBUMPDX(ipf_state_stats, iss_icmp_short, iss_icmp_short_2); return NULL; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 995EA540C75; Tue, 16 Feb 2021 00:46: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 4Dfj320DRwz4S9g; Tue, 16 Feb 2021 00: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 082342752F; Tue, 16 Feb 2021 00:46: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 11G0kXPM006389; Tue, 16 Feb 2021 00:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kXNM006388; Tue, 16 Feb 2021 00:46:33 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:33 GMT Message-Id: <202102160046.11G0kXNM006388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 1d1120c6ce7a - stable/12 - MFC commit e673debe7db8ba95e4ee3b549d2570e71d19b596: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1d1120c6ce7a40c47caceb0cdb80dfc6022f259c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:40 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=1d1120c6ce7a40c47caceb0cdb80dfc6022f259c commit 1d1120c6ce7a40c47caceb0cdb80dfc6022f259c Author: Cy Schubert AuthorDate: 2021-02-03 03:18:48 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:48 +0000 MFC commit e673debe7db8ba95e4ee3b549d2570e71d19b596: Simplify BSD macro tests. All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. (cherry picked from commit e673debe7db8ba95e4ee3b549d2570e71d19b596) --- contrib/ipfilter/ipsend/sbpf.c | 3 --- contrib/ipfilter/ipsend/sock.c | 4 ---- contrib/ipfilter/man/ipf.4 | 4 ++-- contrib/ipfilter/tools/ipfsyncd.c | 2 +- contrib/ipfilter/tools/ipmon.c | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 4 ++-- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 4 ---- sys/contrib/ipfilter/netinet/ip_log.c | 2 +- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 8 -------- 9 files changed, 7 insertions(+), 26 deletions(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index fcb66bc9ca2f..97559650f3b4 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,9 +12,6 @@ #include #include #include -#if BSD < 199103 -#include -#endif #if (__FreeBSD_version >= 300000) # include #else diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index a39f9de16345..ddb59eb029f8 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -95,11 +95,7 @@ struct proc *proc; #endif -#if BSD < 199103 -static struct proc *getproc(void); -#else static struct kinfo_proc *getproc(void); -#endif int kmemcpy(buf, pos, n) diff --git a/contrib/ipfilter/man/ipf.4 b/contrib/ipfilter/man/ipf.4 index 9b82e01bfc76..73a17a0cc8d3 100644 --- a/contrib/ipfilter/man/ipf.4 +++ b/contrib/ipfilter/man/ipf.4 @@ -60,7 +60,7 @@ typedef struct frentry { struct frentry *fr_grp; int fr_ref; /* reference count - for grouping */ void *fr_ifa; -#if BSD >= 199306 +#ifdef BSD void *fr_oifa; #endif /* @@ -93,7 +93,7 @@ typedef struct frentry { int (*fr_func)(int, ip_t *, fr_info_t *)); char fr_icode; /* return ICMP code */ char fr_ifname[IFNAMSIZ]; -#if BSD > 199306 +#ifdef BSD char fr_oifname[IFNAMSIZ]; #endif struct frdest fr_tif; /* "to" interface */ diff --git a/contrib/ipfilter/tools/ipfsyncd.c b/contrib/ipfilter/tools/ipfsyncd.c index 0ccc15542f6b..a75075059763 100644 --- a/contrib/ipfilter/tools/ipfsyncd.c +++ b/contrib/ipfilter/tools/ipfsyncd.c @@ -131,7 +131,7 @@ main(argc, argv) if (!debuglevel) { -#if BSD >= 199306 +#ifdef BSD daemon(0, 0); #else int fd = open("/dev/null", O_RDWR); diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index f14cef832722..9022f12b6149 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -1702,7 +1702,7 @@ int main(argc, argv) if (make_daemon && ((config.log != stdout) || (ipmonopts & IPMON_SYSLOG))) { -#if BSD >= 199306 +#ifdef BSD daemon(0, !(ipmonopts & IPMON_SYSLOG)); #else int pid; diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 490e939f7f37..3de517b4559d 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -424,12 +424,12 @@ extern mb_t *allocmbt(size_t); # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long -#else /* BSD > 199306 */ +#else /* BSD */ # if !defined(U_QUAD_T) # define U_QUAD_T u_long # define QUAD_T long # endif -#endif /* BSD > 199306 */ +#endif /* BSD */ #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 51870782e235..cb52ebef42fc 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -298,14 +298,12 @@ ipfioctl(dev, cmd, data, mode, p) SPL_INT(s); CURVNET_SET(TD_TO_VNET(p)); -#if (BSD >= 199306) if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE)) { V_ipfmain.ipf_interror = 130001; CURVNET_RESTORE(); return EPERM; } -#endif unit = GET_MINOR(dev); if ((IPL_LOGMAX < unit) || (unit < 0)) { @@ -392,11 +390,9 @@ ipf_send_reset(fin) } m->m_len = sizeof(*tcp2) + hlen; -#if (BSD >= 199103) m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len; m->m_pkthdr.rcvif = (struct ifnet *)0; -#endif ip = mtod(m, struct ip *); bzero((char *)ip, hlen); #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index e5bf6a78bf1b..d7acaf1ebf4e 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -734,7 +734,7 @@ ipf_log_read(softc, unit, uio) return EIO; } -# if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__) +# if defined(BSD) uio->uio_rw = UIO_READ; # endif diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index aa75fa3e686c..989912a1ea39 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -552,12 +552,8 @@ static int ipfclose(dev, flags * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfread(dev, uio, ioflag) int ioflag; -#else -static int ipfread(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else @@ -599,12 +595,8 @@ static int ipfread(dev, uio) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfwrite(dev, uio, ioflag) int ioflag; -#else -static int ipfwrite(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A75E8540C77; Tue, 16 Feb 2021 00:46: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 4Dfj320DkCz4SG0; Tue, 16 Feb 2021 00: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 544332778E; Tue, 16 Feb 2021 00:46: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 11G0kaj4006430; Tue, 16 Feb 2021 00:46:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kan6006429; Tue, 16 Feb 2021 00:46:36 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:36 GMT Message-Id: <202102160046.11G0kan6006429@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 46f4eb3f1eb3 - stable/12 - MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 46f4eb3f1eb3ec582331941a173abad904ba198d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:42 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=46f4eb3f1eb3ec582331941a173abad904ba198d commit 46f4eb3f1eb3ec582331941a173abad904ba198d Author: Cy Schubert AuthorDate: 2021-02-05 14:26:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation. The ipfilter NAT table host map size is a tunable that defaults to a macro value defined at build time. HOSTMAP_SIZE is saved in softn (the ipnat softc) at initialization. It can be tuned (changed) at runtime using the ipf -T command. If the hostmap_size tunable is adjusted the calculation to determine where to put new entries in the table was incorrect. Use the tunable in the NAT softc instead of the static build time value. (cherry picked from commit 344f1083e128d8d41ca31853dac513ca3efd9d1f) --- sys/contrib/ipfilter/netinet/ip_nat6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index b2713aec812a..13fa6fb6bc30 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -390,7 +390,7 @@ ipf_nat6_hostmap(softn, np, src, dst, map, port) hv += dst->i6[2]; hv += dst->i6[1]; hv += dst->i6[0]; - hv %= HOSTMAP_SIZE; + hv %= softn->ipf_nat_hostmap_sz; for (hm = softn->ipf_hm_maptable[hv]; hm; hm = hm->hm_next) if (IP6_EQ(&hm->hm_osrc6, src) && IP6_EQ(&hm->hm_odst6, dst) && From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A38965411C1; Tue, 16 Feb 2021 00:46: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 4Dfj320Cqcz4SLM; Tue, 16 Feb 2021 00: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 41A442778D; Tue, 16 Feb 2021 00:46: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 11G0kZGu006408; Tue, 16 Feb 2021 00:46:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kZ9d006407; Tue, 16 Feb 2021 00:46:35 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:35 GMT Message-Id: <202102160046.11G0kZ9d006407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 98cf94afab4d - stable/12 - MFC 10990cb46027b4cc4339540b1217117863b2cd15: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 98cf94afab4dc1e259c6d12e417ce9f7bda2d447 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:42 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=98cf94afab4dc1e259c6d12e417ce9f7bda2d447 commit 98cf94afab4dc1e259c6d12e417ce9f7bda2d447 Author: Cy Schubert AuthorDate: 2021-02-03 03:24:05 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:48 +0000 MFC 10990cb46027b4cc4339540b1217117863b2cd15: Simplify FreeBSD check. (cherry picked from commit 10990cb46027b4cc4339540b1217117863b2cd15) --- contrib/ipfilter/ipsend/sbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 97559650f3b4..9b4f20c3fea9 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#if (__FreeBSD_version >= 300000) +#ifdef __FreeBSD_version # include #else # include From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 76813540FFA; Tue, 16 Feb 2021 00:46: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 4Dfj353FBKz4SJk; Tue, 16 Feb 2021 00:46: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 5B94A2771C; Tue, 16 Feb 2021 00:46: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 11G0kbO2006452; Tue, 16 Feb 2021 00:46:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0kbfX006451; Tue, 16 Feb 2021 00:46:37 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:37 GMT Message-Id: <202102160046.11G0kbfX006451@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d4582137abc2 - stable/12 - MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d4582137abc299998c92e8613597dbe35881b2aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:42 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d4582137abc299998c92e8613597dbe35881b2aa commit d4582137abc299998c92e8613597dbe35881b2aa Author: Cy Schubert AuthorDate: 2021-02-07 03:15:27 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: Simply FreeBSD check using __FreeBSD__ and remove OpenBSD (cherry picked from commit d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd) --- contrib/ipfilter/lib/printaps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/lib/printaps.c b/contrib/ipfilter/lib/printaps.c index 0304f34c6010..47c8def6106b 100644 --- a/contrib/ipfilter/lib/printaps.c +++ b/contrib/ipfilter/lib/printaps.c @@ -47,7 +47,7 @@ printaps(aps, opts, proto) ap.aps_state[0], ap.aps_state[1], ap.aps_sel[0], ap.aps_sel[1]); #if (defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011)) || \ - (__FreeBSD_version >= 300000) || defined(OpenBSD) + defined(__FreeBSD__) PRINTF("\t\tseq: off %hd/%hd min %x/%x\n", ap.aps_seqoff[0], ap.aps_seqoff[1], ap.aps_seqmin[0], ap.aps_seqmin[1]); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:46:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 28EA6541065; Tue, 16 Feb 2021 00:46: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 4Dfj3622CTz4SWY; Tue, 16 Feb 2021 00:46: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 8E930274FD; Tue, 16 Feb 2021 00: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 11G0kcfH006470; Tue, 16 Feb 2021 00: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 11G0kcm9006469; Tue, 16 Feb 2021 00:46:38 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:46:38 GMT Message-Id: <202102160046.11G0kcm9006469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: c7d01e6f2c96 - stable/12 - MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c7d01e6f2c9606cbce3147ecf5d01f9656f67d2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:46:45 -0000 The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c7d01e6f2c9606cbce3147ecf5d01f9656f67d2e commit c7d01e6f2c9606cbce3147ecf5d01f9656f67d2e Author: Cy Schubert AuthorDate: 2021-02-07 03:22:52 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: 57785538c6e0d7e8ca0f161ab95bae10fd304047: Simplify the FreeBSD check using __FreeBSD__ compiler macro. Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week (cherry picked from commit 57785538c6e0d7e8ca0f161ab95bae10fd304047) 1e811efbc591699b872bea42b9de419c373199df: Fix non-IPv6 build post 57785538c6e0d7e8ca0f161ab95bae10fd304047. 57785538c6e0d7e8ca0f161ab95bae10fd304047 change the test for FreeBSD from __FreeBSD_version to __FreeBSD__. However this test was performed before sys/param.h was included, therefore __FreeBSD_version was never defined. As the test was never true opt_random_ip_id.h was never included. Submitted by: bdragon Reported by: bdragon (cherry picked from commit 1e811efbc591699b872bea42b9de419c373199df) --- contrib/ipfilter/ip_dstlist.c | 2 +- contrib/ipfilter/ip_fil_compat.c | 2 +- contrib/ipfilter/ipf.h | 2 +- contrib/ipfilter/ipsend/sbpf.c | 2 +- contrib/ipfilter/ipsend/sock.c | 2 +- sys/contrib/ipfilter/netinet/fil.c | 6 +++--- sys/contrib/ipfilter/netinet/ip_auth.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_compat.h | 6 +++--- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 8 ++++---- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 8 ++------ sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_htable.c | 2 +- sys/contrib/ipfilter/netinet/ip_log.c | 12 ++++++------ sys/contrib/ipfilter/netinet/ip_lookup.c | 2 +- sys/contrib/ipfilter/netinet/ip_nat.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_nat6.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_rules.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_sync.c | 6 +++--- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 18 +++++++++--------- 23 files changed, 63 insertions(+), 67 deletions(-) diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c index 14b071b0b95f..2802ef694aa9 100644 --- a/contrib/ipfilter/ip_dstlist.c +++ b/contrib/ipfilter/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index 6184502e0f58..0b426f5d9c48 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -14,7 +14,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h index c7f7308a9ba9..e178cfc1676e 100644 --- a/contrib/ipfilter/ipf.h +++ b/contrib/ipfilter/ipf.h @@ -172,7 +172,7 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__FreeBSD_version) || \ +#if defined(__NetBSD__) || defined(__FreeBSD__) || \ SOLARIS # include typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 9b4f20c3fea9..f3b8d2f37775 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #else # include diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index ddb59eb029f8..7754ef9d8e1c 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -168,7 +168,7 @@ struct tcpcb *find_tcp(tfd, ti) fd = (struct filedesc *)malloc(sizeof(*fd)); if (fd == NULL) return NULL; -#if defined( __FreeBSD_version) +#if defined( __FreeBSD__) if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1) { fprintf(stderr, "read(%#lx,%#lx) failed\n", diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 2dca1e754b9e..09b4c27a1cb4 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -20,7 +20,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # if !defined(IPFILTER_LKM) # include "opt_inet6.h" # endif @@ -91,7 +91,7 @@ #if defined(IPFILTER_BPF) && defined(_KERNEL) # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include "netinet/ipl.h" @@ -2886,7 +2886,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD__) /* * disable delayed checksums. */ diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index c40bb1b435f2..881dab1aaea8 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -27,7 +27,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -50,7 +50,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__NetBSD__) @@ -81,7 +81,7 @@ # undef KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # define IF_QFULL _IF_QFULL # define IF_DROP _IF_DROP @@ -100,7 +100,7 @@ # include # endif #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 3de517b4559d..5c00f8d37e40 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -101,7 +101,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD__) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) @@ -282,7 +282,7 @@ typedef union { #define ipf_isw ipf_lkun_s.ipf_sw #define ipf_magic ipf_lkun_s.ipf_magic -#if !defined(__GNUC__) || defined(__FreeBSD_version) +#if !defined(__GNUC__) || defined(__FreeBSD__) # ifndef INLINE # define INLINE # endif @@ -290,7 +290,7 @@ typedef union { # define INLINE __inline__ #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) CTASSERT(sizeof(ipfrwlock_t) == KRWLOCK_FILL_SZ); CTASSERT(sizeof(ipfmutex_t) == KMUTEX_FILL_SZ); #endif diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 11e1a1846d89..af584d8e4d72 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 72def439b3e8..8cb988e1fd17 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -1374,7 +1374,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD__) # define CDEV_MAJOR 79 #endif @@ -1567,7 +1567,7 @@ typedef struct ipf_main_softc_s { frentry_t *ipf_rule_explist[2]; ipftoken_t *ipf_token_head; ipftoken_t **ipf_token_tail; -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) struct callout ipf_slow_ch; #endif #if NETBSD_GE_REV(104040000) @@ -1641,14 +1641,14 @@ extern size_t mbufchainlen(mb_t *); # ifdef IPFILTER_LKM extern int ipf_identify(char *); # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif # endif /* SOLARIS */ -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipf_pfil_hook(void); extern int ipf_pfil_unhook(void); extern void ipf_event_reg(void); diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index cb52ebef42fc..176b380ca0a3 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -16,14 +16,10 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && \ +#if defined(__FreeBSD__) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && \ - !defined(KLD_MODULE) && !defined(IPFILTER_LKM) -# include "opt_random_ip_id.h" -#endif #include #include #include @@ -33,7 +29,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 0636f27c81e8..93bcc2ed9415 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -24,7 +24,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/sys/contrib/ipfilter/netinet/ip_htable.c index bd76c2b5b0be..bd1a7136086f 100644 --- a/sys/contrib/ipfilter/netinet/ip_htable.c +++ b/sys/contrib/ipfilter/netinet/ip_htable.c @@ -24,7 +24,7 @@ # undef _KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__FreeBSD__) diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index d7acaf1ebf4e..7a80b3e0d4e7 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -39,7 +39,7 @@ # undef _KERNEL # undef KERNEL #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else @@ -52,12 +52,12 @@ # include # endif #endif /* _KERNEL */ -# if defined(NetBSD) || defined(__FreeBSD_version) +# if defined(NetBSD) || defined(__FreeBSD__) # include # include # include # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) # include # endif #if SOLARIS && defined(_KERNEL) @@ -78,7 +78,7 @@ #ifdef sun # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include @@ -102,7 +102,7 @@ #include "netinet/ip_frag.h" #include "netinet/ip_state.h" #include "netinet/ip_auth.h" -#if defined(__FreeBSD_version) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif /* END OF INCLUDES */ @@ -443,7 +443,7 @@ ipf_log_pkt(fin, flags) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else # if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \ - defined(__FreeBSD_version) + defined(__FreeBSD__) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else ipfl.fl_unit = (u_int)ifp->if_unit; diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.c b/sys/contrib/ipfilter/netinet/ip_lookup.c index f25174a752ec..66dec84944a1 100644 --- a/sys/contrib/ipfilter/netinet/ip_lookup.c +++ b/sys/contrib/ipfilter/netinet/ip_lookup.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 8dfab21b7e26..6fdc006e88f0 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -31,7 +31,7 @@ struct file; # include # undef KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -55,11 +55,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -90,7 +90,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H @@ -1017,7 +1017,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) KAUTH_REQ_NETWORK_FIREWALL_FW, NULL, NULL, NULL)) # else -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) if (securelevel_ge(curthread->td_ucred, 3) && (mode & FWRITE)) # else if ((securelevel >= 3) && (mode & FWRITE)) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 13fa6fb6bc30..921eefc0ea3f 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -29,7 +29,7 @@ struct file; # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -53,11 +53,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -88,7 +88,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index 51d810baa310..fdd83ebd977f 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -38,7 +38,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 2c6b4eb6369d..b4773bb6f358 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -29,7 +29,7 @@ # include #include #if defined(_KERNEL) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # endif # include @@ -37,7 +37,7 @@ # include # endif #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -51,11 +51,11 @@ # include # include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #endif #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) #include #else #define CURVNET_SET(arg) @@ -80,7 +80,7 @@ #include "netinet/ip_nat.h" #include "netinet/ip_state.h" #include "netinet/ip_proxy.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_rules.c b/sys/contrib/ipfilter/netinet/ip_rules.c index 2fb61e9d91bf..fcf6923adeb3 100644 --- a/sys/contrib/ipfilter/netinet/ip_rules.c +++ b/sys/contrib/ipfilter/netinet/ip_rules.c @@ -12,7 +12,7 @@ #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # if defined(_KERNEL) # include # else diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index a050a2d324d2..0ebebb49297d 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -19,7 +19,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) && \ +#if defined(_KERNEL) && defined(__FreeBSD__) && \ !defined(KLD_MODULE) #include "opt_inet6.h" #endif @@ -31,7 +31,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max) /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; diff --git a/sys/contrib/ipfilter/netinet/ip_sync.c b/sys/contrib/ipfilter/netinet/ip_sync.c index f95cd824544b..66bf88e877f0 100644 --- a/sys/contrib/ipfilter/netinet/ip_sync.c +++ b/sys/contrib/ipfilter/netinet/ip_sync.c @@ -30,14 +30,14 @@ # include # endif # include -# ifdef __FreeBSD_version +# ifdef __FreeBSD__ # include # endif #endif #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) # include #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -79,7 +79,7 @@ #ifdef USE_INET6 #include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 989912a1ea39..0e5f6c6b968c 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -22,7 +22,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # include # ifdef _KERNEL @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,7 +68,7 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static int ipfopen(struct cdev*, int, int, struct thread *); static int ipfclose(struct cdev*, int, int, struct thread *); static int ipfread(struct cdev*, struct uio *, int); @@ -129,7 +129,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ip #define CDEV_MAJOR 79 #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); @@ -433,7 +433,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -486,7 +486,7 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -526,7 +526,7 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -554,7 +554,7 @@ static int ipfclose(dev, flags */ static int ipfread(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; @@ -597,7 +597,7 @@ static int ipfread(dev, uio, ioflag) */ static int ipfwrite(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6EF99541411; Tue, 16 Feb 2021 00:47:22 +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 4Dfj3r1DSVz4SWT; Tue, 16 Feb 2021 00:47: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 A8F242778F; Tue, 16 Feb 2021 00:47: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 11G0lIYZ006715; Tue, 16 Feb 2021 00:47:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lIeE006714; Tue, 16 Feb 2021 00:47:18 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:18 GMT Message-Id: <202102160047.11G0lIeE006714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 8d6da0aae1c4 - stable/11 - MFC 0f34c80f376345b98a972940dd4757e58d7beb06: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 8d6da0aae1c4ca288537c9875eaed1f65988e51f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:22 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8d6da0aae1c4ca288537c9875eaed1f65988e51f commit 8d6da0aae1c4ca288537c9875eaed1f65988e51f Author: Cy Schubert AuthorDate: 2021-01-28 05:50:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:47 +0000 MFC 0f34c80f376345b98a972940dd4757e58d7beb06: Replace the redundant MENTAT macro with SOLARIS. MENTAT and SOLARIS are synonymous. Remove the extraneous duplicate macro. (cherry picked from commit 0f34c80f376345b98a972940dd4757e58d7beb06) --- contrib/ipfilter/ip_fil_compat.c | 50 +++++++++++++++---------------- contrib/ipfilter/tools/ipmon.c | 4 +-- sys/contrib/ipfilter/netinet/fil.c | 24 +++++++-------- sys/contrib/ipfilter/netinet/ip_auth.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_auth.h | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 10 +++---- sys/contrib/ipfilter/netinet/ip_irc_pxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_log.c | 4 +-- sys/contrib/ipfilter/netinet/ip_nat.c | 18 +++++------ sys/contrib/ipfilter/netinet/ip_nat6.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_proxy.c | 6 ++-- sys/contrib/ipfilter/netinet/ip_state.c | 2 +- 13 files changed, 69 insertions(+), 71 deletions(-) diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index fbcfc8a0088f..6184502e0f58 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -333,7 +333,7 @@ typedef struct fr_info_4_1_32 { ip_t *ofin_ip; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -371,7 +371,7 @@ typedef struct fr_info_4_1_24 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -408,7 +408,7 @@ typedef struct fr_info_4_1_23 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -444,7 +444,7 @@ typedef struct fr_info_4_1_11 { ip_t *ofin_ip; mb_t **fin_mp; mb_t *fin_m; -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -933,7 +933,7 @@ typedef struct frauth_4_1_32 { fr_info_4_1_32_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -947,7 +947,7 @@ typedef struct frauth_4_1_29 { fr_info_4_1_24_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -960,7 +960,7 @@ typedef struct frauth_4_1_24 { u_32_t fra_pass; fr_info_4_1_24_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -973,7 +973,7 @@ typedef struct frauth_4_1_23 { u_32_t fra_pass; fr_info_4_1_23_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -986,7 +986,7 @@ typedef struct frauth_4_1_11 { u_32_t fra_pass; fr_info_4_1_11_t fra_info; char *fra_buf; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif @@ -2533,7 +2533,7 @@ frauth_4_1_32_to_current(old, current) fr_info_4_1_32_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2554,7 +2554,7 @@ frauth_4_1_29_to_current(old, current) fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; fra->fra_flx = old->fra_flx; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2574,7 +2574,7 @@ frauth_4_1_24_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_24_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2594,7 +2594,7 @@ frauth_4_1_23_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_23_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2614,7 +2614,7 @@ frauth_4_1_11_to_current(old, current) fra->fra_pass = old->fra_pass; fr_info_4_1_11_to_current(&old->fra_info, &fra->fra_info); fra->fra_buf = old->fra_buf; -#ifdef MENTAT +#if SOLARIS fra->fra_q = old->fra_q; fra->fra_m = old->fra_m; #endif @@ -2652,7 +2652,7 @@ fr_info_4_1_32_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2690,7 +2690,7 @@ fr_info_4_1_24_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2727,7 +2727,7 @@ fr_info_4_1_23_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -2764,7 +2764,7 @@ fr_info_4_1_11_to_current(old, current) fin->fin_ip = old->ofin_ip; fin->fin_mp = old->fin_mp; fin->fin_m = old->fin_m; -#ifdef MENTAT +#if SOLARIS fin->fin_qfm = old->fin_qfm; fin->fin_qpi = old->fin_qpi; #endif @@ -4039,7 +4039,7 @@ fr_info_current_to_4_1_24(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4079,7 +4079,7 @@ fr_info_current_to_4_1_23(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4119,7 +4119,7 @@ fr_info_current_to_4_1_11(current, old) old->ofin_ip = fin->fin_ip; old->fin_mp = fin->fin_mp; old->fin_m = fin->fin_m; -#ifdef MENTAT +#if SOLARIS old->fin_qfm = fin->fin_qfm; old->fin_qpi = fin->fin_qpi; old->fin_ifname[0] = '\0'; @@ -4141,7 +4141,7 @@ frauth_current_to_4_1_29(current, old) fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; old->fra_flx = fra->fra_flx; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4161,7 +4161,7 @@ frauth_current_to_4_1_24(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_24(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4181,7 +4181,7 @@ frauth_current_to_4_1_23(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_23(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif @@ -4201,7 +4201,7 @@ frauth_current_to_4_1_11(current, old) old->fra_pass = fra->fra_pass; fr_info_current_to_4_1_11(&fra->fra_info, &old->fra_info); old->fra_buf = fra->fra_buf; -#ifdef MENTAT +#if SOLARIS old->fra_q = fra->fra_q; old->fra_m = fra->fra_m; #endif diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index 005cd316f91a..f14cef832722 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -108,7 +108,7 @@ char *reasons[] = { "natv6_in-fail", }; -#ifdef MENTAT +#if SOLARIS static char *pidfile = "/etc/opt/ipf/ipmon.pid"; #else static char *pidfile = "/var/run/ipmon.pid"; @@ -1108,7 +1108,7 @@ static void print_ipflog(conf, buf, blen) ifname[sizeof(ipf->fl_ifname)] = '\0'; sprintf(t, "%s", ifname); t += strlen(t); -# if defined(MENTAT) +# if SOLARIS if (ISALPHA(*(t - 1))) { sprintf(t, "%d", ipf->fl_unit); t += strlen(t); diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index a79d441284bf..2dca1e754b9e 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -2805,7 +2805,7 @@ ipf_firewall(fin, passp) /* ------------------------------------------------------------------------ */ int ipf_check(ctx, ip, hlen, ifp, out -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS , qif, mp) void *qif; #else @@ -2837,7 +2837,7 @@ ipf_check(ctx, ip, hlen, ifp, out * to hold all the required packet headers. */ #ifdef _KERNEL -# ifdef MENTAT +# if SOLARIS qpktinfo_t *qpi = qif; # ifdef __sparc @@ -2854,7 +2854,7 @@ ipf_check(ctx, ip, hlen, ifp, out bzero((char *)fin, sizeof(*fin)); -# ifdef MENTAT +# if SOLARIS if (qpi->qpi_flags & QF_BROADCAST) fin->fin_flx |= FI_MBCAST|FI_BROADCAST; if (qpi->qpi_flags & QF_MULTICAST) @@ -2862,7 +2862,7 @@ ipf_check(ctx, ip, hlen, ifp, out m = qpi->qpi_m; fin->fin_qfm = m; fin->fin_qpi = qpi; -# else /* MENTAT */ +# else /* SOLARIS */ m = *mp; @@ -2895,7 +2895,7 @@ ipf_check(ctx, ip, hlen, ifp, out m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } # endif /* CSUM_DELAY_DATA */ -# endif /* MENTAT */ +# endif /* SOLARIS */ #else bzero((char *)fin, sizeof(*fin)); m = *mp; @@ -6156,7 +6156,7 @@ ipf_getifname(ifp, buffer) char *buffer; { static char namebuf[LIFNAMSIZ]; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) int unit, space; char temp[20]; char *s; @@ -6166,7 +6166,7 @@ ipf_getifname(ifp, buffer) buffer = namebuf; (void) strncpy(buffer, ifp->if_name, LIFNAMSIZ); buffer[LIFNAMSIZ - 1] = '\0'; -# if defined(MENTAT) || defined(__FreeBSD__) +# if SOLARIS || defined(__FreeBSD__) for (s = buffer; *s; s++) ; unit = ifp->if_unit; @@ -6916,7 +6916,7 @@ ipf_coalesce(fin) DT1(frb_coalesce, fr_info_t *, fin); LBUMP(ipf_stats[fin->fin_out].fr_badcoalesces); -# ifdef MENTAT +# if SOLARIS FREE_MB_T(*fin->fin_mp); # endif fin->fin_reason = FRB_COALESCE; @@ -8397,7 +8397,7 @@ ipf_ipf_ioctl(softc, data, cmd, mode, uid, ctx) error = EPERM; } else { WRITE_ENTER(&softc->ipf_global); -#if (defined(MENTAT) && defined(_KERNEL)) && !defined(INSTANCES) +#if (SOLARIS && defined(_KERNEL)) && !defined(INSTANCES) error = ipfsync(); #else ipf_sync(softc, NULL); @@ -8570,7 +8570,7 @@ ipf_decaps(fin, pass, l5proto) fino = fin; fin = &fin2; elen = hlen; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += elen; #else m->m_data += elen; @@ -8609,7 +8609,7 @@ ipf_decaps(fin, pass, l5proto) if (ipf_makefrip(hlen, ip, fin) == -1) { cantdecaps2: if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; @@ -8642,7 +8642,7 @@ cantdecaps: fino->fin_m = fin->fin_m; m = fin->fin_m; if (m != NULL) { -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr -= elen; #else m->m_data -= elen; diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index 4864a8128494..c40bb1b435f2 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -94,7 +94,7 @@ #include #include "netinet/ip_fil.h" #include "netinet/ip_auth.h" -#if !defined(MENTAT) +#if !SOLARIS # include # ifdef __FreeBSD__ # include @@ -466,7 +466,7 @@ ipf_auth_new(m, fin) { ipf_main_softc_t *softc = fin->fin_main_soft; ipf_auth_softc_t *softa = softc->ipf_auth_soft; -#if defined(_KERNEL) && defined(MENTAT) +#if defined(_KERNEL) && SOLARIS qpktinfo_t *qpi = fin->fin_qpi; #endif frauth_t *fra; @@ -508,7 +508,7 @@ ipf_auth_new(m, fin) * them. */ ip = fin->fin_ip; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) if ((ip == (ip_t *)m->b_rptr) && (fin->fin_v == 4)) # endif { diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/sys/contrib/ipfilter/netinet/ip_auth.h index e914dacacdf0..17df74c31de6 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.h +++ b/sys/contrib/ipfilter/netinet/ip_auth.h @@ -22,7 +22,7 @@ typedef struct frauth { fr_info_t fra_info; char *fra_buf; u_32_t fra_flx; -#ifdef MENTAT +#if SOLARIS queue_t *fra_q; mb_t *fra_m; #endif diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index 39b94460d3b7..d8c41b4076d9 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -447,7 +447,7 @@ typedef struct ip6_hdr ip6_t; #endif #if defined(_KERNEL) -# if defined(MENTAT) && !defined(INSTANCES) +# if SOLARIS && !defined(INSTANCES) # define COPYDATA mb_copydata # define COPYBACK mb_copyback # else diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 0b5fc7285f93..72def439b3e8 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -402,7 +402,7 @@ typedef struct fr_info { } fin_ipu; mb_t **fin_mp; /* pointer to pointer to mbuf */ mb_t *fin_m; /* pointer to mbuf */ -#ifdef MENTAT +#if SOLARIS mb_t *fin_qfm; /* pointer to mblk where pkt starts */ void *fin_qpi; char fin_ifname[LIFNAMSIZ]; @@ -1626,8 +1626,7 @@ extern void ipfilterattach(int); # endif extern int ipl_enable(void); extern int ipl_disable(void); -# ifdef MENTAT -/* XXX MENTAT is always defined for Solaris */ +# if SOLARIS extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, void *, mblk_t **); # if SOLARIS @@ -1635,8 +1634,7 @@ extern void ipf_prependmbt(fr_info_t *, mblk_t *); extern int ipfioctl(dev_t, int, intptr_t, int, cred_t *, int *); # endif extern int ipf_qout(queue_t *, mblk_t *); -# else /* MENTAT */ -/* XXX MENTAT is never defined for FreeBSD & NetBSD */ +# else /* SOLARIS */ extern int ipf_check(void *, struct ip *, int, struct ifnet *, int, mb_t **); extern int (*fr_checkp)(ip_t *, int, void *, int, mb_t **); extern size_t mbufchainlen(mb_t *); @@ -1648,7 +1646,7 @@ extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif -# endif /* MENTAT */ +# endif /* SOLARIS */ # if defined(__FreeBSD_version) extern int ipf_pfil_hook(void); diff --git a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c index 304fe0c35351..4446b2100645 100644 --- a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_irc_pxy.c @@ -267,7 +267,7 @@ ipf_p_irc_send(fin, nat) u_int a1; ip_t *ip; mb_t *m; -#ifdef MENTAT +#if SOLARIS mb_t *m1; #endif softc = fin->fin_main_soft; @@ -322,7 +322,7 @@ ipf_p_irc_send(fin, nat) if ((inc + fin->fin_plen) > 65535) return 0; -#ifdef MENTAT +#if SOLARIS for (m1 = m; m1->b_cont; m1 = m1->b_cont) ; if ((inc > 0) && (m1->b_datap->db_lim - m1->b_wptr < inc)) { @@ -357,7 +357,7 @@ ipf_p_irc_send(fin, nat) fin->fin_flx |= FI_DOCKSUM; if (inc != 0) { -#if defined(MENTAT) +#if SOLARIS register u_32_t sum1, sum2; sum1 = fin->fin_plen; diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index 76d2e3def1fa..e5bf6a78bf1b 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -488,7 +488,7 @@ ipf_log_pkt(fin, flags) ptrs[0] = (void *)&ipfl; sizes[0] = sizeof(ipfl); types[0] = 0; -# if defined(MENTAT) && defined(_KERNEL) +# if SOLARIS && defined(_KERNEL) /* * Are we copied from the mblk or an aligned array ? */ @@ -505,7 +505,7 @@ ipf_log_pkt(fin, flags) ptrs[1] = m; sizes[1] = hlen + mlen; types[1] = 1; -# endif /* MENTAT */ +# endif /* SOLARIS */ return ipf_log_items(softc, IPL_LOGIPF, fin, ptrs, sizes, types, 2); } diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index 04fef4620c12..f79393a7ac25 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -3661,7 +3661,7 @@ ipf_nat_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -5116,7 +5116,7 @@ ipf_nat_out(fin, nat, natadd, nflags) ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, msumd, 0); } -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) else { /* @@ -5179,7 +5179,7 @@ ipf_nat_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -5228,7 +5228,7 @@ ipf_nat_out(fin, nat, natadd, nflags) uh = (udphdr_t *)(ip + 1); uh->uh_ulen += fin->fin_plen; uh->uh_ulen = htons(uh->uh_ulen); -#if !defined(_KERNEL) || defined(MENTAT) || \ +#if !defined(_KERNEL) || SOLARIS || \ defined(BRIDGE_IPF) || defined(__FreeBSD__) ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif @@ -5631,7 +5631,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_ndstip; fin->fin_daddr = nat->nat_ndstaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5648,7 +5648,7 @@ ipf_nat_in(fin, nat, natadd, nflags) } fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_incksum(0, &fin->fin_ip->ip_sum, ipsumd, 0); #endif break; @@ -5680,7 +5680,7 @@ ipf_nat_in(fin, nat, natadd, nflags) sum2 += ntohs(ip->ip_off) & IP_DF; CALC_SUMD(sum1, sum2, sumd); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &ip->ip_sum, sumd, 0); #endif PREP_MB_T(fin, m); @@ -5706,7 +5706,7 @@ ipf_nat_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -7429,7 +7429,7 @@ ipf_nat_decap(fin, nat) CALC_SUMD(sum1, sum2, sumd); fin->fin_ip->ip_dst = nat->nat_osrcip; fin->fin_daddr = nat->nat_osrcaddr; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS ipf_fix_outcksum(0, &fin->fin_ip->ip_sum, sumd, 0); #endif } diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 388ee9a67e73..b2713aec812a 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -1434,7 +1434,7 @@ ipf_nat6_icmperrorlookup(fin, dir) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip6 + fin->fin_dlen - ICMPERR_ICMPHLEN > (char *)m->b_wptr) { ATOMIC_INCL(nside->ns_icmp_mbuf); @@ -2858,7 +2858,7 @@ ipf_nat6_out(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; @@ -3321,7 +3321,7 @@ ipf_nat6_in(fin, nat, natadd, nflags) m = fin->fin_m; -#if defined(MENTAT) && defined(_KERNEL) +#if SOLARIS && defined(_KERNEL) m->b_rptr += skip; #else m->m_data += skip; diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 227ca817f6e4..2c6b4eb6369d 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -914,7 +914,7 @@ ipf_proxy_check(fin, nat) ip_t *ip; short rv; int err; -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS u_32_t s1, s2, sd; #endif @@ -942,7 +942,7 @@ ipf_proxy_check(fin, nat) * If there is data in this packet to be proxied then try and * get it all into the one buffer, else drop it. */ -#if defined(MENTAT) || defined(HAVE_M_PULLDOWN) +#if SOLARIS || defined(HAVE_M_PULLDOWN) if ((fin->fin_dlen > 0) && !(fin->fin_flx & FI_COALESCE)) if (ipf_coalesce(fin) == -1) { if (softp->ips_proxy_debug & 0x08) @@ -1006,7 +1006,7 @@ ipf_proxy_check(fin, nat) * packet. */ adjlen = APR_INC(err); -#if !defined(_KERNEL) || defined(MENTAT) +#if !defined(_KERNEL) || SOLARIS s1 = LONG_SUM(fin->fin_plen - adjlen); s2 = LONG_SUM(fin->fin_plen); CALC_SUMD(s1, s2, sd); diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index 45a641fd86a2..a050a2d324d2 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -2739,7 +2739,7 @@ ipf_checkicmpmatchingstate(fin) mb_t *m; m = fin->fin_m; -# if defined(MENTAT) +# if SOLARIS if ((char *)oip + len > (char *)m->b_wptr) { SBUMPDX(ipf_state_stats, iss_icmp_short, iss_icmp_short_2); return NULL; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D6BBC5411E0; Tue, 16 Feb 2021 00:47: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 4Dfj3w3GwLz4Svq; Tue, 16 Feb 2021 00:47: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 1357827790; Tue, 16 Feb 2021 00:47: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 11G0lKB1006758; Tue, 16 Feb 2021 00:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lKwu006757; Tue, 16 Feb 2021 00:47:20 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:20 GMT Message-Id: <202102160047.11G0lKwu006757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 466d2c6aa08d - stable/11 - MFC 10990cb46027b4cc4339540b1217117863b2cd15: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 466d2c6aa08d17d2a8617242529ee0657e763e5f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:25 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=466d2c6aa08d17d2a8617242529ee0657e763e5f commit 466d2c6aa08d17d2a8617242529ee0657e763e5f Author: Cy Schubert AuthorDate: 2021-02-03 03:24:05 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC 10990cb46027b4cc4339540b1217117863b2cd15: Simplify FreeBSD check. (cherry picked from commit 10990cb46027b4cc4339540b1217117863b2cd15) --- contrib/ipfilter/ipsend/sbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 97559650f3b4..9b4f20c3fea9 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#if (__FreeBSD_version >= 300000) +#ifdef __FreeBSD_version # include #else # include From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0C1A85410F6; Tue, 16 Feb 2021 00:47: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 4Dfj3v4Syhz4Snb; Tue, 16 Feb 2021 00:47: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 C8BFC27530; Tue, 16 Feb 2021 00:47: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 11G0lJlX006738; Tue, 16 Feb 2021 00:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lJTW006737; Tue, 16 Feb 2021 00:47:19 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:19 GMT Message-Id: <202102160047.11G0lJTW006737@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ba6bb2487a7e - stable/11 - MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: ba6bb2487a7e159556d8ef9ba773fb4fa65dd823 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:24 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ba6bb2487a7e159556d8ef9ba773fb4fa65dd823 commit ba6bb2487a7e159556d8ef9ba773fb4fa65dd823 Author: Cy Schubert AuthorDate: 2021-02-03 03:18:48 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:48 +0000 MFC e673debe7db8ba95e4ee3b549d2570e71d19b596: Simplify BSD macro tests. All FreeBSD and NetBSD are BSD >= 199306 and have been for a long time. (cherry picked from commit e673debe7db8ba95e4ee3b549d2570e71d19b596) --- contrib/ipfilter/ipsend/sbpf.c | 3 --- contrib/ipfilter/ipsend/sock.c | 4 ---- contrib/ipfilter/man/ipf.4 | 4 ++-- contrib/ipfilter/tools/ipfsyncd.c | 2 +- contrib/ipfilter/tools/ipmon.c | 2 +- sys/contrib/ipfilter/netinet/ip_compat.h | 4 ++-- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 4 ---- sys/contrib/ipfilter/netinet/ip_log.c | 2 +- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 8 -------- 9 files changed, 7 insertions(+), 26 deletions(-) diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index fcb66bc9ca2f..97559650f3b4 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,9 +12,6 @@ #include #include #include -#if BSD < 199103 -#include -#endif #if (__FreeBSD_version >= 300000) # include #else diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index 839cc0459d23..a96391a5cdcb 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -93,11 +93,7 @@ struct proc *proc; #endif -#if BSD < 199103 -static struct proc *getproc(void); -#else static struct kinfo_proc *getproc(void); -#endif int kmemcpy(buf, pos, n) diff --git a/contrib/ipfilter/man/ipf.4 b/contrib/ipfilter/man/ipf.4 index 9b82e01bfc76..73a17a0cc8d3 100644 --- a/contrib/ipfilter/man/ipf.4 +++ b/contrib/ipfilter/man/ipf.4 @@ -60,7 +60,7 @@ typedef struct frentry { struct frentry *fr_grp; int fr_ref; /* reference count - for grouping */ void *fr_ifa; -#if BSD >= 199306 +#ifdef BSD void *fr_oifa; #endif /* @@ -93,7 +93,7 @@ typedef struct frentry { int (*fr_func)(int, ip_t *, fr_info_t *)); char fr_icode; /* return ICMP code */ char fr_ifname[IFNAMSIZ]; -#if BSD > 199306 +#ifdef BSD char fr_oifname[IFNAMSIZ]; #endif struct frdest fr_tif; /* "to" interface */ diff --git a/contrib/ipfilter/tools/ipfsyncd.c b/contrib/ipfilter/tools/ipfsyncd.c index 0ccc15542f6b..a75075059763 100644 --- a/contrib/ipfilter/tools/ipfsyncd.c +++ b/contrib/ipfilter/tools/ipfsyncd.c @@ -131,7 +131,7 @@ main(argc, argv) if (!debuglevel) { -#if BSD >= 199306 +#ifdef BSD daemon(0, 0); #else int fd = open("/dev/null", O_RDWR); diff --git a/contrib/ipfilter/tools/ipmon.c b/contrib/ipfilter/tools/ipmon.c index f14cef832722..9022f12b6149 100644 --- a/contrib/ipfilter/tools/ipmon.c +++ b/contrib/ipfilter/tools/ipmon.c @@ -1702,7 +1702,7 @@ int main(argc, argv) if (make_daemon && ((config.log != stdout) || (ipmonopts & IPMON_SYSLOG))) { -#if BSD >= 199306 +#ifdef BSD daemon(0, !(ipmonopts & IPMON_SYSLOG)); #else int pid; diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index d8c41b4076d9..c5d897a59cdf 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -423,12 +423,12 @@ extern mb_t *allocmbt(size_t); # define USE_QUAD_T # define U_QUAD_T unsigned long long # define QUAD_T long long -#else /* BSD > 199306 */ +#else /* BSD */ # if !defined(U_QUAD_T) # define U_QUAD_T u_long # define QUAD_T long # endif -#endif /* BSD > 199306 */ +#endif /* BSD */ #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index d819d6301454..900bb7578adb 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -294,14 +294,12 @@ ipfioctl(dev, cmd, data, mode, p) SPL_INT(s); CURVNET_SET(TD_TO_VNET(p)); -#if (BSD >= 199306) if (securelevel_ge(p->p_cred, 3) && (mode & FWRITE)) { V_ipfmain.ipf_interror = 130001; CURVNET_RESTORE(); return EPERM; } -#endif unit = GET_MINOR(dev); if ((IPL_LOGMAX < unit) || (unit < 0)) { @@ -388,11 +386,9 @@ ipf_send_reset(fin) } m->m_len = sizeof(*tcp2) + hlen; -#if (BSD >= 199103) m->m_data += max_linkhdr; m->m_pkthdr.len = m->m_len; m->m_pkthdr.rcvif = (struct ifnet *)0; -#endif ip = mtod(m, struct ip *); bzero((char *)ip, hlen); #ifdef USE_INET6 diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index e5bf6a78bf1b..d7acaf1ebf4e 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -734,7 +734,7 @@ ipf_log_read(softc, unit, uio) return EIO; } -# if (defined(BSD) && (BSD >= 199101)) || defined(__FreeBSD__) +# if defined(BSD) uio->uio_rw = UIO_READ; # endif diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index 309b99e80a9c..ea45fded1e5e 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -545,12 +545,8 @@ static int ipfclose(dev, flags * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfread(dev, uio, ioflag) int ioflag; -#else -static int ipfread(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else @@ -592,12 +588,8 @@ static int ipfread(dev, uio) * called during packet processing and cause an inconsistancy to appear in * the filter lists. */ -#if (BSD >= 199306) static int ipfwrite(dev, uio, ioflag) int ioflag; -#else -static int ipfwrite(dev, uio) -#endif #ifdef __FreeBSD_version struct cdev *dev; #else From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4D9315413CC; Tue, 16 Feb 2021 00:47: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 4Dfj3y5lyXz4Sw1; Tue, 16 Feb 2021 00:47: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 1027E2727E; Tue, 16 Feb 2021 00:47:22 +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 11G0lLTK006778; Tue, 16 Feb 2021 00:47:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lL1C006777; Tue, 16 Feb 2021 00:47:21 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:21 GMT Message-Id: <202102160047.11G0lL1C006777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: e7a431c229ea - stable/11 - MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: e7a431c229eafe52240f4a62e6d87a4b8187c351 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:27 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e7a431c229eafe52240f4a62e6d87a4b8187c351 commit e7a431c229eafe52240f4a62e6d87a4b8187c351 Author: Cy Schubert AuthorDate: 2021-02-05 14:26:04 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC 344f1083e128d8d41ca31853dac513ca3efd9d1f: ipfilter: Use the softn (NAT softc) host map size in ip_nat6 calculation. The ipfilter NAT table host map size is a tunable that defaults to a macro value defined at build time. HOSTMAP_SIZE is saved in softn (the ipnat softc) at initialization. It can be tuned (changed) at runtime using the ipf -T command. If the hostmap_size tunable is adjusted the calculation to determine where to put new entries in the table was incorrect. Use the tunable in the NAT softc instead of the static build time value. (cherry picked from commit 344f1083e128d8d41ca31853dac513ca3efd9d1f) --- sys/contrib/ipfilter/netinet/ip_nat6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index b2713aec812a..13fa6fb6bc30 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -390,7 +390,7 @@ ipf_nat6_hostmap(softn, np, src, dst, map, port) hv += dst->i6[2]; hv += dst->i6[1]; hv += dst->i6[0]; - hv %= HOSTMAP_SIZE; + hv %= softn->ipf_nat_hostmap_sz; for (hm = softn->ipf_hm_maptable[hv]; hm; hm = hm->hm_next) if (IP6_EQ(&hm->hm_osrc6, src) && IP6_EQ(&hm->hm_odst6, dst) && From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A464541503; Tue, 16 Feb 2021 00:47: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 4Dfj411DRNz4Sw9; Tue, 16 Feb 2021 00:47: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 46AC92727F; Tue, 16 Feb 2021 00:47: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 11G0lOcA006822; Tue, 16 Feb 2021 00:47:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lOC4006821; Tue, 16 Feb 2021 00:47:24 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:24 GMT Message-Id: <202102160047.11G0lOC4006821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: 62607e8680e9 - stable/11 - MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 62607e8680e944f89cd7b5b7bca10698c66908b2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:32 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=62607e8680e944f89cd7b5b7bca10698c66908b2 commit 62607e8680e944f89cd7b5b7bca10698c66908b2 Author: Cy Schubert AuthorDate: 2021-02-07 03:22:52 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:50 +0000 MFC 57785538c6e0d7e8ca0f161ab95bae10fd304047 and 1e811efbc591699b872bea42b9de419c373199df: 57785538c6e0d7e8ca0f161ab95bae10fd304047) Simplify the FreeBSD check using __FreeBSD__ compiler macro. Rather than rely on __FreeBSD_version, defined in sys/param.h, use __FreeBSD__ defined by the compiler. Reported by: emaste MFC after: 1 week (cherry picked from commit 57785538c6e0d7e8ca0f161ab95bae10fd304047) 1e811efbc591699b872bea42b9de419c373199df: Fix non-IPv6 build post 57785538c6e0d7e8ca0f161ab95bae10fd304047. 57785538c6e0d7e8ca0f161ab95bae10fd304047 change the test for FreeBSD from __FreeBSD_version to __FreeBSD__. However this test was performed before sys/param.h was included, therefore __FreeBSD_version was never defined. As the test was never true opt_random_ip_id.h was never included. Submitted by: bdragon Reported by: bdragon (cherry picked from commit 1e811efbc591699b872bea42b9de419c373199df) --- contrib/ipfilter/ip_dstlist.c | 2 +- contrib/ipfilter/ip_fil_compat.c | 2 +- contrib/ipfilter/ipf.h | 2 +- contrib/ipfilter/ipsend/sbpf.c | 2 +- contrib/ipfilter/ipsend/sock.c | 2 +- sys/contrib/ipfilter/netinet/fil.c | 6 +++--- sys/contrib/ipfilter/netinet/ip_auth.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_compat.h | 6 +++--- sys/contrib/ipfilter/netinet/ip_dstlist.c | 2 +- sys/contrib/ipfilter/netinet/ip_fil.h | 8 ++++---- sys/contrib/ipfilter/netinet/ip_fil_freebsd.c | 8 ++------ sys/contrib/ipfilter/netinet/ip_frag.c | 2 +- sys/contrib/ipfilter/netinet/ip_htable.c | 2 +- sys/contrib/ipfilter/netinet/ip_log.c | 12 ++++++------ sys/contrib/ipfilter/netinet/ip_lookup.c | 2 +- sys/contrib/ipfilter/netinet/ip_nat.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_nat6.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_pool.c | 2 +- sys/contrib/ipfilter/netinet/ip_proxy.c | 10 +++++----- sys/contrib/ipfilter/netinet/ip_rules.c | 2 +- sys/contrib/ipfilter/netinet/ip_state.c | 8 ++++---- sys/contrib/ipfilter/netinet/ip_sync.c | 6 +++--- sys/contrib/ipfilter/netinet/mlfk_ipl.c | 18 +++++++++--------- 23 files changed, 63 insertions(+), 67 deletions(-) diff --git a/contrib/ipfilter/ip_dstlist.c b/contrib/ipfilter/ip_dstlist.c index 14b071b0b95f..2802ef694aa9 100644 --- a/contrib/ipfilter/ip_dstlist.c +++ b/contrib/ipfilter/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/contrib/ipfilter/ip_fil_compat.c b/contrib/ipfilter/ip_fil_compat.c index 6184502e0f58..0b426f5d9c48 100644 --- a/contrib/ipfilter/ip_fil_compat.c +++ b/contrib/ipfilter/ip_fil_compat.c @@ -14,7 +14,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/contrib/ipfilter/ipf.h b/contrib/ipfilter/ipf.h index c7f7308a9ba9..e178cfc1676e 100644 --- a/contrib/ipfilter/ipf.h +++ b/contrib/ipfilter/ipf.h @@ -172,7 +172,7 @@ typedef struct proxyrule { } proxyrule_t; -#if defined(__NetBSD__) || defined(__FreeBSD_version) || \ +#if defined(__NetBSD__) || defined(__FreeBSD__) || \ SOLARIS # include typedef int (* ioctlfunc_t)(int, ioctlcmd_t, ...); diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 9b4f20c3fea9..f3b8d2f37775 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -12,7 +12,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #else # include diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index a96391a5cdcb..159060cf0e99 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -166,7 +166,7 @@ struct tcpcb *find_tcp(tfd, ti) fd = (struct filedesc *)malloc(sizeof(*fd)); if (fd == NULL) return NULL; -#if defined( __FreeBSD_version) +#if defined( __FreeBSD__) if (KMCPY(fd, p->ki_fd, sizeof(*fd)) == -1) { fprintf(stderr, "read(%#lx,%#lx) failed\n", diff --git a/sys/contrib/ipfilter/netinet/fil.c b/sys/contrib/ipfilter/netinet/fil.c index 2dca1e754b9e..09b4c27a1cb4 100644 --- a/sys/contrib/ipfilter/netinet/fil.c +++ b/sys/contrib/ipfilter/netinet/fil.c @@ -20,7 +20,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # if !defined(IPFILTER_LKM) # include "opt_inet6.h" # endif @@ -91,7 +91,7 @@ #if defined(IPFILTER_BPF) && defined(_KERNEL) # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include "netinet/ipl.h" @@ -2886,7 +2886,7 @@ ipf_check(ctx, ip, hlen, ifp, out */ m->m_flags &= ~M_CANFASTFWD; # endif /* M_CANFASTFWD */ -# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD_version) +# if defined(CSUM_DELAY_DATA) && !defined(__FreeBSD__) /* * disable delayed checksums. */ diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/sys/contrib/ipfilter/netinet/ip_auth.c index c40bb1b435f2..881dab1aaea8 100644 --- a/sys/contrib/ipfilter/netinet/ip_auth.c +++ b/sys/contrib/ipfilter/netinet/ip_auth.c @@ -27,7 +27,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -50,7 +50,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__NetBSD__) @@ -81,7 +81,7 @@ # undef KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # define IF_QFULL _IF_QFULL # define IF_DROP _IF_DROP @@ -100,7 +100,7 @@ # include # endif #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h index c5d897a59cdf..300d052209a7 100644 --- a/sys/contrib/ipfilter/netinet/ip_compat.h +++ b/sys/contrib/ipfilter/netinet/ip_compat.h @@ -101,7 +101,7 @@ * There may be other, safe, kernels but this is not extensively tested yet. */ # define HAVE_M_PULLDOWN -# if !defined(IPFILTER_LKM) && defined(__FreeBSD_version) +# if !defined(IPFILTER_LKM) && defined(__FreeBSD__) # include "opt_ipfilter.h" # endif # define COPYIN(a,b,c) copyin((caddr_t)(a), (caddr_t)(b), (c)) @@ -281,7 +281,7 @@ typedef union { #define ipf_isw ipf_lkun_s.ipf_sw #define ipf_magic ipf_lkun_s.ipf_magic -#if !defined(__GNUC__) || defined(__FreeBSD_version) +#if !defined(__GNUC__) || defined(__FreeBSD__) # ifndef INLINE # define INLINE # endif @@ -289,7 +289,7 @@ typedef union { # define INLINE __inline__ #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) CTASSERT(sizeof(ipfrwlock_t) == KRWLOCK_FILL_SZ); CTASSERT(sizeof(ipfmutex_t) == KMUTEX_FILL_SZ); #endif diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index 11e1a1846d89..af584d8e4d72 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -41,7 +41,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 72def439b3e8..8cb988e1fd17 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -1374,7 +1374,7 @@ typedef struct ipftune { ** HPUX Port */ -#if !defined(CDEV_MAJOR) && defined (__FreeBSD_version) +#if !defined(CDEV_MAJOR) && defined (__FreeBSD__) # define CDEV_MAJOR 79 #endif @@ -1567,7 +1567,7 @@ typedef struct ipf_main_softc_s { frentry_t *ipf_rule_explist[2]; ipftoken_t *ipf_token_head; ipftoken_t **ipf_token_tail; -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) struct callout ipf_slow_ch; #endif #if NETBSD_GE_REV(104040000) @@ -1641,14 +1641,14 @@ extern size_t mbufchainlen(mb_t *); # ifdef IPFILTER_LKM extern int ipf_identify(char *); # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipfioctl(struct cdev*, u_long, caddr_t, int, struct thread *); # elif defined(__NetBSD__) extern int ipfioctl(dev_t, u_long, void *, int, struct lwp *); # endif # endif /* SOLARIS */ -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) extern int ipf_pfil_hook(void); extern int ipf_pfil_unhook(void); extern void ipf_event_reg(void); diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c index 900bb7578adb..e8d96524b859 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c +++ b/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c @@ -16,14 +16,10 @@ static const char rcsid[] = "@(#)$Id$"; # define KERNEL 1 # define _KERNEL 1 #endif -#if defined(__FreeBSD_version) && \ +#if defined(__FreeBSD__) && \ !defined(KLD_MODULE) && !defined(IPFILTER_LKM) # include "opt_inet6.h" #endif -#if defined(__FreeBSD_version) && \ - !defined(KLD_MODULE) && !defined(IPFILTER_LKM) -# include "opt_random_ip_id.h" -#endif #include #include #include @@ -33,7 +29,7 @@ static const char rcsid[] = "@(#)$Id$"; #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/sys/contrib/ipfilter/netinet/ip_frag.c index 0636f27c81e8..93bcc2ed9415 100644 --- a/sys/contrib/ipfilter/netinet/ip_frag.c +++ b/sys/contrib/ipfilter/netinet/ip_frag.c @@ -24,7 +24,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/sys/contrib/ipfilter/netinet/ip_htable.c index bd76c2b5b0be..bd1a7136086f 100644 --- a/sys/contrib/ipfilter/netinet/ip_htable.c +++ b/sys/contrib/ipfilter/netinet/ip_htable.c @@ -24,7 +24,7 @@ # undef _KERNEL #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #if defined(__FreeBSD__) diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/sys/contrib/ipfilter/netinet/ip_log.c index d7acaf1ebf4e..7a80b3e0d4e7 100644 --- a/sys/contrib/ipfilter/netinet/ip_log.c +++ b/sys/contrib/ipfilter/netinet/ip_log.c @@ -39,7 +39,7 @@ # undef _KERNEL # undef KERNEL #endif -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else @@ -52,12 +52,12 @@ # include # endif #endif /* _KERNEL */ -# if defined(NetBSD) || defined(__FreeBSD_version) +# if defined(NetBSD) || defined(__FreeBSD__) # include # include # include # endif -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) # include # endif #if SOLARIS && defined(_KERNEL) @@ -78,7 +78,7 @@ #ifdef sun # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include @@ -102,7 +102,7 @@ #include "netinet/ip_frag.h" #include "netinet/ip_state.h" #include "netinet/ip_auth.h" -#if defined(__FreeBSD_version) || defined(__NetBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) # include #endif /* END OF INCLUDES */ @@ -443,7 +443,7 @@ ipf_log_pkt(fin, flags) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else # if (defined(NetBSD) && (NetBSD <= 1991011) && (NetBSD >= 199603)) || \ - defined(__FreeBSD_version) + defined(__FreeBSD__) COPYIFNAME(fin->fin_v, ifp, ipfl.fl_ifname); # else ipfl.fl_unit = (u_int)ifp->if_unit; diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.c b/sys/contrib/ipfilter/netinet/ip_lookup.c index f25174a752ec..66dec84944a1 100644 --- a/sys/contrib/ipfilter/netinet/ip_lookup.c +++ b/sys/contrib/ipfilter/netinet/ip_lookup.c @@ -15,7 +15,7 @@ #include #include #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) # include # include #else diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/sys/contrib/ipfilter/netinet/ip_nat.c index f79393a7ac25..6c6479dd1616 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat.c +++ b/sys/contrib/ipfilter/netinet/ip_nat.c @@ -31,7 +31,7 @@ struct file; # include # undef KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -55,11 +55,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -90,7 +90,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H @@ -1017,7 +1017,7 @@ ipf_nat_ioctl(softc, data, cmd, mode, uid, ctx) KAUTH_REQ_NETWORK_FIREWALL_FW, NULL, NULL, NULL)) # else -# if defined(__FreeBSD_version) +# if defined(__FreeBSD__) if (securelevel_ge(curthread->td_ucred, 3) && (mode & FWRITE)) # else if ((securelevel >= 3) && (mode & FWRITE)) diff --git a/sys/contrib/ipfilter/netinet/ip_nat6.c b/sys/contrib/ipfilter/netinet/ip_nat6.c index 13fa6fb6bc30..921eefc0ea3f 100644 --- a/sys/contrib/ipfilter/netinet/ip_nat6.c +++ b/sys/contrib/ipfilter/netinet/ip_nat6.c @@ -29,7 +29,7 @@ struct file; # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -53,11 +53,11 @@ struct file; # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef sun @@ -88,7 +88,7 @@ extern struct ifnet vpnif; #include "netinet/ip_lookup.h" #include "netinet/ip_dstlist.h" #include "netinet/ip_sync.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif #ifdef HAS_SYS_MD5_H diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/sys/contrib/ipfilter/netinet/ip_pool.c index 51d810baa310..fdd83ebd977f 100644 --- a/sys/contrib/ipfilter/netinet/ip_pool.c +++ b/sys/contrib/ipfilter/netinet/ip_pool.c @@ -38,7 +38,7 @@ # include # include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index 2c6b4eb6369d..b4773bb6f358 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -29,7 +29,7 @@ # include #include #if defined(_KERNEL) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # endif # include @@ -37,7 +37,7 @@ # include # endif #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -51,11 +51,11 @@ # include # include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include #endif #include -#if defined(__FreeBSD_version) && defined(_KERNEL) +#if defined(__FreeBSD__) && defined(_KERNEL) #include #else #define CURVNET_SET(arg) @@ -80,7 +80,7 @@ #include "netinet/ip_nat.h" #include "netinet/ip_state.h" #include "netinet/ip_proxy.h" -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include #endif diff --git a/sys/contrib/ipfilter/netinet/ip_rules.c b/sys/contrib/ipfilter/netinet/ip_rules.c index 2fb61e9d91bf..fcf6923adeb3 100644 --- a/sys/contrib/ipfilter/netinet/ip_rules.c +++ b/sys/contrib/ipfilter/netinet/ip_rules.c @@ -12,7 +12,7 @@ #include #include #include -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # if defined(_KERNEL) # include # else diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/sys/contrib/ipfilter/netinet/ip_state.c index a050a2d324d2..0ebebb49297d 100644 --- a/sys/contrib/ipfilter/netinet/ip_state.c +++ b/sys/contrib/ipfilter/netinet/ip_state.c @@ -19,7 +19,7 @@ #include #include #include -#if defined(_KERNEL) && defined(__FreeBSD_version) && \ +#if defined(_KERNEL) && defined(__FreeBSD__) && \ !defined(KLD_MODULE) #include "opt_inet6.h" #endif @@ -31,7 +31,7 @@ # include # undef _KERNEL #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -82,7 +82,7 @@ #ifdef USE_INET6 #include #endif -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include @@ -307,7 +307,7 @@ ipf_state_seed_alloc(u_int state_size, u_int state_max) /* * XXX - ipf_state_seed[X] should be a random number of sorts. */ -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ state_seed[i] = arc4random(); #else state_seed[i] = ((u_long)state_seed + i) * state_size; diff --git a/sys/contrib/ipfilter/netinet/ip_sync.c b/sys/contrib/ipfilter/netinet/ip_sync.c index f95cd824544b..66bf88e877f0 100644 --- a/sys/contrib/ipfilter/netinet/ip_sync.c +++ b/sys/contrib/ipfilter/netinet/ip_sync.c @@ -30,14 +30,14 @@ # include # endif # include -# ifdef __FreeBSD_version +# ifdef __FreeBSD__ # include # endif #endif #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000) # include #endif -#if defined(_KERNEL) && defined(__FreeBSD_version) +#if defined(_KERNEL) && defined(__FreeBSD__) # include # include #else @@ -79,7 +79,7 @@ #ifdef USE_INET6 #include #endif -#if defined(__FreeBSD_version) +#if defined(__FreeBSD__) # include # if defined(_KERNEL) && !defined(IPFILTER_LKM) # include diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c index ea45fded1e5e..c79b5225c1f4 100644 --- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c +++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c @@ -22,7 +22,7 @@ #include #include #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include # include # ifdef _KERNEL @@ -52,7 +52,7 @@ VNET_DECLARE(ipf_main_softc_t, ipfmain); #define V_ipfmain VNET(ipfmain) -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static struct cdev *ipf_devs[IPL_LOGSIZE]; #else static dev_t ipf_devs[IPL_LOGSIZE]; @@ -68,7 +68,7 @@ static int ipf_modunload(void); static int ipf_fbsd_sysctl_create(void); static int ipf_fbsd_sysctl_destroy(void); -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ static int ipfopen(struct cdev*, int, int, struct thread *); static int ipfclose(struct cdev*, int, int, struct thread *); static int ipfread(struct cdev*, struct uio *, int); @@ -129,7 +129,7 @@ SYSCTL_IPF(_net_inet_ipf, OID_AUTO, fr_minttl, CTLFLAG_RW, &VNET_NAME(ipfmain.ip #define CDEV_MAJOR 79 #include -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ # include static int ipfpoll(struct cdev *dev, int events, struct thread *td); @@ -426,7 +426,7 @@ sysctl_ipf_int_frag ( SYSCTL_HANDLER_ARGS ) static int -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ ipfpoll(struct cdev *dev, int events, struct thread *td) #else ipfpoll(dev_t dev, int events, struct proc *td) @@ -479,7 +479,7 @@ ipfpoll(dev_t dev, int events, struct proc *td) * routines below for saving IP headers to buffer */ static int ipfopen(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -519,7 +519,7 @@ static int ipfopen(dev, flags static int ipfclose(dev, flags -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ , devtype, p) int devtype; struct thread *p; @@ -547,7 +547,7 @@ static int ipfclose(dev, flags */ static int ipfread(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; @@ -590,7 +590,7 @@ static int ipfread(dev, uio, ioflag) */ static int ipfwrite(dev, uio, ioflag) int ioflag; -#ifdef __FreeBSD_version +#ifdef __FreeBSD__ struct cdev *dev; #else dev_t dev; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 00:47:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E96F75413CF; Tue, 16 Feb 2021 00:47: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 4Dfj3z5XQrz4Sym; Tue, 16 Feb 2021 00:47: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 2E5F92706B; Tue, 16 Feb 2021 00:47: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 11G0lNQX006800; Tue, 16 Feb 2021 00:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G0lNdv006799; Tue, 16 Feb 2021 00:47:23 GMT (envelope-from git) Date: Tue, 16 Feb 2021 00:47:23 GMT Message-Id: <202102160047.11G0lNdv006799@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: ad535e485554 - stable/11 - MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: ad535e485554628721dfe92243b9d0cf0b6f6c39 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 00:47:30 -0000 The branch stable/11 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ad535e485554628721dfe92243b9d0cf0b6f6c39 commit ad535e485554628721dfe92243b9d0cf0b6f6c39 Author: Cy Schubert AuthorDate: 2021-02-07 03:15:27 +0000 Commit: Cy Schubert CommitDate: 2021-02-16 00:40:49 +0000 MFC d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd: Simply FreeBSD check using __FreeBSD__ and remove OpenBSD (cherry picked from commit d20f7a5a3da1aa5bccdabb89c181ca0c49385ecd) --- contrib/ipfilter/lib/printaps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ipfilter/lib/printaps.c b/contrib/ipfilter/lib/printaps.c index 0304f34c6010..47c8def6106b 100644 --- a/contrib/ipfilter/lib/printaps.c +++ b/contrib/ipfilter/lib/printaps.c @@ -47,7 +47,7 @@ printaps(aps, opts, proto) ap.aps_state[0], ap.aps_state[1], ap.aps_sel[0], ap.aps_sel[1]); #if (defined(NetBSD) && (NetBSD >= 199905) && (NetBSD < 1991011)) || \ - (__FreeBSD_version >= 300000) || defined(OpenBSD) + defined(__FreeBSD__) PRINTF("\t\tseq: off %hd/%hd min %x/%x\n", ap.aps_seqoff[0], ap.aps_seqoff[1], ap.aps_seqmin[0], ap.aps_seqmin[1]); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 01:58:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6673B544489; Tue, 16 Feb 2021 01:58:22 +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 4Dfkdp2Rrfz4Zw0; Tue, 16 Feb 2021 01:58:22 +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 4686D4C0; Tue, 16 Feb 2021 01:58:22 +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 11G1wMB4098348; Tue, 16 Feb 2021 01:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G1wL1N098347; Tue, 16 Feb 2021 01:58:21 GMT (envelope-from git) Date: Tue, 16 Feb 2021 01:58:21 GMT Message-Id: <202102160158.11G1wL1N098347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 184c1b943937 - main - zfs: merge OpenZFS master-436ab35a5 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 184c1b943937986c81e1996d999d21626ec7a4ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 01:58:22 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=184c1b943937986c81e1996d999d21626ec7a4ff commit 184c1b943937986c81e1996d999d21626ec7a4ff Merge: 10fc4c321838 83dd4a9252fd Author: Martin Matuska AuthorDate: 2021-02-16 00:39:34 +0000 Commit: Martin Matuska CommitDate: 2021-02-16 01:46:28 +0000 zfs: merge OpenZFS master-436ab35a5 - speed up writing to ZFS pools without ZIL devices (aa755b3) - speed up importing ZFS pools (2d8f72d, a0e0199, cf0977a) ... MFC after: 2 weeks Reviewed by: mjg (partial) Tested by: pho Differential Revision: https://reviews.freebsd.org/D28677 cddl/lib/libzfs/Makefile | 1 - cddl/lib/libzpool/Makefile | 1 - .../openzfs/.github/PULL_REQUEST_TEMPLATE.md | 42 +++ .../.github/workflows/zfs-tests-functional.yml | 64 ++++ .../openzfs/.github/workflows/zfs-tests-sanity.yml | 60 ++++ sys/contrib/openzfs/META | 2 +- sys/contrib/openzfs/Makefile.am | 13 +- sys/contrib/openzfs/cmd/Makefile.am | 10 + sys/contrib/openzfs/cmd/mount_zfs/Makefile.am | 2 + sys/contrib/openzfs/cmd/mount_zfs/mount_zfs.c | 15 + sys/contrib/openzfs/cmd/raidz_test/Makefile.am | 2 + sys/contrib/openzfs/cmd/raidz_test/raidz_test.c | 5 +- sys/contrib/openzfs/cmd/vdev_id/vdev_id | 399 +++++++++++++++------ sys/contrib/openzfs/cmd/zdb/Makefile.am | 2 + sys/contrib/openzfs/cmd/zdb/zdb.c | 138 ++++++- sys/contrib/openzfs/cmd/zed/Makefile.am | 2 + sys/contrib/openzfs/cmd/zed/agents/zfs_agents.c | 19 +- sys/contrib/openzfs/cmd/zed/agents/zfs_retire.c | 2 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 0 sys/contrib/openzfs/cmd/zfs/Makefile.am | 2 + .../openzfs/cmd/zfs_ids_to_path/Makefile.am | 2 + sys/contrib/openzfs/cmd/zgenhostid/Makefile.am | 4 +- sys/contrib/openzfs/cmd/zhack/Makefile.am | 2 + sys/contrib/openzfs/cmd/zinject/Makefile.am | 2 + sys/contrib/openzfs/cmd/zpool/Makefile.am | 2 + sys/contrib/openzfs/cmd/zpool/zpool_main.c | 15 +- sys/contrib/openzfs/cmd/zpool_influxdb/Makefile.am | 2 + sys/contrib/openzfs/cmd/zstream/Makefile.am | 2 + sys/contrib/openzfs/cmd/ztest/Makefile.am | 2 + sys/contrib/openzfs/cmd/ztest/ztest.c | 388 ++++++++++---------- sys/contrib/openzfs/cmd/zvol_id/Makefile.am | 2 + sys/contrib/openzfs/config/CppCheck.am | 11 + sys/contrib/openzfs/config/Rules.am | 1 + sys/contrib/openzfs/config/always-cppcheck.m4 | 6 + sys/contrib/openzfs/config/ax_count_cpus.m4 | 101 ++++++ .../openzfs/config/kernel-get-disk-and-module.m4 | 0 sys/contrib/openzfs/config/kernel-vfs-iov_iter.m4 | 44 --- sys/contrib/openzfs/config/zfs-build.m4 | 10 +- .../contrib/dracut/90zfs/module-setup.sh.in | 4 +- .../contrib/dracut/90zfs/zfs-env-bootfs.service.in | 2 +- .../contrib/dracut/90zfs/zfs-generator.sh.in | 8 + .../contrib/dracut/90zfs/zfs-load-key.sh.in | 2 +- .../pyzfs/libzfs_core/test/test_libzfs_core.py | 4 +- sys/contrib/openzfs/cppcheck-suppressions.txt | 8 - .../etc/systemd/system/zfs-import-cache.service.in | 2 +- .../etc/systemd/system/zfs-import-scan.service.in | 2 +- .../openzfs/include/os/freebsd/spl/sys/Makefile.am | 1 + .../openzfs/include/os/freebsd/spl/sys/ccompile.h | 3 - .../openzfs/include/os/freebsd/spl/sys/fcntl.h | 38 ++ .../openzfs/include/os/freebsd/spl/sys/uio.h | 79 ++-- .../include/os/freebsd/zfs/sys/freebsd_crypto.h | 2 +- .../include/os/freebsd/zfs/sys/zfs_znode_impl.h | 5 +- sys/contrib/openzfs/include/os/linux/spl/sys/uio.h | 73 ++-- .../include/os/linux/zfs/sys/zfs_vnops_os.h | 2 +- .../include/os/linux/zfs/sys/zfs_znode_impl.h | 5 +- sys/contrib/openzfs/include/sys/abd.h | 75 +++- sys/contrib/openzfs/include/sys/abd_impl.h | 48 +-- sys/contrib/openzfs/include/sys/crypto/common.h | 2 +- sys/contrib/openzfs/include/sys/dmu.h | 15 +- sys/contrib/openzfs/include/sys/fs/zfs.h | 1 + sys/contrib/openzfs/include/sys/sa.h | 2 +- sys/contrib/openzfs/include/sys/spa.h | 1 + sys/contrib/openzfs/include/sys/spa_impl.h | 1 + sys/contrib/openzfs/include/sys/uio_impl.h | 8 +- sys/contrib/openzfs/include/sys/vdev.h | 4 + sys/contrib/openzfs/include/sys/vdev_impl.h | 5 + sys/contrib/openzfs/include/sys/vdev_raidz_impl.h | 1 + sys/contrib/openzfs/include/sys/zfs_debug.h | 1 + sys/contrib/openzfs/include/sys/zfs_sa.h | 2 +- sys/contrib/openzfs/include/sys/zfs_vnops.h | 8 +- sys/contrib/openzfs/include/sys/zfs_znode.h | 2 + sys/contrib/openzfs/lib/Makefile.am | 10 +- sys/contrib/openzfs/lib/libavl/Makefile.am | 2 + sys/contrib/openzfs/lib/libefi/Makefile.am | 2 + sys/contrib/openzfs/lib/libefi/rdwr_efi.c | 1 + sys/contrib/openzfs/lib/libicp/Makefile.am | 2 + sys/contrib/openzfs/lib/libnvpair/Makefile.am | 3 +- sys/contrib/openzfs/lib/libshare/Makefile.am | 2 + sys/contrib/openzfs/lib/libspl/Makefile.am | 9 + .../lib/libspl/include/os/freebsd/Makefile.am | 4 + .../openzfs/lib/libspl/include/os/freebsd/fcntl.h | 33 ++ .../lib/libspl/include/os/freebsd/sys/Makefile.am | 1 + .../lib/libspl/include/os/freebsd/sys/fcntl.h | 38 ++ sys/contrib/openzfs/lib/libspl/include/sys/uio.h | 44 +-- sys/contrib/openzfs/lib/libtpool/Makefile.am | 2 + sys/contrib/openzfs/lib/libunicode/Makefile.am | 2 + sys/contrib/openzfs/lib/libuutil/Makefile.am | 3 +- sys/contrib/openzfs/lib/libuutil/uu_avl.c | 1 + sys/contrib/openzfs/lib/libzfs/Makefile.am | 3 +- sys/contrib/openzfs/lib/libzfs/libzfs_import.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 51 ++- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 205 +++++------ sys/contrib/openzfs/lib/libzfs_core/Makefile.am | 3 +- sys/contrib/openzfs/lib/libzfsbootenv/Makefile.am | 3 +- sys/contrib/openzfs/lib/libzpool/Makefile.am | 2 + sys/contrib/openzfs/lib/libzstd/Makefile.am | 2 + sys/contrib/openzfs/lib/libzutil/Makefile.am | 5 +- .../lib/libzutil/os/freebsd/zutil_import_os.c | 20 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 52 ++- .../openzfs/man/man5/zfs-module-parameters.5 | 16 + sys/contrib/openzfs/man/man8/zdb.8 | 18 +- sys/contrib/openzfs/man/man8/zfs-list.8 | 11 +- sys/contrib/openzfs/man/man8/zfs-program.8 | 4 +- sys/contrib/openzfs/man/man8/zfsprops.8 | 2 +- sys/contrib/openzfs/module/Makefile.in | 22 +- sys/contrib/openzfs/module/avl/avl.c | 3 - sys/contrib/openzfs/module/icp/algs/modes/modes.c | 12 +- sys/contrib/openzfs/module/icp/core/kcf_prov_lib.c | 32 +- sys/contrib/openzfs/module/icp/io/sha1_mod.c | 48 +-- sys/contrib/openzfs/module/icp/io/sha2_mod.c | 48 +-- sys/contrib/openzfs/module/icp/io/skein_mod.c | 40 +-- sys/contrib/openzfs/module/lua/ldebug.c | 1 - sys/contrib/openzfs/module/lua/ldo.c | 1 - .../openzfs/module/os/freebsd/spl/spl_uio.c | 38 +- .../openzfs/module/os/freebsd/spl/spl_vfs.c | 2 + sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 31 +- .../openzfs/module/os/freebsd/zfs/crypto_os.c | 26 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 40 ++- .../openzfs/module/os/freebsd/zfs/zfs_file_os.c | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 89 ++--- .../openzfs/module/os/freebsd/zfs/zfs_znode.c | 6 +- .../openzfs/module/os/freebsd/zfs/zio_crypt.c | 77 ++-- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 44 ++- .../openzfs/module/os/linux/spl/spl-generic.c | 2 - .../openzfs/module/os/linux/spl/spl-kstat.c | 2 +- .../openzfs/module/os/linux/spl/spl-taskq.c | 3 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 49 ++- .../openzfs/module/os/linux/zfs/vdev_disk.c | 49 ++- .../module/{zcommon => os/linux/zfs}/zfs_uio.c | 95 +++-- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 90 ++--- .../openzfs/module/os/linux/zfs/zfs_znode.c | 18 +- .../openzfs/module/os/linux/zfs/zio_crypt.c | 30 +- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 18 +- .../openzfs/module/os/linux/zfs/zpl_inode.c | 4 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 6 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 8 +- sys/contrib/openzfs/module/zfs/abd.c | 293 ++++++++------- sys/contrib/openzfs/module/zfs/arc.c | 42 ++- sys/contrib/openzfs/module/zfs/dbuf.c | 2 +- sys/contrib/openzfs/module/zfs/dmu.c | 54 ++- sys/contrib/openzfs/module/zfs/dmu_objset.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_tx.c | 16 + sys/contrib/openzfs/module/zfs/dsl_dataset.c | 13 +- sys/contrib/openzfs/module/zfs/dsl_destroy.c | 15 +- sys/contrib/openzfs/module/zfs/metaslab.c | 100 ++++-- sys/contrib/openzfs/module/zfs/sa.c | 6 +- sys/contrib/openzfs/module/zfs/spa.c | 51 ++- sys/contrib/openzfs/module/zfs/spa_history.c | 8 +- sys/contrib/openzfs/module/zfs/spa_misc.c | 67 ++-- sys/contrib/openzfs/module/zfs/txg.c | 24 +- sys/contrib/openzfs/module/zfs/vdev.c | 225 ++++++++++-- sys/contrib/openzfs/module/zfs/vdev_draid.c | 34 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 38 +- sys/contrib/openzfs/module/zfs/vdev_queue.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 49 +-- sys/contrib/openzfs/module/zfs/vdev_removal.c | 13 + sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 3 + sys/contrib/openzfs/module/zfs/zfs_sa.c | 11 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 69 ++-- sys/contrib/openzfs/module/zfs/zil.c | 2 +- sys/contrib/openzfs/module/zfs/zio.c | 75 ++-- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 2 +- sys/contrib/openzfs/tests/runfiles/common.run | 2 +- sys/contrib/openzfs/tests/runfiles/linux.run | 2 +- .../openzfs/tests/test-runner/bin/zts-report.py.in | 35 ++ .../openzfs/tests/test-runner/include/logapi.shlib | 6 +- .../tests/zfs-tests/cmd/mmapwrite/mmapwrite.c | 4 +- .../tests/functional/acl/posix-sa/cleanup.ksh | 0 .../functional/acl/posix-sa/posix_001_pos.ksh | 0 .../functional/acl/posix-sa/posix_002_pos.ksh | 0 .../functional/acl/posix-sa/posix_003_pos.ksh | 0 .../functional/acl/posix-sa/posix_004_pos.ksh | 0 .../tests/functional/acl/posix-sa/setup.ksh | 0 .../tests/functional/acl/posix/posix_004_pos.ksh | 0 .../tests/functional/cli_root/zdb/Makefile.am | 4 +- .../tests/functional/cli_root/zdb/zdb_args_neg.ksh | 2 +- .../tests/functional/cli_root/zdb/zdb_recover.ksh | 55 +++ .../functional/cli_root/zdb/zdb_recover_2.ksh | 57 +++ .../cli_root/zfs_mount/zfs_mount_013_pos.ksh | 20 +- .../cli_root/zfs_receive/zfs_receive_005_neg.ksh | 4 +- .../cli_root/zfs_receive/zfs_receive_014_pos.ksh | 25 -- .../cli_root/zfs_receive/zfs_receive_new_props.ksh | 0 .../cli_root/zfs_rename/zfs_rename_nounmount.ksh | 0 .../cli_root/zfs_rollback/zfs_rollback_001_pos.ksh | 1 + .../functional/cli_root/zfs_send/zfs_send-b.ksh | 10 +- .../cli_root/zfs_send/zfs_send_003_pos.ksh | 2 +- .../cli_root/zfs_send/zfs_send_004_neg.ksh | 2 +- .../cli_root/zfs_send/zfs_send_005_pos.ksh | 2 +- .../cli_root/zfs_send/zfs_send_encrypted.ksh | 10 +- .../zfs_send/zfs_send_encrypted_unloaded.ksh | 2 +- .../functional/cli_root/zfs_send/zfs_send_raw.ksh | 14 +- .../cli_root/zfs_set/zfs_set_common.kshlib | 14 +- .../functional/cli_root/zpool_create/draidcfg.gz | Bin 0 -> 21672412 bytes .../zpool_events/zpool_events_duplicates.ksh | 0 .../functional/cli_root/zpool_export/Makefile.am | 3 +- .../functional/cli_root/zpool_export/setup.ksh | 4 - .../cli_root/zpool_export/zpool_export.cfg | 37 +- .../cli_root/zpool_export/zpool_export.kshlib | 32 ++ .../cli_root/zpool_export/zpool_export_001_pos.ksh | 17 +- .../cli_root/zpool_export/zpool_export_002_pos.ksh | 13 +- .../cli_root/zpool_export/zpool_export_003_neg.ksh | 15 +- .../cli_root/zpool_export/zpool_export_004_pos.ksh | 21 +- .../zfs-tests/tests/functional/io/Makefile.am | 1 + .../zfs-tests/tests/functional/io/io_uring.ksh | 72 ++++ .../{persist_l2arc => l2arc}/Makefile.am | 0 .../{persist_l2arc => l2arc}/cleanup.ksh | 0 .../persist_l2arc.cfg => l2arc/l2arc.cfg} | 0 .../persist_l2arc_001_pos.ksh | 0 .../persist_l2arc_002_pos.ksh | 0 .../persist_l2arc_003_neg.ksh | 0 .../persist_l2arc_004_pos.ksh | 0 .../persist_l2arc_005_pos.ksh | 0 .../persist_l2arc_006_pos.ksh | 0 .../persist_l2arc_007_pos.ksh | 0 .../persist_l2arc_008_pos.ksh | 0 .../functional/{persist_l2arc => l2arc}/setup.ksh | 0 .../tests/functional/procfs/pool_state.ksh | 18 +- .../functional/redacted_send/redacted_negative.ksh | 8 +- .../functional/redacted_send/redacted_resume.ksh | 2 +- ...edundancy_003_pos.ksh => redundancy_mirror.ksh} | 0 ...edundancy_001_pos.ksh => redundancy_raidz1.ksh} | 0 ...edundancy_002_pos.ksh => redundancy_raidz2.ksh} | 0 ...edundancy_004_neg.ksh => redundancy_stripe.ksh} | 0 .../tests/functional/removal/removal_with_send.ksh | 2 +- .../tests/functional/rsend/send_invalid.ksh | 2 +- .../functional/rsend/send_partial_dataset.ksh | 2 +- .../tests/functional/userquota/Makefile.am | 3 +- .../tests/functional/zvol/zvol_swap/zvol_swap.cfg | 2 + sys/modules/zfs/zfs_config.h | 6 +- 231 files changed, 3260 insertions(+), 1780 deletions(-) diff --cc cddl/lib/libzfs/Makefile index 611eb91d76e7,000000000000..d0b3458eda64 mode 100644,000000..100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@@ -1,109 -1,0 +1,108 @@@ +# $FreeBSD$ + +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/icp +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zcommon +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libzfs/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare +.PATH: ${SRCTOP}/sys/contrib/openzfs/lib/libshare/os/freebsd +.PATH: ${SRCTOP}/sys/contrib/openzfs/include +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd +.PATH: ${SRCTOP}/sys/contrib/openzfs/module/zstd/lib + +PACKAGE= runtime +LIB= zfs +LIBADD= \ + avl \ + bsdxml \ + crypto \ + geom \ + m \ + md \ + nvpair \ + pthread \ + umem \ + util \ + uutil \ + z \ + zfs_core \ + zutil + +INCS= libzfs.h +USER_C = \ + libzfs_changelist.c \ + libzfs_config.c \ + libzfs_crypto.c \ + libzfs_dataset.c \ + libzfs_diff.c \ + libzfs_import.c \ + libzfs_iter.c \ + libzfs_mount.c \ + libzfs_pool.c \ + libzfs_sendrecv.c \ + libzfs_status.c \ + libzfs_util.c + +# FreeBSD +USER_C += \ + libzfs_compat.c \ + libzfs_ioctl_compat.c \ + libzfs_zmount.c + +# libshare +USER_C += \ + libshare.c \ + nfs.c \ + smb.c + + +KERNEL_C = \ + algs/sha2/sha2.c \ + cityhash.c \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ - zfs_uio.c \ + zpool_prop.c \ + zprop_common.c + + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +SRCS= $(USER_C) $(KERNEL_C) $(ARCH_C) + +WARNS?= 2 +SHLIB_MAJOR= 4 +CSTD= c99 +CFLAGS+= -DIN_BASE +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libspl/include/os/freebsd +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/lib/libshare +CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include +CFLAGS+= -I${SRCTOP}/sys +CFLAGS+= -I${SRCTOP}/cddl/compat/opensolaris/include +CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include +CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h +CFLAGS+= -DHAVE_ISSETUGID +CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h + + +.include diff --cc cddl/lib/libzpool/Makefile index 0e2cc9456faa,000000000000..d9b2e67094e3 mode 100644,000000..100644 --- a/cddl/lib/libzpool/Makefile +++ b/cddl/lib/libzpool/Makefile @@@ -1,267 -1,0 +1,266 @@@ +# $FreeBSD$ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +# ZFS_COMMON_SRCS +.PATH: ${ZFSTOP}/module/zfs +.PATH: ${ZFSTOP}/module/zcommon +.PATH: ${ZFSTOP}/module/unicode +# LUA_SRCS +.PATH: ${ZFSTOP}/module/lua +# ZSTD_SRCS +.PATH: ${ZFSTOP}/module/zstd +.PATH: ${ZFSTOP}/module/zstd/lib + +.PATH: ${ZFSTOP}/module/os/linux/zfs + +.PATH: ${ZFSTOP}/lib/libzpool + +.if exists(${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH}/opensolaris_atomic.S) +.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/atomic/${MACHINE_ARCH} +ATOMIC_SRCS= opensolaris_atomic.S +ACFLAGS+= -Wa,--noexecstack +.else +.PATH: ${SRCTOP}/sys/cddl/compat/opensolaris/kern +ATOMIC_SRCS= opensolaris_atomic.c +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpcspe" +# Don't waste GOT entries on small data. +PICFLAG= -fPIC +.endif + +LIB= zpool + +USER_C = \ + kernel.c \ + taskq.c \ + util.c + +KERNEL_C = \ + zfeature_common.c \ + zfs_comutil.c \ + zfs_deleg.c \ + zfs_fletcher.c \ + zfs_fletcher_superscalar.c \ + zfs_fletcher_superscalar4.c \ + zfs_namecheck.c \ + zfs_prop.c \ - zfs_uio.c \ + zfs_zstd.c \ + zpool_prop.c \ + zprop_common.c \ + abd.c \ + abd_os.c \ + aggsum.c \ + arc.c \ + arc_os.c \ + blkptr.c \ + bplist.c \ + bpobj.c \ + bptree.c \ + btree.c \ + bqueue.c \ + cityhash.c \ + dbuf.c \ + dbuf_stats.c \ + ddt.c \ + ddt_zap.c \ + dmu.c \ + dmu_diff.c \ + dmu_object.c \ + dmu_objset.c \ + dmu_recv.c \ + dmu_redact.c \ + dmu_send.c \ + dmu_traverse.c \ + dmu_tx.c \ + dmu_zfetch.c \ + dnode.c \ + dnode_sync.c \ + dsl_bookmark.c \ + dsl_dataset.c \ + dsl_deadlist.c \ + dsl_deleg.c \ + dsl_dir.c \ + dsl_crypt.c \ + dsl_pool.c \ + dsl_prop.c \ + dsl_scan.c \ + dsl_synctask.c \ + dsl_destroy.c \ + dsl_userhold.c \ + edonr_zfs.c \ + hkdf.c \ + fm.c \ + gzip.c \ + lzjb.c \ + lz4.c \ + metaslab.c \ + mmp.c \ + multilist.c \ + objlist.c \ + pathname.c \ + range_tree.c \ + refcount.c \ + rrwlock.c \ + sa.c \ + sha256.c \ + skein_zfs.c \ + spa.c \ + spa_boot.c \ + spa_checkpoint.c \ + spa_config.c \ + spa_errlog.c \ + spa_history.c \ + spa_log_spacemap.c \ + spa_misc.c \ + spa_stats.c \ + space_map.c \ + space_reftree.c \ + txg.c \ + trace.c \ + uberblock.c \ + unique.c \ + vdev.c \ + vdev_cache.c \ + vdev_draid.c \ + vdev_draid_rand.c \ + vdev_file.c \ + vdev_indirect_births.c \ + vdev_indirect.c \ + vdev_indirect_mapping.c \ + vdev_initialize.c \ + vdev_label.c \ + vdev_mirror.c \ + vdev_missing.c \ + vdev_queue.c \ + vdev_raidz.c \ + vdev_raidz_math_aarch64_neon.c \ + vdev_raidz_math_aarch64_neonx2.c \ + vdev_raidz_math_avx2.c \ + vdev_raidz_math_avx512bw.c \ + vdev_raidz_math_avx512f.c \ + vdev_raidz_math.c \ + vdev_raidz_math_scalar.c \ + vdev_rebuild.c \ + vdev_removal.c \ + vdev_root.c \ + vdev_trim.c \ + zap.c \ + zap_leaf.c \ + zap_micro.c \ + zcp.c \ + zcp_get.c \ + zcp_global.c \ + zcp_iter.c \ + zcp_set.c \ + zcp_synctask.c \ + zfeature.c \ + zfs_byteswap.c \ + zfs_debug.c \ + zfs_fm.c \ + zfs_fuid.c \ + zfs_sa.c \ + zfs_znode.c \ + zfs_ratelimit.c \ + zfs_rlock.c \ + zil.c \ + zio.c \ + zio_checksum.c \ + zio_compress.c \ + zio_crypt.c \ + zio_inject.c \ + zle.c \ + zrlock.c \ + zstd.c \ + zthr.c + +ARCH_C = +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" +ARCH_C += vdev_raidz_math_sse2.c \ + vdev_raidz_math_ssse3.c \ + zfs_fletcher_intel.c \ + zfs_fletcher_sse.c +CFLAGS += -DHAVE_SSE2 -DHAVE_SSE3 +.endif +.if ${MACHINE_ARCH} == "amd64" +ARCH_C += zfs_fletcher_avx512.c +CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_AVX512F \ + -DHAVE_AVX512BW +.endif +.if ${MACHINE_CPUARCH} == "aarch64" +ARCH_C += zfs_fletcher_aarch64_neon.c +.endif + +LUA_C = \ + lapi.c \ + lauxlib.c \ + lbaselib.c \ + lcode.c \ + lcompat.c \ + lcorolib.c \ + lctype.c \ + ldebug.c \ + ldo.c \ + lfunc.c \ + lgc.c \ + llex.c \ + lmem.c \ + lobject.c \ + lopcodes.c \ + lparser.c \ + lstate.c \ + lstring.c \ + lstrlib.c \ + ltable.c \ + ltablib.c \ + ltm.c \ + lvm.c \ + lzio.c + +UNICODE_C = u8_textprep.c uconv.c + +SRCS= ${USER_C} ${KERNEL_C} ${LUA_C} ${UNICODE_C} ${ARCH_C} + +WARNS?= 2 +CFLAGS+= \ + -DIN_BASE \ + -I${ZFSTOP}/include \ + -I${ZFSTOP}/lib/libspl/include \ + -I${ZFSTOP}/lib/libspl/include/os/freebsd \ + -I${SRCTOP}/sys \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -I${SRCTOP}/cddl/compat/opensolaris/include \ + -I${ZFSTOP}/module/icp/include \ + -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ + -DHAVE_ISSETUGID \ + -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ + -I${SRCTOP}/sys/modules/zfs \ + -I${ZFSTOP}/include/os/freebsd/zfs \ + -DLIB_ZPOOL_BUILD -DZFS_DEBUG \ + +# XXX: pthread doesn't have mutex_owned() equivalent, so we need to look +# into libthr private structures. That's sooo evil, but it's only for +# ZFS debugging tools needs. +CFLAGS+= -DWANTS_MUTEX_OWNED +CFLAGS+= -I${SRCTOP}/lib/libpthread/thread +CFLAGS+= -I${SRCTOP}/lib/libpthread/sys +CFLAGS+= -I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include +CFLAGS.gcc+= -fms-extensions + +LIBADD= md pthread z spl icp nvpair avl umem + +# atomic.S doesn't like profiling. +MK_PROFILE= no + +CSTD= c99 + +# Since there are many asserts in this library, it makes no sense to compile +# it without debugging. + +CFLAGS+= -g -DDEBUG=1 + +CFLAGS.zfs_zstd.c= -Wno-cast-qual -Wno-pointer-arith +CFLAGS.zstd.c+= -fno-tree-vectorize + +.include diff --cc sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md index 000000000000,465ee182c497..465ee182c497 mode 000000,100644..100644 --- a/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md +++ b/sys/contrib/openzfs/.github/PULL_REQUEST_TEMPLATE.md diff --cc sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml index 000000000000,631f174b74fd..631f174b74fd mode 000000,100644..100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-tests-functional.yml diff --cc sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml index 000000000000,e03399757575..e03399757575 mode 000000,100644..100644 --- a/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml +++ b/sys/contrib/openzfs/.github/workflows/zfs-tests-sanity.yml diff --cc sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh index 44a9b8d23303,44a9b8d23303..44a9b8d23303 mode 100755,100644..100644 --- a/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh +++ b/sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh diff --cc sys/contrib/openzfs/config/CppCheck.am index 000000000000,13c633c60038..13c633c60038 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/CppCheck.am +++ b/sys/contrib/openzfs/config/CppCheck.am diff --cc sys/contrib/openzfs/config/always-cppcheck.m4 index 000000000000,c7c134a3e8cd..c7c134a3e8cd mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/always-cppcheck.m4 +++ b/sys/contrib/openzfs/config/always-cppcheck.m4 diff --cc sys/contrib/openzfs/config/ax_count_cpus.m4 index 000000000000,5db892553437..5db892553437 mode 000000,100644..100644 --- a/sys/contrib/openzfs/config/ax_count_cpus.m4 +++ b/sys/contrib/openzfs/config/ax_count_cpus.m4 diff --cc sys/contrib/openzfs/include/os/freebsd/spl/sys/fcntl.h index 000000000000,4301d6e151de..4301d6e151de mode 000000,100644..100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/fcntl.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/fcntl.h diff --cc sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h index 091186f23174,000000000000..dde87973f961 mode 100644,000000..100644 --- a/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h +++ b/sys/contrib/openzfs/include/os/freebsd/zfs/sys/zfs_znode_impl.h @@@ -1,187 -1,0 +1,188 @@@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2015 by Delphix. All rights reserved. + * Copyright (c) 2014 Integros [integros.com] + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + */ + +#ifndef _FREEBSD_ZFS_SYS_ZNODE_IMPL_H +#define _FREEBSD_ZFS_SYS_ZNODE_IMPL_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include ++#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Directory entry locks control access to directory entries. + * They are used to protect creates, deletes, and renames. + * Each directory znode has a mutex and a list of locked names. + */ +#define ZNODE_OS_FIELDS \ + struct zfsvfs *z_zfsvfs; \ + vnode_t *z_vnode; \ + char *z_cached_symlink; \ + uint64_t z_uid; \ + uint64_t z_gid; \ + uint64_t z_gen; \ + uint64_t z_atime[2]; \ + uint64_t z_links; + +#define ZFS_LINK_MAX UINT64_MAX + +/* + * ZFS minor numbers can refer to either a control device instance or + * a zvol. Depending on the value of zss_type, zss_data points to either + * a zvol_state_t or a zfs_onexit_t. + */ +enum zfs_soft_state_type { + ZSST_ZVOL, + ZSST_CTLDEV +}; + +typedef struct zfs_soft_state { + enum zfs_soft_state_type zss_type; + void *zss_data; +} zfs_soft_state_t; + +extern minor_t zfsdev_minor_alloc(void); + +/* + * Range locking rules + * -------------------- + * 1. When truncating a file (zfs_create, zfs_setattr, zfs_space) the whole + * file range needs to be locked as RL_WRITER. Only then can the pages be + * freed etc and zp_size reset. zp_size must be set within range lock. + * 2. For writes and punching holes (zfs_write & zfs_space) just the range + * being written or freed needs to be locked as RL_WRITER. + * Multiple writes at the end of the file must coordinate zp_size updates + * to ensure data isn't lost. A compare and swap loop is currently used + * to ensure the file size is at least the offset last written. + * 3. For reads (zfs_read, zfs_get_data & zfs_putapage) just the range being + * read needs to be locked as RL_READER. A check against zp_size can then + * be made for reading beyond end of file. + */ + +/* + * Convert between znode pointers and vnode pointers + */ +#define ZTOV(ZP) ((ZP)->z_vnode) +#define ZTOI(ZP) ((ZP)->z_vnode) +#define VTOZ(VP) ((struct znode *)(VP)->v_data) +#define VTOZ_SMR(VP) ((znode_t *)vn_load_v_data_smr(VP)) +#define ITOZ(VP) ((struct znode *)(VP)->v_data) +#define zhold(zp) vhold(ZTOV((zp))) +#define zrele(zp) vrele(ZTOV((zp))) + +#define ZTOZSB(zp) ((zp)->z_zfsvfs) +#define ITOZSB(vp) (VTOZ(vp)->z_zfsvfs) +#define ZTOTYPE(zp) (ZTOV(zp)->v_type) +#define ZTOGID(zp) ((zp)->z_gid) +#define ZTOUID(zp) ((zp)->z_uid) +#define ZTONLNK(zp) ((zp)->z_links) +#define Z_ISBLK(type) ((type) == VBLK) +#define Z_ISCHR(type) ((type) == VCHR) +#define Z_ISLNK(type) ((type) == VLNK) +#define Z_ISDIR(type) ((type) == VDIR) + +#define zn_has_cached_data(zp) vn_has_cached_data(ZTOV(zp)) - #define zn_rlimit_fsize(zp, uio, td) vn_rlimit_fsize(ZTOV(zp), (uio), (td)) ++#define zn_rlimit_fsize(zp, uio) \ ++ vn_rlimit_fsize(ZTOV(zp), GET_UIO_STRUCT(uio), zfs_uio_td(uio)) + +/* Called on entry to each ZFS vnode and vfs operation */ +#define ZFS_ENTER(zfsvfs) \ + { \ + ZFS_TEARDOWN_ENTER_READ((zfsvfs), FTAG); \ + if (__predict_false((zfsvfs)->z_unmounted)) { \ + ZFS_TEARDOWN_EXIT_READ(zfsvfs, FTAG); \ + return (EIO); \ + } \ + } + +/* Must be called before exiting the vop */ +#define ZFS_EXIT(zfsvfs) ZFS_TEARDOWN_EXIT_READ(zfsvfs, FTAG) + +/* Verifies the znode is valid */ +#define ZFS_VERIFY_ZP(zp) \ + if (__predict_false((zp)->z_sa_hdl == NULL)) { \ + ZFS_EXIT((zp)->z_zfsvfs); \ + return (EIO); \ + } \ + +/* + * Macros for dealing with dmu_buf_hold + */ +#define ZFS_OBJ_HASH(obj_num) ((obj_num) & (ZFS_OBJ_MTX_SZ - 1)) +#define ZFS_OBJ_MUTEX(zfsvfs, obj_num) \ + (&(zfsvfs)->z_hold_mtx[ZFS_OBJ_HASH(obj_num)]) +#define ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num) \ + mutex_enter(ZFS_OBJ_MUTEX((zfsvfs), (obj_num))) +#define ZFS_OBJ_HOLD_TRYENTER(zfsvfs, obj_num) \ + mutex_tryenter(ZFS_OBJ_MUTEX((zfsvfs), (obj_num))) +#define ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num) \ + mutex_exit(ZFS_OBJ_MUTEX((zfsvfs), (obj_num))) + +/* Encode ZFS stored time values from a struct timespec */ +#define ZFS_TIME_ENCODE(tp, stmp) \ +{ \ + (stmp)[0] = (uint64_t)(tp)->tv_sec; \ + (stmp)[1] = (uint64_t)(tp)->tv_nsec; \ +} + +/* Decode ZFS stored time values to a struct timespec */ +#define ZFS_TIME_DECODE(tp, stmp) \ +{ \ + (tp)->tv_sec = (time_t)(stmp)[0]; \ + (tp)->tv_nsec = (long)(stmp)[1]; \ +} +#define ZFS_ACCESSTIME_STAMP(zfsvfs, zp) \ + if ((zfsvfs)->z_atime && !((zfsvfs)->z_vfs->vfs_flag & VFS_RDONLY)) \ + zfs_tstamp_update_setup_ext(zp, ACCESSED, NULL, NULL, B_FALSE); + +extern void zfs_tstamp_update_setup_ext(struct znode *, + uint_t, uint64_t [2], uint64_t [2], boolean_t have_tx); +extern void zfs_znode_free(struct znode *); + +extern zil_replay_func_t *zfs_replay_vector[TX_MAX_TYPE]; +extern int zfsfstype; + +extern int zfs_znode_parent_and_name(struct znode *zp, struct znode **dzpp, + char *buf); - extern void zfs_inode_update(struct znode *); +#ifdef __cplusplus +} +#endif + +#endif /* _FREEBSD_SYS_FS_ZFS_ZNODE_H */ diff --cc sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h index 13e5fb653f5b,000000000000..41bdf932511d mode 100644,000000..100644 --- a/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h +++ b/sys/contrib/openzfs/include/os/linux/zfs/sys/zfs_znode_impl.h @@@ -1,177 -1,0 +1,176 @@@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ +/* + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2018 by Delphix. All rights reserved. + * Copyright 2016 Nexenta Systems, Inc. All rights reserved. + */ + +#ifndef _SYS_ZFS_ZNODE_IMPL_H +#define _SYS_ZFS_ZNODE_IMPL_H + +#ifndef _KERNEL +#error "no user serviceable parts within" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZNODE_OS_FIELDS \ + struct inode z_inode; + + +/* + * Convert between znode pointers and inode pointers + */ +#define ZTOI(znode) (&((znode)->z_inode)) +#define ITOZ(inode) (container_of((inode), znode_t, z_inode)) +#define ZTOZSB(znode) ((zfsvfs_t *)(ZTOI(znode)->i_sb->s_fs_info)) +#define ITOZSB(inode) ((zfsvfs_t *)((inode)->i_sb->s_fs_info)) + +#define ZTOTYPE(zp) (ZTOI(zp)->i_mode) +#define ZTOGID(zp) (ZTOI(zp)->i_gid) +#define ZTOUID(zp) (ZTOI(zp)->i_uid) +#define ZTONLNK(zp) (ZTOI(zp)->i_nlink) + +#define Z_ISBLK(type) S_ISBLK(type) +#define Z_ISCHR(type) S_ISCHR(type) +#define Z_ISLNK(type) S_ISLNK(type) +#define Z_ISDEV(type) (S_ISCHR(type) || S_ISBLK(type) || S_ISFIFO(type)) +#define Z_ISDIR(type) S_ISDIR(type) + - #define zn_has_cached_data(zp) ((zp)->z_is_mapped) - #define zn_rlimit_fsize(zp, uio, td) (0) ++#define zn_has_cached_data(zp) ((zp)->z_is_mapped) ++#define zn_rlimit_fsize(zp, uio) (0) + +#define zhold(zp) igrab(ZTOI((zp))) +#define zrele(zp) iput(ZTOI((zp))) + +/* Called on entry to each ZFS inode and vfs operation. */ +#define ZFS_ENTER_ERROR(zfsvfs, error) \ +do { \ + ZFS_TEARDOWN_ENTER_READ(zfsvfs, FTAG); \ + if (unlikely((zfsvfs)->z_unmounted)) { \ + ZFS_EXIT_READ(zfsvfs, FTAG); \ + return (error); \ + } \ +} while (0) +#define ZFS_ENTER(zfsvfs) ZFS_ENTER_ERROR(zfsvfs, EIO) +#define ZPL_ENTER(zfsvfs) ZFS_ENTER_ERROR(zfsvfs, -EIO) + +/* Must be called before exiting the operation. */ +#define ZFS_EXIT(zfsvfs) \ +do { \ + zfs_exit_fs(zfsvfs); \ + ZFS_EXIT_READ(zfsvfs, FTAG); \ +} while (0) + +#define ZPL_EXIT(zfsvfs) \ +do { \ + rrm_exit(&(zfsvfs)->z_teardown_lock, FTAG); \ *** 27212 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 02:11:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 66731544936; Tue, 16 Feb 2021 02:11:48 +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 4DfkxJ2WMtz4bRM; Tue, 16 Feb 2021 02:11:48 +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 4941A4F4; Tue, 16 Feb 2021 02:11:48 +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 11G2BmjZ023169; Tue, 16 Feb 2021 02:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G2BmVu023168; Tue, 16 Feb 2021 02:11:48 GMT (envelope-from git) Date: Tue, 16 Feb 2021 02:11:48 GMT Message-Id: <202102160211.11G2BmVu023168@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: 0646b83f0779 - stable/13 - ifconfig: fix incorrect wg allowed-ips netmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0646b83f0779260256e03a11c7bc2e6bcfefa694 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 02:11:48 -0000 The branch stable/13 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=0646b83f0779260256e03a11c7bc2e6bcfefa694 commit 0646b83f0779260256e03a11c7bc2e6bcfefa694 Author: Michael Chiu AuthorDate: 2021-02-15 00:38:26 +0000 Commit: Philip Paeps CommitDate: 2021-02-16 00:47:25 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 (cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f) --- sbin/ifconfig/ifwg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifwg.c b/sbin/ifconfig/ifwg.c index 8956e3427dd1..a2b22d2dfbef 100644 --- a/sbin/ifconfig/ifwg.c +++ b/sbin/ifconfig/ifwg.c @@ -309,7 +309,7 @@ dump_peer(const nvlist_t *nvl_peer) sa = __DECONST(void *, &aips[i].a_addr); bitmask = __DECONST(void *, - ((const struct sockaddr *)&aips->a_mask)->sa_data); + ((const struct sockaddr *)&(&aips[i])->a_mask)->sa_data); family = aips[i].a_addr.ss_family; getnameinfo(sa, sa->sa_len, addr_buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 02:20:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4AF68544B56; Tue, 16 Feb 2021 02:20: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 4Dfl731jYYz4c3b; Tue, 16 Feb 2021 02:20: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 2DCA4372; Tue, 16 Feb 2021 02:20: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 11G2KFUL029851; Tue, 16 Feb 2021 02:20:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G2KFjw029843; Tue, 16 Feb 2021 02:20:15 GMT (envelope-from git) Date: Tue, 16 Feb 2021 02:20:15 GMT Message-Id: <202102160220.11G2KFjw029843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: be4b3e7a5bf9 - stable/13 - fmtree: add a deprecation notice to the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: be4b3e7a5bf9e7b497fcfcc242eebb84d29a6e42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 02:20:15 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=be4b3e7a5bf9e7b497fcfcc242eebb84d29a6e42 commit be4b3e7a5bf9e7b497fcfcc242eebb84d29a6e42 Author: Kyle Evans AuthorDate: 2021-02-10 15:10:52 +0000 Commit: Kyle Evans CommitDate: 2021-02-16 02:20:02 +0000 fmtree: add a deprecation notice to the manpage Note that this mtree(8) is actually installed as fmtree(8), while mtree(8) is located in ^/contrib/mtree -- thus, the reference to mtree(8) makes a lot more sense in the context in which folks would actually notice it. Shout-out to Ravi for pointing out that this may not be an obvious fact. Relnotes: yes (cherry picked from commit 6fea22cebe5cb1e51e98c894a738bea910b7bc2f) --- usr.sbin/fmtree/mtree.8 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.sbin/fmtree/mtree.8 b/usr.sbin/fmtree/mtree.8 index c2901e6776da..f5b4de4e7438 100644 --- a/usr.sbin/fmtree/mtree.8 +++ b/usr.sbin/fmtree/mtree.8 @@ -28,7 +28,7 @@ .\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 16, 2007 +.Dd February 13, 2021 .Dt MTREE 8 .Os .Sh NAME @@ -362,6 +362,12 @@ style BSD.*.dist file, use .Fl n .Fl k .Cm uname,gname,mode,nochange. +.Sh DEPRECATION NOTICE +.Nm fmtree +is deprecated, and will be gone in +.Fx 14.0 . +.Xr mtree 8 +should be used instead. .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , @@ -371,7 +377,8 @@ style BSD.*.dist file, use .Xr stat 2 , .Xr fts 3 , .Xr md5 3 , -.Xr chown 8 +.Xr chown 8 , +.Xr mtree 8 .Sh HISTORY The .Nm From owner-dev-commits-src-all@freebsd.org Tue Feb 16 02:20:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F2E90544DA1; Tue, 16 Feb 2021 02:20: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 4Dfl7t6bmkz4cFl; Tue, 16 Feb 2021 02:20: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 D55A8376; Tue, 16 Feb 2021 02:20: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 11G2Kwib035293; Tue, 16 Feb 2021 02:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G2Kwxh035292; Tue, 16 Feb 2021 02:20:58 GMT (envelope-from git) Date: Tue, 16 Feb 2021 02:20:58 GMT Message-Id: <202102160220.11G2Kwxh035292@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: f39a12f04308 - stable/12 - fmtree: add a deprecation notice to the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f39a12f04308b9be57890c9c434ce0f93ccdb058 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 02:20:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f39a12f04308b9be57890c9c434ce0f93ccdb058 commit f39a12f04308b9be57890c9c434ce0f93ccdb058 Author: Kyle Evans AuthorDate: 2021-02-10 15:10:52 +0000 Commit: Kyle Evans CommitDate: 2021-02-16 02:20:28 +0000 fmtree: add a deprecation notice to the manpage Note that this mtree(8) is actually installed as fmtree(8), while mtree(8) is located in ^/contrib/mtree -- thus, the reference to mtree(8) makes a lot more sense in the context in which folks would actually notice it. Shout-out to Ravi for pointing out that this may not be an obvious fact. Relnotes: yes (cherry picked from commit 6fea22cebe5cb1e51e98c894a738bea910b7bc2f) --- usr.sbin/fmtree/mtree.8 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.sbin/fmtree/mtree.8 b/usr.sbin/fmtree/mtree.8 index c2901e6776da..f5b4de4e7438 100644 --- a/usr.sbin/fmtree/mtree.8 +++ b/usr.sbin/fmtree/mtree.8 @@ -28,7 +28,7 @@ .\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 16, 2007 +.Dd February 13, 2021 .Dt MTREE 8 .Os .Sh NAME @@ -362,6 +362,12 @@ style BSD.*.dist file, use .Fl n .Fl k .Cm uname,gname,mode,nochange. +.Sh DEPRECATION NOTICE +.Nm fmtree +is deprecated, and will be gone in +.Fx 14.0 . +.Xr mtree 8 +should be used instead. .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , @@ -371,7 +377,8 @@ style BSD.*.dist file, use .Xr stat 2 , .Xr fts 3 , .Xr md5 3 , -.Xr chown 8 +.Xr chown 8 , +.Xr mtree 8 .Sh HISTORY The .Nm From owner-dev-commits-src-all@freebsd.org Tue Feb 16 02:25:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D48D2544F53; Tue, 16 Feb 2021 02:25: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 4DflF05jrlz4cQK; Tue, 16 Feb 2021 02:25: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 B718F778; Tue, 16 Feb 2021 02:25: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 11G2PObl037718; Tue, 16 Feb 2021 02:25:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G2POGX037717; Tue, 16 Feb 2021 02:25:24 GMT (envelope-from git) Date: Tue, 16 Feb 2021 02:25:24 GMT Message-Id: <202102160225.11G2POGX037717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 46cccd5ceb75 - stable/13 - inetd: fix unix sockaddr's length assignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46cccd5ceb75b67a19459ced93f9b13a52722c63 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 02:25:24 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=46cccd5ceb75b67a19459ced93f9b13a52722c63 commit 46cccd5ceb75b67a19459ced93f9b13a52722c63 Author: Kyle Evans AuthorDate: 2021-02-12 19:19:43 +0000 Commit: Kyle Evans CommitDate: 2021-02-16 02:25:15 +0000 inetd: fix unix sockaddr's length assignment unsz was always exactly '1' here due to an unfortunate mispositioning of closing parenthesis. While it's generally irrelevant because bind(2) is passed the (accurate) sep->se_ctrladdr_size instead, it's not very helpful for anything locally that wants to use it rather than assuming that sep->se_ctrladdr_size perfectly fits the end of sun_path. Just drop unsz entirely and use the result of SUN_LEN() for it. (cherry picked from commit 1253835121cb38fd93478849e32a4a4c13436fb2) --- usr.sbin/inetd/inetd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 7ba51c9af593..6c4e26fad5cd 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1624,7 +1624,6 @@ getconfigent(void) int v6bind; #endif int i; - size_t unsz; #ifdef IPSEC policy = NULL; @@ -1852,16 +1851,16 @@ more: #define SUN_PATH_MAXSIZE sizeof(sep->se_ctrladdr_un.sun_path) memset(&sep->se_ctrladdr, 0, sizeof(sep->se_ctrladdr)); sep->se_ctrladdr_un.sun_family = sep->se_family; - if ((unsz = strlcpy(sep->se_ctrladdr_un.sun_path, - sep->se_service, SUN_PATH_MAXSIZE) >= SUN_PATH_MAXSIZE)) { + if (strlcpy(sep->se_ctrladdr_un.sun_path, sep->se_service, + SUN_PATH_MAXSIZE) >= SUN_PATH_MAXSIZE) { syslog(LOG_ERR, "domain socket pathname too long for service %s", sep->se_service); goto more; } - sep->se_ctrladdr_un.sun_len = unsz; #undef SUN_PATH_MAXSIZE - sep->se_ctrladdr_size = SUN_LEN(&sep->se_ctrladdr_un); + sep->se_ctrladdr_size = sep->se_ctrladdr_un.sun_len = + SUN_LEN(&sep->se_ctrladdr_un); } arg = sskip(&cp); if (!strncmp(arg, "wait", 4)) From owner-dev-commits-src-all@freebsd.org Tue Feb 16 02:25:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B54C854514F; Tue, 16 Feb 2021 02:25: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 4DflF44llSz4cNr; Tue, 16 Feb 2021 02:25: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 95A79B24; Tue, 16 Feb 2021 02:25: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 11G2PS4I037830; Tue, 16 Feb 2021 02:25:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G2PSBG037829; Tue, 16 Feb 2021 02:25:28 GMT (envelope-from git) Date: Tue, 16 Feb 2021 02:25:28 GMT Message-Id: <202102160225.11G2PSBG037829@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 5ab679d9619a - stable/12 - inetd: fix unix sockaddr's length assignment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 5ab679d9619afe8242200bdb4f0391b6fd405e25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 02:25:28 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5ab679d9619afe8242200bdb4f0391b6fd405e25 commit 5ab679d9619afe8242200bdb4f0391b6fd405e25 Author: Kyle Evans AuthorDate: 2021-02-12 19:19:43 +0000 Commit: Kyle Evans CommitDate: 2021-02-16 02:25:06 +0000 inetd: fix unix sockaddr's length assignment unsz was always exactly '1' here due to an unfortunate mispositioning of closing parenthesis. While it's generally irrelevant because bind(2) is passed the (accurate) sep->se_ctrladdr_size instead, it's not very helpful for anything locally that wants to use it rather than assuming that sep->se_ctrladdr_size perfectly fits the end of sun_path. Just drop unsz entirely and use the result of SUN_LEN() for it. (cherry picked from commit 1253835121cb38fd93478849e32a4a4c13436fb2) --- usr.sbin/inetd/inetd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 7ba51c9af593..6c4e26fad5cd 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -1624,7 +1624,6 @@ getconfigent(void) int v6bind; #endif int i; - size_t unsz; #ifdef IPSEC policy = NULL; @@ -1852,16 +1851,16 @@ more: #define SUN_PATH_MAXSIZE sizeof(sep->se_ctrladdr_un.sun_path) memset(&sep->se_ctrladdr, 0, sizeof(sep->se_ctrladdr)); sep->se_ctrladdr_un.sun_family = sep->se_family; - if ((unsz = strlcpy(sep->se_ctrladdr_un.sun_path, - sep->se_service, SUN_PATH_MAXSIZE) >= SUN_PATH_MAXSIZE)) { + if (strlcpy(sep->se_ctrladdr_un.sun_path, sep->se_service, + SUN_PATH_MAXSIZE) >= SUN_PATH_MAXSIZE) { syslog(LOG_ERR, "domain socket pathname too long for service %s", sep->se_service); goto more; } - sep->se_ctrladdr_un.sun_len = unsz; #undef SUN_PATH_MAXSIZE - sep->se_ctrladdr_size = SUN_LEN(&sep->se_ctrladdr_un); + sep->se_ctrladdr_size = sep->se_ctrladdr_un.sun_len = + SUN_LEN(&sep->se_ctrladdr_un); } arg = sskip(&cp); if (!strncmp(arg, "wait", 4)) From owner-dev-commits-src-all@freebsd.org Tue Feb 16 05:15:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6299E528C23; Tue, 16 Feb 2021 05:15: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 4Dfq1S2Hnpz4lWV; Tue, 16 Feb 2021 05:15: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 4196C2D3C; Tue, 16 Feb 2021 05:15: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 11G5Feax061428; Tue, 16 Feb 2021 05:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G5FeSN061427; Tue, 16 Feb 2021 05:15:40 GMT (envelope-from git) Date: Tue, 16 Feb 2021 05:15:40 GMT Message-Id: <202102160515.11G5FeSN061427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c61fae1475f1 - main - pgcache read: protect against reads past end of the vm object size MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c61fae1475f1864dc4bba667b642f279afd44855 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 05:15:40 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c61fae1475f1864dc4bba667b642f279afd44855 commit c61fae1475f1864dc4bba667b642f279afd44855 Author: Konstantin Belousov AuthorDate: 2021-02-15 03:34:06 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-16 05:09:37 +0000 pgcache read: protect against reads past end of the vm object size If uio_offset is past end of the object size, calculated resid is negative. Delegate handling this case to the locked read, as any other non-trivial situation. PR: 253158 Reported by: Harald Schmalzbauer Tested by: cy Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_vnops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index f8943b3c07e7..71dd379558cb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -950,6 +950,10 @@ vn_read_from_obj(struct vnode *vp, struct uio *uio) #else vsz = atomic_load_64(&obj->un_pager.vnp.vnp_size); #endif + if (uio->uio_offset >= vsz) { + error = EJUSTRETURN; + goto out; + } if (uio->uio_offset + resid > vsz) resid = vsz - uio->uio_offset; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 05:15:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 84399528955; Tue, 16 Feb 2021 05:15: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 4Dfq1T32Ybz4lWY; Tue, 16 Feb 2021 05:15: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 5924A2F1B; Tue, 16 Feb 2021 05:15: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 11G5FfeS061451; Tue, 16 Feb 2021 05:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G5FfuC061450; Tue, 16 Feb 2021 05:15:41 GMT (envelope-from git) Date: Tue, 16 Feb 2021 05:15:41 GMT Message-Id: <202102160515.11G5FfuC061450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c31480a1f665 - main - UFS snapshots: properly set the vm object size. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c31480a1f66537e59b02e935a547bcfc76715278 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 05:15:41 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c31480a1f66537e59b02e935a547bcfc76715278 commit c31480a1f66537e59b02e935a547bcfc76715278 Author: Konstantin Belousov AuthorDate: 2021-02-15 03:36:02 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-16 05:11:52 +0000 UFS snapshots: properly set the vm object size. Citing Kirk: The previous code [before 8563de2f2799b2cb -- kib] did not call vnode_pager_setsize() but worked because later in ffs_snapshot() it does a UFS_WRITE() to output the snaplist. Previously the UFS_WRITE() allocated the extra block at the end of the file which caused it to do the needed vnode_pager_setsize(). But the new code had already allocated the extra block, so UFS_WRITE() did not extend the size and thus did not do the vnode_pager_setsize(). PR: 253158 Reported by: Harald Schmalzbauer Reviewed by: mckusick Tested by: cy Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/ufs/ffs/ffs_snapshot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 8f0adde6f5e4..6da84fb46bb0 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include @@ -328,6 +331,7 @@ restart: goto out; bawrite(bp); ip->i_size = lblktosize(fs, (off_t)(numblks + 1)); + vnode_pager_setsize(vp, ip->i_size); DIP_SET(ip, i_size, ip->i_size); UFS_INODE_SET_FLAG(ip, IN_SIZEMOD | IN_CHANGE | IN_UPDATE); /* From owner-dev-commits-src-all@freebsd.org Tue Feb 16 08:28:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 79D2952DAEA; Tue, 16 Feb 2021 08:28: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 4DfvHm2zHkz3F1s; Tue, 16 Feb 2021 08:28: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 4E60054F9; Tue, 16 Feb 2021 08:28: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 11G8SK4N009535; Tue, 16 Feb 2021 08:28:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G8SKQ3009534; Tue, 16 Feb 2021 08:28:20 GMT (envelope-from git) Date: Tue, 16 Feb 2021 08:28:20 GMT Message-Id: <202102160828.11G8SKQ3009534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Lutz Donnerhacke Subject: git: 591e21210e35 - stable/12 - netgraph/ng_source: Allow ng_source to inject into any netgraph network MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 591e21210e35b7b0ed0a8c39404e15a1225976bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 08:28:20 -0000 The branch stable/12 has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=591e21210e35b7b0ed0a8c39404e15a1225976bf commit 591e21210e35b7b0ed0a8c39404e15a1225976bf Author: Lutz Donnerhacke AuthorDate: 2021-01-17 20:35:28 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-02-16 08:25:59 +0000 netgraph/ng_source: Allow ng_source to inject into any netgraph network PR: 240530 Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D21968 (cherry picked from commit 75e7ef74dfc12e01b1ef4706110d238639e04543) --- share/man/man4/ng_source.4 | 11 +++++++++-- sys/netgraph/ng_source.c | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/share/man/man4/ng_source.4 b/share/man/man4/ng_source.4 index 5205bc41e15d..87b235bda2c8 100644 --- a/share/man/man4/ng_source.4 +++ b/share/man/man4/ng_source.4 @@ -32,7 +32,7 @@ .\" Author: Dave Chapeskie .\" $FreeBSD$ .\" -.Dd March 1, 2007 +.Dd January 18, 2021 .Dt NG_SOURCE 4 .Os .Sh NAME @@ -91,7 +91,14 @@ should be turned off on .Xr ng_ether 4 node manually. .Pp -Once interface is configured, upon receipt of a +If the node is connected to a netgraph network, which does not +terminate in a real +.Xr ng_ether 4 +interface, limit the packet injection rate explicitly with the +.Va NGM_SOURCE_SETPPS +control message. +.Pp +Upon receipt of a .Dv NGM_SOURCE_START control message the node starts sending the previously queued packets out the diff --git a/sys/netgraph/ng_source.c b/sys/netgraph/ng_source.c index da8f42381ac3..401548da65d0 100644 --- a/sys/netgraph/ng_source.c +++ b/sys/netgraph/ng_source.c @@ -683,8 +683,8 @@ ng_source_clr_data (sc_p sc) static int ng_source_start(sc_p sc, uint64_t packets) { - if (sc->output_ifp == NULL) { - printf("ng_source: start without iface configured\n"); + if (sc->output_ifp == NULL && sc->stats.maxPps == 0) { + printf("ng_source: start without iface or pps configured\n"); return (ENXIO); } From owner-dev-commits-src-all@freebsd.org Tue Feb 16 08:53:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 82E4852F108; Tue, 16 Feb 2021 08:53: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 4DfvrY3MF6z3HF8; Tue, 16 Feb 2021 08:53: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 665755E49; Tue, 16 Feb 2021 08:53: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 11G8rHf4048036; Tue, 16 Feb 2021 08:53:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G8rHLR048035; Tue, 16 Feb 2021 08:53:17 GMT (envelope-from git) Date: Tue, 16 Feb 2021 08:53:17 GMT Message-Id: <202102160853.11G8rHLR048035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rajesh Kumar M A Subject: git: 9f6cf1426f1e - main - Source repo changes to add new committer Rajesh Kumar M A MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rajeshasp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f6cf1426f1e12a328bbe739ed23c42318eb7f23 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 08:53:17 -0000 The branch main has been updated by rajeshasp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f6cf1426f1e12a328bbe739ed23c42318eb7f23 commit 9f6cf1426f1e12a328bbe739ed23c42318eb7f23 Author: Rajesh Kumar M A AuthorDate: 2021-02-16 08:52:09 +0000 Commit: Rajesh Kumar M A CommitDate: 2021-02-16 08:52:09 +0000 Source repo changes to add new committer Rajesh Kumar M A Approved by: vmaffione, gallatin Differential Revision: https://reviews.freebsd.org/D28586 --- share/misc/committers-src.dot | 4 ++++ usr.bin/calendar/calendars/calendar.freebsd | 1 + 2 files changed, 5 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index e855a203e91b..46df10579784 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -297,6 +297,7 @@ pkelsey [label="Patrick Kelsey\pkelsey@FreeBSD.org\n2014/05/29"] pluknet [label="Sergey Kandaurov\npluknet@FreeBSD.org\n2010/10/05"] ps [label="Paul Saab\nps@FreeBSD.org\n2000/02/23"] qingli [label="Qing Li\nqingli@FreeBSD.org\n2005/04/13"] +rajeshasp [label="Rajesh Kumar M A\nrajeshasp@FreeBSD.org\n2021/01/27"] ram [label="Ram Kishore Vegesna\nram@FreeBSD.org\n2018/04/04"] ray [label="Aleksandr Rybalko\nray@FreeBSD.org\n2011/05/25"] rdivacky [label="Roman Divacky\nrdivacky@FreeBSD.org\n2008/03/13"] @@ -529,6 +530,7 @@ erj -> jeb fjoe -> versus gallatin -> ticso +gallatin -> rajeshasp gavin -> versus @@ -901,6 +903,8 @@ ume -> tshiozak vangyzen -> badger vangyzen -> dab +vmaffione -> rajeshasp + wes -> scf wkoszek -> jceel diff --git a/usr.bin/calendar/calendars/calendar.freebsd b/usr.bin/calendar/calendars/calendar.freebsd index 5cbb9dcedec9..fa24de988bd8 100644 --- a/usr.bin/calendar/calendars/calendar.freebsd +++ b/usr.bin/calendar/calendars/calendar.freebsd @@ -81,6 +81,7 @@ 02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 02/14 Martin Blapp born in Olten, Switzerland, 1976 02/15 Hiren Panchasara born in Ahmedabad, Gujarat, India, 1984 +02/15 Rajesh Kumar M A born in Erode, Tamilnadu, India, 1986 02/16 Justin Hibbits born in Toledo, Ohio, United States, 1983 02/16 Tobias Christian Berner born in Bern, Switzerland, 1985 02/18 Christoph Moench-Tegeder born in Hannover, Niedersachsen, Germany, 1980 From owner-dev-commits-src-all@freebsd.org Tue Feb 16 09:51:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C91A95309EC; Tue, 16 Feb 2021 09:51: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 4Dfx835KyCz3Lqm; Tue, 16 Feb 2021 09:51: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 AA2556E07; Tue, 16 Feb 2021 09:51: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 11G9plEH026299; Tue, 16 Feb 2021 09:51:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11G9plcS026298; Tue, 16 Feb 2021 09:51:47 GMT (envelope-from git) Date: Tue, 16 Feb 2021 09:51:47 GMT Message-Id: <202102160951.11G9plcS026298@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: a1c158199793 - stable/13 - usr.bin/grep: Fix Address OOB read error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a1c1581997936ca7e828673a6468c95ce9578a94 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 09:51:47 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=a1c1581997936ca7e828673a6468c95ce9578a94 commit a1c1581997936ca7e828673a6468c95ce9578a94 Author: Alex Richardson AuthorDate: 2021-01-19 11:35:07 +0000 Commit: Alex Richardson CommitDate: 2021-02-16 09:50:31 +0000 usr.bin/grep: Fix Address OOB read error I found this when compiling all the bootstrap tools with -fsanitize=addres: ==65590==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62d000008400 at pc 0x000000473053 bp 0x7ffc1c7dd910 sp 0x7ffc1c7dd0b8 READ of size 32769 at 0x62d000008400 thread T0 #0 0x473052 in regexec (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) #1 0x4c9cf3 in procline /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:539:8 #2 0x4c8687 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:379:18 #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 0x62d000008400 is located 0 bytes to the right of 32768-byte region [0x62d000000400,0x62d000008400) allocated by thread T0 here: #0 0x493d5d in malloc (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x493d5d) #1 0x4cad75 in grep_malloc /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c:656:13 #2 0x4c8129 in procfile /local/scratch/alr48/cheri/freebsd/usr.bin/grep/util.c #3 0x4c6596 in main /local/scratch/alr48/cheri/freebsd/usr.bin/grep/grep.c:714:8 SUMMARY: AddressSanitizer: heap-buffer-overflow (/local/scratch/alr48/cheri/build/freebsd-amd64-build/local/scratch/alr48/cheri/freebsd/amd64.amd64/tmp/legacy/bin/grep+0x473052) in regexec Reviewed By: kevans MFC after: 1 week (cherry picked from commit 81c3f64110bb76e24d6062eafd7206c10f676d6f) --- usr.bin/grep/file.c | 11 +++++++---- usr.bin/grep/queue.c | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/usr.bin/grep/file.c b/usr.bin/grep/file.c index 3d86bef010e5..8577572c2887 100644 --- a/usr.bin/grep/file.c +++ b/usr.bin/grep/file.c @@ -98,7 +98,6 @@ char * grep_fgetln(struct file *f, struct parsec *pc) { char *p; - char *ret; size_t len; size_t off; ptrdiff_t diff; @@ -116,12 +115,15 @@ grep_fgetln(struct file *f, struct parsec *pc) /* Look for a newline in the remaining part of the buffer */ if ((p = memchr(bufpos, fileeol, bufrem)) != NULL) { ++p; /* advance over newline */ - ret = bufpos; len = p - bufpos; + if (grep_lnbufgrow(len + 1)) + goto error; + memcpy(lnbuf, bufpos, len); bufrem -= len; bufpos = p; pc->ln.len = len; - return (ret); + lnbuf[len] = '\0'; + return (lnbuf); } /* We have to copy the current buffered data to the line buffer */ @@ -148,7 +150,7 @@ grep_fgetln(struct file *f, struct parsec *pc) ++p; diff = p - bufpos; len += diff; - if (grep_lnbufgrow(len)) + if (grep_lnbufgrow(len + 1)) goto error; memcpy(lnbuf + off, bufpos, diff); bufrem -= diff; @@ -156,6 +158,7 @@ grep_fgetln(struct file *f, struct parsec *pc) break; } pc->ln.len = len; + lnbuf[len] = '\0'; return (lnbuf); error: diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index ac15185f0694..9babdbf74af8 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -95,12 +95,14 @@ enqueue(struct str *x) rotated = true; free(item->dat); } - item->dat = grep_malloc(sizeof(char) * x->len); + /* len + 1 for NUL-terminator */ + item->dat = grep_malloc(sizeof(char) * x->len + 1); item->len = x->len; item->line_no = x->line_no; item->boff = x->boff; item->off = x->off; memcpy(item->dat, x->dat, x->len); + item->dat[x->len] = '\0'; item->file = x->file; return (rotated); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 10:42:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6569E53256E; Tue, 16 Feb 2021 10:42: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 4DfyGB2VC4z3QLr; Tue, 16 Feb 2021 10:42: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 48993753B; Tue, 16 Feb 2021 10:42: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 11GAgAPQ089148; Tue, 16 Feb 2021 10:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GAgACa089147; Tue, 16 Feb 2021 10:42:10 GMT (envelope-from git) Date: Tue, 16 Feb 2021 10:42:10 GMT Message-Id: <202102161042.11GAgACa089147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: b72a2e3ffa3a - stable/13 - loader: remove BORDER_PIXELS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b72a2e3ffa3a6381a93b7bedfa0983060f2287b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 10:42:10 -0000 The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=b72a2e3ffa3a6381a93b7bedfa0983060f2287b7 commit b72a2e3ffa3a6381a93b7bedfa0983060f2287b7 Author: Toomas Soome AuthorDate: 2021-02-08 18:49:09 +0000 Commit: Toomas Soome CommitDate: 2021-02-15 21:04:01 +0000 loader: remove BORDER_PIXELS BORDER_PIXELS is left over from picking up the source from illumos port. Since FreeBSD VT does not use border in terminal size calculation, there is no reason why should loader use it. MFC after: 1 week (cherry picke from commit 96bef2053a87c8d01ce08ea88857e4657489c8e7) --- stand/common/gfx_fb.c | 23 ++++++++--------------- stand/i386/libi386/vidconsole.c | 4 ++-- stand/lua/drawer.lua | 2 +- sys/sys/font.h | 1 - 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 08c0f59505f2..2aed8775a540 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1888,25 +1888,18 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } if (font != NULL) { - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; return (font); } /* * Find best font for these dimensions, or use default - * - * A 1 pixel border is the absolute minimum we could have - * as a border around the text window (BORDER_PIXELS = 2), - * however a slightly larger border not only looks better - * but for the fonts currently statically built into the - * emulator causes much better font selection for the - * normal range of screen resolutions. */ STAILQ_FOREACH(fl, &fonts, font_next) { font = fl->font_data; - if ((((*rows * font->vfbd_height) + BORDER_PIXELS) <= height) && - (((*cols * font->vfbd_width) + BORDER_PIXELS) <= width)) { + if ((*rows * font->vfbd_height <= height) && + (*cols * font->vfbd_width <= width)) { if (font->vfbd_font == NULL || fl->font_flags == FONT_RELOAD) { if (fl->font_load != NULL && @@ -1916,8 +1909,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) if (font == NULL) continue; } - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; break; } font = NULL; @@ -1936,8 +1929,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) if (font == NULL) font = &DEFAULT_FONT_DATA; - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; } return (font); diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index e17885cb7b0c..f94ed2d26712 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -908,8 +908,8 @@ cons_update_mode(bool use_gfx_mode) } else { /* Trigger loading of 8x16 font. */ setup_font(&gfx_state, - 16 * gfx_state.tg_fb.fb_height + BORDER_PIXELS, - 8 * gfx_state.tg_fb.fb_width + BORDER_PIXELS); + 16 * gfx_state.tg_fb.fb_height, + 8 * gfx_state.tg_fb.fb_width); gfx_state.tg_functions = &tf; /* ensure the following are not set for text mode */ unsetenv("screen.height"); diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 6062d7e87a03..eb9b18117cd3 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -308,7 +308,7 @@ local function drawbrand() if core.isFramebufferConsole() and loader.term_putimage ~= nil and branddef.image ~= nil then - if loader.term_putimage(branddef.image, 0, 0, 0, 7, 0) + if loader.term_putimage(branddef.image, 1, 1, 0, 7, 0) then return true end diff --git a/sys/sys/font.h b/sys/sys/font.h index e09b2112959d..969a9bce4e6d 100644 --- a/sys/sys/font.h +++ b/sys/sys/font.h @@ -107,7 +107,6 @@ struct fontlist { STAILQ_ENTRY(fontlist) font_next; }; -#define BORDER_PIXELS 10 /* space from screen border */ typedef STAILQ_HEAD(font_list, fontlist) font_list_t; #define FONT_HEADER_MAGIC "VFNT0002" From owner-dev-commits-src-all@freebsd.org Tue Feb 16 10:43:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 21CD053278F; Tue, 16 Feb 2021 10:43: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 4DfyHq0Qdcz3QpY; Tue, 16 Feb 2021 10:43: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 01650735B; Tue, 16 Feb 2021 10:43: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 11GAhYLG091805; Tue, 16 Feb 2021 10:43:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GAhYP6091804; Tue, 16 Feb 2021 10:43:34 GMT (envelope-from git) Date: Tue, 16 Feb 2021 10:43:34 GMT Message-Id: <202102161043.11GAhYP6091804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: d9dd77252cab - stable/13 - loader: do not autoselect smaller font than 8x16 with high res display MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d9dd77252cabe014c33cb642a703625b821b0b7d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 10:43:35 -0000 The branch stable/13 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=d9dd77252cabe014c33cb642a703625b821b0b7d commit d9dd77252cabe014c33cb642a703625b821b0b7d Author: Toomas Soome AuthorDate: 2021-02-08 22:34:47 +0000 Commit: Toomas Soome CommitDate: 2021-02-15 21:05:28 +0000 loader: do not autoselect smaller font than 8x16 with high res display The VT screen buffer size is calculated based on our default built in (8x16) font. With high-resolution display, we want to use at least 8x16 font, or we will have large unused areas on screen. MFC after: 1 week (cherry picke from commit a26f7358583174f2fe0df3e979f7b8b02069278c) --- stand/common/gfx_fb.c | 12 +++++++++--- stand/common/gfx_fb.h | 12 ++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 2aed8775a540..02a0a3d2be22 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1894,12 +1894,18 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } /* - * Find best font for these dimensions, or use default + * Find best font for these dimensions, or use default. + * If height >= VT_FB_MAX_HEIGHT and width >= VT_FB_MAX_WIDTH, + * do not use smaller font than our DEFAULT_FONT_DATA. */ STAILQ_FOREACH(fl, &fonts, font_next) { font = fl->font_data; - if ((*rows * font->vfbd_height <= height) && - (*cols * font->vfbd_width <= width)) { + if ((*rows * font->vfbd_height <= height && + *cols * font->vfbd_width <= width) || + (height >= VT_FB_MAX_HEIGHT && + width >= VT_FB_MAX_WIDTH && + font->vfbd_height == DEFAULT_FONT_DATA.vfbd_height && + font->vfbd_width == DEFAULT_FONT_DATA.vfbd_width)) { if (font->vfbd_font == NULL || fl->font_flags == FONT_RELOAD) { if (fl->font_load != NULL && diff --git a/stand/common/gfx_fb.h b/stand/common/gfx_fb.h index 1424b8223136..c62c6441f8ad 100644 --- a/stand/common/gfx_fb.h +++ b/stand/common/gfx_fb.h @@ -164,6 +164,18 @@ struct vesa_flat_panel_info { #define NCMAP 256 extern uint32_t cmap[NCMAP]; +/* + * VT_FB_MAX_WIDTH and VT_FB_MAX_HEIGHT are dimensions from where + * we will not auto select smaller font than 8x16. + * See also sys/dev/vt/vt.h + */ +#ifndef VT_FB_MAX_WIDTH +#define VT_FB_MAX_WIDTH 4096 +#endif +#ifndef VT_FB_MAX_HEIGHT +#define VT_FB_MAX_HEIGHT 2400 +#endif + enum FB_TYPE { FB_TEXT = -1, FB_GOP, From owner-dev-commits-src-all@freebsd.org Tue Feb 16 10:50:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AA0855326DE; Tue, 16 Feb 2021 10:50: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 4DfySL4TFVz3R14; Tue, 16 Feb 2021 10:50: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 8C48A75E4; Tue, 16 Feb 2021 10:50: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 11GAowDJ000470; Tue, 16 Feb 2021 10:50:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GAowEr000469; Tue, 16 Feb 2021 10:50:58 GMT (envelope-from git) Date: Tue, 16 Feb 2021 10:50:58 GMT Message-Id: <202102161050.11GAowEr000469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 6b52139eb8e8 - main - pf tests: Test unicast reverse path forwarding check 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/main X-Git-Reftype: branch X-Git-Commit: 6b52139eb8e8eda0ea263b24735556194f918642 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 10:50:58 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=6b52139eb8e8eda0ea263b24735556194f918642 commit 6b52139eb8e8eda0ea263b24735556194f918642 Author: Kristof Provost AuthorDate: 2021-02-15 21:16:36 +0000 Commit: Kristof Provost CommitDate: 2021-02-16 09:48:58 +0000 pf tests: Test unicast reverse path forwarding check Ensure that pf's urpf-failed keyword works as expected. PR: 253479 MFC after: 1 week Reviewed by: melifaro@ Differential Revision: https://reviews.freebsd.org/D28694 --- tests/sys/netpfil/common/pft_ping.py | 52 ++++++++++++++++++++++++++++ tests/sys/netpfil/pf/pass_block.sh | 67 ++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index 812250803309..957123e4f6f8 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -115,6 +115,35 @@ def check_ping6_request(args, packet): return True +def check_ping_reply(args, packet): + return check_ping4_reply(args, packet) + +def check_ping4_reply(args, packet): + """ + Check that this is a reply to the ping request we sent + """ + dst_ip = args.to[0] + + ip = packet.getlayer(sp.IP) + if not ip: + return False + if ip.src != dst_ip: + return False + + icmp = packet.getlayer(sp.ICMP) + if not icmp: + return False + if sp.icmptypes[icmp.type] != 'echo-reply': + return False + + raw = packet.getlayer(sp.Raw) + if not raw: + return False + if raw.load != PAYLOAD_MAGIC: + return False + + return True + def ping(send_if, dst_ip, args): ether = sp.Ether() ip = sp.IP(dst=dst_ip) @@ -124,6 +153,9 @@ def ping(send_if, dst_ip, args): if args.send_tos: ip.tos = int(args.send_tos[0]) + if args.fromaddr: + ip.src = args.fromaddr[0] + req = ether / ip / icmp / raw sp.sendp(req, iface=send_if, verbose=False) @@ -132,6 +164,9 @@ def ping6(send_if, dst_ip, args): ip6 = sp.IPv6(dst=dst_ip) icmp = sp.ICMPv6EchoRequest(data=sp.raw(PAYLOAD_MAGIC)) + if args.fromaddr: + ip.src = args.fromaddr[0] + req = ether / ip6 / icmp sp.sendp(req, iface=send_if, verbose=False) @@ -189,6 +224,8 @@ def main(): required=True, help='The interface through which the packet(s) will be sent') parser.add_argument('--recvif', nargs=1, + help='The interface on which to expect the ICMP echo request') + parser.add_argument('--replyif', nargs=1, help='The interface on which to expect the ICMP echo response') parser.add_argument('--checkdup', nargs=1, help='The interface on which to expect the duplicated ICMP packets') @@ -197,6 +234,8 @@ def main(): parser.add_argument('--to', nargs=1, required=True, help='The destination IP address for the ICMP echo request') + parser.add_argument('--fromaddr', nargs=1, + help='The source IP address for the ICMP echo request') # TCP options parser.add_argument('--tcpsyn', action='store_true', @@ -225,6 +264,11 @@ def main(): sniffer = Sniffer(args, checkfn) + replysniffer = None + if not args.replyif is None: + checkfn=check_ping_reply + replysniffer = Sniffer(args, checkfn, recvif=args.replyif[0]) + dupsniffer = None if args.checkdup is not None: dupsniffer = Sniffer(args, check_dup, recvif=args.checkdup[0]) @@ -250,5 +294,13 @@ def main(): else: sys.exit(1) + if replysniffer: + replysniffer.join() + + if replysniffer.foundCorrectPacket: + sys.exit(0) + else: + sys.exit(1) + if __name__ == '__main__': main() diff --git a/tests/sys/netpfil/pf/pass_block.sh b/tests/sys/netpfil/pf/pass_block.sh index 139adb43bddd..589b89891729 100644 --- a/tests/sys/netpfil/pf/pass_block.sh +++ b/tests/sys/netpfil/pf/pass_block.sh @@ -27,6 +27,8 @@ . $(atf_get_srcdir)/utils.subr +common_dir=$(atf_get_srcdir)/../common + atf_test_case "v4" "cleanup" v4_head() { @@ -189,10 +191,75 @@ nested_inline_cleanup() pft_cleanup } +atf_test_case "urpf" "cleanup" +urpf_head() +{ + atf_set descr "Test unicast reverse path forwarding check" + atf_set require.user root + atf_set require.progs scapy +} + +urpf_body() +{ + pft_init + + epair_one=$(vnet_mkepair) + epair_two=$(vnet_mkepair) + + vnet_mkjail alcatraz ${epair_one}b ${epair_two}b + + ifconfig ${epair_one}a 192.0.2.2/24 up + ifconfig ${epair_two}a 198.51.100.2/24 up + + jexec alcatraz ifconfig ${epair_one}b 192.0.2.1/24 up + jexec alcatraz ifconfig ${epair_two}b 198.51.100.1/24 up + jexec alcatraz sysctl net.inet.ip.forwarding=1 + + # Sanity checks + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + atf_check -s exit:0 -o ignore ping -c 1 -t 1 198.51.100.1 + atf_check -s exit:0 ${common_dir}/pft_ping.py \ + --sendif ${epair_one}a \ + --to 192.0.2.1 \ + --fromaddr 198.51.100.2 \ + --replyif ${epair_two}a + atf_check -s exit:0 ${common_dir}/pft_ping.py \ + --sendif ${epair_two}a \ + --to 198.51.100.1 \ + --fromaddr 192.0.2.2 \ + --replyif ${epair_one}a + + pft_set_rules alcatraz \ + "block quick from urpf-failed" + jexec alcatraz pfctl -e + + # Correct source still works + atf_check -s exit:0 -o ignore ping -c 1 -t 1 192.0.2.1 + atf_check -s exit:0 -o ignore ping -c 1 -t 1 198.51.100.1 + + # Unexpected source interface is blocked + atf_check -s exit:1 ${common_dir}/pft_ping.py \ + --sendif ${epair_one}a \ + --to 192.0.2.1 \ + --fromaddr 198.51.100.2 \ + --replyif ${epair_two}a + atf_check -s exit:1 ${common_dir}/pft_ping.py \ + --sendif ${epair_two}a \ + --to 198.51.100.1 \ + --fromaddr 192.0.2.2 \ + --replyif ${epair_one}a +} + +urpf_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4" atf_add_test_case "v6" atf_add_test_case "noalias" atf_add_test_case "nested_inline" + atf_add_test_case "urpf" } From owner-dev-commits-src-all@freebsd.org Tue Feb 16 11:24:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BD2135333DA; Tue, 16 Feb 2021 11:24: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 4DfzC252dRz3jnJ; Tue, 16 Feb 2021 11:24: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 9FC9D7FBA; Tue, 16 Feb 2021 11:24: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 11GBOUrU044409; Tue, 16 Feb 2021 11:24:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GBOUbm044408; Tue, 16 Feb 2021 11:24:30 GMT (envelope-from git) Date: Tue, 16 Feb 2021 11:24:30 GMT Message-Id: <202102161124.11GBOUbm044408@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: afcb3c4cb49f - main - zfs: change file mode of all merged tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: afcb3c4cb49f1ba9690d066c3dc1af9c7bee1ea3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 11:24:30 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=afcb3c4cb49f1ba9690d066c3dc1af9c7bee1ea3 commit afcb3c4cb49f1ba9690d066c3dc1af9c7bee1ea3 Author: Martin Matuska AuthorDate: 2021-02-16 11:23:43 +0000 Commit: Martin Matuska CommitDate: 2021-02-16 11:23:43 +0000 zfs: change file mode of all merged tests If the ksh files are not executable then the tests are not run and reported as failed. MFC after: 2 weeks X-MFC-with: 6b52139eb8e8eda0ea263b24735556194f918642 --- .../tests/zfs-tests/tests/functional/checksum/filetest_002_pos.ksh | 0 .../zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_nomount.ksh | 0 .../zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh | 0 .../zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_014_neg.ksh | 0 .../tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh | 0 .../tests/functional/cli_root/zpool_create/zpool_create_draid_001_pos.ksh | 0 .../tests/functional/cli_root/zpool_create/zpool_create_draid_002_pos.ksh | 0 .../tests/functional/cli_root/zpool_create/zpool_create_draid_003_pos.ksh | 0 .../tests/functional/cli_root/zpool_create/zpool_create_draid_004_pos.ksh | 0 .../tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh | 0 .../tests/functional/cli_root/zpool_import/zpool_import_016_pos.ksh | 0 .../tests/functional/cli_root/zpool_import/zpool_import_017_pos.ksh | 0 .../tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_arcstats_pos.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_l2miss_pos.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_mfuonly_pos.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/raidz/raidz_003_pos.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/raidz/raidz_004_pos.ksh | 0 .../tests/zfs-tests/tests/functional/redundancy/redundancy_draid1.ksh | 0 .../tests/zfs-tests/tests/functional/redundancy/redundancy_draid2.ksh | 0 .../tests/zfs-tests/tests/functional/redundancy/redundancy_draid3.ksh | 0 .../zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh | 0 .../zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh | 0 .../zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh | 0 .../tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh | 0 .../tests/zfs-tests/tests/functional/redundancy/redundancy_raidz3.ksh | 0 .../tests/zfs-tests/tests/functional/removal/remove_attach_mirror.ksh | 0 .../tests/zfs-tests/tests/functional/userquota/userspace_encrypted.ksh | 0 .../zfs-tests/tests/functional/userquota/userspace_send_encrypted.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/cleanup.ksh | 0 .../openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/setup.ksh | 0 .../tests/zfs-tests/tests/functional/zpool_influxdb/zpool_influxdb.ksh | 0 32 files changed, 0 insertions(+), 0 deletions(-) diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/checksum/filetest_002_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/checksum/filetest_002_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_nomount.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_nomount.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_013_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_014_neg.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zfs_mount/zfs_mount_014_neg.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_dryrun_output.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_001_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_001_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_002_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_002_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_003_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_003_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_004_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_draid_004_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_dryrun_output.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_016_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_016_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_017_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_017_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_split/zpool_split_dryrun_output.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_arcstats_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_arcstats_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_l2miss_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_l2miss_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_mfuonly_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/l2arc/l2arc_mfuonly_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/raidz/raidz_003_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/raidz/raidz_003_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/raidz/raidz_004_pos.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/raidz/raidz_004_pos.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid1.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid1.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid2.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid2.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid3.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid3.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare1.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare2.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_draid_spare3.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz3.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz3.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/removal/remove_attach_mirror.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/removal/remove_attach_mirror.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/userspace_encrypted.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/userspace_encrypted.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/userspace_send_encrypted.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/userquota/userspace_send_encrypted.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/cleanup.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/cleanup.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/setup.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/setup.ksh old mode 100644 new mode 100755 diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/zpool_influxdb.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/zpool_influxdb/zpool_influxdb.ksh old mode 100644 new mode 100755 From owner-dev-commits-src-all@freebsd.org Tue Feb 16 12:10:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AB674535C99; Tue, 16 Feb 2021 12:10: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 4Dg0CX4C6bz3mkT; Tue, 16 Feb 2021 12:10: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 82E9410CAC; Tue, 16 Feb 2021 12:10: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 11GCA0bs098496; Tue, 16 Feb 2021 12:10:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GCA05T098479; Tue, 16 Feb 2021 12:10:00 GMT (envelope-from git) Date: Tue, 16 Feb 2021 12:10:00 GMT Message-Id: <202102161210.11GCA05T098479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 3c40e1d52cd8 - main - update the SACK loss recovery to RFC6675, with the following new features: - improved pipe calculation which does not degrade under heavy loss - engaging in Loss Recovery earlier under adverse conditions - Rescue Retransmission in case some of the trailing packets of a request got lost 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/main X-Git-Reftype: branch X-Git-Commit: 3c40e1d52cd86168779cf99dbabe58df465d7e3f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 12:10:00 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=3c40e1d52cd86168779cf99dbabe58df465d7e3f commit 3c40e1d52cd86168779cf99dbabe58df465d7e3f Author: Richard Scheffenegger AuthorDate: 2021-02-16 11:18:43 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-16 12:08:37 +0000 update the SACK loss recovery to RFC6675, with the following new features: - improved pipe calculation which does not degrade under heavy loss - engaging in Loss Recovery earlier under adverse conditions - Rescue Retransmission in case some of the trailing packets of a request got lost All above changes are toggled with the sysctl "rfc6675_pipe" (disabled by default). Reviewers: #transport, tuexen, lstewart, slavash, jtl, hselasky, kib, rgrimes, chengc_netapp.com, thj, #manpages, kbowling, #netapp, rscheff Reviewed By: #transport Subscribers: imp, melifaro MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D18985 --- share/man/man4/tcp.4 | 10 +++++++++- sys/netinet/tcp_input.c | 34 +++++++++++++++++++++++++++++----- sys/netinet/tcp_sack.c | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 6 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 431bcd95513b..16cf02184516 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 11, 2021 +.Dd February 13, 2021 .Dt TCP 4 .Os .Sh NAME @@ -560,6 +560,14 @@ high losses leading to RTO, but reduces PRR effectiveness in more common setting .It Va rfc6675_pipe Calculate the bytes in flight using the algorithm described in RFC 6675, and is also an improvement when Proportional Rate Reduction is enabled. +Also enables two other mechanisms from RFC6675. +Rescue Retransmission helps timely loss recovery, when the trailing segments +of a transmission are lost, while no additional data is ready to be sent. +In case a partial ACK without a SACK block is received during SACK loss +recovery, the trailing segment is immediately resent, rather than waiting +for a Retransmission timeout. +SACK loss recovery is also engaged, once two segments plus one byte are +SACKed - even if no traditional duplicate ACKs were seen. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index b7baef5bc0d6..dbe86e4e65c0 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1501,6 +1501,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, struct mbuf *mfree; struct tcpopt to; int tfo_syn; + u_int maxseg; #ifdef TCPDEBUG /* @@ -2502,8 +2503,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, #endif if (SEQ_LEQ(th->th_ack, tp->snd_una)) { - u_int maxseg; - maxseg = tcp_maxseg(tp); if (tlen == 0 && (tiwin == tp->snd_wnd || @@ -2644,7 +2643,21 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, tp->snd_cwnd += maxseg; (void) tp->t_fb->tfb_tcp_output(tp); goto drop; - } else if (tp->t_dupacks == tcprexmtthresh) { + } else if (tp->t_dupacks == tcprexmtthresh || + (tp->t_flags & TF_SACK_PERMIT && + V_tcp_do_rfc6675_pipe && + tp->sackhint.sacked_bytes > + (tcprexmtthresh - 1) * maxseg)) { +enter_recovery: + /* + * Above is the RFC6675 trigger condition of + * more than (dupthresh-1)*maxseg sacked data. + * If the count of holes in the + * scoreboard is >= dupthresh, we could + * also enter loss recovery, but don't + * have that value readily available. + */ + tp->t_dupacks = tcprexmtthresh; tcp_seq onxt = tp->snd_nxt; /* @@ -2689,6 +2702,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, tp->snd_recover = tp->snd_nxt; tp->snd_cwnd = maxseg; (void) tp->t_fb->tfb_tcp_output(tp); + if (SEQ_GT(th->th_ack, tp->snd_una)) + goto resume_partialack; goto drop; } tp->snd_nxt = th->th_ack; @@ -2775,10 +2790,19 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((tp->t_flags & TF_SACK_PERMIT) && (to.to_flags & TOF_SACK) && - sack_changed) + sack_changed) { tp->t_dupacks++; + /* limit overhead by setting maxseg last */ + if (!IN_FASTRECOVERY(tp->t_flags) && + (tp->sackhint.sacked_bytes > + ((tcprexmtthresh - 1) * + (maxseg = tcp_maxseg(tp))))) { + goto enter_recovery; + } + } } +resume_partialack: KASSERT(SEQ_GT(th->th_ack, tp->snd_una), ("%s: th_ack <= snd_una", __func__)); @@ -2789,7 +2813,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, if (IN_FASTRECOVERY(tp->t_flags)) { if (SEQ_LT(th->th_ack, tp->snd_recover)) { if (tp->t_flags & TF_SACK_PERMIT) - if (V_tcp_do_prr) + if (V_tcp_do_prr && to.to_flags & TOF_SACK) tcp_prr_partialack(tp, th); else tcp_sack_partialack(tp, th); diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 2cae6a560c48..28cd5c93f106 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -750,6 +750,16 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) else sblkp--; } + if (!(to->to_flags & TOF_SACK)) + /* + * If this ACK did not contain any + * SACK blocks, any only moved the + * left edge right, it is a pure + * cumulative ACK. Do not count + * DupAck for this. Also required + * for RFC6675 rescue retransmission. + */ + sack_changed = 0; tp->sackhint.delivered_data = delivered_data; tp->sackhint.sacked_bytes += delivered_data - left_edge_delta; KASSERT((delivered_data >= 0), ("delivered_data < 0")); @@ -800,6 +810,31 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; tp->t_flags |= TF_ACKNOW; + /* + * RFC6675 rescue retransmission + * Add a hole between th_ack (snd_una is not yet set) and snd_max, + * if this was a pure cumulative ACK and no data was send beyond + * recovery point. Since the data in the socket has not been freed + * at this point, we check if the scoreboard is empty, and the ACK + * delivered some new data, indicating a full ACK. Also, if the + * recovery point is still at snd_max, we are probably application + * limited. However, this inference might not always be true. The + * rescue retransmission may rarely be slightly premature + * compared to RFC6675. + * The corresponding ACK+SACK will cause any further outstanding + * segments to be retransmitted. This addresses a corner case, when + * the trailing packets of a window are lost and no further data + * is available for sending. + */ + if ((V_tcp_do_rfc6675_pipe) && + SEQ_LT(th->th_ack, tp->snd_recover) && + (tp->snd_recover == tp->snd_max) && + TAILQ_EMPTY(&tp->snd_holes) && + (tp->sackhint.delivered_data > 0)) { + struct sackhole *hole; + int maxseg = tcp_maxseg(tp); + hole = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, tp->snd_max - maxseg), tp->snd_max, NULL); + } (void) tp->t_fb->tfb_tcp_output(tp); } From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 59B8153A20C; Tue, 16 Feb 2021 14:27:12 +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 4Dg3Fr23jbz3w0v; Tue, 16 Feb 2021 14:27:12 +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 39B68129B5; Tue, 16 Feb 2021 14:27:12 +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 11GERCHS079966; Tue, 16 Feb 2021 14:27:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GERCbh079965; Tue, 16 Feb 2021 14:27:12 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:12 GMT Message-Id: <202102161427.11GERCbh079965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: ed87efbe24a5 - main - stand/efi: allow not exiting boot services MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed87efbe24a5734c7150153cf201f3db42b6ddab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:12 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=ed87efbe24a5734c7150153cf201f3db42b6ddab commit ed87efbe24a5734c7150153cf201f3db42b6ddab Author: Roger Pau Monné AuthorDate: 2021-02-05 10:15:19 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:10 +0000 stand/efi: allow not exiting boot services Xen requires that UEFI BootServices are enabled in order to boot, so introduce a new parameter to bi_load in order to select whether BS should be exited. No functional change introduced in this patch, as all current users of bi_load request BS to be exited. Further changes will make use of this functionality. Note the memory map is still appended to the kernel metadata, even when it could be modified by further calls to the Boot Services, as it will be used to detect if the kernel has been booted from UEFI. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28495 --- stand/efi/loader/arch/amd64/elf64_freebsd.c | 5 +++-- stand/efi/loader/arch/arm/exec.c | 4 ++-- stand/efi/loader/arch/arm64/exec.c | 5 +++-- stand/efi/loader/arch/i386/elf32_freebsd.c | 5 +++-- stand/efi/loader/arch/riscv/exec.c | 4 ++-- stand/efi/loader/bootinfo.c | 11 +++++++---- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c index 896041e066c9..cbaeb35cc952 100644 --- a/stand/efi/loader/arch/amd64/elf64_freebsd.c +++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c @@ -54,7 +54,8 @@ __FBSDID("$FreeBSD$"); static EFI_GUID acpi_guid = ACPI_TABLE_GUID; static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); +extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); @@ -186,7 +187,7 @@ elf64_exec(struct preloaded_file *fp) printf("Start @ 0x%lx ...\n", ehdr->e_entry); efi_time_fini(); - err = bi_load(fp->f_args, &modulep, &kernend); + err = bi_load(fp->f_args, &modulep, &kernend, true); if (err != 0) { efi_time_init(); return(err); diff --git a/stand/efi/loader/arch/arm/exec.c b/stand/efi/loader/arch/arm/exec.c index 86c931bcbbe8..a110f3d07cbc 100644 --- a/stand/efi/loader/arch/arm/exec.c +++ b/stand/efi/loader/arch/arm/exec.c @@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$"); #include "loader_efi.h" extern vm_offset_t md_load(char *, vm_offset_t *); -extern int bi_load(char *, vm_offset_t *, vm_offset_t *); +extern int bi_load(char *, vm_offset_t *, vm_offset_t *, bool); static int __elfN(arm_load)(char *filename, uint64_t dest, @@ -80,7 +80,7 @@ __elfN(arm_exec)(struct preloaded_file *fp) printf("Kernel entry at %p...\n", entry); printf("Kernel args: %s\n", fp->f_args); - if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) { + if ((error = bi_load(fp->f_args, &modulep, &kernend, true)) != 0) { efi_time_init(); return (error); } diff --git a/stand/efi/loader/arch/arm64/exec.c b/stand/efi/loader/arch/arm64/exec.c index 45321261def0..7783d46cd8e1 100644 --- a/stand/efi/loader/arch/arm64/exec.c +++ b/stand/efi/loader/arch/arm64/exec.c @@ -55,7 +55,8 @@ static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); +int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); static struct file_format arm64_elf = { elf64_loadfile, @@ -114,7 +115,7 @@ elf64_exec(struct preloaded_file *fp) entry = efi_translate(ehdr->e_entry); efi_time_fini(); - err = bi_load(fp->f_args, &modulep, &kernendp); + err = bi_load(fp->f_args, &modulep, &kernendp, true); if (err != 0) { efi_time_init(); return (err); diff --git a/stand/efi/loader/arch/i386/elf32_freebsd.c b/stand/efi/loader/arch/i386/elf32_freebsd.c index 847d6eead097..97d114f09610 100644 --- a/stand/efi/loader/arch/i386/elf32_freebsd.c +++ b/stand/efi/loader/arch/i386/elf32_freebsd.c @@ -43,7 +43,8 @@ __FBSDID("$FreeBSD$"); #include "../btx/lib/btxv86.h" extern void __exec(caddr_t addr, ...); -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); +extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); static int elf32_exec(struct preloaded_file *amp); static int elf32_obj_exec(struct preloaded_file *amp); @@ -80,7 +81,7 @@ elf32_exec(struct preloaded_file *fp) printf("Start @ 0x%x ...\n", entry); - err = bi_load(fp->f_args, &modulep, &kernend); + err = bi_load(fp->f_args, &modulep, &kernend, true); if (err != 0) { efi_time_init(); return(err); diff --git a/stand/efi/loader/arch/riscv/exec.c b/stand/efi/loader/arch/riscv/exec.c index fe40003a475b..c7d90a4f31d0 100644 --- a/stand/efi/loader/arch/riscv/exec.c +++ b/stand/efi/loader/arch/riscv/exec.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include "bootstrap.h" #include "loader_efi.h" -extern int bi_load(char *, vm_offset_t *, vm_offset_t *); +extern int bi_load(char *, vm_offset_t *, vm_offset_t *, bool); static int __elfN(exec)(struct preloaded_file *fp) @@ -66,7 +66,7 @@ __elfN(exec)(struct preloaded_file *fp) printf("Kernel entry at %p...\n", entry); printf("Kernel args: %s\n", fp->f_args); - if ((error = bi_load(fp->f_args, &modulep, &kernend)) != 0) { + if ((error = bi_load(fp->f_args, &modulep, &kernend, true)) != 0) { efi_time_init(); return (error); } diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index a11c45d05a0f..111bc92422a1 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -60,7 +60,8 @@ __FBSDID("$FreeBSD$"); #include "geliboot.h" #endif -int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); +int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); extern EFI_SYSTEM_TABLE *ST; @@ -284,7 +285,7 @@ efi_do_vmap(EFI_MEMORY_DESCRIPTOR *mm, UINTN sz, UINTN mmsz, UINT32 mmver) } static int -bi_load_efi_data(struct preloaded_file *kfp) +bi_load_efi_data(struct preloaded_file *kfp, bool exit_bs) { EFI_MEMORY_DESCRIPTOR *mm; EFI_PHYSICAL_ADDRESS addr = 0; @@ -392,6 +393,8 @@ bi_load_efi_data(struct preloaded_file *kfp) sz = (EFI_PAGE_SIZE * pages) - efisz; } + if (!exit_bs) + break; status = BS->ExitBootServices(IH, efi_mapkey); if (!EFI_ERROR(status)) break; @@ -430,7 +433,7 @@ bi_load_efi_data(struct preloaded_file *kfp) * - Module metadata are formatted and placed in kernel space. */ int -bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) +bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) { struct preloaded_file *xp, *kfp; struct devdesc *rootdev; @@ -529,7 +532,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) #ifdef LOADER_GELI_SUPPORT geli_export_key_metadata(kfp); #endif - bi_load_efi_data(kfp); + bi_load_efi_data(kfp, exit_bs); /* Figure out the size and location of the metadata. */ *modulep = addr; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 82DC2539B71; Tue, 16 Feb 2021 14:27: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 4Dg3Fs3KwTz3wDp; Tue, 16 Feb 2021 14:27: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 5B81612747; Tue, 16 Feb 2021 14:27: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 11GERDLe079989; Tue, 16 Feb 2021 14:27:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GERDhT079988; Tue, 16 Feb 2021 14:27:13 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:13 GMT Message-Id: <202102161427.11GERDhT079988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 7d3259775cb6 - main - stand/efi: add modulep to kernel metadata MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7d3259775cb69f250df3e7fe51d6fff2283c6f20 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:13 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=7d3259775cb69f250df3e7fe51d6fff2283c6f20 commit 7d3259775cb69f250df3e7fe51d6fff2283c6f20 Author: Roger Pau Monné AuthorDate: 2021-02-05 10:11:36 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:11 +0000 stand/efi: add modulep to kernel metadata This mirrors the functionality of the BIOS amd64 bi_load function, that stashes the absolute address of the module metadata. This is required for booting as a Xen dom0 that does relocate the modulep and the loaded modules, and thus requires adjusting the offset. No functional change introduced, further patches will make use of this functionality for Xen dom0 loading. Sponsored by: Citrix Systems R&D Reviewed by: imp Differential revision: https://reviews.freebsd.org/D28496 --- stand/efi/loader/bootinfo.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 111bc92422a1..89ff6dca18d9 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -439,7 +439,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) struct devdesc *rootdev; struct file_metadata *md; vm_offset_t addr; - uint64_t kernend; + uint64_t kernend, module; uint64_t envp; vm_offset_t size; char *rootdevname; @@ -518,6 +518,10 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) if (kfp == NULL) panic("can't find kernel file"); kernend = 0; /* fill it in later */ + + /* Figure out the size and location of the metadata. */ + module = *modulep = addr; + file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof(howto), &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof(envp), &envp); #if defined(LOADER_FDT_SUPPORT) @@ -528,14 +532,13 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) "device tree blob found!\n"); #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend); + file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof(module), &module); file_addmetadata(kfp, MODINFOMD_FW_HANDLE, sizeof(ST), &ST); #ifdef LOADER_GELI_SUPPORT geli_export_key_metadata(kfp); #endif bi_load_efi_data(kfp, exit_bs); - /* Figure out the size and location of the metadata. */ - *modulep = addr; size = bi_copymodules(0); kernend = roundup(addr + size, PAGE_SIZE); *kernendp = kernend; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2BC71539D68; Tue, 16 Feb 2021 14:27:16 +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 4Dg3Fv5cr8z3wMq; Tue, 16 Feb 2021 14:27: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 8F36312850; Tue, 16 Feb 2021 14:27: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 11GERFmD080029; Tue, 16 Feb 2021 14:27:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GERFJw080028; Tue, 16 Feb 2021 14:27:15 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:15 GMT Message-Id: <202102161427.11GERFJw080028@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: a2495c36678c - main - xen/boot: allow specifying boot method when booted from Xen MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2495c36678cb16597758ce150da5456cdd90331 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:16 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=a2495c36678cb16597758ce150da5456cdd90331 commit a2495c36678cb16597758ce150da5456cdd90331 Author: Roger Pau Monné AuthorDate: 2021-02-08 10:28:36 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:11 +0000 xen/boot: allow specifying boot method when booted from Xen Allow setting the bootmethod variable from the Xen PVH entry point, in order to be able to correctly set the underlying firmware mode when booted as a dom0. Move the bootmethod variable to be defined in x86/cpu_machdep.c instead so it can be shared by both i386 and amd64. Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D28619 --- sys/amd64/amd64/machdep.c | 4 ---- sys/i386/i386/machdep.c | 7 +++---- sys/x86/include/x86_var.h | 1 + sys/x86/x86/cpu_machdep.c | 4 ++++ sys/x86/xen/pv.c | 8 ++++++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index a21a93610e51..569e32207a2c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1169,10 +1169,6 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, } } -static char bootmethod[16] = ""; -SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, - "System firmware boot method"); - static void native_parse_memmap(caddr_t kmdp, vm_paddr_t *physmap, int *physmap_idx) { diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index e847d97b8bcf..a9749d331f89 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1237,10 +1237,6 @@ u_long bootdev; /* not a struct cdev *- encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); -static char bootmethod[16] = "BIOS"; -SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, - "System firmware boot method"); - /* * Initialize 386 and configure to run kernel */ @@ -2348,6 +2344,9 @@ init386(int first) /* Init basic tunables, hz etc */ init_param1(); + /* Set bootmethod to BIOS: it's the only supported on i386. */ + strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); + /* * Make gdt memory segments. All segments cover the full 4GB * of address space and permissions are enforced at page level. diff --git a/sys/x86/include/x86_var.h b/sys/x86/include/x86_var.h index c1425755b5d1..f31dcd47fff5 100644 --- a/sys/x86/include/x86_var.h +++ b/sys/x86/include/x86_var.h @@ -95,6 +95,7 @@ extern int x86_taa_enable; extern int cpu_flush_rsb_ctxsw; extern int x86_rngds_mitg_enable; extern int cpu_amdc1e_bug; +extern char bootmethod[16]; struct pcb; struct thread; diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 4798f913d5b2..5bac8eb91eac 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -111,6 +111,10 @@ static u_int cpu_reset_proxyid; static volatile u_int cpu_reset_proxy_active; #endif +char bootmethod[16]; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, + "System firmware boot method"); + struct msr_op_arg { u_int msr; int op; diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 2fd698772f9d..a2424423aded 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -65,6 +66,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -630,6 +632,11 @@ xen_pvh_parse_preload_data(uint64_t modulep) if (envp != NULL) envp += off; xen_pvh_set_env(envp, reject_option); + + if (MD_FETCH(kmdp, MODINFOMD_EFI_MAP, void *) != NULL) + strlcpy(bootmethod, "UEFI", sizeof(bootmethod)); + else + strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); } else { /* Parse the extra boot information given by Xen */ if (start_info->cmdline_paddr != 0) @@ -637,6 +644,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) (char *)(start_info->cmdline_paddr + KERNBASE), ","); kmdp = NULL; + strlcpy(bootmethod, "XEN", sizeof(bootmethod)); } boothowto |= boot_env_to_howto(); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3E12853A124; Tue, 16 Feb 2021 14:27:22 +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 4Dg3Fz2txgz3wTF; Tue, 16 Feb 2021 14:27: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 E59C012A24; Tue, 16 Feb 2021 14:27: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 11GERHmQ080072; Tue, 16 Feb 2021 14:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GERHUp080071; Tue, 16 Feb 2021 14:27:17 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:17 GMT Message-Id: <202102161427.11GERHUp080071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 952667da986c - main - xen/efi: introduce a PV interface for EFI run time services for dom0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 952667da986c8a38720eed5a9d0290de308b23d3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:22 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=952667da986c8a38720eed5a9d0290de308b23d3 commit 952667da986c8a38720eed5a9d0290de308b23d3 Author: Roger Pau Monné AuthorDate: 2021-02-12 12:11:34 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:12 +0000 xen/efi: introduce a PV interface for EFI run time services for dom0 FreeBSD when running as a dom0 under Xen is not supposed to access the run time services directly, and instead should proxy the calls through Xen using an hypercall interface that exposes access to selected run time services. Implement the efirt interface on top of the Xen provided hypercalls. Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D28621 --- sys/conf/files | 1 + sys/dev/xen/efi/pvefi.c | 255 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 256 insertions(+) diff --git a/sys/conf/files b/sys/conf/files index 459fcddd693b..f1a76b0575d9 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3534,6 +3534,7 @@ dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm +dev/xen/efi/pvefi.c optional xenhvm efirt dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm dev/xen/netfront/netfront.c optional xenhvm diff --git a/sys/dev/xen/efi/pvefi.c b/sys/dev/xen/efi/pvefi.c new file mode 100644 index 000000000000..65778b7bcee1 --- /dev/null +++ b/sys/dev/xen/efi/pvefi.c @@ -0,0 +1,255 @@ +/*- + * Copyright (c) 2021 Citrix Systems R&D + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +extern char bootmethod[16]; + +static int +rt_ok(void) +{ + + return (0); +} + +static int +get_time(struct efi_tm *tm) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_get_time, + }; + struct xenpf_efi_runtime_call *call = &op.u.efi_runtime_call; + int error; + + error = HYPERVISOR_platform_op(&op); + if (error != 0) + return (xen_translate_error(error)); + + tm->tm_year = call->u.get_time.time.year; + tm->tm_mon = call->u.get_time.time.month; + tm->tm_mday = call->u.get_time.time.day; + tm->tm_hour = call->u.get_time.time.hour; + tm->tm_min = call->u.get_time.time.min; + tm->tm_sec = call->u.get_time.time.sec; + tm->tm_nsec = call->u.get_time.time.ns; + tm->tm_tz = call->u.get_time.time.tz; + tm->tm_dst = call->u.get_time.time.daylight; + + return (efi_status_to_errno(call->status)); +} + +static int +get_time_capabilities(struct efi_tmcap *tmcap) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_get_time, + }; + struct xenpf_efi_runtime_call *call = &op.u.efi_runtime_call; + int error; + + error = HYPERVISOR_platform_op(&op); + if (error != 0) + return (xen_translate_error(error)); + + tmcap->tc_res = call->u.get_time.resolution; + tmcap->tc_prec = call->u.get_time.accuracy; + tmcap->tc_stz = call->misc & XEN_EFI_GET_TIME_SET_CLEARS_NS; + + return (efi_status_to_errno(call->status)); +} + +static int +set_time(struct efi_tm *tm) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_get_time, + .u.efi_runtime_call.u.set_time.year = tm->tm_year, + .u.efi_runtime_call.u.set_time.month = tm->tm_mon, + .u.efi_runtime_call.u.set_time.day = tm->tm_mday, + .u.efi_runtime_call.u.set_time.hour = tm->tm_hour, + .u.efi_runtime_call.u.set_time.min = tm->tm_min, + .u.efi_runtime_call.u.set_time.sec = tm->tm_sec, + .u.efi_runtime_call.u.set_time.ns = tm->tm_nsec, + .u.efi_runtime_call.u.set_time.tz = tm->tm_tz, + .u.efi_runtime_call.u.set_time.daylight = tm->tm_dst, + }; + int error; + + error = HYPERVISOR_platform_op(&op); + + return ((error != 0) ? xen_translate_error(error) : + efi_status_to_errno(op.u.efi_runtime_call.status)); +} + +static int +var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, + size_t *datasize, void *data) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_get_variable, + .u.efi_runtime_call.u.get_variable.size = *datasize, + }; + struct xenpf_efi_runtime_call *call = &op.u.efi_runtime_call; + int error; + + CTASSERT(sizeof(*vendor) == sizeof(call->u.get_variable.vendor_guid)); + + memcpy(&call->u.get_variable.vendor_guid, vendor, + sizeof(*vendor)); + set_xen_guest_handle(call->u.get_variable.name, name); + set_xen_guest_handle(call->u.get_variable.data, data); + + error = HYPERVISOR_platform_op(&op); + if (error != 0) + return (xen_translate_error(error)); + + *attrib = call->misc; + *datasize = call->u.get_variable.size; + + return (efi_status_to_errno(call->status)); +} + +static int +var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_get_next_variable_name, + .u.efi_runtime_call.u.get_next_variable_name.size = *namesize, + }; + struct xenpf_efi_runtime_call *call = &op.u.efi_runtime_call; + int error; + + memcpy(&call->u.get_next_variable_name.vendor_guid, vendor, + sizeof(*vendor)); + set_xen_guest_handle(call->u.get_next_variable_name.name, name); + + error = HYPERVISOR_platform_op(&op); + if (error != 0) + return (xen_translate_error(error)); + + *namesize = call->u.get_next_variable_name.size; + memcpy(vendor, &call->u.get_next_variable_name.vendor_guid, + sizeof(*vendor)); + + return (efi_status_to_errno(call->status)); +} + +static int +var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, + size_t datasize, void *data) +{ + struct xen_platform_op op = { + .cmd = XENPF_efi_runtime_call, + .u.efi_runtime_call.function = XEN_EFI_set_variable, + .u.efi_runtime_call.misc = attrib, + .u.efi_runtime_call.u.set_variable.size = datasize, + }; + struct xenpf_efi_runtime_call *call = &op.u.efi_runtime_call; + int error; + + memcpy(&call->u.set_variable.vendor_guid, vendor, + sizeof(*vendor)); + set_xen_guest_handle(call->u.set_variable.name, name); + set_xen_guest_handle(call->u.set_variable.data, data); + + error = HYPERVISOR_platform_op(&op); + + return ((error != 0) ? xen_translate_error(error) : + efi_status_to_errno(call->status)); +} + +const static struct efi_ops pvefi_ops = { + .rt_ok = rt_ok, + .get_time = get_time, + .get_time_capabilities = get_time_capabilities, + .set_time = set_time, + .var_get = var_get, + .var_nextname = var_nextname, + .var_set = var_set, +}; + +static int +modevents(module_t m, int event, void *arg __unused) +{ + const static struct efi_ops *prev; + int rt_disabled; + + switch (event) { + case MOD_LOAD: + rt_disabled = 0; + TUNABLE_INT_FETCH("efi.rt.disabled", &rt_disabled); + + if (!xen_initial_domain() || strcmp("UEFI", bootmethod) != 0 || + rt_disabled == 1) + return (0); + + prev = active_efi_ops; + active_efi_ops = &pvefi_ops; + return (0); + + case MOD_UNLOAD: + if (prev != NULL) + active_efi_ops = prev; + return (0); + + case MOD_SHUTDOWN: + return (0); + + default: + return (EOPNOTSUPP); + } +} + +static moduledata_t moddata = { + .name = "pvefirt", + .evhand = modevents, + .priv = NULL, +}; +/* After fpuinitstate, before efidev */ +DECLARE_MODULE(pvefirt, moddata, SI_SUB_DRIVERS, SI_ORDER_SECOND); +MODULE_VERSION(pvefirt, 1); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8A4C353A287; Tue, 16 Feb 2021 14: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 4Dg3Ft3WGGz3wSG; Tue, 16 Feb 2021 14: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 6BCC012A9E; Tue, 16 Feb 2021 14: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 11GEREZ7080009; Tue, 16 Feb 2021 14: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 11GEREBk080008; Tue, 16 Feb 2021 14:27:14 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:14 GMT Message-Id: <202102161427.11GEREBk080008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: adda2797eb2a - main - stand/multiboot2: add support for booting a Xen dom0 in UEFI mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: adda2797eb2a29487fe26640a9c990fea7e6585d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:14 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=adda2797eb2a29487fe26640a9c990fea7e6585d commit adda2797eb2a29487fe26640a9c990fea7e6585d Author: Roger Pau Monné AuthorDate: 2021-01-27 11:23:32 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:11 +0000 stand/multiboot2: add support for booting a Xen dom0 in UEFI mode Add some basic multiboot2 infrastructure to the EFI loader in order to be capable of booting a FreeBSD/Xen dom0 when booted from UEFI. Only a very limited subset of the multiboot2 protocol is implemented in order to support enough to boot into Xen, the implementation doesn't intend to be a full multiboot2 capable implementation. Such multiboot2 functionality is hooked up into the amd64 EFI loader, which is the only architecture that supports Xen dom0 on FreeBSD. The options to boot a FreeBSD/Xen dom0 system are exactly the same as on BIOS, and requires setting the xen_kernel and xen_cmdline options in loader.conf. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28497 --- stand/efi/loader/arch/amd64/Makefile.inc | 1 + stand/efi/loader/arch/amd64/amd64_tramp.S | 12 + stand/efi/loader/arch/amd64/elf64_freebsd.c | 5 + stand/efi/loader/arch/amd64/multiboot2.c | 567 ++++++++++++++++++++++++++++ stand/efi/loader/arch/amd64/multiboot2.h | 416 ++++++++++++++++++++ sys/sys/linker.h | 1 + 6 files changed, 1002 insertions(+) diff --git a/stand/efi/loader/arch/amd64/Makefile.inc b/stand/efi/loader/arch/amd64/Makefile.inc index f64adf08ec13..0d9e2648cb59 100644 --- a/stand/efi/loader/arch/amd64/Makefile.inc +++ b/stand/efi/loader/arch/amd64/Makefile.inc @@ -4,6 +4,7 @@ SRCS+= amd64_tramp.S \ start.S \ elf64_freebsd.c \ trap.c \ + multiboot2.c \ exc.S .PATH: ${BOOTSRC}/i386/libi386 diff --git a/stand/efi/loader/arch/amd64/amd64_tramp.S b/stand/efi/loader/arch/amd64/amd64_tramp.S index c102d9243589..877705407f92 100644 --- a/stand/efi/loader/arch/amd64/amd64_tramp.S +++ b/stand/efi/loader/arch/amd64/amd64_tramp.S @@ -30,6 +30,9 @@ #include +#define ASM_FILE +#include "multiboot2.h" + .text .globl amd64_tramp @@ -58,6 +61,15 @@ amd64_tramp: ALIGN_TEXT amd64_tramp_end: +/* void multiboot2_exec(uint64_t entry, uint64_t multiboot_info, uint64_t stack) */ + .globl multiboot2_exec +multiboot2_exec: + movq %rdx,%rsp + pushq %rdi + movq %rsi,%rbx + movq $MULTIBOOT2_BOOTLOADER_MAGIC,%rax + ret + .data .globl amd64_tramp_size amd64_tramp_size: diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c index cbaeb35cc952..a950ca55e843 100644 --- a/stand/efi/loader/arch/amd64/elf64_freebsd.c +++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c @@ -69,7 +69,12 @@ static struct file_format amd64_elf_obj = { .l_exec = elf64_obj_exec, }; +extern struct file_format multiboot2; +extern struct file_format multiboot2_obj; + struct file_format *file_formats[] = { + &multiboot2, + &multiboot2_obj, &amd64_elf, &amd64_elf_obj, NULL diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c new file mode 100644 index 000000000000..e4589bc8b0bb --- /dev/null +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -0,0 +1,567 @@ +/*- + * Copyright (c) 2021 Roger Pau Monné + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * This multiboot2 implementation only implements a subset of the full + * multiboot2 specification in order to be able to boot Xen and a + * FreeBSD Dom0. Trying to use it to boot other multiboot2 compliant + * kernels will most surely fail. + * + * The full multiboot specification can be found here: + * https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html + */ + +#include + +#include +#include +#include +#include +#include +#define _MACHINE_ELF_WANT_32BIT +#include +#include +#include +#include + +#include +#include + +#include "bootstrap.h" +#include "multiboot2.h" +#include "loader_efi.h" + +extern int elf32_loadfile_raw(char *filename, uint64_t dest, + struct preloaded_file **result, int multiboot); +extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest); +extern int elf64_obj_loadfile(char *filename, uint64_t dest, + struct preloaded_file **result); +extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); + +extern void multiboot2_exec(void *entry, uint64_t multiboot_info, + uint64_t stack); + +/* + * Multiboot2 header information to pass between the loading and the exec + * functions. + */ +struct mb2hdr { + uint32_t efi64_entry; +}; + +static int +loadfile(char *filename, uint64_t dest, struct preloaded_file **result) +{ + unsigned int i; + int error, fd; + void *header_search = NULL; + void *multiboot = NULL; + ssize_t search_size; + struct multiboot_header *header; + char *cmdline; + struct mb2hdr hdr; + bool keep_bs = false; + + /* + * Read MULTIBOOT_SEARCH size in order to search for the + * multiboot magic header. + */ + if (filename == NULL) + return (EFTYPE); + if ((fd = open(filename, O_RDONLY)) == -1) + return (errno); + header_search = malloc(MULTIBOOT_SEARCH); + if (header_search == NULL) { + error = ENOMEM; + goto out; + } + search_size = read(fd, header_search, MULTIBOOT_SEARCH); + + for (i = 0; i < search_size; i += MULTIBOOT_HEADER_ALIGN) { + header = header_search + i; + if (header->magic == MULTIBOOT2_HEADER_MAGIC) + break; + } + + if (i >= MULTIBOOT_SEARCH) { + error = EFTYPE; + goto out; + } + + /* Valid multiboot header has been found, validate checksum */ + if (header->magic + header->architecture + header->header_length + + header->checksum != 0) { + printf("Multiboot checksum failed, magic: %#x architecture: %#x" + "header_length %#x checksum: %#x\n", + header->magic, header->architecture, header->header_length, + header->checksum); + error = EFTYPE; + goto out; + } + + if (header->architecture != MULTIBOOT2_ARCHITECTURE_I386) { + printf("Unsupported architecture: %#x\n", + header->architecture); + error = EFTYPE; + goto out; + } + + multiboot = malloc(header->header_length - sizeof(*header)); + error = lseek(fd, i + sizeof(*header), SEEK_SET); + if (error != i + sizeof(*header)) { + printf("Unable to set file pointer to header location: %d\n", + error); + goto out; + } + search_size = read(fd, multiboot, + header->header_length - sizeof(*header)); + + bzero(&hdr, sizeof(hdr)); + for (i = 0; i < search_size; ) { + struct multiboot_header_tag *tag; + struct multiboot_header_tag_entry_address *entry; + struct multiboot_header_tag_information_request *req; + unsigned int j; + + tag = multiboot + i; + + switch(tag->type) { + case MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST: + req = (void *)tag; + for (j = 0; + j < (tag->size - sizeof(*tag)) / sizeof(uint32_t); + j++) { + switch (req->requests[j]) { + case MULTIBOOT_TAG_TYPE_MMAP: + case MULTIBOOT_TAG_TYPE_BASIC_MEMINFO: + /* Only applicable to BIOS. */ + break; + + case MULTIBOOT_TAG_TYPE_EFI_BS: + case MULTIBOOT_TAG_TYPE_EFI64: + case MULTIBOOT_TAG_TYPE_EFI64_IH: + /* Tags unconditionally added. */ + break; + + default: + if (req->flags & + MULTIBOOT_HEADER_TAG_OPTIONAL) + break; + + printf( + "Unknown non-optional information request %u\n", + req->requests[j]); + error = EINVAL; + goto out; + } + } + break; + + case MULTIBOOT_HEADER_TAG_EFI_BS: + /* Never shut down BS. */ + keep_bs = true; + break; + + case MULTIBOOT_HEADER_TAG_MODULE_ALIGN: + /* We will align modules by default already. */ + case MULTIBOOT_HEADER_TAG_END: + break; + + case MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64: + entry = (void *)tag; + hdr.efi64_entry = entry->entry_addr; + break; + + default: + if (tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL) + break; + printf("Unknown header tag %#x not optional\n", + tag->type); + error = EINVAL; + goto out; + } + + i += roundup2(tag->size, MULTIBOOT_TAG_ALIGN); + if (tag->type == MULTIBOOT_HEADER_TAG_END) + break; + } + + if (hdr.efi64_entry == 0) { + printf("No EFI64 entry address provided\n"); + error = EINVAL; + goto out; + } + if (!keep_bs) { + printf("Unable to boot MB2 with BS exited\n"); + error = EINVAL; + goto out; + } + + error = elf32_loadfile_raw(filename, dest, result, 1); + if (error != 0) { + printf( + "elf32_loadfile_raw failed: %d unable to load multiboot kernel\n", + error); + goto out; + } + + file_addmetadata(*result, MODINFOMD_NOCOPY | MODINFOMD_MB2HDR, + sizeof(hdr), &hdr); + + /* + * f_addr is already aligned to PAGE_SIZE, make sure + * f_size it's also aligned so when the modules are loaded + * they are aligned to PAGE_SIZE. + */ + (*result)->f_size = roundup((*result)->f_size, PAGE_SIZE); + +out: + if (header_search != NULL) + free(header_search); + if (multiboot != NULL) + free(multiboot); + close(fd); + return (error); +} + +static unsigned int add_string(void *buf, unsigned int type, const char *str) +{ + struct multiboot_tag *tag; + + tag = buf; + tag->type = type; + tag->size = sizeof(*tag) + strlen(str) + 1; + strcpy(buf + sizeof(*tag), str); + return (roundup2(tag->size, MULTIBOOT_TAG_ALIGN)); +} + +static unsigned int add_efi(void *buf) +{ + struct multiboot_tag *bs; + struct multiboot_tag_efi64 *efi64; + struct multiboot_tag_efi64_ih *ih; + unsigned int len; + + len = 0; + bs = buf; + bs->type = MULTIBOOT_TAG_TYPE_EFI_BS; + bs->size = sizeof(*bs); + len += roundup2(bs->size, MULTIBOOT_TAG_ALIGN); + + efi64 = buf + len; + efi64->type = MULTIBOOT_TAG_TYPE_EFI64; + efi64->size = sizeof(*efi64); + efi64->pointer = (uintptr_t)ST; + len += roundup2(efi64->size, MULTIBOOT_TAG_ALIGN); + + ih = buf + len; + ih->type = MULTIBOOT_TAG_TYPE_EFI64_IH; + ih->size = sizeof(*ih); + ih->pointer = (uintptr_t)IH; + + return (len + roundup2(ih->size, MULTIBOOT_TAG_ALIGN)); +} + +static unsigned int add_module(void *buf, vm_offset_t start, vm_offset_t end, + const char *cmdline) +{ + struct multiboot_tag_module *mod; + + mod = buf; + mod->type = MULTIBOOT_TAG_TYPE_MODULE; + mod->size = sizeof(*mod); + mod->mod_start = start; + mod->mod_end = end; + if (cmdline != NULL) + { + strcpy(buf + sizeof(*mod), cmdline); + mod->size += strlen(cmdline) + 1; + } + + return (roundup2(mod->size, MULTIBOOT_TAG_ALIGN)); +} + +static unsigned int add_end(void *buf) +{ + struct multiboot_tag *tag; + + tag = buf; + tag->type = MULTIBOOT_TAG_TYPE_END; + tag->size = sizeof(*tag); + + return (roundup2(tag->size, MULTIBOOT_TAG_ALIGN)); +} + +static int +exec(struct preloaded_file *fp) +{ + EFI_PHYSICAL_ADDRESS addr = 0; + EFI_PHYSICAL_ADDRESS stack = 0; + EFI_STATUS status; + void *multiboot_space; + vm_offset_t modulep, kernend, kern_base, + payload_base; + char *cmdline = NULL; + size_t len; + int error; + uint32_t *total_size; + struct file_metadata *md; + struct xen_header header; + struct mb2hdr *hdr; + + + CTASSERT(sizeof(header) <= PAGE_SIZE); + + if ((md = file_findmetadata(fp, + MODINFOMD_NOCOPY | MODINFOMD_MB2HDR)) == NULL) { + printf("Missing Multiboot2 EFI64 entry point\n"); + return(EFTYPE); + } + hdr = (void *)&md->md_data; + + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(PAGE_SIZE), &addr); + if (EFI_ERROR(status)) { + printf("Failed to allocate pages for multiboot2 header: %lu\n", + EFI_ERROR_CODE(status)); + error = ENOMEM; + goto error; + } + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(128 * 1024), &stack); + if (EFI_ERROR(status)) { + printf("Failed to allocate pages for Xen stack: %lu\n", + EFI_ERROR_CODE(status)); + error = ENOMEM; + goto error; + } + + /* + * Scratch space to build the multiboot2 header. Reserve the start of + * the space to place the header with the size, which we don't know + * yet. + */ + multiboot_space = (void *)(uintptr_t)(addr + sizeof(uint32_t) * 2); + + /* + * Don't pass the memory size found by the bootloader, the memory + * available to Dom0 will be lower than that. + */ + unsetenv("smbios.memory.enabled"); + + /* Set the Xen command line. */ + if (fp->f_args == NULL) { + /* Add the Xen command line if it is set. */ + cmdline = getenv("xen_cmdline"); + if (cmdline != NULL) { + fp->f_args = strdup(cmdline); + if (fp->f_args == NULL) { + error = ENOMEM; + goto error; + } + } + } + if (fp->f_args != NULL) { + len = strlen(fp->f_name) + 1 + strlen(fp->f_args) + 1; + cmdline = malloc(len); + if (cmdline == NULL) { + error = ENOMEM; + goto error; + } + snprintf(cmdline, len, "%s %s", fp->f_name, fp->f_args); + multiboot_space += add_string(multiboot_space, + MULTIBOOT_TAG_TYPE_CMDLINE, cmdline); + free(cmdline); + } + + multiboot_space += add_string(multiboot_space, + MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME, "FreeBSD Loader"); + multiboot_space += add_efi(multiboot_space); + + /* + * Prepare the multiboot module list, Xen assumes the first + * module is the Dom0 kernel, and the second one is the initramfs. + * This is not optimal for FreeBSD, that doesn't have a initramfs + * but instead loads modules dynamically and creates the metadata + * info on-the-fly. + * + * As expected, the first multiboot module is going to be the + * FreeBSD kernel loaded as a raw file. The second module is going + * to contain the metadata info and the loaded modules. + * + * There's a small header prefixed in the second module that contains + * some information required to calculate the relocated address of + * modulep based on the original offset of modulep from the start of + * the module address. Note other fields might be added to this header + * if required. + * + * Native layout: + * fp->f_addr + fp->f_size + * +---------+----------------+------------+ + * | | | | + * | Kernel | Modules | Metadata | + * | | | | + * +---------+----------------+------------+ + * fp->f_addr modulep kernend + * + * Xen dom0 layout: + * fp->f_addr fp->f_addr + fp->f_size + * +---------+------------+----------------+------------+ + * | | | | | + * | Kernel | xen_header | Modules | Metadata | + * | | | | | + * +---------+------------+----------------+------------+ + * modulep kernend + * \________/\__________________________________________/ + * module 0 module 1 + */ + + fp = file_findfile(NULL, "elf kernel"); + if (fp == NULL) { + printf("No FreeBSD kernel provided, aborting\n"); + error = EINVAL; + goto error; + } + + error = bi_load(fp->f_args, &modulep, &kernend, false); + if (error != 0) + goto error; + + /* + * Note that the Xen kernel requires to be started with BootServices + * enabled, and hence we cannot use efi_copy_finish to relocate the + * loaded data from the staging area to the expected loaded addresses. + * This is fine because the Xen kernel is relocatable, so it can boot + * fine straight from the staging area. We use efi_translate to get the + * staging addresses where the kernels and metadata are currently + * loaded. + */ + kern_base = (uintptr_t)efi_translate(fp->f_addr); + payload_base = kern_base + fp->f_size - PAGE_SIZE; + multiboot_space += add_module(multiboot_space, kern_base, payload_base, + NULL); + multiboot_space += add_module(multiboot_space, payload_base, + (uintptr_t)efi_translate(kernend), "header"); + + header.flags = XENHEADER_HAS_MODULEP_OFFSET; + header.modulep_offset = modulep - (fp->f_addr + fp->f_size - PAGE_SIZE); + archsw.arch_copyin(&header, fp->f_addr + fp->f_size - PAGE_SIZE, + sizeof(header)); + + multiboot_space += add_end(multiboot_space); + total_size = (uint32_t *)(uintptr_t)(addr); + *total_size = (uintptr_t)multiboot_space - addr; + + if (*total_size > PAGE_SIZE) + panic("Multiboot header exceeds fixed size"); + + efi_time_fini(); + dev_cleanup(); + multiboot2_exec(efi_translate(hdr->efi64_entry), addr, + stack + 128 * 1024); + + panic("exec returned"); + +error: + if (addr) + BS->FreePages(addr, EFI_SIZE_TO_PAGES(PAGE_SIZE)); + if (stack) + BS->FreePages(stack, EFI_SIZE_TO_PAGES(128 * 1024)); + return (error); +} + +static int +obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result) +{ + struct preloaded_file *mfp, *kfp, *rfp; + struct kernel_module *kmp; + int error; + + /* See if there's a multiboot kernel loaded */ + mfp = file_findfile(NULL, "elf multiboot kernel"); + if (mfp == NULL) + return (EFTYPE); + + /* + * We have a multiboot kernel loaded, see if there's a FreeBSD + * kernel loaded also. + */ + kfp = file_findfile(NULL, "elf kernel"); + if (kfp == NULL) { + /* + * No kernel loaded, this must be it. The kernel has to + * be loaded as a raw file, it will be processed by + * Xen and correctly loaded as an ELF file. + */ + rfp = file_loadraw(filename, "elf kernel", 0); + if (rfp == NULL) { + printf( + "Unable to load %s as a multiboot payload kernel\n", + filename); + return (EINVAL); + } + + /* Load kernel metadata... */ + setenv("kernelname", filename, 1); + error = elf64_load_modmetadata(rfp, rfp->f_addr + rfp->f_size); + if (error) { + printf("Unable to load kernel %s metadata error: %d\n", + rfp->f_name, error); + return (EINVAL); + } + + + /* + * Reserve one page at the end of the kernel to place some + * metadata in order to cope for Xen relocating the modules and + * the metadata information. + */ + rfp->f_size = roundup(rfp->f_size, PAGE_SIZE); + rfp->f_size += PAGE_SIZE; + *result = rfp; + } else { + /* The rest should be loaded as regular modules */ + error = elf64_obj_loadfile(filename, dest, result); + if (error != 0) { + printf("Unable to load %s as an object file, error: %d", + filename, error); + return (error); + } + } + + return (0); +} + +static int +obj_exec(struct preloaded_file *fp) +{ + + return (EFTYPE); +} + +struct file_format multiboot2 = { loadfile, exec }; +struct file_format multiboot2_obj = { obj_loadfile, obj_exec }; diff --git a/stand/efi/loader/arch/amd64/multiboot2.h b/stand/efi/loader/arch/amd64/multiboot2.h new file mode 100644 index 000000000000..5693923c014f --- /dev/null +++ b/stand/efi/loader/arch/amd64/multiboot2.h @@ -0,0 +1,416 @@ +/* multiboot2.h - Multiboot 2 header file. */ +/* Copyright (C) 1999,2003,2007,2008,2009,2010 Free Software Foundation, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ANY + * DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR + * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef MULTIBOOT_HEADER +#define MULTIBOOT_HEADER 1 + +/* How many bytes from the start of the file we search for the header. */ +#define MULTIBOOT_SEARCH 32768 +#define MULTIBOOT_HEADER_ALIGN 8 + +/* The magic field should contain this. */ +#define MULTIBOOT2_HEADER_MAGIC 0xe85250d6 + +/* This should be in %eax. */ +#define MULTIBOOT2_BOOTLOADER_MAGIC 0x36d76289 + +/* Alignment of multiboot modules. */ +#define MULTIBOOT_MOD_ALIGN 0x00001000 + +/* Alignment of the multiboot info structure. */ +#define MULTIBOOT_INFO_ALIGN 0x00000008 + +/* Flags set in the 'flags' member of the multiboot header. */ + +#define MULTIBOOT_TAG_ALIGN 8 +#define MULTIBOOT_TAG_TYPE_END 0 +#define MULTIBOOT_TAG_TYPE_CMDLINE 1 +#define MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME 2 +#define MULTIBOOT_TAG_TYPE_MODULE 3 +#define MULTIBOOT_TAG_TYPE_BASIC_MEMINFO 4 +#define MULTIBOOT_TAG_TYPE_BOOTDEV 5 +#define MULTIBOOT_TAG_TYPE_MMAP 6 +#define MULTIBOOT_TAG_TYPE_VBE 7 +#define MULTIBOOT_TAG_TYPE_FRAMEBUFFER 8 +#define MULTIBOOT_TAG_TYPE_ELF_SECTIONS 9 +#define MULTIBOOT_TAG_TYPE_APM 10 +#define MULTIBOOT_TAG_TYPE_EFI32 11 +#define MULTIBOOT_TAG_TYPE_EFI64 12 +#define MULTIBOOT_TAG_TYPE_SMBIOS 13 +#define MULTIBOOT_TAG_TYPE_ACPI_OLD 14 +#define MULTIBOOT_TAG_TYPE_ACPI_NEW 15 +#define MULTIBOOT_TAG_TYPE_NETWORK 16 +#define MULTIBOOT_TAG_TYPE_EFI_MMAP 17 +#define MULTIBOOT_TAG_TYPE_EFI_BS 18 +#define MULTIBOOT_TAG_TYPE_EFI32_IH 19 +#define MULTIBOOT_TAG_TYPE_EFI64_IH 20 +#define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR 21 + +#define MULTIBOOT_HEADER_TAG_END 0 +#define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST 1 +#define MULTIBOOT_HEADER_TAG_ADDRESS 2 +#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS 3 +#define MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS 4 +#define MULTIBOOT_HEADER_TAG_FRAMEBUFFER 5 +#define MULTIBOOT_HEADER_TAG_MODULE_ALIGN 6 +#define MULTIBOOT_HEADER_TAG_EFI_BS 7 +#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9 +#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10 + +#define MULTIBOOT2_ARCHITECTURE_I386 0 +#define MULTIBOOT2_ARCHITECTURE_MIPS32 4 +#define MULTIBOOT_HEADER_TAG_OPTIONAL 1 + +#define MULTIBOOT_LOAD_PREFERENCE_NONE 0 +#define MULTIBOOT_LOAD_PREFERENCE_LOW 1 +#define MULTIBOOT_LOAD_PREFERENCE_HIGH 2 + +#define MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED 1 +#define MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED 2 + +#ifndef ASM_FILE + +typedef unsigned char multiboot_uint8_t; +typedef unsigned short multiboot_uint16_t; +typedef unsigned int multiboot_uint32_t; +typedef unsigned long long multiboot_uint64_t; + +struct multiboot_header +{ + /* Must be MULTIBOOT_MAGIC - see above. */ + multiboot_uint32_t magic; + + /* ISA */ + multiboot_uint32_t architecture; + + /* Total header length. */ + multiboot_uint32_t header_length; + + /* The above fields plus this one must equal 0 mod 2^32. */ + multiboot_uint32_t checksum; +}; + +struct multiboot_header_tag +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; +}; + +struct multiboot_header_tag_information_request +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t requests[0]; +}; + +struct multiboot_header_tag_address +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t header_addr; + multiboot_uint32_t load_addr; + multiboot_uint32_t load_end_addr; + multiboot_uint32_t bss_end_addr; +}; + +struct multiboot_header_tag_entry_address +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t entry_addr; +}; + +struct multiboot_header_tag_console_flags +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t console_flags; +}; + +struct multiboot_header_tag_framebuffer +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t width; + multiboot_uint32_t height; + multiboot_uint32_t depth; +}; + +struct multiboot_header_tag_module_align +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; +}; + +struct multiboot_header_tag_relocatable +{ + multiboot_uint16_t type; + multiboot_uint16_t flags; + multiboot_uint32_t size; + multiboot_uint32_t min_addr; + multiboot_uint32_t max_addr; + multiboot_uint32_t align; + multiboot_uint32_t preference; +}; + +struct multiboot_color +{ + multiboot_uint8_t red; + multiboot_uint8_t green; + multiboot_uint8_t blue; +}; + +struct multiboot_mmap_entry +{ + multiboot_uint64_t addr; + multiboot_uint64_t len; +#define MULTIBOOT_MEMORY_AVAILABLE 1 +#define MULTIBOOT_MEMORY_RESERVED 2 +#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3 +#define MULTIBOOT_MEMORY_NVS 4 +#define MULTIBOOT_MEMORY_BADRAM 5 + multiboot_uint32_t type; + multiboot_uint32_t zero; +}; +typedef struct multiboot_mmap_entry multiboot_memory_map_t; + +struct multiboot_tag +{ + multiboot_uint32_t type; + multiboot_uint32_t size; +}; + +struct multiboot_tag_string +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + char string[0]; +}; + +struct multiboot_tag_module +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + multiboot_uint32_t mod_start; + multiboot_uint32_t mod_end; + char cmdline[0]; +}; + +struct multiboot_tag_basic_meminfo +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + multiboot_uint32_t mem_lower; + multiboot_uint32_t mem_upper; +}; + +struct multiboot_tag_bootdev +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + multiboot_uint32_t biosdev; + multiboot_uint32_t slice; + multiboot_uint32_t part; +}; + +struct multiboot_tag_mmap +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + multiboot_uint32_t entry_size; + multiboot_uint32_t entry_version; + struct multiboot_mmap_entry entries[0]; +}; + +struct multiboot_vbe_info_block +{ + multiboot_uint8_t external_specification[512]; +}; + +struct multiboot_vbe_mode_info_block +{ + multiboot_uint8_t external_specification[256]; +}; + +struct multiboot_tag_vbe +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + + multiboot_uint16_t vbe_mode; + multiboot_uint16_t vbe_interface_seg; + multiboot_uint16_t vbe_interface_off; + multiboot_uint16_t vbe_interface_len; + + struct multiboot_vbe_info_block vbe_control_info; + struct multiboot_vbe_mode_info_block vbe_mode_info; +}; + +struct multiboot_tag_framebuffer_common +{ + multiboot_uint32_t type; + multiboot_uint32_t size; + + multiboot_uint64_t framebuffer_addr; + multiboot_uint32_t framebuffer_pitch; + multiboot_uint32_t framebuffer_width; + multiboot_uint32_t framebuffer_height; + multiboot_uint8_t framebuffer_bpp; +#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0 +#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 1 +#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2 + multiboot_uint8_t framebuffer_type; + multiboot_uint16_t reserved; +}; + +struct multiboot_tag_framebuffer +{ + struct multiboot_tag_framebuffer_common common; + + union + { + struct + { + multiboot_uint16_t framebuffer_palette_num_colors; + struct multiboot_color framebuffer_palette[0]; + }; + struct + { + multiboot_uint8_t framebuffer_red_field_position; + multiboot_uint8_t framebuffer_red_mask_size; + multiboot_uint8_t framebuffer_green_field_position; + multiboot_uint8_t framebuffer_green_mask_size; + multiboot_uint8_t framebuffer_blue_field_position; + multiboot_uint8_t framebuffer_blue_mask_size; + }; + }; *** 117 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:27:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1542453A19F; Tue, 16 Feb 2021 14:27: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 4Dg3Fx6lpqz3wQF; Tue, 16 Feb 2021 14:27: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 B68E412A9F; Tue, 16 Feb 2021 14:27:16 +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 11GERGSm080051; Tue, 16 Feb 2021 14:27:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GERGIX080050; Tue, 16 Feb 2021 14:27:16 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:27:16 GMT Message-Id: <202102161427.11GERGIX080050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 27d3902679cd - main - efirt: add hooks for diverging EFI implementations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27d3902679cd6df6404cd402ffc85a9763c449b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:27:19 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=27d3902679cd6df6404cd402ffc85a9763c449b1 commit 27d3902679cd6df6404cd402ffc85a9763c449b1 Author: Roger Pau Monné AuthorDate: 2021-02-12 11:11:58 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 14:26:11 +0000 efirt: add hooks for diverging EFI implementations Introduce a set of hooks for MI EFI public functions, so that a new implementation can be done. This will be used to implement the Xen PV EFI interface that's used when running FreeBSD as a Xen dom0 from UEFI firmware. Also make the efi_status_to_errno non-static since it will be used to evaluate status return values from the PV interface. No functional change indented. Sponsored by: Citrix Systems R&D Reviewed by: kib, imp Differential revision: https://reviews.freebsd.org/D28620 --- sys/dev/efidev/efirt.c | 51 +++++++++++++++--------- sys/sys/efi.h | 106 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 127 insertions(+), 30 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index fbb8f605c202..f28b9981919c 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -99,7 +99,7 @@ static int efi_status2err[25] = { static int efi_enter(void); static void efi_leave(void); -static int +int efi_status_to_errno(efi_status status) { u_long code; @@ -262,8 +262,8 @@ efi_uninit(void) mtx_destroy(&efi_lock); } -int -efi_rt_ok(void) +static int +rt_ok(void) { if (efi_runtime == NULL) @@ -309,8 +309,8 @@ efi_leave(void) PMAP_UNLOCK(curpmap); } -int -efi_get_table(struct uuid *uuid, void **ptr) +static int +get_table(struct uuid *uuid, void **ptr) { struct efi_cfgtbl *ct; u_long count; @@ -419,8 +419,8 @@ efi_get_time_locked(struct efi_tm *tm, struct efi_tmcap *tmcap) return (efi_call(&ec)); } -int -efi_get_time(struct efi_tm *tm) +static int +get_time(struct efi_tm *tm) { struct efi_tmcap dummy; int error; @@ -439,8 +439,8 @@ efi_get_time(struct efi_tm *tm) return (error); } -int -efi_get_time_capabilities(struct efi_tmcap *tmcap) +static int +get_time_capabilities(struct efi_tmcap *tmcap) { struct efi_tm dummy; int error; @@ -453,8 +453,8 @@ efi_get_time_capabilities(struct efi_tmcap *tmcap) return (error); } -int -efi_reset_system(enum efi_reset type) +static int +reset_system(enum efi_reset type) { struct efirt_callinfo ec; @@ -495,8 +495,8 @@ efi_set_time_locked(struct efi_tm *tm) return (efi_call(&ec)); } -int -efi_set_time(struct efi_tm *tm) +static int +set_time(struct efi_tm *tm) { int error; @@ -508,8 +508,8 @@ efi_set_time(struct efi_tm *tm) return (error); } -int -efi_var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, +static int +var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, size_t *datasize, void *data) { struct efirt_callinfo ec; @@ -528,8 +528,8 @@ efi_var_get(efi_char *name, struct uuid *vendor, uint32_t *attrib, return (efi_call(&ec)); } -int -efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) +static int +var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) { struct efirt_callinfo ec; @@ -545,8 +545,8 @@ efi_var_nextname(size_t *namesize, efi_char *name, struct uuid *vendor) return (efi_call(&ec)); } -int -efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, +static int +var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, size_t datasize, void *data) { struct efirt_callinfo ec; @@ -565,6 +565,19 @@ efi_var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, return (efi_call(&ec)); } +const static struct efi_ops efi_ops = { + .rt_ok = rt_ok, + .get_table = get_table, + .get_time = get_time, + .get_time_capabilities = get_time_capabilities, + .reset_system = reset_system, + .set_time = set_time, + .var_get = var_get, + .var_nextname = var_nextname, + .var_set = var_set, +}; +const struct efi_ops *active_efi_ops = &efi_ops; + static int efirt_modevents(module_t m, int event, void *arg __unused) { diff --git a/sys/sys/efi.h b/sys/sys/efi.h index 220509853cb2..f7a1fe790d23 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -180,18 +180,102 @@ int efi_rt_arch_call(struct efirt_callinfo *); bool efi_create_1t1_map(struct efi_md *, int, int); void efi_destroy_1t1_map(void); +struct efi_ops { + /* + * The EFI calls might be virtualized in some environments, requiring + * FreeBSD to use a different interface (ie: hypercalls) in order to + * access them. + */ + int (*rt_ok)(void); + int (*get_table)(struct uuid *, void **); + int (*get_time)(struct efi_tm *); + int (*get_time_capabilities)(struct efi_tmcap *); + int (*reset_system)(enum efi_reset); + int (*set_time)(struct efi_tm *); + int (*var_get)(uint16_t *, struct uuid *, uint32_t *, size_t *, + void *); + int (*var_nextname)(size_t *, uint16_t *, struct uuid *); + int (*var_set)(uint16_t *, struct uuid *, uint32_t, size_t, void *); +}; +extern const struct efi_ops *active_efi_ops; + /* Public MI EFI functions */ -int efi_rt_ok(void); -int efi_get_table(struct uuid *uuid, void **ptr); -int efi_get_time(struct efi_tm *tm); -int efi_get_time_capabilities(struct efi_tmcap *tmcap); -int efi_reset_system(enum efi_reset type); -int efi_set_time(struct efi_tm *tm); -int efi_var_get(uint16_t *name, struct uuid *vendor, uint32_t *attrib, - size_t *datasize, void *data); -int efi_var_nextname(size_t *namesize, uint16_t *name, struct uuid *vendor); -int efi_var_set(uint16_t *name, struct uuid *vendor, uint32_t attrib, - size_t datasize, void *data); +static inline int efi_rt_ok(void) +{ + + if(active_efi_ops->rt_ok == NULL) + return (ENXIO); + return (active_efi_ops->rt_ok()); +} + +static inline int efi_get_table(struct uuid *uuid, void **ptr) +{ + + if (active_efi_ops->get_table == NULL) + return (ENXIO); + return (active_efi_ops->get_table(uuid, ptr)); +} + +static inline int efi_get_time(struct efi_tm *tm) +{ + + if (active_efi_ops->get_time == NULL) + return (ENXIO); + return (active_efi_ops->get_time(tm)); +} + +static inline int efi_get_time_capabilities(struct efi_tmcap *tmcap) +{ + + if (active_efi_ops->get_time_capabilities == NULL) + return (ENXIO); + return (active_efi_ops->get_time_capabilities(tmcap)); +} + +static inline int efi_reset_system(enum efi_reset type) +{ + + if (active_efi_ops->reset_system == NULL) + return (ENXIO); + return (active_efi_ops->reset_system(type)); +} + +static inline int efi_set_time(struct efi_tm *tm) +{ + + if (active_efi_ops->set_time == NULL) + return (ENXIO); + return (active_efi_ops->set_time(tm)); +} + +static inline int efi_var_get(uint16_t *name, struct uuid *vendor, + uint32_t *attrib, size_t *datasize, void *data) +{ + + if (active_efi_ops->var_get == NULL) + return (ENXIO); + return (active_efi_ops->var_get(name, vendor, attrib, datasize, data)); +} + +static inline int efi_var_nextname(size_t *namesize, uint16_t *name, + struct uuid *vendor) +{ + + if (active_efi_ops->var_nextname == NULL) + return (ENXIO); + return (active_efi_ops->var_nextname(namesize, name, vendor)); +} + +static inline int efi_var_set(uint16_t *name, struct uuid *vendor, + uint32_t attrib, size_t datasize, void *data) +{ + + if (active_efi_ops->var_set == NULL) + return (ENXIO); + return (active_efi_ops->var_set(name, vendor, attrib, datasize, data)); +} + +int efi_status_to_errno(efi_status status); #endif /* _KERNEL */ From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:28:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3A2C153A500 for ; Tue, 16 Feb 2021 14:28: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 4Dg3HT0GCNz4S4G; Tue, 16 Feb 2021 14:28: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 7724512AA2; Tue, 16 Feb 2021 14:28: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 11GESXSW080401; Tue, 16 Feb 2021 14:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GESXQK080400; Tue, 16 Feb 2021 14:28:33 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:28:33 GMT Message-Id: <202102161428.11GESXQK080400@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Alex Richardson Subject: git: b6973c8f4a96 - vendor/google/capsicum-test - Update capsicum-test to 7707222b46abe52d18fd4fbb76115ffdb3e6f74b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/vendor/google/capsicum-test X-Git-Reftype: branch X-Git-Commit: b6973c8f4a960d42c7c9130d2388db072a0d8a9a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:28:42 -0000 The branch vendor/google/capsicum-test has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=b6973c8f4a960d42c7c9130d2388db072a0d8a9a commit b6973c8f4a960d42c7c9130d2388db072a0d8a9a Author: Alex Richardson AuthorDate: 2021-02-16 13:12:51 +0000 Commit: Alex Richardson CommitDate: 2021-02-16 14:04:29 +0000 Update capsicum-test to 7707222b46abe52d18fd4fbb76115ffdb3e6f74b Using the following steps: ``` git worktree add ../freebsd-vendor-capsicum-test freebsd/vendor/google/capsicum-test cd ../freebsd-vendor-capsicum-test git remote add upstream-capsicum-test https://github.com/google/capsicum-test git fetch upstream-capsicum-test git checkout -f upstream-capsicum-test/dev -- git rm -rf autoconf/ casper/ gtest-1.10.0/ libcaprights/ git commit ``` --- capability-fd.cc | 82 +++++++++++++++++++++----------- capsicum-test-main.cc | 65 +++++++++++++++++++++++-- capsicum-test.cc | 24 ---------- capsicum-test.h | 23 ++++----- fexecve.cc | 128 ++++++++++++++++++++++++++++++++------------------ linux.cc | 51 ++++++++++---------- makefile | 4 +- mqueue.cc | 5 +- procdesc.cc | 9 ++-- 9 files changed, 239 insertions(+), 152 deletions(-) diff --git a/capability-fd.cc b/capability-fd.cc index 6c470cff3418..a454d54aa86a 100644 --- a/capability-fd.cc +++ b/capability-fd.cc @@ -1085,8 +1085,6 @@ TEST(Capability, SyscallAt) { cap_rights_init(&r_no_mkdir, CAP_READ, CAP_LOOKUP, CAP_UNLINKAT, CAP_MKFIFOAT); cap_rights_t r_no_mkfifo; cap_rights_init(&r_no_mkfifo, CAP_READ, CAP_LOOKUP, CAP_UNLINKAT, CAP_MKDIRAT); - cap_rights_t r_no_mknod; - cap_rights_init(&r_no_mknod, CAP_READ, CAP_LOOKUP, CAP_UNLINKAT, CAP_MKDIRAT); cap_rights_t r_create; cap_rights_init(&r_create, CAP_READ, CAP_LOOKUP, CAP_CREATE); cap_rights_t r_bind; @@ -1106,9 +1104,6 @@ TEST(Capability, SyscallAt) { int cap_dfd_no_mkfifo = dup(dfd); EXPECT_OK(cap_dfd_no_mkfifo); EXPECT_OK(cap_rights_limit(cap_dfd_no_mkfifo, &r_no_mkfifo)); - int cap_dfd_no_mknod = dup(dfd); - EXPECT_OK(cap_dfd_no_mknod); - EXPECT_OK(cap_rights_limit(cap_dfd_no_mknod, &r_no_mknod)); int cap_dfd_create = dup(dfd); EXPECT_OK(cap_dfd_create); EXPECT_OK(cap_rights_limit(cap_dfd_create, &r_create)); @@ -1148,24 +1143,7 @@ TEST(Capability, SyscallAt) { unlink(TmpFile("cap_at_topdir/cap_socket")); #endif - if (getuid() == 0) { - // Need CAP_MKNODAT to mknodat(2) a device - EXPECT_NOTCAPABLE(mknodat(cap_dfd_no_mknod, "cap_device", S_IFCHR|0755, makedev(99, 123))); - unlink(TmpFile("cap_at_topdir/cap_device")); - EXPECT_OK(mknodat(cap_dfd_all, "cap_device", S_IFCHR|0755, makedev(99, 123))); - unlink(TmpFile("cap_at_topdir/cap_device")); - - // Need CAP_MKFIFOAT to mknodat(2) for a FIFO. - EXPECT_NOTCAPABLE(mknodat(cap_dfd_no_mkfifo, "cap_fifo", S_IFIFO|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_fifo")); - EXPECT_OK(mknodat(cap_dfd_all, "cap_fifo", S_IFIFO|0755, 0)); - unlink(TmpFile("cap_at_topdir/cap_fifo")); - } else { - TEST_SKIPPED("requires root (partial)"); - } - close(cap_dfd_all); - close(cap_dfd_no_mknod); close(cap_dfd_no_mkfifo); close(cap_dfd_no_mkdir); close(cap_dfd_no_unlink); @@ -1177,7 +1155,53 @@ TEST(Capability, SyscallAt) { rmdir(TmpFile("cap_at_topdir")); } -FORK_TEST_ON(Capability, ExtendedAttributes, TmpFile("cap_extattr")) { +TEST(Capability, SyscallAtIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); + int rc = mkdir(TmpFile("cap_at_topdir"), 0755); + EXPECT_OK(rc); + if (rc < 0 && errno != EEXIST) return; + + cap_rights_t r_all; + cap_rights_init(&r_all, CAP_READ, CAP_LOOKUP, CAP_MKNODAT, CAP_UNLINKAT, CAP_MKDIRAT, CAP_MKFIFOAT); + cap_rights_t r_no_mkfifo; + cap_rights_init(&r_no_mkfifo, CAP_READ, CAP_LOOKUP, CAP_UNLINKAT, CAP_MKDIRAT); + cap_rights_t r_no_mknod; + cap_rights_init(&r_no_mknod, CAP_READ, CAP_LOOKUP, CAP_UNLINKAT, CAP_MKDIRAT); + + int dfd = open(TmpFile("cap_at_topdir"), O_RDONLY); + EXPECT_OK(dfd); + int cap_dfd_all = dup(dfd); + EXPECT_OK(cap_dfd_all); + EXPECT_OK(cap_rights_limit(cap_dfd_all, &r_all)); + int cap_dfd_no_mkfifo = dup(dfd); + EXPECT_OK(cap_dfd_no_mkfifo); + EXPECT_OK(cap_rights_limit(cap_dfd_no_mkfifo, &r_no_mkfifo)); + int cap_dfd_no_mknod = dup(dfd); + EXPECT_OK(cap_dfd_no_mknod); + EXPECT_OK(cap_rights_limit(cap_dfd_no_mknod, &r_no_mknod)); + + // Need CAP_MKNODAT to mknodat(2) a device + EXPECT_NOTCAPABLE(mknodat(cap_dfd_no_mknod, "cap_device", S_IFCHR|0755, makedev(99, 123))); + unlink(TmpFile("cap_at_topdir/cap_device")); + EXPECT_OK(mknodat(cap_dfd_all, "cap_device", S_IFCHR|0755, makedev(99, 123))); + unlink(TmpFile("cap_at_topdir/cap_device")); + + // Need CAP_MKFIFOAT to mknodat(2) for a FIFO. + EXPECT_NOTCAPABLE(mknodat(cap_dfd_no_mkfifo, "cap_fifo", S_IFIFO|0755, 0)); + unlink(TmpFile("cap_at_topdir/cap_fifo")); + EXPECT_OK(mknodat(cap_dfd_all, "cap_fifo", S_IFIFO|0755, 0)); + unlink(TmpFile("cap_at_topdir/cap_fifo")); + + close(cap_dfd_all); + close(cap_dfd_no_mknod); + close(cap_dfd_no_mkfifo); + close(dfd); + + // Tidy up. + rmdir(TmpFile("cap_at_topdir")); +} + +FORK_TEST_ON(Capability, ExtendedAttributesIfAvailable, TmpFile("cap_extattr")) { int fd = open(TmpFile("cap_extattr"), O_RDONLY|O_CREAT, 0644); EXPECT_OK(fd); @@ -1185,9 +1209,8 @@ FORK_TEST_ON(Capability, ExtendedAttributes, TmpFile("cap_extattr")) { int rc = fgetxattr_(fd, "user.capsicumtest", buffer, sizeof(buffer)); if (rc < 0 && errno == ENOTSUP) { // Need user_xattr mount option for non-root users on Linux - TEST_SKIPPED("/tmp doesn't support extended attributes"); close(fd); - return; + GTEST_SKIP() << "/tmp doesn't support extended attributes"; } cap_rights_t r_rws; @@ -1278,8 +1301,8 @@ TEST(Capability, PipeUnseekable) { close(fds[1]); } -TEST(Capability, NoBypassDAC) { - REQUIRE_ROOT(); +TEST(Capability, NoBypassDACIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); int fd = open(TmpFile("cap_root_owned"), O_RDONLY|O_CREAT, 0644); EXPECT_OK(fd); cap_rights_t rights; @@ -1289,7 +1312,10 @@ TEST(Capability, NoBypassDAC) { pid_t child = fork(); if (child == 0) { // Child: change uid to a lesser being - setuid(other_uid); + ASSERT_NE(0u, other_uid) << "other_uid not initialized correctly, " + "please pass the -u flag."; + EXPECT_EQ(0, setuid(other_uid)); + EXPECT_EQ(other_uid, getuid()); // Attempt to fchmod the file, and fail. // Having CAP_FCHMOD doesn't bypass the need to comply with DAC policy. int rc = fchmod(fd, 0666); diff --git a/capsicum-test-main.cc b/capsicum-test-main.cc index c8f35b71a000..d0f955270fd4 100644 --- a/capsicum-test-main.cc +++ b/capsicum-test-main.cc @@ -2,16 +2,25 @@ #ifdef __linux__ #include #include +#elif defined(__FreeBSD__) +#include #endif #include #include +#include #include #include #include +#include #include #include "gtest/gtest.h" #include "capsicum-test.h" +// For versions of googletest that lack GTEST_SKIP. +#ifndef GTEST_SKIP +#define GTEST_SKIP GTEST_FAIL +#endif + std::string tmpdir; class SetupEnvironment : public ::testing::Environment @@ -19,6 +28,7 @@ class SetupEnvironment : public ::testing::Environment public: SetupEnvironment() : teardown_tmpdir_(false) {} void SetUp() override { + CheckCapsicumSupport(); if (tmpdir.empty()) { std::cerr << "Generating temporary directory root: "; CreateTemporaryRoot(); @@ -27,6 +37,31 @@ public: } std::cerr << tmpdir << std::endl; } + void CheckCapsicumSupport() { +#ifdef __FreeBSD__ + int rc; + bool trap_enotcap_enabled; + size_t trap_enotcap_enabled_len = sizeof(trap_enotcap_enabled); + + if (feature_present("security_capabilities") == 0) { + GTEST_SKIP() << "Skipping tests because capsicum support is not " + << "enabled in the kernel."; + } + // If this OID is enabled, it will send SIGTRAP to the process when + // `ENOTCAPABLE` is returned. + const char *oid = "kern.trap_enotcap"; + rc = sysctlbyname(oid, &trap_enotcap_enabled, &trap_enotcap_enabled_len, + nullptr, 0); + if (rc != 0) { + GTEST_FAIL() << "sysctlbyname failed: " << strerror(errno); + } + if (trap_enotcap_enabled) { + GTEST_SKIP() << "Debug sysctl, " << oid << ", enabled. " + << "Skipping tests because its enablement invalidates the " + << "test results."; + } +#endif /* FreeBSD */ + } void CreateTemporaryRoot() { char *tmpdir_name = tempnam(nullptr, "cptst"); @@ -47,7 +82,33 @@ private: bool teardown_tmpdir_; }; +std::string capsicum_test_bindir; + +// Adds a directory to $PATH. +static void AddDirectoryToPath(const char *dir) { + char *new_path, *old_path; + + old_path = getenv("PATH"); + assert(old_path); + + assert(asprintf(&new_path, "%s:%s", dir, old_path) > 0); + assert(setenv("PATH", new_path, 1) == 0); +} + int main(int argc, char* argv[]) { + // Set up the test program path, so capsicum-test can find programs, like + // mini-me* when executed from an absolute path. + char *program_name; + + // Copy argv[0], so dirname can do an in-place manipulation of the buffer's + // contents. + program_name = strdup(argv[0]); + assert(program_name); + capsicum_test_bindir = std::string(dirname(program_name)); + free(program_name); + + AddDirectoryToPath(capsicum_test_bindir.c_str()); + ::testing::InitGoogleTest(&argc, argv); for (int ii = 1; ii < argc; ii++) { if (strcmp(argv[ii], "-v") == 0) { @@ -95,7 +156,5 @@ int main(int argc, char* argv[]) { #endif testing::AddGlobalTestEnvironment(new SetupEnvironment()); - int rc = RUN_ALL_TESTS(); - ShowSkippedTests(std::cerr); - return rc; + return RUN_ALL_TESTS(); } diff --git a/capsicum-test.cc b/capsicum-test.cc index 24b096ed877c..6adb222ec055 100644 --- a/capsicum-test.cc +++ b/capsicum-test.cc @@ -76,27 +76,3 @@ char ProcessState(int pid) { } #endif } - -typedef std::vector TestList; -typedef std::map SkippedTestMap; -static SkippedTestMap skipped_tests; -void TestSkipped(const char *testcase, const char *test, const std::string& reason) { - if (skipped_tests.find(reason) == skipped_tests.end()) { - skipped_tests[reason] = new TestList; - } - std::string testname(testcase); - testname += "."; - testname += test; - skipped_tests[reason]->push_back(testname); -} - -void ShowSkippedTests(std::ostream& os) { - for (SkippedTestMap::iterator skiplist = skipped_tests.begin(); - skiplist != skipped_tests.end(); ++skiplist) { - os << "Following tests were skipped because: " << skiplist->first << std::endl; - for (size_t ii = 0; ii < skiplist->second->size(); ++ii) { - const std::string& testname((*skiplist->second)[ii]); - os << " " << testname << std::endl; - } - } -} diff --git a/capsicum-test.h b/capsicum-test.h index 4251302e8681..808840f4280e 100644 --- a/capsicum-test.h +++ b/capsicum-test.h @@ -10,6 +10,7 @@ #include #include +#include #include "gtest/gtest.h" @@ -75,7 +76,7 @@ const char *TmpFile(const char *pathname); } \ } else if (pid > 0) { \ int rc, status; \ - int remaining_us = 10000000; \ + int remaining_us = 30000000; \ while (remaining_us > 0) { \ status = 0; \ rc = waitpid(pid, &status, WNOHANG); \ @@ -169,12 +170,14 @@ const char *TmpFile(const char *pathname); } else { \ EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ } \ + if (result >= 0) { close(result); } \ } while (0) #else #define EXPECT_OPENAT_FAIL_TRAVERSAL(fd, path, flags) \ do { \ const int result = openat((fd), (path), (flags)); \ EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, result); \ + if (result >= 0) { close(result); } \ } while (0) #endif @@ -241,20 +244,10 @@ char ProcessState(int pid); #define EXPECT_PID_ZOMBIE(pid) EXPECT_PID_REACHES_STATES(pid, 'Z', 'Z'); #define EXPECT_PID_GONE(pid) EXPECT_PID_REACHES_STATES(pid, '\0', '\0'); -void ShowSkippedTests(std::ostream& os); -void TestSkipped(const char *testcase, const char *test, const std::string& reason); -#define TEST_SKIPPED(reason) \ - do { \ - const ::testing::TestInfo* const info = ::testing::UnitTest::GetInstance()->current_test_info(); \ - std::cerr << "Skipping " << info->test_case_name() << "::" << info->name() << " because: " << reason << std::endl; \ - TestSkipped(info->test_case_name(), info->name(), reason); \ - } while (0) - // Mark a test that can only be run as root. -#define REQUIRE_ROOT() \ - if (getuid() != 0) { \ - TEST_SKIPPED("requires root"); \ - return; \ - } +#define GTEST_SKIP_IF_NOT_ROOT() \ + if (getuid() != 0) { GTEST_SKIP() << "requires root"; } + +extern std::string capsicum_test_bindir; #endif // CAPSICUM_TEST_H diff --git a/fexecve.cc b/fexecve.cc index d4971320a2b7..86df2af06388 100644 --- a/fexecve.cc +++ b/fexecve.cc @@ -1,12 +1,12 @@ -#include -#include #include -#include #include +#include +#include #include -#include #include #include +#include +#include #include @@ -14,41 +14,76 @@ #include "capsicum.h" #include "capsicum-test.h" -// We need a program to exec(), but for fexecve() to work in capability -// mode that program needs to be statically linked (otherwise ld.so will -// attempt to traverse the filesystem to load (e.g.) /lib/libc.so and -// fail). -#define EXEC_PROG "./mini-me" -#define EXEC_PROG_NOEXEC EXEC_PROG ".noexec" -#define EXEC_PROG_SETUID EXEC_PROG ".setuid" - // Arguments to use in execve() calls. -static char* argv_pass[] = {(char*)EXEC_PROG, (char*)"--pass", NULL}; -static char* argv_fail[] = {(char*)EXEC_PROG, (char*)"--fail", NULL}; -static char* argv_checkroot[] = {(char*)EXEC_PROG, (char*)"--checkroot", NULL}; static char* null_envp[] = {NULL}; class Execve : public ::testing::Test { public: - Execve() : exec_fd_(open(EXEC_PROG, O_RDONLY)) { + Execve() : exec_fd_(-1) { + // We need a program to exec(), but for fexecve() to work in capability + // mode that program needs to be statically linked (otherwise ld.so will + // attempt to traverse the filesystem to load (e.g.) /lib/libc.so and + // fail). + exec_prog_ = capsicum_test_bindir + "/mini-me"; + exec_prog_noexec_ = capsicum_test_bindir + "/mini-me.noexec"; + exec_prog_setuid_ = capsicum_test_bindir + "/mini-me.setuid"; + + exec_fd_ = open(exec_prog_.c_str(), O_RDONLY); if (exec_fd_ < 0) { - fprintf(stderr, "Error! Failed to open %s\n", EXEC_PROG); + fprintf(stderr, "Error! Failed to open %s\n", exec_prog_.c_str()); + } + argv_checkroot_[0] = (char*)exec_prog_.c_str(); + argv_fail_[0] = (char*)exec_prog_.c_str(); + argv_pass_[0] = (char*)exec_prog_.c_str(); + } + ~Execve() { + if (exec_fd_ >= 0) { + close(exec_fd_); + exec_fd_ = -1; } } - ~Execve() { if (exec_fd_ >= 0) close(exec_fd_); } protected: + char* argv_checkroot_[3] = {nullptr, (char*)"--checkroot", nullptr}; + char* argv_fail_[3] = {nullptr, (char*)"--fail", nullptr}; + char* argv_pass_[3] = {nullptr, (char*)"--pass", nullptr}; + std::string exec_prog_, exec_prog_noexec_, exec_prog_setuid_; int exec_fd_; }; +class Fexecve : public Execve { + public: + Fexecve() : Execve() {} +}; + +class FexecveWithScript : public Fexecve { + public: + FexecveWithScript() : + Fexecve(), temp_script_filename_(TmpFile("cap_sh_script")) {} + + void SetUp() override { + // First, build an executable shell script + int fd = open(temp_script_filename_, O_RDWR|O_CREAT, 0755); + EXPECT_OK(fd); + const char* contents = "#!/bin/sh\nexit 99\n"; + EXPECT_OK(write(fd, contents, strlen(contents))); + close(fd); + } + void TearDown() override { + (void)::unlink(temp_script_filename_); + } + + const char *temp_script_filename_; +}; + FORK_TEST_F(Execve, BasicFexecve) { - EXPECT_OK(fexecve_(exec_fd_, argv_pass, null_envp)); + EXPECT_OK(fexecve_(exec_fd_, argv_pass_, null_envp)); // Should not reach here, exec() takes over. EXPECT_TRUE(!"fexecve() should never return"); } FORK_TEST_F(Execve, InCapMode) { EXPECT_OK(cap_enter()); - EXPECT_OK(fexecve_(exec_fd_, argv_pass, null_envp)); + EXPECT_OK(fexecve_(exec_fd_, argv_pass_, null_envp)); // Should not reach here, exec() takes over. EXPECT_TRUE(!"fexecve() should never return"); } @@ -60,7 +95,7 @@ FORK_TEST_F(Execve, FailWithoutCap) { cap_rights_t rights; cap_rights_init(&rights, 0); EXPECT_OK(cap_rights_limit(cap_fd, &rights)); - EXPECT_EQ(-1, fexecve_(cap_fd, argv_fail, null_envp)); + EXPECT_EQ(-1, fexecve_(cap_fd, argv_fail_, null_envp)); EXPECT_EQ(ENOTCAPABLE, errno); } @@ -73,59 +108,53 @@ FORK_TEST_F(Execve, SucceedWithCap) { // rights -- just CAP_FEXECVE|CAP_READ or CAP_FEXECVE would be preferable. cap_rights_init(&rights, CAP_FEXECVE, CAP_LOOKUP, CAP_READ); EXPECT_OK(cap_rights_limit(cap_fd, &rights)); - EXPECT_OK(fexecve_(cap_fd, argv_pass, null_envp)); + EXPECT_OK(fexecve_(cap_fd, argv_pass_, null_envp)); // Should not reach here, exec() takes over. EXPECT_TRUE(!"fexecve() should have succeeded"); } -FORK_TEST(Fexecve, ExecutePermissionCheck) { - int fd = open(EXEC_PROG_NOEXEC, O_RDONLY); +FORK_TEST_F(Fexecve, ExecutePermissionCheck) { + int fd = open(exec_prog_noexec_.c_str(), O_RDONLY); EXPECT_OK(fd); if (fd >= 0) { struct stat data; EXPECT_OK(fstat(fd, &data)); EXPECT_EQ((mode_t)0, data.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); - EXPECT_EQ(-1, fexecve_(fd, argv_fail, null_envp)); + EXPECT_EQ(-1, fexecve_(fd, argv_fail_, null_envp)); EXPECT_EQ(EACCES, errno); close(fd); } } -FORK_TEST(Fexecve, SetuidIgnored) { +FORK_TEST_F(Fexecve, SetuidIgnoredIfNonRoot) { if (geteuid() == 0) { - TEST_SKIPPED("requires non-root"); - return; + GTEST_SKIP() << "requires non-root"; } - int fd = open(EXEC_PROG_SETUID, O_RDONLY); + int fd = open(exec_prog_setuid_.c_str(), O_RDONLY); EXPECT_OK(fd); EXPECT_OK(cap_enter()); if (fd >= 0) { struct stat data; EXPECT_OK(fstat(fd, &data)); EXPECT_EQ((mode_t)S_ISUID, data.st_mode & S_ISUID); - EXPECT_OK(fexecve_(fd, argv_checkroot, null_envp)); + EXPECT_OK(fexecve_(fd, argv_checkroot_, null_envp)); // Should not reach here, exec() takes over. EXPECT_TRUE(!"fexecve() should have succeeded"); close(fd); } } -FORK_TEST(Fexecve, ExecveFailure) { +FORK_TEST_F(Fexecve, ExecveFailure) { EXPECT_OK(cap_enter()); - EXPECT_EQ(-1, execve(argv_fail[0], argv_fail, null_envp)); + EXPECT_EQ(-1, execve(argv_fail_[0], argv_fail_, null_envp)); EXPECT_EQ(ECAPMODE, errno); } -FORK_TEST_ON(Fexecve, CapModeScriptFail, TmpFile("cap_sh_script")) { - // First, build an executable shell script - int fd = open(TmpFile("cap_sh_script"), O_RDWR|O_CREAT, 0755); - EXPECT_OK(fd); - const char* contents = "#!/bin/sh\nexit 99\n"; - EXPECT_OK(write(fd, contents, strlen(contents))); - close(fd); +FORK_TEST_F(FexecveWithScript, CapModeScriptFail) { + int fd; // Open the script file, with CAP_FEXECVE rights. - fd = open(TmpFile("cap_sh_script"), O_RDONLY); + fd = open(temp_script_filename_, O_RDONLY); cap_rights_t rights; cap_rights_init(&rights, CAP_FEXECVE, CAP_READ, CAP_SEEK); EXPECT_OK(cap_rights_limit(fd, &rights)); @@ -133,12 +162,17 @@ FORK_TEST_ON(Fexecve, CapModeScriptFail, TmpFile("cap_sh_script")) { EXPECT_OK(cap_enter()); // Enter capability mode // Attempt fexecve; should fail, because "/bin/sh" is inaccessible. - EXPECT_EQ(-1, fexecve_(fd, argv_pass, null_envp)); + EXPECT_EQ(-1, fexecve_(fd, argv_pass_, null_envp)); } #ifdef HAVE_EXECVEAT -TEST(Execveat, NoUpwardTraversal) { - char *abspath = realpath(EXEC_PROG, NULL); +class Execveat : public Execve { + public: + Execveat() : Execve() {} +}; + +TEST_F(Execveat, NoUpwardTraversal) { + char *abspath = realpath(exec_prog_.c_str(), NULL); char cwd[1024]; getcwd(cwd, sizeof(cwd)); @@ -148,9 +182,9 @@ TEST(Execveat, NoUpwardTraversal) { EXPECT_OK(cap_enter()); // Enter capability mode. // Can't execveat() an absolute path, even relative to a dfd. EXPECT_SYSCALL_FAIL(ECAPMODE, - execveat(AT_FDCWD, abspath, argv_pass, null_envp, 0)); + execveat(AT_FDCWD, abspath, argv_pass_, null_envp, 0)); EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, - execveat(dfd, abspath, argv_pass, null_envp, 0)); + execveat(dfd, abspath, argv_pass_, null_envp, 0)); // Can't execveat() a relative path ("..//./"). char *p = cwd + strlen(cwd); @@ -158,9 +192,9 @@ TEST(Execveat, NoUpwardTraversal) { char buffer[1024] = "../"; strcat(buffer, ++p); strcat(buffer, "/"); - strcat(buffer, EXEC_PROG); + strcat(buffer, exec_prog_.c_str()); EXPECT_SYSCALL_FAIL(E_NO_TRAVERSE_CAPABILITY, - execveat(dfd, buffer, argv_pass, null_envp, 0)); + execveat(dfd, buffer, argv_pass_, null_envp, 0)); exit(HasFailure() ? 99 : 123); } int status; diff --git a/linux.cc b/linux.cc index dee1f99897f6..81ba06c5e588 100644 --- a/linux.cc +++ b/linux.cc @@ -104,10 +104,9 @@ TEST(Linux, TimerFD) { close(fd); } -FORK_TEST(Linux, SignalFD) { +FORK_TEST(Linux, SignalFDIfSingleThreaded) { if (force_mt) { - TEST_SKIPPED("multi-threaded run clashes with signals"); - return; + GTEST_SKIP() << "multi-threaded run clashes with signals"; } pid_t me = getpid(); sigset_t mask; @@ -372,8 +371,8 @@ TEST(Linux, fstatat) { // fanotify support may not be available at compile-time #ifdef __NR_fanotify_init -TEST(Linux, fanotify) { - REQUIRE_ROOT(); +TEST(Linux, FanotifyIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); int fa_fd = fanotify_init(FAN_CLASS_NOTIF, O_RDWR); EXPECT_OK(fa_fd); if (fa_fd < 0) return; // May not be enabled @@ -577,7 +576,7 @@ TEST(Linux, inotify) { unlink(TmpFile("cap_inotify")); } -TEST(Linux, ArchChange) { +TEST(Linux, ArchChangeIfAvailable) { const char* prog_candidates[] = {"./mini-me.32", "./mini-me.x32", "./mini-me.64"}; const char* progs[] = {NULL, NULL, NULL}; char* argv_pass[] = {(char*)"to-come", (char*)"--capmode", NULL}; @@ -593,8 +592,7 @@ TEST(Linux, ArchChange) { } } if (count == 0) { - TEST_SKIPPED("no different-architecture programs available"); - return; + GTEST_SKIP() << "no different-architecture programs available"; } for (int ii = 0; ii < count; ii++) { @@ -617,8 +615,8 @@ TEST(Linux, ArchChange) { } } -FORK_TEST(Linux, Namespace) { - REQUIRE_ROOT(); +FORK_TEST(Linux, NamespaceIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); pid_t me = getpid_(); // Create a new UTS namespace. @@ -758,9 +756,9 @@ static int ChildFunc(void *arg) { #define STACK_SIZE (1024 * 1024) static char child_stack[STACK_SIZE]; -// TODO(drysdale): fork into a user namespace first so REQUIRE_ROOT can be removed. -TEST(Linux, PidNamespacePdFork) { - REQUIRE_ROOT(); +// TODO(drysdale): fork into a user namespace first so GTEST_SKIP_IF_NOT_ROOT can be removed. +TEST(Linux, PidNamespacePdForkIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); // Pass process descriptors in both directions across a PID namespace boundary. // pdfork() off a child before we start, holding its process descriptor in a global // variable that's accessible to children. @@ -871,8 +869,8 @@ int NSInit(void *data) { return 0; } -TEST(Linux, DeadNSInit) { - REQUIRE_ROOT(); +TEST(Linux, DeadNSInitIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); // Prepare sockets to communicate with child process. EXPECT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, shared_sock_fds)); @@ -916,8 +914,8 @@ TEST(Linux, DeadNSInit) { } } -TEST(Linux, DeadNSInit2) { - REQUIRE_ROOT(); +TEST(Linux, DeadNSInit2IfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); // Prepare sockets to communicate with child process. EXPECT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, shared_sock_fds)); @@ -1188,7 +1186,7 @@ TEST(Linux, AIO) { #ifndef KCMP_FILE #define KCMP_FILE 0 #endif -TEST(Linux, Kcmp) { +TEST(Linux, KcmpIfAvailable) { // This requires CONFIG_CHECKPOINT_RESTORE in kernel config. int fd = open("/etc/passwd", O_RDONLY); EXPECT_OK(fd); @@ -1197,8 +1195,7 @@ TEST(Linux, Kcmp) { errno = 0; int rc = syscall(__NR_kcmp, parent, parent, KCMP_FILE, fd, fd); if (rc == -1 && errno == ENOSYS) { - TEST_SKIPPED("kcmp(2) gives -ENOSYS"); - return; + GTEST_SKIP() << "kcmp(2) gives -ENOSYS"; } pid_t child = fork(); @@ -1362,8 +1359,8 @@ TEST(Linux, InvalidRightsSyscall) { unlink(TmpFile("cap_invalid_rights")); } -FORK_TEST_ON(Linux, OpenByHandleAt, TmpFile("cap_openbyhandle_testfile")) { - REQUIRE_ROOT(); +FORK_TEST_ON(Linux, OpenByHandleAtIfRoot, TmpFile("cap_openbyhandle_testfile")) { + GTEST_SKIP_IF_NOT_ROOT(); int dir = open(tmpdir.c_str(), O_RDONLY); EXPECT_OK(dir); int fd = openat(dir, "cap_openbyhandle_testfile", O_RDWR|O_CREAT, 0644); @@ -1380,8 +1377,9 @@ FORK_TEST_ON(Linux, OpenByHandleAt, TmpFile("cap_openbyhandle_testfile")) { fd = open_by_handle_at(dir, fhandle, O_RDONLY); EXPECT_OK(fd); char buffer[200]; - EXPECT_OK(read(fd, buffer, 199)); - EXPECT_EQ(std::string(message), std::string(buffer)); + ssize_t len = read(fd, buffer, 199); + EXPECT_OK(len); + EXPECT_EQ(std::string(message), std::string(buffer, len)); close(fd); // Cannot issue open_by_handle_at after entering capability mode. @@ -1423,11 +1421,10 @@ int memfd_create_(const char *name, unsigned int flags) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0) #include // Requires 3.17 kernel -TEST(Linux, MemFDDeathTest) { +TEST(Linux, MemFDDeathTestIfAvailable) { int memfd = memfd_create_("capsicum-test", MFD_ALLOW_SEALING); if (memfd == -1 && errno == ENOSYS) { - TEST_SKIPPED("memfd_create(2) gives -ENOSYS"); - return; + GTEST_SKIP() << "memfd_create(2) gives -ENOSYS"; } const int LEN = 16; EXPECT_OK(ftruncate(memfd, LEN)); diff --git a/makefile b/makefile index c92caeb3bc10..7b95e1927927 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ all: capsicum-test smoketest mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) OBJECTS=capsicum-test-main.o capsicum-test.o capability-fd.o fexecve.o procdesc.o capmode.o fcntl.o ioctl.o openat.o sysctl.o select.o mqueue.o socket.o sctp.o capability-fd-pair.o linux.o overhead.o rename.o -GTEST_DIR=gtest-1.8.1 +GTEST_DIR=gtest-1.10.0 GTEST_INCS=-I$(GTEST_DIR)/include -I$(GTEST_DIR) GTEST_FLAGS=-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_HAS_TR1_TUPLE=1 CXXFLAGS+=$(ARCHFLAG) -Wall -g $(GTEST_INCS) $(GTEST_FLAGS) --std=c++11 @@ -28,7 +28,7 @@ smoketest: $(SMOKETEST_OBJECTS) $(LOCAL_LIBS) test: capsicum-test mini-me mini-me.noexec mini-me.setuid $(EXTRA_PROGS) ./capsicum-test gtest-all.o: - $(CXX) $(ARCHFLAG) -I$(GTEST_DIR)/include -I$(GTEST_DIR) $(GTEST_FLAGS) -c ${GTEST_DIR}/src/gtest-all.cc + $(CXX) $(CXXFLAGS) $(ARCHFLAG) -I$(GTEST_DIR)/include -I$(GTEST_DIR) $(GTEST_FLAGS) -c ${GTEST_DIR}/src/gtest-all.cc libgtest.a: gtest-all.o $(AR) -rv libgtest.a gtest-all.o diff --git a/mqueue.cc b/mqueue.cc index 42478c760020..f2f3daeb1db8 100644 --- a/mqueue.cc +++ b/mqueue.cc @@ -28,14 +28,13 @@ void seen_it_done_it(int) { invoked = true; } -FORK_TEST_ON_MQ(PosixMqueue, CapMode, "/cap_mq") { +FORK_TEST_ON_MQ(PosixMqueue, CapModeIfMqOpenAvailable, "/cap_mq") { int mq = mq_open_("/cap_mq", O_RDWR|O_CREAT, 0644, NULL); // On FreeBSD, turn on message queue support with: // - 'kldload mqueuefs' // - 'options P1003_1B_MQUEUE' in kernel build config. if (mq < 0 && errno == ENOSYS) { - TEST_SKIPPED("mq_open -> -ENOSYS"); - return; + GTEST_SKIP() << "mq_open -> -ENOSYS"; } EXPECT_OK(mq); cap_rights_t r_read; diff --git a/procdesc.cc b/procdesc.cc index 94c0dc5d774d..11274ce9e866 100644 --- a/procdesc.cc +++ b/procdesc.cc @@ -519,8 +519,8 @@ TEST_F(PipePdfork, CloseLast) { signal(SIGCHLD, original); } -FORK_TEST(Pdfork, OtherUser) { - REQUIRE_ROOT(); +FORK_TEST(Pdfork, OtherUserIfRoot) { + GTEST_SKIP_IF_NOT_ROOT(); int pd; pid_t pid = pdfork(&pd, 0); EXPECT_OK(pid); @@ -531,7 +531,10 @@ FORK_TEST(Pdfork, OtherUser) { usleep(100); // Now that the second process has been pdfork()ed, change euid. - setuid(other_uid); + ASSERT_NE(0u, other_uid) << "other_uid not initialized correctly, " + "please pass the -u flag."; + EXPECT_EQ(0, setuid(other_uid)); + EXPECT_EQ(other_uid, getuid()); if (verbose) fprintf(stderr, "uid=%d euid=%d\n", getuid(), geteuid()); // Fail to kill child with normal PID operation. From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:28:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8103A53A376 for ; Tue, 16 Feb 2021 14:28: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 4Dg3HY6bTdz4SHD; Tue, 16 Feb 2021 14:28: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 A375212749; Tue, 16 Feb 2021 14:28: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 11GESYqi080427; Tue, 16 Feb 2021 14:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GESY96080426; Tue, 16 Feb 2021 14:28:34 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:28:34 GMT Message-Id: <202102161428.11GESY96080426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Alex Richardson Subject: git: 106ef74dbdcb - Create tag vendor/google/capsicum-test/7707222b46abe52d18fd4fbb76115ffdb3e6f74b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/tags/vendor/google/capsicum-test/7707222b46abe52d18fd4fbb76115ffdb3e6f74b X-Git-Reftype: annotated tag X-Git-Commit: 106ef74dbdcb655b78b119aea7df44dc6a8a0abe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:28:44 -0000 The annotated tag vendor/google/capsicum-test/7707222b46abe52d18fd4fbb76115ffdb3e6f74b has been created by arichardson: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/google/capsicum-test/7707222b46abe52d18fd4fbb76115ffdb3e6f74b tag vendor/google/capsicum-test/7707222b46abe52d18fd4fbb76115ffdb3e6f74b Tagger: Alex Richardson TaggerDate: 2021-02-16 14:25:03 +0000 Vendor import of https://github.com/google/capsicum-test/commit/7707222b46abe52d18fd4fbb76115ffdb3e6f74b commit b6973c8f4a960d42c7c9130d2388db072a0d8a9a Author: Alex Richardson AuthorDate: 2021-02-16 13:12:51 +0000 Commit: Alex Richardson CommitDate: 2021-02-16 14:04:29 +0000 Update capsicum-test to 7707222b46abe52d18fd4fbb76115ffdb3e6f74b Using the following steps: ``` git worktree add ../freebsd-vendor-capsicum-test freebsd/vendor/google/capsicum-test cd ../freebsd-vendor-capsicum-test git remote add upstream-capsicum-test https://github.com/google/capsicum-test git fetch upstream-capsicum-test git checkout -f upstream-capsicum-test/dev -- git rm -rf autoconf/ casper/ gtest-1.10.0/ libcaprights/ git commit ``` From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:39:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8916653AC08; Tue, 16 Feb 2021 14:39: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 4Dg3Wk3TL2z4VPG; Tue, 16 Feb 2021 14:39: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 6A2C212D93; Tue, 16 Feb 2021 14:39: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 11GEdERO094014; Tue, 16 Feb 2021 14:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GEdELT094013; Tue, 16 Feb 2021 14:39:14 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:39:14 GMT Message-Id: <202102161439.11GEdELT094013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 2d936e6c99ad - main - Update capsicum-test to git commit 7707222b46abe52d18fd4fbb76115ffdb3e6f74b MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d936e6c99ad1c4fb01f6c99a96dcc924ee44b9d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:39:14 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=2d936e6c99ad1c4fb01f6c99a96dcc924ee44b9d commit 2d936e6c99ad1c4fb01f6c99a96dcc924ee44b9d Merge: 952667da986c b6973c8f4a96 Author: Alex Richardson AuthorDate: 2021-02-16 14:35:12 +0000 Commit: Alex Richardson CommitDate: 2021-02-16 14:35:12 +0000 Update capsicum-test to git commit 7707222b46abe52d18fd4fbb76115ffdb3e6f74b This includes changes to use GTEST_SKIP() instead of the local hand-rolled mechanism as well as a few minor cleanups. contrib/capsicum-test/capability-fd.cc | 82 +++++++++++++++++++---------- contrib/capsicum-test/capsicum-test-main.cc | 36 +++++++------ contrib/capsicum-test/capsicum-test.cc | 24 --------- contrib/capsicum-test/capsicum-test.h | 24 +++------ contrib/capsicum-test/fexecve.cc | 11 ++-- contrib/capsicum-test/linux.cc | 51 +++++++++--------- contrib/capsicum-test/makefile | 4 +- contrib/capsicum-test/mqueue.cc | 5 +- contrib/capsicum-test/procdesc.cc | 9 ++-- 9 files changed, 121 insertions(+), 125 deletions(-) From owner-dev-commits-src-all@freebsd.org Tue Feb 16 14:40:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A359353AC24; Tue, 16 Feb 2021 14:40: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 4Dg3Xq3q4jz4VTB; Tue, 16 Feb 2021 14:40: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 3C8F812C9A; Tue, 16 Feb 2021 14:40: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 11GEeB29096950; Tue, 16 Feb 2021 14:40:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GEeBGr096945; Tue, 16 Feb 2021 14:40:11 GMT (envelope-from git) Date: Tue, 16 Feb 2021 14:40:11 GMT Message-Id: <202102161440.11GEeBGr096945@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0fc8a7967228 - main - linux: Unmap the VDSO page when unloading 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/main X-Git-Reftype: branch X-Git-Commit: 0fc8a796722846d0d676548aa0f5cc660199db73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 14:40:11 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0fc8a796722846d0d676548aa0f5cc660199db73 commit 0fc8a796722846d0d676548aa0f5cc660199db73 Author: Mark Johnston AuthorDate: 2021-02-16 14:30:21 +0000 Commit: Mark Johnston CommitDate: 2021-02-16 14:40:02 +0000 linux: Unmap the VDSO page when unloading linux_shared_page_init() creates an object and grabs and maps a single page to back the VDSO. When destroying the VDSO object, we failed to destroy the mapping and free KVA. Fix this. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28696 --- sys/amd64/linux/linux_sysvec.c | 3 ++- sys/amd64/linux32/linux32_sysvec.c | 3 ++- sys/arm64/linux/linux_sysvec.c | 3 ++- sys/compat/linux/linux_vdso.c | 6 +++++- sys/compat/linux/linux_vdso.h | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index dbfc650a916e..abc750c63682 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -818,7 +818,8 @@ static void linux_vdso_deinstall(void *param) { - __elfN(linux_shared_page_fini)(linux_shared_page_obj); + __elfN(linux_shared_page_fini)(linux_shared_page_obj, + linux_shared_page_mapping); } SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, linux_vdso_deinstall, NULL); diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index d06a1fb17d9b..bb86baefaec4 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -961,7 +961,8 @@ static void linux_vdso_deinstall(void *param) { - __elfN(linux_shared_page_fini)(linux_shared_page_obj); + __elfN(linux_shared_page_fini)(linux_shared_page_obj, + linux_shared_page_mapping); } SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, linux_vdso_deinstall, NULL); diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 366fe7c2dc44..1d628ffe6ecb 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -461,7 +461,8 @@ linux_vdso_deinstall(const void *param) { LIN_SDT_PROBE0(sysvec, linux_vdso_deinstall, todo); - __elfN(linux_shared_page_fini)(linux_shared_page_obj); + __elfN(linux_shared_page_fini)(linux_shared_page_obj, + linux_shared_page_mapping); } SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, linux_vdso_deinstall, NULL); diff --git a/sys/compat/linux/linux_vdso.c b/sys/compat/linux/linux_vdso.c index 096f2e424850..a05c0b01ff40 100644 --- a/sys/compat/linux/linux_vdso.c +++ b/sys/compat/linux/linux_vdso.c @@ -93,9 +93,13 @@ __elfN(linux_shared_page_init)(char **mapping) } void -__elfN(linux_shared_page_fini)(vm_object_t obj) +__elfN(linux_shared_page_fini)(vm_object_t obj, void *mapping) { + vm_offset_t va; + va = (vm_offset_t)mapping; + pmap_qremove(va, 1); + kva_free(va, PAGE_SIZE); vm_object_deallocate(obj); } diff --git a/sys/compat/linux/linux_vdso.h b/sys/compat/linux/linux_vdso.h index 542efef9cb82..073c51696387 100644 --- a/sys/compat/linux/linux_vdso.h +++ b/sys/compat/linux/linux_vdso.h @@ -39,7 +39,7 @@ struct linux_vdso_sym { }; vm_object_t __elfN(linux_shared_page_init)(char **); -void __elfN(linux_shared_page_fini)(vm_object_t); +void __elfN(linux_shared_page_fini)(vm_object_t, void *); void __elfN(linux_vdso_fixup)(struct sysentvec *); void __elfN(linux_vdso_reloc)(struct sysentvec *); void __elfN(linux_vdso_sym_init)(struct linux_vdso_sym *); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 15:14:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 82BC253BF26; Tue, 16 Feb 2021 15:14: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 4Dg4Js3JlZz4YtH; Tue, 16 Feb 2021 15:14: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 6493D13625; Tue, 16 Feb 2021 15:14: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 11GFErOX045904; Tue, 16 Feb 2021 15:14:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GFEr47045903; Tue, 16 Feb 2021 15:14:53 GMT (envelope-from git) Date: Tue, 16 Feb 2021 15:14:53 GMT Message-Id: <202102161514.11GFEr47045903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau Monné Subject: git: 97527e9c4fd3 - main - bi_load: only add MODULEP on arches that have it defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97527e9c4fd37140da3129bc12003172edbf7a23 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 15:14:53 -0000 The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=97527e9c4fd37140da3129bc12003172edbf7a23 commit 97527e9c4fd37140da3129bc12003172edbf7a23 Author: Roger Pau Monné AuthorDate: 2021-02-16 15:06:14 +0000 Commit: Roger Pau Monné CommitDate: 2021-02-16 15:14:32 +0000 bi_load: only add MODULEP on arches that have it defined Do not attempt to add MODINFOMD_MODULEP to the kernel medatada on arches that don't have it defined. This fixes the build for arches different than amd64 after 7d3259775cb69f250df3e7fe51d6fff2283c6f20. Sponsored by: Citrix Systems R&D Reported by: lwhsu, arichardson --- stand/efi/loader/bootinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 89ff6dca18d9..9924901d29e6 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -532,7 +532,9 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) "device tree blob found!\n"); #endif file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof(kernend), &kernend); +#ifdef MODINFOMD_MODULEP file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof(module), &module); +#endif file_addmetadata(kfp, MODINFOMD_FW_HANDLE, sizeof(ST), &ST); #ifdef LOADER_GELI_SUPPORT geli_export_key_metadata(kfp); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 17:07:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AC8DC5402C0 for ; Tue, 16 Feb 2021 17:07:56 +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 4Dg6qJ4Td1z4k0t; Tue, 16 Feb 2021 17:07:56 +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 8CDB214F2A; Tue, 16 Feb 2021 17:07:56 +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 11GH7ueB090045; Tue, 16 Feb 2021 17:07:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GH7uL8090044; Tue, 16 Feb 2021 17:07:56 GMT (envelope-from git) Date: Tue, 16 Feb 2021 17:07:56 GMT Message-Id: <202102161707.11GH7uL8090044@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Mark Johnston Subject: git: f560a8b1a4ed - releng/13.0 - mca: Handle inconsistent CMCI capability reporting 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 17:07:56 -0000 The branch releng/13.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 commit f560a8b1a4edd1b8a9f110ae2edaa7a3307e9034 Author: Mark Johnston AuthorDate: 2021-02-16 17:07:43 +0000 Commit: Mark Johnston CommitDate: 2021-02-16 17:07:43 +0000 mca: Handle inconsistent CMCI capability reporting A BIOS bug may apparently cause the BSP to report that it does not implement CMCI, with some APs reporting that they do. In this scenario, avoid a NULL pointer dereference that occurs in cmci_monitor() because cmc_state was not allocated by the BSP. Approved by: re (gjb) PR: 253272 Reported by: asomers, mmacy Reviewed by: kib (previous version) (cherry picked from commit b5770470276268acef21368b3e77a325df883500) (cherry picked from commit 8eebd9592e3daf80c2c743666614119d6c862186) --- sys/x86/x86/mca.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sys/x86/x86/mca.c b/sys/x86/x86/mca.c index 03100e77d455..801e18073a52 100644 --- a/sys/x86/x86/mca.c +++ b/sys/x86/x86/mca.c @@ -1070,6 +1070,20 @@ cmci_monitor(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* + * It is possible for some APs to report CMCI support even if the BSP + * does not, apparently due to a BIOS bug. + */ + if (cmc_state == NULL) { + if (bootverbose) { + printf( + "AP %d (%d,%d) reports CMCI support but the BSP does not\n", + PCPU_GET(cpuid), PCPU_GET(apic_id), + PCPU_GET(acpi_id)); + } + return; + } + ctl = rdmsr(MSR_MC_CTL2(i)); if (ctl & MC_CTL2_CMCI_EN) /* Already monitored by another CPU. */ @@ -1114,6 +1128,10 @@ cmci_resume(int i) KASSERT(i < mca_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid))); + /* See cmci_monitor(). */ + if (cmc_state == NULL) + return; + /* Ignore banks not monitored by this CPU. */ if (!(PCPU_GET(cmci_mask) & 1 << i)) return; From owner-dev-commits-src-all@freebsd.org Tue Feb 16 17:44:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D1EE054169B; Tue, 16 Feb 2021 17:44: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 4Dg7cx4y4dz4nBP; Tue, 16 Feb 2021 17:44: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 9232015452; Tue, 16 Feb 2021 17:44: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 11GHi1Ap041646; Tue, 16 Feb 2021 17:44:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GHi1ZJ041645; Tue, 16 Feb 2021 17:44:01 GMT (envelope-from git) Date: Tue, 16 Feb 2021 17:44:01 GMT Message-Id: <202102161744.11GHi1ZJ041645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: cc11afa865f0 - stable/13 - release: fix overriding UNAME_r MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cc11afa865f0d5ff7cb22ef0656301e6efb6b3b2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 17:44:01 -0000 The branch stable/13 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=cc11afa865f0d5ff7cb22ef0656301e6efb6b3b2 commit cc11afa865f0d5ff7cb22ef0656301e6efb6b3b2 Author: Glen Barber AuthorDate: 2021-02-11 02:23:58 +0000 Commit: Glen Barber CommitDate: 2021-02-16 17:43:01 +0000 release: fix overriding UNAME_r release.sh: fix OSVERSION and UNAME_r overrides Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup() to fix building ports for 14-CURRENT builds on 13.x. Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit c511a5ab53ba335dc85f7ac93843872eb5763602) (cherry picked from commit 6462113b7012025c2d88451c1795368ef0607deb) --- release/release.sh | 7 +++++++ release/tools/arm.subr | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/release/release.sh b/release/release.sh index 372f69177f7e..8294eaef6f00 100755 --- a/release/release.sh +++ b/release/release.sh @@ -308,7 +308,13 @@ extra_chroot_setup() { GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL" GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN" GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" eval chroot ${CHROOTDIR} env OPTIONS_UNSET=\"${GITUNSETOPTS}\" \ + ${PBUILD_FLAGS} \ make -C /usr/ports/devel/git FORCE_PKG_REGISTER=1 \ WRKDIRPREFIX=/tmp/ports \ DISTDIR=/tmp/distfiles \ @@ -345,6 +351,7 @@ extra_chroot_setup() { _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 1d4ae17d3851..343d9f3a7034 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -175,6 +175,10 @@ arm_install_base() { if [ "${PART_SCHEME}" == "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + export UNAME_r=${REVISION}-${BRANCH} eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ TARGET=${EMBEDDED_TARGET} \ TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ From owner-dev-commits-src-all@freebsd.org Tue Feb 16 18:12:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B69D5542B84 for ; Tue, 16 Feb 2021 18:12: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 4Dg8Fx0xlmz4qmt; Tue, 16 Feb 2021 18:12: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 C895715DB5; Tue, 16 Feb 2021 18:12: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 11GICand080864; Tue, 16 Feb 2021 18:12:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GICaSg080863; Tue, 16 Feb 2021 18:12:36 GMT (envelope-from git) Date: Tue, 16 Feb 2021 18:12:36 GMT Message-Id: <202102161812.11GICaSg080863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Glen Barber Subject: git: 4689ab1eab62 - releng/13.0 - release: fix overriding UNAME_r MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 4689ab1eab624d1a551a5a8f109383ea18eeba20 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 18:12:37 -0000 The branch releng/13.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=4689ab1eab624d1a551a5a8f109383ea18eeba20 commit 4689ab1eab624d1a551a5a8f109383ea18eeba20 Author: Glen Barber AuthorDate: 2021-02-11 02:23:58 +0000 Commit: Glen Barber CommitDate: 2021-02-16 18:12:07 +0000 release: fix overriding UNAME_r release.sh: fix OSVERSION and UNAME_r overrides Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup() to fix building ports for 14-CURRENT builds on 13.x. Approved by: re (kib) Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit c511a5ab53ba335dc85f7ac93843872eb5763602) (cherry picked from commit 6462113b7012025c2d88451c1795368ef0607deb) (cherry picked from commit cc11afa865f0d5ff7cb22ef0656301e6efb6b3b2) --- release/release.sh | 7 +++++++ release/tools/arm.subr | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/release/release.sh b/release/release.sh index 372f69177f7e..8294eaef6f00 100755 --- a/release/release.sh +++ b/release/release.sh @@ -308,7 +308,13 @@ extra_chroot_setup() { GITUNSETOPTS="${GITUNSETOPTS} ICONV NLS P4 PERL" GITUNSETOPTS="${GITUNSETOPTS} SEND_EMAIL SUBTREE SVN" GITUNSETOPTS="${GITUNSETOPTS} PCRE PCRE2" + PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" + PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" + PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" + PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" + PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" eval chroot ${CHROOTDIR} env OPTIONS_UNSET=\"${GITUNSETOPTS}\" \ + ${PBUILD_FLAGS} \ make -C /usr/ports/devel/git FORCE_PKG_REGISTER=1 \ WRKDIRPREFIX=/tmp/ports \ DISTDIR=/tmp/distfiles \ @@ -345,6 +351,7 @@ extra_chroot_setup() { _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + UNAME_r=${REVISION}-${BRANCH} PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 1d4ae17d3851..343d9f3a7034 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -175,6 +175,10 @@ arm_install_base() { if [ "${PART_SCHEME}" == "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi + _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) + REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) + BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) + export UNAME_r=${REVISION}-${BRANCH} eval chroot ${CHROOTDIR} make -C ${WORLDDIR} \ TARGET=${EMBEDDED_TARGET} \ TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ From owner-dev-commits-src-all@freebsd.org Tue Feb 16 19:02:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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 66B1F5440FC; Tue, 16 Feb 2021 19:02: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 4Dg9M72WLvz4vPk; Tue, 16 Feb 2021 19:02: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 49A5D169CB; Tue, 16 Feb 2021 19:02: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 11GJ2BDZ042928; Tue, 16 Feb 2021 19:02:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GJ2Bmm042927; Tue, 16 Feb 2021 19:02:11 GMT (envelope-from git) Date: Tue, 16 Feb 2021 19:02:11 GMT Message-Id: <202102161902.11GJ2Bmm042927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 922cf8ac43ad - main - Use iflib_if_init_locked() during media change instead of iflib_init_locked(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 922cf8ac43adc9983f9a9e05cfd838306c1ef483 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 19:02:11 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=922cf8ac43adc9983f9a9e05cfd838306c1ef483 commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483 Author: Allan Jude AuthorDate: 2021-02-14 18:39:09 +0000 Commit: Allan Jude CommitDate: 2021-02-16 19:02:00 +0000 Use iflib_if_init_locked() during media change instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for media changes. iflib_if_init_locked() calls stop then init, so fixes the problem. PR: 253473 MFC after: 3 days Reviewed by: markj Sponsored by: Juniper Networks, Inc., Klara, Inc. Differential Revision: https://reviews.freebsd.org/D28667 --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index cce56d0e7335..a33ddbe5b8ae 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2503,7 +2503,7 @@ iflib_media_change(if_t ifp) CTX_LOCK(ctx); if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0) - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); return (err); } From owner-dev-commits-src-all@freebsd.org Tue Feb 16 19:27:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9AC5254547E; Tue, 16 Feb 2021 19:27: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 4Dg9vy3zVMz3Cw8; Tue, 16 Feb 2021 19:27: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 7155016BDC; Tue, 16 Feb 2021 19:27: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 11GJRAVL073216; Tue, 16 Feb 2021 19:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GJRAPT073215; Tue, 16 Feb 2021 19:27:10 GMT (envelope-from git) Date: Tue, 16 Feb 2021 19:27:10 GMT Message-Id: <202102161927.11GJRAPT073215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: cc7b73065302 - main - jail: Handle a possible race between jail_remove(2) and fork(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc7b73065302005ebc4a19503188c8d6d5eb923d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 19:27:10 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=cc7b73065302005ebc4a19503188c8d6d5eb923d commit cc7b73065302005ebc4a19503188c8d6d5eb923d Author: Jamie Gritton AuthorDate: 2021-02-16 19:19:13 +0000 Commit: Jamie Gritton CommitDate: 2021-02-16 19:19:13 +0000 jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Reported by: trasz Approved by: kib MFC after: 3 days --- sys/kern/kern_fork.c | 6 ++++++ sys/kern/kern_jail.c | 24 +++++++++++++++++++++--- sys/sys/jail.h | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 5bdf5054863d..870ae494de5d 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1126,6 +1126,12 @@ fork_return(struct thread *td, struct trapframe *frame) PROC_UNLOCK(p); } + /* + * If the prison was killed mid-fork, die along with it. + */ + if (!prison_isalive(td->td_ucred->cr_prison)) + exit1(td, 0, SIGKILL); + userret(td, frame); #ifdef KTRACE diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index ece0aa33e642..b56c889eeb7e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1764,6 +1764,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; + pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; @@ -2368,6 +2369,12 @@ prison_remove_one(struct prison *pr) drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + pr->pr_flags |= PR_REMOVE; + /* If the prison was persistent, it is not anymore. */ if (pr->pr_flags & PR_PERSIST) { refcount_release(&pr->pr_ref); @@ -2508,6 +2515,17 @@ do_jail_attach(struct thread *td, struct prison *pr) #endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); + + /* + * If the prison was killed while changing credentials, die along + * with it. + */ + if (!prison_isalive(pr)) { + PROC_LOCK(p); + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + return (0); e_unlock: @@ -3038,17 +3056,18 @@ prison_ischild(struct prison *pr1, struct prison *pr2) /* * Return true if the prison is currently alive. A prison is alive if it is - * valid and it holds user references. + * valid and holds user references, and it isn't being removed. */ bool prison_isalive(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); if (__predict_false(refcount_load(&pr->pr_uref) == 0)) return (false); + if (__predict_false(pr->pr_flags & PR_REMOVE)) + return (false); return (true); } @@ -3061,7 +3080,6 @@ bool prison_isvalid(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); return (true); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 2d1a26787b99..2ac6aabdbd43 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -216,6 +216,7 @@ struct prison_racct { /* primary jail address. */ /* Internal flag bits */ +#define PR_REMOVE 0x01000000 /* In process of being removed */ #define PR_IP4 0x02000000 /* IPv4 restricted or disabled */ /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ From owner-dev-commits-src-all@freebsd.org Tue Feb 16 19:55:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8AF225472EB for ; Tue, 16 Feb 2021 19:55: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 4DgBXz3Yzqz3HMD; Tue, 16 Feb 2021 19:55: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 6D06E171F6; Tue, 16 Feb 2021 19:55: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 11GJtlld012351; Tue, 16 Feb 2021 19:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GJtlmo012350; Tue, 16 Feb 2021 19:55:47 GMT (envelope-from git) Date: Tue, 16 Feb 2021 19:55:47 GMT Message-Id: <202102161955.11GJtlmo012350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Jung-uk Kim Subject: git: 4f55bd5321b7 - vendor/openssl - Import OpenSSL 1.1.1j. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openssl X-Git-Reftype: branch X-Git-Commit: 4f55bd5321b72491d4eff396e4928e9ab0706735 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 19:55:47 -0000 The branch vendor/openssl has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=4f55bd5321b72491d4eff396e4928e9ab0706735 commit 4f55bd5321b72491d4eff396e4928e9ab0706735 Author: Jung-uk Kim AuthorDate: 2021-02-16 19:54:02 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-16 19:54:02 +0000 Import OpenSSL 1.1.1j. --- AUTHORS | 7 +++++ CHANGES | 37 ++++++++++++++++++++++++ CONTRIBUTING | 4 +-- Configure | 29 ++++++++++--------- INSTALL | 15 +++++----- NEWS | 10 +++++++ README | 2 +- apps/ca.c | 53 ++++++++++++++--------------------- crypto/aes/asm/aes-armv4.pl | 0 crypto/aes/asm/aes-c64xplus.pl | 0 crypto/aes/asm/aes-mips.pl | 0 crypto/aes/asm/aes-parisc.pl | 0 crypto/aes/asm/aes-ppc.pl | 0 crypto/aes/asm/aes-s390x.pl | 0 crypto/aes/asm/aesfx-sparcv9.pl | 0 crypto/aes/asm/aesni-mb-x86_64.pl | 0 crypto/aes/asm/aesni-sha1-x86_64.pl | 0 crypto/aes/asm/aesni-sha256-x86_64.pl | 0 crypto/aes/asm/aesni-x86.pl | 0 crypto/aes/asm/aesni-x86_64.pl | 0 crypto/aes/asm/aest4-sparcv9.pl | 0 crypto/aes/asm/bsaes-armv7.pl | 0 crypto/aes/asm/vpaes-ppc.pl | 0 crypto/aes/asm/vpaes-x86.pl | 0 crypto/aes/asm/vpaes-x86_64.pl | 0 crypto/armcap.c | 19 ++++++++++++- crypto/armv4cpuid.pl | 0 crypto/asn1/charmap.h | 2 +- crypto/bn/asm/armv4-gf2m.pl | 0 crypto/bn/asm/armv4-mont.pl | 0 crypto/bn/asm/c64xplus-gf2m.pl | 0 crypto/bn/asm/ia64-mont.pl | 0 crypto/bn/asm/mips-mont.pl | 0 crypto/bn/asm/mips.pl | 0 crypto/bn/asm/parisc-mont.pl | 0 crypto/bn/asm/ppc-mont.pl | 0 crypto/bn/asm/ppc64-mont.pl | 0 crypto/bn/asm/s390x-gf2m.pl | 0 crypto/bn/asm/s390x-mont.pl | 0 crypto/bn/asm/s390x.S | 0 crypto/bn/asm/sparcv9-gf2m.pl | 0 crypto/bn/asm/sparcv9-mont.pl | 0 crypto/bn/asm/via-mont.pl | 0 crypto/bn/asm/vis3-mont.pl | 0 crypto/bn/asm/x86-gf2m.pl | 0 crypto/bn/asm/x86_64-gf2m.pl | 0 crypto/bn/bn_const.c | 0 crypto/bn/bn_prime.h | 2 +- crypto/c64xpluscpuid.pl | 0 crypto/camellia/asm/cmll-x86.pl | 0 crypto/camellia/asm/cmll-x86_64.pl | 0 crypto/camellia/asm/cmllt4-sparcv9.pl | 0 crypto/conf/conf_def.c | 16 ++++++++++- crypto/conf/conf_def.h | 2 +- crypto/des/asm/dest4-sparcv9.pl | 0 crypto/dh/dh_key.c | 33 ++++++++++++++++++++-- crypto/ec/asm/ecp_nistz256-armv8.pl | 0 crypto/err/openssl.txt | 3 +- crypto/evp/evp_enc.c | 27 ++++++++++++++++++ crypto/evp/evp_err.c | 4 ++- crypto/md5/asm/md5-sparcv9.pl | 0 crypto/mem_sec.c | 8 +++++- crypto/modes/asm/aesni-gcm-x86_64.pl | 0 crypto/modes/asm/ghash-armv4.pl | 0 crypto/modes/asm/ghash-c64xplus.pl | 0 crypto/modes/asm/ghash-parisc.pl | 0 crypto/modes/asm/ghash-s390x.pl | 0 crypto/modes/asm/ghash-sparcv9.pl | 0 crypto/modes/asm/ghash-x86.pl | 0 crypto/modes/asm/ghash-x86_64.pl | 0 crypto/modes/asm/ghashv8-armx.pl | 0 crypto/objects/obj_dat.h | 2 +- crypto/objects/obj_xref.h | 2 +- crypto/objects/objxref.pl | 0 crypto/ocsp/ocsp_cl.c | 0 crypto/ocsp/ocsp_ext.c | 0 crypto/ocsp/ocsp_lib.c | 0 crypto/ocsp/ocsp_srv.c | 0 crypto/pariscid.pl | 0 crypto/perlasm/sparcv9_modes.pl | 0 crypto/perlasm/x86gas.pl | 0 crypto/perlasm/x86masm.pl | 0 crypto/poly1305/asm/poly1305-armv4.pl | 13 +++++---- crypto/ppccap.c | 20 ++++++++++++- crypto/rc4/asm/rc4-c64xplus.pl | 0 crypto/rc4/asm/rc4-md5-x86_64.pl | 0 crypto/rc4/asm/rc4-parisc.pl | 0 crypto/rc4/asm/rc4-s390x.pl | 0 crypto/rsa/rsa_ssl.c | 10 +++++-- crypto/sha/asm/sha1-armv4-large.pl | 0 crypto/sha/asm/sha1-armv8.pl | 0 crypto/sha/asm/sha1-c64xplus.pl | 0 crypto/sha/asm/sha1-mb-x86_64.pl | 0 crypto/sha/asm/sha1-mips.pl | 0 crypto/sha/asm/sha1-parisc.pl | 0 crypto/sha/asm/sha1-s390x.pl | 0 crypto/sha/asm/sha1-sparcv9.pl | 0 crypto/sha/asm/sha1-sparcv9a.pl | 0 crypto/sha/asm/sha1-thumb.pl | 0 crypto/sha/asm/sha256-586.pl | 0 crypto/sha/asm/sha256-armv4.pl | 0 crypto/sha/asm/sha256-c64xplus.pl | 0 crypto/sha/asm/sha256-mb-x86_64.pl | 0 crypto/sha/asm/sha512-586.pl | 0 crypto/sha/asm/sha512-armv4.pl | 0 crypto/sha/asm/sha512-armv8.pl | 0 crypto/sha/asm/sha512-c64xplus.pl | 0 crypto/sha/asm/sha512-mips.pl | 0 crypto/sha/asm/sha512-s390x.pl | 0 crypto/sha/asm/sha512-sparcv9.pl | 0 crypto/srp/srp_lib.c | 13 ++++++--- crypto/vms_rms.h | 0 crypto/whrlpool/asm/wp-mmx.pl | 0 crypto/whrlpool/asm/wp-x86_64.pl | 0 crypto/x509/x509_cmp.c | 24 +++++++++------- crypto/x509/x509_vfy.c | 15 ++++------ crypto/x509/x_all.c | 4 +-- crypto/x509/x_attrib.c | 5 +++- crypto/x509v3/v3_purp.c | 14 +++++---- doc/man1/ca.pod | 4 +-- doc/man1/cms.pod | 4 +-- doc/man1/crl2pkcs7.pod | 4 +-- doc/man1/dgst.pod | 4 +-- doc/man1/dsa.pod | 6 ++-- doc/man1/ec.pod | 6 ++-- doc/man1/enc.pod | 4 +-- doc/man1/genpkey.pod | 4 +-- doc/man1/genrsa.pod | 4 +-- doc/man1/pkcs12.pod | 14 ++++----- doc/man1/pkcs8.pod | 6 ++-- doc/man1/pkey.pod | 6 ++-- doc/man1/pkeyutl.pod | 4 +-- doc/man1/req.pod | 6 ++-- doc/man1/rsa.pod | 6 ++-- doc/man1/s_client.pod | 4 +-- doc/man1/s_server.pod | 4 +-- doc/man1/smime.pod | 4 +-- doc/man1/spkac.pod | 4 +-- doc/man1/storeutl.pod | 4 +-- doc/man1/ts.pod | 4 +-- doc/man1/x509.pod | 4 +-- doc/man3/DH_generate_key.pod | 27 ++++++++++++++---- doc/man3/OCSP_sendreq_new.pod | 28 ++++++++++++++---- doc/man3/OPENSSL_malloc.pod | 2 +- doc/man3/X509_get_extension_flags.pod | 11 ++++++-- engines/asm/e_padlock-x86.pl | 0 engines/asm/e_padlock-x86_64.pl | 0 include/openssl/evperr.h | 7 ++--- include/openssl/obj_mac.h | 2 +- include/openssl/opensslv.h | 4 +-- include/openssl/x509v3.h | 7 +++-- ssl/d1_lib.c | 11 ++++---- ssl/record/rec_layer_d1.c | 5 +++- ssl/ssl_local.h | 3 +- ssl/statem/extensions.c | 5 ++-- ssl/statem/statem_clnt.c | 3 +- ssl/statem/statem_lib.c | 15 ++++++++-- 157 files changed, 433 insertions(+), 202 deletions(-) diff --git a/AUTHORS b/AUTHORS index ac93b2e7b975..dac46f8b7e08 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,6 +13,8 @@ Ben Kaduk Bernd Edlinger Bodo Möller David Benjamin +David von Oheimb +Dmitry Belyavskiy (Дмитрий Белявский) Emilia Käsper Eric Young Geoff Thorpe @@ -22,14 +24,19 @@ Lutz Jänicke Mark J. Cox Matt Caswell Matthias St. Pierre +Nicola Tuveri Nils Larsch +Patrick Steuer Paul Dale Paul C. Sutton +Paul Yang Ralf S. Engelschall Rich Salz Richard Levitte +Shane Lontis Stephen Henson Steve Marquess Tim Hudson +Tomáš Mráz Ulf Möller Viktor Dukhovni diff --git a/CHANGES b/CHANGES index 37dd60b726ee..1ab64b35c9a4 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,43 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1i and 1.1.1j [16 Feb 2021] + + *) Fixed the X509_issuer_and_serial_hash() function. It attempts to + create a unique hash value based on the issuer and serial number data + contained within an X509 certificate. However it was failing to correctly + handle any errors that may occur while parsing the issuer field (which might + occur if the issuer field is maliciously constructed). This may subsequently + result in a NULL pointer deref and a crash leading to a potential denial of + service attack. + (CVE-2021-23841) + [Matt Caswell] + + *) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks. This is considered a + bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is + CVE-2021-23839. + [Matt Caswell] + + *) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate + functions. Previously they could overflow the output length argument in some + cases where the input length is close to the maximum permissable length for + an integer on the platform. In such cases the return value from the function + call would be 1 (indicating success), but the output length value would be + negative. This could cause applications to behave incorrectly or crash. + (CVE-2021-23840) + [Matt Caswell] + + *) Fixed SRP_Calc_client_key so that it runs in constant time. The previous + implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This + could be exploited in a side channel attack to recover the password. Since + the attack is local host only this is outside of the current OpenSSL + threat model and therefore no CVE is assigned. + + Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this + issue. + [Matt Caswell] + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function diff --git a/CONTRIBUTING b/CONTRIBUTING index 57be75ce2b8a..83c0dde12819 100644 --- a/CONTRIBUTING +++ b/CONTRIBUTING @@ -41,8 +41,8 @@ guidelines: https://www.openssl.org/policies/codingstyle.html) and compile without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. Clean builds - via Travis and AppVeyor are required, and they are started automatically + platforms: try to ensure you only use portable features. Clean builds via + GitHub Actions and AppVeyor are required, and they are started automatically whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can diff --git a/Configure b/Configure index 1d73d06e1b3b..b286dd0678bb 100755 --- a/Configure +++ b/Configure @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: perl; -*- -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -1201,6 +1201,10 @@ foreach (keys %useradd) { # At this point, we can forget everything about %user and %useradd, # because it's now all been merged into the corresponding $config entry +if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { + disable('static', 'pic', 'threads'); +} + # Allow overriding the build file name $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile"; @@ -1521,10 +1525,6 @@ if ($strict_warnings) } } -if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { - disable('static', 'pic', 'threads'); -} - $config{CFLAGS} = [ map { $_ eq '--ossl-strict-warnings' ? @strict_warnings_collection : ( $_ ) } @@ -2611,19 +2611,22 @@ _____ } print "\nEnabled features:\n\n"; foreach my $what (@disablables) { - print " $what\n" unless $disabled{$what}; + print " $what\n" + unless grep { $_ =~ /^${what}$/ } keys %disabled; } print "\nDisabled features:\n\n"; foreach my $what (@disablables) { - if ($disabled{$what}) { - print " $what", ' ' x ($longest - length($what) + 1), - "[$disabled{$what}]", ' ' x ($longest2 - length($disabled{$what}) + 1); - print $disabled_info{$what}->{macro} - if $disabled_info{$what}->{macro}; + my @what2 = grep { $_ =~ /^${what}$/ } keys %disabled; + my $what3 = $what2[0]; + if ($what3) { + print " $what3", ' ' x ($longest - length($what3) + 1), + "[$disabled{$what3}]", ' ' x ($longest2 - length($disabled{$what3}) + 1); + print $disabled_info{$what3}->{macro} + if $disabled_info{$what3}->{macro}; print ' (skip ', - join(', ', @{$disabled_info{$what}->{skipped}}), + join(', ', @{$disabled_info{$what3}->{skipped}}), ')' - if $disabled_info{$what}->{skipped}; + if $disabled_info{$what3}->{skipped}; print "\n"; } } diff --git a/INSTALL b/INSTALL index f5118428b3bc..f3ac727183f0 100644 --- a/INSTALL +++ b/INSTALL @@ -106,8 +106,7 @@ This will build and install OpenSSL in the default location, which is: Unix: normal installation directories under /usr/local - OpenVMS: SYS$COMMON:[OPENSSL-'version'...], where 'version' is the - OpenSSL version number with underscores instead of periods. + OpenVMS: SYS$COMMON:[OPENSSL] Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL The installation directory should be appropriately protected to ensure @@ -116,7 +115,9 @@ your Operating System it is recommended that you do not overwrite the system version and instead install to somewhere else. - If you want to install it anywhere else, run config like this: + If you want to install it anywhere else, run config like this (the options + --prefix and --openssldir are explained further down, and the values shown + here are mere examples): On Unix: @@ -198,7 +199,7 @@ Unix: /usr/local Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL - OpenVMS: SYS$COMMON:[OPENSSL-'version'] + OpenVMS: SYS$COMMON:[OPENSSL] --release Build OpenSSL without debugging symbols. This is the default. @@ -961,9 +962,9 @@ share/doc/openssl/html/man7 Contains the HTML rendition of the man-pages. - OpenVMS ('arch' is replaced with the architecture name, "Alpha" - or "ia64", 'sover' is replaced with the shared library version - (0101 for 1.1), and 'pz' is replaced with the pointer size + OpenVMS ('arch' is replaced with the architecture name, "ALPHA" + or "IA64", 'sover' is replaced with the shared library version + (0101 for 1.1.x), and 'pz' is replaced with the pointer size OpenSSL was built with): [.EXE.'arch'] Contains the openssl binary. diff --git a/NEWS b/NEWS index 98f6791a8b79..3cce52506645 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,16 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021] + + o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash() + function (CVE-2021-23841) + o Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks + o Fixed an overflow in the EVP_CipherUpdate, EVP_EncryptUpdate and + EVP_DecryptUpdate functions (CVE-2021-23840) + o Fixed SRP_Calc_client_key so that it runs in constant time + Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020] o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971) diff --git a/README b/README index 6325127b5693..da5629f92c81 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1i 8 Dec 2020 + OpenSSL 1.1.1j 16 Feb 2021 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/apps/ca.c b/apps/ca.c old mode 100644 new mode 100755 index 6c9b1e57bc67..390ac37493c8 --- a/apps/ca.c +++ b/apps/ca.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -2223,62 +2223,51 @@ static int get_certificate_status(const char *serial, CA_DB *db) static int do_updatedb(CA_DB *db) { - ASN1_UTCTIME *a_tm = NULL; + ASN1_TIME *a_tm = NULL; int i, cnt = 0; - int db_y2k, a_y2k; /* flags = 1 if y >= 2000 */ - char **rrow, *a_tm_s; + char **rrow; - a_tm = ASN1_UTCTIME_new(); + a_tm = ASN1_TIME_new(); if (a_tm == NULL) return -1; - /* get actual time and make a string */ + /* get actual time */ if (X509_gmtime_adj(a_tm, 0) == NULL) { - ASN1_UTCTIME_free(a_tm); + ASN1_TIME_free(a_tm); return -1; } - a_tm_s = app_malloc(a_tm->length + 1, "time string"); - - memcpy(a_tm_s, a_tm->data, a_tm->length); - a_tm_s[a_tm->length] = '\0'; - - if (strncmp(a_tm_s, "49", 2) <= 0) - a_y2k = 1; - else - a_y2k = 0; for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { rrow = sk_OPENSSL_PSTRING_value(db->db->data, i); if (rrow[DB_type][0] == DB_TYPE_VAL) { /* ignore entries that are not valid */ - if (strncmp(rrow[DB_exp_date], "49", 2) <= 0) - db_y2k = 1; - else - db_y2k = 0; + ASN1_TIME *exp_date = NULL; - if (db_y2k == a_y2k) { - /* all on the same y2k side */ - if (strcmp(rrow[DB_exp_date], a_tm_s) <= 0) { - rrow[DB_type][0] = DB_TYPE_EXP; - rrow[DB_type][1] = '\0'; - cnt++; + exp_date = ASN1_TIME_new(); + if (exp_date == NULL) { + ASN1_TIME_free(a_tm); + return -1; + } - BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); - } - } else if (db_y2k < a_y2k) { + if (!ASN1_TIME_set_string(exp_date, rrow[DB_exp_date])) { + ASN1_TIME_free(a_tm); + ASN1_TIME_free(exp_date); + return -1; + } + + if (ASN1_TIME_compare(exp_date, a_tm) <= 0) { rrow[DB_type][0] = DB_TYPE_EXP; rrow[DB_type][1] = '\0'; cnt++; BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); } - + ASN1_TIME_free(exp_date); } } - ASN1_UTCTIME_free(a_tm); - OPENSSL_free(a_tm_s); + ASN1_TIME_free(a_tm); return cnt; } diff --git a/crypto/aes/asm/aes-armv4.pl b/crypto/aes/asm/aes-armv4.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aes-c64xplus.pl b/crypto/aes/asm/aes-c64xplus.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aes-mips.pl b/crypto/aes/asm/aes-mips.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aes-parisc.pl b/crypto/aes/asm/aes-parisc.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aes-ppc.pl b/crypto/aes/asm/aes-ppc.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aes-s390x.pl b/crypto/aes/asm/aes-s390x.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesfx-sparcv9.pl b/crypto/aes/asm/aesfx-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesni-mb-x86_64.pl b/crypto/aes/asm/aesni-mb-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesni-sha1-x86_64.pl b/crypto/aes/asm/aesni-sha1-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesni-sha256-x86_64.pl b/crypto/aes/asm/aesni-sha256-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesni-x86.pl b/crypto/aes/asm/aesni-x86.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aesni-x86_64.pl b/crypto/aes/asm/aesni-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/aest4-sparcv9.pl b/crypto/aes/asm/aest4-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/bsaes-armv7.pl b/crypto/aes/asm/bsaes-armv7.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/vpaes-ppc.pl b/crypto/aes/asm/vpaes-ppc.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/vpaes-x86.pl b/crypto/aes/asm/vpaes-x86.pl old mode 100755 new mode 100644 diff --git a/crypto/aes/asm/vpaes-x86_64.pl b/crypto/aes/asm/vpaes-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/armcap.c b/crypto/armcap.c index 58e54f0da2e1..8bf96f10214f 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -69,6 +69,23 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # define OSSL_IMPLEMENT_GETAUXVAL # endif # endif +# if defined(__FreeBSD__) +# include +# if __FreeBSD_version >= 1200000 +# include +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif +# endif /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas diff --git a/crypto/armv4cpuid.pl b/crypto/armv4cpuid.pl old mode 100755 new mode 100644 diff --git a/crypto/asn1/charmap.h b/crypto/asn1/charmap.h index cac354c6bf33..e234c9e615d0 100644 --- a/crypto/asn1/charmap.h +++ b/crypto/asn1/charmap.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/asn1/charmap.pl * - * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/bn/asm/armv4-gf2m.pl b/crypto/bn/asm/armv4-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/armv4-mont.pl b/crypto/bn/asm/armv4-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/c64xplus-gf2m.pl b/crypto/bn/asm/c64xplus-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/ia64-mont.pl b/crypto/bn/asm/ia64-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/mips-mont.pl b/crypto/bn/asm/mips-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/mips.pl b/crypto/bn/asm/mips.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/parisc-mont.pl b/crypto/bn/asm/parisc-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/ppc-mont.pl b/crypto/bn/asm/ppc-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/ppc64-mont.pl b/crypto/bn/asm/ppc64-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/s390x-gf2m.pl b/crypto/bn/asm/s390x-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/s390x-mont.pl b/crypto/bn/asm/s390x-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/s390x.S b/crypto/bn/asm/s390x.S old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/sparcv9-gf2m.pl b/crypto/bn/asm/sparcv9-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/sparcv9-mont.pl b/crypto/bn/asm/sparcv9-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/via-mont.pl b/crypto/bn/asm/via-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/vis3-mont.pl b/crypto/bn/asm/vis3-mont.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/x86-gf2m.pl b/crypto/bn/asm/x86-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/asm/x86_64-gf2m.pl b/crypto/bn/asm/x86_64-gf2m.pl old mode 100755 new mode 100644 diff --git a/crypto/bn/bn_const.c b/crypto/bn/bn_const.c old mode 100755 new mode 100644 diff --git a/crypto/bn/bn_prime.h b/crypto/bn/bn_prime.h index ba48244534b0..1a25c285773a 100644 --- a/crypto/bn/bn_prime.h +++ b/crypto/bn/bn_prime.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/bn/bn_prime.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/c64xpluscpuid.pl b/crypto/c64xpluscpuid.pl old mode 100755 new mode 100644 diff --git a/crypto/camellia/asm/cmll-x86.pl b/crypto/camellia/asm/cmll-x86.pl old mode 100755 new mode 100644 diff --git a/crypto/camellia/asm/cmll-x86_64.pl b/crypto/camellia/asm/cmll-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/camellia/asm/cmllt4-sparcv9.pl b/crypto/camellia/asm/cmllt4-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index 3d710f12ae07..31c02cc49e22 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -185,6 +185,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BUF_MEM *buff = NULL; char *s, *p, *end; int again; + int first_call = 1; long eline = 0; char btmp[DECIMAL_SIZE(eline) + 1]; CONF_VALUE *v = NULL, *tv; @@ -233,6 +234,19 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BIO_gets(in, p, CONFBUFSIZE - 1); p[CONFBUFSIZE - 1] = '\0'; ii = i = strlen(p); + if (first_call) { + /* Other BOMs imply unsupported multibyte encoding, + * so don't strip them and let the error raise */ + const unsigned char utf8_bom[3] = {0xEF, 0xBB, 0xBF}; + + if (i >= 3 && memcmp(p, utf8_bom, 3) == 0) { + memmove(p, p + 3, i - 3); + p[i - 3] = 0; + i -= 3; + ii -= 3; + } + first_call = 0; + } if (i == 0 && !again) { /* the currently processed BIO is at EOF */ BIO *parent; diff --git a/crypto/conf/conf_def.h b/crypto/conf/conf_def.h index 2ced300e40d6..1e4a03e10bbd 100644 --- a/crypto/conf/conf_def.h +++ b/crypto/conf/conf_def.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/conf/keysets.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/des/asm/dest4-sparcv9.pl b/crypto/des/asm/dest4-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/dh/dh_key.c b/crypto/dh/dh_key.c index daffdf74dd37..117f2fa883ff 100644 --- a/crypto/dh/dh_key.c +++ b/crypto/dh/dh_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -25,18 +25,45 @@ int DH_generate_key(DH *dh) return dh->meth->generate_key(dh); } +/*- + * NB: This function is inherently not constant time due to the + * RFC 5246 (8.1.2) padding style that strips leading zero bytes. + */ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { - return dh->meth->compute_key(key, pub_key, dh); + int ret = 0, i; + volatile size_t npad = 0, mask = 1; + + /* compute the key; ret is constant unless compute_key is external */ + if ((ret = dh->meth->compute_key(key, pub_key, dh)) <= 0) + return ret; + + /* count leading zero bytes, yet still touch all bytes */ + for (i = 0; i < ret; i++) { + mask &= !key[i]; + npad += mask; + } + + /* unpad key */ + ret -= npad; + /* key-dependent memory access, potentially leaking npad / ret */ + memmove(key, key + npad, ret); + /* key-dependent memory access, potentially leaking npad / ret */ + memset(key + ret, 0, npad); + + return ret; } int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) { int rv, pad; + + /* rv is constant unless compute_key is external */ rv = dh->meth->compute_key(key, pub_key, dh); if (rv <= 0) return rv; pad = BN_num_bytes(dh->p) - rv; + /* pad is constant (zero) unless compute_key is external */ if (pad > 0) { memmove(key + pad, key, rv); memset(key, 0, pad); @@ -212,7 +239,7 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) goto err; } - ret = BN_bn2bin(tmp, key); + ret = BN_bn2binpad(tmp, key, BN_num_bytes(dh->p)); err: BN_CTX_end(ctx); BN_CTX_free(ctx); diff --git a/crypto/ec/asm/ecp_nistz256-armv8.pl b/crypto/ec/asm/ecp_nistz256-armv8.pl old mode 100755 new mode 100644 diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 815460b24f67..7e1776375df7 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -2283,6 +2283,7 @@ EVP_R_ONLY_ONESHOT_SUPPORTED:177:only oneshot supported EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE:150:\ operation not supported for this keytype EVP_R_OPERATON_NOT_INITIALIZED:151:operaton not initialized +EVP_R_OUTPUT_WOULD_OVERFLOW:184:output would overflow EVP_R_PARTIALLY_OVERLAPPING:162:partially overlapping buffers EVP_R_PBKDF2_ERROR:181:pbkdf2 error EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED:179:\ diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index b9b6490fe069..0843caf4f0a4 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include "internal/cryptlib.h" #include @@ -355,6 +356,19 @@ static int evp_EncryptDecryptUpdate(EVP_CIPHER_CTX *ctx, return 1; } else { j = bl - i; + + /* + * Once we've processed the first j bytes from in, the amount of + * data left that is a multiple of the block length is: + * (inl - j) & ~(bl - 1) + * We must ensure that this amount of data, plus the one block that + * we process from ctx->buf does not exceed INT_MAX + */ + if (((inl - j) & ~(bl - 1)) > INT_MAX - bl) { + EVPerr(EVP_F_EVP_ENCRYPTDECRYPTUPDATE, + EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(&(ctx->buf[i]), in, j); inl -= j; in += j; @@ -502,6 +516,19 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING); return 0; } + /* + * final_used is only ever set if buf_len is 0. Therefore the maximum + * length output we will ever see from evp_EncryptDecryptUpdate is + * the maximum multiple of the block length that is <= inl, or just: + * inl & ~(b - 1) + * Since final_used has been set then the final output length is: + * (inl & ~(b - 1)) + b + * This must never exceed INT_MAX + */ + if ((inl & ~(b - 1)) > INT_MAX - b) { + EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(out, ctx->final, b); out += b; fix_len = 1; diff --git a/crypto/evp/evp_err.c b/crypto/evp/evp_err.c index 05481d827fb4..32ac0125de24 100644 --- a/crypto/evp/evp_err.c +++ b/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -239,6 +239,8 @@ static const ERR_STRING_DATA EVP_str_reasons[] = { "operation not supported for this keytype"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"}, + {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OUTPUT_WOULD_OVERFLOW), + "output would overflow"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PARTIALLY_OVERLAPPING), "partially overlapping buffers"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PBKDF2_ERROR), "pbkdf2 error"}, diff --git a/crypto/md5/asm/md5-sparcv9.pl b/crypto/md5/asm/md5-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c index b5f959ba15d5..222c786cbaef 100644 --- a/crypto/mem_sec.c +++ b/crypto/mem_sec.c @@ -34,6 +34,12 @@ # include # endif # endif +# if defined(__FreeBSD__) +# define MADV_DONTDUMP MADV_NOCORE +# endif +# if !defined(MAP_CONCEAL) +# define MAP_CONCEAL 0 +# endif # include # include # include @@ -442,7 +448,7 @@ static int sh_init(size_t size, int minsize) if (1) { #ifdef MAP_ANON sh.map_result = mmap(NULL, sh.map_size, - PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_CONCEAL, -1, 0); } else { #endif int fd; diff --git a/crypto/modes/asm/aesni-gcm-x86_64.pl b/crypto/modes/asm/aesni-gcm-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-c64xplus.pl b/crypto/modes/asm/ghash-c64xplus.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-parisc.pl b/crypto/modes/asm/ghash-parisc.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-s390x.pl b/crypto/modes/asm/ghash-s390x.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-sparcv9.pl b/crypto/modes/asm/ghash-sparcv9.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-x86.pl b/crypto/modes/asm/ghash-x86.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghash-x86_64.pl b/crypto/modes/asm/ghash-x86_64.pl old mode 100755 new mode 100644 diff --git a/crypto/modes/asm/ghashv8-armx.pl b/crypto/modes/asm/ghashv8-armx.pl old mode 100755 new mode 100644 diff --git a/crypto/objects/obj_dat.h b/crypto/objects/obj_dat.h index d1b1bc7faf91..24b49a2df258 100644 --- a/crypto/objects/obj_dat.h +++ b/crypto/objects/obj_dat.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/objects/obj_dat.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/objects/obj_xref.h b/crypto/objects/obj_xref.h index 1ca04bbff19f..5c3561ab7d7e 100644 --- a/crypto/objects/obj_xref.h +++ b/crypto/objects/obj_xref.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by objxref.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * *** 1418 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 19:57:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 52D8B54742A for ; Tue, 16 Feb 2021 19:57: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 4DgBbR1t8Xz3HQw; Tue, 16 Feb 2021 19:57: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 3322917707; Tue, 16 Feb 2021 19:57: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 11GJvtcu012753; Tue, 16 Feb 2021 19:57:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GJvtMa012752; Tue, 16 Feb 2021 19:57:55 GMT (envelope-from git) Date: Tue, 16 Feb 2021 19:57:55 GMT Message-Id: <202102161957.11GJvtMa012752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Jung-uk Kim Subject: git: 794de4ca1cb1 - Create tag vendor/openssl/1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/openssl/1.1.1j X-Git-Reftype: annotated tag X-Git-Commit: 794de4ca1cb165f920ae002de53b0cb64561242d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 19:57:55 -0000 The annotated tag vendor/openssl/1.1.1j has been created by jkim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/openssl/1.1.1j tag vendor/openssl/1.1.1j Tagger: Jung-uk Kim TaggerDate: 2021-02-16 19:57:14 +0000 Tag OpenSSL 1.1.1j. commit 4f55bd5321b72491d4eff396e4928e9ab0706735 Author: Jung-uk Kim AuthorDate: 2021-02-16 19:54:02 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-16 19:54:02 +0000 Import OpenSSL 1.1.1j. From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:04:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 08492547374; Tue, 16 Feb 2021 20:04: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 4DgBkW6nkDz3JKH; Tue, 16 Feb 2021 20:04: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 DC71917824; Tue, 16 Feb 2021 20:04: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 11GK43jq025266; Tue, 16 Feb 2021 20:04:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GK43PI025265; Tue, 16 Feb 2021 20:04:03 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:04:03 GMT Message-Id: <202102162004.11GK43PI025265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 9fdbf7eef5c0 - main - Make in_localip_more() fib-aware. 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/main X-Git-Reftype: branch X-Git-Commit: 9fdbf7eef5c006002769add15b1ebb8fa8d9e220 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:04:04 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=9fdbf7eef5c006002769add15b1ebb8fa8d9e220 commit 9fdbf7eef5c006002769add15b1ebb8fa8d9e220 Author: Alexander V. Chernikov AuthorDate: 2021-02-16 20:00:46 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-16 20:00:46 +0000 Make in_localip_more() fib-aware. It fixes loopback route installation for the interfaces in the different fibs using the same prefix. Reviewed By: donner PR: 189088 Differential Revision: https://reviews.freebsd.org/D28673 MFC after: 1 week --- sys/netinet/in.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/netinet/in.c b/sys/netinet/in.c index eb58c3453cfc..bcf071a81e0e 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -163,18 +163,23 @@ in_ifhasaddr(struct ifnet *ifp, struct in_addr in) * the supplied one but with same IP address value. */ static struct in_ifaddr * -in_localip_more(struct in_ifaddr *ia) +in_localip_more(struct in_ifaddr *original_ia) { struct rm_priotracker in_ifa_tracker; - in_addr_t in = IA_SIN(ia)->sin_addr.s_addr; - struct in_ifaddr *it; + in_addr_t original_addr = IA_SIN(original_ia)->sin_addr.s_addr; + uint32_t original_fib = original_ia->ia_ifa.ifa_ifp->if_fib; + struct in_ifaddr *ia; IN_IFADDR_RLOCK(&in_ifa_tracker); - LIST_FOREACH(it, INADDR_HASH(in), ia_hash) { - if (it != ia && IA_SIN(it)->sin_addr.s_addr == in) { - ifa_ref(&it->ia_ifa); + LIST_FOREACH(ia, INADDR_HASH(original_addr), ia_hash) { + in_addr_t addr = IA_SIN(ia)->sin_addr.s_addr; + uint32_t fib = ia->ia_ifa.ifa_ifp->if_fib; + if (!V_rt_add_addr_allfibs && (original_fib != fib)) + continue; + if ((original_ia != ia) && (original_addr == addr)) { + ifa_ref(&ia->ia_ifa); IN_IFADDR_RUNLOCK(&in_ifa_tracker); - return (it); + return (ia); } } IN_IFADDR_RUNLOCK(&in_ifa_tracker); @@ -1007,11 +1012,6 @@ in_scrubprefix(struct in_ifaddr *target, u_int flags) if (ia_need_loopback_route(target) && (flags & LLE_STATIC)) { struct in_ifaddr *eia; - /* - * XXXME: add fib-aware in_localip. - * We definitely don't want to switch between - * prefixes in different fibs. - */ eia = in_localip_more(target); if (eia != NULL) { From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:18:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 426C25482E4 for ; Tue, 16 Feb 2021 20: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 4DgC390P85z3Kq6; Tue, 16 Feb 2021 20: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 003521785E; Tue, 16 Feb 2021 20: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 11GKISBu038911; Tue, 16 Feb 2021 20:18:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKIGUT038889; Tue, 16 Feb 2021 20:18:16 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:18:16 GMT Message-Id: <202102162018.11GKIGUT038889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: b60736ec1405 - vendor/llvm-project/main - Vendor import of llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. 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/vendor/llvm-project/main X-Git-Reftype: branch X-Git-Commit: b60736ec1405bb0a8dd40989f67ef4c93da068ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:18:29 -0000 The branch vendor/llvm-project/main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b60736ec1405bb0a8dd40989f67ef4c93da068ab commit b60736ec1405bb0a8dd40989f67ef4c93da068ab Author: Dimitry Andric AuthorDate: 2021-02-16 20:13:02 +0000 Commit: Dimitry Andric CommitDate: 2021-02-16 20:13:02 +0000 Vendor import of llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. --- clang/include/clang-c/Index.h | 88 +- clang/include/clang-c/Rewrite.h | 63 + .../include/clang/APINotes/APINotesYAMLCompiler.h | 24 + clang/include/clang/APINotes/Types.h | 734 +++ clang/include/clang/ARCMigrate/FileRemapper.h | 8 + clang/include/clang/AST/APValue.h | 163 +- clang/include/clang/AST/ASTContext.h | 153 +- clang/include/clang/AST/ASTFwd.h | 6 +- clang/include/clang/AST/ASTImporter.h | 8 + clang/include/clang/AST/ASTNodeTraverser.h | 72 +- clang/include/clang/AST/ASTStructuralEquivalence.h | 7 + clang/include/clang/AST/ASTTypeTraits.h | 74 +- clang/include/clang/AST/AbstractBasicReader.h | 34 + clang/include/clang/AST/AbstractBasicWriter.h | 35 + clang/include/clang/AST/Attr.h | 39 +- clang/include/clang/AST/CXXInheritance.h | 10 - .../clang/AST/CXXRecordDeclDefinitionBits.def | 7 + clang/include/clang/AST/CanonicalType.h | 4 +- clang/include/clang/AST/CommentLexer.h | 31 +- clang/include/clang/AST/ComputeDependence.h | 4 +- clang/include/clang/AST/Decl.h | 134 +- clang/include/clang/AST/DeclBase.h | 3 +- clang/include/clang/AST/DeclCXX.h | 96 +- clang/include/clang/AST/DeclObjC.h | 45 +- clang/include/clang/AST/DeclOpenMP.h | 246 +- clang/include/clang/AST/DeclTemplate.h | 117 +- clang/include/clang/AST/DeclarationName.h | 23 +- clang/include/clang/AST/DependenceFlags.h | 1 + clang/include/clang/AST/DependentDiagnostic.h | 10 +- clang/include/clang/AST/Expr.h | 402 +- clang/include/clang/AST/ExprCXX.h | 297 +- clang/include/clang/AST/ExprConcepts.h | 6 +- clang/include/clang/AST/ExprObjC.h | 4 +- clang/include/clang/AST/ExternalASTSource.h | 4 - clang/include/clang/AST/GlobalDecl.h | 1 + clang/include/clang/AST/IgnoreExpr.h | 161 + clang/include/clang/AST/Mangle.h | 17 +- clang/include/clang/AST/NestedNameSpecifier.h | 34 +- clang/include/clang/AST/OpenMPClause.h | 494 +- clang/include/clang/AST/OperationKinds.def | 11 +- clang/include/clang/AST/OptionalDiagnostic.h | 2 +- clang/include/clang/AST/ParentMap.h | 4 +- clang/include/clang/AST/ParentMapContext.h | 13 +- clang/include/clang/AST/PrettyPrinter.h | 40 +- clang/include/clang/AST/PropertiesBase.td | 308 ++ clang/include/clang/AST/RecordLayout.h | 65 +- clang/include/clang/AST/RecursiveASTVisitor.h | 56 +- clang/include/clang/AST/Redeclarable.h | 15 + clang/include/clang/AST/Stmt.h | 60 +- clang/include/clang/AST/StmtIterator.h | 9 +- clang/include/clang/AST/StmtOpenMP.h | 1653 +++--- clang/include/clang/AST/TemplateBase.h | 72 +- clang/include/clang/AST/TemplateName.h | 6 +- clang/include/clang/AST/TextNodeDumper.h | 3 + clang/include/clang/AST/Type.h | 208 +- clang/include/clang/AST/TypeLoc.h | 93 +- clang/include/clang/AST/TypeProperties.td | 15 +- clang/include/clang/ASTMatchers/ASTMatchFinder.h | 4 + clang/include/clang/ASTMatchers/ASTMatchers.h | 574 ++- .../clang/ASTMatchers/ASTMatchersInternal.h | 996 ++-- .../include/clang/ASTMatchers/ASTMatchersMacros.h | 58 +- .../clang/ASTMatchers/Dynamic/VariantValue.h | 40 +- .../clang/Analysis/Analyses/CalledOnceCheck.h | 112 + clang/include/clang/Analysis/Analyses/Dominators.h | 70 - .../clang/Analysis/Analyses/LiveVariables.h | 18 +- .../include/clang/Analysis/Analyses/ThreadSafety.h | 8 + .../clang/Analysis/Analyses/ThreadSafetyTIL.h | 4 +- clang/include/clang/Analysis/CallGraph.h | 4 +- clang/include/clang/Analysis/IssueHash.h | 49 + clang/include/clang/Analysis/PathDiagnostic.h | 39 + clang/include/clang/Basic/AddressSpaces.h | 2 + clang/include/clang/Basic/AlignedAllocation.h | 2 + clang/include/clang/Basic/Attr.td | 296 +- clang/include/clang/Basic/AttrDocs.td | 1124 ++++- clang/include/clang/Basic/Builtins.def | 85 +- clang/include/clang/Basic/Builtins.h | 7 + clang/include/clang/Basic/BuiltinsAArch64.def | 11 + clang/include/clang/Basic/BuiltinsAMDGPU.def | 6 + clang/include/clang/Basic/BuiltinsBPF.def | 8 +- clang/include/clang/Basic/BuiltinsNVPTX.def | 2 +- clang/include/clang/Basic/BuiltinsPPC.def | 236 +- clang/include/clang/Basic/BuiltinsWebAssembly.def | 136 +- clang/include/clang/Basic/BuiltinsX86.def | 51 +- clang/include/clang/Basic/BuiltinsX86_64.def | 11 + clang/include/clang/Basic/CodeGenOptions.def | 50 +- clang/include/clang/Basic/CodeGenOptions.h | 46 +- clang/include/clang/Basic/Cuda.h | 8 + clang/include/clang/Basic/DebugInfoOptions.h | 6 +- clang/include/clang/Basic/DeclNodes.td | 1 + clang/include/clang/Basic/Diagnostic.h | 408 +- clang/include/clang/Basic/Diagnostic.td | 10 + clang/include/clang/Basic/DiagnosticAST.h | 2 +- clang/include/clang/Basic/DiagnosticASTKinds.td | 11 +- clang/include/clang/Basic/DiagnosticAnalysis.h | 2 +- clang/include/clang/Basic/DiagnosticComment.h | 2 +- clang/include/clang/Basic/DiagnosticCommonKinds.td | 6 + clang/include/clang/Basic/DiagnosticCrossTU.h | 2 +- clang/include/clang/Basic/DiagnosticDriver.h | 2 +- clang/include/clang/Basic/DiagnosticDriverKinds.td | 41 +- clang/include/clang/Basic/DiagnosticFrontend.h | 2 +- .../include/clang/Basic/DiagnosticFrontendKinds.td | 22 +- clang/include/clang/Basic/DiagnosticGroups.td | 46 +- clang/include/clang/Basic/DiagnosticIDs.h | 12 +- clang/include/clang/Basic/DiagnosticLex.h | 2 +- clang/include/clang/Basic/DiagnosticLexKinds.td | 9 +- clang/include/clang/Basic/DiagnosticOptions.def | 1 + clang/include/clang/Basic/DiagnosticOptions.h | 12 + clang/include/clang/Basic/DiagnosticParse.h | 2 +- clang/include/clang/Basic/DiagnosticParseKinds.td | 86 +- clang/include/clang/Basic/DiagnosticRefactoring.h | 2 +- clang/include/clang/Basic/DiagnosticSema.h | 2 +- clang/include/clang/Basic/DiagnosticSemaKinds.td | 393 +- .../include/clang/Basic/DiagnosticSerialization.h | 2 +- .../clang/Basic/DiagnosticSerializationKinds.td | 19 +- clang/include/clang/Basic/DirectoryEntry.h | 298 ++ clang/include/clang/Basic/FPOptions.def | 4 +- clang/include/clang/Basic/Features.def | 3 + clang/include/clang/Basic/FileEntry.h | 406 ++ clang/include/clang/Basic/FileManager.h | 158 +- clang/include/clang/Basic/IdentifierTable.h | 12 - clang/include/clang/Basic/LLVM.h | 1 + clang/include/clang/Basic/LangOptions.def | 42 +- clang/include/clang/Basic/LangOptions.h | 165 +- clang/include/clang/Basic/LangStandard.h | 14 +- clang/include/clang/Basic/LangStandards.def | 14 + clang/include/clang/Basic/Module.h | 55 +- clang/include/clang/Basic/OpenCLExtensions.def | 142 +- clang/include/clang/Basic/OpenCLOptions.h | 213 +- clang/include/clang/Basic/OpenMPKinds.def | 20 +- clang/include/clang/Basic/OpenMPKinds.h | 23 +- clang/include/clang/Basic/OperatorKinds.h | 5 + clang/include/clang/Basic/PPCTypes.def | 38 + clang/include/clang/Basic/PartialDiagnostic.h | 277 +- clang/include/clang/Basic/ProfileList.h | 58 + clang/include/clang/Basic/Sanitizers.def | 4 +- clang/include/clang/Basic/SourceLocation.h | 31 + clang/include/clang/Basic/SourceManager.h | 1022 ++-- clang/include/clang/Basic/Specifiers.h | 34 +- clang/include/clang/Basic/TargetCXXABI.h | 25 +- clang/include/clang/Basic/TargetID.h | 56 + clang/include/clang/Basic/TargetInfo.h | 78 +- clang/include/clang/Basic/TargetOptions.h | 12 +- clang/include/clang/Basic/TokenKinds.def | 17 +- clang/include/clang/Basic/TypeNodes.td | 2 +- clang/include/clang/Basic/arm_mve.td | 12 +- clang/include/clang/Basic/arm_mve_defs.td | 8 +- clang/include/clang/Basic/arm_neon.td | 73 +- clang/include/clang/CodeGen/BackendUtil.h | 5 - clang/include/clang/CodeGen/CGFunctionInfo.h | 60 +- clang/include/clang/Driver/Compilation.h | 17 + clang/include/clang/Driver/Distro.h | 17 +- clang/include/clang/Driver/Driver.h | 4 +- clang/include/clang/Driver/Job.h | 29 +- clang/include/clang/Driver/Options.h | 8 +- clang/include/clang/Driver/Options.td | 3042 ++++++++---- clang/include/clang/Driver/SanitizerArgs.h | 5 +- clang/include/clang/Driver/ToolChain.h | 32 +- clang/include/clang/Driver/XRayArgs.h | 2 + clang/include/clang/Edit/EditedSource.h | 2 +- clang/include/clang/Format/Format.h | 1081 +++- clang/include/clang/Frontend/ASTUnit.h | 18 +- clang/include/clang/Frontend/CompilerInstance.h | 68 +- clang/include/clang/Frontend/CompilerInvocation.h | 22 +- clang/include/clang/Frontend/FrontendAction.h | 2 +- clang/include/clang/Frontend/FrontendActions.h | 2 + clang/include/clang/Frontend/FrontendOptions.h | 35 +- clang/include/clang/Frontend/PrecompiledPreamble.h | 9 +- clang/include/clang/Frontend/Utils.h | 8 +- .../SerializablePathCollection.h | 129 + clang/include/clang/Lex/HeaderSearch.h | 34 + clang/include/clang/Lex/HeaderSearchOptions.h | 9 +- clang/include/clang/Lex/Lexer.h | 10 +- clang/include/clang/Lex/ModuleMap.h | 13 +- clang/include/clang/Lex/Preprocessor.h | 24 + ...cessorExcludedConditionalDirectiveSkipMapping.h | 3 +- clang/include/clang/Lex/PreprocessorOptions.h | 26 +- clang/include/clang/Parse/Parser.h | 70 +- clang/include/clang/Sema/CodeCompleteConsumer.h | 3 - clang/include/clang/Sema/DeclSpec.h | 590 +-- clang/include/clang/Sema/DelayedDiagnostic.h | 19 +- clang/include/clang/Sema/Designator.h | 49 +- clang/include/clang/Sema/Initialization.h | 61 +- .../clang/Sema/MultiplexExternalSemaSource.h | 2 - clang/include/clang/Sema/Overload.h | 6 + clang/include/clang/Sema/Ownership.h | 23 +- clang/include/clang/Sema/ParsedAttr.h | 44 +- clang/include/clang/Sema/ScopeInfo.h | 15 +- clang/include/clang/Sema/Sema.h | 835 ++-- clang/include/clang/Sema/SemaInternal.h | 5 + clang/include/clang/Sema/Template.h | 2 +- clang/include/clang/Serialization/ASTBitCodes.h | 10 +- clang/include/clang/Serialization/ASTReader.h | 51 +- .../include/clang/Serialization/ASTRecordReader.h | 6 +- .../include/clang/Serialization/ASTRecordWriter.h | 15 +- clang/include/clang/Serialization/ASTWriter.h | 10 + clang/include/clang/Serialization/ModuleFile.h | 19 +- clang/include/clang/Serialization/ModuleManager.h | 6 +- .../clang/StaticAnalyzer/Checkers/Checkers.td | 16 +- .../clang/StaticAnalyzer/Core/AnalyzerOptions.h | 34 +- .../Core/BugReporter/BugReporterVisitors.h | 5 +- .../include/clang/StaticAnalyzer/Core/IssueHash.h | 50 - .../StaticAnalyzer/Core/PathDiagnosticConsumers.h | 7 +- .../Core/PathSensitive/BasicValueFactory.h | 16 +- .../StaticAnalyzer/Core/PathSensitive/CallEvent.h | 56 +- .../Core/PathSensitive/CheckerContext.h | 20 + .../StaticAnalyzer/Core/PathSensitive/ExprEngine.h | 17 + .../Core/PathSensitive/RangedConstraintManager.h | 22 +- .../Core/PathSensitive/SMTConstraintManager.h | 3 +- .../StaticAnalyzer/Core/PathSensitive/SMTConv.h | 18 +- .../Core/PathSensitive/SValBuilder.h | 2 +- .../StaticAnalyzer/Core/PathSensitive/SVals.h | 14 +- .../StaticAnalyzer/Core/PathSensitive/SymExpr.h | 3 + .../Core/PathSensitive/SymbolManager.h | 12 +- clang/include/clang/Testing/TestClangConfig.h | 2 + clang/include/clang/Tooling/CompilationDatabase.h | 22 +- .../clang/Tooling/Inclusions/HeaderIncludes.h | 2 - .../clang/Tooling/Inclusions/IncludeStyle.h | 21 +- .../Tooling/Refactoring/Extract/SourceExtraction.h | 0 .../clang/Tooling/{Core => Refactoring}/Lookup.h | 6 +- .../Tooling/Refactoring/RefactoringRuleContext.h | 2 +- .../Tooling/Refactoring/Rename/SymbolOccurrences.h | 13 +- clang/include/clang/Tooling/Syntax/BuildTree.h | 35 +- clang/include/clang/Tooling/Syntax/Nodes.h | 648 +-- clang/include/clang/Tooling/Syntax/Nodes.td | 296 ++ clang/include/clang/Tooling/Syntax/Syntax.td | 85 + clang/include/clang/Tooling/Syntax/Tokens.h | 12 +- clang/include/clang/Tooling/Syntax/Tree.h | 216 +- clang/include/clang/Tooling/Tooling.h | 11 - .../clang/Tooling/Transformer/MatchConsumer.h | 6 - .../clang/Tooling/Transformer/RangeSelector.h | 29 +- .../clang/Tooling/Transformer/RewriteRule.h | 290 +- clang/include/clang/Tooling/Transformer/Stencil.h | 11 +- clang/include/clang/module.modulemap | 1 + clang/lib/APINotes/APINotesFormat.h | 255 + clang/lib/APINotes/APINotesTypes.cpp | 107 + clang/lib/APINotes/APINotesYAMLCompiler.cpp | 598 +++ clang/lib/ARCMigrate/ARCMT.cpp | 8 +- clang/lib/ARCMigrate/FileRemapper.cpp | 15 + clang/lib/ARCMigrate/ObjCMT.cpp | 39 +- clang/lib/ARCMigrate/TransGCAttrs.cpp | 22 +- clang/lib/ARCMigrate/TransProperties.cpp | 17 +- clang/lib/ARCMigrate/Transforms.h | 6 +- clang/lib/AST/APValue.cpp | 538 +- clang/lib/AST/ASTContext.cpp | 585 ++- clang/lib/AST/ASTDiagnostic.cpp | 15 +- clang/lib/AST/ASTDumper.cpp | 8 +- clang/lib/AST/ASTImporter.cpp | 564 ++- clang/lib/AST/ASTImporterLookupTable.cpp | 14 + clang/lib/AST/ASTStructuralEquivalence.cpp | 496 +- clang/lib/AST/ASTTypeTraits.cpp | 58 +- clang/lib/AST/AttrImpl.cpp | 53 +- clang/lib/AST/CXXInheritance.cpp | 150 +- clang/lib/AST/CommentLexer.cpp | 9 +- clang/lib/AST/ComparisonCategories.cpp | 2 +- clang/lib/AST/ComputeDependence.cpp | 138 +- clang/lib/AST/Decl.cpp | 357 +- clang/lib/AST/DeclBase.cpp | 65 +- clang/lib/AST/DeclCXX.cpp | 131 +- clang/lib/AST/DeclObjC.cpp | 45 +- clang/lib/AST/DeclOpenMP.cpp | 112 +- clang/lib/AST/DeclPrinter.cpp | 28 +- clang/lib/AST/DeclTemplate.cpp | 77 +- clang/lib/AST/Expr.cpp | 482 +- clang/lib/AST/ExprCXX.cpp | 207 +- clang/lib/AST/ExprClassification.cpp | 4 +- clang/lib/AST/ExprConstant.cpp | 1547 ++++-- clang/lib/AST/Interp/Disasm.cpp | 4 +- clang/lib/AST/Interp/State.cpp | 2 +- clang/lib/AST/ItaniumMangle.cpp | 1048 +++- clang/lib/AST/JSONNodeDumper.cpp | 8 +- clang/lib/AST/Linkage.h | 2 + clang/lib/AST/Mangle.cpp | 72 +- clang/lib/AST/MicrosoftMangle.cpp | 424 +- clang/lib/AST/NSAPI.cpp | 3 + clang/lib/AST/OpenMPClause.cpp | 178 +- clang/lib/AST/ParentMapContext.cpp | 117 +- clang/lib/AST/PrintfFormatString.cpp | 3 + clang/lib/AST/RecordLayout.cpp | 41 +- clang/lib/AST/RecordLayoutBuilder.cpp | 380 +- clang/lib/AST/Stmt.cpp | 110 +- clang/lib/AST/StmtOpenMP.cpp | 1135 ++--- clang/lib/AST/StmtPrinter.cpp | 25 +- clang/lib/AST/StmtProfile.cpp | 9 +- clang/lib/AST/TemplateBase.cpp | 35 +- clang/lib/AST/TemplateName.cpp | 18 +- clang/lib/AST/TextNodeDumper.cpp | 51 +- clang/lib/AST/Type.cpp | 113 +- clang/lib/AST/TypeLoc.cpp | 5 +- clang/lib/AST/TypePrinter.cpp | 314 +- clang/lib/ASTMatchers/ASTMatchFinder.cpp | 447 +- clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 152 +- clang/lib/ASTMatchers/Dynamic/Marshallers.cpp | 11 +- clang/lib/ASTMatchers/Dynamic/Marshallers.h | 208 +- clang/lib/ASTMatchers/Dynamic/Registry.cpp | 11 +- clang/lib/ASTMatchers/Dynamic/VariantValue.cpp | 30 + clang/lib/ASTMatchers/GtestMatchers.cpp | 4 +- clang/lib/Analysis/BodyFarm.cpp | 40 +- clang/lib/Analysis/CFG.cpp | 35 +- clang/lib/Analysis/CalledOnceCheck.cpp | 1525 ++++++ clang/lib/Analysis/ExprMutationAnalyzer.cpp | 300 +- .../Core => Analysis}/IssueHash.cpp | 41 +- clang/lib/Analysis/LiveVariables.cpp | 102 +- clang/lib/Analysis/PathDiagnostic.cpp | 46 +- clang/lib/Analysis/ThreadSafety.cpp | 29 +- clang/lib/Analysis/ThreadSafetyCommon.cpp | 4 +- clang/lib/Basic/Cuda.cpp | 43 +- clang/lib/Basic/Diagnostic.cpp | 35 +- clang/lib/Basic/DiagnosticIDs.cpp | 109 +- clang/lib/Basic/FileEntry.cpp | 24 + clang/lib/Basic/FileManager.cpp | 181 +- clang/lib/Basic/IdentifierTable.cpp | 5 + clang/lib/Basic/LangOptions.cpp | 2 +- clang/lib/Basic/Module.cpp | 21 +- clang/lib/Basic/OpenCLOptions.cpp | 106 + clang/lib/Basic/OpenMPKinds.cpp | 50 +- clang/lib/Basic/ProfileList.cpp | 113 + clang/lib/Basic/SourceLocation.cpp | 21 +- clang/lib/Basic/SourceManager.cpp | 506 +- clang/lib/Basic/TargetID.cpp | 169 + clang/lib/Basic/TargetInfo.cpp | 1 + clang/lib/Basic/Targets.cpp | 68 +- clang/lib/Basic/Targets/AArch64.cpp | 48 +- clang/lib/Basic/Targets/AArch64.h | 6 + clang/lib/Basic/Targets/AMDGPU.cpp | 36 +- clang/lib/Basic/Targets/AMDGPU.h | 77 +- clang/lib/Basic/Targets/ARM.cpp | 2 + clang/lib/Basic/Targets/AVR.cpp | 7 + clang/lib/Basic/Targets/Hexagon.cpp | 3 +- clang/lib/Basic/Targets/MSP430.cpp | 1 + clang/lib/Basic/Targets/Mips.cpp | 1 - clang/lib/Basic/Targets/NVPTX.cpp | 8 + clang/lib/Basic/Targets/NVPTX.h | 22 +- clang/lib/Basic/Targets/OSTargets.h | 81 +- clang/lib/Basic/Targets/PPC.cpp | 87 +- clang/lib/Basic/Targets/PPC.h | 34 +- clang/lib/Basic/Targets/RISCV.cpp | 160 +- clang/lib/Basic/Targets/RISCV.h | 49 +- clang/lib/Basic/Targets/SPIR.h | 6 +- clang/lib/Basic/Targets/Sparc.cpp | 28 +- clang/lib/Basic/Targets/Sparc.h | 11 +- clang/lib/Basic/Targets/SystemZ.h | 4 + clang/lib/Basic/Targets/TCE.h | 2 + clang/lib/Basic/Targets/VE.h | 16 +- clang/lib/Basic/Targets/WebAssembly.cpp | 60 +- clang/lib/Basic/Targets/WebAssembly.h | 6 +- clang/lib/Basic/Targets/X86.cpp | 59 +- clang/lib/Basic/Targets/X86.h | 36 +- clang/lib/Basic/Version.cpp | 2 - clang/lib/Basic/Warnings.cpp | 7 +- clang/lib/CodeGen/ABIInfo.h | 2 +- clang/lib/CodeGen/BackendUtil.cpp | 560 +-- clang/lib/CodeGen/CGAtomic.cpp | 60 +- clang/lib/CodeGen/CGBlocks.cpp | 17 +- clang/lib/CodeGen/CGBuiltin.cpp | 2363 ++++++--- clang/lib/CodeGen/CGCUDANV.cpp | 109 +- clang/lib/CodeGen/CGCUDARuntime.h | 7 +- clang/lib/CodeGen/CGCXXABI.cpp | 26 +- clang/lib/CodeGen/CGCXXABI.h | 13 +- clang/lib/CodeGen/CGCall.cpp | 339 +- clang/lib/CodeGen/CGCall.h | 6 +- clang/lib/CodeGen/CGClass.cpp | 103 +- clang/lib/CodeGen/CGCleanup.h | 1 + clang/lib/CodeGen/CGDebugInfo.cpp | 312 +- clang/lib/CodeGen/CGDebugInfo.h | 14 +- clang/lib/CodeGen/CGDecl.cpp | 158 +- clang/lib/CodeGen/CGDeclCXX.cpp | 113 +- clang/lib/CodeGen/CGException.cpp | 28 +- clang/lib/CodeGen/CGExpr.cpp | 244 +- clang/lib/CodeGen/CGExprAgg.cpp | 131 +- clang/lib/CodeGen/CGExprCXX.cpp | 28 +- clang/lib/CodeGen/CGExprComplex.cpp | 11 +- clang/lib/CodeGen/CGExprConstant.cpp | 34 +- clang/lib/CodeGen/CGExprScalar.cpp | 440 +- clang/lib/CodeGen/CGLoopInfo.cpp | 93 +- clang/lib/CodeGen/CGLoopInfo.h | 15 +- clang/lib/CodeGen/CGObjC.cpp | 243 +- clang/lib/CodeGen/CGObjCGNU.cpp | 67 +- clang/lib/CodeGen/CGObjCMac.cpp | 98 +- clang/lib/CodeGen/CGObjCRuntime.cpp | 10 + clang/lib/CodeGen/CGObjCRuntime.h | 14 + clang/lib/CodeGen/CGOpenMPRuntime.cpp | 2002 +++++--- clang/lib/CodeGen/CGOpenMPRuntime.h | 81 +- clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.cpp | 60 + clang/lib/CodeGen/CGOpenMPRuntimeAMDGCN.h | 43 + clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 4864 ++++++++++++++++++ clang/lib/CodeGen/CGOpenMPRuntimeGPU.h | 504 ++ clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 5225 +------------------ clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h | 465 +- clang/lib/CodeGen/CGRecordLayout.h | 17 +- clang/lib/CodeGen/CGRecordLayoutBuilder.cpp | 187 +- clang/lib/CodeGen/CGStmt.cpp | 301 +- clang/lib/CodeGen/CGStmtOpenMP.cpp | 205 +- clang/lib/CodeGen/CGVTT.cpp | 13 +- clang/lib/CodeGen/CGVTables.cpp | 96 +- clang/lib/CodeGen/CGValue.h | 2 +- clang/lib/CodeGen/CodeGenAction.cpp | 220 +- clang/lib/CodeGen/CodeGenFunction.cpp | 315 +- clang/lib/CodeGen/CodeGenFunction.h | 257 +- clang/lib/CodeGen/CodeGenModule.cpp | 398 +- clang/lib/CodeGen/CodeGenModule.h | 58 +- clang/lib/CodeGen/CodeGenPGO.cpp | 55 +- clang/lib/CodeGen/CodeGenPGO.h | 2 +- clang/lib/CodeGen/CodeGenTypeCache.h | 3 + clang/lib/CodeGen/CodeGenTypes.cpp | 71 +- clang/lib/CodeGen/CoverageMappingGen.cpp | 350 +- clang/lib/CodeGen/CoverageMappingGen.h | 50 +- clang/lib/CodeGen/ItaniumCXXABI.cpp | 183 +- clang/lib/CodeGen/MicrosoftCXXABI.cpp | 103 +- .../CodeGen/ObjectFilePCHContainerOperations.cpp | 10 +- clang/lib/CodeGen/SwiftCallingConv.cpp | 33 +- clang/lib/CodeGen/TargetInfo.cpp | 624 +-- clang/lib/CodeGen/TargetInfo.h | 8 +- clang/lib/CrossTU/CrossTranslationUnit.cpp | 12 +- clang/lib/Driver/Compilation.cpp | 2 + clang/lib/Driver/Distro.cpp | 180 +- clang/lib/Driver/Driver.cpp | 347 +- clang/lib/Driver/Job.cpp | 22 +- clang/lib/Driver/SanitizerArgs.cpp | 42 +- clang/lib/Driver/ToolChain.cpp | 139 +- clang/lib/Driver/ToolChains/AIX.cpp | 62 +- clang/lib/Driver/ToolChains/AIX.h | 7 + clang/lib/Driver/ToolChains/AMDGPU.cpp | 136 +- clang/lib/Driver/ToolChains/AMDGPU.h | 14 +- clang/lib/Driver/ToolChains/AVR.cpp | 306 +- clang/lib/Driver/ToolChains/Ananas.cpp | 10 +- clang/lib/Driver/ToolChains/Arch/AArch64.cpp | 24 +- clang/lib/Driver/ToolChains/Arch/ARM.cpp | 261 +- clang/lib/Driver/ToolChains/Arch/ARM.h | 2 + clang/lib/Driver/ToolChains/Arch/Mips.cpp | 2 - clang/lib/Driver/ToolChains/Arch/PPC.cpp | 1 - clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 125 +- clang/lib/Driver/ToolChains/Arch/Sparc.cpp | 9 +- clang/lib/Driver/ToolChains/Arch/VE.cpp | 4 - clang/lib/Driver/ToolChains/Arch/VE.h | 2 - clang/lib/Driver/ToolChains/Arch/X86.cpp | 35 +- clang/lib/Driver/ToolChains/Arch/X86.h | 2 +- clang/lib/Driver/ToolChains/BareMetal.cpp | 146 +- clang/lib/Driver/ToolChains/BareMetal.h | 15 +- clang/lib/Driver/ToolChains/Clang.cpp | 681 ++- clang/lib/Driver/ToolChains/CloudABI.cpp | 5 +- clang/lib/Driver/ToolChains/CommonArgs.cpp | 267 +- clang/lib/Driver/ToolChains/CommonArgs.h | 14 +- clang/lib/Driver/ToolChains/CrossWindows.cpp | 15 +- clang/lib/Driver/ToolChains/CrossWindows.h | 6 +- clang/lib/Driver/ToolChains/Cuda.cpp | 215 +- clang/lib/Driver/ToolChains/Cuda.h | 9 +- clang/lib/Driver/ToolChains/Darwin.cpp | 132 +- clang/lib/Driver/ToolChains/Darwin.h | 21 +- clang/lib/Driver/ToolChains/DragonFly.cpp | 16 +- clang/lib/Driver/ToolChains/Flang.cpp | 44 +- clang/lib/Driver/ToolChains/Flang.h | 9 + clang/lib/Driver/ToolChains/FreeBSD.cpp | 18 +- clang/lib/Driver/ToolChains/Fuchsia.cpp | 29 +- clang/lib/Driver/ToolChains/Fuchsia.h | 6 +- clang/lib/Driver/ToolChains/Gnu.cpp | 155 +- clang/lib/Driver/ToolChains/Gnu.h | 6 +- clang/lib/Driver/ToolChains/HIP.cpp | 58 +- clang/lib/Driver/ToolChains/Hexagon.cpp | 10 +- clang/lib/Driver/ToolChains/InterfaceStubs.cpp | 2 +- clang/lib/Driver/ToolChains/Linux.cpp | 36 +- clang/lib/Driver/ToolChains/MSP430.cpp | 159 +- clang/lib/Driver/ToolChains/MSP430.h | 13 + clang/lib/Driver/ToolChains/MSVC.cpp | 65 +- clang/lib/Driver/ToolChains/MinGW.cpp | 25 +- clang/lib/Driver/ToolChains/Minix.cpp | 10 +- clang/lib/Driver/ToolChains/Myriad.cpp | 10 +- clang/lib/Driver/ToolChains/NaCl.cpp | 5 +- clang/lib/Driver/ToolChains/NetBSD.cpp | 10 +- clang/lib/Driver/ToolChains/OpenBSD.cpp | 77 +- clang/lib/Driver/ToolChains/OpenBSD.h | 22 +- clang/lib/Driver/ToolChains/PS4CPU.cpp | 47 +- clang/lib/Driver/ToolChains/PS4CPU.h | 6 +- clang/lib/Driver/ToolChains/RISCVToolchain.cpp | 21 +- clang/lib/Driver/ToolChains/RISCVToolchain.h | 1 + clang/lib/Driver/ToolChains/ROCm.h | 13 +- clang/lib/Driver/ToolChains/Solaris.cpp | 4 +- clang/lib/Driver/ToolChains/Solaris.h | 5 + clang/lib/Driver/ToolChains/VEToolchain.cpp | 31 +- clang/lib/Driver/ToolChains/VEToolchain.h | 1 + clang/lib/Driver/ToolChains/WebAssembly.cpp | 28 +- clang/lib/Driver/ToolChains/XCore.cpp | 4 +- clang/lib/Driver/ToolChains/ZOS.cpp | 33 + clang/lib/Driver/ToolChains/ZOS.h | 40 + clang/lib/Driver/Types.cpp | 6 +- clang/lib/Driver/XRayArgs.cpp | 26 + clang/lib/Edit/EditedSource.cpp | 4 +- clang/lib/Edit/RewriteObjCFoundationAPI.cpp | 2 + clang/lib/Format/BreakableToken.cpp | 92 +- clang/lib/Format/BreakableToken.h | 1 - clang/lib/Format/ContinuationIndenter.cpp | 59 +- clang/lib/Format/Format.cpp | 167 +- clang/lib/Format/FormatInternal.h | 1 - clang/lib/Format/FormatToken.cpp | 5 +- clang/lib/Format/FormatToken.h | 281 +- clang/lib/Format/FormatTokenLexer.cpp | 23 +- clang/lib/Format/MacroExpander.cpp | 224 + clang/lib/Format/Macros.h | 141 + clang/lib/Format/TokenAnnotator.cpp | 263 +- clang/lib/Format/UnwrappedLineFormatter.cpp | 71 +- clang/lib/Format/UnwrappedLineParser.cpp | 252 +- clang/lib/Format/UnwrappedLineParser.h | 5 + clang/lib/Format/WhitespaceManager.cpp | 90 +- clang/lib/Frontend/ASTUnit.cpp | 103 +- clang/lib/Frontend/ChainedIncludesSource.cpp | 11 +- clang/lib/Frontend/CompilerInstance.cpp | 280 +- clang/lib/Frontend/CompilerInvocation.cpp | 2178 +++----- .../Frontend/CreateInvocationFromCommandLine.cpp | 4 +- clang/lib/Frontend/DependencyFile.cpp | 17 +- clang/lib/Frontend/FrontendAction.cpp | 19 +- clang/lib/Frontend/FrontendActions.cpp | 58 +- clang/lib/Frontend/FrontendOptions.cpp | 2 +- clang/lib/Frontend/InitHeaderSearch.cpp | 2 + clang/lib/Frontend/InitPreprocessor.cpp | 32 +- clang/lib/Frontend/ModuleDependencyCollector.cpp | 52 +- clang/lib/Frontend/PrecompiledPreamble.cpp | 51 +- clang/lib/Frontend/Rewrite/HTMLPrint.cpp | 2 +- clang/lib/Frontend/Rewrite/InclusionRewriter.cpp | 78 +- clang/lib/Frontend/Rewrite/RewriteMacros.cpp | 2 +- clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp | 57 +- clang/lib/Frontend/Rewrite/RewriteObjC.cpp | 47 +- clang/lib/Frontend/TextDiagnostic.cpp | 5 +- clang/lib/Frontend/TextDiagnosticPrinter.cpp | 8 +- clang/lib/Frontend/VerifyDiagnosticConsumer.cpp | 12 +- clang/lib/Headers/__clang_cuda_builtin_vars.h | 9 + clang/lib/Headers/__clang_cuda_cmath.h | 50 +- clang/lib/Headers/__clang_cuda_complex_builtins.h | 36 +- clang/lib/Headers/__clang_cuda_math.h | 9 +- .../Headers/__clang_cuda_math_forward_declares.h | 3 + clang/lib/Headers/__clang_cuda_runtime_wrapper.h | 28 +- clang/lib/Headers/__clang_hip_cmath.h | 664 +++ clang/lib/Headers/__clang_hip_libdevice_declares.h | 26 +- clang/lib/Headers/__clang_hip_math.h | 1148 +++-- clang/lib/Headers/__clang_hip_runtime_wrapper.h | 5 + clang/lib/Headers/altivec.h | 1215 ++++- clang/lib/Headers/amxintrin.h | 97 +- clang/lib/Headers/arm_acle.h | 26 + clang/lib/Headers/avx512fintrin.h | 157 +- clang/lib/Headers/avx512vlvnniintrin.h | 205 +- clang/lib/Headers/avxintrin.h | 6 +- clang/lib/Headers/avxvnniintrin.h | 225 + clang/lib/Headers/cpuid.h | 8 + clang/lib/Headers/cuda_wrappers/algorithm | 2 +- clang/lib/Headers/cuda_wrappers/new | 10 +- clang/lib/Headers/emmintrin.h | 2 +- clang/lib/Headers/gfniintrin.h | 181 +- clang/lib/Headers/hresetintrin.h | 49 + clang/lib/Headers/ia32intrin.h | 97 +- clang/lib/Headers/immintrin.h | 12 + clang/lib/Headers/intrin.h | 169 +- clang/lib/Headers/keylockerintrin.h | 506 ++ clang/lib/Headers/mm_malloc.h | 6 + clang/lib/Headers/opencl-c-base.h | 18 + clang/lib/Headers/opencl-c.h | 2 + clang/lib/Headers/openmp_wrappers/cmath | 5 +- clang/lib/Headers/openmp_wrappers/complex | 27 + clang/lib/Headers/openmp_wrappers/complex.h | 2 + clang/lib/Headers/openmp_wrappers/complex_cmath.h | 388 ++ clang/lib/Headers/popcntintrin.h | 11 +- clang/lib/Headers/ppc_wrappers/smmintrin.h | 24 + clang/lib/Headers/uintrintrin.h | 150 + clang/lib/Headers/wasm_simd128.h | 112 +- clang/lib/Headers/x86gprintrin.h | 23 + clang/lib/Index/FileIndexRecord.cpp | 2 +- clang/lib/Index/IndexBody.cpp | 4 +- clang/lib/Index/IndexTypeSourceInfo.cpp | 21 + clang/lib/Index/IndexingAction.cpp | 11 +- clang/lib/Index/SimpleFormatContext.h | 72 - clang/lib/Index/USRGeneration.cpp | 3 + .../SerializablePathCollection.cpp | 91 + clang/lib/Lex/HeaderSearch.cpp | 58 +- clang/lib/Lex/Lexer.cpp | 49 +- clang/lib/Lex/LiteralSupport.cpp | 4 +- clang/lib/Lex/ModuleMap.cpp | 76 +- clang/lib/Lex/PPDirectives.cpp | 12 +- clang/lib/Lex/PPLexerChange.cpp | 27 +- clang/lib/Lex/PPMacroExpansion.cpp | 31 +- clang/lib/Lex/Pragma.cpp | 2 +- clang/lib/Lex/Preprocessor.cpp | 16 +- clang/lib/Lex/ScratchBuffer.cpp | 8 +- clang/lib/Lex/TokenLexer.cpp | 10 +- clang/lib/Parse/ParseCXXInlineMethods.cpp | 23 +- clang/lib/Parse/ParseDecl.cpp | 300 +- clang/lib/Parse/ParseDeclCXX.cpp | 107 +- clang/lib/Parse/ParseExpr.cpp | 96 +- clang/lib/Parse/ParseExprCXX.cpp | 71 +- clang/lib/Parse/ParseObjc.cpp | 37 +- clang/lib/Parse/ParseOpenMP.cpp | 456 +- clang/lib/Parse/ParsePragma.cpp | 311 +- clang/lib/Parse/ParseStmt.cpp | 57 +- clang/lib/Parse/ParseStmtAsm.cpp | 2 +- clang/lib/Parse/ParseTemplate.cpp | 21 +- clang/lib/Parse/ParseTentative.cpp | 13 +- clang/lib/Parse/Parser.cpp | 66 +- clang/lib/Rewrite/HTMLRewrite.cpp | 22 +- clang/lib/Rewrite/Rewriter.cpp | 8 +- clang/lib/Rewrite/TokenRewriter.cpp | 2 +- clang/lib/Sema/AnalysisBasedWarnings.cpp | 102 +- clang/lib/Sema/CodeCompleteConsumer.cpp | 6 +- clang/lib/Sema/DeclSpec.cpp | 167 +- clang/lib/Sema/JumpDiagnostics.cpp | 17 + clang/lib/Sema/MultiplexExternalSemaSource.cpp | 7 - clang/lib/Sema/ScopeInfo.cpp | 1 + clang/lib/Sema/Sema.cpp | 163 +- clang/lib/Sema/SemaAccess.cpp | 3 +- clang/lib/Sema/SemaAttr.cpp | 345 +- clang/lib/Sema/SemaCUDA.cpp | 103 +- clang/lib/Sema/SemaCast.cpp | 81 +- clang/lib/Sema/SemaChecking.cpp | 1029 +++- clang/lib/Sema/SemaCodeComplete.cpp | 90 +- clang/lib/Sema/SemaConcept.cpp | 23 +- clang/lib/Sema/SemaCoroutine.cpp | 100 +- clang/lib/Sema/SemaDecl.cpp | 1181 +++-- clang/lib/Sema/SemaDeclAttr.cpp | 1060 +++- clang/lib/Sema/SemaDeclCXX.cpp | 225 +- clang/lib/Sema/SemaDeclObjC.cpp | 76 +- clang/lib/Sema/SemaExceptionSpec.cpp | 4 +- clang/lib/Sema/SemaExpr.cpp | 1006 ++-- clang/lib/Sema/SemaExprCXX.cpp | 201 +- clang/lib/Sema/SemaExprMember.cpp | 119 +- clang/lib/Sema/SemaExprObjC.cpp | 88 +- clang/lib/Sema/SemaInit.cpp | 356 +- clang/lib/Sema/SemaLambda.cpp | 145 +- clang/lib/Sema/SemaLookup.cpp | 378 +- clang/lib/Sema/SemaModule.cpp | 2 +- clang/lib/Sema/SemaObjCProperty.cpp | 14 +- clang/lib/Sema/SemaOpenMP.cpp | 1065 ++-- clang/lib/Sema/SemaOverload.cpp | 978 ++-- clang/lib/Sema/SemaSYCL.cpp | 20 +- clang/lib/Sema/SemaStmt.cpp | 217 +- clang/lib/Sema/SemaStmtAsm.cpp | 6 +- clang/lib/Sema/SemaStmtAttr.cpp | 78 +- clang/lib/Sema/SemaTemplate.cpp | 637 ++- clang/lib/Sema/SemaTemplateDeduction.cpp | 379 +- clang/lib/Sema/SemaTemplateInstantiate.cpp | 187 +- clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 421 +- clang/lib/Sema/SemaTemplateVariadic.cpp | 63 +- clang/lib/Sema/SemaType.cpp | 1220 ++--- clang/lib/Sema/TreeTransform.h | 205 +- clang/lib/Sema/UsedDeclVisitor.h | 11 +- clang/lib/Serialization/ASTCommon.cpp | 6 + clang/lib/Serialization/ASTReader.cpp | 434 +- clang/lib/Serialization/ASTReaderDecl.cpp | 166 +- clang/lib/Serialization/ASTReaderStmt.cpp | 365 +- clang/lib/Serialization/ASTWriter.cpp | 183 +- clang/lib/Serialization/ASTWriterDecl.cpp | 59 +- clang/lib/Serialization/ASTWriterStmt.cpp | 158 +- clang/lib/Serialization/GlobalModuleIndex.cpp | 7 +- clang/lib/Serialization/ModuleManager.cpp | 61 +- .../Checkers/BasicObjCFoundationChecks.cpp | 3 +- .../StaticAnalyzer/Checkers/CastValueChecker.cpp | 142 +- .../StaticAnalyzer/Checkers/CheckObjCDealloc.cpp | 2 +- .../lib/StaticAnalyzer/Checkers/DebugCheckers.cpp | 10 +- .../StaticAnalyzer/Checkers/DereferenceChecker.cpp | 69 +- .../Checkers/ExprInspectionChecker.cpp | 4 +- .../Checkers/FuchsiaHandleChecker.cpp | 312 +- .../Checkers/GenericTaintChecker.cpp | 5 +- .../StaticAnalyzer/Checkers/IteratorModeling.cpp | 103 +- .../Checkers/IteratorRangeChecker.cpp | 2 + .../Checkers/LocalizationChecker.cpp | 7 +- .../Checkers/MacOSKeychainAPIChecker.cpp | 2 +- .../lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 15 +- clang/lib/StaticAnalyzer/Checkers/MoveChecker.cpp | 4 +- .../StaticAnalyzer/Checkers/OSObjectCStyleCast.cpp | 21 +- .../Checkers/ObjCMissingSuperCallChecker.cpp | 7 +- .../lib/StaticAnalyzer/Checkers/PaddingChecker.cpp | 5 +- .../StaticAnalyzer/Checkers/PthreadLockChecker.cpp | 271 +- .../RetainCountChecker/RetainCountDiagnostics.cpp | 4 +- .../Checkers/ReturnPointerRangeChecker.cpp | 7 +- clang/lib/StaticAnalyzer/Checkers/SmartPtr.h | 2 + .../StaticAnalyzer/Checkers/SmartPtrChecker.cpp | 48 +- .../StaticAnalyzer/Checkers/SmartPtrModeling.cpp | 514 +- .../Checkers/StdLibraryFunctionsChecker.cpp | 2058 +++++--- .../lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 70 +- clang/lib/StaticAnalyzer/Checkers/Taint.cpp | 2 +- .../StaticAnalyzer/Checkers/UndefBranchChecker.cpp | 7 +- .../StaticAnalyzer/Checkers/VirtualCallChecker.cpp | 4 +- .../StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp | 4 +- .../Checkers/WebKit/NoUncountedMembersChecker.cpp | 7 +- .../Checkers/WebKit/PtrTypesSemantics.cpp | 58 +- .../Checkers/WebKit/PtrTypesSemantics.h | 23 +- .../WebKit/RefCntblBaseVirtualDtorChecker.cpp | 12 +- .../Checkers/WebKit/UncountedCallArgsChecker.cpp | 3 +- .../WebKit/UncountedLambdaCapturesChecker.cpp | 107 + .../Checkers/WebKit/UncountedLocalVarsChecker.cpp | 251 + clang/lib/StaticAnalyzer/Checkers/Yaml.h | 0 clang/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | 2 +- .../lib/StaticAnalyzer/Core/BasicValueFactory.cpp | 25 +- clang/lib/StaticAnalyzer/Core/BugReporter.cpp | 13 +- .../StaticAnalyzer/Core/BugReporterVisitors.cpp | 7 +- clang/lib/StaticAnalyzer/Core/CallEvent.cpp | 2 +- clang/lib/StaticAnalyzer/Core/CheckerContext.cpp | 2 +- clang/lib/StaticAnalyzer/Core/DynamicType.cpp | 13 + clang/lib/StaticAnalyzer/Core/Environment.cpp | 21 +- clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 153 +- clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp | 7 +- clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 26 +- .../Core/ExprEngineCallAndReturn.cpp | 14 +- clang/lib/StaticAnalyzer/Core/ExprEngineObjC.cpp | 13 +- clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp | 47 +- clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 400 +- clang/lib/StaticAnalyzer/Core/ProgramState.cpp | 3 - .../StaticAnalyzer/Core/RangeConstraintManager.cpp | 1114 ++++- .../Core/RangedConstraintManager.cpp | 41 +- clang/lib/StaticAnalyzer/Core/SValBuilder.cpp | 23 +- clang/lib/StaticAnalyzer/Core/SVals.cpp | 48 +- clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp | 16 +- .../Core/SimpleConstraintManager.cpp | 4 +- .../lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 19 +- clang/lib/StaticAnalyzer/Core/SymbolManager.cpp | 28 +- clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp | 49 +- .../StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 4 +- clang/lib/Tooling/AllTUsExecution.cpp | 2 +- clang/lib/Tooling/ArgumentsAdjusters.cpp | 34 +- clang/lib/Tooling/CompilationDatabase.cpp | 58 +- clang/lib/Tooling/Core/Replacement.cpp | 2 +- .../DependencyScanningFilesystem.cpp | 20 +- .../DependencyScanningWorker.cpp | 24 +- .../DependencyScanning/ModuleDepCollector.cpp | 13 +- clang/lib/Tooling/FileMatchTrie.cpp | 14 +- clang/lib/Tooling/Inclusions/HeaderIncludes.cpp | 52 +- clang/lib/Tooling/Inclusions/IncludeStyle.cpp | 1 + clang/lib/Tooling/JSONCompilationDatabase.cpp | 48 +- clang/lib/Tooling/Refactoring/ASTSelection.cpp | 2 +- clang/lib/Tooling/{Core => Refactoring}/Lookup.cpp | 2 +- .../lib/Tooling/Refactoring/RefactoringActions.cpp | 4 +- .../Refactoring/Rename/SymbolOccurrences.cpp | 5 +- clang/lib/Tooling/Refactoring/Rename/USRFinder.cpp | 4 +- .../Refactoring/Rename/USRFindingAction.cpp | 52 +- .../Tooling/Refactoring/Rename/USRLocFinder.cpp | 2 +- clang/lib/Tooling/Syntax/BuildTree.cpp | 819 ++- clang/lib/Tooling/Syntax/ComputeReplacements.cpp | 15 +- clang/lib/Tooling/Syntax/Mutations.cpp | 36 +- clang/lib/Tooling/Syntax/Nodes.cpp | 604 +-- clang/lib/Tooling/Syntax/Synthesis.cpp | 224 +- clang/lib/Tooling/Syntax/Tokens.cpp | 89 +- clang/lib/Tooling/Syntax/Tree.cpp | 412 +- clang/lib/Tooling/Tooling.cpp | 71 +- clang/lib/Tooling/Transformer/Parsing.cpp | 8 +- clang/lib/Tooling/Transformer/RangeSelector.cpp | 26 +- clang/lib/Tooling/Transformer/RewriteRule.cpp | 262 +- clang/lib/Tooling/Transformer/Stencil.cpp | 77 +- clang/lib/Tooling/Transformer/Transformer.cpp | 42 +- clang/tools/clang-format/ClangFormat.cpp | 32 +- clang/tools/driver/cc1_main.cpp | 10 +- clang/tools/driver/cc1as_main.cpp | 29 +- clang/tools/driver/driver.cpp | 7 + clang/utils/TableGen/ClangASTPropertiesEmitter.cpp | 12 +- clang/utils/TableGen/ClangAttrEmitter.cpp | 56 +- clang/utils/TableGen/ClangDiagnosticsEmitter.cpp | 5 + clang/utils/TableGen/ClangOptionDocEmitter.cpp | 2 - clang/utils/TableGen/ClangSyntaxEmitter.cpp | 236 + clang/utils/TableGen/NeonEmitter.cpp | 25 +- clang/utils/TableGen/SveEmitter.cpp | 20 +- clang/utils/TableGen/TableGen.cpp | 12 + clang/utils/TableGen/TableGenBackends.h | 8 +- compiler-rt/.clang-tidy | 2 + compiler-rt/include/fuzzer/FuzzedDataProvider.h | 9 + compiler-rt/include/profile/InstrProfData.inc | 139 +- compiler-rt/include/sanitizer/asan_interface.h | 16 +- .../include/sanitizer/common_interface_defs.h | 9 +- compiler-rt/include/sanitizer/dfsan_interface.h | 8 +- compiler-rt/include/sanitizer/hwasan_interface.h | 3 + compiler-rt/include/sanitizer/memprof_interface.h | 65 + compiler-rt/include/sanitizer/msan_interface.h | 3 + .../include/sanitizer/netbsd_syscall_hooks.h | 213 +- compiler-rt/lib/asan/asan_allocator.cpp | 479 +- compiler-rt/lib/asan/asan_allocator.h | 11 +- compiler-rt/lib/asan/asan_flags.cpp | 10 +- compiler-rt/lib/asan/asan_fuchsia.cpp | 35 +- compiler-rt/lib/asan/asan_interceptors.cpp | 41 +- compiler-rt/lib/asan/asan_interceptors.h | 22 +- compiler-rt/lib/asan/asan_interceptors_vfork.S | 3 +- compiler-rt/lib/asan/asan_interface_internal.h | 4 +- compiler-rt/lib/asan/asan_internal.h | 2 - compiler-rt/lib/asan/asan_linux.cpp | 45 +- compiler-rt/lib/asan/asan_mac.cpp | 48 +- compiler-rt/lib/asan/asan_malloc_linux.cpp | 10 +- compiler-rt/lib/asan/asan_malloc_local.h | 2 +- compiler-rt/lib/asan/asan_mapping.h | 21 + compiler-rt/lib/asan/asan_poisoning.cpp | 6 - compiler-rt/lib/asan/asan_premap_shadow.cpp | 18 +- compiler-rt/lib/asan/asan_report.cpp | 5 +- compiler-rt/lib/asan/asan_rtems.cpp | 6 + compiler-rt/lib/asan/asan_rtl.cpp | 5 +- compiler-rt/lib/asan/asan_shadow_setup.cpp | 45 +- compiler-rt/lib/asan/asan_stack.h | 5 - compiler-rt/lib/asan/asan_thread.cpp | 27 +- compiler-rt/lib/asan/asan_thread.h | 7 +- compiler-rt/lib/asan/asan_win.cpp | 19 +- compiler-rt/lib/builtins/README.txt | 2 + compiler-rt/lib/builtins/aarch64/lse.S | 236 + compiler-rt/lib/builtins/assembly.h | 93 +- compiler-rt/lib/builtins/atomic.c | 90 +- compiler-rt/lib/builtins/clear_cache.c | 14 +- compiler-rt/lib/builtins/cpu_model.c | 65 +- compiler-rt/lib/builtins/divdf3.c | 189 +- compiler-rt/lib/builtins/divdi3.c | 15 +- compiler-rt/lib/builtins/divmoddi4.c | 13 +- compiler-rt/lib/builtins/divmodsi4.c | 13 +- compiler-rt/lib/builtins/divmodti4.c | 32 + compiler-rt/lib/builtins/divsf3.c | 174 +- compiler-rt/lib/builtins/divsi3.c | 25 +- compiler-rt/lib/builtins/divtf3.c | 203 +- compiler-rt/lib/builtins/divti3.c | 15 +- compiler-rt/lib/builtins/emutls.c | 7 +- compiler-rt/lib/builtins/extendhfsf2.c | 6 +- compiler-rt/lib/builtins/extendhftf2.c | 23 + compiler-rt/lib/builtins/fp_div_impl.inc | 419 ++ compiler-rt/lib/builtins/fp_extend.h | 4 + compiler-rt/lib/builtins/fp_lib.h | 7 + compiler-rt/lib/builtins/fp_trunc.h | 4 + compiler-rt/lib/builtins/int_div_impl.inc | 25 + compiler-rt/lib/builtins/int_mulo_impl.inc | 49 + compiler-rt/lib/builtins/int_mulv_impl.inc | 47 + compiler-rt/lib/builtins/int_util.h | 16 + compiler-rt/lib/builtins/moddi3.c | 16 +- compiler-rt/lib/builtins/modti3.c | 16 +- compiler-rt/lib/builtins/mulodi4.c | 33 +- compiler-rt/lib/builtins/mulosi4.c | 33 +- compiler-rt/lib/builtins/muloti4.c | 33 +- compiler-rt/lib/builtins/mulvdi3.c | 33 +- compiler-rt/lib/builtins/mulvsi3.c | 33 +- compiler-rt/lib/builtins/mulvti3.c | 33 +- compiler-rt/lib/builtins/os_version_check.c | 108 +- compiler-rt/lib/builtins/paritydi2.c | 6 +- compiler-rt/lib/builtins/parityti2.c | 8 +- compiler-rt/lib/builtins/riscv/int_mul_impl.inc | 6 +- compiler-rt/lib/builtins/truncdfhf2.c | 4 +- compiler-rt/lib/builtins/truncsfhf2.c | 6 +- compiler-rt/lib/builtins/trunctfhf2.c | 23 + compiler-rt/lib/cfi/cfi.cpp | 2 +- compiler-rt/lib/crt/crtbegin.c | 8 + compiler-rt/lib/dfsan/dfsan.cpp | 100 +- compiler-rt/lib/dfsan/dfsan_custom.cpp | 201 +- compiler-rt/lib/dfsan/dfsan_flags.inc | 4 - compiler-rt/lib/dfsan/dfsan_interceptors.cpp | 41 +- compiler-rt/lib/dfsan/done_abilist.txt | 85 + compiler-rt/lib/fuzzer/FuzzerCorpus.h | 62 +- compiler-rt/lib/fuzzer/FuzzerDataFlowTrace.cpp | 2 +- compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 91 +- compiler-rt/lib/fuzzer/FuzzerExtFunctionsWeak.cpp | 2 +- compiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp | 2 +- compiler-rt/lib/fuzzer/FuzzerFlags.def | 37 +- compiler-rt/lib/fuzzer/FuzzerFork.cpp | 14 +- compiler-rt/lib/fuzzer/FuzzerIO.cpp | 45 + compiler-rt/lib/fuzzer/FuzzerIO.h | 6 + compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp | 8 +- compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp | 14 +- compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp | 253 + compiler-rt/lib/fuzzer/FuzzerInternal.h | 4 +- compiler-rt/lib/fuzzer/FuzzerLoop.cpp | 69 +- compiler-rt/lib/fuzzer/FuzzerMutate.cpp | 40 +- compiler-rt/lib/fuzzer/FuzzerMutate.h | 14 +- compiler-rt/lib/fuzzer/FuzzerOptions.h | 9 +- compiler-rt/lib/fuzzer/FuzzerPlatform.h | 18 +- compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | 34 +- compiler-rt/lib/fuzzer/FuzzerTracePC.h | 6 +- compiler-rt/lib/fuzzer/FuzzerUtil.h | 6 + compiler-rt/lib/fuzzer/FuzzerUtilFuchsia.cpp | 19 +- compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp | 2 +- compiler-rt/lib/fuzzer/FuzzerUtilPosix.cpp | 4 +- compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 14 +- compiler-rt/lib/gwp_asan/common.cpp | 3 + compiler-rt/lib/gwp_asan/crash_handler.cpp | 24 +- compiler-rt/lib/gwp_asan/crash_handler.h | 2 +- compiler-rt/lib/gwp_asan/definitions.h | 2 +- .../lib/gwp_asan/guarded_pool_allocator.cpp | 114 +- compiler-rt/lib/gwp_asan/guarded_pool_allocator.h | 78 +- compiler-rt/lib/gwp_asan/mutex.h | 14 +- compiler-rt/lib/gwp_asan/optional/backtrace.h | 48 +- .../lib/gwp_asan/optional/backtrace_fuchsia.cpp | 21 + .../lib/gwp_asan/optional/backtrace_linux_libc.cpp | 25 +- .../optional/backtrace_sanitizer_common.cpp | 49 +- .../lib/gwp_asan/optional/options_parser.cpp | 249 +- compiler-rt/lib/gwp_asan/optional/options_parser.h | 12 +- compiler-rt/lib/gwp_asan/optional/printf.h | 33 + compiler-rt/lib/gwp_asan/optional/segv_handler.h | 70 +- .../lib/gwp_asan/optional/segv_handler_fuchsia.cpp | 22 + .../lib/gwp_asan/optional/segv_handler_posix.cpp | 182 +- compiler-rt/lib/gwp_asan/options.inc | 30 +- .../gwp_asan/platform_specific/common_fuchsia.cpp | 15 + .../gwp_asan/platform_specific/common_posix.cpp | 6 +- .../guarded_pool_allocator_fuchsia.cpp | 103 + .../guarded_pool_allocator_fuchsia.h | 22 + .../guarded_pool_allocator_posix.cpp | 64 +- .../guarded_pool_allocator_posix.h | 18 + .../platform_specific/guarded_pool_allocator_tls.h | 55 + .../gwp_asan/platform_specific/mutex_fuchsia.cpp | 21 + .../lib/gwp_asan/platform_specific/mutex_fuchsia.h | 23 + .../lib/gwp_asan/platform_specific/mutex_posix.h | 23 + .../platform_specific/utilities_fuchsia.cpp | 19 + .../gwp_asan/platform_specific/utilities_posix.cpp | 65 +- compiler-rt/lib/gwp_asan/random.cpp | 31 - compiler-rt/lib/gwp_asan/random.h | 23 - compiler-rt/lib/gwp_asan/utilities.cpp | 63 + compiler-rt/lib/gwp_asan/utilities.h | 18 +- compiler-rt/lib/hwasan/hwasan.cpp | 4 +- compiler-rt/lib/hwasan/hwasan.h | 9 +- compiler-rt/lib/hwasan/hwasan_allocator.cpp | 20 +- compiler-rt/lib/hwasan/hwasan_allocator.h | 14 +- compiler-rt/lib/hwasan/hwasan_dynamic_shadow.cpp | 50 +- compiler-rt/lib/hwasan/hwasan_interceptors_vfork.S | 1 + compiler-rt/lib/hwasan/hwasan_interface_internal.h | 3 + compiler-rt/lib/hwasan/hwasan_linux.cpp | 74 +- compiler-rt/lib/hwasan/hwasan_malloc_bisect.h | 2 +- compiler-rt/lib/hwasan/hwasan_mapping.h | 9 + compiler-rt/lib/hwasan/hwasan_new_delete.cpp | 39 +- compiler-rt/lib/hwasan/hwasan_report.cpp | 25 +- compiler-rt/lib/hwasan/hwasan_thread.h | 2 - compiler-rt/lib/hwasan/hwasan_thread_list.h | 63 +- compiler-rt/lib/interception/interception.h | 4 +- .../lib/interception/interception_linux.cpp | 10 +- compiler-rt/lib/interception/interception_linux.h | 10 +- compiler-rt/lib/interception/interception_win.cpp | 6 +- compiler-rt/lib/lsan/lsan.cpp | 4 +- compiler-rt/lib/lsan/lsan_allocator.cpp | 10 + compiler-rt/lib/lsan/lsan_common.cpp | 298 +- compiler-rt/lib/lsan/lsan_common.h | 20 +- compiler-rt/lib/lsan/lsan_common_fuchsia.cpp | 7 +- compiler-rt/lib/lsan/lsan_common_linux.cpp | 5 + compiler-rt/lib/lsan/lsan_fuchsia.h | 2 +- compiler-rt/lib/lsan/lsan_interceptors.cpp | 17 +- compiler-rt/lib/lsan/lsan_posix.h | 2 +- compiler-rt/lib/lsan/lsan_thread.cpp | 5 + compiler-rt/lib/lsan/lsan_thread.h | 2 + compiler-rt/lib/memprof/README.txt | 17 + compiler-rt/lib/memprof/memprof.syms.extra | 1 + compiler-rt/lib/memprof/memprof_allocator.cpp | 905 ++++ compiler-rt/lib/memprof/memprof_allocator.h | 105 + compiler-rt/lib/memprof/memprof_descriptions.cpp | 70 + compiler-rt/lib/memprof/memprof_descriptions.h | 45 + compiler-rt/lib/memprof/memprof_flags.cpp | 93 + compiler-rt/lib/memprof/memprof_flags.h | 45 + compiler-rt/lib/memprof/memprof_flags.inc | 49 + compiler-rt/lib/memprof/memprof_init_version.h | 26 + compiler-rt/lib/memprof/memprof_interceptors.cpp | 366 ++ compiler-rt/lib/memprof/memprof_interceptors.h | 54 + .../memprof/memprof_interceptors_memintrinsics.cpp | 29 + .../memprof/memprof_interceptors_memintrinsics.h | 79 + .../lib/memprof/memprof_interface_internal.h | 64 + compiler-rt/lib/memprof/memprof_internal.h | 104 + compiler-rt/lib/memprof/memprof_linux.cpp | 80 + compiler-rt/lib/memprof/memprof_malloc_linux.cpp | 226 + compiler-rt/lib/memprof/memprof_mapping.h | 113 + compiler-rt/lib/memprof/memprof_new_delete.cpp | 145 + compiler-rt/lib/memprof/memprof_posix.cpp | 55 + compiler-rt/lib/memprof/memprof_preinit.cpp | 23 + compiler-rt/lib/memprof/memprof_rtl.cpp | 321 ++ compiler-rt/lib/memprof/memprof_shadow_setup.cpp | 62 + compiler-rt/lib/memprof/memprof_stack.cpp | 59 + compiler-rt/lib/memprof/memprof_stack.h | 75 + compiler-rt/lib/memprof/memprof_stats.cpp | 157 + compiler-rt/lib/memprof/memprof_stats.h | 61 + compiler-rt/lib/memprof/memprof_thread.cpp | 220 + compiler-rt/lib/memprof/memprof_thread.h | 138 + compiler-rt/lib/memprof/weak_symbols.txt | 1 + compiler-rt/lib/msan/msan.cpp | 51 +- compiler-rt/lib/msan/msan_interceptors.cpp | 10 +- compiler-rt/lib/msan/msan_interface_internal.h | 10 +- compiler-rt/lib/msan/msan_linux.cpp | 3 +- compiler-rt/lib/msan/msan_poisoning.cpp | 81 +- compiler-rt/lib/msan/msan_thread.cpp | 58 +- compiler-rt/lib/msan/msan_thread.h | 24 +- compiler-rt/lib/profile/GCDAProfiling.c | 94 +- compiler-rt/lib/profile/InstrProfiling.c | 6 +- compiler-rt/lib/profile/InstrProfiling.h | 9 + compiler-rt/lib/profile/InstrProfilingBuffer.c | 24 +- compiler-rt/lib/profile/InstrProfilingFile.c | 35 +- compiler-rt/lib/profile/InstrProfilingInternal.c | 3 + .../lib/profile/InstrProfilingPlatformDarwin.c | 3 + .../lib/profile/InstrProfilingPlatformLinux.c | 2 +- compiler-rt/lib/profile/InstrProfilingPort.h | 16 +- compiler-rt/lib/profile/InstrProfilingValue.c | 39 +- compiler-rt/lib/profile/InstrProfilingVersionVar.c | 17 + *** 864380 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:18:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 55110548356 for ; Tue, 16 Feb 2021 20:18: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 4DgC3B1tfzz3KxD; Tue, 16 Feb 2021 20:18: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 33C3517ACA; Tue, 16 Feb 2021 20:18: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 11GKIUvp038933; Tue, 16 Feb 2021 20:18:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKIU1n038932; Tue, 16 Feb 2021 20:18:30 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:18:30 GMT Message-Id: <202102162018.11GKIU1n038932@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 16ef12a32c23 - Create tag vendor/llvm-project/llvmorg-12-init-17869-g8e464dd76bef 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/tags/vendor/llvm-project/llvmorg-12-init-17869-g8e464dd76bef X-Git-Reftype: annotated tag X-Git-Commit: 16ef12a32c23a850413fb2baa7879a81f4ed58aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:18:30 -0000 The annotated tag vendor/llvm-project/llvmorg-12-init-17869-g8e464dd76bef has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-12-init-17869-g8e464dd76bef tag vendor/llvm-project/llvmorg-12-init-17869-g8e464dd76bef Tagger: Dimitry Andric TaggerDate: 2021-02-16 20:16:00 +0000 Tag llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. commit b60736ec1405bb0a8dd40989f67ef4c93da068ab Author: Dimitry Andric AuthorDate: 2021-02-16 20:13:02 +0000 Commit: Dimitry Andric CommitDate: 2021-02-16 20:13:02 +0000 Vendor import of llvm-project main 8e464dd76bef, the last commit before the upstream release/12.x branch was created. From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:18:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2BA89548426; Tue, 16 Feb 2021 20:18: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 4DgC3f72NVz3L8l; Tue, 16 Feb 2021 20:18:54 +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 E09BB179A2; Tue, 16 Feb 2021 20:18:54 +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 11GKIs5X039109; Tue, 16 Feb 2021 20:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKIs1U039108; Tue, 16 Feb 2021 20:18:54 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:18:54 GMT Message-Id: <202102162018.11GKIs1U039108@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 600eade2fb4f - main - Add ifa_try_ref() to simplify ifa handling inside epoch. 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/main X-Git-Reftype: branch X-Git-Commit: 600eade2fb4faacfcd408a01140ef15f85f0c817 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:18:55 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=600eade2fb4faacfcd408a01140ef15f85f0c817 commit 600eade2fb4faacfcd408a01140ef15f85f0c817 Author: Alexander V. Chernikov AuthorDate: 2021-02-16 20:12:58 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-16 20:14:50 +0000 Add ifa_try_ref() to simplify ifa handling inside epoch. More and more code migrates from lock-based protection to the NET_EPOCH umbrella. It requires some logic changes, including, notably, refcount handling. When we have an `ifa` pointer and we're running inside epoch we're guaranteed that this pointer will not be freed. However, the following case can still happen: * in thread 1 we drop to 0 refcount for ifa and schedule its deletion. * in thread 2 we use this ifa and reference it * destroy callout kicks in * unhappy user reports bug To address it, new `ifa_try_ref()` function is added, allowing to return failure when we try to reference `ifa` with 0 refcount. Additionally, existing `ifa_ref()` is enforced with `KASSERT` to provide cleaner error in such scenarious. Reviewed By: rstone, donner Differential Revision: https://reviews.freebsd.org/D28639 MFC after: 1 week --- sys/net/if.c | 12 +++++++++++- sys/net/if_var.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/net/if.c b/sys/net/if.c index c85cfab19bf6..948be6876b65 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1857,8 +1857,18 @@ fail: void ifa_ref(struct ifaddr *ifa) { + u_int old; - refcount_acquire(&ifa->ifa_refcnt); + old = refcount_acquire(&ifa->ifa_refcnt); + KASSERT(old > 0, ("%s: ifa %p has 0 refs", __func__, ifa)); +} + +int +ifa_try_ref(struct ifaddr *ifa) +{ + + NET_EPOCH_ASSERT(); + return (refcount_acquire_if_not_zero(&ifa->ifa_refcnt)); } static void diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 9ecdfb684296..291a7781d73c 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -577,6 +577,7 @@ struct ifaddr { struct ifaddr * ifa_alloc(size_t size, int flags); void ifa_free(struct ifaddr *ifa); void ifa_ref(struct ifaddr *ifa); +int ifa_try_ref(struct ifaddr *ifa); /* * Multicast address structure. This is analogous to the ifaddr From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:31:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A4F9548556; Tue, 16 Feb 2021 20:31: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 4DgCKc6xBYz3M8D; Tue, 16 Feb 2021 20:31: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 E153017E19; Tue, 16 Feb 2021 20:31: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 11GKV0Uj060308; Tue, 16 Feb 2021 20:31:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKV0T6060307; Tue, 16 Feb 2021 20:31:00 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:31:00 GMT Message-Id: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. 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/main X-Git-Reftype: branch X-Git-Commit: 2fe5a79425c79f7b828acd91da66d97230925fc8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:31:01 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=2fe5a79425c79f7b828acd91da66d97230925fc8 commit 2fe5a79425c79f7b828acd91da66d97230925fc8 Author: Alexander V. Chernikov AuthorDate: 2021-02-16 20:30:04 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-16 20:30:04 +0000 Fix dst/netmask handling in routing socket code. Traditionally routing socket code did almost zero checks on the input message except for the most basic size checks. This resulted in the unclear KPI boundary for the routing system code (`rtrequest*` and now `rib_action()`) w.r.t message validness. Multiple potential problems and nuances exists: * Host bits in RTAX_DST sockaddr. Existing applications do send prefixes with hostbits uncleared. Even `route(8)` does this, as they hope the kernel would do the job of fixing it. Code inside `rib_action()` needs to handle it on its own (see `rt_maskedcopy()` ugly hack). * There are multiple way of adding the host route: it can be DST without netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be set correspondingly. Currently, these 2 options create 2 DIFFERENT routes in the kernel. * no sockaddr length/content checking for the "secondary" fields exists: nothing stops rtsock application to send sockaddr_in with length of 25 (instead of 16). Kernel will accept it, install to RIB as is and propagate to all rtsock consumers, potentially triggering bugs in their code. Same goes for sin_port, sin_zero, etc. The goal of this change is to make rtsock verify all sockaddr and prefix consistency. Said differently, `rib_action()` or internals should NOT require to change any of the sockaddrs supplied by `rt_addrinfo` structure due to incorrectness. To be more specific, this change implements the following: * sockaddr cleanup/validation check is added immediately after getting sockaddrs from rtm. * Per-family dst/netmask checks clears host bits in dst and zeros all dst/netmask "secondary" fields. * The same netmask checking code converts /32(/128) netmasks to "host" route case (NULL netmask, RTF_HOST), removing the dualism. * Instead of allowing ANY "known" sockaddr families (0<.. Reviewed By: donner Differential Revision: https://reviews.freebsd.org/D28668 MFC after: 3 days --- sys/net/rtsock.c | 201 +++++++++++++++++++++++++++++++++- tests/sys/net/routing/rtsock_common.h | 4 - 2 files changed, 195 insertions(+), 10 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3a98b366dfc3..40ce62c77c2a 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -70,6 +70,7 @@ #include #include #ifdef INET6 +#include #include #include #endif @@ -173,6 +174,7 @@ static int rtsock_msg_buffer(int type, struct rt_addrinfo *rtinfo, struct walkarg *w, int *plen); static int rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo); +static int cleanup_xaddrs(struct rt_addrinfo *info); static int sysctl_dumpentry(struct rtentry *rt, void *vw); static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, uint32_t weight, struct walkarg *w); @@ -636,11 +638,9 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, u_int fibnum, struct rt_addrinfo * return (EINVAL); info->rti_flags = rtm->rtm_flags; - if (info->rti_info[RTAX_DST] == NULL || - info->rti_info[RTAX_DST]->sa_family >= AF_MAX || - (info->rti_info[RTAX_GATEWAY] != NULL && - info->rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) - return (EINVAL); + error = cleanup_xaddrs(info); + if (error != 0) + return (error); saf = info->rti_info[RTAX_DST]->sa_family; /* * Verify that the caller has the appropriate privilege; RTM_GET @@ -739,7 +739,14 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, RIB_RLOCK(rnh); - if (info->rti_info[RTAX_NETMASK] == NULL) { + /* + * By (implicit) convention host route (one without netmask) + * means longest-prefix-match request and the route with netmask + * means exact-match lookup. + * As cleanup_xaddrs() cleans up info flags&addrs for the /32,/128 + * prefixes, use original data to check for the netmask presence. + */ + if ((rtm->rtm_addrs & RTA_NETMASK) == 0) { /* * Provide longest prefix match for * address lookup (no mask). @@ -1286,6 +1293,188 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo) return (0); } +static inline void +fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) +{ + + const struct sockaddr_in nsin = { + .sin_family = AF_INET, + .sin_len = sizeof(struct sockaddr_in), + .sin_addr = addr, + }; + *sin = nsin; +} + +static inline void +fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr *addr6, + uint32_t scopeid) +{ + + const struct sockaddr_in6 nsin6 = { + .sin6_family = AF_INET6, + .sin6_len = sizeof(struct sockaddr_in6), + .sin6_addr = *addr6, + .sin6_scope_id = scopeid, + }; + *sin6 = nsin6; +} + +static int +cleanup_xaddrs_gateway(struct rt_addrinfo *info) +{ + struct sockaddr *gw = info->rti_info[RTAX_GATEWAY]; + + switch (gw->sa_family) { +#ifdef INET + case AF_INET: + { + struct sockaddr_in *gw_sin = (struct sockaddr_in *)gw; + if (gw_sin->sin_len < sizeof(struct sockaddr_in)) { + printf("gw sin_len too small\n"); + return (EINVAL); + } + fill_sockaddr_inet(gw_sin, gw_sin->sin_addr); + } + break; +#endif +#ifdef INET6 + case AF_INET6: + { + struct sockaddr_in6 *gw_sin6 = (struct sockaddr_in6 *)gw; + if (gw_sin6->sin6_len < sizeof(struct sockaddr_in6)) { + printf("gw sin6_len too small\n"); + return (EINVAL); + } + fill_sockaddr_inet6(gw_sin6, &gw_sin6->sin6_addr, 0); + break; + } +#endif + case AF_LINK: + { + struct sockaddr_dl_short *gw_sdl; + + gw_sdl = (struct sockaddr_dl_short *)gw; + if (gw_sdl->sdl_len < sizeof(struct sockaddr_dl_short)) { + printf("gw sdl_len too small\n"); + return (EINVAL); + } + + const struct sockaddr_dl_short sdl = { + .sdl_family = AF_LINK, + .sdl_len = sizeof(struct sockaddr_dl_short), + .sdl_index = gw_sdl->sdl_index, + }; + *gw_sdl = sdl; + break; + } + } + + return (0); +} + +static int +cleanup_xaddrs_inet(struct rt_addrinfo *info) +{ + struct sockaddr_in *dst_sa, *mask_sa; + + /* Check & fixup dst/netmask combination first */ + dst_sa = (struct sockaddr_in *)info->rti_info[RTAX_DST]; + mask_sa = (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; + + struct in_addr mask = { + .s_addr = mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, + }; + struct in_addr dst = { + .s_addr = htonl(ntohl(dst_sa->sin_addr.s_addr) & ntohl(mask.s_addr)) + }; + + if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { + printf("dst sin_len too small\n"); + return (EINVAL); + } + if (mask_sa && mask_sa->sin_len < sizeof(struct sockaddr_in)) { + printf("mask sin_len too small\n"); + return (EINVAL); + } + fill_sockaddr_inet(dst_sa, dst); + + if (mask.s_addr != INADDR_BROADCAST) + fill_sockaddr_inet(mask_sa, mask); + else { + info->rti_info[RTAX_NETMASK] = NULL; + info->rti_flags |= RTF_HOST; + info->rti_addrs &= ~RTA_NETMASK; + } + + /* Check gateway */ + if (info->rti_info[RTAX_GATEWAY] != NULL) + return (cleanup_xaddrs_gateway(info)); + + return (0); +} + +static int +cleanup_xaddrs_inet6(struct rt_addrinfo *info) +{ + struct sockaddr_in6 *dst_sa, *mask_sa; + struct in6_addr mask; + + /* Check & fixup dst/netmask combination first */ + dst_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_DST]; + mask_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK]; + + mask = mask_sa ? mask_sa->sin6_addr : in6mask128; + IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); + + if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { + printf("dst sin6_len too small\n"); + return (EINVAL); + } + if (mask_sa && mask_sa->sin6_len < sizeof(struct sockaddr_in6)) { + printf("mask sin6_len too small\n"); + return (EINVAL); + } + fill_sockaddr_inet6(dst_sa, &dst_sa->sin6_addr, 0); + + if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) + fill_sockaddr_inet6(mask_sa, &mask, 0); + else { + info->rti_info[RTAX_NETMASK] = NULL; + info->rti_flags |= RTF_HOST; + info->rti_addrs &= ~RTA_NETMASK; + } + + /* Check gateway */ + if (info->rti_info[RTAX_GATEWAY] != NULL) + return (cleanup_xaddrs_gateway(info)); + + return (0); +} + +static int +cleanup_xaddrs(struct rt_addrinfo *info) +{ + int error = EAFNOSUPPORT; + + if (info->rti_info[RTAX_DST] == NULL) + return (EINVAL); + + switch (info->rti_info[RTAX_DST]->sa_family) { +#ifdef INET + case AF_INET: + error = cleanup_xaddrs_inet(info); + break; +#endif +#ifdef INET6 + case AF_INET6: + error = cleanup_xaddrs_inet6(info); + break; +#endif + } + + return (error); +} + /* * Fill in @dmask with valid netmask leaving original @smask * intact. Mostly used with radix netmasks. diff --git a/tests/sys/net/routing/rtsock_common.h b/tests/sys/net/routing/rtsock_common.h index 7da88e0eb512..71476d2b5f3c 100644 --- a/tests/sys/net/routing/rtsock_common.h +++ b/tests/sys/net/routing/rtsock_common.h @@ -826,10 +826,6 @@ _validate_message_sockaddrs(char *buffer, int rtm_len, size_t offset, int rtm_ad } sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); } - - RTSOCK_ATF_REQUIRE_MSG((struct rt_msghdr *)buffer, parsed_len == rtm_len, - "message len != parsed len: expected %d parsed %d", - rtm_len, (int)parsed_len); } /* From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:34:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 09958548D5B; Tue, 16 Feb 2021 20:34: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 4DgCQ36wCzz3MSk; Tue, 16 Feb 2021 20:34:51 +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 E04351819E; Tue, 16 Feb 2021 20:34:51 +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 11GKYpwW065021; Tue, 16 Feb 2021 20:34:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKYpns065020; Tue, 16 Feb 2021 20:34:51 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:34:51 GMT Message-Id: <202102162034.11GKYpns065020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 568d9aa2b5bc - stable/12 - cxgbe(4): Check for descriptors before writing a TLS or raw work request. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 568d9aa2b5bc1ce3c54dbb2586c75a4423db3399 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:34:52 -0000 The branch stable/12 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=568d9aa2b5bc1ce3c54dbb2586c75a4423db3399 commit 568d9aa2b5bc1ce3c54dbb2586c75a4423db3399 Author: Navdeep Parhar AuthorDate: 2020-08-31 22:44:59 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-16 20:32:35 +0000 cxgbe(4): Check for descriptors before writing a TLS or raw work request. (cherry picked from commit 565b8fce23e6250b673a956ce753e37b201a5847) --- sys/dev/cxgbe/t4_sge.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 64a85440e440..d8f947d20f7e 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -3136,16 +3136,18 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) MPASS(rc != 0 && rc != EAGAIN); MPASS(txp->npkt == 0); + + n = tx_len16_to_desc(mbuf_len16(m0)); + if (__predict_false(avail < n)) { + avail += reclaim_tx_descs(txq, min(n, 32)); + if (avail < n) + break; /* out of descriptors */ + } + wr = &eq->desc[eq->pidx]; if (mbuf_cflags(m0) & MC_RAW_WR) { n = write_raw_wr(txq, wr, m0, avail); } else { - n = tx_len16_to_desc(mbuf_len16(m0)); - if (__predict_false(avail < n)) { - avail += reclaim_tx_descs(txq, 32); - if (avail < n) - break; /* out of descriptors */ - } ETHER_BPF_MTAP(ifp, m0); if (vi->flags & TX_USES_VM_WR) n = write_txpkt_vm_wr(sc, txq, m0); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:38:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2615E548E6E; Tue, 16 Feb 2021 20:38: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 4DgCVJ0cSyz3Mc5; Tue, 16 Feb 2021 20:38: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 037DF180B4; Tue, 16 Feb 2021 20:38: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 11GKcVpr065693; Tue, 16 Feb 2021 20:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKcVQb065692; Tue, 16 Feb 2021 20:38:31 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:38:31 GMT Message-Id: <202102162038.11GKcVQb065692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 42f7f5c5d22c - stable/12 - cxgbe(4): Fixes to tx coalescing. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 42f7f5c5d22cc9e845e51a1f8a5b92573b8b3d2f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:38:32 -0000 The branch stable/12 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=42f7f5c5d22cc9e845e51a1f8a5b92573b8b3d2f commit 42f7f5c5d22cc9e845e51a1f8a5b92573b8b3d2f Author: Navdeep Parhar AuthorDate: 2021-02-01 11:00:09 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-16 20:37:07 +0000 cxgbe(4): Fixes to tx coalescing. - The behavior implemented in r362905 resulted in delayed transmission of packets in some cases, causing performance issues. Use a different heuristic to predict tx requests. - Add a tunable/sysctl (hw.cxgbe.tx_coalesce) to disable tx coalescing entirely. It can be changed at any time. There is no change in default behavior. (cherry picked from commit 3447df8bc5b342bd88d565641435284ff620ee2a) --- sys/dev/cxgbe/adapter.h | 4 ++- sys/dev/cxgbe/t4_main.c | 1 + sys/dev/cxgbe/t4_sge.c | 69 ++++++++++++++++++++++++++++++++++++++++--------- sys/dev/cxgbe/t4_vf.c | 1 + 4 files changed, 62 insertions(+), 13 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index fc09bf118653..18dd334a391c 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -561,7 +561,7 @@ struct txpkts { uint8_t wr_type; /* type 0 or type 1 */ uint8_t npkt; /* # of packets in this work request */ uint8_t len16; /* # of 16B pieces used by this work request */ - uint8_t score; /* 1-10. coalescing attempted if score > 3 */ + uint8_t score; uint8_t max_npkt; /* maximum number of packets allowed */ uint16_t plen; /* total payload (sum of all packets) */ @@ -584,6 +584,7 @@ struct sge_txq { struct sglist *gl; __be32 cpl_ctrl0; /* for convenience */ int tc_idx; /* traffic class */ + uint64_t last_tx; /* cycle count when eth_tx was last called */ struct txpkts txp; struct task tx_reclaim_task; @@ -599,6 +600,7 @@ struct sge_txq { uint64_t txpkts1_wrs; /* # of type1 coalesced tx work requests */ uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ + uint64_t txpkts_flush; /* # of times txp had to be sent by tx_update */ uint64_t raw_wrs; /* # of raw work requests (alloc_wr_mbuf) */ uint64_t vxlan_tso_wrs; /* # of VXLAN TSO work requests */ uint64_t vxlan_txcsum; diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 59d88fc54717..939550626c28 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -10277,6 +10277,7 @@ clear_stats(struct adapter *sc, u_int port_id) txq->txpkts1_wrs = 0; txq->txpkts0_pkts = 0; txq->txpkts1_pkts = 0; + txq->txpkts_flush = 0; txq->raw_wrs = 0; txq->vxlan_tso_wrs = 0; txq->vxlan_txcsum = 0; diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index d8f947d20f7e..335fd28644d2 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -208,6 +208,22 @@ static counter_u64_t defrags; SYSCTL_COUNTER_U64(_hw_cxgbe, OID_AUTO, defrags, CTLFLAG_RD, &defrags, "Number of mbuf defrags performed"); +static int t4_tx_coalesce = 1; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_coalesce, CTLFLAG_RWTUN, &t4_tx_coalesce, 0, + "tx coalescing allowed"); + +/* + * The driver will make aggressive attempts at tx coalescing if it sees these + * many packets eligible for coalescing in quick succession, with no more than + * the specified gap in between the eth_tx calls that delivered the packets. + */ +static int t4_tx_coalesce_pkts = 32; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_coalesce_pkts, CTLFLAG_RWTUN, + &t4_tx_coalesce_pkts, 0, + "# of consecutive packets (1 - 255) that will trigger tx coalescing"); +static int t4_tx_coalesce_gap = 5; +SYSCTL_INT(_hw_cxgbe, OID_AUTO, tx_coalesce_gap, CTLFLAG_RWTUN, + &t4_tx_coalesce_gap, 0, "tx gap (in microseconds)"); static int service_iq(struct sge_iq *, int); static int service_iq_fl(struct sge_iq *, int); @@ -3017,6 +3033,26 @@ set_txupdate_flags(struct sge_txq *txq, u_int avail, } } +#if defined(__i386__) || defined(__amd64__) +extern uint64_t tsc_freq; +#endif + +static inline bool +record_eth_tx_time(struct sge_txq *txq) +{ + const uint64_t cycles = get_cyclecount(); + const uint64_t last_tx = txq->last_tx; +#if defined(__i386__) || defined(__amd64__) + const uint64_t itg = tsc_freq * t4_tx_coalesce_gap / 1000000; +#else + const uint64_t itg = 0; +#endif + + MPASS(cycles >= last_tx); + txq->last_tx = cycles; + return (cycles - last_tx < itg); +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. @@ -3034,10 +3070,11 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) u_int n, avail, dbdiff; /* # of hardware descriptors */ int i, rc; struct mbuf *m0; - bool snd; + bool snd, recent_tx; void *wr; /* start of the last WR written to the ring */ TXQ_LOCK_ASSERT_OWNED(txq); + recent_tx = record_eth_tx_time(txq); remaining = IDXDIFF(pidx, cidx, r->size); if (__predict_false(discard_tx(eq))) { @@ -3056,17 +3093,15 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) } /* How many hardware descriptors do we have readily available. */ - if (eq->pidx == eq->cidx) { + if (eq->pidx == eq->cidx) avail = eq->sidx - 1; - if (txp->score++ >= 5) - txp->score = 5; /* tx is completely idle, reset. */ - } else + else avail = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; total = 0; if (remaining == 0) { - if (txp->score-- == 1) /* egr_update had to drain txpkts */ - txp->score = 1; + txp->score = 0; + txq->txpkts_flush++; goto send_txpkts; } @@ -3080,7 +3115,17 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) if (avail < 2 * SGE_MAX_WR_NDESC) avail += reclaim_tx_descs(txq, 64); - if (txp->npkt > 0 || remaining > 1 || txp->score > 3 || + if (t4_tx_coalesce == 0 && txp->npkt == 0) + goto skip_coalescing; + if (cannot_use_txpkts(m0)) + txp->score = 0; + else if (recent_tx) { + if (++txp->score == 0) + txp->score = UINT8_MAX; + } else + txp->score = 1; + if (txp->npkt > 0 || remaining > 1 || + txp->score >= t4_tx_coalesce_pkts || atomic_load_int(&txq->eq.equiq) != 0) { if (vi->flags & TX_USES_VM_WR) rc = add_to_txpkts_vf(sc, txq, m0, avail, &snd); @@ -3095,8 +3140,6 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) for (i = 0; i < txp->npkt; i++) ETHER_BPF_MTAP(ifp, txp->mb[i]); if (txp->npkt > 1) { - if (txp->score++ >= 10) - txp->score = 10; MPASS(avail >= tx_len16_to_desc(txp->len16)); if (vi->flags & TX_USES_VM_WR) n = write_txpkts_vm_wr(sc, txq); @@ -3136,7 +3179,7 @@ eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) MPASS(rc != 0 && rc != EAGAIN); MPASS(txp->npkt == 0); - +skip_coalescing: n = tx_len16_to_desc(mbuf_len16(m0)); if (__predict_false(avail < n)) { avail += reclaim_tx_descs(txq, min(n, 32)); @@ -4350,7 +4393,6 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int idx, M_ZERO | M_WAITOK); txp = &txq->txp; - txp->score = 5; MPASS(nitems(txp->mb) >= sc->params.max_pkts_per_eth_tx_pkts_wr); txq->txp.max_npkt = min(nitems(txp->mb), sc->params.max_pkts_per_eth_tx_pkts_wr); @@ -4409,6 +4451,9 @@ alloc_txq(struct vi_info *vi, struct sge_txq *txq, int idx, SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "txpkts1_pkts", CTLFLAG_RD, &txq->txpkts1_pkts, "# of frames tx'd using type1 txpkts work requests"); + SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "txpkts_flush", + CTLFLAG_RD, &txq->txpkts_flush, + "# of times txpkts had to be flushed out by an egress-update"); SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "raw_wrs", CTLFLAG_RD, &txq->raw_wrs, "# of raw work requests (non-packets)"); SYSCTL_ADD_UQUAD(&vi->ctx, children, OID_AUTO, "vxlan_tso_wrs", diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index 223ffe7aeaa0..6c736e37faac 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -893,6 +893,7 @@ t4vf_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, txq->txpkts1_wrs = 0; txq->txpkts0_pkts = 0; txq->txpkts1_pkts = 0; + txq->txpkts_flush = 0; mp_ring_reset_stats(txq->r); } } From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:40:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D079154907C for ; Tue, 16 Feb 2021 20:40:54 +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 4DgCY25FbQz3Mxh; Tue, 16 Feb 2021 20:40:54 +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 A6F5B1805D; Tue, 16 Feb 2021 20:40:54 +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 11GKesvo076567; Tue, 16 Feb 2021 20:40:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKeswG076562; Tue, 16 Feb 2021 20:40:54 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:40:54 GMT Message-Id: <202102162040.11GKeswG076562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 9f93bc8bfd26 - vendor/llvm-project/release-12.x - Vendor import of llvm-project branch release/12.x llvmorg-12.0.0-rc1-109-gd5d089bf08c9. 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/vendor/llvm-project/release-12.x X-Git-Reftype: branch X-Git-Commit: 9f93bc8bfd2690abd12a830e42a1c26038173ae5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:40:54 -0000 The branch vendor/llvm-project/release-12.x has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9f93bc8bfd2690abd12a830e42a1c26038173ae5 commit 9f93bc8bfd2690abd12a830e42a1c26038173ae5 Author: Dimitry Andric AuthorDate: 2021-02-16 20:39:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-16 20:39:22 +0000 Vendor import of llvm-project branch release/12.x llvmorg-12.0.0-rc1-109-gd5d089bf08c9. --- clang/include/clang/AST/ASTContext.h | 3 + clang/include/clang/AST/DeclCXX.h | 6 + clang/include/clang/AST/Mangle.h | 3 + clang/include/clang/AST/MangleNumberingContext.h | 5 + clang/include/clang/AST/RecursiveASTVisitor.h | 12 + clang/include/clang/ASTMatchers/ASTMatchers.h | 2 +- clang/include/clang/Driver/Options.td | 2 +- clang/include/clang/Lex/VariadicMacroSupport.h | 10 +- clang/include/clang/Sema/Sema.h | 18 +- clang/lib/AST/ASTImporter.cpp | 2 + clang/lib/AST/CXXABI.h | 5 +- clang/lib/AST/DeclCXX.cpp | 14 + clang/lib/AST/ExprConstant.cpp | 31 +- clang/lib/AST/ItaniumCXXABI.cpp | 6 + clang/lib/AST/ItaniumMangle.cpp | 346 +++++++++---- clang/lib/AST/MicrosoftCXXABI.cpp | 33 +- clang/lib/ASTMatchers/ASTMatchFinder.cpp | 48 +- clang/lib/ASTMatchers/ASTMatchersInternal.cpp | 2 +- clang/lib/Basic/ProfileList.cpp | 1 + clang/lib/Basic/Targets/PPC.cpp | 3 - clang/lib/Basic/Targets/RISCV.cpp | 6 +- clang/lib/CodeGen/CGBuiltin.cpp | 2 + clang/lib/CodeGen/CGCUDANV.cpp | 8 + clang/lib/Driver/ToolChains/Arch/RISCV.cpp | 2 +- clang/lib/Driver/ToolChains/Clang.cpp | 12 +- clang/lib/Driver/ToolChains/CommonArgs.cpp | 5 + clang/lib/Driver/ToolChains/Linux.cpp | 9 - clang/lib/Format/UnwrappedLineFormatter.cpp | 2 +- clang/lib/Frontend/CompilerInvocation.cpp | 2 + clang/lib/Headers/avx512fintrin.h | 16 +- clang/lib/Lex/Preprocessor.cpp | 8 +- clang/lib/Lex/TokenLexer.cpp | 10 +- clang/lib/Parse/ParseDecl.cpp | 3 +- clang/lib/Sema/Sema.cpp | 43 +- clang/lib/Sema/SemaDecl.cpp | 88 ++-- clang/lib/Sema/SemaExpr.cpp | 2 +- clang/lib/Sema/SemaLambda.cpp | 10 +- clang/lib/Sema/SemaOpenMP.cpp | 23 +- clang/lib/Sema/TreeTransform.h | 7 +- clang/lib/Serialization/ASTReaderDecl.cpp | 1 + clang/lib/Serialization/ASTWriter.cpp | 1 + .../sanitizer_platform_interceptors.h | 2 +- libcxx/include/__locale | 20 +- libcxx/include/__threading_support | 2 +- libcxx/include/bit | 2 +- libcxx/include/limits | 4 +- libcxx/include/memory | 2 +- libcxx/src/atomic.cpp | 6 + libcxx/src/locale.cpp | 2 +- lld/ELF/InputSection.cpp | 5 +- lld/docs/ReleaseNotes.rst | 20 +- llvm/include/llvm-c/Core.h | 6 +- llvm/include/llvm/Analysis/AssumptionCache.h | 2 +- llvm/include/llvm/CodeGen/TargetLowering.h | 4 + llvm/include/llvm/Demangle/ItaniumDemangle.h | 68 +-- llvm/include/llvm/IR/IntrinsicInst.h | 8 +- llvm/include/llvm/IR/Intrinsics.td | 2 +- llvm/include/llvm/IR/IntrinsicsRISCV.td | 7 +- llvm/include/llvm/IR/PseudoProbe.h | 27 +- .../include/llvm/Passes/StandardInstrumentations.h | 2 + llvm/include/llvm/ProfileData/SampleProf.h | 29 +- llvm/include/llvm/ProfileData/SampleProfReader.h | 4 + llvm/include/llvm/Support/CommandLine.h | 13 + .../llvm/Transforms/IPO/SampleContextTracker.h | 6 +- .../llvm/Transforms/IPO/SampleProfileProbe.h | 41 ++ llvm/lib/Analysis/MemorySSA.cpp | 26 - llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp | 9 +- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- llvm/lib/IR/ConstantFold.cpp | 59 +-- llvm/lib/IR/PseudoProbe.cpp | 41 ++ llvm/lib/IR/Verifier.cpp | 6 - llvm/lib/Passes/PassBuilder.cpp | 6 + llvm/lib/Passes/PassRegistry.def | 1 + llvm/lib/Passes/StandardInstrumentations.cpp | 1 + llvm/lib/ProfileData/SampleProfReader.cpp | 93 ++-- llvm/lib/ProfileData/SampleProfWriter.cpp | 4 +- llvm/lib/Support/CommandLine.cpp | 25 +- .../AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp | 2 +- llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | 24 +- llvm/lib/Target/ARM/ARMISelLowering.cpp | 6 +- llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 12 +- llvm/lib/Target/PowerPC/PPCISelLowering.h | 3 + llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp | 6 +- .../RISCV/MCTargetDesc/RISCVTargetStreamer.cpp | 6 +- llvm/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp | 37 +- llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp | 11 +- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp | 118 +---- llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h | 5 +- llvm/lib/Target/RISCV/RISCVInstrFormatsV.td | 23 +- llvm/lib/Target/RISCV/RISCVInstrInfoB.td | 67 --- llvm/lib/Target/RISCV/RISCVInstrInfoV.td | 100 +--- llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td | 239 +++++---- llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td | 6 +- llvm/lib/Target/VE/VE.h | 10 +- .../Target/X86/Disassembler/X86Disassembler.cpp | 1 + llvm/lib/Target/X86/X86ISelLowering.cpp | 9 +- llvm/lib/Target/X86/X86InstrAVX512.td | 4 +- llvm/lib/Transforms/IPO/SampleContextTracker.cpp | 86 ++- llvm/lib/Transforms/IPO/SampleProfile.cpp | 576 +++++++++++++++++---- llvm/lib/Transforms/IPO/SampleProfileProbe.cpp | 162 +++++- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 10 +- llvm/lib/Transforms/Utils/BuildLibCalls.cpp | 67 --- llvm/lib/Transforms/Utils/InlineFunction.cpp | 12 +- llvm/lib/Transforms/Utils/LoopPeel.cpp | 19 +- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 7 +- llvm/tools/llvm-profdata/llvm-profdata.cpp | 2 +- llvm/utils/TableGen/IntrinsicEmitter.cpp | 4 +- openmp/runtime/src/kmp_config.h.cmake | 4 +- openmp/runtime/src/kmp_runtime.cpp | 6 +- openmp/runtime/src/kmp_settings.cpp | 3 +- 110 files changed, 1966 insertions(+), 1050 deletions(-) diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index ce47d54e44b0..ae69a68608b7 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -538,6 +538,9 @@ private: /// need them (like static local vars). llvm::MapVector MangleNumbers; llvm::MapVector StaticLocalNumbers; + /// Mapping the associated device lambda mangling number if present. + mutable llvm::DenseMap + DeviceLambdaManglingNumbers; /// Mapping that stores parameterIndex values for ParmVarDecls when /// that value exceeds the bitfield size of ParmVarDeclBits.ParameterIndex. diff --git a/clang/include/clang/AST/DeclCXX.h b/clang/include/clang/AST/DeclCXX.h index e32101bb2276..89006b1cfa7f 100644 --- a/clang/include/clang/AST/DeclCXX.h +++ b/clang/include/clang/AST/DeclCXX.h @@ -1735,6 +1735,12 @@ public: getLambdaData().HasKnownInternalLinkage = HasKnownInternalLinkage; } + /// Set the device side mangling number. + void setDeviceLambdaManglingNumber(unsigned Num) const; + + /// Retrieve the device side mangling number. + unsigned getDeviceLambdaManglingNumber() const; + /// Returns the inheritance model used for this record. MSInheritanceModel getMSInheritanceModel() const; diff --git a/clang/include/clang/AST/Mangle.h b/clang/include/clang/AST/Mangle.h index 0e8d6dd53d8a..7b6495d85eb6 100644 --- a/clang/include/clang/AST/Mangle.h +++ b/clang/include/clang/AST/Mangle.h @@ -96,6 +96,9 @@ public: virtual bool shouldMangleCXXName(const NamedDecl *D) = 0; virtual bool shouldMangleStringLiteral(const StringLiteral *SL) = 0; + virtual bool isDeviceMangleContext() const { return false; } + virtual void setDeviceMangleContext(bool) {} + // FIXME: consider replacing raw_ostream & with something like SmallString &. void mangleName(GlobalDecl GD, raw_ostream &); virtual void mangleCXXName(GlobalDecl GD, raw_ostream &) = 0; diff --git a/clang/include/clang/AST/MangleNumberingContext.h b/clang/include/clang/AST/MangleNumberingContext.h index f1ca6a05dbaf..eb33759682d6 100644 --- a/clang/include/clang/AST/MangleNumberingContext.h +++ b/clang/include/clang/AST/MangleNumberingContext.h @@ -52,6 +52,11 @@ public: /// this context. virtual unsigned getManglingNumber(const TagDecl *TD, unsigned MSLocalManglingNumber) = 0; + + /// Retrieve the mangling number of a new lambda expression with the + /// given call operator within the device context. No device number is + /// assigned if there's no device numbering context is associated. + virtual unsigned getDeviceManglingNumber(const CXXMethodDecl *) { return 0; } }; } // end namespace clang diff --git a/clang/include/clang/AST/RecursiveASTVisitor.h b/clang/include/clang/AST/RecursiveASTVisitor.h index 505ea700fd0e..7870cea198a7 100644 --- a/clang/include/clang/AST/RecursiveASTVisitor.h +++ b/clang/include/clang/AST/RecursiveASTVisitor.h @@ -186,6 +186,9 @@ public: /// code, e.g., implicit constructors and destructors. bool shouldVisitImplicitCode() const { return false; } + /// Return whether this visitor should recurse into lambda body + bool shouldVisitLambdaBody() const { return true; } + /// Return whether this visitor should traverse post-order. bool shouldTraversePostOrder() const { return false; } @@ -2057,6 +2060,15 @@ bool RecursiveASTVisitor::TraverseFunctionHelper(FunctionDecl *D) { // by clang. (!D->isDefaulted() || getDerived().shouldVisitImplicitCode()); + if (const auto *MD = dyn_cast(D)) { + if (const CXXRecordDecl *RD = MD->getParent()) { + if (RD->isLambda() && + declaresSameEntity(RD->getLambdaCallOperator(), MD)) { + VisitBody = VisitBody && getDerived().shouldVisitLambdaBody(); + } + } + } + if (VisitBody) { TRY_TO(TraverseStmt(D->getBody())); // Function body. } diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index 6f6dfab59a39..031fa4682c3a 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -344,7 +344,7 @@ extern const internal::VariadicAllOfMatcher decl; /// int number = 42; /// auto [foo, bar] = std::make_pair{42, 42}; /// \endcode -extern const internal::VariadicAllOfMatcher +extern const internal::VariadicDynCastAllOfMatcher decompositionDecl; /// Matches a declaration of a linkage specification. diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 42c5319041d0..1f6c13d5cc96 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -1147,7 +1147,7 @@ def fprofile_update_EQ : Joined<["-"], "fprofile-update=">, defm pseudo_probe_for_profiling : BoolFOption<"pseudo-probe-for-profiling", CodeGenOpts<"PseudoProbeForProfiling">, DefaultFalse, PosFlag, NegFlag, - BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiler">>; + BothFlags<[NoXarchOption, CC1Option], " pseudo probes for sample profiling">>; def forder_file_instrumentation : Flag<["-"], "forder-file-instrumentation">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Generate instrumented code to collect order file into default.profraw file (overridden by '=' form of option or LLVM_PROFILE_FILE env var)">; diff --git a/clang/include/clang/Lex/VariadicMacroSupport.h b/clang/include/clang/Lex/VariadicMacroSupport.h index 989e0ac703c9..119f02201fc6 100644 --- a/clang/include/clang/Lex/VariadicMacroSupport.h +++ b/clang/include/clang/Lex/VariadicMacroSupport.h @@ -39,17 +39,14 @@ namespace clang { assert(Ident__VA_ARGS__->isPoisoned() && "__VA_ARGS__ should be poisoned " "outside an ISO C/C++ variadic " "macro definition!"); - assert( - !Ident__VA_OPT__ || - (Ident__VA_OPT__->isPoisoned() && "__VA_OPT__ should be poisoned!")); + assert(Ident__VA_OPT__->isPoisoned() && "__VA_OPT__ should be poisoned!"); } /// Client code should call this function just before the Preprocessor is /// about to Lex tokens from the definition of a variadic (ISO C/C++) macro. void enterScope() { Ident__VA_ARGS__->setIsPoisoned(false); - if (Ident__VA_OPT__) - Ident__VA_OPT__->setIsPoisoned(false); + Ident__VA_OPT__->setIsPoisoned(false); } /// Client code should call this function as soon as the Preprocessor has @@ -58,8 +55,7 @@ namespace clang { /// (might be explicitly called, and then reinvoked via the destructor). void exitScope() { Ident__VA_ARGS__->setIsPoisoned(true); - if (Ident__VA_OPT__) - Ident__VA_OPT__->setIsPoisoned(true); + Ident__VA_OPT__->setIsPoisoned(true); } ~VariadicMacroScopeGuard() { exitScope(); } diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 7f7c84eb1b1d..2530a2776373 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -6558,7 +6558,7 @@ public: /// Number lambda for linkage purposes if necessary. void handleLambdaNumbering( CXXRecordDecl *Class, CXXMethodDecl *Method, - Optional> Mangling = None); + Optional> Mangling = None); /// Endow the lambda scope info with the relevant properties. void buildLambdaScope(sema::LambdaScopeInfo *LSI, @@ -11948,8 +11948,8 @@ public: /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported)) /// return ExprError(); /// // Otherwise, continue parsing as normal. - SemaDiagnosticBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, - unsigned DiagID); + SemaDiagnosticBuilder + diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD); /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current /// context is "used as host code". @@ -11965,17 +11965,19 @@ public: /// return ExprError(); /// // Otherwise, continue parsing as normal. SemaDiagnosticBuilder diagIfOpenMPHostCode(SourceLocation Loc, - unsigned DiagID); + unsigned DiagID, FunctionDecl *FD); - SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID); + SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID, + FunctionDecl *FD = nullptr); SemaDiagnosticBuilder targetDiag(SourceLocation Loc, - const PartialDiagnostic &PD) { - return targetDiag(Loc, PD.getDiagID()) << PD; + const PartialDiagnostic &PD, + FunctionDecl *FD = nullptr) { + return targetDiag(Loc, PD.getDiagID(), FD) << PD; } /// Check if the expression is allowed to be used in expressions for the /// offloading devices. - void checkDeviceDecl(const ValueDecl *D, SourceLocation Loc); + void checkDeviceDecl(ValueDecl *D, SourceLocation Loc); enum CUDAFunctionTarget { CFT_Device, diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 085c50c0667b..0d723fbbcd8c 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -2848,6 +2848,8 @@ ExpectedDecl ASTNodeImporter::VisitRecordDecl(RecordDecl *D) { return CDeclOrErr.takeError(); D2CXX->setLambdaMangling(DCXX->getLambdaManglingNumber(), *CDeclOrErr, DCXX->hasKnownLambdaInternalLinkage()); + D2CXX->setDeviceLambdaManglingNumber( + DCXX->getDeviceLambdaManglingNumber()); } else if (DCXX->isInjectedClassName()) { // We have to be careful to do a similar dance to the one in // Sema::ActOnStartCXXMemberDeclarations diff --git a/clang/lib/AST/CXXABI.h b/clang/lib/AST/CXXABI.h index 31cb36918726..ca9424bcb7a4 100644 --- a/clang/lib/AST/CXXABI.h +++ b/clang/lib/AST/CXXABI.h @@ -22,8 +22,9 @@ class ASTContext; class CXXConstructorDecl; class DeclaratorDecl; class Expr; -class MemberPointerType; +class MangleContext; class MangleNumberingContext; +class MemberPointerType; /// Implements C++ ABI-specific semantic analysis functions. class CXXABI { @@ -75,6 +76,8 @@ public: /// Creates an instance of a C++ ABI class. CXXABI *CreateItaniumCXXABI(ASTContext &Ctx); CXXABI *CreateMicrosoftCXXABI(ASTContext &Ctx); +std::unique_ptr +createItaniumNumberingContext(MangleContext *); } #endif diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 0368ada0b81c..0375f9b4432e 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -1593,6 +1593,20 @@ Decl *CXXRecordDecl::getLambdaContextDecl() const { return getLambdaData().ContextDecl.get(Source); } +void CXXRecordDecl::setDeviceLambdaManglingNumber(unsigned Num) const { + assert(isLambda() && "Not a lambda closure type!"); + if (Num) + getASTContext().DeviceLambdaManglingNumbers[this] = Num; +} + +unsigned CXXRecordDecl::getDeviceLambdaManglingNumber() const { + assert(isLambda() && "Not a lambda closure type!"); + auto I = getASTContext().DeviceLambdaManglingNumbers.find(this); + if (I != getASTContext().DeviceLambdaManglingNumbers.end()) + return I->second; + return 0; +} + static CanQualType GetConversionType(ASTContext &Context, NamedDecl *Conv) { QualType T = cast(Conv->getUnderlyingDecl()->getAsFunction()) diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 56181bbe1166..1bdad771a923 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -3497,8 +3497,8 @@ static bool diagnoseMutableFields(EvalInfo &Info, const Expr *E, AccessKinds AK, static bool lifetimeStartedInEvaluation(EvalInfo &Info, APValue::LValueBase Base, bool MutableSubobject = false) { - // A temporary we created. - if (Base.getCallIndex()) + // A temporary or transient heap allocation we created. + if (Base.getCallIndex() || Base.is()) return true; switch (Info.IsEvaluatingDecl) { @@ -10009,6 +10009,7 @@ bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) { auto *CaptureInitIt = E->capture_init_begin(); const LambdaCapture *CaptureIt = ClosureClass->captures_begin(); bool Success = true; + const ASTRecordLayout &Layout = Info.Ctx.getASTRecordLayout(ClosureClass); for (const auto *Field : ClosureClass->fields()) { assert(CaptureInitIt != E->capture_init_end()); // Get the initializer for this field @@ -10019,8 +10020,13 @@ bool RecordExprEvaluator::VisitLambdaExpr(const LambdaExpr *E) { if (!CurFieldInit) return Error(E); + LValue Subobject = This; + + if (!HandleLValueMember(Info, E, Subobject, Field, &Layout)) + return false; + APValue &FieldVal = Result.getStructField(Field->getFieldIndex()); - if (!EvaluateInPlace(FieldVal, Info, This, CurFieldInit)) { + if (!EvaluateInPlace(FieldVal, Info, Subobject, CurFieldInit)) { if (!Info.keepEvaluatingAfterFailure()) return false; Success = false; @@ -14786,11 +14792,14 @@ bool Expr::EvaluateAsLValue(EvalResult &Result, const ASTContext &Ctx, static bool EvaluateDestruction(const ASTContext &Ctx, APValue::LValueBase Base, APValue DestroyedValue, QualType Type, - SourceLocation Loc, Expr::EvalStatus &EStatus) { - EvalInfo Info(Ctx, EStatus, EvalInfo::EM_ConstantExpression); + SourceLocation Loc, Expr::EvalStatus &EStatus, + bool IsConstantDestruction) { + EvalInfo Info(Ctx, EStatus, + IsConstantDestruction ? EvalInfo::EM_ConstantExpression + : EvalInfo::EM_ConstantFold); Info.setEvaluatingDecl(Base, DestroyedValue, EvalInfo::EvaluatingDeclKind::Dtor); - Info.InConstantContext = true; + Info.InConstantContext = IsConstantDestruction; LValue LVal; LVal.set(Base); @@ -14844,7 +14853,8 @@ bool Expr::EvaluateAsConstantExpr(EvalResult &Result, const ASTContext &Ctx, // If this is a class template argument, it's required to have constant // destruction too. if (Kind == ConstantExprKind::ClassTemplateArgument && - (!EvaluateDestruction(Ctx, Base, Result.Val, T, getBeginLoc(), Result) || + (!EvaluateDestruction(Ctx, Base, Result.Val, T, getBeginLoc(), Result, + true) || Result.HasSideEffects)) { // FIXME: Prefix a note to indicate that the problem is lack of constant // destruction. @@ -14910,6 +14920,10 @@ bool VarDecl::evaluateDestruction( Expr::EvalStatus EStatus; EStatus.Diag = &Notes; + // Only treat the destruction as constant destruction if we formally have + // constant initialization (or are usable in a constant expression). + bool IsConstantDestruction = hasConstantInitialization(); + // Make a copy of the value for the destructor to mutate, if we know it. // Otherwise, treat the value as default-initialized; if the destructor works // anyway, then the destruction is constant (and must be essentially empty). @@ -14920,7 +14934,8 @@ bool VarDecl::evaluateDestruction( return false; if (!EvaluateDestruction(getASTContext(), this, std::move(DestroyedValue), - getType(), getLocation(), EStatus) || + getType(), getLocation(), EStatus, + IsConstantDestruction) || EStatus.HasSideEffects) return false; diff --git a/clang/lib/AST/ItaniumCXXABI.cpp b/clang/lib/AST/ItaniumCXXABI.cpp index 069add8464ae..be10258a2d77 100644 --- a/clang/lib/AST/ItaniumCXXABI.cpp +++ b/clang/lib/AST/ItaniumCXXABI.cpp @@ -258,3 +258,9 @@ public: CXXABI *clang::CreateItaniumCXXABI(ASTContext &Ctx) { return new ItaniumCXXABI(Ctx); } + +std::unique_ptr +clang::createItaniumNumberingContext(MangleContext *Mangler) { + return std::make_unique( + cast(Mangler)); +} diff --git a/clang/lib/AST/ItaniumMangle.cpp b/clang/lib/AST/ItaniumMangle.cpp index 6c8d5687c64a..5cad84a96845 100644 --- a/clang/lib/AST/ItaniumMangle.cpp +++ b/clang/lib/AST/ItaniumMangle.cpp @@ -125,6 +125,8 @@ class ItaniumMangleContextImpl : public ItaniumMangleContext { llvm::DenseMap Discriminator; llvm::DenseMap Uniquifier; + bool IsDevCtx = false; + public: explicit ItaniumMangleContextImpl(ASTContext &Context, DiagnosticsEngine &Diags) @@ -137,6 +139,10 @@ public: bool shouldMangleStringLiteral(const StringLiteral *) override { return false; } + + bool isDeviceMangleContext() const override { return IsDevCtx; } + void setDeviceMangleContext(bool IsDev) override { IsDevCtx = IsDev; } + void mangleCXXName(GlobalDecl GD, raw_ostream &) override; void mangleThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk, raw_ostream &) override; @@ -546,8 +552,8 @@ private: unsigned knownArity); void mangleCastExpression(const Expr *E, StringRef CastEncoding); void mangleInitListElements(const InitListExpr *InitList); - void mangleDeclRefExpr(const NamedDecl *D); - void mangleExpression(const Expr *E, unsigned Arity = UnknownArity); + void mangleExpression(const Expr *E, unsigned Arity = UnknownArity, + bool AsTemplateArg = false); void mangleCXXCtorType(CXXCtorType T, const CXXRecordDecl *InheritedFrom); void mangleCXXDtorType(CXXDtorType T); @@ -558,6 +564,7 @@ private: unsigned NumTemplateArgs); void mangleTemplateArgs(TemplateName TN, const TemplateArgumentList &AL); void mangleTemplateArg(TemplateArgument A, bool NeedExactType); + void mangleTemplateArgExpr(const Expr *E); void mangleValueInTemplateArg(QualType T, const APValue &V, bool TopLevel, bool NeedExactType = false); @@ -726,9 +733,17 @@ void CXXNameMangler::mangleFunctionEncodingBareType(const FunctionDecl *FD) { EnableIfAttr *EIA = dyn_cast(*I); if (!EIA) continue; - Out << 'X'; - mangleExpression(EIA->getCond()); - Out << 'E'; + if (Context.getASTContext().getLangOpts().getClangABICompat() > + LangOptions::ClangABI::Ver11) { + mangleTemplateArgExpr(EIA->getCond()); + } else { + // Prior to Clang 12, we hardcoded the X/E around enable-if's argument, + // even though should not include an X/E around + // . + Out << 'X'; + mangleExpression(EIA->getCond()); + Out << 'E'; + } } Out << 'E'; FunctionTypeDepth.pop(Saved); @@ -1837,7 +1852,15 @@ void CXXNameMangler::mangleLambda(const CXXRecordDecl *Lambda) { // (in lexical order) with that same and context. // // The AST keeps track of the number for us. - unsigned Number = Lambda->getLambdaManglingNumber(); + // + // In CUDA/HIP, to ensure the consistent lamba numbering between the device- + // and host-side compilations, an extra device mangle context may be created + // if the host-side CXX ABI has different numbering for lambda. In such case, + // if the mangle context is that device-side one, use the device-side lambda + // mangling number for this lambda. + unsigned Number = Context.isDeviceMangleContext() + ? Lambda->getDeviceLambdaManglingNumber() + : Lambda->getLambdaManglingNumber(); assert(Number > 0 && "Lambda should be mangled as an unnamed class"); if (Number > 1) mangleNumber(Number - 2); @@ -3528,8 +3551,8 @@ void CXXNameMangler::mangleType(const DependentSizedMatrixType *T) { Out << "u" << VendorQualifier.size() << VendorQualifier; Out << "I"; - mangleTemplateArg(T->getRowExpr(), false); - mangleTemplateArg(T->getColumnExpr(), false); + mangleTemplateArgExpr(T->getRowExpr()); + mangleTemplateArgExpr(T->getColumnExpr()); mangleType(T->getElementType()); Out << "E"; } @@ -3871,33 +3894,8 @@ void CXXNameMangler::mangleInitListElements(const InitListExpr *InitList) { mangleExpression(InitList->getInit(i)); } -void CXXNameMangler::mangleDeclRefExpr(const NamedDecl *D) { - switch (D->getKind()) { - default: - // ::= L E # external name - Out << 'L'; - mangle(D); - Out << 'E'; - break; - - case Decl::ParmVar: - mangleFunctionParam(cast(D)); - break; - - case Decl::EnumConstant: { - const EnumConstantDecl *ED = cast(D); - mangleIntegerLiteral(ED->getType(), ED->getInitVal()); - break; - } - - case Decl::NonTypeTemplateParm: - const NonTypeTemplateParmDecl *PD = cast(D); - mangleTemplateParameter(PD->getDepth(), PD->getIndex()); - break; - } -} - -void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity) { +void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, + bool AsTemplateArg) { // ::= // ::= // ::= @@ -3911,18 +3909,64 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity) { // ::= at # alignof (a type) // ::= // ::= + // ::= fpT # 'this' expression (part of ) // ::= sr # dependent name // ::= sr # dependent template-id // ::= ds # expr.*expr // ::= sZ # size of a parameter pack // ::= sZ # size of a function parameter pack + // ::= u * E # vendor extended expression // ::= // ::= L E # integer literal - // ::= L E # floating literal + // ::= L E # floating literal + // ::= L E # string literal + // ::= L E # nullptr literal "LDnE" + // ::= L 0 E # null pointer template argument + // ::= L _ E # complex floating point literal (C99); not used by clang // ::= L E # external name - // ::= fpT # 'this' expression QualType ImplicitlyConvertedToType; + // A top-level expression that's not needs to be wrapped in + // X...E in a template arg. + bool IsPrimaryExpr = true; + auto NotPrimaryExpr = [&] { + if (AsTemplateArg && IsPrimaryExpr) + Out << 'X'; + IsPrimaryExpr = false; + }; + + auto MangleDeclRefExpr = [&](const NamedDecl *D) { + switch (D->getKind()) { + default: + // ::= L E # external name + Out << 'L'; + mangle(D); + Out << 'E'; + break; + + case Decl::ParmVar: + NotPrimaryExpr(); + mangleFunctionParam(cast(D)); + break; + + case Decl::EnumConstant: { + // + const EnumConstantDecl *ED = cast(D); + mangleIntegerLiteral(ED->getType(), ED->getInitVal()); + break; + } + + case Decl::NonTypeTemplateParm: + NotPrimaryExpr(); + const NonTypeTemplateParmDecl *PD = cast(D); + mangleTemplateParameter(PD->getDepth(), PD->getIndex()); + break; + } + }; + + // 'goto recurse' is used when handling a simple "unwrapping" node which + // produces no output, where ImplicitlyConvertedToType and AsTemplateArg need + // to be preserved. recurse: switch (E->getStmtClass()) { case Expr::NoStmtClass: @@ -3994,6 +4038,7 @@ recurse: case Expr::SourceLocExprClass: case Expr::BuiltinBitCastExprClass: { + NotPrimaryExpr(); if (!NullOut) { // As bad as this diagnostic is, it's better than crashing. DiagnosticsEngine &Diags = Context.getDiags(); @@ -4001,33 +4046,48 @@ recurse: "cannot yet mangle expression type %0"); Diags.Report(E->getExprLoc(), DiagID) << E->getStmtClassName() << E->getSourceRange(); + return; } break; } case Expr::CXXUuidofExprClass: { + NotPrimaryExpr(); const CXXUuidofExpr *UE = cast(E); - if (UE->isTypeOperand()) { - QualType UuidT = UE->getTypeOperand(Context.getASTContext()); - Out << "u8__uuidoft"; - mangleType(UuidT); + // As of clang 12, uuidof uses the vendor extended expression + // mangling. Previously, it used a special-cased nonstandard extension. + if (Context.getASTContext().getLangOpts().getClangABICompat() > + LangOptions::ClangABI::Ver11) { + Out << "u8__uuidof"; + if (UE->isTypeOperand()) + mangleType(UE->getTypeOperand(Context.getASTContext())); + else + mangleTemplateArgExpr(UE->getExprOperand()); + Out << 'E'; } else { - Expr *UuidExp = UE->getExprOperand(); - Out << "u8__uuidofz"; - mangleExpression(UuidExp, Arity); + if (UE->isTypeOperand()) { + QualType UuidT = UE->getTypeOperand(Context.getASTContext()); + Out << "u8__uuidoft"; + mangleType(UuidT); + } else { + Expr *UuidExp = UE->getExprOperand(); + Out << "u8__uuidofz"; + mangleExpression(UuidExp); + } } break; } // Even gcc-4.5 doesn't mangle this. case Expr::BinaryConditionalOperatorClass: { + NotPrimaryExpr(); DiagnosticsEngine &Diags = Context.getDiags(); unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, "?: operator with omitted middle operand cannot be mangled"); Diags.Report(E->getExprLoc(), DiagID) << E->getStmtClassName() << E->getSourceRange(); - break; + return; } // These are used for internal purposes and cannot be meaningfully mangled. @@ -4035,6 +4095,7 @@ recurse: llvm_unreachable("cannot mangle opaque value; mangling wrong thing?"); case Expr::InitListExprClass: { + NotPrimaryExpr(); Out << "il"; mangleInitListElements(cast(E)); Out << "E"; @@ -4042,6 +4103,7 @@ recurse: } case Expr::DesignatedInitExprClass: { + NotPrimaryExpr(); auto *DIE = cast(E); for (const auto &Designator : DIE->designators()) { if (Designator.isFieldDesignator()) { @@ -4063,27 +4125,27 @@ recurse: } case Expr::CXXDefaultArgExprClass: - mangleExpression(cast(E)->getExpr(), Arity); - break; + E = cast(E)->getExpr(); + goto recurse; case Expr::CXXDefaultInitExprClass: - mangleExpression(cast(E)->getExpr(), Arity); - break; + E = cast(E)->getExpr(); + goto recurse; case Expr::CXXStdInitializerListExprClass: - mangleExpression(cast(E)->getSubExpr(), Arity); - break; + E = cast(E)->getSubExpr(); + goto recurse; case Expr::SubstNonTypeTemplateParmExprClass: - mangleExpression(cast(E)->getReplacement(), - Arity); - break; + E = cast(E)->getReplacement(); + goto recurse; case Expr::UserDefinedLiteralClass: // We follow g++'s approach of mangling a UDL as a call to the literal // operator. case Expr::CXXMemberCallExprClass: // fallthrough case Expr::CallExprClass: { + NotPrimaryExpr(); const CallExpr *CE = cast(E); // ::= cp * E @@ -4114,6 +4176,7 @@ recurse: } case Expr::CXXNewExprClass: { + NotPrimaryExpr(); const CXXNewExpr *New = cast(E); if (New->isGlobalNew()) Out << "gs"; Out << (New->isArray() ? "na" : "nw"); @@ -4149,6 +4212,7 @@ recurse: } case Expr::CXXPseudoDestructorExprClass: { + NotPrimaryExpr(); const auto *PDE = cast(E); if (const Expr *Base = PDE->getBase()) mangleMemberExprBase(Base, PDE->isArrow()); @@ -4175,6 +4239,7 @@ recurse: } case Expr::MemberExprClass: { + NotPrimaryExpr(); const MemberExpr *ME = cast(E); mangleMemberExpr(ME->getBase(), ME->isArrow(), ME->getQualifier(), nullptr, @@ -4185,6 +4250,7 @@ recurse: } case Expr::UnresolvedMemberExprClass: { + NotPrimaryExpr(); const UnresolvedMemberExpr *ME = cast(E); mangleMemberExpr(ME->isImplicitAccess() ? nullptr : ME->getBase(), ME->isArrow(), ME->getQualifier(), nullptr, @@ -4195,6 +4261,7 @@ recurse: } case Expr::CXXDependentScopeMemberExprClass: { + NotPrimaryExpr(); const CXXDependentScopeMemberExpr *ME = cast(E); mangleMemberExpr(ME->isImplicitAccess() ? nullptr : ME->getBase(), @@ -4207,6 +4274,7 @@ recurse: } case Expr::UnresolvedLookupExprClass: { + NotPrimaryExpr(); const UnresolvedLookupExpr *ULE = cast(E); mangleUnresolvedName(ULE->getQualifier(), ULE->getName(), ULE->getTemplateArgs(), ULE->getNumTemplateArgs(), @@ -4215,6 +4283,7 @@ recurse: } case Expr::CXXUnresolvedConstructExprClass: { + NotPrimaryExpr(); const CXXUnresolvedConstructExpr *CE = cast(E); unsigned N = CE->getNumArgs(); @@ -4225,7 +4294,7 @@ recurse: mangleType(CE->getType()); mangleInitListElements(IL); Out << "E"; - return; + break; } Out << "cv"; @@ -4237,14 +4306,17 @@ recurse: } case Expr::CXXConstructExprClass: { + // An implicit cast is silent, thus may contain . const auto *CE = cast(E); if (!CE->isListInitialization() || CE->isStdInitListInitialization()) { assert( CE->getNumArgs() >= 1 && (CE->getNumArgs() == 1 || isa(CE->getArg(1))) && "implicit CXXConstructExpr must have one argument"); - return mangleExpression(cast(E)->getArg(0)); + E = cast(E)->getArg(0); + goto recurse; } + NotPrimaryExpr(); Out << "il"; for (auto *E : CE->arguments()) mangleExpression(E); @@ -4253,6 +4325,7 @@ recurse: } case Expr::CXXTemporaryObjectExprClass: { + NotPrimaryExpr(); const auto *CE = cast(E); unsigned N = CE->getNumArgs(); bool List = CE->isListInitialization(); @@ -4282,17 +4355,20 @@ recurse: } case Expr::CXXScalarValueInitExprClass: + NotPrimaryExpr(); Out << "cv"; mangleType(E->getType()); Out << "_E"; break; case Expr::CXXNoexceptExprClass: + NotPrimaryExpr(); Out << "nx"; mangleExpression(cast(E)->getOperand()); break; case Expr::UnaryExprOrTypeTraitExprClass: { + // Non-instantiation-dependent traits are an integer literal. const UnaryExprOrTypeTraitExpr *SAE = cast(E); if (!SAE->isInstantiationDependent()) { @@ -4312,13 +4388,41 @@ recurse: break; } + NotPrimaryExpr(); // But otherwise, they are not. + + auto MangleAlignofSizeofArg = [&] { + if (SAE->isArgumentType()) { + Out << 't'; + mangleType(SAE->getArgumentType()); + } else { + Out << 'z'; + mangleExpression(SAE->getArgumentExpr()); + } + }; + switch(SAE->getKind()) { case UETT_SizeOf: Out << 's'; + MangleAlignofSizeofArg(); break; case UETT_PreferredAlignOf: + // As of clang 12, we mangle __alignof__ differently than alignof. (They + // have acted differently since Clang 8, but were previously mangled the + // same.) + if (Context.getASTContext().getLangOpts().getClangABICompat() > + LangOptions::ClangABI::Ver11) { + Out << "u11__alignof__"; + if (SAE->isArgumentType()) + mangleType(SAE->getArgumentType()); + else + mangleTemplateArgExpr(SAE->getArgumentExpr()); + Out << 'E'; + break; + } + LLVM_FALLTHROUGH; case UETT_AlignOf: Out << 'a'; + MangleAlignofSizeofArg(); break; case UETT_VecStep: { DiagnosticsEngine &Diags = Context.getDiags(); @@ -4336,17 +4440,11 @@ recurse: return; } } - if (SAE->isArgumentType()) { - Out << 't'; - mangleType(SAE->getArgumentType()); - } else { - Out << 'z'; - mangleExpression(SAE->getArgumentExpr()); - } break; } case Expr::CXXThrowExprClass: { + NotPrimaryExpr(); const CXXThrowExpr *TE = cast(E); // ::= tw # throw expression // ::= tr # rethrow @@ -4360,6 +4458,7 @@ recurse: } case Expr::CXXTypeidExprClass: { + NotPrimaryExpr(); const CXXTypeidExpr *TIE = cast(E); // ::= ti # typeid (type) // ::= te # typeid (expression) @@ -4374,6 +4473,7 @@ recurse: } case Expr::CXXDeleteExprClass: { *** 5639 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:40:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F0B89548FF8 for ; Tue, 16 Feb 2021 20:40: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 4DgCY36VGMz3NB3; Tue, 16 Feb 2021 20:40: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 D22E117DD2; Tue, 16 Feb 2021 20:40: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 11GKetRO076590; Tue, 16 Feb 2021 20:40:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GKetGs076589; Tue, 16 Feb 2021 20:40:55 GMT (envelope-from git) Date: Tue, 16 Feb 2021 20:40:55 GMT Message-Id: <202102162040.11GKetGs076589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: a2bc4bfac9c1 - Create tag vendor/llvm-project/llvmorg-12.0.0-rc1-109-gd5d089bf08c9 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/tags/vendor/llvm-project/llvmorg-12.0.0-rc1-109-gd5d089bf08c9 X-Git-Reftype: annotated tag X-Git-Commit: a2bc4bfac9c18d91e54a919813954f94e544b9ea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:40:56 -0000 The annotated tag vendor/llvm-project/llvmorg-12.0.0-rc1-109-gd5d089bf08c9 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-12.0.0-rc1-109-gd5d089bf08c9 tag vendor/llvm-project/llvmorg-12.0.0-rc1-109-gd5d089bf08c9 Tagger: Dimitry Andric TaggerDate: 2021-02-16 20:39:57 +0000 Tag llvm-project branch release/12.x llvmorg-12.0.0-rc1-109-gd5d089bf08c9. commit 9f93bc8bfd2690abd12a830e42a1c26038173ae5 Author: Dimitry Andric AuthorDate: 2021-02-16 20:39:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-16 20:39:22 +0000 Vendor import of llvm-project branch release/12.x llvmorg-12.0.0-rc1-109-gd5d089bf08c9. From owner-dev-commits-src-all@freebsd.org Tue Feb 16 20:43:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5AAC954959B; Tue, 16 Feb 2021 20:43:20 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgCbr1lR6z3Ncy; Tue, 16 Feb 2021 20:43:19 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wr1-x42b.google.com with SMTP id n6so14922569wrv.8; Tue, 16 Feb 2021 12:43:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=n1eVVOpf1nj4nNZN5WRWM+t81XvwzUdawNfx60pC99k=; b=dtqxci08VlV+uatZayGC5Z1XkFm3uzzupScvLNDo376hvEPvoOCTC/1isGBovMjny1 3dWHpySQqnrPNx7WGl1JvuC61xAlwd9y0zymO9zJChpAxdKLpF3FqVqoYVTEXH2PxyxK wICPk8Zdmg13A3gdBMMbo/RvpZXzpxR1/jYgbLhGMPXT47kZCRITr7Va/Ql1I6PqUHby sIa15ZGwJI2lKaTgpHAwE3hLnOsBYme8y9x8LEBUY0gHx4uNlmFbG5J2puB+oR88ubeR 4pfOYRfeITNlWWmf8sQ21+zt7yVBH3h0/YK5BZcFRC7HVm9MyqXzbpgule9uBBvmOFzR f6IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=n1eVVOpf1nj4nNZN5WRWM+t81XvwzUdawNfx60pC99k=; b=Qx2lLQl1A7JwhPto9P52KQLydHiuP1um5Mb0pXE4Wfl/CnJ7mOAuiYseFMbqdy1Qex iNZb7v9s4Ww+q7cxFjOMOWe0nD4kP8XdENfAPSiUMC/Ooju2AnL/WuhOEjGTy+FcbAP5 Z7j7hS44GGhogQ0KIa8Hd1DVUvlQuKIEaHSYXzjHwD+63fTMweGOgKlc9+3rwkl4qap2 2BvU4WTD54FbTR70bixdGmLPBnxH5/FIy4/BMABx9rSkrLH8heQJQd6jZR+rWimdts4o SfOolInFGwknmsEACQJZANAh2P7MWbzEDFGNmPro8cOP2ksVDCLe3aVwTW/o/SQwgfpt O6Fg== X-Gm-Message-State: AOAM531QP4PKJwO8jiwH6Hze6GTBAwUQoIa2wbcVIjh58np9zc0vlSQH N0gonDG1Iee5d4+0fz9Q0wkI+llbVh812FH9mE6uZ0HR X-Google-Smtp-Source: ABdhPJwJDIt6NQWT2vsr7KQUO8Dyj9hTtWZhAZOAk+z8JCro0cQMrZWu8yf0aJlS6MLiebMaJN/ZRe+vhP+3MbFfaNU= X-Received: by 2002:a05:6000:1565:: with SMTP id 5mr25728330wrz.109.1613508198388; Tue, 16 Feb 2021 12:43:18 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:e406:0:0:0:0:0 with HTTP; Tue, 16 Feb 2021 12:43:17 -0800 (PST) In-Reply-To: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> From: Mateusz Guzik Date: Tue, 16 Feb 2021 21:43:17 +0100 Message-ID: Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. To: "Alexander V. Chernikov" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DgCbr1lR6z3Ncy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 20:43:20 -0000 This breaks the built at least without INET6. can you please start testing your patches on NOINET kernels On 2/16/21, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=2fe5a79425c79f7b828acd91da66d97230925fc8 > > commit 2fe5a79425c79f7b828acd91da66d97230925fc8 > Author: Alexander V. Chernikov > AuthorDate: 2021-02-16 20:30:04 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2021-02-16 20:30:04 +0000 > > Fix dst/netmask handling in routing socket code. > > Traditionally routing socket code did almost zero checks on > the input message except for the most basic size checks. > > This resulted in the unclear KPI boundary for the routing system code > (`rtrequest*` and now `rib_action()`) w.r.t message validness. > > Multiple potential problems and nuances exists: > * Host bits in RTAX_DST sockaddr. Existing applications do send > prefixes > with hostbits uncleared. Even `route(8)` does this, as they hope the > kernel > would do the job of fixing it. Code inside `rib_action()` needs to > handle > it on its own (see `rt_maskedcopy()` ugly hack). > * There are multiple way of adding the host route: it can be DST > without > netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be set > correspondingly. > Currently, these 2 options create 2 DIFFERENT routes in the kernel. > * no sockaddr length/content checking for the "secondary" fields exists: > nothing > stops rtsock application to send sockaddr_in with length of 25 (instead > of 16). > Kernel will accept it, install to RIB as is and propagate to all rtsock > consumers, > potentially triggering bugs in their code. Same goes for sin_port, > sin_zero, etc. > > The goal of this change is to make rtsock verify all sockaddr and prefix > consistency. > Said differently, `rib_action()` or internals should NOT require to > change any of the > sockaddrs supplied by `rt_addrinfo` structure due to incorrectness. > > To be more specific, this change implements the following: > * sockaddr cleanup/validation check is added immediately after getting > sockaddrs from rtm. > * Per-family dst/netmask checks clears host bits in dst and zeros all > dst/netmask "secondary" fields. > * The same netmask checking code converts /32(/128) netmasks to "host" > route case > (NULL netmask, RTF_HOST), removing the dualism. > * Instead of allowing ANY "known" sockaddr families (0<.. only actually > supported ones (inet, inet6, link). > * Automatically convert `sockaddr_sdl` (AF_LINK) gateways to > `sockaddr_sdl_short`. > > Reported by: Guy Yur > Reviewed By: donner > Differential Revision: https://reviews.freebsd.org/D28668 > MFC after: 3 days > --- > sys/net/rtsock.c | 201 > +++++++++++++++++++++++++++++++++- > tests/sys/net/routing/rtsock_common.h | 4 - > 2 files changed, 195 insertions(+), 10 deletions(-) > > diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c > index 3a98b366dfc3..40ce62c77c2a 100644 > --- a/sys/net/rtsock.c > +++ b/sys/net/rtsock.c > @@ -70,6 +70,7 @@ > #include > #include > #ifdef INET6 > +#include > #include > #include > #endif > @@ -173,6 +174,7 @@ static int rtsock_msg_buffer(int type, struct > rt_addrinfo *rtinfo, > struct walkarg *w, int *plen); > static int rt_xaddrs(caddr_t cp, caddr_t cplim, > struct rt_addrinfo *rtinfo); > +static int cleanup_xaddrs(struct rt_addrinfo *info); > static int sysctl_dumpentry(struct rtentry *rt, void *vw); > static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, > uint32_t weight, struct walkarg *w); > @@ -636,11 +638,9 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, u_int > fibnum, struct rt_addrinfo * > return (EINVAL); > > info->rti_flags = rtm->rtm_flags; > - if (info->rti_info[RTAX_DST] == NULL || > - info->rti_info[RTAX_DST]->sa_family >= AF_MAX || > - (info->rti_info[RTAX_GATEWAY] != NULL && > - info->rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) > - return (EINVAL); > + error = cleanup_xaddrs(info); > + if (error != 0) > + return (error); > saf = info->rti_info[RTAX_DST]->sa_family; > /* > * Verify that the caller has the appropriate privilege; RTM_GET > @@ -739,7 +739,14 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, > > RIB_RLOCK(rnh); > > - if (info->rti_info[RTAX_NETMASK] == NULL) { > + /* > + * By (implicit) convention host route (one without netmask) > + * means longest-prefix-match request and the route with netmask > + * means exact-match lookup. > + * As cleanup_xaddrs() cleans up info flags&addrs for the /32,/128 > + * prefixes, use original data to check for the netmask presence. > + */ > + if ((rtm->rtm_addrs & RTA_NETMASK) == 0) { > /* > * Provide longest prefix match for > * address lookup (no mask). > @@ -1286,6 +1293,188 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct > rt_addrinfo *rtinfo) > return (0); > } > > +static inline void > +fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) > +{ > + > + const struct sockaddr_in nsin = { > + .sin_family = AF_INET, > + .sin_len = sizeof(struct sockaddr_in), > + .sin_addr = addr, > + }; > + *sin = nsin; > +} > + > +static inline void > +fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr > *addr6, > + uint32_t scopeid) > +{ > + > + const struct sockaddr_in6 nsin6 = { > + .sin6_family = AF_INET6, > + .sin6_len = sizeof(struct sockaddr_in6), > + .sin6_addr = *addr6, > + .sin6_scope_id = scopeid, > + }; > + *sin6 = nsin6; > +} > + > +static int > +cleanup_xaddrs_gateway(struct rt_addrinfo *info) > +{ > + struct sockaddr *gw = info->rti_info[RTAX_GATEWAY]; > + > + switch (gw->sa_family) { > +#ifdef INET > + case AF_INET: > + { > + struct sockaddr_in *gw_sin = (struct sockaddr_in *)gw; > + if (gw_sin->sin_len < sizeof(struct sockaddr_in)) { > + printf("gw sin_len too small\n"); > + return (EINVAL); > + } > + fill_sockaddr_inet(gw_sin, gw_sin->sin_addr); > + } > + break; > +#endif > +#ifdef INET6 > + case AF_INET6: > + { > + struct sockaddr_in6 *gw_sin6 = (struct sockaddr_in6 *)gw; > + if (gw_sin6->sin6_len < sizeof(struct sockaddr_in6)) { > + printf("gw sin6_len too small\n"); > + return (EINVAL); > + } > + fill_sockaddr_inet6(gw_sin6, &gw_sin6->sin6_addr, 0); > + break; > + } > +#endif > + case AF_LINK: > + { > + struct sockaddr_dl_short *gw_sdl; > + > + gw_sdl = (struct sockaddr_dl_short *)gw; > + if (gw_sdl->sdl_len < sizeof(struct sockaddr_dl_short)) { > + printf("gw sdl_len too small\n"); > + return (EINVAL); > + } > + > + const struct sockaddr_dl_short sdl = { > + .sdl_family = AF_LINK, > + .sdl_len = sizeof(struct sockaddr_dl_short), > + .sdl_index = gw_sdl->sdl_index, > + }; > + *gw_sdl = sdl; > + break; > + } > + } > + > + return (0); > +} > + > +static int > +cleanup_xaddrs_inet(struct rt_addrinfo *info) > +{ > + struct sockaddr_in *dst_sa, *mask_sa; > + > + /* Check & fixup dst/netmask combination first */ > + dst_sa = (struct sockaddr_in *)info->rti_info[RTAX_DST]; > + mask_sa = (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; > + > + struct in_addr mask = { > + .s_addr = mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, > + }; > + struct in_addr dst = { > + .s_addr = htonl(ntohl(dst_sa->sin_addr.s_addr) & ntohl(mask.s_addr)) > + }; > + > + if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { > + printf("dst sin_len too small\n"); > + return (EINVAL); > + } > + if (mask_sa && mask_sa->sin_len < sizeof(struct sockaddr_in)) { > + printf("mask sin_len too small\n"); > + return (EINVAL); > + } > + fill_sockaddr_inet(dst_sa, dst); > + > + if (mask.s_addr != INADDR_BROADCAST) > + fill_sockaddr_inet(mask_sa, mask); > + else { > + info->rti_info[RTAX_NETMASK] = NULL; > + info->rti_flags |= RTF_HOST; > + info->rti_addrs &= ~RTA_NETMASK; > + } > + > + /* Check gateway */ > + if (info->rti_info[RTAX_GATEWAY] != NULL) > + return (cleanup_xaddrs_gateway(info)); > + > + return (0); > +} > + > +static int > +cleanup_xaddrs_inet6(struct rt_addrinfo *info) > +{ > + struct sockaddr_in6 *dst_sa, *mask_sa; > + struct in6_addr mask; > + > + /* Check & fixup dst/netmask combination first */ > + dst_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_DST]; > + mask_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK]; > + > + mask = mask_sa ? mask_sa->sin6_addr : in6mask128; > + IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); > + > + if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { > + printf("dst sin6_len too small\n"); > + return (EINVAL); > + } > + if (mask_sa && mask_sa->sin6_len < sizeof(struct sockaddr_in6)) { > + printf("mask sin6_len too small\n"); > + return (EINVAL); > + } > + fill_sockaddr_inet6(dst_sa, &dst_sa->sin6_addr, 0); > + > + if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) > + fill_sockaddr_inet6(mask_sa, &mask, 0); > + else { > + info->rti_info[RTAX_NETMASK] = NULL; > + info->rti_flags |= RTF_HOST; > + info->rti_addrs &= ~RTA_NETMASK; > + } > + > + /* Check gateway */ > + if (info->rti_info[RTAX_GATEWAY] != NULL) > + return (cleanup_xaddrs_gateway(info)); > + > + return (0); > +} > + > +static int > +cleanup_xaddrs(struct rt_addrinfo *info) > +{ > + int error = EAFNOSUPPORT; > + > + if (info->rti_info[RTAX_DST] == NULL) > + return (EINVAL); > + > + switch (info->rti_info[RTAX_DST]->sa_family) { > +#ifdef INET > + case AF_INET: > + error = cleanup_xaddrs_inet(info); > + break; > +#endif > +#ifdef INET6 > + case AF_INET6: > + error = cleanup_xaddrs_inet6(info); > + break; > +#endif > + } > + > + return (error); > +} > + > /* > * Fill in @dmask with valid netmask leaving original @smask > * intact. Mostly used with radix netmasks. > diff --git a/tests/sys/net/routing/rtsock_common.h > b/tests/sys/net/routing/rtsock_common.h > index 7da88e0eb512..71476d2b5f3c 100644 > --- a/tests/sys/net/routing/rtsock_common.h > +++ b/tests/sys/net/routing/rtsock_common.h > @@ -826,10 +826,6 @@ _validate_message_sockaddrs(char *buffer, int rtm_len, > size_t offset, int rtm_ad > } > sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); > } > - > - RTSOCK_ATF_REQUIRE_MSG((struct rt_msghdr *)buffer, parsed_len == rtm_len, > - "message len != parsed len: expected %d parsed %d", > - rtm_len, (int)parsed_len); > } > > /* > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to > "dev-commits-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:12:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7246B54A1F7 for ; Tue, 16 Feb 2021 21:12: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 4DgDFT2tYYz3R5F; Tue, 16 Feb 2021 21:12: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 55FB3187A6; Tue, 16 Feb 2021 21:12: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 11GLCTRQ017390; Tue, 16 Feb 2021 21:12:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GLCTd0017389; Tue, 16 Feb 2021 21:12:29 GMT (envelope-from git) Date: Tue, 16 Feb 2021 21:12:29 GMT Message-Id: <202102162112.11GLCTd0017389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Philip Paeps Subject: git: f28545524cb1 - releng/13.0 - ifconfig: fix incorrect wg allowed-ips netmask MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: f28545524cb197a5df9ebd8d2019f200801d538a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:12:29 -0000 The branch releng/13.0 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=f28545524cb197a5df9ebd8d2019f200801d538a commit f28545524cb197a5df9ebd8d2019f200801d538a Author: Michael Chiu AuthorDate: 2021-02-15 00:38:26 +0000 Commit: Philip Paeps CommitDate: 2021-02-16 21:11:45 +0000 ifconfig: fix incorrect wg allowed-ips netmask Currently when peer information is displayed with `ifconfig wgN peer ..` or `ifconfig wgN peer-list`, the netmask of the first `allowed-ips` will be used as the netmask of all CIDR in `allowed-ips`. For example, if the list is `192.168.1.0/24, 172.16.0.0/16`, it will display as `192.168.1.0/24, 172.16.0.0/24`. While this does not affect the actual functionality, it is very confusing. Submitted by: Michael Chiu Reviewed by: grehan Differential Revision: https://reviews.freebsd.org/D28655 Approved by: re (gjb) (cherry picked from commit be2003ccfa1b12f372fa1329c38c29fe035f232f) --- sbin/ifconfig/ifwg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifwg.c b/sbin/ifconfig/ifwg.c index 8956e3427dd1..a2b22d2dfbef 100644 --- a/sbin/ifconfig/ifwg.c +++ b/sbin/ifconfig/ifwg.c @@ -309,7 +309,7 @@ dump_peer(const nvlist_t *nvl_peer) sa = __DECONST(void *, &aips[i].a_addr); bitmask = __DECONST(void *, - ((const struct sockaddr *)&aips->a_mask)->sa_data); + ((const struct sockaddr *)&(&aips[i])->a_mask)->sa_data); family = aips[i].a_addr.ss_family; getnameinfo(sa, sa->sa_len, addr_buf, INET6_ADDRSTRLEN, NULL, 0, NI_NUMERICHOST); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:26:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0204B54AD0E; Tue, 16 Feb 2021 21:26:00 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward500o.mail.yandex.net (forward500o.mail.yandex.net [37.140.190.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgDY35Fkqz3hyr; Tue, 16 Feb 2021 21:25:59 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from iva8-4db386e07e2e.qloud-c.yandex.net (iva8-4db386e07e2e.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:951e:0:640:4db3:86e0]) by forward500o.mail.yandex.net (Yandex) with ESMTP id 1B69B602F2; Wed, 17 Feb 2021 00:25:56 +0300 (MSK) Received: from localhost (localhost [::1]) by iva8-4db386e07e2e.qloud-c.yandex.net (mxback/Yandex) with ESMTP id Ado3fq6C93-PtI0URU6; Wed, 17 Feb 2021 00:25:55 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1613510755; bh=yq4ZGXvA2xFholqixI1Px9ZlVOnv3qYqqYchFnTV4Fg=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=TqJbPfbRHnUE2EN9OfmW02z+utrMjkQfq3d/V3csjko15Z+4a1A4KGxm4zK4w30sc 65uFkhDBxNWLpHGu9ei2zyIF/UBGK4As/RFAv5An2m9LHZ1B+Uspb92pQa+4IFvvnn p9YJjboraXw8Rpbsp+zZy9iFY6AkSfzKiuPVwJ7E= Received: by iva2-13089525268d.qloud-c.yandex.net with HTTP; Wed, 17 Feb 2021 00:25:55 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" In-Reply-To: References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 16 Feb 2021 21:25:55 +0000 Message-Id: <290641613510357@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 4DgDY35Fkqz3hyr X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:26:00 -0000 16.02.2021, 20:43, "Mateusz Guzik" : > This breaks the built at least without INET6. It would help if you could share the actual build error. I see -Wunused for 2 function (which I will fix soon), but I'm not sure if that's the error you're running into. > > can you please start testing your patches on NOINET kernels Well, it actually builds for me: -------------------------------------------------------------- >>> Kernel build for LINT-NOINET completed on Tue Feb 16 21:21:39 UTC 2021 -------------------------------------------------------------- >>> Kernel(s) LINT-NOINET built in 28 seconds, ncpu: 2, make -j6 -------------------------------------------------------------- > > On 2/16/21, Alexander V. Chernikov wrote: >>  The branch main has been updated by melifaro: >> >>  URL: >>  https://cgit.FreeBSD.org/src/commit/?id=2fe5a79425c79f7b828acd91da66d97230925fc8 >> >>  commit 2fe5a79425c79f7b828acd91da66d97230925fc8 >>  Author: Alexander V. Chernikov >>  AuthorDate: 2021-02-16 20:30:04 +0000 >>  Commit: Alexander V. Chernikov >>  CommitDate: 2021-02-16 20:30:04 +0000 >> >>      Fix dst/netmask handling in routing socket code. >> >>      Traditionally routing socket code did almost zero checks on >>       the input message except for the most basic size checks. >> >>      This resulted in the unclear KPI boundary for the routing system code >>       (`rtrequest*` and now `rib_action()`) w.r.t message validness. >> >>      Multiple potential problems and nuances exists: >>      * Host bits in RTAX_DST sockaddr. Existing applications do send >>  prefixes >>       with hostbits uncleared. Even `route(8)` does this, as they hope the >>  kernel >>       would do the job of fixing it. Code inside `rib_action()` needs to >>  handle >>       it on its own (see `rt_maskedcopy()` ugly hack). >>      * There are multiple way of adding the host route: it can be DST >>  without >>       netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be set >>  correspondingly. >>       Currently, these 2 options create 2 DIFFERENT routes in the kernel. >>      * no sockaddr length/content checking for the "secondary" fields exists: >>  nothing >>       stops rtsock application to send sockaddr_in with length of 25 (instead >>  of 16). >>       Kernel will accept it, install to RIB as is and propagate to all rtsock >>  consumers, >>       potentially triggering bugs in their code. Same goes for sin_port, >>  sin_zero, etc. >> >>      The goal of this change is to make rtsock verify all sockaddr and prefix >>  consistency. >>      Said differently, `rib_action()` or internals should NOT require to >>  change any of the >>       sockaddrs supplied by `rt_addrinfo` structure due to incorrectness. >> >>      To be more specific, this change implements the following: >>      * sockaddr cleanup/validation check is added immediately after getting >>  sockaddrs from rtm. >>      * Per-family dst/netmask checks clears host bits in dst and zeros all >>  dst/netmask "secondary" fields. >>      * The same netmask checking code converts /32(/128) netmasks to "host" >>  route case >>       (NULL netmask, RTF_HOST), removing the dualism. >>      * Instead of allowing ANY "known" sockaddr families (0<..>  only actually >>       supported ones (inet, inet6, link). >>      * Automatically convert `sockaddr_sdl` (AF_LINK) gateways to >>        `sockaddr_sdl_short`. >> >>      Reported by: Guy Yur >>      Reviewed By: donner >>      Differential Revision: https://reviews.freebsd.org/D28668 >>      MFC after: 3 days >>  --- >>   sys/net/rtsock.c | 201 >>  +++++++++++++++++++++++++++++++++- >>   tests/sys/net/routing/rtsock_common.h | 4 - >>   2 files changed, 195 insertions(+), 10 deletions(-) >> >>  diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c >>  index 3a98b366dfc3..40ce62c77c2a 100644 >>  --- a/sys/net/rtsock.c >>  +++ b/sys/net/rtsock.c >>  @@ -70,6 +70,7 @@ >>   #include >>   #include >>   #ifdef INET6 >>  +#include >>   #include >>   #include >>   #endif >>  @@ -173,6 +174,7 @@ static int rtsock_msg_buffer(int type, struct >>  rt_addrinfo *rtinfo, >>                           struct walkarg *w, int *plen); >>   static int rt_xaddrs(caddr_t cp, caddr_t cplim, >>                           struct rt_addrinfo *rtinfo); >>  +static int cleanup_xaddrs(struct rt_addrinfo *info); >>   static int sysctl_dumpentry(struct rtentry *rt, void *vw); >>   static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, >>                           uint32_t weight, struct walkarg *w); >>  @@ -636,11 +638,9 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, u_int >>  fibnum, struct rt_addrinfo * >>                   return (EINVAL); >> >>           info->rti_flags = rtm->rtm_flags; >>  - if (info->rti_info[RTAX_DST] == NULL || >>  - info->rti_info[RTAX_DST]->sa_family >= AF_MAX || >>  - (info->rti_info[RTAX_GATEWAY] != NULL && >>  - info->rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) >>  - return (EINVAL); >>  + error = cleanup_xaddrs(info); >>  + if (error != 0) >>  + return (error); >>           saf = info->rti_info[RTAX_DST]->sa_family; >>           /* >>            * Verify that the caller has the appropriate privilege; RTM_GET >>  @@ -739,7 +739,14 @@ handle_rtm_get(struct rt_addrinfo *info, u_int fibnum, >> >>           RIB_RLOCK(rnh); >> >>  - if (info->rti_info[RTAX_NETMASK] == NULL) { >>  + /* >>  + * By (implicit) convention host route (one without netmask) >>  + * means longest-prefix-match request and the route with netmask >>  + * means exact-match lookup. >>  + * As cleanup_xaddrs() cleans up info flags&addrs for the /32,/128 >>  + * prefixes, use original data to check for the netmask presence. >>  + */ >>  + if ((rtm->rtm_addrs & RTA_NETMASK) == 0) { >>                   /* >>                    * Provide longest prefix match for >>                    * address lookup (no mask). >>  @@ -1286,6 +1293,188 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct >>  rt_addrinfo *rtinfo) >>           return (0); >>   } >> >>  +static inline void >>  +fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) >>  +{ >>  + >>  + const struct sockaddr_in nsin = { >>  + .sin_family = AF_INET, >>  + .sin_len = sizeof(struct sockaddr_in), >>  + .sin_addr = addr, >>  + }; >>  + *sin = nsin; >>  +} >>  + >>  +static inline void >>  +fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr >>  *addr6, >>  + uint32_t scopeid) >>  +{ >>  + >>  + const struct sockaddr_in6 nsin6 = { >>  + .sin6_family = AF_INET6, >>  + .sin6_len = sizeof(struct sockaddr_in6), >>  + .sin6_addr = *addr6, >>  + .sin6_scope_id = scopeid, >>  + }; >>  + *sin6 = nsin6; >>  +} >>  + >>  +static int >>  +cleanup_xaddrs_gateway(struct rt_addrinfo *info) >>  +{ >>  + struct sockaddr *gw = info->rti_info[RTAX_GATEWAY]; >>  + >>  + switch (gw->sa_family) { >>  +#ifdef INET >>  + case AF_INET: >>  + { >>  + struct sockaddr_in *gw_sin = (struct sockaddr_in *)gw; >>  + if (gw_sin->sin_len < sizeof(struct sockaddr_in)) { >>  + printf("gw sin_len too small\n"); >>  + return (EINVAL); >>  + } >>  + fill_sockaddr_inet(gw_sin, gw_sin->sin_addr); >>  + } >>  + break; >>  +#endif >>  +#ifdef INET6 >>  + case AF_INET6: >>  + { >>  + struct sockaddr_in6 *gw_sin6 = (struct sockaddr_in6 *)gw; >>  + if (gw_sin6->sin6_len < sizeof(struct sockaddr_in6)) { >>  + printf("gw sin6_len too small\n"); >>  + return (EINVAL); >>  + } >>  + fill_sockaddr_inet6(gw_sin6, &gw_sin6->sin6_addr, 0); >>  + break; >>  + } >>  +#endif >>  + case AF_LINK: >>  + { >>  + struct sockaddr_dl_short *gw_sdl; >>  + >>  + gw_sdl = (struct sockaddr_dl_short *)gw; >>  + if (gw_sdl->sdl_len < sizeof(struct sockaddr_dl_short)) { >>  + printf("gw sdl_len too small\n"); >>  + return (EINVAL); >>  + } >>  + >>  + const struct sockaddr_dl_short sdl = { >>  + .sdl_family = AF_LINK, >>  + .sdl_len = sizeof(struct sockaddr_dl_short), >>  + .sdl_index = gw_sdl->sdl_index, >>  + }; >>  + *gw_sdl = sdl; >>  + break; >>  + } >>  + } >>  + >>  + return (0); >>  +} >>  + >>  +static int >>  +cleanup_xaddrs_inet(struct rt_addrinfo *info) >>  +{ >>  + struct sockaddr_in *dst_sa, *mask_sa; >>  + >>  + /* Check & fixup dst/netmask combination first */ >>  + dst_sa = (struct sockaddr_in *)info->rti_info[RTAX_DST]; >>  + mask_sa = (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; >>  + >>  + struct in_addr mask = { >>  + .s_addr = mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, >>  + }; >>  + struct in_addr dst = { >>  + .s_addr = htonl(ntohl(dst_sa->sin_addr.s_addr) & ntohl(mask.s_addr)) >>  + }; >>  + >>  + if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { >>  + printf("dst sin_len too small\n"); >>  + return (EINVAL); >>  + } >>  + if (mask_sa && mask_sa->sin_len < sizeof(struct sockaddr_in)) { >>  + printf("mask sin_len too small\n"); >>  + return (EINVAL); >>  + } >>  + fill_sockaddr_inet(dst_sa, dst); >>  + >>  + if (mask.s_addr != INADDR_BROADCAST) >>  + fill_sockaddr_inet(mask_sa, mask); >>  + else { >>  + info->rti_info[RTAX_NETMASK] = NULL; >>  + info->rti_flags |= RTF_HOST; >>  + info->rti_addrs &= ~RTA_NETMASK; >>  + } >>  + >>  + /* Check gateway */ >>  + if (info->rti_info[RTAX_GATEWAY] != NULL) >>  + return (cleanup_xaddrs_gateway(info)); >>  + >>  + return (0); >>  +} >>  + >>  +static int >>  +cleanup_xaddrs_inet6(struct rt_addrinfo *info) >>  +{ >>  + struct sockaddr_in6 *dst_sa, *mask_sa; >>  + struct in6_addr mask; >>  + >>  + /* Check & fixup dst/netmask combination first */ >>  + dst_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_DST]; >>  + mask_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK]; >>  + >>  + mask = mask_sa ? mask_sa->sin6_addr : in6mask128; >>  + IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); >>  + >>  + if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { >>  + printf("dst sin6_len too small\n"); >>  + return (EINVAL); >>  + } >>  + if (mask_sa && mask_sa->sin6_len < sizeof(struct sockaddr_in6)) { >>  + printf("mask sin6_len too small\n"); >>  + return (EINVAL); >>  + } >>  + fill_sockaddr_inet6(dst_sa, &dst_sa->sin6_addr, 0); >>  + >>  + if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) >>  + fill_sockaddr_inet6(mask_sa, &mask, 0); >>  + else { >>  + info->rti_info[RTAX_NETMASK] = NULL; >>  + info->rti_flags |= RTF_HOST; >>  + info->rti_addrs &= ~RTA_NETMASK; >>  + } >>  + >>  + /* Check gateway */ >>  + if (info->rti_info[RTAX_GATEWAY] != NULL) >>  + return (cleanup_xaddrs_gateway(info)); >>  + >>  + return (0); >>  +} >>  + >>  +static int >>  +cleanup_xaddrs(struct rt_addrinfo *info) >>  +{ >>  + int error = EAFNOSUPPORT; >>  + >>  + if (info->rti_info[RTAX_DST] == NULL) >>  + return (EINVAL); >>  + >>  + switch (info->rti_info[RTAX_DST]->sa_family) { >>  +#ifdef INET >>  + case AF_INET: >>  + error = cleanup_xaddrs_inet(info); >>  + break; >>  +#endif >>  +#ifdef INET6 >>  + case AF_INET6: >>  + error = cleanup_xaddrs_inet6(info); >>  + break; >>  +#endif >>  + } >>  + >>  + return (error); >>  +} >>  + >>   /* >>    * Fill in @dmask with valid netmask leaving original @smask >>    * intact. Mostly used with radix netmasks. >>  diff --git a/tests/sys/net/routing/rtsock_common.h >>  b/tests/sys/net/routing/rtsock_common.h >>  index 7da88e0eb512..71476d2b5f3c 100644 >>  --- a/tests/sys/net/routing/rtsock_common.h >>  +++ b/tests/sys/net/routing/rtsock_common.h >>  @@ -826,10 +826,6 @@ _validate_message_sockaddrs(char *buffer, int rtm_len, >>  size_t offset, int rtm_ad >>                   } >>                   sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); >>           } >>  - >>  - RTSOCK_ATF_REQUIRE_MSG((struct rt_msghdr *)buffer, parsed_len == rtm_len, >>  - "message len != parsed len: expected %d parsed %d", >>  - rtm_len, (int)parsed_len); >>   } >> >>   /* >>  _______________________________________________ >>  dev-commits-src-all@freebsd.org mailing list >>  https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all >>  To unsubscribe, send any mail to >>  "dev-commits-src-all-unsubscribe@freebsd.org" > > -- > Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:47:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C33AB54B560; Tue, 16 Feb 2021 21:47:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgF1R4xzZz3kkZ; Tue, 16 Feb 2021 21:47:07 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id m1so163633wml.2; Tue, 16 Feb 2021 13:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=njT4Zgupkr0NOtPtidswr384Yey2uGh9yifu7Bsg6M0=; b=NOmPhc09zKVokoXWCWzoN6DbKnHKSwsCq8+RLsqTiXV49pXV/LXUykTrwgW52H0kpj z3h+4EjzYRB8RDJsH/h/EcjsPGa4UXJOMPf79aldihggyW93SlMmQysZFxsQ/mEOQOFN feZ2NLrki/QOLxwnxgK8H+LS55i3P/ovPidZC4AaZWEHBfJ9SWr3MHz6fO0ScRfX+faa oAHIwTIZsHHDAITEJY1F1Ueq/6v5BN2VzQmPVgX4LQu51R67gI4TzjnoaS56d8aX5p5O PiBpOwM/FSSuuXIV/ebYzFU6HNS6pWnJZiQ9L35UgBM6OdcXoVYxe9uKhxqTtZ2KBMR8 Ajjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=njT4Zgupkr0NOtPtidswr384Yey2uGh9yifu7Bsg6M0=; b=cZ4mxGSjaJgQ0vacnrzeeoUX3XWDOn8sVCtocPFGmlPOpWu36Scqj5Y84xZnqhxHmk Jqokmywq24YvEhTioyQPvhHwYDSNRXHyhHqXPJoZat7CA2GQw08M9Dj9AkaBAV9CaAU1 Cse7UYWOnbM/pjWyflvNE9R0KdAqZTWAW2pdTNT+LDaqAhGqYJ+VlqqUSpAufdNgyyv9 9N/flKbl3zZ+ySRLkPF+1T+Rd2rvz5G6o5U7FrbwiuC4l6m1CUT4LZkOnF5QzkLSjIvl 0nSKqEhPu0TG9HAEXG/SP/esIZIC3tCGgV/WemEac1cM0jL1x9OBjkVZCcfPfQf14YX3 VcQA== X-Gm-Message-State: AOAM532dLhLav5jNvJXpL1UHeEUf4O8IrVhnC14RO1+wuIv2fwjq4ahZ RjcNBLjWs7+wyY6mlY8WNtOqZ0fF8LfEBmNOWgymQ15g X-Google-Smtp-Source: ABdhPJwHpikK7Je3VsVdj5r10gP5dIi2ixCGRYB9WHFUjOnkaRRaqJVCHEpWWzwhRWkq55MZORwaH5j2tEWoeV63F6g= X-Received: by 2002:a7b:c397:: with SMTP id s23mr44777wmj.10.1613512025470; Tue, 16 Feb 2021 13:47:05 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:e406:0:0:0:0:0 with HTTP; Tue, 16 Feb 2021 13:47:03 -0800 (PST) In-Reply-To: <290641613510357@mail.yandex.ru> References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> <290641613510357@mail.yandex.ru> From: Mateusz Guzik Date: Tue, 16 Feb 2021 22:47:03 +0100 Message-ID: Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. To: "Alexander V. Chernikov" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4DgF1R4xzZz3kkZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:47:07 -0000 In this context I meant NOINET and NOINET6 Anyhow I see the following: sys/net/rtsock.c:1427:2: error: implicit declaration of function 'IN6_MASK_ADDR' is invalid in C99 [-Werror,-Wimplicit-function-declaration] IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); ^ On 2/16/21, Alexander V. Chernikov wrote: > 16.02.2021, 20:43, "Mateusz Guzik" : >> This breaks the built at least without INET6. > It would help if you could share the actual build error. > I see -Wunused for 2 function (which I will fix soon), but I'm not sure i= f > that's the error you're running into. >> >> can you please start testing your patches on NOINET kernels > Well, it actually builds for me: > -------------------------------------------------------------- >>>> Kernel build for LINT-NOINET completed on Tue Feb 16 21:21:39 UTC 2021 > -------------------------------------------------------------- >>>> Kernel(s) LINT-NOINET built in 28 seconds, ncpu: 2, make -j6 > -------------------------------------------------------------- > >> >> On 2/16/21, Alexander V. Chernikov wrote: >>> =C2=A0The branch main has been updated by melifaro: >>> >>> =C2=A0URL: >>> =C2=A0https://cgit.FreeBSD.org/src/commit/?id=3D2fe5a79425c79f7b828acd9= 1da66d97230925fc8 >>> >>> =C2=A0commit 2fe5a79425c79f7b828acd91da66d97230925fc8 >>> =C2=A0Author: Alexander V. Chernikov >>> =C2=A0AuthorDate: 2021-02-16 20:30:04 +0000 >>> =C2=A0Commit: Alexander V. Chernikov >>> =C2=A0CommitDate: 2021-02-16 20:30:04 +0000 >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Fix dst/netmask handling in routing socke= t code. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Traditionally routing socket code did alm= ost zero checks on >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0the input message except for the mo= st basic size checks. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0This resulted in the unclear KPI boundary= for the routing system >>> code >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(`rtrequest*` and now `rib_action()= `) w.r.t message validness. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Multiple potential problems and nuances e= xists: >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Host bits in RTAX_DST sockaddr. Existin= g applications do send >>> =C2=A0prefixes >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0with hostbits uncleared. Even `rout= e(8)` does this, as they hope >>> the >>> =C2=A0kernel >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0would do the job of fixing it. Code= inside `rib_action()` needs to >>> =C2=A0handle >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0it on its own (see `rt_maskedcopy()= ` ugly hack). >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* There are multiple way of adding the ho= st route: it can be DST >>> =C2=A0without >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0netmask or DST with /32(/128) netma= sk. Also, RTF_HOST has to be >>> set >>> =C2=A0correspondingly. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Currently, these 2 options create 2= DIFFERENT routes in the >>> kernel. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* no sockaddr length/content checking for= the "secondary" fields >>> exists: >>> =C2=A0nothing >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0stops rtsock application to send so= ckaddr_in with length of 25 >>> (instead >>> =C2=A0of 16). >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Kernel will accept it, install to R= IB as is and propagate to all >>> rtsock >>> =C2=A0consumers, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0potentially triggering bugs in thei= r code. Same goes for sin_port, >>> =C2=A0sin_zero, etc. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0The goal of this change is to make rtsock= verify all sockaddr and >>> prefix >>> =C2=A0consistency. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Said differently, `rib_action()` or inter= nals should NOT require to >>> =C2=A0change any of the >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sockaddrs supplied by `rt_addrinfo`= structure due to >>> incorrectness. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0To be more specific, this change implemen= ts the following: >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* sockaddr cleanup/validation check is ad= ded immediately after >>> getting >>> =C2=A0sockaddrs from rtm. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Per-family dst/netmask checks clears ho= st bits in dst and zeros >>> all >>> =C2=A0dst/netmask "secondary" fields. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* The same netmask checking code converts= /32(/128) netmasks to >>> "host" >>> =C2=A0route case >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0(NULL netmask, RTF_HOST), removing = the dualism. >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Instead of allowing ANY "known" sockadd= r families (0<..>> allow >>> =C2=A0only actually >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0supported ones (inet, inet6, link). >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Automatically convert `sockaddr_sdl` (A= F_LINK) gateways to >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0`sockaddr_sdl_short`. >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Reported by: Guy Yur >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Reviewed By: donner >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Differential Revision: https://reviews.fr= eebsd.org/D28668 >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0MFC after: 3 days >>> =C2=A0--- >>> =C2=A0=C2=A0sys/net/rtsock.c | 201 >>> =C2=A0+++++++++++++++++++++++++++++++++- >>> =C2=A0=C2=A0tests/sys/net/routing/rtsock_common.h | 4 - >>> =C2=A0=C2=A02 files changed, 195 insertions(+), 10 deletions(-) >>> >>> =C2=A0diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c >>> =C2=A0index 3a98b366dfc3..40ce62c77c2a 100644 >>> =C2=A0--- a/sys/net/rtsock.c >>> =C2=A0+++ b/sys/net/rtsock.c >>> =C2=A0@@ -70,6 +70,7 @@ >>> =C2=A0=C2=A0#include >>> =C2=A0=C2=A0#include >>> =C2=A0=C2=A0#ifdef INET6 >>> =C2=A0+#include >>> =C2=A0=C2=A0#include >>> =C2=A0=C2=A0#include >>> =C2=A0=C2=A0#endif >>> =C2=A0@@ -173,6 +174,7 @@ static int rtsock_msg_buffer(int type, struct >>> =C2=A0rt_addrinfo *rtinfo, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0struct walkarg *w, int *plen); >>> =C2=A0=C2=A0static int rt_xaddrs(caddr_t cp, caddr_t cplim, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0struct rt_addrinfo *rtinfo); >>> =C2=A0+static int cleanup_xaddrs(struct rt_addrinfo *info); >>> =C2=A0=C2=A0static int sysctl_dumpentry(struct rtentry *rt, void *vw); >>> =C2=A0=C2=A0static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_= object *nh, >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0uint32_t weight, struct walkarg *w); >>> =C2=A0@@ -636,11 +638,9 @@ fill_addrinfo(struct rt_msghdr *rtm, int len= , >>> u_int >>> =C2=A0fibnum, struct rt_addrinfo * >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return (EINVAL); >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0info->rti_f= lags =3D rtm->rtm_flags; >>> =C2=A0- if (info->rti_info[RTAX_DST] =3D=3D NULL || >>> =C2=A0- info->rti_info[RTAX_DST]->sa_family >=3D AF_MAX || >>> =C2=A0- (info->rti_info[RTAX_GATEWAY] !=3D NULL && >>> =C2=A0- info->rti_info[RTAX_GATEWAY]->sa_family >=3D AF_MAX)) >>> =C2=A0- return (EINVAL); >>> =C2=A0+ error =3D cleanup_xaddrs(info); >>> =C2=A0+ if (error !=3D 0) >>> =C2=A0+ return (error); >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0saf =3D inf= o->rti_info[RTAX_DST]->sa_family; >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Ver= ify that the caller has the appropriate privilege; >>> RTM_GET >>> =C2=A0@@ -739,7 +739,14 @@ handle_rtm_get(struct rt_addrinfo *info, u_i= nt >>> fibnum, >>> >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0RIB_RLOCK(r= nh); >>> >>> =C2=A0- if (info->rti_info[RTAX_NETMASK] =3D=3D NULL) { >>> =C2=A0+ /* >>> =C2=A0+ * By (implicit) convention host route (one without netmask) >>> =C2=A0+ * means longest-prefix-match request and the route with netmask >>> =C2=A0+ * means exact-match lookup. >>> =C2=A0+ * As cleanup_xaddrs() cleans up info flags&addrs for the /32,/1= 28 >>> =C2=A0+ * prefixes, use original data to check for the netmask presence= . >>> =C2=A0+ */ >>> =C2=A0+ if ((rtm->rtm_addrs & RTA_NETMASK) =3D=3D 0) { >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/* >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* Provide longest prefix match= for >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0* address lookup (no mask). >>> =C2=A0@@ -1286,6 +1293,188 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, stru= ct >>> =C2=A0rt_addrinfo *rtinfo) >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0return (0); >>> =C2=A0=C2=A0} >>> >>> =C2=A0+static inline void >>> =C2=A0+fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) >>> =C2=A0+{ >>> =C2=A0+ >>> =C2=A0+ const struct sockaddr_in nsin =3D { >>> =C2=A0+ .sin_family =3D AF_INET, >>> =C2=A0+ .sin_len =3D sizeof(struct sockaddr_in), >>> =C2=A0+ .sin_addr =3D addr, >>> =C2=A0+ }; >>> =C2=A0+ *sin =3D nsin; >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0+static inline void >>> =C2=A0+fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_= addr >>> =C2=A0*addr6, >>> =C2=A0+ uint32_t scopeid) >>> =C2=A0+{ >>> =C2=A0+ >>> =C2=A0+ const struct sockaddr_in6 nsin6 =3D { >>> =C2=A0+ .sin6_family =3D AF_INET6, >>> =C2=A0+ .sin6_len =3D sizeof(struct sockaddr_in6), >>> =C2=A0+ .sin6_addr =3D *addr6, >>> =C2=A0+ .sin6_scope_id =3D scopeid, >>> =C2=A0+ }; >>> =C2=A0+ *sin6 =3D nsin6; >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0+static int >>> =C2=A0+cleanup_xaddrs_gateway(struct rt_addrinfo *info) >>> =C2=A0+{ >>> =C2=A0+ struct sockaddr *gw =3D info->rti_info[RTAX_GATEWAY]; >>> =C2=A0+ >>> =C2=A0+ switch (gw->sa_family) { >>> =C2=A0+#ifdef INET >>> =C2=A0+ case AF_INET: >>> =C2=A0+ { >>> =C2=A0+ struct sockaddr_in *gw_sin =3D (struct sockaddr_in *)gw; >>> =C2=A0+ if (gw_sin->sin_len < sizeof(struct sockaddr_in)) { >>> =C2=A0+ printf("gw sin_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ fill_sockaddr_inet(gw_sin, gw_sin->sin_addr); >>> =C2=A0+ } >>> =C2=A0+ break; >>> =C2=A0+#endif >>> =C2=A0+#ifdef INET6 >>> =C2=A0+ case AF_INET6: >>> =C2=A0+ { >>> =C2=A0+ struct sockaddr_in6 *gw_sin6 =3D (struct sockaddr_in6 *)gw; >>> =C2=A0+ if (gw_sin6->sin6_len < sizeof(struct sockaddr_in6)) { >>> =C2=A0+ printf("gw sin6_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ fill_sockaddr_inet6(gw_sin6, &gw_sin6->sin6_addr, 0); >>> =C2=A0+ break; >>> =C2=A0+ } >>> =C2=A0+#endif >>> =C2=A0+ case AF_LINK: >>> =C2=A0+ { >>> =C2=A0+ struct sockaddr_dl_short *gw_sdl; >>> =C2=A0+ >>> =C2=A0+ gw_sdl =3D (struct sockaddr_dl_short *)gw; >>> =C2=A0+ if (gw_sdl->sdl_len < sizeof(struct sockaddr_dl_short)) { >>> =C2=A0+ printf("gw sdl_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ >>> =C2=A0+ const struct sockaddr_dl_short sdl =3D { >>> =C2=A0+ .sdl_family =3D AF_LINK, >>> =C2=A0+ .sdl_len =3D sizeof(struct sockaddr_dl_short), >>> =C2=A0+ .sdl_index =3D gw_sdl->sdl_index, >>> =C2=A0+ }; >>> =C2=A0+ *gw_sdl =3D sdl; >>> =C2=A0+ break; >>> =C2=A0+ } >>> =C2=A0+ } >>> =C2=A0+ >>> =C2=A0+ return (0); >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0+static int >>> =C2=A0+cleanup_xaddrs_inet(struct rt_addrinfo *info) >>> =C2=A0+{ >>> =C2=A0+ struct sockaddr_in *dst_sa, *mask_sa; >>> =C2=A0+ >>> =C2=A0+ /* Check & fixup dst/netmask combination first */ >>> =C2=A0+ dst_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_DST]; >>> =C2=A0+ mask_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; >>> =C2=A0+ >>> =C2=A0+ struct in_addr mask =3D { >>> =C2=A0+ .s_addr =3D mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCA= ST, >>> =C2=A0+ }; >>> =C2=A0+ struct in_addr dst =3D { >>> =C2=A0+ .s_addr =3D htonl(ntohl(dst_sa->sin_addr.s_addr) & ntohl(mask.s= _addr)) >>> =C2=A0+ }; >>> =C2=A0+ >>> =C2=A0+ if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { >>> =C2=A0+ printf("dst sin_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ if (mask_sa && mask_sa->sin_len < sizeof(struct sockaddr_in)) { >>> =C2=A0+ printf("mask sin_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ fill_sockaddr_inet(dst_sa, dst); >>> =C2=A0+ >>> =C2=A0+ if (mask.s_addr !=3D INADDR_BROADCAST) >>> =C2=A0+ fill_sockaddr_inet(mask_sa, mask); >>> =C2=A0+ else { >>> =C2=A0+ info->rti_info[RTAX_NETMASK] =3D NULL; >>> =C2=A0+ info->rti_flags |=3D RTF_HOST; >>> =C2=A0+ info->rti_addrs &=3D ~RTA_NETMASK; >>> =C2=A0+ } >>> =C2=A0+ >>> =C2=A0+ /* Check gateway */ >>> =C2=A0+ if (info->rti_info[RTAX_GATEWAY] !=3D NULL) >>> =C2=A0+ return (cleanup_xaddrs_gateway(info)); >>> =C2=A0+ >>> =C2=A0+ return (0); >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0+static int >>> =C2=A0+cleanup_xaddrs_inet6(struct rt_addrinfo *info) >>> =C2=A0+{ >>> =C2=A0+ struct sockaddr_in6 *dst_sa, *mask_sa; >>> =C2=A0+ struct in6_addr mask; >>> =C2=A0+ >>> =C2=A0+ /* Check & fixup dst/netmask combination first */ >>> =C2=A0+ dst_sa =3D (struct sockaddr_in6 *)info->rti_info[RTAX_DST]; >>> =C2=A0+ mask_sa =3D (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK]= ; >>> =C2=A0+ >>> =C2=A0+ mask =3D mask_sa ? mask_sa->sin6_addr : in6mask128; >>> =C2=A0+ IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); >>> =C2=A0+ >>> =C2=A0+ if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { >>> =C2=A0+ printf("dst sin6_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ if (mask_sa && mask_sa->sin6_len < sizeof(struct sockaddr_in6))= { >>> =C2=A0+ printf("mask sin6_len too small\n"); >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ } >>> =C2=A0+ fill_sockaddr_inet6(dst_sa, &dst_sa->sin6_addr, 0); >>> =C2=A0+ >>> =C2=A0+ if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) >>> =C2=A0+ fill_sockaddr_inet6(mask_sa, &mask, 0); >>> =C2=A0+ else { >>> =C2=A0+ info->rti_info[RTAX_NETMASK] =3D NULL; >>> =C2=A0+ info->rti_flags |=3D RTF_HOST; >>> =C2=A0+ info->rti_addrs &=3D ~RTA_NETMASK; >>> =C2=A0+ } >>> =C2=A0+ >>> =C2=A0+ /* Check gateway */ >>> =C2=A0+ if (info->rti_info[RTAX_GATEWAY] !=3D NULL) >>> =C2=A0+ return (cleanup_xaddrs_gateway(info)); >>> =C2=A0+ >>> =C2=A0+ return (0); >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0+static int >>> =C2=A0+cleanup_xaddrs(struct rt_addrinfo *info) >>> =C2=A0+{ >>> =C2=A0+ int error =3D EAFNOSUPPORT; >>> =C2=A0+ >>> =C2=A0+ if (info->rti_info[RTAX_DST] =3D=3D NULL) >>> =C2=A0+ return (EINVAL); >>> =C2=A0+ >>> =C2=A0+ switch (info->rti_info[RTAX_DST]->sa_family) { >>> =C2=A0+#ifdef INET >>> =C2=A0+ case AF_INET: >>> =C2=A0+ error =3D cleanup_xaddrs_inet(info); >>> =C2=A0+ break; >>> =C2=A0+#endif >>> =C2=A0+#ifdef INET6 >>> =C2=A0+ case AF_INET6: >>> =C2=A0+ error =3D cleanup_xaddrs_inet6(info); >>> =C2=A0+ break; >>> =C2=A0+#endif >>> =C2=A0+ } >>> =C2=A0+ >>> =C2=A0+ return (error); >>> =C2=A0+} >>> =C2=A0+ >>> =C2=A0=C2=A0/* >>> =C2=A0=C2=A0=C2=A0* Fill in @dmask with valid netmask leaving original = @smask >>> =C2=A0=C2=A0=C2=A0* intact. Mostly used with radix netmasks. >>> =C2=A0diff --git a/tests/sys/net/routing/rtsock_common.h >>> =C2=A0b/tests/sys/net/routing/rtsock_common.h >>> =C2=A0index 7da88e0eb512..71476d2b5f3c 100644 >>> =C2=A0--- a/tests/sys/net/routing/rtsock_common.h >>> =C2=A0+++ b/tests/sys/net/routing/rtsock_common.h >>> =C2=A0@@ -826,10 +826,6 @@ _validate_message_sockaddrs(char *buffer, in= t >>> rtm_len, >>> =C2=A0size_t offset, int rtm_ad >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0sa =3D (struct sockaddr *)((char *)s= a + SA_SIZE(sa)); >>> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} >>> =C2=A0- >>> =C2=A0- RTSOCK_ATF_REQUIRE_MSG((struct rt_msghdr *)buffer, parsed_len = =3D=3D >>> rtm_len, >>> =C2=A0- "message len !=3D parsed len: expected %d parsed %d", >>> =C2=A0- rtm_len, (int)parsed_len); >>> =C2=A0=C2=A0} >>> >>> =C2=A0=C2=A0/* >>> =C2=A0_______________________________________________ >>> =C2=A0dev-commits-src-all@freebsd.org mailing list >>> =C2=A0https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all >>> =C2=A0To unsubscribe, send any mail to >>> =C2=A0"dev-commits-src-all-unsubscribe@freebsd.org" >> >> -- >> Mateusz Guzik > --=20 Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:51:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0318854BB02; Tue, 16 Feb 2021 21:51:51 +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 4DgF6t6f6kz3lcn; Tue, 16 Feb 2021 21:51: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 D56BD18DE1; Tue, 16 Feb 2021 21:51: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 11GLpoI4067533; Tue, 16 Feb 2021 21:51:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GLpoAn067532; Tue, 16 Feb 2021 21:51:50 GMT (envelope-from git) Date: Tue, 16 Feb 2021 21:51:50 GMT Message-Id: <202102162151.11GLpoAn067532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: a4513bace0e0 - main - Fix NOINET6 build broken by 2fe5a79425c7. 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/main X-Git-Reftype: branch X-Git-Commit: a4513bace0e0c38d38b0c49c1daea60f2741d781 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:51:51 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=a4513bace0e0c38d38b0c49c1daea60f2741d781 commit a4513bace0e0c38d38b0c49c1daea60f2741d781 Author: Alexander V. Chernikov AuthorDate: 2021-02-16 21:49:48 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-16 21:49:48 +0000 Fix NOINET6 build broken by 2fe5a79425c7. Reported by: mjg --- sys/net/rtsock.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 40ce62c77c2a..3c1fea497af6 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1293,6 +1293,7 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo) return (0); } +#ifdef INET static inline void fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) { @@ -1304,7 +1305,9 @@ fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) }; *sin = nsin; } +#endif +#ifdef INET6 static inline void fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr *addr6, uint32_t scopeid) @@ -1318,6 +1321,7 @@ fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr *addr6, }; *sin6 = nsin6; } +#endif static int cleanup_xaddrs_gateway(struct rt_addrinfo *info) @@ -1372,6 +1376,7 @@ cleanup_xaddrs_gateway(struct rt_addrinfo *info) return (0); } +#ifdef INET static int cleanup_xaddrs_inet(struct rt_addrinfo *info) { @@ -1412,7 +1417,9 @@ cleanup_xaddrs_inet(struct rt_addrinfo *info) return (0); } +#endif +#ifdef INET6 static int cleanup_xaddrs_inet6(struct rt_addrinfo *info) { @@ -1450,6 +1457,7 @@ cleanup_xaddrs_inet6(struct rt_addrinfo *info) return (0); } +#endif static int cleanup_xaddrs(struct rt_addrinfo *info) From owner-dev-commits-src-all@freebsd.org Tue Feb 16 21:52:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7D6E854BC73; Tue, 16 Feb 2021 21:52:54 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward500j.mail.yandex.net (forward500j.mail.yandex.net [5.45.198.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgF861k5Xz3m2K; Tue, 16 Feb 2021 21:52:54 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from iva4-c9485a9ab4a2.qloud-c.yandex.net (iva4-c9485a9ab4a2.qloud-c.yandex.net [IPv6:2a02:6b8:c0c:788c:0:640:c948:5a9a]) by forward500j.mail.yandex.net (Yandex) with ESMTP id 8762F11C1B74; Wed, 17 Feb 2021 00:52:51 +0300 (MSK) Received: from localhost (localhost [::1]) by iva4-c9485a9ab4a2.qloud-c.yandex.net (mxback/Yandex) with ESMTP id TzR8VoIp0b-qoISaQMC; Wed, 17 Feb 2021 00:52:50 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1613512370; bh=iOmIVOzM0KYgfQgfJVw1TTdkO0vTyCREHPriluqsVrc=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=qxfjAAfv+AtRcig0tH4JLP+UQIllDvF9GzaOltCepGDh3wsKSkpBUSLNqgSW9yBkD UEByevy6VVyaSFEMphel4fOUA613Hnwy++OMRR0scUz9ByhLa0RyFIO6BS1Q2hOKXW v9ljBtfeqLX4+vYhVD3JPXQLcxc+LVa0VS/QZhgc= Received: by iva4-74e42d77d21f.qloud-c.yandex.net with HTTP; Wed, 17 Feb 2021 00:52:50 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Mateusz Guzik Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" In-Reply-To: References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> <290641613510357@mail.yandex.ru> Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 16 Feb 2021 21:52:50 +0000 Message-Id: <276041613512339@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 4DgF861k5Xz3m2K X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:52:54 -0000 16.02.2021, 21:47, "Mateusz Guzik" : > In this context I meant NOINET and NOINET6 > > Anyhow I see the following: > sys/net/rtsock.c:1427:2: error: implicit declaration of function > 'IN6_MASK_ADDR' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] >         IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); Should be fixed by a4513bace0e0. Sorry for the breakage. >         ^ > > On 2/16/21, Alexander V. Chernikov wrote: >>  16.02.2021, 20:43, "Mateusz Guzik" : >>>  This breaks the built at least without INET6. >>  It would help if you could share the actual build error. >>  I see -Wunused for 2 function (which I will fix soon), but I'm not sure if >>  that's the error you're running into. >>>  can you please start testing your patches on NOINET kernels >>  Well, it actually builds for me: >>  -------------------------------------------------------------- >>>>>  Kernel build for LINT-NOINET completed on Tue Feb 16 21:21:39 UTC 2021 >>  -------------------------------------------------------------- >>>>>  Kernel(s) LINT-NOINET built in 28 seconds, ncpu: 2, make -j6 >>  -------------------------------------------------------------- >> >>>  On 2/16/21, Alexander V. Chernikov wrote: >>>>   The branch main has been updated by melifaro: >>>> >>>>   URL: >>>>   https://cgit.FreeBSD.org/src/commit/?id=2fe5a79425c79f7b828acd91da66d97230925fc8 >>>> >>>>   commit 2fe5a79425c79f7b828acd91da66d97230925fc8 >>>>   Author: Alexander V. Chernikov >>>>   AuthorDate: 2021-02-16 20:30:04 +0000 >>>>   Commit: Alexander V. Chernikov >>>>   CommitDate: 2021-02-16 20:30:04 +0000 >>>> >>>>       Fix dst/netmask handling in routing socket code. >>>> >>>>       Traditionally routing socket code did almost zero checks on >>>>        the input message except for the most basic size checks. >>>> >>>>       This resulted in the unclear KPI boundary for the routing system >>>>  code >>>>        (`rtrequest*` and now `rib_action()`) w.r.t message validness. >>>> >>>>       Multiple potential problems and nuances exists: >>>>       * Host bits in RTAX_DST sockaddr. Existing applications do send >>>>   prefixes >>>>        with hostbits uncleared. Even `route(8)` does this, as they hope >>>>  the >>>>   kernel >>>>        would do the job of fixing it. Code inside `rib_action()` needs to >>>>   handle >>>>        it on its own (see `rt_maskedcopy()` ugly hack). >>>>       * There are multiple way of adding the host route: it can be DST >>>>   without >>>>        netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be >>>>  set >>>>   correspondingly. >>>>        Currently, these 2 options create 2 DIFFERENT routes in the >>>>  kernel. >>>>       * no sockaddr length/content checking for the "secondary" fields >>>>  exists: >>>>   nothing >>>>        stops rtsock application to send sockaddr_in with length of 25 >>>>  (instead >>>>   of 16). >>>>        Kernel will accept it, install to RIB as is and propagate to all >>>>  rtsock >>>>   consumers, >>>>        potentially triggering bugs in their code. Same goes for sin_port, >>>>   sin_zero, etc. >>>> >>>>       The goal of this change is to make rtsock verify all sockaddr and >>>>  prefix >>>>   consistency. >>>>       Said differently, `rib_action()` or internals should NOT require to >>>>   change any of the >>>>        sockaddrs supplied by `rt_addrinfo` structure due to >>>>  incorrectness. >>>> >>>>       To be more specific, this change implements the following: >>>>       * sockaddr cleanup/validation check is added immediately after >>>>  getting >>>>   sockaddrs from rtm. >>>>       * Per-family dst/netmask checks clears host bits in dst and zeros >>>>  all >>>>   dst/netmask "secondary" fields. >>>>       * The same netmask checking code converts /32(/128) netmasks to >>>>  "host" >>>>   route case >>>>        (NULL netmask, RTF_HOST), removing the dualism. >>>>       * Instead of allowing ANY "known" sockaddr families (0<..>>>  allow >>>>   only actually >>>>        supported ones (inet, inet6, link). >>>>       * Automatically convert `sockaddr_sdl` (AF_LINK) gateways to >>>>         `sockaddr_sdl_short`. >>>> >>>>       Reported by: Guy Yur >>>>       Reviewed By: donner >>>>       Differential Revision: https://reviews.freebsd.org/D28668 >>>>       MFC after: 3 days >>>>   --- >>>>    sys/net/rtsock.c | 201 >>>>   +++++++++++++++++++++++++++++++++- >>>>    tests/sys/net/routing/rtsock_common.h | 4 - >>>>    2 files changed, 195 insertions(+), 10 deletions(-) >>>> >>>>   diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c >>>>   index 3a98b366dfc3..40ce62c77c2a 100644 >>>>   --- a/sys/net/rtsock.c >>>>   +++ b/sys/net/rtsock.c >>>>   @@ -70,6 +70,7 @@ >>>>    #include >>>>    #include >>>>    #ifdef INET6 >>>>   +#include >>>>    #include >>>>    #include >>>>    #endif >>>>   @@ -173,6 +174,7 @@ static int rtsock_msg_buffer(int type, struct >>>>   rt_addrinfo *rtinfo, >>>>                            struct walkarg *w, int *plen); >>>>    static int rt_xaddrs(caddr_t cp, caddr_t cplim, >>>>                            struct rt_addrinfo *rtinfo); >>>>   +static int cleanup_xaddrs(struct rt_addrinfo *info); >>>>    static int sysctl_dumpentry(struct rtentry *rt, void *vw); >>>>    static int sysctl_dumpnhop(struct rtentry *rt, struct nhop_object *nh, >>>>                            uint32_t weight, struct walkarg *w); >>>>   @@ -636,11 +638,9 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, >>>>  u_int >>>>   fibnum, struct rt_addrinfo * >>>>                    return (EINVAL); >>>> >>>>            info->rti_flags = rtm->rtm_flags; >>>>   - if (info->rti_info[RTAX_DST] == NULL || >>>>   - info->rti_info[RTAX_DST]->sa_family >= AF_MAX || >>>>   - (info->rti_info[RTAX_GATEWAY] != NULL && >>>>   - info->rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) >>>>   - return (EINVAL); >>>>   + error = cleanup_xaddrs(info); >>>>   + if (error != 0) >>>>   + return (error); >>>>            saf = info->rti_info[RTAX_DST]->sa_family; >>>>            /* >>>>             * Verify that the caller has the appropriate privilege; >>>>  RTM_GET >>>>   @@ -739,7 +739,14 @@ handle_rtm_get(struct rt_addrinfo *info, u_int >>>>  fibnum, >>>> >>>>            RIB_RLOCK(rnh); >>>> >>>>   - if (info->rti_info[RTAX_NETMASK] == NULL) { >>>>   + /* >>>>   + * By (implicit) convention host route (one without netmask) >>>>   + * means longest-prefix-match request and the route with netmask >>>>   + * means exact-match lookup. >>>>   + * As cleanup_xaddrs() cleans up info flags&addrs for the /32,/128 >>>>   + * prefixes, use original data to check for the netmask presence. >>>>   + */ >>>>   + if ((rtm->rtm_addrs & RTA_NETMASK) == 0) { >>>>                    /* >>>>                     * Provide longest prefix match for >>>>                     * address lookup (no mask). >>>>   @@ -1286,6 +1293,188 @@ rt_xaddrs(caddr_t cp, caddr_t cplim, struct >>>>   rt_addrinfo *rtinfo) >>>>            return (0); >>>>    } >>>> >>>>   +static inline void >>>>   +fill_sockaddr_inet(struct sockaddr_in *sin, struct in_addr addr) >>>>   +{ >>>>   + >>>>   + const struct sockaddr_in nsin = { >>>>   + .sin_family = AF_INET, >>>>   + .sin_len = sizeof(struct sockaddr_in), >>>>   + .sin_addr = addr, >>>>   + }; >>>>   + *sin = nsin; >>>>   +} >>>>   + >>>>   +static inline void >>>>   +fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr >>>>   *addr6, >>>>   + uint32_t scopeid) >>>>   +{ >>>>   + >>>>   + const struct sockaddr_in6 nsin6 = { >>>>   + .sin6_family = AF_INET6, >>>>   + .sin6_len = sizeof(struct sockaddr_in6), >>>>   + .sin6_addr = *addr6, >>>>   + .sin6_scope_id = scopeid, >>>>   + }; >>>>   + *sin6 = nsin6; >>>>   +} >>>>   + >>>>   +static int >>>>   +cleanup_xaddrs_gateway(struct rt_addrinfo *info) >>>>   +{ >>>>   + struct sockaddr *gw = info->rti_info[RTAX_GATEWAY]; >>>>   + >>>>   + switch (gw->sa_family) { >>>>   +#ifdef INET >>>>   + case AF_INET: >>>>   + { >>>>   + struct sockaddr_in *gw_sin = (struct sockaddr_in *)gw; >>>>   + if (gw_sin->sin_len < sizeof(struct sockaddr_in)) { >>>>   + printf("gw sin_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + fill_sockaddr_inet(gw_sin, gw_sin->sin_addr); >>>>   + } >>>>   + break; >>>>   +#endif >>>>   +#ifdef INET6 >>>>   + case AF_INET6: >>>>   + { >>>>   + struct sockaddr_in6 *gw_sin6 = (struct sockaddr_in6 *)gw; >>>>   + if (gw_sin6->sin6_len < sizeof(struct sockaddr_in6)) { >>>>   + printf("gw sin6_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + fill_sockaddr_inet6(gw_sin6, &gw_sin6->sin6_addr, 0); >>>>   + break; >>>>   + } >>>>   +#endif >>>>   + case AF_LINK: >>>>   + { >>>>   + struct sockaddr_dl_short *gw_sdl; >>>>   + >>>>   + gw_sdl = (struct sockaddr_dl_short *)gw; >>>>   + if (gw_sdl->sdl_len < sizeof(struct sockaddr_dl_short)) { >>>>   + printf("gw sdl_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + >>>>   + const struct sockaddr_dl_short sdl = { >>>>   + .sdl_family = AF_LINK, >>>>   + .sdl_len = sizeof(struct sockaddr_dl_short), >>>>   + .sdl_index = gw_sdl->sdl_index, >>>>   + }; >>>>   + *gw_sdl = sdl; >>>>   + break; >>>>   + } >>>>   + } >>>>   + >>>>   + return (0); >>>>   +} >>>>   + >>>>   +static int >>>>   +cleanup_xaddrs_inet(struct rt_addrinfo *info) >>>>   +{ >>>>   + struct sockaddr_in *dst_sa, *mask_sa; >>>>   + >>>>   + /* Check & fixup dst/netmask combination first */ >>>>   + dst_sa = (struct sockaddr_in *)info->rti_info[RTAX_DST]; >>>>   + mask_sa = (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; >>>>   + >>>>   + struct in_addr mask = { >>>>   + .s_addr = mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, >>>>   + }; >>>>   + struct in_addr dst = { >>>>   + .s_addr = htonl(ntohl(dst_sa->sin_addr.s_addr) & ntohl(mask.s_addr)) >>>>   + }; >>>>   + >>>>   + if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { >>>>   + printf("dst sin_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + if (mask_sa && mask_sa->sin_len < sizeof(struct sockaddr_in)) { >>>>   + printf("mask sin_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + fill_sockaddr_inet(dst_sa, dst); >>>>   + >>>>   + if (mask.s_addr != INADDR_BROADCAST) >>>>   + fill_sockaddr_inet(mask_sa, mask); >>>>   + else { >>>>   + info->rti_info[RTAX_NETMASK] = NULL; >>>>   + info->rti_flags |= RTF_HOST; >>>>   + info->rti_addrs &= ~RTA_NETMASK; >>>>   + } >>>>   + >>>>   + /* Check gateway */ >>>>   + if (info->rti_info[RTAX_GATEWAY] != NULL) >>>>   + return (cleanup_xaddrs_gateway(info)); >>>>   + >>>>   + return (0); >>>>   +} >>>>   + >>>>   +static int >>>>   +cleanup_xaddrs_inet6(struct rt_addrinfo *info) >>>>   +{ >>>>   + struct sockaddr_in6 *dst_sa, *mask_sa; >>>>   + struct in6_addr mask; >>>>   + >>>>   + /* Check & fixup dst/netmask combination first */ >>>>   + dst_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_DST]; >>>>   + mask_sa = (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK]; >>>>   + >>>>   + mask = mask_sa ? mask_sa->sin6_addr : in6mask128; >>>>   + IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); >>>>   + >>>>   + if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { >>>>   + printf("dst sin6_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + if (mask_sa && mask_sa->sin6_len < sizeof(struct sockaddr_in6)) { >>>>   + printf("mask sin6_len too small\n"); >>>>   + return (EINVAL); >>>>   + } >>>>   + fill_sockaddr_inet6(dst_sa, &dst_sa->sin6_addr, 0); >>>>   + >>>>   + if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) >>>>   + fill_sockaddr_inet6(mask_sa, &mask, 0); >>>>   + else { >>>>   + info->rti_info[RTAX_NETMASK] = NULL; >>>>   + info->rti_flags |= RTF_HOST; >>>>   + info->rti_addrs &= ~RTA_NETMASK; >>>>   + } >>>>   + >>>>   + /* Check gateway */ >>>>   + if (info->rti_info[RTAX_GATEWAY] != NULL) >>>>   + return (cleanup_xaddrs_gateway(info)); >>>>   + >>>>   + return (0); >>>>   +} >>>>   + >>>>   +static int >>>>   +cleanup_xaddrs(struct rt_addrinfo *info) >>>>   +{ >>>>   + int error = EAFNOSUPPORT; >>>>   + >>>>   + if (info->rti_info[RTAX_DST] == NULL) >>>>   + return (EINVAL); >>>>   + >>>>   + switch (info->rti_info[RTAX_DST]->sa_family) { >>>>   +#ifdef INET >>>>   + case AF_INET: >>>>   + error = cleanup_xaddrs_inet(info); >>>>   + break; >>>>   +#endif >>>>   +#ifdef INET6 >>>>   + case AF_INET6: >>>>   + error = cleanup_xaddrs_inet6(info); >>>>   + break; >>>>   +#endif >>>>   + } >>>>   + >>>>   + return (error); >>>>   +} >>>>   + >>>>    /* >>>>     * Fill in @dmask with valid netmask leaving original @smask >>>>     * intact. Mostly used with radix netmasks. >>>>   diff --git a/tests/sys/net/routing/rtsock_common.h >>>>   b/tests/sys/net/routing/rtsock_common.h >>>>   index 7da88e0eb512..71476d2b5f3c 100644 >>>>   --- a/tests/sys/net/routing/rtsock_common.h >>>>   +++ b/tests/sys/net/routing/rtsock_common.h >>>>   @@ -826,10 +826,6 @@ _validate_message_sockaddrs(char *buffer, int >>>>  rtm_len, >>>>   size_t offset, int rtm_ad >>>>                    } >>>>                    sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); >>>>            } >>>>   - >>>>   - RTSOCK_ATF_REQUIRE_MSG((struct rt_msghdr *)buffer, parsed_len == >>>>  rtm_len, >>>>   - "message len != parsed len: expected %d parsed %d", >>>>   - rtm_len, (int)parsed_len); >>>>    } >>>> >>>>    /* >>>>   _______________________________________________ >>>>   dev-commits-src-all@freebsd.org mailing list >>>>   https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all >>>>   To unsubscribe, send any mail to >>>>   "dev-commits-src-all-unsubscribe@freebsd.org" >>> >>>  -- >>>  Mateusz Guzik > > -- > Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Tue Feb 16 22:06:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3972054C136; Tue, 16 Feb 2021 22:06: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 4DgFRz12WVz3p3H; Tue, 16 Feb 2021 22:06: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 1660919351; Tue, 16 Feb 2021 22:06: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 11GM6dhu083960; Tue, 16 Feb 2021 22:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GM6cWN083959; Tue, 16 Feb 2021 22:06:38 GMT (envelope-from git) Date: Tue, 16 Feb 2021 22:06:38 GMT Message-Id: <202102162206.11GM6cWN083959@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 88e852c0b5c8 - main - OpenSSL: Merge OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88e852c0b5c872b1a3234515623104ae61b60773 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 22:06:39 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=88e852c0b5c872b1a3234515623104ae61b60773 commit 88e852c0b5c872b1a3234515623104ae61b60773 Merge: a4513bace0e0 4f55bd5321b7 Author: Jung-uk Kim AuthorDate: 2021-02-16 22:00:27 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-16 22:00:27 +0000 OpenSSL: Merge OpenSSL 1.1.1j Merge commit '4f55bd5321b72491d4eff396e4928e9ab0706735' crypto/openssl/AUTHORS | 7 +++ crypto/openssl/CHANGES | 37 +++++++++++++++ crypto/openssl/CONTRIBUTING | 4 +- crypto/openssl/Configure | 29 ++++++------ crypto/openssl/INSTALL | 15 +++--- crypto/openssl/NEWS | 10 ++++ crypto/openssl/README | 2 +- crypto/openssl/apps/ca.c | 53 +++++++++------------- crypto/openssl/apps/progs.pl | 0 crypto/openssl/crypto/armcap.c | 19 +++++++- crypto/openssl/crypto/asn1/charmap.h | 2 +- crypto/openssl/crypto/asn1/charmap.pl | 0 crypto/openssl/crypto/bf/asm/bf-586.pl | 0 crypto/openssl/crypto/bn/asm/bn-586.pl | 0 crypto/openssl/crypto/bn/asm/co-586.pl | 0 crypto/openssl/crypto/bn/asm/ppc.pl | 0 crypto/openssl/crypto/bn/bn_prime.h | 2 +- crypto/openssl/crypto/bn/bn_prime.pl | 0 crypto/openssl/crypto/cast/asm/cast-586.pl | 0 crypto/openssl/crypto/conf/conf_def.c | 16 ++++++- crypto/openssl/crypto/conf/conf_def.h | 2 +- crypto/openssl/crypto/conf/keysets.pl | 0 crypto/openssl/crypto/des/asm/crypt586.pl | 0 crypto/openssl/crypto/des/asm/des-586.pl | 0 crypto/openssl/crypto/des/asm/desboth.pl | 0 crypto/openssl/crypto/dh/dh_key.c | 33 ++++++++++++-- crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/evp/evp_enc.c | 27 +++++++++++ crypto/openssl/crypto/evp/evp_err.c | 4 +- crypto/openssl/crypto/md5/asm/md5-586.pl | 0 crypto/openssl/crypto/mem_sec.c | 8 +++- crypto/openssl/crypto/objects/obj_dat.h | 2 +- crypto/openssl/crypto/objects/obj_dat.pl | 0 crypto/openssl/crypto/objects/obj_xref.h | 2 +- crypto/openssl/crypto/objects/objects.pl | 0 crypto/openssl/crypto/perlasm/cbc.pl | 0 crypto/openssl/crypto/perlasm/x86asm.pl | 0 crypto/openssl/crypto/perlasm/x86nasm.pl | 0 .../openssl/crypto/poly1305/asm/poly1305-armv4.pl | 13 ++++-- crypto/openssl/crypto/ppccap.c | 20 +++++++- crypto/openssl/crypto/rc4/asm/rc4-586.pl | 0 crypto/openssl/crypto/rc5/asm/rc5-586.pl | 0 crypto/openssl/crypto/ripemd/asm/rmd-586.pl | 0 crypto/openssl/crypto/rsa/rsa_ssl.c | 10 +++- crypto/openssl/crypto/sha/asm/sha1-586.pl | 0 crypto/openssl/crypto/sha/asm/sha1-ia64.pl | 0 crypto/openssl/crypto/srp/srp_lib.c | 13 ++++-- crypto/openssl/crypto/x509/x509_cmp.c | 24 ++++++---- crypto/openssl/crypto/x509/x509_vfy.c | 15 +++--- crypto/openssl/crypto/x509/x_all.c | 4 +- crypto/openssl/crypto/x509/x_attrib.c | 5 +- crypto/openssl/crypto/x509v3/v3_purp.c | 14 ++++-- crypto/openssl/crypto/x86_64cpuid.pl | 0 crypto/openssl/crypto/x86cpuid.pl | 0 crypto/openssl/doc/man1/ca.pod | 4 +- crypto/openssl/doc/man1/cms.pod | 4 +- crypto/openssl/doc/man1/crl2pkcs7.pod | 4 +- crypto/openssl/doc/man1/dgst.pod | 4 +- crypto/openssl/doc/man1/dsa.pod | 6 +-- crypto/openssl/doc/man1/ec.pod | 6 +-- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/genpkey.pod | 4 +- crypto/openssl/doc/man1/genrsa.pod | 4 +- crypto/openssl/doc/man1/pkcs12.pod | 14 ++---- crypto/openssl/doc/man1/pkcs8.pod | 6 +-- crypto/openssl/doc/man1/pkey.pod | 6 +-- crypto/openssl/doc/man1/pkeyutl.pod | 4 +- crypto/openssl/doc/man1/req.pod | 6 +-- crypto/openssl/doc/man1/rsa.pod | 6 +-- crypto/openssl/doc/man1/s_client.pod | 4 +- crypto/openssl/doc/man1/s_server.pod | 4 +- crypto/openssl/doc/man1/smime.pod | 4 +- crypto/openssl/doc/man1/spkac.pod | 4 +- crypto/openssl/doc/man1/storeutl.pod | 4 +- crypto/openssl/doc/man1/ts.pod | 4 +- crypto/openssl/doc/man1/x509.pod | 4 +- crypto/openssl/doc/man3/DH_generate_key.pod | 27 +++++++++-- crypto/openssl/doc/man3/OCSP_sendreq_new.pod | 28 ++++++++++-- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 2 +- .../openssl/doc/man3/X509_get_extension_flags.pod | 11 +++-- crypto/openssl/include/openssl/evperr.h | 7 ++- crypto/openssl/include/openssl/obj_mac.h | 2 +- crypto/openssl/include/openssl/opensslv.h | 4 +- crypto/openssl/include/openssl/x509v3.h | 7 +-- crypto/openssl/ssl/d1_lib.c | 11 +++-- crypto/openssl/ssl/record/rec_layer_d1.c | 5 +- crypto/openssl/ssl/ssl_local.h | 3 +- crypto/openssl/ssl/statem/extensions.c | 5 +- crypto/openssl/ssl/statem/statem_clnt.c | 3 +- crypto/openssl/ssl/statem/statem_lib.c | 15 +++++- 90 files changed, 433 insertions(+), 202 deletions(-) diff --cc crypto/openssl/CHANGES index 4d61c1dadbaa,000000000000..a4a63a9bea22 mode 100644,000000..100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@@ -1,13529 -1,0 +1,13566 @@@ + + OpenSSL CHANGES + _______________ + + This is a high-level summary of the most important changes. + For a full list of changes, see the git commit log; for example, + https://github.com/openssl/openssl/commits/ and pick the appropriate + release branch. + ++ Changes between 1.1.1i and 1.1.1j [16 Feb 2021] ++ ++ *) Fixed the X509_issuer_and_serial_hash() function. It attempts to ++ create a unique hash value based on the issuer and serial number data ++ contained within an X509 certificate. However it was failing to correctly ++ handle any errors that may occur while parsing the issuer field (which might ++ occur if the issuer field is maliciously constructed). This may subsequently ++ result in a NULL pointer deref and a crash leading to a potential denial of ++ service attack. ++ (CVE-2021-23841) ++ [Matt Caswell] ++ ++ *) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING ++ padding mode to correctly check for rollback attacks. This is considered a ++ bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is ++ CVE-2021-23839. ++ [Matt Caswell] ++ ++ *) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate ++ functions. Previously they could overflow the output length argument in some ++ cases where the input length is close to the maximum permissable length for ++ an integer on the platform. In such cases the return value from the function ++ call would be 1 (indicating success), but the output length value would be ++ negative. This could cause applications to behave incorrectly or crash. ++ (CVE-2021-23840) ++ [Matt Caswell] ++ ++ *) Fixed SRP_Calc_client_key so that it runs in constant time. The previous ++ implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This ++ could be exploited in a side channel attack to recover the password. Since ++ the attack is local host only this is outside of the current OpenSSL ++ threat model and therefore no CVE is assigned. ++ ++ Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this ++ issue. ++ [Matt Caswell] ++ + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] + + *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function + This function could crash if both GENERAL_NAMEs contain an EDIPARTYNAME. + If an attacker can control both items being compared then this could lead + to a possible denial of service attack. OpenSSL itself uses the + GENERAL_NAME_cmp function for two purposes: + 1) Comparing CRL distribution point names between an available CRL and a + CRL distribution point embedded in an X509 certificate + 2) When verifying that a timestamp response token signer matches the + timestamp authority name (exposed via the API functions + TS_RESP_verify_response and TS_RESP_verify_token) + (CVE-2020-1971) + [Matt Caswell] + + *) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target. + [Stuart Carnie] + + *) The security callback, which can be customised by application code, supports + the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY + in the "other" parameter. In most places this is what is passed. All these + places occur server side. However there was one client side call of this + security operation and it passed a DH object instead. This is incorrect + according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all + of the other locations. Therefore this client side call has been changed to + pass an EVP_PKEY instead. + [Matt Caswell] + + *) In 1.1.1h, an expired trusted (root) certificate was not anymore rejected + when validating a certificate path. This check is restored in 1.1.1i. + [David von Oheimb] + + Changes between 1.1.1g and 1.1.1h [22 Sep 2020] + + *) Certificates with explicit curve parameters are now disallowed in + verification chains if the X509_V_FLAG_X509_STRICT flag is used. + [Tomas Mraz] + + *) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently + ignore TLS protocol version bounds when configuring DTLS-based contexts, and + conversely, silently ignore DTLS protocol version bounds when configuring + TLS-based contexts. The commands can be repeated to set bounds of both + types. The same applies with the corresponding "min_protocol" and + "max_protocol" command-line switches, in case some application uses both TLS + and DTLS. + + SSL_CTX instances that are created for a fixed protocol version (e.g. + TLSv1_server_method()) also silently ignore version bounds. Previously + attempts to apply bounds to these protocol versions would result in an + error. Now only the "version-flexible" SSL_CTX instances are subject to + limits in configuration files in command-line options. + [Viktor Dukhovni] + + *) Handshake now fails if Extended Master Secret extension is dropped + on renegotiation. + [Tomas Mraz] + + *) Accidentally, an expired trusted (root) certificate is not anymore rejected + when validating a certificate path. + [David von Oheimb] + + *) The Oracle Developer Studio compiler will start reporting deprecated APIs + + Changes between 1.1.1f and 1.1.1g [21 Apr 2020] + + *) Fixed segmentation fault in SSL_check_chain() + Server or client applications that call the SSL_check_chain() function + during or after a TLS 1.3 handshake may crash due to a NULL pointer + dereference as a result of incorrect handling of the + "signature_algorithms_cert" TLS extension. The crash occurs if an invalid + or unrecognised signature algorithm is received from the peer. This could + be exploited by a malicious peer in a Denial of Service attack. + (CVE-2020-1967) + [Benjamin Kaduk] + + *) Added AES consttime code for no-asm configurations + an optional constant time support for AES was added + when building openssl for no-asm. + Enable with: ./config no-asm -DOPENSSL_AES_CONST_TIME + Disable with: ./config no-asm -DOPENSSL_NO_AES_CONST_TIME + At this time this feature is by default disabled. + It will be enabled by default in 3.0. + [Bernd Edlinger] + + Changes between 1.1.1e and 1.1.1f [31 Mar 2020] + + *) Revert the change of EOF detection while reading in libssl to avoid + regressions in applications depending on the current way of reporting + the EOF. As the existing method is not fully accurate the change to + reporting the EOF via SSL_ERROR_SSL is kept on the current development + branch and will be present in the 3.0 release. + [Tomas Mraz] + + *) Revised BN_generate_prime_ex to not avoid factors 3..17863 in p-1 + when primes for RSA keys are computed. + Since we previously always generated primes == 2 (mod 3) for RSA keys, + the 2-prime and 3-prime RSA modules were easy to distinguish, since + N = p*q = 1 (mod 3), but N = p*q*r = 2 (mod 3). Therefore fingerprinting + 2-prime vs. 3-prime RSA keys was possible by computing N mod 3. + This avoids possible fingerprinting of newly generated RSA modules. + [Bernd Edlinger] + + Changes between 1.1.1d and 1.1.1e [17 Mar 2020] + *) Properly detect EOF while reading in libssl. Previously if we hit an EOF + while reading in libssl then we would report an error back to the + application (SSL_ERROR_SYSCALL) but errno would be 0. We now add + an error to the stack (which means we instead return SSL_ERROR_SSL) and + therefore give a hint as to what went wrong. + [Matt Caswell] + + *) Check that ed25519 and ed448 are allowed by the security level. Previously + signature algorithms not using an MD were not being checked that they were + allowed by the security level. + [Kurt Roeckx] + + *) Fixed SSL_get_servername() behaviour. The behaviour of SSL_get_servername() + was not quite right. The behaviour was not consistent between resumption + and normal handshakes, and also not quite consistent with historical + behaviour. The behaviour in various scenarios has been clarified and + it has been updated to make it match historical behaviour as closely as + possible. + [Matt Caswell] + + *) [VMS only] The header files that the VMS compilers include automatically, + __DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H, use pragmas that + the C++ compiler doesn't understand. This is a shortcoming in the + compiler, but can be worked around with __cplusplus guards. + + C++ applications that use OpenSSL libraries must be compiled using the + qualifier '/NAMES=(AS_IS,SHORTENED)' to be able to use all the OpenSSL + functions. Otherwise, only functions with symbols of less than 31 + characters can be used, as the linker will not be able to successfully + resolve symbols with longer names. + [Richard Levitte] + + *) Corrected the documentation of the return values from the EVP_DigestSign* + set of functions. The documentation mentioned negative values for some + errors, but this was never the case, so the mention of negative values + was removed. + + Code that followed the documentation and thereby check with something + like 'EVP_DigestSignInit(...) <= 0' will continue to work undisturbed. + [Richard Levitte] + + *) Fixed an an overflow bug in the x64_64 Montgomery squaring procedure + used in exponentiation with 512-bit moduli. No EC algorithms are + affected. Analysis suggests that attacks against 2-prime RSA1024, + 3-prime RSA1536, and DSA1024 as a result of this defect would be very + difficult to perform and are not believed likely. Attacks against DH512 + are considered just feasible. However, for an attack the target would + have to re-use the DH512 private key, which is not recommended anyway. + Also applications directly using the low level API BN_mod_exp may be + affected if they use BN_FLG_CONSTTIME. + (CVE-2019-1551) + [Andy Polyakov] + + *) Added a new method to gather entropy on VMS, based on SYS$GET_ENTROPY. + The presence of this system service is determined at run-time. + [Richard Levitte] + + *) Added newline escaping functionality to a filename when using openssl dgst. + This output format is to replicate the output format found in the '*sum' + checksum programs. This aims to preserve backward compatibility. + [Matt Eaton, Richard Levitte, and Paul Dale] + + *) Print all values for a PKCS#12 attribute with 'openssl pkcs12', not just + the first value. + [Jon Spillett] + + Changes between 1.1.1c and 1.1.1d [10 Sep 2019] + + *) Fixed a fork protection issue. OpenSSL 1.1.1 introduced a rewritten random + number generator (RNG). This was intended to include protection in the + event of a fork() system call in order to ensure that the parent and child + processes did not share the same RNG state. However this protection was not + being used in the default case. + + A partial mitigation for this issue is that the output from a high + precision timer is mixed into the RNG state so the likelihood of a parent + and child process sharing state is significantly reduced. + + If an application already calls OPENSSL_init_crypto() explicitly using + OPENSSL_INIT_ATFORK then this problem does not occur at all. + (CVE-2019-1549) + [Matthias St. Pierre] + + *) For built-in EC curves, ensure an EC_GROUP built from the curve name is + used even when parsing explicit parameters, when loading a serialized key + or calling `EC_GROUP_new_from_ecpkparameters()`/ + `EC_GROUP_new_from_ecparameters()`. + This prevents bypass of security hardening and performance gains, + especially for curves with specialized EC_METHODs. + By default, if a key encoded with explicit parameters is loaded and later + serialized, the output is still encoded with explicit parameters, even if + internally a "named" EC_GROUP is used for computation. + [Nicola Tuveri] + + *) Compute ECC cofactors if not provided during EC_GROUP construction. Before + this change, EC_GROUP_set_generator would accept order and/or cofactor as + NULL. After this change, only the cofactor parameter can be NULL. It also + does some minimal sanity checks on the passed order. + (CVE-2019-1547) + [Billy Bob Brumley] + + *) Fixed a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey. + An attack is simple, if the first CMS_recipientInfo is valid but the + second CMS_recipientInfo is chosen ciphertext. If the second + recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct + encryption key will be replaced by garbage, and the message cannot be + decoded, but if the RSA decryption fails, the correct encryption key is + used and the recipient will not notice the attack. + As a work around for this potential attack the length of the decrypted + key must be equal to the cipher default key length, in case the + certifiate is not given and all recipientInfo are tried out. + The old behaviour can be re-enabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag. + (CVE-2019-1563) + [Bernd Edlinger] + + *) Early start up entropy quality from the DEVRANDOM seed source has been + improved for older Linux systems. The RAND subsystem will wait for + /dev/random to be producing output before seeding from /dev/urandom. + The seeded state is stored for future library initialisations using + a system global shared memory segment. The shared memory identifier + can be configured by defining OPENSSL_RAND_SEED_DEVRANDOM_SHM_ID to + the desired value. The default identifier is 114. + [Paul Dale] + + *) Correct the extended master secret constant on EBCDIC systems. Without this + fix TLS connections between an EBCDIC system and a non-EBCDIC system that + negotiate EMS will fail. Unfortunately this also means that TLS connections + between EBCDIC systems with this fix, and EBCDIC systems without this + fix will fail if they negotiate EMS. + [Matt Caswell] + + *) Use Windows installation paths in the mingw builds + + Mingw isn't a POSIX environment per se, which means that Windows + paths should be used for installation. + (CVE-2019-1552) + [Richard Levitte] + + *) Changed DH_check to accept parameters with order q and 2q subgroups. + With order 2q subgroups the bit 0 of the private key is not secret + but DH_generate_key works around that by clearing bit 0 of the + private key for those. This avoids leaking bit 0 of the private key. + [Bernd Edlinger] + + *) Significantly reduce secure memory usage by the randomness pools. + [Paul Dale] + + *) Revert the DEVRANDOM_WAIT feature for Linux systems + + The DEVRANDOM_WAIT feature added a select() call to wait for the + /dev/random device to become readable before reading from the + /dev/urandom device. + + It turned out that this change had negative side effects on + performance which were not acceptable. After some discussion it + was decided to revert this feature and leave it up to the OS + resp. the platform maintainer to ensure a proper initialization + during early boot time. + [Matthias St. Pierre] + + Changes between 1.1.1b and 1.1.1c [28 May 2019] + + *) Add build tests for C++. These are generated files that only do one + thing, to include one public OpenSSL head file each. This tests that + the public header files can be usefully included in a C++ application. + + This test isn't enabled by default. It can be enabled with the option + 'enable-buildtest-c++'. + [Richard Levitte] + + *) Enable SHA3 pre-hashing for ECDSA and DSA. + [Patrick Steuer] + + *) Change the default RSA, DSA and DH size to 2048 bit instead of 1024. + This changes the size when using the genpkey app when no size is given. It + fixes an omission in earlier changes that changed all RSA, DSA and DH + generation apps to use 2048 bits by default. + [Kurt Roeckx] + + *) Reorganize the manual pages to consistently have RETURN VALUES, + EXAMPLES, SEE ALSO and HISTORY come in that order, and adjust + util/fix-doc-nits accordingly. + [Paul Yang, Joshua Lock] + + *) Add the missing accessor EVP_PKEY_get0_engine() + [Matt Caswell] + + *) Have apps like 's_client' and 's_server' output the signature scheme + along with other cipher suite parameters when debugging. + [Lorinczy Zsigmond] + + *) Make OPENSSL_config() error agnostic again. + [Richard Levitte] + + *) Do the error handling in RSA decryption constant time. + [Bernd Edlinger] + + *) Prevent over long nonces in ChaCha20-Poly1305. + + ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input + for every encryption operation. RFC 7539 specifies that the nonce value + (IV) should be 96 bits (12 bytes). OpenSSL allows a variable nonce length + and front pads the nonce with 0 bytes if it is less than 12 + bytes. However it also incorrectly allows a nonce to be set of up to 16 + bytes. In this case only the last 12 bytes are significant and any + additional leading bytes are ignored. + + It is a requirement of using this cipher that nonce values are + unique. Messages encrypted using a reused nonce value are susceptible to + serious confidentiality and integrity attacks. If an application changes + the default nonce length to be longer than 12 bytes and then makes a + change to the leading bytes of the nonce expecting the new value to be a + new unique nonce then such an application could inadvertently encrypt + messages with a reused nonce. + + Additionally the ignored bytes in a long nonce are not covered by the + integrity guarantee of this cipher. Any application that relies on the + integrity of these ignored leading bytes of a long nonce may be further + affected. Any OpenSSL internal use of this cipher, including in SSL/TLS, + is safe because no such use sets such a long nonce value. However user + applications that use this cipher directly and set a non-default nonce + length to be longer than 12 bytes may be vulnerable. + + This issue was reported to OpenSSL on 16th of March 2019 by Joran Dirk + Greef of Ronomon. + (CVE-2019-1543) + [Matt Caswell] + + *) Add DEVRANDOM_WAIT feature for Linux systems + + On older Linux systems where the getrandom() system call is not available, + OpenSSL normally uses the /dev/urandom device for seeding its CSPRNG. + Contrary to getrandom(), the /dev/urandom device will not block during + early boot when the kernel CSPRNG has not been seeded yet. + + To mitigate this known weakness, use select() to wait for /dev/random to + become readable before reading from /dev/urandom. + + *) Ensure that SM2 only uses SM3 as digest algorithm + [Paul Yang] + + Changes between 1.1.1a and 1.1.1b [26 Feb 2019] + + *) Added SCA hardening for modular field inversion in EC_GROUP through + a new dedicated field_inv() pointer in EC_METHOD. + This also addresses a leakage affecting conversions from projective + to affine coordinates. + [Billy Bob Brumley, Nicola Tuveri] + + *) Change the info callback signals for the start and end of a post-handshake + message exchange in TLSv1.3. In 1.1.1/1.1.1a we used SSL_CB_HANDSHAKE_START + and SSL_CB_HANDSHAKE_DONE. Experience has shown that many applications get + confused by this and assume that a TLSv1.2 renegotiation has started. This + can break KeyUpdate handling. Instead we no longer signal the start and end + of a post handshake message exchange (although the messages themselves are + still signalled). This could break some applications that were expecting + the old signals. However without this KeyUpdate is not usable for many + applications. + [Matt Caswell] + + *) Fix a bug in the computation of the endpoint-pair shared secret used + by DTLS over SCTP. This breaks interoperability with older versions + of OpenSSL like OpenSSL 1.1.0 and OpenSSL 1.0.2. There is a runtime + switch SSL_MODE_DTLS_SCTP_LABEL_LENGTH_BUG (off by default) enabling + interoperability with such broken implementations. However, enabling + this switch breaks interoperability with correct implementations. + + *) Fix a use after free bug in d2i_X509_PUBKEY when overwriting a + re-used X509_PUBKEY object if the second PUBKEY is malformed. + [Bernd Edlinger] + + *) Move strictness check from EVP_PKEY_asn1_new() to EVP_PKEY_asn1_add0(). + [Richard Levitte] + + *) Remove the 'dist' target and add a tarball building script. The + 'dist' target has fallen out of use, and it shouldn't be + necessary to configure just to create a source distribution. + [Richard Levitte] + + *) Added support for Linux Kernel TLS data-path. The Linux Kernel data-path + improves application performance by removing data copies and providing + applications with zero-copy system calls such as sendfile and splice. + [Boris Pismenny] + + Changes between 1.1.1 and 1.1.1a [20 Nov 2018] + + *) Timing vulnerability in DSA signature generation + + The OpenSSL DSA signature algorithm has been shown to be vulnerable to a + timing side channel attack. An attacker could use variations in the signing + algorithm to recover the private key. + + This issue was reported to OpenSSL on 16th October 2018 by Samuel Weiser. + (CVE-2018-0734) + [Paul Dale] + + *) Timing vulnerability in ECDSA signature generation + + The OpenSSL ECDSA signature algorithm has been shown to be vulnerable to a + timing side channel attack. An attacker could use variations in the signing + algorithm to recover the private key. + + This issue was reported to OpenSSL on 25th October 2018 by Samuel Weiser. + (CVE-2018-0735) + [Paul Dale] + + *) Added EVP_PKEY_ECDH_KDF_X9_63 and ecdh_KDF_X9_63() as replacements for + the EVP_PKEY_ECDH_KDF_X9_62 KDF type and ECDH_KDF_X9_62(). The old names + are retained for backwards compatibility. + [Antoine Salon] + + *) Fixed the issue that RAND_add()/RAND_seed() silently discards random input + if its length exceeds 4096 bytes. The limit has been raised to a buffer size + of two gigabytes and the error handling improved. + + This issue was reported to OpenSSL by Dr. Falko Strenzke. It has been + categorized as a normal bug, not a security issue, because the DRBG reseeds + automatically and is fully functional even without additional randomness + provided by the application. + + Changes between 1.1.0i and 1.1.1 [11 Sep 2018] + + *) Add a new ClientHello callback. Provides a callback interface that gives + the application the ability to adjust the nascent SSL object at the + earliest stage of ClientHello processing, immediately after extensions have + been collected but before they have been processed. In particular, this + callback can adjust the supported TLS versions in response to the contents + of the ClientHello + [Benjamin Kaduk] + + *) Add SM2 base algorithm support. + [Jack Lloyd] + + *) s390x assembly pack: add (improved) hardware-support for the following + cryptographic primitives: sha3, shake, aes-gcm, aes-ccm, aes-ctr, aes-ofb, + aes-cfb/cfb8, aes-ecb. + [Patrick Steuer] + + *) Make EVP_PKEY_asn1_new() a bit stricter about its input. A NULL pem_str + parameter is no longer accepted, as it leads to a corrupt table. NULL + pem_str is reserved for alias entries only. + [Richard Levitte] + + *) Use the new ec_scalar_mul_ladder scaffold to implement a specialized ladder + step for prime curves. The new implementation is based on formulae from + differential addition-and-doubling in homogeneous projective coordinates + from Izu-Takagi "A fast parallel elliptic curve multiplication resistant + against side channel attacks" and Brier-Joye "Weierstrass Elliptic Curves + and Side-Channel Attacks" Eq. (8) for y-coordinate recovery, modified + to work in projective coordinates. + [Billy Bob Brumley, Nicola Tuveri] + + *) Change generating and checking of primes so that the error rate of not + being prime depends on the intended use based on the size of the input. + For larger primes this will result in more rounds of Miller-Rabin. + The maximal error rate for primes with more than 1080 bits is lowered + to 2^-128. + [Kurt Roeckx, Annie Yousar] + + *) Increase the number of Miller-Rabin rounds for DSA key generating to 64. + [Kurt Roeckx] + + *) The 'tsget' script is renamed to 'tsget.pl', to avoid confusion when + moving between systems, and to avoid confusion when a Windows build is + done with mingw vs with MSVC. For POSIX installs, there's still a + symlink or copy named 'tsget' to avoid that confusion as well. + [Richard Levitte] + + *) Revert blinding in ECDSA sign and instead make problematic addition + length-invariant. Switch even to fixed-length Montgomery multiplication. + [Andy Polyakov] + + *) Use the new ec_scalar_mul_ladder scaffold to implement a specialized ladder + step for binary curves. The new implementation is based on formulae from + differential addition-and-doubling in mixed Lopez-Dahab projective + coordinates, modified to independently blind the operands. + [Billy Bob Brumley, Sohaib ul Hassan, Nicola Tuveri] + + *) Add a scaffold to optionally enhance the Montgomery ladder implementation + for `ec_scalar_mul_ladder` (formerly `ec_mul_consttime`) allowing + EC_METHODs to implement their own specialized "ladder step", to take + advantage of more favorable coordinate systems or more efficient + differential addition-and-doubling algorithms. + [Billy Bob Brumley, Sohaib ul Hassan, Nicola Tuveri] + + *) Modified the random device based seed sources to keep the relevant + file descriptors open rather than reopening them on each access. + This allows such sources to operate in a chroot() jail without + the associated device nodes being available. This behaviour can be + controlled using RAND_keep_random_devices_open(). + [Paul Dale] + + *) Numerous side-channel attack mitigations have been applied. This may have + performance impacts for some algorithms for the benefit of improved + security. Specific changes are noted in this change log by their respective + authors. + [Matt Caswell] + + *) AIX shared library support overhaul. Switch to AIX "natural" way of + handling shared libraries, which means collecting shared objects of + different versions and bitnesses in one common archive. This allows to + mitigate conflict between 1.0 and 1.1 side-by-side installations. It + doesn't affect the way 3rd party applications are linked, only how + multi-version installation is managed. + [Andy Polyakov] + + *) Make ec_group_do_inverse_ord() more robust and available to other + EC cryptosystems, so that irrespective of BN_FLG_CONSTTIME, SCA + mitigations are applied to the fallback BN_mod_inverse(). + When using this function rather than BN_mod_inverse() directly, new + EC cryptosystem implementations are then safer-by-default. + [Billy Bob Brumley] + + *) Add coordinate blinding for EC_POINT and implement projective + coordinate blinding for generic prime curves as a countermeasure to + chosen point SCA attacks. + [Sohaib ul Hassan, Nicola Tuveri, Billy Bob Brumley] + + *) Add blinding to ECDSA and DSA signatures to protect against side channel + attacks discovered by Keegan Ryan (NCC Group). + [Matt Caswell] + + *) Enforce checking in the pkeyutl command line app to ensure that the input + length does not exceed the maximum supported digest length when performing + a sign, verify or verifyrecover operation. + [Matt Caswell] + + *) SSL_MODE_AUTO_RETRY is enabled by default. Applications that use blocking + I/O in combination with something like select() or poll() will hang. This + can be turned off again using SSL_CTX_clear_mode(). + Many applications do not properly handle non-application data records, and + TLS 1.3 sends more of such records. Setting SSL_MODE_AUTO_RETRY works + around the problems in those applications, but can also break some. + It's recommended to read the manpages about SSL_read(), SSL_write(), + SSL_get_error(), SSL_shutdown(), SSL_CTX_set_mode() and + SSL_CTX_set_read_ahead() again. + [Kurt Roeckx] + + *) When unlocking a pass phrase protected PEM file or PKCS#8 container, we + now allow empty (zero character) pass phrases. + [Richard Levitte] + + *) Apply blinding to binary field modular inversion and remove patent + pending (OPENSSL_SUN_GF2M_DIV) BN_GF2m_mod_div implementation. + [Billy Bob Brumley] + + *) Deprecate ec2_mult.c and unify scalar multiplication code paths for + binary and prime elliptic curves. + [Billy Bob Brumley] + + *) Remove ECDSA nonce padding: EC_POINT_mul is now responsible for + constant time fixed point multiplication. + [Billy Bob Brumley] + + *) Revise elliptic curve scalar multiplication with timing attack + defenses: ec_wNAF_mul redirects to a constant time implementation + when computing fixed point and variable point multiplication (which + in OpenSSL are mostly used with secret scalars in keygen, sign, + ECDH derive operations). + [Billy Bob Brumley, Nicola Tuveri, Cesar Pereida García, + Sohaib ul Hassan] + + *) Updated CONTRIBUTING + [Rich Salz] + + *) Updated DRBG / RAND to request nonce and additional low entropy + randomness from the system. + [Matthias St. Pierre] + + *) Updated 'openssl rehash' to use OpenSSL consistent default. + [Richard Levitte] + + *) Moved the load of the ssl_conf module to libcrypto, which helps + loading engines that libssl uses before libssl is initialised. + [Matt Caswell] + + *) Added EVP_PKEY_sign() and EVP_PKEY_verify() for EdDSA + [Matt Caswell] + + *) Fixed X509_NAME_ENTRY_set to get multi-valued RDNs right in all cases. + [Ingo Schwarze, Rich Salz] + + *) Added output of accepting IP address and port for 'openssl s_server' + [Richard Levitte] + + *) Added a new API for TLSv1.3 ciphersuites: + SSL_CTX_set_ciphersuites() + SSL_set_ciphersuites() + [Matt Caswell] + + *) Memory allocation failures consistently add an error to the error + stack. + [Rich Salz] + + *) Don't use OPENSSL_ENGINES and OPENSSL_CONF environment values + in libcrypto when run as setuid/setgid. + [Bernd Edlinger] + + *) Load any config file by default when libssl is used. + [Matt Caswell] + + *) Added new public header file and documentation + for the RAND_DRBG API. See manual page RAND_DRBG(7) for an overview. + [Matthias St. Pierre] + + *) QNX support removed (cannot find contributors to get their approval + for the license change). + [Rich Salz] + + *) TLSv1.3 replay protection for early data has been implemented. See the + SSL_read_early_data() man page for further details. + [Matt Caswell] + + *) Separated TLSv1.3 ciphersuite configuration out from TLSv1.2 ciphersuite + configuration. TLSv1.3 ciphersuites are not compatible with TLSv1.2 and + below. Similarly TLSv1.2 ciphersuites are not compatible with TLSv1.3. + In order to avoid issues where legacy TLSv1.2 ciphersuite configuration + would otherwise inadvertently disable all TLSv1.3 ciphersuites the + configuration has been separated out. See the ciphers man page or the + SSL_CTX_set_ciphersuites() man page for more information. + [Matt Caswell] + + *) On POSIX (BSD, Linux, ...) systems the ocsp(1) command running + in responder mode now supports the new "-multi" option, which + spawns the specified number of child processes to handle OCSP + requests. The "-timeout" option now also limits the OCSP + responder's patience to wait to receive the full client request + on a newly accepted connection. Child processes are respawned + as needed, and the CA index file is automatically reloaded + when changed. This makes it possible to run the "ocsp" responder + as a long-running service, making the OpenSSL CA somewhat more + feature-complete. In this mode, most diagnostic messages logged + after entering the event loop are logged via syslog(3) rather than + written to stderr. + [Viktor Dukhovni] + + *) Added support for X448 and Ed448. Heavily based on original work by + Mike Hamburg. + [Matt Caswell] + + *) Extend OSSL_STORE with capabilities to search and to narrow the set of + objects loaded. This adds the functions OSSL_STORE_expect() and + OSSL_STORE_find() as well as needed tools to construct searches and + get the search data out of them. + [Richard Levitte] + + *) Support for TLSv1.3 added. Note that users upgrading from an earlier + version of OpenSSL should review their configuration settings to ensure + that they are still appropriate for TLSv1.3. For further information see: + https://wiki.openssl.org/index.php/TLS1.3 + [Matt Caswell] + + *) Grand redesign of the OpenSSL random generator + + The default RAND method now utilizes an AES-CTR DRBG according to + NIST standard SP 800-90Ar1. The new random generator is essentially + a port of the default random generator from the OpenSSL FIPS 2.0 + object module. It is a hybrid deterministic random bit generator + using an AES-CTR bit stream and which seeds and reseeds itself + automatically using trusted system entropy sources. + + Some of its new features are: + o Support for multiple DRBG instances with seed chaining. + o The default RAND method makes use of a DRBG. + o There is a public and private DRBG instance. + o The DRBG instances are fork-safe. + o Keep all global DRBG instances on the secure heap if it is enabled. + o The public and private DRBG instance are per thread for lock free + operation + [Paul Dale, Benjamin Kaduk, Kurt Roeckx, Rich Salz, Matthias St. Pierre] + + *) Changed Configure so it only says what it does and doesn't dump + so much data. Instead, ./configdata.pm should be used as a script + to display all sorts of configuration data. + [Richard Levitte] + + *) Added processing of "make variables" to Configure. + [Richard Levitte] + + *) Added SHA512/224 and SHA512/256 algorithm support. + [Paul Dale] + + *) The last traces of Netware support, first removed in 1.1.0, have + now been removed. + [Rich Salz] + + *) Get rid of Makefile.shared, and in the process, make the processing + of certain files (rc.obj, or the .def/.map/.opt files produced from + the ordinal files) more visible and hopefully easier to trace and + debug (or make silent). + [Richard Levitte] + + *) Make it possible to have environment variable assignments as + arguments to config / Configure. + [Richard Levitte] + + *) Add multi-prime RSA (RFC 8017) support. + [Paul Yang] + + *) Add SM3 implemented according to GB/T 32905-2016 + [ Jack Lloyd , + Ronald Tse , + Erick Borsboom ] + + *) Add 'Maximum Fragment Length' TLS extension negotiation and support + as documented in RFC6066. + Based on a patch from Tomasz Moń + [Filipe Raimundo da Silva] + + *) Add SM4 implemented according to GB/T 32907-2016. + [ Jack Lloyd , + Ronald Tse , + Erick Borsboom ] + + *) Reimplement -newreq-nodes and ERR_error_string_n; the + original author does not agree with the license change. + [Rich Salz] + + *) Add ARIA AEAD TLS support. + [Jon Spillett] + + *) Some macro definitions to support VS6 have been removed. Visual + Studio 6 has not worked since 1.1.0 + [Rich Salz] + + *) Add ERR_clear_last_mark(), to allow callers to clear the last mark + without clearing the errors. + [Richard Levitte] + + *) Add "atfork" functions. If building on a system that without + pthreads, see doc/man3/OPENSSL_fork_prepare.pod for application + requirements. The RAND facility now uses/requires this. + [Rich Salz] + + *) Add SHA3. + [Andy Polyakov] + + *) The UI API becomes a permanent and integral part of libcrypto, i.e. + not possible to disable entirely. However, it's still possible to + disable the console reading UI method, UI_OpenSSL() (use UI_null() + as a fallback). + + To disable, configure with 'no-ui-console'. 'no-ui' is still + possible to use as an alias. Check at compile time with the + macro OPENSSL_NO_UI_CONSOLE. The macro OPENSSL_NO_UI is still + possible to check and is an alias for OPENSSL_NO_UI_CONSOLE. + [Richard Levitte] + + *) Add a STORE module, which implements a uniform and URI based reader of + stores that can contain keys, certificates, CRLs and numerous other + objects. The main API is loosely based on a few stdio functions, + and includes OSSL_STORE_open, OSSL_STORE_load, OSSL_STORE_eof, + OSSL_STORE_error and OSSL_STORE_close. + The implementation uses backends called "loaders" to implement arbitrary + URI schemes. There is one built in "loader" for the 'file' scheme. + [Richard Levitte] + + *) Add devcrypto engine. This has been implemented against cryptodev-linux, + then adjusted to work on FreeBSD 8.4 as well. + Enable by configuring with 'enable-devcryptoeng'. This is done by default + on BSD implementations, as cryptodev.h is assumed to exist on all of them. + [Richard Levitte] + + *) Module names can prefixed with OSSL_ or OPENSSL_. This affects + util/mkerr.pl, which is adapted to allow those prefixes, leading to + error code calls like this: + + OSSL_FOOerr(OSSL_FOO_F_SOMETHING, OSSL_FOO_R_WHATEVER); + + With this change, we claim the namespaces OSSL and OPENSSL in a manner + that can be encoded in C. For the foreseeable future, this will only + affect new modules. + [Richard Levitte and Tim Hudson] + + *) Removed BSD cryptodev engine. + [Rich Salz] + + *) Add a build target 'build_all_generated', to build all generated files + and only that. This can be used to prepare everything that requires + things like perl for a system that lacks perl and then move everything + to that system and do the rest of the build there. + [Richard Levitte] + + *) In the UI interface, make it possible to duplicate the user data. This + can be used by engines that need to retain the data for a longer time + than just the call where this user data is passed. + [Richard Levitte] + + *) Ignore the '-named_curve auto' value for compatibility of applications + with OpenSSL 1.0.2. + [Tomas Mraz ] + + *) Fragmented SSL/TLS alerts are no longer accepted. An alert message is 2 + bytes long. In theory it is permissible in SSLv3 - TLSv1.2 to fragment such + alerts across multiple records (some of which could be empty). In practice + it make no sense to send an empty alert record, or to fragment one. TLSv1.3 + prohibits this altogether and other libraries (BoringSSL, NSS) do not + support this at all. Supporting it adds significant complexity to the + record layer, and its removal is unlikely to cause interoperability + issues. + [Matt Caswell] + + *) Add the ASN.1 types INT32, UINT32, INT64, UINT64 and variants prefixed + with Z. These are meant to replace LONG and ZLONG and to be size safe. + The use of LONG and ZLONG is discouraged and scheduled for deprecation + in OpenSSL 1.2.0. + [Richard Levitte] + + *) Add the 'z' and 'j' modifiers to BIO_printf() et al formatting string, + 'z' is to be used for [s]size_t, and 'j' - with [u]int64_t. + [Richard Levitte, Andy Polyakov] + + *) Add EC_KEY_get0_engine(), which does for EC_KEY what RSA_get0_engine() + does for RSA, etc. + [Richard Levitte] + + *) Have 'config' recognise 64-bit mingw and choose 'mingw64' as the target + platform rather than 'mingw'. + [Richard Levitte] + + *) The functions X509_STORE_add_cert and X509_STORE_add_crl return + success if they are asked to add an object which already exists + in the store. This change cascades to other functions which load + certificates and CRLs. *** 23759 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 22:06:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 97E7854C3B4; Tue, 16 Feb 2021 22:06: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 4DgFS10QbSz3p3P; Tue, 16 Feb 2021 22:06: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 BA102190D1; Tue, 16 Feb 2021 22:06: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 11GM6edf083983; Tue, 16 Feb 2021 22:06:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GM6eqf083982; Tue, 16 Feb 2021 22:06:40 GMT (envelope-from git) Date: Tue, 16 Feb 2021 22:06:40 GMT Message-Id: <202102162206.11GM6eqf083982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: e25db73fea9b - main - OpenSSL: Regen manual pages for OpenSSL 1.1.1j. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e25db73fea9b641a7dcf29303cf104e0d3847d6c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 22:06:41 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=e25db73fea9b641a7dcf29303cf104e0d3847d6c commit e25db73fea9b641a7dcf29303cf104e0d3847d6c Author: Jung-uk Kim AuthorDate: 2021-02-16 22:05:00 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-16 22:05:00 +0000 OpenSSL: Regen manual pages for OpenSSL 1.1.1j. --- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 2 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 2 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 2 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_get_ktls_send.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 2 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 2 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 2 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 2 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 2 +- secure/lib/libcrypto/man/man3/BN_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 2 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 2 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 2 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 2 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 2 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 2 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 2 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 2 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 2 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 2 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 2 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 2 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 2 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 2 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 2 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 2 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 27 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 2 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 2 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DH_size.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 2 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 2 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 2 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 2 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 2 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 2 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 2 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 2 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 2 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aes.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aria.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_des.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 2 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 2 +- secure/lib/libcrypto/man/man3/HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/MD5.3 | 2 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 2 +- secure/lib/libcrypto/man/man3/Makefile | 6 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 2 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 22 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 2 +- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 2 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 2 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 2 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 2 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 2 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 2 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 2 +- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 2 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 2 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 2 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 2 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 2 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 2 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 2 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 2 +- .../man/man3/SSL_COMP_add_compression_method.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 2 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 2 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 2 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 2 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 2 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 2 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 2 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 2 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 2 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 2 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 2 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 2 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 2 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 2 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 2 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 2 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 2 +- .../man/man3/SSL_CTX_set_security_level.3 | 2 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 2 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 2 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 2 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 2 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 2 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 2 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 2 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 2 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 2 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 2 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 2 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 2 +- .../man/man3/SSL_export_keying_material.3 | 2 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 2 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 2 +- .../man/man3/SSL_get_peer_signature_nid.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 2 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 2 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 2 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 2 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 2 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 2 +- secure/lib/libcrypto/man/man3/UI_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 2 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 2 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 2 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 2 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 2 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 2 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 2 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 2 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 2 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 2 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 2 +- .../libcrypto/man/man3/X509_check_private_key.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 2 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 2 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 2 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 12 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/X509_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 2 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 2 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 2 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 2 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 2 +- secure/lib/libcrypto/man/man7/Ed25519.7 | 2 +- secure/lib/libcrypto/man/man7/RAND.7 | 2 +- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 2 +- secure/lib/libcrypto/man/man7/SM2.7 | 2 +- secure/lib/libcrypto/man/man7/X25519.7 | 2 +- secure/lib/libcrypto/man/man7/bio.7 | 2 +- secure/lib/libcrypto/man/man7/ct.7 | 2 +- secure/lib/libcrypto/man/man7/des_modes.7 | 2 +- secure/lib/libcrypto/man/man7/evp.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 2 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 2 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 2 +- secure/lib/libcrypto/man/man7/scrypt.7 | 2 +- secure/lib/libcrypto/man/man7/ssl.7 | 2 +- secure/lib/libcrypto/man/man7/x509.7 | 2 +- secure/usr.bin/openssl/Makefile.man | 4 + secure/usr.bin/openssl/man/CA.pl.1 | 2 +- secure/usr.bin/openssl/man/asn1parse.1 | 2 +- secure/usr.bin/openssl/man/ca.1 | 6 +- secure/usr.bin/openssl/man/ciphers.1 | 2 +- secure/usr.bin/openssl/man/cms.1 | 6 +- secure/usr.bin/openssl/man/crl.1 | 2 +- secure/usr.bin/openssl/man/crl2pkcs7.1 | 6 +- secure/usr.bin/openssl/man/dgst.1 | 6 +- secure/usr.bin/openssl/man/dhparam.1 | 2 +- secure/usr.bin/openssl/man/dsa.1 | 8 +- secure/usr.bin/openssl/man/dsaparam.1 | 2 +- secure/usr.bin/openssl/man/ec.1 | 8 +- secure/usr.bin/openssl/man/ecparam.1 | 2 +- secure/usr.bin/openssl/man/enc.1 | 6 +- secure/usr.bin/openssl/man/engine.1 | 2 +- secure/usr.bin/openssl/man/errstr.1 | 2 +- secure/usr.bin/openssl/man/gendsa.1 | 2 +- secure/usr.bin/openssl/man/genpkey.1 | 6 +- secure/usr.bin/openssl/man/genrsa.1 | 6 +- secure/usr.bin/openssl/man/list.1 | 2 +- secure/usr.bin/openssl/man/nseq.1 | 2 +- secure/usr.bin/openssl/man/ocsp.1 | 2 +- secure/usr.bin/openssl/man/openssl.1 | 2 +- secure/usr.bin/openssl/man/passwd.1 | 2 +- secure/usr.bin/openssl/man/pkcs12.1 | 16 +- secure/usr.bin/openssl/man/pkcs7.1 | 2 +- secure/usr.bin/openssl/man/pkcs8.1 | 8 +- secure/usr.bin/openssl/man/pkey.1 | 8 +- secure/usr.bin/openssl/man/pkeyparam.1 | 2 +- secure/usr.bin/openssl/man/pkeyutl.1 | 6 +- secure/usr.bin/openssl/man/prime.1 | 2 +- secure/usr.bin/openssl/man/rand.1 | 2 +- secure/usr.bin/openssl/man/req.1 | 8 +- secure/usr.bin/openssl/man/rsa.1 | 8 +- secure/usr.bin/openssl/man/rsautl.1 | 2 +- secure/usr.bin/openssl/man/s_client.1 | 6 +- secure/usr.bin/openssl/man/s_server.1 | 6 +- secure/usr.bin/openssl/man/s_time.1 | 2 +- secure/usr.bin/openssl/man/sess_id.1 | 2 +- secure/usr.bin/openssl/man/smime.1 | 6 +- secure/usr.bin/openssl/man/speed.1 | 2 +- secure/usr.bin/openssl/man/spkac.1 | 6 +- secure/usr.bin/openssl/man/srp.1 | 2 +- secure/usr.bin/openssl/man/storeutl.1 | 6 +- secure/usr.bin/openssl/man/ts.1 | 6 +- secure/usr.bin/openssl/man/tsget.1 | 2 +- secure/usr.bin/openssl/man/verify.1 | 2 +- secure/usr.bin/openssl/man/version.1 | 2 +- secure/usr.bin/openssl/man/x509.1 | 6 +- 539 files changed, 642 insertions(+), 1167 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index f70a506ed5a9..d60b9ca78eb3 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1i -OPENSSL_DATE= 2020-12-08 +OPENSSL_VER= 1.1.1j +OPENSSL_DATE= 2021-02-16 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index 048d4fc2b64b..2720754cf9e8 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ADMISSIONS 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 135a622a91c8..2daf11f19a0d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index 9ac1969ef577..f45f3fdc98ab 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index f5a4c0f68510..69678622d9fa 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index 9b9613637d3a..9b9393cc5290 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index ad33ca4b7b2a..ca15f898e6a8 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index f2c2afe53015..e4f6859c186d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index d2394acf12e7..fbfcf517275f 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index 562929c6cd9f..00b72c375820 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index 930a32de6d33..4845c5280b6b 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index c139f0a79d4a..ce95ffd0fc29 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index b09d540d97e5..b761db6b5b7a 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index 0917cbf28d0a..03b06aff8fec 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 1e67cea75097..8916feee640f 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index 3f0f0cfd2170..0dbedbf16b9d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDR 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 5df20d27fde8..fb1d199796cb 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index f9fdd9b15d37..44b80366360d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_CONNECT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index 487f6d192c8c..7d90a1a40792 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2021-01-21" "1.1.1i" "OpenSSL" +.TH BIO_CTRL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index d42d2eb6c9ec..39b94d930d17 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 9b4bc1c800c5..61cfe1eec579 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 index a26d0f5cca2f..33e6f6c95c6e 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_CIPHER 3" -.TH BIO_F_CIPHER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_CIPHER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_md.3 b/secure/lib/libcrypto/man/man3/BIO_f_md.3 index ba7f598a14fc..04c3fdaecc20 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_md.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_MD 3" -.TH BIO_F_MD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_MD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_null.3 b/secure/lib/libcrypto/man/man3/BIO_f_null.3 index 44d680123203..21225c1e17fe 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_null.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_NULL 3" -.TH BIO_F_NULL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_NULL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 index ce95b5d29fd3..02b2bcd5e714 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_SSL 3" -.TH BIO_F_SSL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_SSL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_find_type.3 b/secure/lib/libcrypto/man/man3/BIO_find_type.3 index 8ed77ea8ae03..579435574865 100644 --- a/secure/lib/libcrypto/man/man3/BIO_find_type.3 +++ b/secure/lib/libcrypto/man/man3/BIO_find_type.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_FIND_TYPE 3" -.TH BIO_FIND_TYPE 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_FIND_TYPE 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_data.3 b/secure/lib/libcrypto/man/man3/BIO_get_data.3 index dc9eb33aba84..df2d8f5667dd 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_data.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_data.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_DATA 3" -.TH BIO_GET_DATA 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_DATA 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 index a1ff83189d93..31914a912318 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_EX_NEW_INDEX 3" -.TH BIO_GET_EX_NEW_INDEX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_EX_NEW_INDEX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 b/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 deleted file mode 100644 index 487f6d192c8c..000000000000 --- a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 +++ /dev/null @@ -1,280 +0,0 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is >0, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{\ -. if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" *** 7772 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Tue Feb 16 22:07:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C102154C3CE for ; Tue, 16 Feb 2021 22:07: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 4DgFT756njz3pbX; Tue, 16 Feb 2021 22:07: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 A27AB19061; Tue, 16 Feb 2021 22:07: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 11GM7duY084235; Tue, 16 Feb 2021 22:07:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GM7dYI084234; Tue, 16 Feb 2021 22:07:39 GMT (envelope-from git) Date: Tue, 16 Feb 2021 22:07:39 GMT Message-Id: <202102162207.11GM7dYI084234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 6666b1d45a1b - releng/13.0 - [udp6] fix possible panic due to lack of locking. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 6666b1d45a1b0ab4c31f621e6b406ff57431c91a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 22:07:39 -0000 The branch releng/13.0 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=6666b1d45a1b0ab4c31f621e6b406ff57431c91a commit 6666b1d45a1b0ab4c31f621e6b406ff57431c91a Author: Andrey V. Elsukov AuthorDate: 2021-02-11 08:38:41 +0000 Commit: Andrey V. Elsukov CommitDate: 2021-02-16 22:03:08 +0000 [udp6] fix possible panic due to lack of locking. The lookup for a IPv6 multicast addresses corresponding to the destination address in the datagram is protected by the NET_EPOCH section. Access to each PCB is protected by INP_RLOCK during comparing. But access to socket's so_options field is not protected. And in some cases it is possible, that PCB pointer is still valid, but inp_socket is not. The patch wides lock holding to protect access to inp_socket. It copies locking strategy from IPv4 UDP handling. PR: 232192 Approved by: re (gjb) Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D28232 (cherry picked from commit 3c782d9c91666886d868426f0aea040d1a1a8ee4) (cherry picked from commit 8cb4c363163062bceec92383eae43f5a32049c73) --- sys/netinet6/udp6_usrreq.c | 61 +++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 1535be90e1b0..3a001fea077d 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -353,6 +353,13 @@ skip_checksum: continue; } + INP_RLOCK(inp); + + if (__predict_false(inp->inp_flags2 & INP_FREED)) { + INP_RUNLOCK(inp); + continue; + } + /* * XXXRW: Because we weren't holding either the inpcb * or the hash lock when we checked for a match @@ -365,16 +372,10 @@ skip_checksum: * and source-specific multicast. [RFC3678] */ imo = inp->in6p_moptions; - if (imo && IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { + if (imo != NULL) { struct sockaddr_in6 mcaddr; int blocked; - INP_RLOCK(inp); - if (__predict_false(inp->inp_flags2 & INP_FREED)) { - INP_RUNLOCK(inp); - continue; - } - bzero(&mcaddr, sizeof(struct sockaddr_in6)); mcaddr.sin6_len = sizeof(struct sockaddr_in6); mcaddr.sin6_family = AF_INET6; @@ -389,33 +390,30 @@ skip_checksum: if (blocked == MCAST_NOTSMEMBER || blocked == MCAST_MUTED) UDPSTAT_INC(udps_filtermcast); - INP_RUNLOCK(inp); /* XXX */ + INP_RUNLOCK(inp); continue; } - - INP_RUNLOCK(inp); } + if (last != NULL) { struct mbuf *n; if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) != NULL) { - INP_RLOCK(last); - if (__predict_true(last->inp_flags2 & INP_FREED) == 0) { - if (nxt == IPPROTO_UDPLITE) - UDPLITE_PROBE(receive, NULL, last, - ip6, last, uh); - else - UDP_PROBE(receive, NULL, last, - ip6, last, uh); - if (udp6_append(last, n, off, fromsa)) { - /* XXX-BZ do we leak m here? */ - *mp = NULL; - return (IPPROTO_DONE); - } + if (nxt == IPPROTO_UDPLITE) + UDPLITE_PROBE(receive, NULL, + last, ip6, last, uh); + else + UDP_PROBE(receive, NULL, last, + ip6, last, uh); + if (udp6_append(last, n, off, + fromsa)) { + INP_RUNLOCK(inp); + goto badunlocked; } - INP_RUNLOCK(last); } + /* Release PCB lock taken on previous pass. */ + INP_RUNLOCK(last); } last = inp; /* @@ -441,15 +439,12 @@ skip_checksum: UDPSTAT_INC(udps_noportmcast); goto badunlocked; } - INP_RLOCK(last); - if (__predict_true(last->inp_flags2 & INP_FREED) == 0) { - if (nxt == IPPROTO_UDPLITE) - UDPLITE_PROBE(receive, NULL, last, ip6, last, uh); - else - UDP_PROBE(receive, NULL, last, ip6, last, uh); - if (udp6_append(last, m, off, fromsa) == 0) - INP_RUNLOCK(last); - } else + + if (nxt == IPPROTO_UDPLITE) + UDPLITE_PROBE(receive, NULL, last, ip6, last, uh); + else + UDP_PROBE(receive, NULL, last, ip6, last, uh); + if (udp6_append(last, m, off, fromsa) == 0) INP_RUNLOCK(last); *mp = NULL; return (IPPROTO_DONE); From owner-dev-commits-src-all@freebsd.org Tue Feb 16 22:09:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AE0CA54C470; Tue, 16 Feb 2021 22:09: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 4DgFWV4Wljz3q0X; Tue, 16 Feb 2021 22:09: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 8E8A119353; Tue, 16 Feb 2021 22:09: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 11GM9gnC084661; Tue, 16 Feb 2021 22:09:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11GM9gAb084660; Tue, 16 Feb 2021 22:09:42 GMT (envelope-from git) Date: Tue, 16 Feb 2021 22:09:42 GMT Message-Id: <202102162209.11GM9gAb084660@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: aa5fef60bf66 - main - linux: Update the i386/linux vdso deinitialization routine 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/main X-Git-Reftype: branch X-Git-Commit: aa5fef60bf663d31cddf53d7a8c6856d5e4672c0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 22:09:42 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5fef60bf663d31cddf53d7a8c6856d5e4672c0 commit aa5fef60bf663d31cddf53d7a8c6856d5e4672c0 Author: Mark Johnston AuthorDate: 2021-02-16 22:06:20 +0000 Commit: Mark Johnston CommitDate: 2021-02-16 22:07:56 +0000 linux: Update the i386/linux vdso deinitialization routine This was missed in commit 0fc8a796722 ("linux: Unmap the VDSO page when unloading"). Reported by: Mark Millard MFC with: 0fc8a796722 --- sys/i386/linux/linux_sysvec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 10229d8af57e..ef845675aaa4 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -938,7 +938,8 @@ static void linux_vdso_deinstall(void *param) { - __elfN(linux_shared_page_fini)(linux_shared_page_obj); + __elfN(linux_shared_page_fini)(linux_shared_page_obj, + linux_shared_page_mapping); } SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, linux_vdso_deinstall, NULL); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 02:19:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 18FD652D08F; Wed, 17 Feb 2021 02:19: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 4DgM3k08hJz4ZVv; Wed, 17 Feb 2021 02:19: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 EC8A91CB06; Wed, 17 Feb 2021 02:19: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 11H2JTwA011152; Wed, 17 Feb 2021 02:19:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H2JTcZ011151; Wed, 17 Feb 2021 02:19:29 GMT (envelope-from git) Date: Wed, 17 Feb 2021 02:19:29 GMT Message-Id: <202102170219.11H2JTcZ011151@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: acd69b070403 - stable/13 - gic_v3: add message based interrupts support 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: acd69b070403e12742ccea7b19d251320ed788d5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 02:19:30 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=acd69b070403e12742ccea7b19d251320ed788d5 commit acd69b070403e12742ccea7b19d251320ed788d5 Author: Cyprien Laplace AuthorDate: 2020-12-05 15:47:33 +0000 Commit: Ed Maste CommitDate: 2021-02-17 00:07:51 +0000 gic_v3: add message based interrupts support Pull Request: https://github.com/freebsd/freebsd-src/pull/451 (cherry picked from commit 35ebd8d33ad2f7c2038f6bf9aa02eab21252f689) --- sys/arm64/arm64/gic_v3.c | 204 ++++++++++++++++++++++++++++++++++++++++++- sys/arm64/arm64/gic_v3_fdt.c | 20 +++++ sys/arm64/arm64/gic_v3_var.h | 5 ++ 3 files changed, 226 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index 8630a27102e3..954ed3cd878a 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #endif #include "pic_if.h" +#include "msi_if.h" #include #include "gic_v3_reg.h" @@ -94,6 +95,12 @@ static pic_ipi_send_t gic_v3_ipi_send; static pic_ipi_setup_t gic_v3_ipi_setup; #endif +static msi_alloc_msi_t gic_v3_alloc_msi; +static msi_release_msi_t gic_v3_release_msi; +static msi_alloc_msix_t gic_v3_alloc_msix; +static msi_release_msix_t gic_v3_release_msix; +static msi_map_msi_t gic_v3_map_msi; + static u_int gic_irq_cpu; #ifdef SMP static u_int sgi_to_ipi[GIC_LAST_SGI - GIC_FIRST_SGI + 1]; @@ -124,6 +131,13 @@ static device_method_t gic_v3_methods[] = { DEVMETHOD(pic_ipi_setup, gic_v3_ipi_setup), #endif + /* MSI/MSI-X */ + DEVMETHOD(msi_alloc_msi, gic_v3_alloc_msi), + DEVMETHOD(msi_release_msi, gic_v3_release_msi), + DEVMETHOD(msi_alloc_msix, gic_v3_alloc_msix), + DEVMETHOD(msi_release_msix, gic_v3_release_msix), + DEVMETHOD(msi_map_msi, gic_v3_map_msi), + /* End */ DEVMETHOD_END }; @@ -150,6 +164,11 @@ struct gic_v3_irqsrc { uint32_t gi_irq; enum intr_polarity gi_pol; enum intr_trigger gi_trig; +#define GI_FLAG_MSI (1 << 1) /* This interrupt source should only */ + /* be used for MSI/MSI-X interrupts */ +#define GI_FLAG_MSI_USED (1 << 2) /* This irq is already allocated */ + /* for a MSI/MSI-X interrupt */ + u_int gi_flags; }; /* Helper routines starting with gic_v3_ */ @@ -314,6 +333,22 @@ gic_v3_attach(device_t dev) } } + if (sc->gic_mbi_start > 0) { + /* Reserve these interrupts for MSI/MSI-X use */ + for (irq = sc->gic_mbi_start; irq <= sc->gic_mbi_end; irq++) { + sc->gic_irqs[irq].gi_pol = INTR_POLARITY_HIGH; + sc->gic_irqs[irq].gi_trig = INTR_TRIGGER_EDGE; + sc->gic_irqs[irq].gi_flags |= GI_FLAG_MSI; + } + + mtx_init(&sc->gic_mbi_mtx, "GICv3 mbi lock", NULL, MTX_DEF); + + if (bootverbose) { + device_printf(dev, "using spi %u to %u\n", sc->gic_mbi_start, + sc->gic_mbi_end); + } + } + /* * Read the Peripheral ID2 register. This is an implementation * defined register, but seems to be implemented in all GICv3 @@ -692,8 +727,11 @@ gic_v3_setup_intr(device_t dev, struct intr_irqsrc *isrc, return (0); } - gi->gi_pol = pol; - gi->gi_trig = trig; + /* For MSI/MSI-X we should have already configured these */ + if ((gi->gi_flags & GI_FLAG_MSI) == 0) { + gi->gi_pol = pol; + gi->gi_trig = trig; + } /* * XXX - In case that per CPU interrupt is going to be enabled in time @@ -742,7 +780,7 @@ gic_v3_teardown_intr(device_t dev, struct intr_irqsrc *isrc, { struct gic_v3_irqsrc *gi = (struct gic_v3_irqsrc *)isrc; - if (isrc->isrc_handlers == 0) { + if (isrc->isrc_handlers == 0 && (gi->gi_flags & GI_FLAG_MSI) == 0) { gi->gi_pol = INTR_POLARITY_CONFORM; gi->gi_trig = INTR_TRIGGER_CONFORM; } @@ -1270,3 +1308,163 @@ gic_v3_redist_init(struct gic_v3_softc *sc) return (0); } + +/* + * SPI-mapped Message Based Interrupts -- a GICv3 MSI/MSI-X controller. + */ + +static int +gic_v3_alloc_msi(device_t dev, device_t child, int count, int maxcount, + device_t *pic, struct intr_irqsrc **srcs) +{ + struct gic_v3_softc *sc; + int i, irq, end_irq; + bool found; + + KASSERT(powerof2(count), ("%s: bad count", __func__)); + KASSERT(powerof2(maxcount), ("%s: bad maxcount", __func__)); + + sc = device_get_softc(dev); + + mtx_lock(&sc->gic_mbi_mtx); + + found = false; + for (irq = sc->gic_mbi_start; irq < sc->gic_mbi_end; irq++) { + /* Start on an aligned interrupt */ + if ((irq & (maxcount - 1)) != 0) + continue; + + /* Assume we found a valid range until shown otherwise */ + found = true; + + /* Check this range is valid */ + for (end_irq = irq; end_irq != irq + count; end_irq++) { + /* No free interrupts */ + if (end_irq == sc->gic_mbi_end) { + found = false; + break; + } + + KASSERT((sc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI)!= 0, + ("%s: Non-MSI interrupt found", __func__)); + + /* This is already used */ + if ((sc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI_USED) == + GI_FLAG_MSI_USED) { + found = false; + break; + } + } + if (found) + break; + } + + /* Not enough interrupts were found */ + if (!found || irq == sc->gic_mbi_end) { + mtx_unlock(&sc->gic_mbi_mtx); + return (ENXIO); + } + + for (i = 0; i < count; i++) { + /* Mark the interrupt as used */ + sc->gic_irqs[irq + i].gi_flags |= GI_FLAG_MSI_USED; + } + mtx_unlock(&sc->gic_mbi_mtx); + + for (i = 0; i < count; i++) + srcs[i] = (struct intr_irqsrc *)&sc->gic_irqs[irq + i]; + *pic = dev; + + return (0); +} + +static int +gic_v3_release_msi(device_t dev, device_t child, int count, + struct intr_irqsrc **isrc) +{ + struct gic_v3_softc *sc; + struct gic_v3_irqsrc *gi; + int i; + + sc = device_get_softc(dev); + + mtx_lock(&sc->gic_mbi_mtx); + for (i = 0; i < count; i++) { + gi = (struct gic_v3_irqsrc *)isrc[i]; + + KASSERT((gi->gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED, + ("%s: Trying to release an unused MSI-X interrupt", + __func__)); + + gi->gi_flags &= ~GI_FLAG_MSI_USED; + } + mtx_unlock(&sc->gic_mbi_mtx); + + return (0); +} + +static int +gic_v3_alloc_msix(device_t dev, device_t child, device_t *pic, + struct intr_irqsrc **isrcp) +{ + struct gic_v3_softc *sc; + int irq; + + sc = device_get_softc(dev); + + mtx_lock(&sc->gic_mbi_mtx); + /* Find an unused interrupt */ + for (irq = sc->gic_mbi_start; irq < sc->gic_mbi_end; irq++) { + KASSERT((sc->gic_irqs[irq].gi_flags & GI_FLAG_MSI) != 0, + ("%s: Non-MSI interrupt found", __func__)); + if ((sc->gic_irqs[irq].gi_flags & GI_FLAG_MSI_USED) == 0) + break; + } + /* No free interrupt was found */ + if (irq == sc->gic_mbi_end) { + mtx_unlock(&sc->gic_mbi_mtx); + return (ENXIO); + } + + /* Mark the interrupt as used */ + sc->gic_irqs[irq].gi_flags |= GI_FLAG_MSI_USED; + mtx_unlock(&sc->gic_mbi_mtx); + + *isrcp = (struct intr_irqsrc *)&sc->gic_irqs[irq]; + *pic = dev; + + return (0); +} + +static int +gic_v3_release_msix(device_t dev, device_t child, struct intr_irqsrc *isrc) +{ + struct gic_v3_softc *sc; + struct gic_v3_irqsrc *gi; + + sc = device_get_softc(dev); + gi = (struct gic_v3_irqsrc *)isrc; + + KASSERT((gi->gi_flags & GI_FLAG_MSI_USED) == GI_FLAG_MSI_USED, + ("%s: Trying to release an unused MSI-X interrupt", __func__)); + + mtx_lock(&sc->gic_mbi_mtx); + gi->gi_flags &= ~GI_FLAG_MSI_USED; + mtx_unlock(&sc->gic_mbi_mtx); + + return (0); +} + +static int +gic_v3_map_msi(device_t dev, device_t child, struct intr_irqsrc *isrc, + uint64_t *addr, uint32_t *data) +{ + struct gic_v3_softc *sc = device_get_softc(dev); + struct gic_v3_irqsrc *gi = (struct gic_v3_irqsrc *)isrc; + +#define GICD_SETSPI_NSR 0x40 + *addr = vtophys(rman_get_virtual(sc->gic_dist)) + GICD_SETSPI_NSR; + *data = gi->gi_irq; + + return (0); +} diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index c8a9615a8a5f..483d67ba6deb 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -121,6 +121,8 @@ gic_v3_fdt_attach(device_t dev) pcell_t redist_regions; intptr_t xref; int err; + uint32_t *mbi_ranges; + ssize_t ret; sc = device_get_softc(dev); sc->dev = dev; @@ -135,6 +137,21 @@ gic_v3_fdt_attach(device_t dev) else sc->gic_redists.nregions = redist_regions; + /* Add Message Based Interrupts using SPIs. */ + ret = OF_getencprop_alloc_multi(ofw_bus_get_node(dev), "mbi-ranges", + sizeof(*mbi_ranges), (void **)&mbi_ranges); + if (ret > 0) { + if (ret % 2 == 0) { + /* Limit to a single range for now. */ + sc->gic_mbi_start = mbi_ranges[0]; + sc->gic_mbi_end = mbi_ranges[0] + mbi_ranges[1] - 1; + } else { + if (bootverbose) + device_printf(dev, "Malformed mbi-ranges property\n"); + } + free(mbi_ranges, M_OFWPROP); + } + err = gic_v3_attach(dev); if (err != 0) goto error; @@ -147,6 +164,9 @@ gic_v3_fdt_attach(device_t dev) goto error; } + if (sc->gic_mbi_start > 0) + intr_msi_register(dev, xref); + /* Register xref */ OF_device_register_xref(xref, dev); diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h index f855e425d66d..1645c417fd8d 100644 --- a/sys/arm64/arm64/gic_v3_var.h +++ b/sys/arm64/arm64/gic_v3_var.h @@ -68,6 +68,11 @@ struct gic_v3_softc { /* Re-Distributors */ struct gic_redists gic_redists; + /* Message Based Interrupts */ + u_int gic_mbi_start; + u_int gic_mbi_end; + struct mtx gic_mbi_mtx; + uint32_t gic_pidr2; u_int gic_bus; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 02:19:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 25BD252CCE2; Wed, 17 Feb 2021 02:19: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 4DgM3h70d4z4ZT7; Wed, 17 Feb 2021 02:19: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 E2EC61CB80; Wed, 17 Feb 2021 02:19: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 11H2JSx2011129; Wed, 17 Feb 2021 02:19:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H2JSPD011128; Wed, 17 Feb 2021 02:19:28 GMT (envelope-from git) Date: Wed, 17 Feb 2021 02:19:28 GMT Message-Id: <202102170219.11H2JSPD011128@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: 40f283b03801 - stable/13 - gic_v3: Use 64-bit writes to GICD_IROUTERn 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: 40f283b038015b5b750267a26402098418fd1fb3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 02:19:29 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=40f283b038015b5b750267a26402098418fd1fb3 commit 40f283b038015b5b750267a26402098418fd1fb3 Author: Cyprien Laplace AuthorDate: 2020-11-26 01:17:04 +0000 Commit: Ed Maste CommitDate: 2021-02-17 00:07:32 +0000 gic_v3: Use 64-bit writes to GICD_IROUTERn While 32-bit accesses to GICD_IROUTERn are allowed, this is a 64-bit register. Pull Request: https://github.com/freebsd/freebsd-src/pull/451 (cherry picked from commit 46ca0b903cad8955574a2c61bed41c2b92aa2273) --- sys/arm64/arm64/gic_v3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index f230eb6bbd06..8630a27102e3 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -844,7 +844,7 @@ gic_v3_bind_intr(device_t dev, struct intr_irqsrc *isrc) if (CPU_EMPTY(&isrc->isrc_cpu)) { gic_irq_cpu = intr_irq_next_cpu(gic_irq_cpu, &all_cpus); CPU_SETOF(gic_irq_cpu, &isrc->isrc_cpu); - gic_d_write(sc, 4, GICD_IROUTER(gi->gi_irq), + gic_d_write(sc, 8, GICD_IROUTER(gi->gi_irq), CPU_AFFINITY(gic_irq_cpu)); } else { /* @@ -852,7 +852,7 @@ gic_v3_bind_intr(device_t dev, struct intr_irqsrc *isrc) * the first CPU found. */ cpu = CPU_FFS(&isrc->isrc_cpu) - 1; - gic_d_write(sc, 4, GICD_IROUTER(gi->gi_irq), CPU_AFFINITY(cpu)); + gic_d_write(sc, 8, GICD_IROUTER(gi->gi_irq), CPU_AFFINITY(cpu)); } return (0); @@ -1114,7 +1114,7 @@ gic_v3_dist_init(struct gic_v3_softc *sc) */ aff = CPU_AFFINITY(0); for (i = GIC_FIRST_SPI; i < sc->gic_nirqs; i++) - gic_d_write(sc, 4, GICD_IROUTER(i), aff); + gic_d_write(sc, 8, GICD_IROUTER(i), aff); return (0); } From owner-dev-commits-src-all@freebsd.org Wed Feb 17 02:24:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B82CE52DB13; Wed, 17 Feb 2021 02:24: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 4DgM9W4rWWz4bVD; Wed, 17 Feb 2021 02:24: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 9954A1CB33; Wed, 17 Feb 2021 02:24: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 11H2OVfS023273; Wed, 17 Feb 2021 02:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H2OVrP023272; Wed, 17 Feb 2021 02:24:31 GMT (envelope-from git) Date: Wed, 17 Feb 2021 02:24:31 GMT Message-Id: <202102170224.11H2OVrP023272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 294e62bebf36 - main - cxgbe(4): Save proper zone index on low memory in refill_fl(). 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/main X-Git-Reftype: branch X-Git-Commit: 294e62bebf36f873fd083d2fe8edd78919dda4e8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 02:24:31 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=294e62bebf36f873fd083d2fe8edd78919dda4e8 commit 294e62bebf36f873fd083d2fe8edd78919dda4e8 Author: Alexander Motin AuthorDate: 2021-02-17 02:15:28 +0000 Commit: Alexander Motin CommitDate: 2021-02-17 02:15:28 +0000 cxgbe(4): Save proper zone index on low memory in refill_fl(). When refill_fl() fails to allocate large (9/16KB) mbuf cluster, it falls back to safe (4KB) ones. But it still saved into sd->zidx the original fl->zidx instead of fl->safe_zidx. It caused problems with the later use of that cluster, including memory and/or data corruption. While there, make refill_fl() to use the safe zone for all following clusters for the call, since it is unlikely that large succeed. MFC after: 3 days Sponsored by: iXsystems, Inc. Reviewed by: np, jhb Differential Revision: https://reviews.freebsd.org/D28716 --- sys/dev/cxgbe/t4_sge.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 45f07358f0db..d16f17c45614 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -4524,7 +4524,7 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int n) caddr_t cl; struct rx_buf_info *rxb; struct cluster_metadata *clm; - uint16_t max_pidx; + uint16_t max_pidx, zidx = fl->zidx; uint16_t hw_cidx = fl->hw_cidx; /* stable snapshot */ FL_LOCK_ASSERT_OWNED(fl); @@ -4540,6 +4540,7 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int n) d = &fl->desc[fl->pidx]; sd = &fl->sdesc[fl->pidx]; + rxb = &sc->sge.rx_buf_info[zidx]; while (n > 0) { @@ -4573,11 +4574,11 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int n) sd->cl = NULL; /* gave up my reference */ } MPASS(sd->cl == NULL); - rxb = &sc->sge.rx_buf_info[fl->zidx]; cl = uma_zalloc(rxb->zone, M_NOWAIT); if (__predict_false(cl == NULL)) { - if (fl->zidx != fl->safe_zidx) { - rxb = &sc->sge.rx_buf_info[fl->safe_zidx]; + if (zidx != fl->safe_zidx) { + zidx = fl->safe_zidx; + rxb = &sc->sge.rx_buf_info[zidx]; cl = uma_zalloc(rxb->zone, M_NOWAIT); } if (cl == NULL) @@ -4588,7 +4589,7 @@ refill_fl(struct adapter *sc, struct sge_fl *fl, int n) pa = pmap_kextract((vm_offset_t)cl); sd->cl = cl; - sd->zidx = fl->zidx; + sd->zidx = zidx; if (fl->flags & FL_BUF_PACKING) { *d = htobe64(pa | rxb->hwidx2); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 02:56:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1A13052E905; Wed, 17 Feb 2021 02:56: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 4DgMtp09wsz4cb6; Wed, 17 Feb 2021 02:56: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 EC91F1D407; Wed, 17 Feb 2021 02:56:49 +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 11H2un8v062852; Wed, 17 Feb 2021 02:56:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H2unEa062851; Wed, 17 Feb 2021 02:56:49 GMT (envelope-from git) Date: Wed, 17 Feb 2021 02:56:49 GMT Message-Id: <202102170256.11H2unEa062851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: a4f76f79ffe8 - stable/13 - OpenSSL: Merge OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a4f76f79ffe88cb51ebc7b65b065a333fd64a75b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 02:56:50 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=a4f76f79ffe88cb51ebc7b65b065a333fd64a75b commit a4f76f79ffe88cb51ebc7b65b065a333fd64a75b Author: Jung-uk Kim AuthorDate: 2021-02-16 22:00:27 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 02:54:50 +0000 OpenSSL: Merge OpenSSL 1.1.1j (cherry picked from commit 88e852c0b5c872b1a3234515623104ae61b60773) --- crypto/openssl/AUTHORS | 7 +++ crypto/openssl/CHANGES | 37 +++++++++++++++ crypto/openssl/CONTRIBUTING | 4 +- crypto/openssl/Configure | 29 ++++++------ crypto/openssl/INSTALL | 15 +++--- crypto/openssl/NEWS | 10 ++++ crypto/openssl/README | 2 +- crypto/openssl/apps/ca.c | 53 +++++++++------------- crypto/openssl/apps/progs.pl | 0 crypto/openssl/crypto/armcap.c | 19 +++++++- crypto/openssl/crypto/asn1/charmap.h | 2 +- crypto/openssl/crypto/asn1/charmap.pl | 0 crypto/openssl/crypto/bf/asm/bf-586.pl | 0 crypto/openssl/crypto/bn/asm/bn-586.pl | 0 crypto/openssl/crypto/bn/asm/co-586.pl | 0 crypto/openssl/crypto/bn/asm/ppc.pl | 0 crypto/openssl/crypto/bn/bn_prime.h | 2 +- crypto/openssl/crypto/bn/bn_prime.pl | 0 crypto/openssl/crypto/cast/asm/cast-586.pl | 0 crypto/openssl/crypto/conf/conf_def.c | 16 ++++++- crypto/openssl/crypto/conf/conf_def.h | 2 +- crypto/openssl/crypto/conf/keysets.pl | 0 crypto/openssl/crypto/des/asm/crypt586.pl | 0 crypto/openssl/crypto/des/asm/des-586.pl | 0 crypto/openssl/crypto/des/asm/desboth.pl | 0 crypto/openssl/crypto/dh/dh_key.c | 33 ++++++++++++-- crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/evp/evp_enc.c | 27 +++++++++++ crypto/openssl/crypto/evp/evp_err.c | 4 +- crypto/openssl/crypto/md5/asm/md5-586.pl | 0 crypto/openssl/crypto/mem_sec.c | 8 +++- crypto/openssl/crypto/objects/obj_dat.h | 2 +- crypto/openssl/crypto/objects/obj_dat.pl | 0 crypto/openssl/crypto/objects/obj_xref.h | 2 +- crypto/openssl/crypto/objects/objects.pl | 0 crypto/openssl/crypto/perlasm/cbc.pl | 0 crypto/openssl/crypto/perlasm/x86asm.pl | 0 crypto/openssl/crypto/perlasm/x86nasm.pl | 0 .../openssl/crypto/poly1305/asm/poly1305-armv4.pl | 13 ++++-- crypto/openssl/crypto/ppccap.c | 20 +++++++- crypto/openssl/crypto/rc4/asm/rc4-586.pl | 0 crypto/openssl/crypto/rc5/asm/rc5-586.pl | 0 crypto/openssl/crypto/ripemd/asm/rmd-586.pl | 0 crypto/openssl/crypto/rsa/rsa_ssl.c | 10 +++- crypto/openssl/crypto/sha/asm/sha1-586.pl | 0 crypto/openssl/crypto/sha/asm/sha1-ia64.pl | 0 crypto/openssl/crypto/srp/srp_lib.c | 13 ++++-- crypto/openssl/crypto/x509/x509_cmp.c | 24 ++++++---- crypto/openssl/crypto/x509/x509_vfy.c | 15 +++--- crypto/openssl/crypto/x509/x_all.c | 4 +- crypto/openssl/crypto/x509/x_attrib.c | 5 +- crypto/openssl/crypto/x509v3/v3_purp.c | 14 ++++-- crypto/openssl/crypto/x86_64cpuid.pl | 0 crypto/openssl/crypto/x86cpuid.pl | 0 crypto/openssl/doc/man1/ca.pod | 4 +- crypto/openssl/doc/man1/cms.pod | 4 +- crypto/openssl/doc/man1/crl2pkcs7.pod | 4 +- crypto/openssl/doc/man1/dgst.pod | 4 +- crypto/openssl/doc/man1/dsa.pod | 6 +-- crypto/openssl/doc/man1/ec.pod | 6 +-- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/genpkey.pod | 4 +- crypto/openssl/doc/man1/genrsa.pod | 4 +- crypto/openssl/doc/man1/pkcs12.pod | 14 ++---- crypto/openssl/doc/man1/pkcs8.pod | 6 +-- crypto/openssl/doc/man1/pkey.pod | 6 +-- crypto/openssl/doc/man1/pkeyutl.pod | 4 +- crypto/openssl/doc/man1/req.pod | 6 +-- crypto/openssl/doc/man1/rsa.pod | 6 +-- crypto/openssl/doc/man1/s_client.pod | 4 +- crypto/openssl/doc/man1/s_server.pod | 4 +- crypto/openssl/doc/man1/smime.pod | 4 +- crypto/openssl/doc/man1/spkac.pod | 4 +- crypto/openssl/doc/man1/storeutl.pod | 4 +- crypto/openssl/doc/man1/ts.pod | 4 +- crypto/openssl/doc/man1/x509.pod | 4 +- crypto/openssl/doc/man3/DH_generate_key.pod | 27 +++++++++-- crypto/openssl/doc/man3/OCSP_sendreq_new.pod | 28 ++++++++++-- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 2 +- .../openssl/doc/man3/X509_get_extension_flags.pod | 11 +++-- crypto/openssl/include/openssl/evperr.h | 7 ++- crypto/openssl/include/openssl/obj_mac.h | 2 +- crypto/openssl/include/openssl/opensslv.h | 4 +- crypto/openssl/include/openssl/x509v3.h | 7 +-- crypto/openssl/ssl/d1_lib.c | 11 +++-- crypto/openssl/ssl/record/rec_layer_d1.c | 5 +- crypto/openssl/ssl/ssl_local.h | 3 +- crypto/openssl/ssl/statem/extensions.c | 5 +- crypto/openssl/ssl/statem/statem_clnt.c | 3 +- crypto/openssl/ssl/statem/statem_lib.c | 15 +++++- 90 files changed, 433 insertions(+), 202 deletions(-) diff --git a/crypto/openssl/AUTHORS b/crypto/openssl/AUTHORS index ac93b2e7b975..dac46f8b7e08 100644 --- a/crypto/openssl/AUTHORS +++ b/crypto/openssl/AUTHORS @@ -13,6 +13,8 @@ Ben Kaduk Bernd Edlinger Bodo Möller David Benjamin +David von Oheimb +Dmitry Belyavskiy (Дмитрий Белявский) Emilia Käsper Eric Young Geoff Thorpe @@ -22,14 +24,19 @@ Lutz Jänicke Mark J. Cox Matt Caswell Matthias St. Pierre +Nicola Tuveri Nils Larsch +Patrick Steuer Paul Dale Paul C. Sutton +Paul Yang Ralf S. Engelschall Rich Salz Richard Levitte +Shane Lontis Stephen Henson Steve Marquess Tim Hudson +Tomáš Mráz Ulf Möller Viktor Dukhovni diff --git a/crypto/openssl/CHANGES b/crypto/openssl/CHANGES index 4d61c1dadbaa..a4a63a9bea22 100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@ -7,6 +7,43 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1i and 1.1.1j [16 Feb 2021] + + *) Fixed the X509_issuer_and_serial_hash() function. It attempts to + create a unique hash value based on the issuer and serial number data + contained within an X509 certificate. However it was failing to correctly + handle any errors that may occur while parsing the issuer field (which might + occur if the issuer field is maliciously constructed). This may subsequently + result in a NULL pointer deref and a crash leading to a potential denial of + service attack. + (CVE-2021-23841) + [Matt Caswell] + + *) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks. This is considered a + bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is + CVE-2021-23839. + [Matt Caswell] + + *) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate + functions. Previously they could overflow the output length argument in some + cases where the input length is close to the maximum permissable length for + an integer on the platform. In such cases the return value from the function + call would be 1 (indicating success), but the output length value would be + negative. This could cause applications to behave incorrectly or crash. + (CVE-2021-23840) + [Matt Caswell] + + *) Fixed SRP_Calc_client_key so that it runs in constant time. The previous + implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This + could be exploited in a side channel attack to recover the password. Since + the attack is local host only this is outside of the current OpenSSL + threat model and therefore no CVE is assigned. + + Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this + issue. + [Matt Caswell] + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function diff --git a/crypto/openssl/CONTRIBUTING b/crypto/openssl/CONTRIBUTING index 57be75ce2b8a..83c0dde12819 100644 --- a/crypto/openssl/CONTRIBUTING +++ b/crypto/openssl/CONTRIBUTING @@ -41,8 +41,8 @@ guidelines: https://www.openssl.org/policies/codingstyle.html) and compile without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. Clean builds - via Travis and AppVeyor are required, and they are started automatically + platforms: try to ensure you only use portable features. Clean builds via + GitHub Actions and AppVeyor are required, and they are started automatically whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can diff --git a/crypto/openssl/Configure b/crypto/openssl/Configure index 1423e1bfe14f..8e7ee1a599cc 100755 --- a/crypto/openssl/Configure +++ b/crypto/openssl/Configure @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: perl; -*- -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -1203,6 +1203,10 @@ foreach (keys %useradd) { # At this point, we can forget everything about %user and %useradd, # because it's now all been merged into the corresponding $config entry +if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { + disable('static', 'pic', 'threads'); +} + # Allow overriding the build file name $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile"; @@ -1523,10 +1527,6 @@ if ($strict_warnings) } } -if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { - disable('static', 'pic', 'threads'); -} - $config{CFLAGS} = [ map { $_ eq '--ossl-strict-warnings' ? @strict_warnings_collection : ( $_ ) } @@ -2640,19 +2640,22 @@ _____ } print "\nEnabled features:\n\n"; foreach my $what (@disablables) { - print " $what\n" unless $disabled{$what}; + print " $what\n" + unless grep { $_ =~ /^${what}$/ } keys %disabled; } print "\nDisabled features:\n\n"; foreach my $what (@disablables) { - if ($disabled{$what}) { - print " $what", ' ' x ($longest - length($what) + 1), - "[$disabled{$what}]", ' ' x ($longest2 - length($disabled{$what}) + 1); - print $disabled_info{$what}->{macro} - if $disabled_info{$what}->{macro}; + my @what2 = grep { $_ =~ /^${what}$/ } keys %disabled; + my $what3 = $what2[0]; + if ($what3) { + print " $what3", ' ' x ($longest - length($what3) + 1), + "[$disabled{$what3}]", ' ' x ($longest2 - length($disabled{$what3}) + 1); + print $disabled_info{$what3}->{macro} + if $disabled_info{$what3}->{macro}; print ' (skip ', - join(', ', @{$disabled_info{$what}->{skipped}}), + join(', ', @{$disabled_info{$what3}->{skipped}}), ')' - if $disabled_info{$what}->{skipped}; + if $disabled_info{$what3}->{skipped}; print "\n"; } } diff --git a/crypto/openssl/INSTALL b/crypto/openssl/INSTALL index be84f2aa8e5d..f6f754fd5e26 100644 --- a/crypto/openssl/INSTALL +++ b/crypto/openssl/INSTALL @@ -106,8 +106,7 @@ This will build and install OpenSSL in the default location, which is: Unix: normal installation directories under /usr/local - OpenVMS: SYS$COMMON:[OPENSSL-'version'...], where 'version' is the - OpenSSL version number with underscores instead of periods. + OpenVMS: SYS$COMMON:[OPENSSL] Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL The installation directory should be appropriately protected to ensure @@ -116,7 +115,9 @@ your Operating System it is recommended that you do not overwrite the system version and instead install to somewhere else. - If you want to install it anywhere else, run config like this: + If you want to install it anywhere else, run config like this (the options + --prefix and --openssldir are explained further down, and the values shown + here are mere examples): On Unix: @@ -198,7 +199,7 @@ Unix: /usr/local Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL - OpenVMS: SYS$COMMON:[OPENSSL-'version'] + OpenVMS: SYS$COMMON:[OPENSSL] --release Build OpenSSL without debugging symbols. This is the default. @@ -970,9 +971,9 @@ share/doc/openssl/html/man7 Contains the HTML rendition of the man-pages. - OpenVMS ('arch' is replaced with the architecture name, "Alpha" - or "ia64", 'sover' is replaced with the shared library version - (0101 for 1.1), and 'pz' is replaced with the pointer size + OpenVMS ('arch' is replaced with the architecture name, "ALPHA" + or "IA64", 'sover' is replaced with the shared library version + (0101 for 1.1.x), and 'pz' is replaced with the pointer size OpenSSL was built with): [.EXE.'arch'] Contains the openssl binary. diff --git a/crypto/openssl/NEWS b/crypto/openssl/NEWS index 98f6791a8b79..3cce52506645 100644 --- a/crypto/openssl/NEWS +++ b/crypto/openssl/NEWS @@ -5,6 +5,16 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021] + + o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash() + function (CVE-2021-23841) + o Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks + o Fixed an overflow in the EVP_CipherUpdate, EVP_EncryptUpdate and + EVP_DecryptUpdate functions (CVE-2021-23840) + o Fixed SRP_Calc_client_key so that it runs in constant time + Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020] o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971) diff --git a/crypto/openssl/README b/crypto/openssl/README index 6325127b5693..da5629f92c81 100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1i 8 Dec 2020 + OpenSSL 1.1.1j 16 Feb 2021 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/crypto/openssl/apps/ca.c b/crypto/openssl/apps/ca.c index 6c9b1e57bc67..390ac37493c8 100644 --- a/crypto/openssl/apps/ca.c +++ b/crypto/openssl/apps/ca.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -2223,62 +2223,51 @@ static int get_certificate_status(const char *serial, CA_DB *db) static int do_updatedb(CA_DB *db) { - ASN1_UTCTIME *a_tm = NULL; + ASN1_TIME *a_tm = NULL; int i, cnt = 0; - int db_y2k, a_y2k; /* flags = 1 if y >= 2000 */ - char **rrow, *a_tm_s; + char **rrow; - a_tm = ASN1_UTCTIME_new(); + a_tm = ASN1_TIME_new(); if (a_tm == NULL) return -1; - /* get actual time and make a string */ + /* get actual time */ if (X509_gmtime_adj(a_tm, 0) == NULL) { - ASN1_UTCTIME_free(a_tm); + ASN1_TIME_free(a_tm); return -1; } - a_tm_s = app_malloc(a_tm->length + 1, "time string"); - - memcpy(a_tm_s, a_tm->data, a_tm->length); - a_tm_s[a_tm->length] = '\0'; - - if (strncmp(a_tm_s, "49", 2) <= 0) - a_y2k = 1; - else - a_y2k = 0; for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { rrow = sk_OPENSSL_PSTRING_value(db->db->data, i); if (rrow[DB_type][0] == DB_TYPE_VAL) { /* ignore entries that are not valid */ - if (strncmp(rrow[DB_exp_date], "49", 2) <= 0) - db_y2k = 1; - else - db_y2k = 0; + ASN1_TIME *exp_date = NULL; - if (db_y2k == a_y2k) { - /* all on the same y2k side */ - if (strcmp(rrow[DB_exp_date], a_tm_s) <= 0) { - rrow[DB_type][0] = DB_TYPE_EXP; - rrow[DB_type][1] = '\0'; - cnt++; + exp_date = ASN1_TIME_new(); + if (exp_date == NULL) { + ASN1_TIME_free(a_tm); + return -1; + } - BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); - } - } else if (db_y2k < a_y2k) { + if (!ASN1_TIME_set_string(exp_date, rrow[DB_exp_date])) { + ASN1_TIME_free(a_tm); + ASN1_TIME_free(exp_date); + return -1; + } + + if (ASN1_TIME_compare(exp_date, a_tm) <= 0) { rrow[DB_type][0] = DB_TYPE_EXP; rrow[DB_type][1] = '\0'; cnt++; BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); } - + ASN1_TIME_free(exp_date); } } - ASN1_UTCTIME_free(a_tm); - OPENSSL_free(a_tm_s); + ASN1_TIME_free(a_tm); return cnt; } diff --git a/crypto/openssl/apps/progs.pl b/crypto/openssl/apps/progs.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index 58e54f0da2e1..8bf96f10214f 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -69,6 +69,23 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # define OSSL_IMPLEMENT_GETAUXVAL # endif # endif +# if defined(__FreeBSD__) +# include +# if __FreeBSD_version >= 1200000 +# include +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif +# endif /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas diff --git a/crypto/openssl/crypto/asn1/charmap.h b/crypto/openssl/crypto/asn1/charmap.h index cac354c6bf33..e234c9e615d0 100644 --- a/crypto/openssl/crypto/asn1/charmap.h +++ b/crypto/openssl/crypto/asn1/charmap.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/asn1/charmap.pl * - * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/asn1/charmap.pl b/crypto/openssl/crypto/asn1/charmap.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bf/asm/bf-586.pl b/crypto/openssl/crypto/bf/asm/bf-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/bn-586.pl b/crypto/openssl/crypto/bn/asm/bn-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/co-586.pl b/crypto/openssl/crypto/bn/asm/co-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/ppc.pl b/crypto/openssl/crypto/bn/asm/ppc.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/bn_prime.h b/crypto/openssl/crypto/bn/bn_prime.h index ba48244534b0..1a25c285773a 100644 --- a/crypto/openssl/crypto/bn/bn_prime.h +++ b/crypto/openssl/crypto/bn/bn_prime.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/bn/bn_prime.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/bn/bn_prime.pl b/crypto/openssl/crypto/bn/bn_prime.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/cast/asm/cast-586.pl b/crypto/openssl/crypto/cast/asm/cast-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/conf/conf_def.c b/crypto/openssl/crypto/conf/conf_def.c index 3d710f12ae07..31c02cc49e22 100644 --- a/crypto/openssl/crypto/conf/conf_def.c +++ b/crypto/openssl/crypto/conf/conf_def.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -185,6 +185,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BUF_MEM *buff = NULL; char *s, *p, *end; int again; + int first_call = 1; long eline = 0; char btmp[DECIMAL_SIZE(eline) + 1]; CONF_VALUE *v = NULL, *tv; @@ -233,6 +234,19 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BIO_gets(in, p, CONFBUFSIZE - 1); p[CONFBUFSIZE - 1] = '\0'; ii = i = strlen(p); + if (first_call) { + /* Other BOMs imply unsupported multibyte encoding, + * so don't strip them and let the error raise */ + const unsigned char utf8_bom[3] = {0xEF, 0xBB, 0xBF}; + + if (i >= 3 && memcmp(p, utf8_bom, 3) == 0) { + memmove(p, p + 3, i - 3); + p[i - 3] = 0; + i -= 3; + ii -= 3; + } + first_call = 0; + } if (i == 0 && !again) { /* the currently processed BIO is at EOF */ BIO *parent; diff --git a/crypto/openssl/crypto/conf/conf_def.h b/crypto/openssl/crypto/conf/conf_def.h index 2ced300e40d6..1e4a03e10bbd 100644 --- a/crypto/openssl/crypto/conf/conf_def.h +++ b/crypto/openssl/crypto/conf/conf_def.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/conf/keysets.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/openssl/crypto/conf/keysets.pl b/crypto/openssl/crypto/conf/keysets.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/crypt586.pl b/crypto/openssl/crypto/des/asm/crypt586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/des-586.pl b/crypto/openssl/crypto/des/asm/des-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/desboth.pl b/crypto/openssl/crypto/des/asm/desboth.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/dh/dh_key.c b/crypto/openssl/crypto/dh/dh_key.c index daffdf74dd37..117f2fa883ff 100644 --- a/crypto/openssl/crypto/dh/dh_key.c +++ b/crypto/openssl/crypto/dh/dh_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -25,18 +25,45 @@ int DH_generate_key(DH *dh) return dh->meth->generate_key(dh); } +/*- + * NB: This function is inherently not constant time due to the + * RFC 5246 (8.1.2) padding style that strips leading zero bytes. + */ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { - return dh->meth->compute_key(key, pub_key, dh); + int ret = 0, i; + volatile size_t npad = 0, mask = 1; + + /* compute the key; ret is constant unless compute_key is external */ + if ((ret = dh->meth->compute_key(key, pub_key, dh)) <= 0) + return ret; + + /* count leading zero bytes, yet still touch all bytes */ + for (i = 0; i < ret; i++) { + mask &= !key[i]; + npad += mask; + } + + /* unpad key */ + ret -= npad; + /* key-dependent memory access, potentially leaking npad / ret */ + memmove(key, key + npad, ret); + /* key-dependent memory access, potentially leaking npad / ret */ + memset(key + ret, 0, npad); + + return ret; } int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) { int rv, pad; + + /* rv is constant unless compute_key is external */ rv = dh->meth->compute_key(key, pub_key, dh); if (rv <= 0) return rv; pad = BN_num_bytes(dh->p) - rv; + /* pad is constant (zero) unless compute_key is external */ if (pad > 0) { memmove(key + pad, key, rv); memset(key, 0, pad); @@ -212,7 +239,7 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) goto err; } - ret = BN_bn2bin(tmp, key); + ret = BN_bn2binpad(tmp, key, BN_num_bytes(dh->p)); err: BN_CTX_end(ctx); BN_CTX_free(ctx); diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index d547c45913d6..b22e8a735ccf 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -2284,6 +2284,7 @@ EVP_R_ONLY_ONESHOT_SUPPORTED:177:only oneshot supported EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE:150:\ operation not supported for this keytype EVP_R_OPERATON_NOT_INITIALIZED:151:operaton not initialized +EVP_R_OUTPUT_WOULD_OVERFLOW:184:output would overflow EVP_R_PARTIALLY_OVERLAPPING:162:partially overlapping buffers EVP_R_PBKDF2_ERROR:181:pbkdf2 error EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED:179:\ diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index b9b6490fe069..0843caf4f0a4 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include "internal/cryptlib.h" #include @@ -355,6 +356,19 @@ static int evp_EncryptDecryptUpdate(EVP_CIPHER_CTX *ctx, return 1; } else { j = bl - i; + + /* + * Once we've processed the first j bytes from in, the amount of + * data left that is a multiple of the block length is: + * (inl - j) & ~(bl - 1) + * We must ensure that this amount of data, plus the one block that + * we process from ctx->buf does not exceed INT_MAX + */ + if (((inl - j) & ~(bl - 1)) > INT_MAX - bl) { + EVPerr(EVP_F_EVP_ENCRYPTDECRYPTUPDATE, + EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(&(ctx->buf[i]), in, j); inl -= j; in += j; @@ -502,6 +516,19 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING); return 0; } + /* + * final_used is only ever set if buf_len is 0. Therefore the maximum + * length output we will ever see from evp_EncryptDecryptUpdate is + * the maximum multiple of the block length that is <= inl, or just: + * inl & ~(b - 1) + * Since final_used has been set then the final output length is: + * (inl & ~(b - 1)) + b + * This must never exceed INT_MAX + */ + if ((inl & ~(b - 1)) > INT_MAX - b) { + EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(out, ctx->final, b); out += b; fix_len = 1; diff --git a/crypto/openssl/crypto/evp/evp_err.c b/crypto/openssl/crypto/evp/evp_err.c index 05481d827fb4..32ac0125de24 100644 --- a/crypto/openssl/crypto/evp/evp_err.c +++ b/crypto/openssl/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -239,6 +239,8 @@ static const ERR_STRING_DATA EVP_str_reasons[] = { "operation not supported for this keytype"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"}, + {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OUTPUT_WOULD_OVERFLOW), + "output would overflow"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PARTIALLY_OVERLAPPING), "partially overlapping buffers"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PBKDF2_ERROR), "pbkdf2 error"}, diff --git a/crypto/openssl/crypto/md5/asm/md5-586.pl b/crypto/openssl/crypto/md5/asm/md5-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/mem_sec.c b/crypto/openssl/crypto/mem_sec.c index b5f959ba15d5..222c786cbaef 100644 --- a/crypto/openssl/crypto/mem_sec.c +++ b/crypto/openssl/crypto/mem_sec.c @@ -34,6 +34,12 @@ # include # endif # endif +# if defined(__FreeBSD__) +# define MADV_DONTDUMP MADV_NOCORE +# endif +# if !defined(MAP_CONCEAL) +# define MAP_CONCEAL 0 +# endif # include # include # include @@ -442,7 +448,7 @@ static int sh_init(size_t size, int minsize) if (1) { #ifdef MAP_ANON sh.map_result = mmap(NULL, sh.map_size, - PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_CONCEAL, -1, 0); } else { #endif int fd; diff --git a/crypto/openssl/crypto/objects/obj_dat.h b/crypto/openssl/crypto/objects/obj_dat.h index d1b1bc7faf91..24b49a2df258 100644 --- a/crypto/openssl/crypto/objects/obj_dat.h +++ b/crypto/openssl/crypto/objects/obj_dat.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/objects/obj_dat.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/openssl/crypto/objects/obj_dat.pl b/crypto/openssl/crypto/objects/obj_dat.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/objects/obj_xref.h b/crypto/openssl/crypto/objects/obj_xref.h index 1ca04bbff19f..5c3561ab7d7e 100644 --- a/crypto/openssl/crypto/objects/obj_xref.h +++ b/crypto/openssl/crypto/objects/obj_xref.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by objxref.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/objects/objects.pl b/crypto/openssl/crypto/objects/objects.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/cbc.pl b/crypto/openssl/crypto/perlasm/cbc.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/x86asm.pl b/crypto/openssl/crypto/perlasm/x86asm.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/x86nasm.pl b/crypto/openssl/crypto/perlasm/x86nasm.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl index f77e1170f66b..70f46cd140aa 100755 --- a/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl +++ b/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -133,10 +133,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -352,6 +352,7 @@ $code.=<<___; .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4-r11} .Lpoly1305_emit_enter: @@ -671,6 +672,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[$ctx,#36] @ is_base2_26 ands $len,$len,#-16 beq .Lno_data_neon @@ -1157,6 +1159,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[$ctx,#36] @ is_base2_26 stmdb sp!,{r4-r11} diff --git a/crypto/openssl/crypto/ppccap.c b/crypto/openssl/crypto/ppccap.c index b12cd949ccfe..e51156468ae5 100644 --- a/crypto/openssl/crypto/ppccap.c +++ b/crypto/openssl/crypto/ppccap.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2009-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -214,6 +214,24 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max) # endif #endif +#if defined(__FreeBSD__) +# include +# if __FreeBSD_version >= 1200000 +# include +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif +#endif + /* I wish was universally available */ #define HWCAP 16 /* AT_HWCAP */ #define HWCAP_PPC64 (1U << 30) diff --git a/crypto/openssl/crypto/rc4/asm/rc4-586.pl b/crypto/openssl/crypto/rc4/asm/rc4-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/rc5/asm/rc5-586.pl b/crypto/openssl/crypto/rc5/asm/rc5-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/ripemd/asm/rmd-586.pl b/crypto/openssl/crypto/ripemd/asm/rmd-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/rsa/rsa_ssl.c b/crypto/openssl/crypto/rsa/rsa_ssl.c index 1f155be175da..ecdb3cee1fa3 100644 --- a/crypto/openssl/crypto/rsa/rsa_ssl.c +++ b/crypto/openssl/crypto/rsa/rsa_ssl.c @@ -55,7 +55,7 @@ int RSA_padding_add_SSLv23(unsigned char *to, int tlen, /* * Copy of RSA_padding_check_PKCS1_type_2 with a twist that rejects padding - * if nul delimiter is not preceded by 8 consecutive 0x03 bytes. It also + * if nul delimiter is preceded by 8 consecutive 0x03 bytes. It also * preserves error code reporting for backward compatibility. */ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, @@ -122,7 +122,13 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, RSA_R_NULL_BEFORE_BLOCK_MISSING); mask = ~good; - good &= constant_time_ge(threes_in_row, 8); + /* + * Reject if nul delimiter is preceded by 8 consecutive 0x03 bytes. Note + * that RFC5246 incorrectly states this the other way around, i.e. reject + * if it is not preceded by 8 consecutive 0x03 bytes. However this is + * corrected in subsequent errata for that RFC. + */ + good &= constant_time_lt(threes_in_row, 8); err = constant_time_select_int(mask | good, err, RSA_R_SSLV3_ROLLBACK_ATTACK); mask = ~good; diff --git a/crypto/openssl/crypto/sha/asm/sha1-586.pl b/crypto/openssl/crypto/sha/asm/sha1-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/sha/asm/sha1-ia64.pl b/crypto/openssl/crypto/sha/asm/sha1-ia64.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/srp/srp_lib.c b/crypto/openssl/crypto/srp/srp_lib.c index 4f417de0c989..ce3504825c53 100644 --- a/crypto/openssl/crypto/srp/srp_lib.c +++ b/crypto/openssl/crypto/srp/srp_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2004, EdelKey Project. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -177,6 +177,7 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, const BIGNUM *x, const BIGNUM *a, const BIGNUM *u) { BIGNUM *tmp = NULL, *tmp2 = NULL, *tmp3 = NULL, *k = NULL, *K = NULL; + BIGNUM *xtmp = NULL; BN_CTX *bn_ctx; if (u == NULL || B == NULL || N == NULL || g == NULL || x == NULL @@ -185,10 +186,13 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, if ((tmp = BN_new()) == NULL || (tmp2 = BN_new()) == NULL || - (tmp3 = BN_new()) == NULL) + (tmp3 = BN_new()) == NULL || + (xtmp = BN_new()) == NULL) goto err; - if (!BN_mod_exp(tmp, g, x, N, bn_ctx)) + BN_with_flags(xtmp, x, BN_FLG_CONSTTIME); + BN_set_flags(tmp, BN_FLG_CONSTTIME); + if (!BN_mod_exp(tmp, g, xtmp, N, bn_ctx)) goto err; if ((k = srp_Calc_k(N, g)) == NULL) goto err; @@ -196,7 +200,7 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, goto err; if (!BN_mod_sub(tmp, B, tmp2, N, bn_ctx)) goto err; - if (!BN_mul(tmp3, u, x, bn_ctx)) + if (!BN_mul(tmp3, u, xtmp, bn_ctx)) *** 1150 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 02:56:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DDFEB52E5D2; Wed, 17 Feb 2021 02:56:51 +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 4DgMtq53kdz4d8j; Wed, 17 Feb 2021 02:56:51 +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 98C001D128; Wed, 17 Feb 2021 02:56:51 +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 11H2upDI062875; Wed, 17 Feb 2021 02:56:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H2upik062874; Wed, 17 Feb 2021 02:56:51 GMT (envelope-from git) Date: Wed, 17 Feb 2021 02:56:51 GMT Message-Id: <202102170256.11H2upik062874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: e8cbe40ac3ba - stable/13 - OpenSSL: Regen manual pages for OpenSSL 1.1.1j. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e8cbe40ac3ba0582d995d584f58009168f2c9dc6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 02:56:52 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=e8cbe40ac3ba0582d995d584f58009168f2c9dc6 commit e8cbe40ac3ba0582d995d584f58009168f2c9dc6 Author: Jung-uk Kim AuthorDate: 2021-02-16 22:05:00 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 02:55:45 +0000 OpenSSL: Regen manual pages for OpenSSL 1.1.1j. (cherry picked from commit e25db73fea9b641a7dcf29303cf104e0d3847d6c) --- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 2 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 2 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 2 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_get_ktls_send.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 2 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 2 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 2 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 2 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 2 +- secure/lib/libcrypto/man/man3/BN_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 2 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 2 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 2 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 2 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 2 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 2 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 2 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 2 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 2 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 2 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 2 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 2 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 2 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 2 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 2 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 2 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 27 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 2 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 2 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DH_size.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 2 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 2 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 2 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 2 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 2 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 2 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 2 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 2 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 2 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aes.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aria.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_des.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 2 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 2 +- secure/lib/libcrypto/man/man3/HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/MD5.3 | 2 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 2 +- secure/lib/libcrypto/man/man3/Makefile | 6 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 2 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 22 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 2 +- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 2 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 2 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 2 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 2 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 2 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 2 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 2 +- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 2 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 2 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 2 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 2 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 2 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 2 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 2 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 2 +- .../man/man3/SSL_COMP_add_compression_method.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 2 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 2 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 2 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 2 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 2 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 2 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 2 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 2 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 2 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 2 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 2 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 2 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 2 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 2 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 2 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 2 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 2 +- .../man/man3/SSL_CTX_set_security_level.3 | 2 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 2 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 2 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 2 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 2 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 2 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 2 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 2 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 2 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 2 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 2 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 2 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 2 +- .../man/man3/SSL_export_keying_material.3 | 2 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 2 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 2 +- .../man/man3/SSL_get_peer_signature_nid.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 2 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 2 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 2 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 2 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 2 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 2 +- secure/lib/libcrypto/man/man3/UI_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 2 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 2 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 2 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 2 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 2 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 2 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 2 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 2 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 2 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 2 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 2 +- .../libcrypto/man/man3/X509_check_private_key.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 2 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 2 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 2 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 12 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/X509_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 2 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 2 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 2 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 2 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 2 +- secure/lib/libcrypto/man/man7/Ed25519.7 | 2 +- secure/lib/libcrypto/man/man7/RAND.7 | 2 +- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 2 +- secure/lib/libcrypto/man/man7/SM2.7 | 2 +- secure/lib/libcrypto/man/man7/X25519.7 | 2 +- secure/lib/libcrypto/man/man7/bio.7 | 2 +- secure/lib/libcrypto/man/man7/ct.7 | 2 +- secure/lib/libcrypto/man/man7/des_modes.7 | 2 +- secure/lib/libcrypto/man/man7/evp.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 2 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 2 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 2 +- secure/lib/libcrypto/man/man7/scrypt.7 | 2 +- secure/lib/libcrypto/man/man7/ssl.7 | 2 +- secure/lib/libcrypto/man/man7/x509.7 | 2 +- secure/usr.bin/openssl/Makefile.man | 4 + secure/usr.bin/openssl/man/CA.pl.1 | 2 +- secure/usr.bin/openssl/man/asn1parse.1 | 2 +- secure/usr.bin/openssl/man/ca.1 | 6 +- secure/usr.bin/openssl/man/ciphers.1 | 2 +- secure/usr.bin/openssl/man/cms.1 | 6 +- secure/usr.bin/openssl/man/crl.1 | 2 +- secure/usr.bin/openssl/man/crl2pkcs7.1 | 6 +- secure/usr.bin/openssl/man/dgst.1 | 6 +- secure/usr.bin/openssl/man/dhparam.1 | 2 +- secure/usr.bin/openssl/man/dsa.1 | 8 +- secure/usr.bin/openssl/man/dsaparam.1 | 2 +- secure/usr.bin/openssl/man/ec.1 | 8 +- secure/usr.bin/openssl/man/ecparam.1 | 2 +- secure/usr.bin/openssl/man/enc.1 | 6 +- secure/usr.bin/openssl/man/engine.1 | 2 +- secure/usr.bin/openssl/man/errstr.1 | 2 +- secure/usr.bin/openssl/man/gendsa.1 | 2 +- secure/usr.bin/openssl/man/genpkey.1 | 6 +- secure/usr.bin/openssl/man/genrsa.1 | 6 +- secure/usr.bin/openssl/man/list.1 | 2 +- secure/usr.bin/openssl/man/nseq.1 | 2 +- secure/usr.bin/openssl/man/ocsp.1 | 2 +- secure/usr.bin/openssl/man/openssl.1 | 2 +- secure/usr.bin/openssl/man/passwd.1 | 2 +- secure/usr.bin/openssl/man/pkcs12.1 | 16 +- secure/usr.bin/openssl/man/pkcs7.1 | 2 +- secure/usr.bin/openssl/man/pkcs8.1 | 8 +- secure/usr.bin/openssl/man/pkey.1 | 8 +- secure/usr.bin/openssl/man/pkeyparam.1 | 2 +- secure/usr.bin/openssl/man/pkeyutl.1 | 6 +- secure/usr.bin/openssl/man/prime.1 | 2 +- secure/usr.bin/openssl/man/rand.1 | 2 +- secure/usr.bin/openssl/man/req.1 | 8 +- secure/usr.bin/openssl/man/rsa.1 | 8 +- secure/usr.bin/openssl/man/rsautl.1 | 2 +- secure/usr.bin/openssl/man/s_client.1 | 6 +- secure/usr.bin/openssl/man/s_server.1 | 6 +- secure/usr.bin/openssl/man/s_time.1 | 2 +- secure/usr.bin/openssl/man/sess_id.1 | 2 +- secure/usr.bin/openssl/man/smime.1 | 6 +- secure/usr.bin/openssl/man/speed.1 | 2 +- secure/usr.bin/openssl/man/spkac.1 | 6 +- secure/usr.bin/openssl/man/srp.1 | 2 +- secure/usr.bin/openssl/man/storeutl.1 | 6 +- secure/usr.bin/openssl/man/ts.1 | 6 +- secure/usr.bin/openssl/man/tsget.1 | 2 +- secure/usr.bin/openssl/man/verify.1 | 2 +- secure/usr.bin/openssl/man/version.1 | 2 +- secure/usr.bin/openssl/man/x509.1 | 6 +- 539 files changed, 642 insertions(+), 1167 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index f70a506ed5a9..d60b9ca78eb3 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1i -OPENSSL_DATE= 2020-12-08 +OPENSSL_VER= 1.1.1j +OPENSSL_DATE= 2021-02-16 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index 048d4fc2b64b..2720754cf9e8 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ADMISSIONS 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 135a622a91c8..2daf11f19a0d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index 9ac1969ef577..f45f3fdc98ab 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index f5a4c0f68510..69678622d9fa 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index 9b9613637d3a..9b9393cc5290 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index ad33ca4b7b2a..ca15f898e6a8 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index f2c2afe53015..e4f6859c186d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index d2394acf12e7..fbfcf517275f 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index 562929c6cd9f..00b72c375820 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index 930a32de6d33..4845c5280b6b 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index c139f0a79d4a..ce95ffd0fc29 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index b09d540d97e5..b761db6b5b7a 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index 0917cbf28d0a..03b06aff8fec 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 1e67cea75097..8916feee640f 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index 3f0f0cfd2170..0dbedbf16b9d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDR 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 5df20d27fde8..fb1d199796cb 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index f9fdd9b15d37..44b80366360d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_CONNECT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index 487f6d192c8c..7d90a1a40792 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2021-01-21" "1.1.1i" "OpenSSL" +.TH BIO_CTRL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index d42d2eb6c9ec..39b94d930d17 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 9b4bc1c800c5..61cfe1eec579 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 index a26d0f5cca2f..33e6f6c95c6e 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_CIPHER 3" -.TH BIO_F_CIPHER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_CIPHER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_md.3 b/secure/lib/libcrypto/man/man3/BIO_f_md.3 index ba7f598a14fc..04c3fdaecc20 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_md.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_MD 3" -.TH BIO_F_MD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_MD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_null.3 b/secure/lib/libcrypto/man/man3/BIO_f_null.3 index 44d680123203..21225c1e17fe 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_null.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_NULL 3" -.TH BIO_F_NULL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_NULL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 index ce95b5d29fd3..02b2bcd5e714 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_SSL 3" -.TH BIO_F_SSL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_SSL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_find_type.3 b/secure/lib/libcrypto/man/man3/BIO_find_type.3 index 8ed77ea8ae03..579435574865 100644 --- a/secure/lib/libcrypto/man/man3/BIO_find_type.3 +++ b/secure/lib/libcrypto/man/man3/BIO_find_type.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_FIND_TYPE 3" -.TH BIO_FIND_TYPE 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_FIND_TYPE 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_data.3 b/secure/lib/libcrypto/man/man3/BIO_get_data.3 index dc9eb33aba84..df2d8f5667dd 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_data.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_data.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_DATA 3" -.TH BIO_GET_DATA 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_DATA 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 index a1ff83189d93..31914a912318 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_EX_NEW_INDEX 3" -.TH BIO_GET_EX_NEW_INDEX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_EX_NEW_INDEX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 b/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 deleted file mode 100644 index 487f6d192c8c..000000000000 --- a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 +++ /dev/null @@ -1,280 +0,0 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is >0, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 -.if \n(.g .if rF .nr rF 1 -.if (\n(rF:(\n(.g==0)) \{\ -. if \nF \{\ *** 7774 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 04:02:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 13061530B36; Wed, 17 Feb 2021 04:02:23 +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 4DgPLQ73yBz4jYx; Wed, 17 Feb 2021 04:02:22 +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 E550B1DD73; Wed, 17 Feb 2021 04:02:22 +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 11H42Mbt054709; Wed, 17 Feb 2021 04:02:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H42MYM054708; Wed, 17 Feb 2021 04:02:22 GMT (envelope-from git) Date: Wed, 17 Feb 2021 04:02:22 GMT Message-Id: <202102170402.11H42MYM054708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: b84081606110 - main - OpenSSL: Remove obsolete include directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b84081606110af6b5df764e3568c0271a5699daa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 04:02:23 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=b84081606110af6b5df764e3568c0271a5699daa commit b84081606110af6b5df764e3568c0271a5699daa Author: Jung-uk Kim AuthorDate: 2021-02-17 03:53:37 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 03:53:37 +0000 OpenSSL: Remove obsolete include directory This directory was deprecated since OpenSSL 1.1.1e. https://github.com/openssl/openssl/pull/9681 --- .../include/internal/__DECC_INCLUDE_EPILOGUE.H | 16 - .../include/internal/__DECC_INCLUDE_PROLOGUE.H | 20 - crypto/openssl/crypto/include/internal/aria.h | 50 --- crypto/openssl/crypto/include/internal/asn1_int.h | 113 ------ crypto/openssl/crypto/include/internal/async.h | 15 - .../openssl/crypto/include/internal/bn_conf.h.in | 27 -- crypto/openssl/crypto/include/internal/bn_dh.h | 24 -- crypto/openssl/crypto/include/internal/bn_int.h | 90 ----- crypto/openssl/crypto/include/internal/bn_srp.h | 32 -- crypto/openssl/crypto/include/internal/chacha.h | 42 -- .../openssl/crypto/include/internal/cryptlib_int.h | 35 -- crypto/openssl/crypto/include/internal/ctype.h | 82 ---- .../openssl/crypto/include/internal/dso_conf.h.in | 31 -- crypto/openssl/crypto/include/internal/ec_int.h | 53 --- crypto/openssl/crypto/include/internal/engine.h | 20 - crypto/openssl/crypto/include/internal/err_int.h | 19 - crypto/openssl/crypto/include/internal/evp_int.h | 442 --------------------- crypto/openssl/crypto/include/internal/lhash.h | 15 - .../openssl/crypto/include/internal/md32_common.h | 256 ------------ crypto/openssl/crypto/include/internal/objects.h | 12 - crypto/openssl/crypto/include/internal/poly1305.h | 21 - crypto/openssl/crypto/include/internal/rand_int.h | 134 ------- crypto/openssl/crypto/include/internal/sha.h | 19 - crypto/openssl/crypto/include/internal/siphash.h | 25 -- crypto/openssl/crypto/include/internal/sm2.h | 78 ---- crypto/openssl/crypto/include/internal/sm2err.h | 65 --- crypto/openssl/crypto/include/internal/sm3.h | 39 -- crypto/openssl/crypto/include/internal/sm4.h | 37 -- crypto/openssl/crypto/include/internal/store.h | 10 - crypto/openssl/crypto/include/internal/store_int.h | 26 -- crypto/openssl/crypto/include/internal/x509_int.h | 286 ------------- secure/lib/libcrypto/Makefile.inc | 1 - 32 files changed, 2135 deletions(-) diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H deleted file mode 100644 index c350018ad190..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* restore state. Must correspond to the save in __decc_include_prologue.h */ -#pragma names restore diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H deleted file mode 100644 index 9a9c777f93f8..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* save state */ -#pragma names save -/* have the compiler shorten symbols larger than 31 chars to 23 chars - * followed by a 8 hex char CRC - */ -#pragma names as_is,shortened diff --git a/crypto/openssl/crypto/include/internal/aria.h b/crypto/openssl/crypto/include/internal/aria.h deleted file mode 100644 index 355abe539805..000000000000 --- a/crypto/openssl/crypto/include/internal/aria.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - - /* Copyright (c) 2017 National Security Research Institute. All rights reserved. */ - -#ifndef HEADER_ARIA_H -# define HEADER_ARIA_H - -# include - -# ifdef OPENSSL_NO_ARIA -# error ARIA is disabled. -# endif - -# define ARIA_ENCRYPT 1 -# define ARIA_DECRYPT 0 - -# define ARIA_BLOCK_SIZE 16 /* Size of each encryption/decryption block */ -# define ARIA_MAX_KEYS 17 /* Number of keys needed in the worst case */ - -typedef union { - unsigned char c[ARIA_BLOCK_SIZE]; - unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)]; -} ARIA_u128; - -typedef unsigned char ARIA_c128[ARIA_BLOCK_SIZE]; - -struct aria_key_st { - ARIA_u128 rd_key[ARIA_MAX_KEYS]; - unsigned int rounds; -}; -typedef struct aria_key_st ARIA_KEY; - - -int aria_set_encrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); -int aria_set_decrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); - -void aria_encrypt(const unsigned char *in, unsigned char *out, - const ARIA_KEY *key); - -#endif diff --git a/crypto/openssl/crypto/include/internal/asn1_int.h b/crypto/openssl/crypto/include/internal/asn1_int.h deleted file mode 100644 index 9c9b4d897456..000000000000 --- a/crypto/openssl/crypto/include/internal/asn1_int.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal ASN1 structures and functions: not for application use */ - -/* ASN1 public key method structure */ - -struct evp_pkey_asn1_method_st { - int pkey_id; - int pkey_base_id; - unsigned long pkey_flags; - char *pem_str; - char *info; - int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub); - int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk); - int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf); - int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk); - int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*pkey_size) (const EVP_PKEY *pk); - int (*pkey_bits) (const EVP_PKEY *pk); - int (*pkey_security_bits) (const EVP_PKEY *pk); - int (*param_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder); - int (*param_missing) (const EVP_PKEY *pk); - int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from); - int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*sig_print) (BIO *out, - const X509_ALGOR *sigalg, const ASN1_STRING *sig, - int indent, ASN1_PCTX *pctx); - void (*pkey_free) (EVP_PKEY *pkey); - int (*pkey_ctrl) (EVP_PKEY *pkey, int op, long arg1, void *arg2); - /* Legacy functions for old PEM */ - int (*old_priv_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*old_priv_encode) (const EVP_PKEY *pkey, unsigned char **pder); - /* Custom ASN1 signature verification */ - int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey); - int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *alg1, X509_ALGOR *alg2, - ASN1_BIT_STRING *sig); - int (*siginf_set) (X509_SIG_INFO *siginf, const X509_ALGOR *alg, - const ASN1_STRING *sig); - /* Check */ - int (*pkey_check) (const EVP_PKEY *pk); - int (*pkey_public_check) (const EVP_PKEY *pk); - int (*pkey_param_check) (const EVP_PKEY *pk); - /* Get/set raw private/public key data */ - int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len); - int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len); - int (*get_priv_key) (const EVP_PKEY *pk, unsigned char *priv, size_t *len); - int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len); -} /* EVP_PKEY_ASN1_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD) - -extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5]; -extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD sm2_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD poly1305_asn1_meth; - -extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2]; -extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD siphash_asn1_meth; - -/* - * These are used internally in the ASN1_OBJECT to keep track of whether the - * names and data need to be free()ed - */ -# define ASN1_OBJECT_FLAG_DYNAMIC 0x01/* internal use */ -# define ASN1_OBJECT_FLAG_CRITICAL 0x02/* critical x509v3 object id */ -# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */ -# define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08/* internal use */ -struct asn1_object_st { - const char *sn, *ln; - int nid; - int length; - const unsigned char *data; /* data remains const after init */ - int flags; /* Should we free this one */ -}; - -/* ASN1 print context structure */ - -struct asn1_pctx_st { - unsigned long flags; - unsigned long nm_flags; - unsigned long cert_flags; - unsigned long oid_flags; - unsigned long str_flags; -} /* ASN1_PCTX */ ; - -int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb); diff --git a/crypto/openssl/crypto/include/internal/async.h b/crypto/openssl/crypto/include/internal/async.h deleted file mode 100644 index dc8e937b0ced..000000000000 --- a/crypto/openssl/crypto/include/internal/async.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -int async_init(void); -void async_deinit(void); -void async_delete_thread_state(void); - diff --git a/crypto/openssl/crypto/include/internal/bn_conf.h.in b/crypto/openssl/crypto/include/internal/bn_conf.h.in deleted file mode 100644 index ec6e4f6c1b5e..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_conf.h.in +++ /dev/null @@ -1,27 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_CONF_H -# define HEADER_BN_CONF_H - -/* - * The contents of this file are not used in the UEFI build, as - * both 32-bit and 64-bit builds are supported from a single run - * of the Configure script. - */ - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -{- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG -{- $config{b64} ? "#define" : "#undef" -} SIXTY_FOUR_BIT -{- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_dh.h b/crypto/openssl/crypto/include/internal/bn_dh.h deleted file mode 100644 index 70ebca28753c..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_dh.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#define declare_dh_bn(x) \ - extern const BIGNUM _bignum_dh##x##_p; \ - extern const BIGNUM _bignum_dh##x##_g; \ - extern const BIGNUM _bignum_dh##x##_q; - -declare_dh_bn(1024_160) -declare_dh_bn(2048_224) -declare_dh_bn(2048_256) - -extern const BIGNUM _bignum_ffdhe2048_p; -extern const BIGNUM _bignum_ffdhe3072_p; -extern const BIGNUM _bignum_ffdhe4096_p; -extern const BIGNUM _bignum_ffdhe6144_p; -extern const BIGNUM _bignum_ffdhe8192_p; -extern const BIGNUM _bignum_const_2; diff --git a/crypto/openssl/crypto/include/internal/bn_int.h b/crypto/openssl/crypto/include/internal/bn_int.h deleted file mode 100644 index 30be7efe14d8..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_int.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_INT_H -# define HEADER_BN_INT_H - -# include -# include - -BIGNUM *bn_wexpand(BIGNUM *a, int words); -BIGNUM *bn_expand2(BIGNUM *a, int words); - -void bn_correct_top(BIGNUM *a); - -/* - * Determine the modified width-(w+1) Non-Adjacent Form (wNAF) of 'scalar'. - * This is an array r[] of values that are either zero or odd with an - * absolute value less than 2^w satisfying scalar = \sum_j r[j]*2^j where at - * most one of any w+1 consecutive digits is non-zero with the exception that - * the most significant digit may be only w-1 zeros away from that next - * non-zero digit. - */ -signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len); - -int bn_get_top(const BIGNUM *a); - -int bn_get_dmax(const BIGNUM *a); - -/* Set all words to zero */ -void bn_set_all_zero(BIGNUM *a); - -/* - * Copy the internal BIGNUM words into out which holds size elements (and size - * must be bigger than top) - */ -int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size); - -BN_ULONG *bn_get_words(const BIGNUM *a); - -/* - * Set the internal data words in a to point to words which contains size - * elements. The BN_FLG_STATIC_DATA flag is set - */ -void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size); - -/* - * Copy words into the BIGNUM |a|, reallocating space as necessary. - * The negative flag of |a| is not modified. - * Returns 1 on success and 0 on failure. - */ -/* - * |num_words| is int because bn_expand2 takes an int. This is an internal - * function so we simply trust callers not to pass negative values. - */ -int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); - -/* - * Some BIGNUM functions assume most significant limb to be non-zero, which - * is customarily arranged by bn_correct_top. Output from below functions - * is not processed with bn_correct_top, and for this reason it may not be - * returned out of public API. It may only be passed internally into other - * functions known to support non-minimal or zero-padded BIGNUMs. Even - * though the goal is to facilitate constant-time-ness, not each subroutine - * is constant-time by itself. They all have pre-conditions, consult source - * code... - */ -int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - BN_MONT_CTX *mont, BN_CTX *ctx); -int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_mod_add_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mod_sub_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mul_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); -int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, - const BIGNUM *d, BN_CTX *ctx); - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_srp.h b/crypto/openssl/crypto/include/internal/bn_srp.h deleted file mode 100644 index d4b282a6bbbe..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_srp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OPENSSL_NO_SRP - -extern const BIGNUM bn_group_1024; - -extern const BIGNUM bn_group_1536; - -extern const BIGNUM bn_group_2048; - -extern const BIGNUM bn_group_3072; - -extern const BIGNUM bn_group_4096; - -extern const BIGNUM bn_group_6144; - -extern const BIGNUM bn_group_8192; - -extern const BIGNUM bn_generator_19; - -extern const BIGNUM bn_generator_5; - -extern const BIGNUM bn_generator_2; - -#endif diff --git a/crypto/openssl/crypto/include/internal/chacha.h b/crypto/openssl/crypto/include/internal/chacha.h deleted file mode 100644 index 67243f222801..000000000000 --- a/crypto/openssl/crypto/include/internal/chacha.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_CHACHA_H -#define HEADER_CHACHA_H - -#include - -/* - * ChaCha20_ctr32 encrypts |len| bytes from |inp| with the given key and - * nonce and writes the result to |out|, which may be equal to |inp|. - * The |key| is not 32 bytes of verbatim key material though, but the - * said material collected into 8 32-bit elements array in host byte - * order. Same approach applies to nonce: the |counter| argument is - * pointer to concatenated nonce and counter values collected into 4 - * 32-bit elements. This, passing crypto material collected into 32-bit - * elements as opposite to passing verbatim byte vectors, is chosen for - * efficiency in multi-call scenarios. - */ -void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, - size_t len, const unsigned int key[8], - const unsigned int counter[4]); -/* - * You can notice that there is no key setup procedure. Because it's - * as trivial as collecting bytes into 32-bit elements, it's reckoned - * that below macro is sufficient. - */ -#define CHACHA_U8TOU32(p) ( \ - ((unsigned int)(p)[0]) | ((unsigned int)(p)[1]<<8) | \ - ((unsigned int)(p)[2]<<16) | ((unsigned int)(p)[3]<<24) ) - -#define CHACHA_KEY_SIZE 32 -#define CHACHA_CTR_SIZE 16 -#define CHACHA_BLK_SIZE 64 - -#endif diff --git a/crypto/openssl/crypto/include/internal/cryptlib_int.h b/crypto/openssl/crypto/include/internal/cryptlib_int.h deleted file mode 100644 index 38b5dac9a364..000000000000 --- a/crypto/openssl/crypto/include/internal/cryptlib_int.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "internal/cryptlib.h" - -/* This file is not scanned by mkdef.pl, whereas cryptlib.h is */ - -struct thread_local_inits_st { - int async; - int err_state; - int rand; -}; - -int ossl_init_thread_start(uint64_t opts); - -/* - * OPENSSL_INIT flags. The primary list of these is in crypto.h. Flags below - * are those omitted from crypto.h because they are "reserved for internal - * use". - */ -# define OPENSSL_INIT_ZLIB 0x00010000L -# define OPENSSL_INIT_BASE_ONLY 0x00040000L - -/* OPENSSL_INIT_THREAD flags */ -# define OPENSSL_INIT_THREAD_ASYNC 0x01 -# define OPENSSL_INIT_THREAD_ERR_STATE 0x02 -# define OPENSSL_INIT_THREAD_RAND 0x04 - -void ossl_malloc_setup_failures(void); diff --git a/crypto/openssl/crypto/include/internal/ctype.h b/crypto/openssl/crypto/include/internal/ctype.h deleted file mode 100644 index 9f3a58339c4f..000000000000 --- a/crypto/openssl/crypto/include/internal/ctype.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This version of ctype.h provides a standardised and platform - * independent implementation that supports seven bit ASCII characters. - * The specific intent is to not pass extended ASCII characters (> 127) - * even if the host operating system would. - * - * There is EBCDIC support included for machines which use this. However, - * there are a number of concerns about how well EBCDIC is supported - * throughout the rest of the source code. Refer to issue #4154 for - * details. - */ -#ifndef INTERNAL_CTYPE_H -# define INTERNAL_CTYPE_H - -# define CTYPE_MASK_lower 0x1 -# define CTYPE_MASK_upper 0x2 -# define CTYPE_MASK_digit 0x4 -# define CTYPE_MASK_space 0x8 -# define CTYPE_MASK_xdigit 0x10 -# define CTYPE_MASK_blank 0x20 -# define CTYPE_MASK_cntrl 0x40 -# define CTYPE_MASK_graph 0x80 -# define CTYPE_MASK_print 0x100 -# define CTYPE_MASK_punct 0x200 -# define CTYPE_MASK_base64 0x400 -# define CTYPE_MASK_asn1print 0x800 - -# define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper) -# define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit) - -/* - * The ascii mask assumes that any other classification implies that - * the character is ASCII and that there are no ASCII characters - * that aren't in any of the classifications. - * - * This assumption holds at the moment, but it might not in the future. - */ -# define CTYPE_MASK_ascii (~0) - -# ifdef CHARSET_EBCDIC -int ossl_toascii(int c); -int ossl_fromascii(int c); -# else -# define ossl_toascii(c) (c) -# define ossl_fromascii(c) (c) -# endif -int ossl_ctype_check(int c, unsigned int mask); -int ossl_tolower(int c); -int ossl_toupper(int c); - -int ascii_isdigit(const char inchar); - -# define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum)) -# define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha)) -# ifdef CHARSET_EBCDIC -# define ossl_isascii(c) (ossl_ctype_check((c), CTYPE_MASK_ascii)) -# else -# define ossl_isascii(c) (((c) & ~127) == 0) -# endif -# define ossl_isblank(c) (ossl_ctype_check((c), CTYPE_MASK_blank)) -# define ossl_iscntrl(c) (ossl_ctype_check((c), CTYPE_MASK_cntrl)) -# define ossl_isdigit(c) (ossl_ctype_check((c), CTYPE_MASK_digit)) -# define ossl_isgraph(c) (ossl_ctype_check((c), CTYPE_MASK_graph)) -# define ossl_islower(c) (ossl_ctype_check((c), CTYPE_MASK_lower)) -# define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print)) -# define ossl_ispunct(c) (ossl_ctype_check((c), CTYPE_MASK_punct)) -# define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space)) -# define ossl_isupper(c) (ossl_ctype_check((c), CTYPE_MASK_upper)) -# define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit)) -# define ossl_isbase64(c) (ossl_ctype_check((c), CTYPE_MASK_base64)) -# define ossl_isasn1print(c) (ossl_ctype_check((c), CTYPE_MASK_asn1print)) - -#endif diff --git a/crypto/openssl/crypto/include/internal/dso_conf.h.in b/crypto/openssl/crypto/include/internal/dso_conf.h.in deleted file mode 100644 index 2a76818b50d9..000000000000 --- a/crypto/openssl/crypto/include/internal/dso_conf.h.in +++ /dev/null @@ -1,31 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_DSO_CONF_H -# define HEADER_DSO_CONF_H -{- # The DSO code currently always implements all functions so that no - # applications will have to worry about that from a compilation point - # of view. However, the "method"s may return zero unless that platform - # has support compiled in for them. Currently each method is enabled - # by a define "DSO_" ... we translate the "dso_scheme" config - # string entry into using the following logic; - my $scheme = uc $target{dso_scheme}; - if (!$scheme) { - $scheme = "NONE"; - } - my @macros = ( "DSO_$scheme" ); - if ($scheme eq 'DLFCN') { - @macros = ( "DSO_DLFCN", "HAVE_DLFCN_H" ); - } elsif ($scheme eq "DLFCN_NO_H") { - @macros = ( "DSO_DLFCN" ); - } - join("\n", map { "# define $_" } @macros); -} -# define DSO_EXTENSION "{- $target{dso_extension} -}" -#endif diff --git a/crypto/openssl/crypto/include/internal/ec_int.h b/crypto/openssl/crypto/include/internal/ec_int.h deleted file mode 100644 index 182c39cc8056..000000000000 --- a/crypto/openssl/crypto/include/internal/ec_int.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal EC functions for other submodules: not for application use */ - -#ifndef HEADER_OSSL_EC_INTERNAL_H -# define HEADER_OSSL_EC_INTERNAL_H -# include - -# ifndef OPENSSL_NO_EC - -# include - -/*- - * Computes the multiplicative inverse of x in the range - * [1,EC_GROUP::order), where EC_GROUP::order is the cardinality of the - * subgroup generated by the generator G: - * - * res := x^(-1) (mod EC_GROUP::order). - * - * This function expects the following two conditions to hold: - * - the EC_GROUP order is prime, and - * - x is included in the range [1, EC_GROUP::order). - * - * This function returns 1 on success, 0 on error. - * - * If the EC_GROUP order is even, this function explicitly returns 0 as - * an error. - * In case any of the two conditions stated above is not satisfied, - * the correctness of its output is not guaranteed, even if the return - * value could still be 1 (as primality testing and a conditional modular - * reduction round on the input can be omitted by the underlying - * implementations for better SCA properties on regular input values). - */ -__owur int ec_group_do_inverse_ord(const EC_GROUP *group, BIGNUM *res, - const BIGNUM *x, BN_CTX *ctx); - -/*- - * ECDH Key Derivation Function as defined in ANSI X9.63 - */ -int ecdh_KDF_X9_63(unsigned char *out, size_t outlen, - const unsigned char *Z, size_t Zlen, - const unsigned char *sinfo, size_t sinfolen, - const EVP_MD *md); - -# endif /* OPENSSL_NO_EC */ -#endif diff --git a/crypto/openssl/crypto/include/internal/engine.h b/crypto/openssl/crypto/include/internal/engine.h deleted file mode 100644 index f80ae3ec30c9..000000000000 --- a/crypto/openssl/crypto/include/internal/engine.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -void engine_load_openssl_int(void); -void engine_load_devcrypto_int(void); -void engine_load_rdrand_int(void); -void engine_load_dynamic_int(void); -void engine_load_padlock_int(void); -void engine_load_capi_int(void); -void engine_load_dasync_int(void); -void engine_load_afalg_int(void); -void engine_cleanup_int(void); diff --git a/crypto/openssl/crypto/include/internal/err_int.h b/crypto/openssl/crypto/include/internal/err_int.h deleted file mode 100644 index 44ac94462750..000000000000 --- a/crypto/openssl/crypto/include/internal/err_int.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef INTERNAL_ERR_INT_H -# define INTERNAL_ERR_INT_H - -int err_load_crypto_strings_int(void); -void err_cleanup(void); -void err_delete_thread_state(void); -int err_shelve_state(void **); -void err_unshelve_state(void *); - -#endif diff --git a/crypto/openssl/crypto/include/internal/evp_int.h b/crypto/openssl/crypto/include/internal/evp_int.h deleted file mode 100644 index d86aed36f075..000000000000 --- a/crypto/openssl/crypto/include/internal/evp_int.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include -#include "internal/refcount.h" - -/* - * Don't free up md_ctx->pctx in EVP_MD_CTX_reset, use the reserved flag - * values in evp.h - */ -#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400 - -struct evp_pkey_ctx_st { - /* Method associated with this operation */ - const EVP_PKEY_METHOD *pmeth; - /* Engine that implements this method or NULL if builtin */ - ENGINE *engine; - /* Key: may be NULL */ - EVP_PKEY *pkey; - /* Peer key for key agreement, may be NULL */ - EVP_PKEY *peerkey; - /* Actual operation */ - int operation; - /* Algorithm specific data */ - void *data; - /* Application specific data */ - void *app_data; - /* Keygen callback */ - EVP_PKEY_gen_cb *pkey_gencb; - /* implementation specific keygen data */ - int *keygen_info; - int keygen_info_count; -} /* EVP_PKEY_CTX */ ; - -#define EVP_PKEY_FLAG_DYNAMIC 1 - -struct evp_pkey_method_st { - int pkey_id; - int flags; - int (*init) (EVP_PKEY_CTX *ctx); - int (*copy) (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src); - void (*cleanup) (EVP_PKEY_CTX *ctx); - int (*paramgen_init) (EVP_PKEY_CTX *ctx); - int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*keygen_init) (EVP_PKEY_CTX *ctx); - int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*sign_init) (EVP_PKEY_CTX *ctx); - int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_init) (EVP_PKEY_CTX *ctx); - int (*verify) (EVP_PKEY_CTX *ctx, - const unsigned char *sig, size_t siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_recover_init) (EVP_PKEY_CTX *ctx); - int (*verify_recover) (EVP_PKEY_CTX *ctx, - unsigned char *rout, size_t *routlen, - const unsigned char *sig, size_t siglen); - int (*signctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - EVP_MD_CTX *mctx); - int (*verifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, - EVP_MD_CTX *mctx); - int (*encrypt_init) (EVP_PKEY_CTX *ctx); - int (*encrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*decrypt_init) (EVP_PKEY_CTX *ctx); - int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*derive_init) (EVP_PKEY_CTX *ctx); - int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); - int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2); - int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value); - int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, - size_t siglen, const unsigned char *tbs, - size_t tbslen); - int (*check) (EVP_PKEY *pkey); - int (*public_check) (EVP_PKEY *pkey); - int (*param_check) (EVP_PKEY *pkey); - - int (*digest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); -} /* EVP_PKEY_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_METHOD) - -void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx); - -extern const EVP_PKEY_METHOD cmac_pkey_meth; -extern const EVP_PKEY_METHOD dh_pkey_meth; -extern const EVP_PKEY_METHOD dhx_pkey_meth; -extern const EVP_PKEY_METHOD dsa_pkey_meth; -extern const EVP_PKEY_METHOD ec_pkey_meth; -extern const EVP_PKEY_METHOD sm2_pkey_meth; -extern const EVP_PKEY_METHOD ecx25519_pkey_meth; -extern const EVP_PKEY_METHOD ecx448_pkey_meth; -extern const EVP_PKEY_METHOD ed25519_pkey_meth; -extern const EVP_PKEY_METHOD ed448_pkey_meth; -extern const EVP_PKEY_METHOD hmac_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pss_pkey_meth; -extern const EVP_PKEY_METHOD scrypt_pkey_meth; -extern const EVP_PKEY_METHOD tls1_prf_pkey_meth; -extern const EVP_PKEY_METHOD hkdf_pkey_meth; -extern const EVP_PKEY_METHOD poly1305_pkey_meth; -extern const EVP_PKEY_METHOD siphash_pkey_meth; - -struct evp_md_st { - int type; - int pkey_type; - int md_size; - unsigned long flags; - int (*init) (EVP_MD_CTX *ctx); - int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); - int (*final) (EVP_MD_CTX *ctx, unsigned char *md); - int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from); - int (*cleanup) (EVP_MD_CTX *ctx); - int block_size; - int ctx_size; /* how big does the ctx->md_data need to be */ - /* control function */ - int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2); -} /* EVP_MD */ ; - -struct evp_cipher_st { - int nid; - int block_size; - /* Default value for variable length ciphers */ - int key_len; - int iv_len; - /* Various flags */ - unsigned long flags; - /* init key */ - int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc); - /* encrypt/decrypt data */ - int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, size_t inl); - /* cleanup ctx */ - int (*cleanup) (EVP_CIPHER_CTX *); - /* how big ctx->cipher_data needs to be */ - int ctx_size; - /* Populate a ASN1_TYPE with parameters */ - int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Get parameters from a ASN1_TYPE */ - int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Miscellaneous operations */ - int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); - /* Application data */ - void *app_data; -} /* EVP_CIPHER */ ; - -/* Macros to code block cipher wrappers */ - -/* Wrapper functions for each cipher mode */ - -#define EVP_C_DATA(kstruct, ctx) \ - ((kstruct *)EVP_CIPHER_CTX_get_cipher_data(ctx)) - -#define BLOCK_CIPHER_ecb_loop() \ *** 1395 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 05:08:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ECD97531C72; Wed, 17 Feb 2021 05:08: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 4DgQpy6Kvqz4m0W; Wed, 17 Feb 2021 05:08: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 CC1BD1EB3F; Wed, 17 Feb 2021 05:08: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 11H58gRj034484; Wed, 17 Feb 2021 05:08:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H58gNd034483; Wed, 17 Feb 2021 05:08:42 GMT (envelope-from git) Date: Wed, 17 Feb 2021 05:08:42 GMT Message-Id: <202102170508.11H58gNd034483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: e3a8c0df593b - stable/12 - OpenSSL: Merge OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e3a8c0df593b912283303c3be1d5fa81972ee508 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 05:08:43 -0000 The branch stable/12 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=e3a8c0df593b912283303c3be1d5fa81972ee508 commit e3a8c0df593b912283303c3be1d5fa81972ee508 Merge: 42f7f5c5d22c 4f55bd5321b7 Author: Jung-uk Kim AuthorDate: 2021-02-17 04:38:21 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 04:38:21 +0000 OpenSSL: Merge OpenSSL 1.1.1j Merge commit '4f55bd5321b72491d4eff396e4928e9ab0706735' into stable/12 crypto/openssl/AUTHORS | 7 + crypto/openssl/CHANGES | 37 ++ crypto/openssl/CONTRIBUTING | 4 +- crypto/openssl/Configure | 29 +- crypto/openssl/INSTALL | 15 +- crypto/openssl/NEWS | 10 + crypto/openssl/README | 2 +- crypto/openssl/apps/ca.c | 53 +-- crypto/openssl/apps/progs.pl | 0 crypto/openssl/crypto/armcap.c | 19 +- crypto/openssl/crypto/asn1/charmap.h | 2 +- crypto/openssl/crypto/asn1/charmap.pl | 0 crypto/openssl/crypto/bf/asm/bf-586.pl | 0 crypto/openssl/crypto/bn/asm/bn-586.pl | 0 crypto/openssl/crypto/bn/asm/co-586.pl | 0 crypto/openssl/crypto/bn/asm/ppc.pl | 0 crypto/openssl/crypto/bn/bn_prime.h | 2 +- crypto/openssl/crypto/bn/bn_prime.pl | 0 crypto/openssl/crypto/cast/asm/cast-586.pl | 0 crypto/openssl/crypto/conf/conf_def.c | 16 +- crypto/openssl/crypto/conf/conf_def.h | 2 +- crypto/openssl/crypto/conf/keysets.pl | 0 crypto/openssl/crypto/des/asm/crypt586.pl | 0 crypto/openssl/crypto/des/asm/des-586.pl | 0 crypto/openssl/crypto/des/asm/desboth.pl | 0 crypto/openssl/crypto/dh/dh_key.c | 33 +- crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/evp/evp_enc.c | 27 ++ crypto/openssl/crypto/evp/evp_err.c | 4 +- .../include/internal/__DECC_INCLUDE_EPILOGUE.H | 16 - .../include/internal/__DECC_INCLUDE_PROLOGUE.H | 20 - crypto/openssl/crypto/include/internal/aria.h | 50 --- crypto/openssl/crypto/include/internal/asn1_int.h | 113 ------ crypto/openssl/crypto/include/internal/async.h | 15 - .../openssl/crypto/include/internal/bn_conf.h.in | 27 -- crypto/openssl/crypto/include/internal/bn_dh.h | 24 -- crypto/openssl/crypto/include/internal/bn_int.h | 90 ----- crypto/openssl/crypto/include/internal/bn_srp.h | 32 -- crypto/openssl/crypto/include/internal/chacha.h | 42 -- .../openssl/crypto/include/internal/cryptlib_int.h | 35 -- crypto/openssl/crypto/include/internal/ctype.h | 82 ---- .../openssl/crypto/include/internal/dso_conf.h.in | 31 -- crypto/openssl/crypto/include/internal/ec_int.h | 53 --- crypto/openssl/crypto/include/internal/engine.h | 20 - crypto/openssl/crypto/include/internal/err_int.h | 19 - crypto/openssl/crypto/include/internal/evp_int.h | 442 --------------------- crypto/openssl/crypto/include/internal/lhash.h | 15 - .../openssl/crypto/include/internal/md32_common.h | 256 ------------ crypto/openssl/crypto/include/internal/objects.h | 12 - crypto/openssl/crypto/include/internal/poly1305.h | 21 - crypto/openssl/crypto/include/internal/rand_int.h | 134 ------- crypto/openssl/crypto/include/internal/sha.h | 19 - crypto/openssl/crypto/include/internal/siphash.h | 25 -- crypto/openssl/crypto/include/internal/sm2.h | 78 ---- crypto/openssl/crypto/include/internal/sm2err.h | 65 --- crypto/openssl/crypto/include/internal/sm3.h | 39 -- crypto/openssl/crypto/include/internal/sm4.h | 37 -- crypto/openssl/crypto/include/internal/store.h | 10 - crypto/openssl/crypto/include/internal/store_int.h | 26 -- crypto/openssl/crypto/include/internal/x509_int.h | 286 ------------- crypto/openssl/crypto/md5/asm/md5-586.pl | 0 crypto/openssl/crypto/mem_sec.c | 8 +- crypto/openssl/crypto/objects/obj_dat.h | 2 +- crypto/openssl/crypto/objects/obj_dat.pl | 0 crypto/openssl/crypto/objects/obj_xref.h | 2 +- crypto/openssl/crypto/objects/objects.pl | 0 crypto/openssl/crypto/perlasm/cbc.pl | 0 crypto/openssl/crypto/perlasm/x86asm.pl | 0 crypto/openssl/crypto/perlasm/x86nasm.pl | 0 .../openssl/crypto/poly1305/asm/poly1305-armv4.pl | 13 +- crypto/openssl/crypto/ppccap.c | 20 +- crypto/openssl/crypto/rc4/asm/rc4-586.pl | 0 crypto/openssl/crypto/rc5/asm/rc5-586.pl | 0 crypto/openssl/crypto/ripemd/asm/rmd-586.pl | 0 crypto/openssl/crypto/rsa/rsa_ssl.c | 10 +- crypto/openssl/crypto/sha/asm/sha1-586.pl | 0 crypto/openssl/crypto/sha/asm/sha1-ia64.pl | 0 crypto/openssl/crypto/srp/srp_lib.c | 13 +- crypto/openssl/crypto/x509/x509_cmp.c | 24 +- crypto/openssl/crypto/x509/x509_vfy.c | 15 +- crypto/openssl/crypto/x509/x_all.c | 4 +- crypto/openssl/crypto/x509/x_attrib.c | 5 +- crypto/openssl/crypto/x509v3/v3_purp.c | 14 +- crypto/openssl/crypto/x86_64cpuid.pl | 0 crypto/openssl/crypto/x86cpuid.pl | 0 crypto/openssl/doc/man1/ca.pod | 4 +- crypto/openssl/doc/man1/cms.pod | 4 +- crypto/openssl/doc/man1/crl2pkcs7.pod | 4 +- crypto/openssl/doc/man1/dgst.pod | 4 +- crypto/openssl/doc/man1/dsa.pod | 6 +- crypto/openssl/doc/man1/ec.pod | 6 +- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/genpkey.pod | 4 +- crypto/openssl/doc/man1/genrsa.pod | 4 +- crypto/openssl/doc/man1/pkcs12.pod | 14 +- crypto/openssl/doc/man1/pkcs8.pod | 6 +- crypto/openssl/doc/man1/pkey.pod | 6 +- crypto/openssl/doc/man1/pkeyutl.pod | 4 +- crypto/openssl/doc/man1/req.pod | 6 +- crypto/openssl/doc/man1/rsa.pod | 6 +- crypto/openssl/doc/man1/s_client.pod | 4 +- crypto/openssl/doc/man1/s_server.pod | 4 +- crypto/openssl/doc/man1/smime.pod | 4 +- crypto/openssl/doc/man1/spkac.pod | 4 +- crypto/openssl/doc/man1/storeutl.pod | 4 +- crypto/openssl/doc/man1/ts.pod | 4 +- crypto/openssl/doc/man1/x509.pod | 4 +- crypto/openssl/doc/man3/DH_generate_key.pod | 27 +- crypto/openssl/doc/man3/OCSP_sendreq_new.pod | 28 +- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 2 +- .../openssl/doc/man3/X509_get_extension_flags.pod | 11 +- crypto/openssl/include/openssl/evperr.h | 7 +- crypto/openssl/include/openssl/obj_mac.h | 2 +- crypto/openssl/include/openssl/opensslv.h | 6 +- crypto/openssl/include/openssl/x509v3.h | 7 +- crypto/openssl/ssl/d1_lib.c | 11 +- crypto/openssl/ssl/record/rec_layer_d1.c | 5 +- crypto/openssl/ssl/ssl_local.h | 3 +- crypto/openssl/ssl/statem/extensions.c | 5 +- crypto/openssl/ssl/statem/statem_clnt.c | 3 +- crypto/openssl/ssl/statem/statem_lib.c | 15 +- 121 files changed, 434 insertions(+), 2337 deletions(-) diff --cc crypto/openssl/README index 6325127b5693,000000000000..da5629f92c81 mode 100644,000000..100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@@ -1,93 -1,0 +1,93 @@@ + - OpenSSL 1.1.1i 8 Dec 2020 ++ OpenSSL 1.1.1j 16 Feb 2021 + + Copyright (c) 1998-2020 The OpenSSL Project + Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson + All rights reserved. + + DESCRIPTION + ----------- + + The OpenSSL Project is a collaborative effort to develop a robust, + commercial-grade, fully featured, and Open Source toolkit implementing the + Transport Layer Security (TLS) protocols (including SSLv3) as well as a + full-strength general purpose cryptographic library. + + OpenSSL is descended from the SSLeay library developed by Eric A. Young + and Tim J. Hudson. The OpenSSL toolkit is licensed under a dual-license (the + OpenSSL license plus the SSLeay license), which means that you are free to + get and use it for commercial and non-commercial purposes as long as you + fulfill the conditions of both licenses. + + OVERVIEW + -------- + + The OpenSSL toolkit includes: + + libssl (with platform specific naming): + Provides the client and server-side implementations for SSLv3 and TLS. + + libcrypto (with platform specific naming): + Provides general cryptographic and X.509 support needed by SSL/TLS but + not logically part of it. + + openssl: + A command line tool that can be used for: + Creation of key parameters + Creation of X.509 certificates, CSRs and CRLs + Calculation of message digests + Encryption and decryption + SSL/TLS client and server tests + Handling of S/MIME signed or encrypted mail + And more... + + INSTALLATION + ------------ + + See the appropriate file: + INSTALL Linux, Unix, Windows, OpenVMS, ... + NOTES.* INSTALL addendums for different platforms + + SUPPORT + ------- + + See the OpenSSL website www.openssl.org for details on how to obtain + commercial technical support. Free community support is available through the + openssl-users email list (see + https://www.openssl.org/community/mailinglists.html for further details). + + If you have any problems with OpenSSL then please take the following steps + first: + + - Download the latest version from the repository + to see if the problem has already been addressed + - Configure with no-asm + - Remove compiler optimization flags + + If you wish to report a bug then please include the following information + and create an issue on GitHub: + + - OpenSSL version: output of 'openssl version -a' + - Configuration data: output of 'perl configdata.pm --dump' + - OS Name, Version, Hardware platform + - Compiler Details (name, version) + - Application Details (name, version) + - Problem Description (steps that will reproduce the problem, if known) + - Stack Traceback (if the application dumps core) + + Just because something doesn't work the way you expect does not mean it + is necessarily a bug in OpenSSL. Use the openssl-users email list for this type + of query. + + HOW TO CONTRIBUTE TO OpenSSL + ---------------------------- + + See CONTRIBUTING + + LEGALITIES + ---------- + + A number of nations restrict the use or export of cryptography. If you + are potentially subject to such restrictions you should seek competent + professional legal advice before attempting to develop or distribute + cryptographic code. diff --cc crypto/openssl/apps/ca.c index 6c9b1e57bc67,390ac37493c8..390ac37493c8 mode 100644,100755..100644 --- a/crypto/openssl/apps/ca.c +++ b/crypto/openssl/apps/ca.c diff --cc crypto/openssl/apps/progs.pl index 57671405dda0,57671405dda0..57671405dda0 mode 100644,100644..100755 --- a/crypto/openssl/apps/progs.pl +++ b/crypto/openssl/apps/progs.pl diff --cc crypto/openssl/crypto/asn1/charmap.pl index dadd8df7749d,dadd8df7749d..dadd8df7749d mode 100644,100644..100755 --- a/crypto/openssl/crypto/asn1/charmap.pl +++ b/crypto/openssl/crypto/asn1/charmap.pl diff --cc crypto/openssl/crypto/bf/asm/bf-586.pl index cddc17bddafa,cddc17bddafa..cddc17bddafa mode 100644,100644..100755 --- a/crypto/openssl/crypto/bf/asm/bf-586.pl +++ b/crypto/openssl/crypto/bf/asm/bf-586.pl diff --cc crypto/openssl/crypto/bn/asm/bn-586.pl index e0422405d5f3,e0422405d5f3..e0422405d5f3 mode 100644,100644..100755 --- a/crypto/openssl/crypto/bn/asm/bn-586.pl +++ b/crypto/openssl/crypto/bn/asm/bn-586.pl diff --cc crypto/openssl/crypto/bn/asm/co-586.pl index 3c34fa885c30,3c34fa885c30..3c34fa885c30 mode 100644,100644..100755 --- a/crypto/openssl/crypto/bn/asm/co-586.pl +++ b/crypto/openssl/crypto/bn/asm/co-586.pl diff --cc crypto/openssl/crypto/bn/asm/ppc.pl index a8d3f14e9b8e,a8d3f14e9b8e..a8d3f14e9b8e mode 100644,100644..100755 --- a/crypto/openssl/crypto/bn/asm/ppc.pl +++ b/crypto/openssl/crypto/bn/asm/ppc.pl diff --cc crypto/openssl/crypto/bn/bn_prime.pl index b0b16087429b,b0b16087429b..b0b16087429b mode 100644,100644..100755 --- a/crypto/openssl/crypto/bn/bn_prime.pl +++ b/crypto/openssl/crypto/bn/bn_prime.pl diff --cc crypto/openssl/crypto/cast/asm/cast-586.pl index 04710819380a,04710819380a..04710819380a mode 100644,100644..100755 --- a/crypto/openssl/crypto/cast/asm/cast-586.pl +++ b/crypto/openssl/crypto/cast/asm/cast-586.pl diff --cc crypto/openssl/crypto/conf/keysets.pl index 27a7214cc519,27a7214cc519..27a7214cc519 mode 100644,100644..100755 --- a/crypto/openssl/crypto/conf/keysets.pl +++ b/crypto/openssl/crypto/conf/keysets.pl diff --cc crypto/openssl/crypto/des/asm/crypt586.pl index d14b9f89b6b6,d14b9f89b6b6..d14b9f89b6b6 mode 100644,100644..100755 --- a/crypto/openssl/crypto/des/asm/crypt586.pl +++ b/crypto/openssl/crypto/des/asm/crypt586.pl diff --cc crypto/openssl/crypto/des/asm/des-586.pl index 07d9d87ac735,07d9d87ac735..07d9d87ac735 mode 100644,100644..100755 --- a/crypto/openssl/crypto/des/asm/des-586.pl +++ b/crypto/openssl/crypto/des/asm/des-586.pl diff --cc crypto/openssl/crypto/des/asm/desboth.pl index ef7054e27506,ef7054e27506..ef7054e27506 mode 100644,100644..100755 --- a/crypto/openssl/crypto/des/asm/desboth.pl +++ b/crypto/openssl/crypto/des/asm/desboth.pl diff --cc crypto/openssl/crypto/md5/asm/md5-586.pl index 7986a2413da2,7986a2413da2..7986a2413da2 mode 100644,100644..100755 --- a/crypto/openssl/crypto/md5/asm/md5-586.pl +++ b/crypto/openssl/crypto/md5/asm/md5-586.pl diff --cc crypto/openssl/crypto/objects/obj_dat.pl index e5d38147eccf,e5d38147eccf..e5d38147eccf mode 100644,100644..100755 --- a/crypto/openssl/crypto/objects/obj_dat.pl +++ b/crypto/openssl/crypto/objects/obj_dat.pl diff --cc crypto/openssl/crypto/objects/objects.pl index d7d1962c9999,d7d1962c9999..d7d1962c9999 mode 100644,100644..100755 --- a/crypto/openssl/crypto/objects/objects.pl +++ b/crypto/openssl/crypto/objects/objects.pl diff --cc crypto/openssl/crypto/perlasm/cbc.pl index 01bafe457d68,01bafe457d68..01bafe457d68 mode 100644,100644..100755 --- a/crypto/openssl/crypto/perlasm/cbc.pl +++ b/crypto/openssl/crypto/perlasm/cbc.pl diff --cc crypto/openssl/crypto/perlasm/x86asm.pl index 29dc1a2cfbc9,29dc1a2cfbc9..29dc1a2cfbc9 mode 100644,100644..100755 --- a/crypto/openssl/crypto/perlasm/x86asm.pl +++ b/crypto/openssl/crypto/perlasm/x86asm.pl diff --cc crypto/openssl/crypto/perlasm/x86nasm.pl index 4e64dad92d12,4e64dad92d12..4e64dad92d12 mode 100644,100644..100755 --- a/crypto/openssl/crypto/perlasm/x86nasm.pl +++ b/crypto/openssl/crypto/perlasm/x86nasm.pl diff --cc crypto/openssl/crypto/rc4/asm/rc4-586.pl index 3a936de1f9a7,3a936de1f9a7..3a936de1f9a7 mode 100644,100644..100755 --- a/crypto/openssl/crypto/rc4/asm/rc4-586.pl +++ b/crypto/openssl/crypto/rc4/asm/rc4-586.pl diff --cc crypto/openssl/crypto/rc5/asm/rc5-586.pl index af11be816259,af11be816259..af11be816259 mode 100644,100644..100755 --- a/crypto/openssl/crypto/rc5/asm/rc5-586.pl +++ b/crypto/openssl/crypto/rc5/asm/rc5-586.pl diff --cc crypto/openssl/crypto/ripemd/asm/rmd-586.pl index e8d02812ba5e,e8d02812ba5e..e8d02812ba5e mode 100644,100644..100755 --- a/crypto/openssl/crypto/ripemd/asm/rmd-586.pl +++ b/crypto/openssl/crypto/ripemd/asm/rmd-586.pl diff --cc crypto/openssl/crypto/sha/asm/sha1-586.pl index b72869b86d4a,b72869b86d4a..b72869b86d4a mode 100644,100644..100755 --- a/crypto/openssl/crypto/sha/asm/sha1-586.pl +++ b/crypto/openssl/crypto/sha/asm/sha1-586.pl diff --cc crypto/openssl/crypto/sha/asm/sha1-ia64.pl index bf1d2ebeb0ab,bf1d2ebeb0ab..bf1d2ebeb0ab mode 100644,100644..100755 --- a/crypto/openssl/crypto/sha/asm/sha1-ia64.pl +++ b/crypto/openssl/crypto/sha/asm/sha1-ia64.pl diff --cc crypto/openssl/crypto/x86_64cpuid.pl index d9536d65768f,d9536d65768f..d9536d65768f mode 100644,100644..100755 --- a/crypto/openssl/crypto/x86_64cpuid.pl +++ b/crypto/openssl/crypto/x86_64cpuid.pl diff --cc crypto/openssl/crypto/x86cpuid.pl index ba4fd80fb32e,ba4fd80fb32e..ba4fd80fb32e mode 100644,100644..100755 --- a/crypto/openssl/crypto/x86cpuid.pl +++ b/crypto/openssl/crypto/x86cpuid.pl diff --cc crypto/openssl/include/openssl/opensslv.h index a2b142388c8a,000000000000..c5f92dac8f8d mode 100644,000000..100644 --- a/crypto/openssl/include/openssl/opensslv.h +++ b/crypto/openssl/include/openssl/opensslv.h @@@ -1,101 -1,0 +1,101 @@@ +/* + * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_OPENSSLV_H +# define HEADER_OPENSSLV_H + +#ifdef __cplusplus +extern "C" { +#endif + +/*- + * Numeric release version identifier: + * MNNFFPPS: major minor fix patch status + * The status nibble has one of the values 0 for development, 1 to e for betas + * 1 to 14, and f for release. The patch level is exactly that. + * For example: + * 0.9.3-dev 0x00903000 + * 0.9.3-beta1 0x00903001 + * 0.9.3-beta2-dev 0x00903002 + * 0.9.3-beta2 0x00903002 (same as ...beta2-dev) + * 0.9.3 0x0090300f + * 0.9.3a 0x0090301f + * 0.9.4 0x0090400f + * 1.2.3z 0x102031af + * + * For continuity reasons (because 0.9.5 is already out, and is coded + * 0x00905100), between 0.9.5 and 0.9.6 the coding of the patch level + * part is slightly different, by setting the highest bit. This means + * that 0.9.5a looks like this: 0x0090581f. At 0.9.6, we can start + * with 0x0090600S... + * + * (Prior to 0.9.3-dev a different scheme was used: 0.9.2b is 0x0922.) + * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for + * major minor fix final patch/beta) + */ - # define OPENSSL_VERSION_NUMBER 0x1010109fL - # define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1i-freebsd 8 Dec 2020" ++# define OPENSSL_VERSION_NUMBER 0x101010afL ++# define OPENSSL_VERSION_TEXT "OpenSSL 1.1.1j-freebsd 16 Feb 2021" + +/*- + * The macros below are to be used for shared library (.so, .dll, ...) + * versioning. That kind of versioning works a bit differently between + * operating systems. The most usual scheme is to set a major and a minor + * number, and have the runtime loader check that the major number is equal + * to what it was at application link time, while the minor number has to + * be greater or equal to what it was at application link time. With this + * scheme, the version number is usually part of the file name, like this: + * + * libcrypto.so.0.9 + * + * Some unixen also make a softlink with the major version number only: + * + * libcrypto.so.0 + * + * On Tru64 and IRIX 6.x it works a little bit differently. There, the + * shared library version is stored in the file, and is actually a series + * of versions, separated by colons. The rightmost version present in the + * library when linking an application is stored in the application to be + * matched at run time. When the application is run, a check is done to + * see if the library version stored in the application matches any of the + * versions in the version string of the library itself. + * This version string can be constructed in any way, depending on what + * kind of matching is desired. However, to implement the same scheme as + * the one used in the other unixen, all compatible versions, from lowest + * to highest, should be part of the string. Consecutive builds would + * give the following versions strings: + * + * 3.0 + * 3.0:3.1 + * 3.0:3.1:3.2 + * 4.0 + * 4.0:4.1 + * + * Notice how version 4 is completely incompatible with version, and + * therefore give the breach you can see. + * + * There may be other schemes as well that I haven't yet discovered. + * + * So, here's the way it works here: first of all, the library version + * number doesn't need at all to match the overall OpenSSL version. + * However, it's nice and more understandable if it actually does. + * The current library version is stored in the macro SHLIB_VERSION_NUMBER, + * which is just a piece of text in the format "M.m.e" (Major, minor, edit). + * For the sake of Tru64, IRIX, and any other OS that behaves in similar ways, + * we need to keep a history of version numbers, which is done in the + * macro SHLIB_VERSION_HISTORY. The numbers are separated by colons and + * should only keep the versions that are binary compatible with the current. + */ +# define SHLIB_VERSION_HISTORY "" - # define SHLIB_VERSION_NUMBER "111" ++# define SHLIB_VERSION_NUMBER "1.1" + + +#ifdef __cplusplus +} +#endif +#endif /* HEADER_OPENSSLV_H */ From owner-dev-commits-src-all@freebsd.org Wed Feb 17 05:08:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 95E36532073; Wed, 17 Feb 2021 05:08: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 4DgQq03kxhz4lgL; Wed, 17 Feb 2021 05:08: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 738161EF44; Wed, 17 Feb 2021 05:08: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 11H58ibK034503; Wed, 17 Feb 2021 05:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H58hkp034502; Wed, 17 Feb 2021 05:08:43 GMT (envelope-from git) Date: Wed, 17 Feb 2021 05:08:43 GMT Message-Id: <202102170508.11H58hkp034502@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: bc702228ee23 - stable/12 - OpenSSL: Regen assembly files and manual pages for OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: bc702228ee23e93eea1b0651436a54586e33275a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 05:08:44 -0000 The branch stable/12 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=bc702228ee23e93eea1b0651436a54586e33275a commit bc702228ee23e93eea1b0651436a54586e33275a Author: Jung-uk Kim AuthorDate: 2021-02-17 05:07:24 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 05:07:24 +0000 OpenSSL: Regen assembly files and manual pages for OpenSSL 1.1.1j --- secure/lib/libcrypto/Makefile.inc | 4 +-- secure/lib/libcrypto/arm/poly1305-armv4.S | 11 +++++--- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 4 +-- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 4 +-- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 4 +-- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 4 +-- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 4 +-- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 4 +-- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 4 +-- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 4 +-- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_connect.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 4 +-- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_new.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_printf.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_push.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_read.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 4 +-- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_add.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_add_word.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_cmp.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_copy.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 4 +-- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 4 +-- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_new.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_rand.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_swap.3 | 4 +-- secure/lib/libcrypto/man/man3/BN_zero.3 | 4 +-- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 4 +-- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_compress.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_final.3 | 4 +-- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 4 +-- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 4 +-- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_sign.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_verify.3 | 4 +-- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 4 +-- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 4 +-- .../libcrypto/man/man3/CONF_modules_load_file.3 | 4 +-- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 4 +-- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 4 +-- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 4 +-- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 4 +-- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 4 +-- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 4 +-- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 4 +-- secure/lib/libcrypto/man/man3/DES_random_key.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 29 ++++++++++++++++------ .../libcrypto/man/man3/DH_generate_parameters.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_set_method.3 | 4 +-- secure/lib/libcrypto/man/man3/DH_size.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 4 +-- .../libcrypto/man/man3/DSA_generate_parameters.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_new.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_sign.3 | 4 +-- secure/lib/libcrypto/man/man3/DSA_size.3 | 4 +-- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 4 +-- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 4 +-- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 4 +-- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 4 +-- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 4 +-- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 4 +-- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 4 +-- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 4 +-- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 4 +-- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 4 +-- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 4 +-- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 4 +-- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 4 +-- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 4 +-- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 4 +-- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 4 +-- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 4 +-- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 4 +-- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 4 +-- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 4 +-- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 4 +-- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 4 +-- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 4 +-- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_aes.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_aria.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_des.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_md2.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_md4.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_md5.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 4 +-- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 4 +-- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 4 +-- secure/lib/libcrypto/man/man3/HMAC.3 | 4 +-- secure/lib/libcrypto/man/man3/MD5.3 | 4 +-- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 4 +-- secure/lib/libcrypto/man/man3/Makefile | 2 ++ secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 4 +-- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 4 +-- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 4 +-- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 4 +-- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 4 +-- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 4 +-- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 24 ++++++++++++++---- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 4 +-- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 4 +-- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 4 +-- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 4 +-- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 4 +-- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 4 +-- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 4 +-- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 4 +-- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 4 +-- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 4 +-- .../man/man3/OPENSSL_load_builtin_modules.3 | 4 +-- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 6 ++--- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 4 +-- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 4 +-- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 4 +-- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 4 +-- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 4 +-- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 4 +-- .../man/man3/OpenSSL_add_all_algorithms.3 | 4 +-- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 4 +-- secure/lib/libcrypto/man/man3/PEM_read.3 | 4 +-- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 4 +-- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 4 +-- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 4 +-- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 4 +-- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 4 +-- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 4 +-- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 4 +-- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 4 +-- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 4 +-- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_add.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_egd.3 | 4 +-- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 4 +-- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 4 +-- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 4 +-- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_new.3 | 4 +-- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_print.3 | 4 +-- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_sign.3 | 4 +-- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 4 +-- secure/lib/libcrypto/man/man3/RSA_size.3 | 4 +-- secure/lib/libcrypto/man/man3/SCT_new.3 | 4 +-- secure/lib/libcrypto/man/man3/SCT_print.3 | 4 +-- secure/lib/libcrypto/man/man3/SCT_validate.3 | 4 +-- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 4 +-- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 4 +-- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 4 +-- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 4 +-- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 4 +-- .../man/man3/SSL_COMP_add_compression_method.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 4 +-- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 4 +-- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 4 +-- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 4 +-- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 4 +-- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 4 +-- .../man/man3/SSL_CTX_load_verify_locations.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 4 +-- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 4 +-- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 4 +-- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 4 +-- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 4 +-- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 4 +-- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 4 +-- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 4 +-- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 4 +-- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 4 +-- .../man/man3/SSL_CTX_set_generate_session_id.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 4 +-- .../man/man3/SSL_CTX_set_keylog_callback.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 4 +-- .../man/man3/SSL_CTX_set_min_proto_version.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 4 +-- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 4 +-- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 4 +-- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 4 +-- .../man/man3/SSL_CTX_set_security_level.3 | 4 +-- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 4 +-- .../man/man3/SSL_CTX_set_session_id_context.3 | 4 +-- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 4 +-- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 4 +-- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 4 +-- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 4 +-- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 4 +-- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 4 +-- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 4 +-- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 4 +-- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 4 +-- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 4 +-- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 4 +-- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 4 +-- .../man/man3/SSL_SESSION_get0_id_context.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 4 +-- .../man/man3/SSL_SESSION_get_compress_id.3 | 4 +-- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 4 +-- .../man/man3/SSL_SESSION_get_protocol_version.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 4 +-- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 4 +-- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_accept.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_clear.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_connect.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 4 +-- .../man/man3/SSL_export_keying_material.3 | 4 +-- .../libcrypto/man/man3/SSL_extension_supported.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_free.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 4 +-- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 4 +-- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 4 +-- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 4 +-- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 4 +-- .../man/man3/SSL_get_peer_signature_nid.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 4 +-- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 4 +-- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_new.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_pending.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_read.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 4 +-- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_want.3 | 4 +-- secure/lib/libcrypto/man/man3/SSL_write.3 | 4 +-- secure/lib/libcrypto/man/man3/UI_STRING.3 | 4 +-- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 4 +-- secure/lib/libcrypto/man/man3/UI_create_method.3 | 4 +-- secure/lib/libcrypto/man/man3/UI_new.3 | 4 +-- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 4 +-- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 4 +-- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 4 +-- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 4 +-- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 4 +-- .../man/man3/X509_NAME_ENTRY_get_object.3 | 4 +-- .../man/man3/X509_NAME_add_entry_by_txt.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 4 +-- .../man/man3/X509_NAME_get_index_by_NID.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 4 +-- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 4 +-- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 4 +-- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 4 +-- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 4 +-- .../man/man3/X509_STORE_set_verify_cb_func.3 | 4 +-- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_check_host.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 4 +-- .../libcrypto/man/man3/X509_check_private_key.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_cmp.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_digest.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_dup.3 | 4 +-- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 4 +-- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 4 +-- .../libcrypto/man/man3/X509_get_extension_flags.3 | 14 +++++++---- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 4 +-- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 4 +-- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_get_version.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_new.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_sign.3 | 4 +-- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 4 +-- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 4 +-- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 4 +-- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 4 +-- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 4 +-- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 4 +-- secure/lib/libcrypto/man/man3/d2i_X509.3 | 4 +-- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 4 +-- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 4 +-- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 4 +-- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 4 +-- secure/lib/libcrypto/man/man5/x509v3_config.5 | 4 +-- secure/lib/libcrypto/man/man7/Ed25519.7 | 4 +-- secure/lib/libcrypto/man/man7/RAND.7 | 4 +-- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 4 +-- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 4 +-- secure/lib/libcrypto/man/man7/SM2.7 | 4 +-- secure/lib/libcrypto/man/man7/X25519.7 | 4 +-- secure/lib/libcrypto/man/man7/bio.7 | 4 +-- secure/lib/libcrypto/man/man7/ct.7 | 4 +-- secure/lib/libcrypto/man/man7/des_modes.7 | 4 +-- secure/lib/libcrypto/man/man7/evp.7 | 4 +-- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 4 +-- secure/lib/libcrypto/man/man7/ossl_store.7 | 4 +-- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 4 +-- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 4 +-- secure/lib/libcrypto/man/man7/scrypt.7 | 4 +-- secure/lib/libcrypto/man/man7/ssl.7 | 4 +-- secure/lib/libcrypto/man/man7/x509.7 | 4 +-- secure/usr.bin/openssl/Makefile.man | 4 +++ secure/usr.bin/openssl/man/CA.pl.1 | 4 +-- secure/usr.bin/openssl/man/asn1parse.1 | 4 +-- secure/usr.bin/openssl/man/ca.1 | 8 +++--- secure/usr.bin/openssl/man/ciphers.1 | 4 +-- secure/usr.bin/openssl/man/cms.1 | 8 +++--- secure/usr.bin/openssl/man/crl.1 | 4 +-- secure/usr.bin/openssl/man/crl2pkcs7.1 | 8 +++--- secure/usr.bin/openssl/man/dgst.1 | 8 +++--- secure/usr.bin/openssl/man/dhparam.1 | 4 +-- secure/usr.bin/openssl/man/dsa.1 | 10 ++++---- secure/usr.bin/openssl/man/dsaparam.1 | 4 +-- secure/usr.bin/openssl/man/ec.1 | 10 ++++---- secure/usr.bin/openssl/man/ecparam.1 | 4 +-- secure/usr.bin/openssl/man/enc.1 | 8 +++--- secure/usr.bin/openssl/man/engine.1 | 4 +-- secure/usr.bin/openssl/man/errstr.1 | 4 +-- secure/usr.bin/openssl/man/gendsa.1 | 4 +-- secure/usr.bin/openssl/man/genpkey.1 | 8 +++--- secure/usr.bin/openssl/man/genrsa.1 | 8 +++--- secure/usr.bin/openssl/man/list.1 | 4 +-- secure/usr.bin/openssl/man/nseq.1 | 4 +-- secure/usr.bin/openssl/man/ocsp.1 | 4 +-- secure/usr.bin/openssl/man/openssl.1 | 4 +-- secure/usr.bin/openssl/man/passwd.1 | 4 +-- secure/usr.bin/openssl/man/pkcs12.1 | 18 ++++++-------- secure/usr.bin/openssl/man/pkcs7.1 | 4 +-- secure/usr.bin/openssl/man/pkcs8.1 | 10 ++++---- secure/usr.bin/openssl/man/pkey.1 | 10 ++++---- secure/usr.bin/openssl/man/pkeyparam.1 | 4 +-- secure/usr.bin/openssl/man/pkeyutl.1 | 8 +++--- secure/usr.bin/openssl/man/prime.1 | 4 +-- secure/usr.bin/openssl/man/rand.1 | 4 +-- secure/usr.bin/openssl/man/req.1 | 10 ++++---- secure/usr.bin/openssl/man/rsa.1 | 10 ++++---- secure/usr.bin/openssl/man/rsautl.1 | 4 +-- secure/usr.bin/openssl/man/s_client.1 | 8 +++--- secure/usr.bin/openssl/man/s_server.1 | 8 +++--- secure/usr.bin/openssl/man/s_time.1 | 4 +-- secure/usr.bin/openssl/man/sess_id.1 | 4 +-- secure/usr.bin/openssl/man/smime.1 | 8 +++--- secure/usr.bin/openssl/man/speed.1 | 4 +-- secure/usr.bin/openssl/man/spkac.1 | 8 +++--- secure/usr.bin/openssl/man/srp.1 | 4 +-- secure/usr.bin/openssl/man/storeutl.1 | 8 +++--- secure/usr.bin/openssl/man/ts.1 | 8 +++--- secure/usr.bin/openssl/man/tsget.1 | 4 +-- secure/usr.bin/openssl/man/verify.1 | 4 +-- secure/usr.bin/openssl/man/version.1 | 4 +-- secure/usr.bin/openssl/man/x509.1 | 8 +++--- 538 files changed, 1181 insertions(+), 1143 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index 1877c95c2266..5fcbbe6cf336 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1i -OPENSSL_DATE= 2020-12-08 +OPENSSL_VER= 1.1.1j +OPENSSL_DATE= 2021-02-16 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/arm/poly1305-armv4.S b/secure/lib/libcrypto/arm/poly1305-armv4.S index c3041f6e2905..02d745f510b7 100644 --- a/secure/lib/libcrypto/arm/poly1305-armv4.S +++ b/secure/lib/libcrypto/arm/poly1305-armv4.S @@ -87,10 +87,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -292,6 +292,7 @@ poly1305_blocks: .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} .Lpoly1305_emit_enter: @@ -602,6 +603,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[r0,#36] @ is_base2_26 ands r2,r2,#-16 beq .Lno_data_neon @@ -1088,6 +1090,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[r0,#36] @ is_base2_26 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index 787f87e8f013..2720754cf9e8 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ADMISSIONS 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 4277347439b2..2daf11f19a0d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index f469ec947480..f45f3fdc98ab 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index 3e36faa9efcc..69678622d9fa 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index af133ca346e2..9b9393cc5290 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index 1976aa20db2a..ca15f898e6a8 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index 15a6dfc41f63..e4f6859c186d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index 193dd4715024..fbfcf517275f 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index fc26c41498f0..00b72c375820 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index bbcf08b8fdd4..4845c5280b6b 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index bb8ab5bebd01..ce95ffd0fc29 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index ab3b56231eba..b761db6b5b7a 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index f9bb9aea0fe9..03b06aff8fec 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 263e9f4aee6a..8916feee640f 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index 4867c770113f..0dbedbf16b9d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDR 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 4f6558313eaf..fb1d199796cb 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index 72e03a6d0908..44b80366360d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_CONNECT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index 31c70dbb37a8..6c7219251e3a 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_CTRL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index 6c2c7de56ed1..39b94d930d17 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2020-09-22" "1.1.1h" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 6105f2a83361..61cfe1eec579 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.41) +.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-02-16" "1.1.1j" "OpenSSL" *** 10428 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 05:27:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0715A532E56; Wed, 17 Feb 2021 05:27: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 4DgRDv6pTMz4nDt; Wed, 17 Feb 2021 05:27: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 DB2A81F29C; Wed, 17 Feb 2021 05:27: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 11H5RhcL060155; Wed, 17 Feb 2021 05:27:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H5Rhkr060154; Wed, 17 Feb 2021 05:27:43 GMT (envelope-from git) Date: Wed, 17 Feb 2021 05:27:43 GMT Message-Id: <202102170527.11H5Rhkr060154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 36c368d91c22 - stable/13 - OpenSSL: Remove obsolete include directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36c368d91c22e84e2e0d0b570c3af45da61c1bc6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 05:27:44 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=36c368d91c22e84e2e0d0b570c3af45da61c1bc6 commit 36c368d91c22e84e2e0d0b570c3af45da61c1bc6 Author: Jung-uk Kim AuthorDate: 2021-02-17 03:53:37 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 05:27:00 +0000 OpenSSL: Remove obsolete include directory This directory was deprecated since OpenSSL 1.1.1e. https://github.com/openssl/openssl/pull/9681 (cherry picked from commit b84081606110af6b5df764e3568c0271a5699daa) --- .../include/internal/__DECC_INCLUDE_EPILOGUE.H | 16 - .../include/internal/__DECC_INCLUDE_PROLOGUE.H | 20 - crypto/openssl/crypto/include/internal/aria.h | 50 --- crypto/openssl/crypto/include/internal/asn1_int.h | 113 ------ crypto/openssl/crypto/include/internal/async.h | 15 - .../openssl/crypto/include/internal/bn_conf.h.in | 27 -- crypto/openssl/crypto/include/internal/bn_dh.h | 24 -- crypto/openssl/crypto/include/internal/bn_int.h | 90 ----- crypto/openssl/crypto/include/internal/bn_srp.h | 32 -- crypto/openssl/crypto/include/internal/chacha.h | 42 -- .../openssl/crypto/include/internal/cryptlib_int.h | 35 -- crypto/openssl/crypto/include/internal/ctype.h | 82 ---- .../openssl/crypto/include/internal/dso_conf.h.in | 31 -- crypto/openssl/crypto/include/internal/ec_int.h | 53 --- crypto/openssl/crypto/include/internal/engine.h | 20 - crypto/openssl/crypto/include/internal/err_int.h | 19 - crypto/openssl/crypto/include/internal/evp_int.h | 442 --------------------- crypto/openssl/crypto/include/internal/lhash.h | 15 - .../openssl/crypto/include/internal/md32_common.h | 256 ------------ crypto/openssl/crypto/include/internal/objects.h | 12 - crypto/openssl/crypto/include/internal/poly1305.h | 21 - crypto/openssl/crypto/include/internal/rand_int.h | 134 ------- crypto/openssl/crypto/include/internal/sha.h | 19 - crypto/openssl/crypto/include/internal/siphash.h | 25 -- crypto/openssl/crypto/include/internal/sm2.h | 78 ---- crypto/openssl/crypto/include/internal/sm2err.h | 65 --- crypto/openssl/crypto/include/internal/sm3.h | 39 -- crypto/openssl/crypto/include/internal/sm4.h | 37 -- crypto/openssl/crypto/include/internal/store.h | 10 - crypto/openssl/crypto/include/internal/store_int.h | 26 -- crypto/openssl/crypto/include/internal/x509_int.h | 286 ------------- secure/lib/libcrypto/Makefile.inc | 1 - 32 files changed, 2135 deletions(-) diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H deleted file mode 100644 index c350018ad190..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* restore state. Must correspond to the save in __decc_include_prologue.h */ -#pragma names restore diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H deleted file mode 100644 index 9a9c777f93f8..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* save state */ -#pragma names save -/* have the compiler shorten symbols larger than 31 chars to 23 chars - * followed by a 8 hex char CRC - */ -#pragma names as_is,shortened diff --git a/crypto/openssl/crypto/include/internal/aria.h b/crypto/openssl/crypto/include/internal/aria.h deleted file mode 100644 index 355abe539805..000000000000 --- a/crypto/openssl/crypto/include/internal/aria.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - - /* Copyright (c) 2017 National Security Research Institute. All rights reserved. */ - -#ifndef HEADER_ARIA_H -# define HEADER_ARIA_H - -# include - -# ifdef OPENSSL_NO_ARIA -# error ARIA is disabled. -# endif - -# define ARIA_ENCRYPT 1 -# define ARIA_DECRYPT 0 - -# define ARIA_BLOCK_SIZE 16 /* Size of each encryption/decryption block */ -# define ARIA_MAX_KEYS 17 /* Number of keys needed in the worst case */ - -typedef union { - unsigned char c[ARIA_BLOCK_SIZE]; - unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)]; -} ARIA_u128; - -typedef unsigned char ARIA_c128[ARIA_BLOCK_SIZE]; - -struct aria_key_st { - ARIA_u128 rd_key[ARIA_MAX_KEYS]; - unsigned int rounds; -}; -typedef struct aria_key_st ARIA_KEY; - - -int aria_set_encrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); -int aria_set_decrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); - -void aria_encrypt(const unsigned char *in, unsigned char *out, - const ARIA_KEY *key); - -#endif diff --git a/crypto/openssl/crypto/include/internal/asn1_int.h b/crypto/openssl/crypto/include/internal/asn1_int.h deleted file mode 100644 index 9c9b4d897456..000000000000 --- a/crypto/openssl/crypto/include/internal/asn1_int.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal ASN1 structures and functions: not for application use */ - -/* ASN1 public key method structure */ - -struct evp_pkey_asn1_method_st { - int pkey_id; - int pkey_base_id; - unsigned long pkey_flags; - char *pem_str; - char *info; - int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub); - int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk); - int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf); - int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk); - int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*pkey_size) (const EVP_PKEY *pk); - int (*pkey_bits) (const EVP_PKEY *pk); - int (*pkey_security_bits) (const EVP_PKEY *pk); - int (*param_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder); - int (*param_missing) (const EVP_PKEY *pk); - int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from); - int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*sig_print) (BIO *out, - const X509_ALGOR *sigalg, const ASN1_STRING *sig, - int indent, ASN1_PCTX *pctx); - void (*pkey_free) (EVP_PKEY *pkey); - int (*pkey_ctrl) (EVP_PKEY *pkey, int op, long arg1, void *arg2); - /* Legacy functions for old PEM */ - int (*old_priv_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*old_priv_encode) (const EVP_PKEY *pkey, unsigned char **pder); - /* Custom ASN1 signature verification */ - int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey); - int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *alg1, X509_ALGOR *alg2, - ASN1_BIT_STRING *sig); - int (*siginf_set) (X509_SIG_INFO *siginf, const X509_ALGOR *alg, - const ASN1_STRING *sig); - /* Check */ - int (*pkey_check) (const EVP_PKEY *pk); - int (*pkey_public_check) (const EVP_PKEY *pk); - int (*pkey_param_check) (const EVP_PKEY *pk); - /* Get/set raw private/public key data */ - int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len); - int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len); - int (*get_priv_key) (const EVP_PKEY *pk, unsigned char *priv, size_t *len); - int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len); -} /* EVP_PKEY_ASN1_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD) - -extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5]; -extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD sm2_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD poly1305_asn1_meth; - -extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2]; -extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD siphash_asn1_meth; - -/* - * These are used internally in the ASN1_OBJECT to keep track of whether the - * names and data need to be free()ed - */ -# define ASN1_OBJECT_FLAG_DYNAMIC 0x01/* internal use */ -# define ASN1_OBJECT_FLAG_CRITICAL 0x02/* critical x509v3 object id */ -# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */ -# define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08/* internal use */ -struct asn1_object_st { - const char *sn, *ln; - int nid; - int length; - const unsigned char *data; /* data remains const after init */ - int flags; /* Should we free this one */ -}; - -/* ASN1 print context structure */ - -struct asn1_pctx_st { - unsigned long flags; - unsigned long nm_flags; - unsigned long cert_flags; - unsigned long oid_flags; - unsigned long str_flags; -} /* ASN1_PCTX */ ; - -int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb); diff --git a/crypto/openssl/crypto/include/internal/async.h b/crypto/openssl/crypto/include/internal/async.h deleted file mode 100644 index dc8e937b0ced..000000000000 --- a/crypto/openssl/crypto/include/internal/async.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -int async_init(void); -void async_deinit(void); -void async_delete_thread_state(void); - diff --git a/crypto/openssl/crypto/include/internal/bn_conf.h.in b/crypto/openssl/crypto/include/internal/bn_conf.h.in deleted file mode 100644 index ec6e4f6c1b5e..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_conf.h.in +++ /dev/null @@ -1,27 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_CONF_H -# define HEADER_BN_CONF_H - -/* - * The contents of this file are not used in the UEFI build, as - * both 32-bit and 64-bit builds are supported from a single run - * of the Configure script. - */ - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -{- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG -{- $config{b64} ? "#define" : "#undef" -} SIXTY_FOUR_BIT -{- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_dh.h b/crypto/openssl/crypto/include/internal/bn_dh.h deleted file mode 100644 index 70ebca28753c..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_dh.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#define declare_dh_bn(x) \ - extern const BIGNUM _bignum_dh##x##_p; \ - extern const BIGNUM _bignum_dh##x##_g; \ - extern const BIGNUM _bignum_dh##x##_q; - -declare_dh_bn(1024_160) -declare_dh_bn(2048_224) -declare_dh_bn(2048_256) - -extern const BIGNUM _bignum_ffdhe2048_p; -extern const BIGNUM _bignum_ffdhe3072_p; -extern const BIGNUM _bignum_ffdhe4096_p; -extern const BIGNUM _bignum_ffdhe6144_p; -extern const BIGNUM _bignum_ffdhe8192_p; -extern const BIGNUM _bignum_const_2; diff --git a/crypto/openssl/crypto/include/internal/bn_int.h b/crypto/openssl/crypto/include/internal/bn_int.h deleted file mode 100644 index 30be7efe14d8..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_int.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_INT_H -# define HEADER_BN_INT_H - -# include -# include - -BIGNUM *bn_wexpand(BIGNUM *a, int words); -BIGNUM *bn_expand2(BIGNUM *a, int words); - -void bn_correct_top(BIGNUM *a); - -/* - * Determine the modified width-(w+1) Non-Adjacent Form (wNAF) of 'scalar'. - * This is an array r[] of values that are either zero or odd with an - * absolute value less than 2^w satisfying scalar = \sum_j r[j]*2^j where at - * most one of any w+1 consecutive digits is non-zero with the exception that - * the most significant digit may be only w-1 zeros away from that next - * non-zero digit. - */ -signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len); - -int bn_get_top(const BIGNUM *a); - -int bn_get_dmax(const BIGNUM *a); - -/* Set all words to zero */ -void bn_set_all_zero(BIGNUM *a); - -/* - * Copy the internal BIGNUM words into out which holds size elements (and size - * must be bigger than top) - */ -int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size); - -BN_ULONG *bn_get_words(const BIGNUM *a); - -/* - * Set the internal data words in a to point to words which contains size - * elements. The BN_FLG_STATIC_DATA flag is set - */ -void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size); - -/* - * Copy words into the BIGNUM |a|, reallocating space as necessary. - * The negative flag of |a| is not modified. - * Returns 1 on success and 0 on failure. - */ -/* - * |num_words| is int because bn_expand2 takes an int. This is an internal - * function so we simply trust callers not to pass negative values. - */ -int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); - -/* - * Some BIGNUM functions assume most significant limb to be non-zero, which - * is customarily arranged by bn_correct_top. Output from below functions - * is not processed with bn_correct_top, and for this reason it may not be - * returned out of public API. It may only be passed internally into other - * functions known to support non-minimal or zero-padded BIGNUMs. Even - * though the goal is to facilitate constant-time-ness, not each subroutine - * is constant-time by itself. They all have pre-conditions, consult source - * code... - */ -int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - BN_MONT_CTX *mont, BN_CTX *ctx); -int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_mod_add_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mod_sub_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mul_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); -int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, - const BIGNUM *d, BN_CTX *ctx); - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_srp.h b/crypto/openssl/crypto/include/internal/bn_srp.h deleted file mode 100644 index d4b282a6bbbe..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_srp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OPENSSL_NO_SRP - -extern const BIGNUM bn_group_1024; - -extern const BIGNUM bn_group_1536; - -extern const BIGNUM bn_group_2048; - -extern const BIGNUM bn_group_3072; - -extern const BIGNUM bn_group_4096; - -extern const BIGNUM bn_group_6144; - -extern const BIGNUM bn_group_8192; - -extern const BIGNUM bn_generator_19; - -extern const BIGNUM bn_generator_5; - -extern const BIGNUM bn_generator_2; - -#endif diff --git a/crypto/openssl/crypto/include/internal/chacha.h b/crypto/openssl/crypto/include/internal/chacha.h deleted file mode 100644 index 67243f222801..000000000000 --- a/crypto/openssl/crypto/include/internal/chacha.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_CHACHA_H -#define HEADER_CHACHA_H - -#include - -/* - * ChaCha20_ctr32 encrypts |len| bytes from |inp| with the given key and - * nonce and writes the result to |out|, which may be equal to |inp|. - * The |key| is not 32 bytes of verbatim key material though, but the - * said material collected into 8 32-bit elements array in host byte - * order. Same approach applies to nonce: the |counter| argument is - * pointer to concatenated nonce and counter values collected into 4 - * 32-bit elements. This, passing crypto material collected into 32-bit - * elements as opposite to passing verbatim byte vectors, is chosen for - * efficiency in multi-call scenarios. - */ -void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, - size_t len, const unsigned int key[8], - const unsigned int counter[4]); -/* - * You can notice that there is no key setup procedure. Because it's - * as trivial as collecting bytes into 32-bit elements, it's reckoned - * that below macro is sufficient. - */ -#define CHACHA_U8TOU32(p) ( \ - ((unsigned int)(p)[0]) | ((unsigned int)(p)[1]<<8) | \ - ((unsigned int)(p)[2]<<16) | ((unsigned int)(p)[3]<<24) ) - -#define CHACHA_KEY_SIZE 32 -#define CHACHA_CTR_SIZE 16 -#define CHACHA_BLK_SIZE 64 - -#endif diff --git a/crypto/openssl/crypto/include/internal/cryptlib_int.h b/crypto/openssl/crypto/include/internal/cryptlib_int.h deleted file mode 100644 index 38b5dac9a364..000000000000 --- a/crypto/openssl/crypto/include/internal/cryptlib_int.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "internal/cryptlib.h" - -/* This file is not scanned by mkdef.pl, whereas cryptlib.h is */ - -struct thread_local_inits_st { - int async; - int err_state; - int rand; -}; - -int ossl_init_thread_start(uint64_t opts); - -/* - * OPENSSL_INIT flags. The primary list of these is in crypto.h. Flags below - * are those omitted from crypto.h because they are "reserved for internal - * use". - */ -# define OPENSSL_INIT_ZLIB 0x00010000L -# define OPENSSL_INIT_BASE_ONLY 0x00040000L - -/* OPENSSL_INIT_THREAD flags */ -# define OPENSSL_INIT_THREAD_ASYNC 0x01 -# define OPENSSL_INIT_THREAD_ERR_STATE 0x02 -# define OPENSSL_INIT_THREAD_RAND 0x04 - -void ossl_malloc_setup_failures(void); diff --git a/crypto/openssl/crypto/include/internal/ctype.h b/crypto/openssl/crypto/include/internal/ctype.h deleted file mode 100644 index 9f3a58339c4f..000000000000 --- a/crypto/openssl/crypto/include/internal/ctype.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This version of ctype.h provides a standardised and platform - * independent implementation that supports seven bit ASCII characters. - * The specific intent is to not pass extended ASCII characters (> 127) - * even if the host operating system would. - * - * There is EBCDIC support included for machines which use this. However, - * there are a number of concerns about how well EBCDIC is supported - * throughout the rest of the source code. Refer to issue #4154 for - * details. - */ -#ifndef INTERNAL_CTYPE_H -# define INTERNAL_CTYPE_H - -# define CTYPE_MASK_lower 0x1 -# define CTYPE_MASK_upper 0x2 -# define CTYPE_MASK_digit 0x4 -# define CTYPE_MASK_space 0x8 -# define CTYPE_MASK_xdigit 0x10 -# define CTYPE_MASK_blank 0x20 -# define CTYPE_MASK_cntrl 0x40 -# define CTYPE_MASK_graph 0x80 -# define CTYPE_MASK_print 0x100 -# define CTYPE_MASK_punct 0x200 -# define CTYPE_MASK_base64 0x400 -# define CTYPE_MASK_asn1print 0x800 - -# define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper) -# define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit) - -/* - * The ascii mask assumes that any other classification implies that - * the character is ASCII and that there are no ASCII characters - * that aren't in any of the classifications. - * - * This assumption holds at the moment, but it might not in the future. - */ -# define CTYPE_MASK_ascii (~0) - -# ifdef CHARSET_EBCDIC -int ossl_toascii(int c); -int ossl_fromascii(int c); -# else -# define ossl_toascii(c) (c) -# define ossl_fromascii(c) (c) -# endif -int ossl_ctype_check(int c, unsigned int mask); -int ossl_tolower(int c); -int ossl_toupper(int c); - -int ascii_isdigit(const char inchar); - -# define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum)) -# define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha)) -# ifdef CHARSET_EBCDIC -# define ossl_isascii(c) (ossl_ctype_check((c), CTYPE_MASK_ascii)) -# else -# define ossl_isascii(c) (((c) & ~127) == 0) -# endif -# define ossl_isblank(c) (ossl_ctype_check((c), CTYPE_MASK_blank)) -# define ossl_iscntrl(c) (ossl_ctype_check((c), CTYPE_MASK_cntrl)) -# define ossl_isdigit(c) (ossl_ctype_check((c), CTYPE_MASK_digit)) -# define ossl_isgraph(c) (ossl_ctype_check((c), CTYPE_MASK_graph)) -# define ossl_islower(c) (ossl_ctype_check((c), CTYPE_MASK_lower)) -# define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print)) -# define ossl_ispunct(c) (ossl_ctype_check((c), CTYPE_MASK_punct)) -# define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space)) -# define ossl_isupper(c) (ossl_ctype_check((c), CTYPE_MASK_upper)) -# define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit)) -# define ossl_isbase64(c) (ossl_ctype_check((c), CTYPE_MASK_base64)) -# define ossl_isasn1print(c) (ossl_ctype_check((c), CTYPE_MASK_asn1print)) - -#endif diff --git a/crypto/openssl/crypto/include/internal/dso_conf.h.in b/crypto/openssl/crypto/include/internal/dso_conf.h.in deleted file mode 100644 index 2a76818b50d9..000000000000 --- a/crypto/openssl/crypto/include/internal/dso_conf.h.in +++ /dev/null @@ -1,31 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_DSO_CONF_H -# define HEADER_DSO_CONF_H -{- # The DSO code currently always implements all functions so that no - # applications will have to worry about that from a compilation point - # of view. However, the "method"s may return zero unless that platform - # has support compiled in for them. Currently each method is enabled - # by a define "DSO_" ... we translate the "dso_scheme" config - # string entry into using the following logic; - my $scheme = uc $target{dso_scheme}; - if (!$scheme) { - $scheme = "NONE"; - } - my @macros = ( "DSO_$scheme" ); - if ($scheme eq 'DLFCN') { - @macros = ( "DSO_DLFCN", "HAVE_DLFCN_H" ); - } elsif ($scheme eq "DLFCN_NO_H") { - @macros = ( "DSO_DLFCN" ); - } - join("\n", map { "# define $_" } @macros); -} -# define DSO_EXTENSION "{- $target{dso_extension} -}" -#endif diff --git a/crypto/openssl/crypto/include/internal/ec_int.h b/crypto/openssl/crypto/include/internal/ec_int.h deleted file mode 100644 index 182c39cc8056..000000000000 --- a/crypto/openssl/crypto/include/internal/ec_int.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal EC functions for other submodules: not for application use */ - -#ifndef HEADER_OSSL_EC_INTERNAL_H -# define HEADER_OSSL_EC_INTERNAL_H -# include - -# ifndef OPENSSL_NO_EC - -# include - -/*- - * Computes the multiplicative inverse of x in the range - * [1,EC_GROUP::order), where EC_GROUP::order is the cardinality of the - * subgroup generated by the generator G: - * - * res := x^(-1) (mod EC_GROUP::order). - * - * This function expects the following two conditions to hold: - * - the EC_GROUP order is prime, and - * - x is included in the range [1, EC_GROUP::order). - * - * This function returns 1 on success, 0 on error. - * - * If the EC_GROUP order is even, this function explicitly returns 0 as - * an error. - * In case any of the two conditions stated above is not satisfied, - * the correctness of its output is not guaranteed, even if the return - * value could still be 1 (as primality testing and a conditional modular - * reduction round on the input can be omitted by the underlying - * implementations for better SCA properties on regular input values). - */ -__owur int ec_group_do_inverse_ord(const EC_GROUP *group, BIGNUM *res, - const BIGNUM *x, BN_CTX *ctx); - -/*- - * ECDH Key Derivation Function as defined in ANSI X9.63 - */ -int ecdh_KDF_X9_63(unsigned char *out, size_t outlen, - const unsigned char *Z, size_t Zlen, - const unsigned char *sinfo, size_t sinfolen, - const EVP_MD *md); - -# endif /* OPENSSL_NO_EC */ -#endif diff --git a/crypto/openssl/crypto/include/internal/engine.h b/crypto/openssl/crypto/include/internal/engine.h deleted file mode 100644 index f80ae3ec30c9..000000000000 --- a/crypto/openssl/crypto/include/internal/engine.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -void engine_load_openssl_int(void); -void engine_load_devcrypto_int(void); -void engine_load_rdrand_int(void); -void engine_load_dynamic_int(void); -void engine_load_padlock_int(void); -void engine_load_capi_int(void); -void engine_load_dasync_int(void); -void engine_load_afalg_int(void); -void engine_cleanup_int(void); diff --git a/crypto/openssl/crypto/include/internal/err_int.h b/crypto/openssl/crypto/include/internal/err_int.h deleted file mode 100644 index 44ac94462750..000000000000 --- a/crypto/openssl/crypto/include/internal/err_int.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef INTERNAL_ERR_INT_H -# define INTERNAL_ERR_INT_H - -int err_load_crypto_strings_int(void); -void err_cleanup(void); -void err_delete_thread_state(void); -int err_shelve_state(void **); -void err_unshelve_state(void *); - -#endif diff --git a/crypto/openssl/crypto/include/internal/evp_int.h b/crypto/openssl/crypto/include/internal/evp_int.h deleted file mode 100644 index d86aed36f075..000000000000 --- a/crypto/openssl/crypto/include/internal/evp_int.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include -#include "internal/refcount.h" - -/* - * Don't free up md_ctx->pctx in EVP_MD_CTX_reset, use the reserved flag - * values in evp.h - */ -#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400 - -struct evp_pkey_ctx_st { - /* Method associated with this operation */ - const EVP_PKEY_METHOD *pmeth; - /* Engine that implements this method or NULL if builtin */ - ENGINE *engine; - /* Key: may be NULL */ - EVP_PKEY *pkey; - /* Peer key for key agreement, may be NULL */ - EVP_PKEY *peerkey; - /* Actual operation */ - int operation; - /* Algorithm specific data */ - void *data; - /* Application specific data */ - void *app_data; - /* Keygen callback */ - EVP_PKEY_gen_cb *pkey_gencb; - /* implementation specific keygen data */ - int *keygen_info; - int keygen_info_count; -} /* EVP_PKEY_CTX */ ; - -#define EVP_PKEY_FLAG_DYNAMIC 1 - -struct evp_pkey_method_st { - int pkey_id; - int flags; - int (*init) (EVP_PKEY_CTX *ctx); - int (*copy) (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src); - void (*cleanup) (EVP_PKEY_CTX *ctx); - int (*paramgen_init) (EVP_PKEY_CTX *ctx); - int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*keygen_init) (EVP_PKEY_CTX *ctx); - int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*sign_init) (EVP_PKEY_CTX *ctx); - int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_init) (EVP_PKEY_CTX *ctx); - int (*verify) (EVP_PKEY_CTX *ctx, - const unsigned char *sig, size_t siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_recover_init) (EVP_PKEY_CTX *ctx); - int (*verify_recover) (EVP_PKEY_CTX *ctx, - unsigned char *rout, size_t *routlen, - const unsigned char *sig, size_t siglen); - int (*signctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - EVP_MD_CTX *mctx); - int (*verifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, - EVP_MD_CTX *mctx); - int (*encrypt_init) (EVP_PKEY_CTX *ctx); - int (*encrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*decrypt_init) (EVP_PKEY_CTX *ctx); - int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*derive_init) (EVP_PKEY_CTX *ctx); - int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); - int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2); - int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value); - int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, - size_t siglen, const unsigned char *tbs, - size_t tbslen); - int (*check) (EVP_PKEY *pkey); - int (*public_check) (EVP_PKEY *pkey); - int (*param_check) (EVP_PKEY *pkey); - - int (*digest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); -} /* EVP_PKEY_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_METHOD) - -void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx); - -extern const EVP_PKEY_METHOD cmac_pkey_meth; -extern const EVP_PKEY_METHOD dh_pkey_meth; -extern const EVP_PKEY_METHOD dhx_pkey_meth; -extern const EVP_PKEY_METHOD dsa_pkey_meth; -extern const EVP_PKEY_METHOD ec_pkey_meth; -extern const EVP_PKEY_METHOD sm2_pkey_meth; -extern const EVP_PKEY_METHOD ecx25519_pkey_meth; -extern const EVP_PKEY_METHOD ecx448_pkey_meth; -extern const EVP_PKEY_METHOD ed25519_pkey_meth; -extern const EVP_PKEY_METHOD ed448_pkey_meth; -extern const EVP_PKEY_METHOD hmac_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pss_pkey_meth; -extern const EVP_PKEY_METHOD scrypt_pkey_meth; -extern const EVP_PKEY_METHOD tls1_prf_pkey_meth; -extern const EVP_PKEY_METHOD hkdf_pkey_meth; -extern const EVP_PKEY_METHOD poly1305_pkey_meth; -extern const EVP_PKEY_METHOD siphash_pkey_meth; - -struct evp_md_st { - int type; - int pkey_type; - int md_size; - unsigned long flags; - int (*init) (EVP_MD_CTX *ctx); - int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); - int (*final) (EVP_MD_CTX *ctx, unsigned char *md); - int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from); - int (*cleanup) (EVP_MD_CTX *ctx); - int block_size; - int ctx_size; /* how big does the ctx->md_data need to be */ - /* control function */ - int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2); -} /* EVP_MD */ ; - -struct evp_cipher_st { - int nid; - int block_size; - /* Default value for variable length ciphers */ - int key_len; - int iv_len; - /* Various flags */ - unsigned long flags; - /* init key */ - int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc); - /* encrypt/decrypt data */ - int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, size_t inl); - /* cleanup ctx */ - int (*cleanup) (EVP_CIPHER_CTX *); - /* how big ctx->cipher_data needs to be */ - int ctx_size; - /* Populate a ASN1_TYPE with parameters */ - int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Get parameters from a ASN1_TYPE */ - int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Miscellaneous operations */ - int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); - /* Application data */ - void *app_data; -} /* EVP_CIPHER */ ; - -/* Macros to code block cipher wrappers */ - -/* Wrapper functions for each cipher mode */ - -#define EVP_C_DATA(kstruct, ctx) \ - ((kstruct *)EVP_CIPHER_CTX_get_cipher_data(ctx)) *** 1397 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 05:36:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D80C953372A; Wed, 17 Feb 2021 05:36:07 +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 4DgRQb5lr2z4p4B; Wed, 17 Feb 2021 05:36:07 +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 B83061F5A0; Wed, 17 Feb 2021 05:36:07 +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 11H5a7jV073428; Wed, 17 Feb 2021 05:36:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H5a7Ea073427; Wed, 17 Feb 2021 05:36:07 GMT (envelope-from git) Date: Wed, 17 Feb 2021 05:36:07 GMT Message-Id: <202102170536.11H5a7Ea073427@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 3396647c8dc4 - main - OpenSSL: Regen assembly files for OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3396647c8dc40e859609995d8f5415df43504416 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 05:36:07 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=3396647c8dc40e859609995d8f5415df43504416 commit 3396647c8dc40e859609995d8f5415df43504416 Author: Jung-uk Kim AuthorDate: 2021-02-17 05:35:11 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 05:35:11 +0000 OpenSSL: Regen assembly files for OpenSSL 1.1.1j --- sys/crypto/openssl/arm/poly1305-armv4.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/crypto/openssl/arm/poly1305-armv4.S b/sys/crypto/openssl/arm/poly1305-armv4.S index c3041f6e2905..02d745f510b7 100644 --- a/sys/crypto/openssl/arm/poly1305-armv4.S +++ b/sys/crypto/openssl/arm/poly1305-armv4.S @@ -87,10 +87,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -292,6 +292,7 @@ poly1305_blocks: .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} .Lpoly1305_emit_enter: @@ -602,6 +603,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[r0,#36] @ is_base2_26 ands r2,r2,#-16 beq .Lno_data_neon @@ -1088,6 +1090,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[r0,#36] @ is_base2_26 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} From owner-dev-commits-src-all@freebsd.org Wed Feb 17 05:37:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4F4035338D9; Wed, 17 Feb 2021 05:37: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 4DgRSN1nqgz4p2r; Wed, 17 Feb 2021 05:37: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 3063B1F340; Wed, 17 Feb 2021 05:37: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 11H5bebN073760; Wed, 17 Feb 2021 05:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H5be4W073759; Wed, 17 Feb 2021 05:37:40 GMT (envelope-from git) Date: Wed, 17 Feb 2021 05:37:40 GMT Message-Id: <202102170537.11H5be4W073759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 7973db046cb0 - stable/13 - OpenSSL: Regen assembly files for OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7973db046cb057192199dcc72c64789afc160ced Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 05:37:40 -0000 The branch stable/13 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=7973db046cb057192199dcc72c64789afc160ced commit 7973db046cb057192199dcc72c64789afc160ced Author: Jung-uk Kim AuthorDate: 2021-02-17 05:35:11 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 05:37:16 +0000 OpenSSL: Regen assembly files for OpenSSL 1.1.1j (cherry picked from commit 3396647c8dc40e859609995d8f5415df43504416) --- sys/crypto/openssl/arm/poly1305-armv4.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/crypto/openssl/arm/poly1305-armv4.S b/sys/crypto/openssl/arm/poly1305-armv4.S index c3041f6e2905..02d745f510b7 100644 --- a/sys/crypto/openssl/arm/poly1305-armv4.S +++ b/sys/crypto/openssl/arm/poly1305-armv4.S @@ -87,10 +87,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -292,6 +292,7 @@ poly1305_blocks: .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} .Lpoly1305_emit_enter: @@ -602,6 +603,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[r0,#36] @ is_base2_26 ands r2,r2,#-16 beq .Lno_data_neon @@ -1088,6 +1090,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[r0,#36] @ is_base2_26 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} From owner-dev-commits-src-all@freebsd.org Wed Feb 17 08:26:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7FA40537A16; Wed, 17 Feb 2021 08:26: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 4DgWCH3Fm5z4x4J; Wed, 17 Feb 2021 08:26: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 628B32145F; Wed, 17 Feb 2021 08:26: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 11H8QZuD096522; Wed, 17 Feb 2021 08:26:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H8QZS6096521; Wed, 17 Feb 2021 08:26:35 GMT (envelope-from git) Date: Wed, 17 Feb 2021 08:26:35 GMT Message-Id: <202102170826.11H8QZS6096521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 6b7e592c215f - main - lex: Do not let input() return 0 when end-of-file is reached MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b7e592c215fb76ea027f25030ddc9a697184fbe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 08:26:35 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7e592c215fb76ea027f25030ddc9a697184fbe commit 6b7e592c215fb76ea027f25030ddc9a697184fbe Author: Jung-uk Kim AuthorDate: 2021-02-17 07:22:47 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 07:22:47 +0000 lex: Do not let input() return 0 when end-of-file is reached Importing flex 2.6.4 has introduced a regression: input() now returns 0 instead of EOF to indicate that the end of input was reached, just like traditional AT&T and POSIX lex. Note the behavior contradicts flex(1). See "INCOMPATIBILITIES WITH LEX AND POSIX" section for information. This incompatibility traces back to the original version and documented in its manual page by the Vern Paxson. Apparently, it has been reported in a few places, e.g., https://github.com/westes/flex/issues/448 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911415 Unfortunately, this also breaks the scanner used by libdtrace and dtrace is unable to resolve some probe argument types as a result. See PR253440 for more information. Note the regression was introduced by the following upstream commit without any explanation or documentation change: https://github.com/westes/flex/commit/f863c9490e6912ffcaeb12965fb3a567a10745ff Now we restore the traditional flex behavior unless lex-compatibility mode is set with "-l" option because I believe the author originally wanted to make it more lex and POSIX compatible. PR: 253440 Reported by: markj --- contrib/flex/src/flex.skl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/flex/src/flex.skl b/contrib/flex/src/flex.skl index 242645f53245..c23b944ea473 100644 --- a/contrib/flex/src/flex.skl +++ b/contrib/flex/src/flex.skl @@ -1863,7 +1863,11 @@ m4_ifdef( [[M4_YY_USE_LINENO]], case EOB_ACT_END_OF_FILE: { if ( yywrap( M4_YY_CALL_ONLY_ARG ) ) +#ifdef YY_FLEX_LEX_COMPAT return 0; +#else + return EOF; +#endif if ( ! YY_G(yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 09:29:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 857DB53925F; Wed, 17 Feb 2021 09:29: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 4DgXbr3RYFz516X; Wed, 17 Feb 2021 09:29: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 6921421F71; Wed, 17 Feb 2021 09:29: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 11H9TSDq077676; Wed, 17 Feb 2021 09:29:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H9TSeA077675; Wed, 17 Feb 2021 09:29:28 GMT (envelope-from git) Date: Wed, 17 Feb 2021 09:29:28 GMT Message-Id: <202102170929.11H9TSeA077675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8a439f324e90 - main - pf: Remove unused return value from (de)hook_pf() 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/main X-Git-Reftype: branch X-Git-Commit: 8a439f324e9010a122fa4c00426bde70dc373c2f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 09:29:28 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8a439f324e9010a122fa4c00426bde70dc373c2f commit 8a439f324e9010a122fa4c00426bde70dc373c2f Author: Kristof Provost AuthorDate: 2021-02-16 11:40:51 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 08:15:40 +0000 pf: Remove unused return value from (de)hook_pf() These functions always return 0, which is good, because the code calling them doesn't handle this error gracefully. As the functions always succeed remove their return value, and the code handling their errors (because it was never executed anyway). MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) --- sys/netpfil/pf/pf_ioctl.c | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index edc8443dcc0a..028938b9aea0 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -213,8 +213,8 @@ static pfil_return_t pf_check6_out(struct mbuf **m, struct ifnet *ifp, int flags, void *ruleset __unused, struct inpcb *inp); #endif -static int hook_pf(void); -static int dehook_pf(void); +static void hook_pf(void); +static void dehook_pf(void); static int shutdown_pf(void); static int pf_load(void); static void pf_unload(void); @@ -1814,12 +1814,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td else { int cpu; - error = hook_pf(); - if (error) { - DPFPRINTF(PF_DEBUG_MISC, - ("pf: pfil registration failed\n")); - break; - } + hook_pf(); V_pf_status.running = 1; V_pf_status.since = time_second; @@ -1836,12 +1831,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td error = ENOENT; else { V_pf_status.running = 0; - error = dehook_pf(); - if (error) { - V_pf_status.running = 1; - DPFPRINTF(PF_DEBUG_MISC, - ("pf: pfil unregistration failed\n")); - } + dehook_pf(); V_pf_status.since = time_second; DPFPRINTF(PF_DEBUG_MISC, ("pf: stopped\n")); } @@ -4565,14 +4555,14 @@ VNET_DEFINE_STATIC(pfil_hook_t, pf_ip6_out_hook); #define V_pf_ip6_out_hook VNET(pf_ip6_out_hook) #endif -static int +static void hook_pf(void) { struct pfil_hook_args pha; struct pfil_link_args pla; if (V_pf_pfil_hooked) - return (0); + return; pha.pa_version = PFIL_VERSION; pha.pa_modname = "pf"; @@ -4620,15 +4610,14 @@ hook_pf(void) #endif V_pf_pfil_hooked = 1; - return (0); } -static int +static void dehook_pf(void) { if (V_pf_pfil_hooked == 0) - return (0); + return; #ifdef INET pfil_remove_hook(V_pf_ip4_in_hook); @@ -4640,7 +4629,6 @@ dehook_pf(void) #endif V_pf_pfil_hooked = 0; - return (0); } static void @@ -4688,20 +4676,10 @@ pf_load(void) static void pf_unload_vnet(void) { - int error; V_pf_vnet_active = 0; V_pf_status.running = 0; - error = dehook_pf(); - if (error) { - /* - * Should not happen! - * XXX Due to error code ESRCH, kldunload will show - * a message like 'No such process'. - */ - printf("%s : pfil unregisteration fail\n", __FUNCTION__); - return; - } + dehook_pf(); PF_RULES_WLOCK(); shutdown_pf(); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 09:55:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5A04B539FE5; Wed, 17 Feb 2021 09:55: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 4DgY9Y24xgz53Gs; Wed, 17 Feb 2021 09:55: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 3A45F22C03; Wed, 17 Feb 2021 09:55: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 11H9tDfi016353; Wed, 17 Feb 2021 09:55:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H9tDH7016352; Wed, 17 Feb 2021 09:55:13 GMT (envelope-from git) Date: Wed, 17 Feb 2021 09:55:13 GMT Message-Id: <202102170955.11H9tDH7016352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 02af91c52e71 - main - Fix crossbuild bootstrap tools build with Clang 12 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02af91c52e71e8a0f47251e637c9687f35d45dd9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 09:55:13 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=02af91c52e71e8a0f47251e637c9687f35d45dd9 commit 02af91c52e71e8a0f47251e637c9687f35d45dd9 Author: Alex Richardson AuthorDate: 2021-02-10 11:05:02 +0000 Commit: Alex Richardson CommitDate: 2021-02-17 09:54:59 +0000 Fix crossbuild bootstrap tools build with Clang 12 Clang 12 no longer allows re-defining a weak symbol as non-weak. This happed here because we compile err.c with _err defined to err. To fix this, use the same approach as the libc namespace.h --- tools/build/libc-bootstrap/namespace.h | 4 +++- tools/build/libc-bootstrap/un-namespace.h | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/build/libc-bootstrap/namespace.h b/tools/build/libc-bootstrap/namespace.h index 73e27f8cb02b..2c242f88072d 100644 --- a/tools/build/libc-bootstrap/namespace.h +++ b/tools/build/libc-bootstrap/namespace.h @@ -45,7 +45,9 @@ #define _writev(a, b, c) writev(a, b, c) #define _fsync(a) fsync(a) #define _getprogname() getprogname() -#define _err(...) err(__VA_ARGS__) +/* These two need to be renamed to build libc/gen/err.c */ +#define err _err +#define warn _warn #define _pthread_mutex_unlock pthread_mutex_unlock #define _pthread_mutex_lock pthread_mutex_lock diff --git a/tools/build/libc-bootstrap/un-namespace.h b/tools/build/libc-bootstrap/un-namespace.h index 398707791792..f08ab41ea543 100644 --- a/tools/build/libc-bootstrap/un-namespace.h +++ b/tools/build/libc-bootstrap/un-namespace.h @@ -36,5 +36,8 @@ * $FreeBSD$ */ #pragma once -/* This can be empty when building the FreeBSD compatible bootstrap files */ + +/* Undo the changes made by namespace.h */ +#undef err +#undef warn From owner-dev-commits-src-all@freebsd.org Wed Feb 17 09:57:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 092C453A512; Wed, 17 Feb 2021 09:57:16 +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 4DgYCv6vjTz53SQ; Wed, 17 Feb 2021 09:57: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 E01B622B89; Wed, 17 Feb 2021 09:57: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 11H9vFCS016769; Wed, 17 Feb 2021 09:57:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11H9vF7f016768; Wed, 17 Feb 2021 09:57:15 GMT (envelope-from git) Date: Wed, 17 Feb 2021 09:57:15 GMT Message-Id: <202102170957.11H9vF7f016768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alex Richardson Subject: git: b43fd50269af - stable/13 - usr.sbin/makefs: fix use-after-free in read_mtree_keywords() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b43fd50269afe141ec657f0e14d742678fe3733c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 09:57:16 -0000 The branch stable/13 has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=b43fd50269afe141ec657f0e14d742678fe3733c commit b43fd50269afe141ec657f0e14d742678fe3733c Author: Alex Richardson AuthorDate: 2021-02-10 15:23:23 +0000 Commit: Alex Richardson CommitDate: 2021-02-17 09:56:44 +0000 usr.sbin/makefs: fix use-after-free in read_mtree_keywords() The st variable is used as a shortcut for &node->inode->st, but in one branch just before the exit we update node->inode without changing st. Reported by: AddressSanitizer Reviewed By: emaste (cherry picked from commit 12ad8bdb34aa990bcc4f3faa92a6e0557385d2b2) --- usr.sbin/makefs/mtree.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/makefs/mtree.c b/usr.sbin/makefs/mtree.c index 63b52193b872..266315466900 100644 --- a/usr.sbin/makefs/mtree.c +++ b/usr.sbin/makefs/mtree.c @@ -783,6 +783,8 @@ read_mtree_keywords(FILE *fp, fsnode *node) free(node->inode); node->inode = curino; node->inode->nlink++; + /* Reset st since node->inode has been updated. */ + st = &node->inode->st; } } From owner-dev-commits-src-all@freebsd.org Wed Feb 17 10:09:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A14C53A756; Wed, 17 Feb 2021 10:09:51 +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 4DgYVQ6ybpz546p; Wed, 17 Feb 2021 10:09: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 DDD8922BBD; Wed, 17 Feb 2021 10:09: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 11HA9omx030253; Wed, 17 Feb 2021 10:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HA9oNc030252; Wed, 17 Feb 2021 10:09:50 GMT (envelope-from git) Date: Wed, 17 Feb 2021 10:09:50 GMT Message-Id: <202102171009.11HA9oNc030252@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 63640b2f552c - main - automount(8): fix absolute path when creating a mountpoint MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63640b2f552c0476f50484635eb9888eafcd22dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 10:09:51 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=63640b2f552c0476f50484635eb9888eafcd22dc commit 63640b2f552c0476f50484635eb9888eafcd22dc Author: Robert Wing AuthorDate: 2021-02-17 09:22:23 +0000 Commit: Robert Wing CommitDate: 2021-02-17 10:02:56 +0000 automount(8): fix absolute path when creating a mountpoint When executing automount(8), it will attempt to create the directory where an autofs filesystem is to be mounted. Explicity set the root path for this directory to "/". This fixes the issue where the directory being created was being treated as a relative path instead of an absolute path (as expected). PR: 224601 Reported by: kusumi.tomohiro@gmail.com Reviewed by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27832 --- usr.sbin/autofs/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/autofs/common.c b/usr.sbin/autofs/common.c index a6ed90909ec9..7c8df4205a86 100644 --- a/usr.sbin/autofs/common.c +++ b/usr.sbin/autofs/common.c @@ -140,7 +140,7 @@ create_directory(const char *path) */ copy = tofree = checked_strdup(path + 1); - partial = checked_strdup(""); + partial = checked_strdup("/"); for (;;) { component = strsep(©, "/"); if (component == NULL) From owner-dev-commits-src-all@freebsd.org Wed Feb 17 12:18:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1039653E7A4; Wed, 17 Feb 2021 12:18: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 4DgcM175Qfz3DHh; Wed, 17 Feb 2021 12: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 E64BC2425E; Wed, 17 Feb 2021 12: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 11HCIbOB099165; Wed, 17 Feb 2021 12:18:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HCIbtf099164; Wed, 17 Feb 2021 12:18:37 GMT (envelope-from git) Date: Wed, 17 Feb 2021 12:18:37 GMT Message-Id: <202102171218.11HCIbtf099164@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 1cf282363101 - main - arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cf282363101f5d99b1dadfb0d3250bbe6f482a5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 12:18:38 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1cf282363101f5d99b1dadfb0d3250bbe6f482a5 commit 1cf282363101f5d99b1dadfb0d3250bbe6f482a5 Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:11:36 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-17 12:18:21 +0000 arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE The node have now a compatible with simple-mfd so we need to attach at the same pass so the specific driver will be used. MFC after: 3 days PR: 252971 --- sys/arm/broadcom/bcm2835/bcm2835_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c index 1a061e60a823..03eb4878d23a 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c @@ -180,5 +180,5 @@ DEFINE_CLASS_1(bcm2835_firmware, bcm2835_firmware_driver, simplebus_driver); EARLY_DRIVER_MODULE(bcm2835_firmware, simplebus, bcm2835_firmware_driver, - bcm2835_firmware_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); + bcm2835_firmware_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LATE); MODULE_DEPEND(bcm2835_firmware, mbox, 1, 1, 1); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 12:18:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1CFEB53E844; Wed, 17 Feb 2021 12:18: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 4DgcM30K9mz3DHj; Wed, 17 Feb 2021 12:18: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 F2793246AE; Wed, 17 Feb 2021 12:18: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 11HCIcQG099187; Wed, 17 Feb 2021 12:18:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HCIcjo099186; Wed, 17 Feb 2021 12:18:38 GMT (envelope-from git) Date: Wed, 17 Feb 2021 12:18:38 GMT Message-Id: <202102171218.11HCIcjo099186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2551d928501f - main - arm64: rpi4: gpio: Add brcm, bcm2711-gpio compatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2551d928501fb613dba09b7ffe7e383dba276ca6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 12:18:39 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2551d928501fb613dba09b7ffe7e383dba276ca6 commit 2551d928501fb613dba09b7ffe7e383dba276ca6 Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:12:45 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-17 12:18:26 +0000 arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible Looks like we never enabled the main gpio controller on the RPI4 board. Now gpio are usable. MFC after: 3 days --- sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 61513df9c008..70b69eb154e8 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -157,6 +157,7 @@ enum bcm_gpio_pud { static struct ofw_compat_data compat_data[] = { {"broadcom,bcm2835-gpio", 1}, {"brcm,bcm2835-gpio", 1}, + {"brcm,bcm2711-gpio", 1}, {NULL, 0} }; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 13:04:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E126953FE99; Wed, 17 Feb 2021 13:04: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 4DgdNV549bz3GfS; Wed, 17 Feb 2021 13:04: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 A1348251DE; Wed, 17 Feb 2021 13:04: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 11HD4wK9064460; Wed, 17 Feb 2021 13:04:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HD4wVx064459; Wed, 17 Feb 2021 13:04:58 GMT (envelope-from git) Date: Wed, 17 Feb 2021 13:04:58 GMT Message-Id: <202102171304.11HD4wVx064459@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: c4e0f7aa1ae7 - main - pf: Assert that pfil_link() calls succeed 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/main X-Git-Reftype: branch X-Git-Commit: c4e0f7aa1ae7729df8c3e525e511b84f8052375c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 13:04:58 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=c4e0f7aa1ae7729df8c3e525e511b84f8052375c commit c4e0f7aa1ae7729df8c3e525e511b84f8052375c Author: Kristof Provost AuthorDate: 2021-02-17 10:44:37 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 13:04:20 +0000 pf: Assert that pfil_link() calls succeed These should only fail if we use them incorrectly, so assert that they succeed. MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) --- sys/netpfil/pf/pf_ioctl.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 028938b9aea0..ea71664756d7 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4560,6 +4560,7 @@ hook_pf(void) { struct pfil_hook_args pha; struct pfil_link_args pla; + int ret; if (V_pf_pfil_hooked) return; @@ -4579,7 +4580,8 @@ hook_pf(void) pla.pa_flags = PFIL_IN | PFIL_HEADPTR | PFIL_HOOKPTR; pla.pa_head = V_inet_pfil_head; pla.pa_hook = V_pf_ip4_in_hook; - (void)pfil_link(&pla); + ret = pfil_link(&pla); + MPASS(ret == 0); pha.pa_func = pf_check_out; pha.pa_flags = PFIL_OUT; pha.pa_rulname = "default-out"; @@ -4587,7 +4589,8 @@ hook_pf(void) pla.pa_flags = PFIL_OUT | PFIL_HEADPTR | PFIL_HOOKPTR; pla.pa_head = V_inet_pfil_head; pla.pa_hook = V_pf_ip4_out_hook; - (void)pfil_link(&pla); + ret = pfil_link(&pla); + MPASS(ret == 0); #endif #ifdef INET6 pha.pa_type = PFIL_TYPE_IP6; @@ -4598,7 +4601,8 @@ hook_pf(void) pla.pa_flags = PFIL_IN | PFIL_HEADPTR | PFIL_HOOKPTR; pla.pa_head = V_inet6_pfil_head; pla.pa_hook = V_pf_ip6_in_hook; - (void)pfil_link(&pla); + ret = pfil_link(&pla); + MPASS(ret == 0); pha.pa_func = pf_check6_out; pha.pa_rulname = "default-out6"; pha.pa_flags = PFIL_OUT; @@ -4606,7 +4610,8 @@ hook_pf(void) pla.pa_flags = PFIL_OUT | PFIL_HEADPTR | PFIL_HOOKPTR; pla.pa_head = V_inet6_pfil_head; pla.pa_hook = V_pf_ip6_out_hook; - (void)pfil_link(&pla); + ret = pfil_link(&pla); + MPASS(ret == 0); #endif V_pf_pfil_hooked = 1; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 13:04:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EB6AC53FEA0; Wed, 17 Feb 2021 13:04: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 4DgdNW6PRqz3GWd; Wed, 17 Feb 2021 13:04: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 CEA3324B72; Wed, 17 Feb 2021 13:04: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 11HD4x2K064483; Wed, 17 Feb 2021 13:04:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HD4xDI064482; Wed, 17 Feb 2021 13:04:59 GMT (envelope-from git) Date: Wed, 17 Feb 2021 13:04:59 GMT Message-Id: <202102171304.11HD4xDI064482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4a7d84058d88 - main - pf tests: Explicitly ask for python3 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/main X-Git-Reftype: branch X-Git-Commit: 4a7d84058d88244c405fc0b73d6985681eb661f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 13:05:00 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4a7d84058d88244c405fc0b73d6985681eb661f5 commit 4a7d84058d88244c405fc0b73d6985681eb661f5 Author: Kristof Provost AuthorDate: 2021-02-17 10:45:54 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 13:04:33 +0000 pf tests: Explicitly ask for python3 If we install the scapy package (which we do list as a dependency) we don't automatically install python (but we do have python3). MFC after: 1 week Sponsored by: Rubicon Communications, LLC (“Netgate”’) --- tests/sys/netpfil/common/pft_ping.py | 2 +- tests/sys/netpfil/pf/CVE-2019-5597.py | 2 +- tests/sys/netpfil/pf/CVE-2019-5598.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/sys/netpfil/common/pft_ping.py b/tests/sys/netpfil/common/pft_ping.py index 957123e4f6f8..916a019d2f4a 100644 --- a/tests/sys/netpfil/common/pft_ping.py +++ b/tests/sys/netpfil/common/pft_ping.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # SPDX-License-Identifier: BSD-2-Clause # diff --git a/tests/sys/netpfil/pf/CVE-2019-5597.py b/tests/sys/netpfil/pf/CVE-2019-5597.py index bb95e95c13b7..1050af506f8d 100644 --- a/tests/sys/netpfil/pf/CVE-2019-5597.py +++ b/tests/sys/netpfil/pf/CVE-2019-5597.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # diff --git a/tests/sys/netpfil/pf/CVE-2019-5598.py b/tests/sys/netpfil/pf/CVE-2019-5598.py index 53616e681609..ac1e4f3438f5 100644 --- a/tests/sys/netpfil/pf/CVE-2019-5598.py +++ b/tests/sys/netpfil/pf/CVE-2019-5598.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # From owner-dev-commits-src-all@freebsd.org Wed Feb 17 13:05:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B85DC53FE65; Wed, 17 Feb 2021 13:05: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 4DgdPK4w8Pz3Gms; Wed, 17 Feb 2021 13:05: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 9C0DF24EB6; Wed, 17 Feb 2021 13:05: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 11HD5fVx064701; Wed, 17 Feb 2021 13:05:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HD5f0Q064700; Wed, 17 Feb 2021 13:05:41 GMT (envelope-from git) Date: Wed, 17 Feb 2021 13:05:41 GMT Message-Id: <202102171305.11HD5f0Q064700@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: f9a66bb91ae1 - stable/13 - pf: Slightly relax pf_rule_addr validation 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: f9a66bb91ae1f3f175d0c16730c683841525bd1d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 13:05:41 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9a66bb91ae1f3f175d0c16730c683841525bd1d commit f9a66bb91ae1f3f175d0c16730c683841525bd1d Author: Kristof Provost AuthorDate: 2021-02-13 15:31:52 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 13:03:58 +0000 pf: Slightly relax pf_rule_addr validation Ensure we don't reject no-route / urpf-failed addresses. PR: 253479 Reported by: michal AT microwave.sk Revied by: donner@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28650 (cherry picked from commit 5e42cb139fc17f165c9c93ac97069dc7770490e2) --- sys/netpfil/pf/pf_ioctl.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 644a091808cd..edc8443dcc0a 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1557,9 +1557,33 @@ pf_krule_to_rule(const struct pf_krule *krule, struct pf_rule *rule) rule->u_src_nodes = counter_u64_fetch(krule->src_nodes); } +static int +pf_check_rule_addr(const struct pf_rule_addr *addr) +{ + + switch (addr->addr.type) { + case PF_ADDR_ADDRMASK: + case PF_ADDR_NOROUTE: + case PF_ADDR_DYNIFTL: + case PF_ADDR_TABLE: + case PF_ADDR_URPFFAILED: + case PF_ADDR_RANGE: + break; + default: + return (EINVAL); + } + + if (addr->addr.p.dyn != NULL) { + return (EINVAL); + } + + return (0); +} + static int pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) { + int ret; #ifndef INET if (rule->af == AF_INET) { @@ -1572,23 +1596,12 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) } #endif /* INET6 */ - if (rule->src.addr.type != PF_ADDR_ADDRMASK && - rule->src.addr.type != PF_ADDR_DYNIFTL && - rule->src.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->src.addr.p.dyn != NULL) { - return (EINVAL); - } - - if (rule->dst.addr.type != PF_ADDR_ADDRMASK && - rule->dst.addr.type != PF_ADDR_DYNIFTL && - rule->dst.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->dst.addr.p.dyn != NULL) { - return (EINVAL); - } + ret = pf_check_rule_addr(&rule->src); + if (ret != 0) + return (ret); + ret = pf_check_rule_addr(&rule->dst); + if (ret != 0) + return (ret); bzero(krule, sizeof(*krule)); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 13:06:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B6B8C540193; Wed, 17 Feb 2021 13:06:12 +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 4DgdPw4gh7z3Gwv; Wed, 17 Feb 2021 13:06:12 +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 884F924CF8; Wed, 17 Feb 2021 13:06:12 +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 11HD6CRI064884; Wed, 17 Feb 2021 13:06:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HD6CRY064883; Wed, 17 Feb 2021 13:06:12 GMT (envelope-from git) Date: Wed, 17 Feb 2021 13:06:12 GMT Message-Id: <202102171306.11HD6CRY064883@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: f8d1f2da0922 - stable/12 - pf: Slightly relax pf_rule_addr validation 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: f8d1f2da0922fdff846b13baa7315652b43aa95c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 13:06:12 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f8d1f2da0922fdff846b13baa7315652b43aa95c commit f8d1f2da0922fdff846b13baa7315652b43aa95c Author: Kristof Provost AuthorDate: 2021-02-13 15:31:52 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 09:11:19 +0000 pf: Slightly relax pf_rule_addr validation Ensure we don't reject no-route / urpf-failed addresses. PR: 253479 Reported by: michal AT microwave.sk Revied by: donner@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28650 (cherry picked from commit 5e42cb139fc17f165c9c93ac97069dc7770490e2) --- sys/netpfil/pf/pf_ioctl.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index bbb9cfe39586..edf147699235 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1558,9 +1558,33 @@ pf_krule_to_rule(const struct pf_krule *krule, struct pf_rule *rule) rule->u_src_nodes = counter_u64_fetch(krule->src_nodes); } +static int +pf_check_rule_addr(const struct pf_rule_addr *addr) +{ + + switch (addr->addr.type) { + case PF_ADDR_ADDRMASK: + case PF_ADDR_NOROUTE: + case PF_ADDR_DYNIFTL: + case PF_ADDR_TABLE: + case PF_ADDR_URPFFAILED: + case PF_ADDR_RANGE: + break; + default: + return (EINVAL); + } + + if (addr->addr.p.dyn != NULL) { + return (EINVAL); + } + + return (0); +} + static int pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) { + int ret; #ifndef INET if (rule->af == AF_INET) { @@ -1573,23 +1597,12 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) } #endif /* INET6 */ - if (rule->src.addr.type != PF_ADDR_ADDRMASK && - rule->src.addr.type != PF_ADDR_DYNIFTL && - rule->src.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->src.addr.p.dyn != NULL) { - return (EINVAL); - } - - if (rule->dst.addr.type != PF_ADDR_ADDRMASK && - rule->dst.addr.type != PF_ADDR_DYNIFTL && - rule->dst.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->dst.addr.p.dyn != NULL) { - return (EINVAL); - } + ret = pf_check_rule_addr(&rule->src); + if (ret != 0) + return (ret); + ret = pf_check_rule_addr(&rule->dst); + if (ret != 0) + return (ret); bzero(krule, sizeof(*krule)); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 14:30:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 095B75432C7; Wed, 17 Feb 2021 14:30: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 4DggGs6rJ2z3MsS; Wed, 17 Feb 2021 14:30: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 D32F22613A; Wed, 17 Feb 2021 14:30: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 11HEUDHO073507; Wed, 17 Feb 2021 14:30:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HEUDEl073495; Wed, 17 Feb 2021 14:30:13 GMT (envelope-from git) Date: Wed, 17 Feb 2021 14:30:13 GMT Message-Id: <202102171430.11HEUDEl073495@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: 9cc7bd9a6ab1 - stable/12 - Widen ifnet_detach_sxlock coverage 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: 9cc7bd9a6ab1e2bfc12dabf4d9ef4ad463a05616 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 14:30:14 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9cc7bd9a6ab1e2bfc12dabf4d9ef4ad463a05616 commit 9cc7bd9a6ab1e2bfc12dabf4d9ef4ad463a05616 Author: Kristof Provost AuthorDate: 2021-02-08 09:04:27 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 13:13:04 +0000 Widen ifnet_detach_sxlock coverage Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28530 (cherry picked from commit 6d2a10d96fb5d4ee42fd67b0b07a6d098db5d55a) --- sys/net/if.c | 13 ++++++------- sys/net/if.h | 3 +++ sys/net/vnet.c | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 56b12f594814..2ae8121043b0 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -316,7 +316,8 @@ struct sx ifnet_sxlock; SX_SYSINIT_FLAGS(ifnet_sx, &ifnet_sxlock, "ifnet_sx", SX_RECURSE); struct sx ifnet_detach_sxlock; -SX_SYSINIT(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx"); +SX_SYSINIT_FLAGS(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx", + SX_RECURSE); /* * The allocation of network interfaces is a rather non-atomic affair; we @@ -552,9 +553,7 @@ vnet_if_return(const void *unused __unused) IFNET_WUNLOCK(); for (int j = 0; j < i; j++) { - sx_xlock(&ifnet_detach_sxlock); if_vmove(pending[j], pending[j]->if_home_vnet); - sx_xunlock(&ifnet_detach_sxlock); } free(pending, M_IFNET); @@ -1108,9 +1107,9 @@ if_detach(struct ifnet *ifp) CURVNET_SET_QUIET(ifp->if_vnet); found = if_unlink_ifnet(ifp, false); if (found) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); if_detach_internal(ifp, 0, NULL); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } CURVNET_RESTORE(); } @@ -3147,9 +3146,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td) error = priv_check(td, PRIV_NET_IFDESTROY); if (error == 0) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); error = if_clone_destroy(ifr->ifr_name); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } goto out_noref; diff --git a/sys/net/if.h b/sys/net/if.h index 3767033d8265..44a920d844e2 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -600,6 +600,9 @@ struct ifdownreason { MALLOC_DECLARE(M_IFADDR); MALLOC_DECLARE(M_IFMADDR); #endif + +extern struct sx ifnet_detach_sxlock; + #endif #ifndef _KERNEL diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 9a4321a8409b..3fd423d22d1d 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -281,7 +281,9 @@ vnet_destroy(struct vnet *vnet) VNET_LIST_WUNLOCK(); CURVNET_SET_QUIET(vnet); + sx_xlock(&ifnet_detach_sxlock); vnet_sysuninit(); + sx_xunlock(&ifnet_detach_sxlock); CURVNET_RESTORE(); /* From owner-dev-commits-src-all@freebsd.org Wed Feb 17 14:30:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6C92254332C; Wed, 17 Feb 2021 14:30: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 4DggGv2j27z3Mh2; Wed, 17 Feb 2021 14:30: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 454EB26265; Wed, 17 Feb 2021 14:30: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 11HEUFYM074216; Wed, 17 Feb 2021 14:30:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HEUFp9074206; Wed, 17 Feb 2021 14:30:15 GMT (envelope-from git) Date: Wed, 17 Feb 2021 14:30:15 GMT Message-Id: <202102171430.11HEUFp9074206@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: 05530211165f - stable/13 - Widen ifnet_detach_sxlock coverage 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: 05530211165f59b8dabc02adaf26ea29c2726ebc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 14:30:15 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=05530211165f59b8dabc02adaf26ea29c2726ebc commit 05530211165f59b8dabc02adaf26ea29c2726ebc Author: Kristof Provost AuthorDate: 2021-02-08 09:04:27 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 13:12:54 +0000 Widen ifnet_detach_sxlock coverage Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28530 (cherry picked from commit 6d2a10d96fb5d4ee42fd67b0b07a6d098db5d55a) --- sys/net/if.c | 13 ++++++------- sys/net/if.h | 3 +++ sys/net/vnet.c | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 74fdd066fd2d..c85cfab19bf6 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -315,7 +315,8 @@ struct sx ifnet_sxlock; SX_SYSINIT_FLAGS(ifnet_sx, &ifnet_sxlock, "ifnet_sx", SX_RECURSE); struct sx ifnet_detach_sxlock; -SX_SYSINIT(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx"); +SX_SYSINIT_FLAGS(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx", + SX_RECURSE); /* * The allocation of network interfaces is a rather non-atomic affair; we @@ -546,9 +547,7 @@ vnet_if_return(const void *unused __unused) IFNET_WUNLOCK(); for (int j = 0; j < i; j++) { - sx_xlock(&ifnet_detach_sxlock); if_vmove(pending[j], pending[j]->if_home_vnet); - sx_xunlock(&ifnet_detach_sxlock); } free(pending, M_IFNET); @@ -1124,9 +1123,9 @@ if_detach(struct ifnet *ifp) CURVNET_SET_QUIET(ifp->if_vnet); found = if_unlink_ifnet(ifp, false); if (found) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); if_detach_internal(ifp, 0, NULL); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } CURVNET_RESTORE(); } @@ -3015,9 +3014,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td) error = priv_check(td, PRIV_NET_IFDESTROY); if (error == 0) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); error = if_clone_destroy(ifr->ifr_name); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } goto out_noref; diff --git a/sys/net/if.h b/sys/net/if.h index eabd4e053733..e6073563bce2 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -604,6 +604,9 @@ struct ifdownreason { MALLOC_DECLARE(M_IFADDR); MALLOC_DECLARE(M_IFMADDR); #endif + +extern struct sx ifnet_detach_sxlock; + #endif #ifndef _KERNEL diff --git a/sys/net/vnet.c b/sys/net/vnet.c index c5dafedbc6b2..2480fc8dd86c 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -283,7 +283,9 @@ vnet_destroy(struct vnet *vnet) vnet->vnet_shutdown = true; CURVNET_SET_QUIET(vnet); + sx_xlock(&ifnet_detach_sxlock); vnet_sysuninit(); + sx_xunlock(&ifnet_detach_sxlock); CURVNET_RESTORE(); /* From owner-dev-commits-src-all@freebsd.org Wed Feb 17 15:41:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 06EF154587E; Wed, 17 Feb 2021 15:41:23 +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 4Dghry6dHwz3jLv; Wed, 17 Feb 2021 15:41:22 +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 D6B6526F4C; Wed, 17 Feb 2021 15:41:22 +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 11HFfMqq069623; Wed, 17 Feb 2021 15:41:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HFfMMl069622; Wed, 17 Feb 2021 15:41:22 GMT (envelope-from git) Date: Wed, 17 Feb 2021 15:41:22 GMT Message-Id: <202102171541.11HFfMMl069622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 69a34e8d0235 - main - Update the LRO processing code so that we can support a further CPU enhancements for compressed acks. These are acks that are compressed into an mbuf. The transport has to be aware of how to process these, and an upcoming update to rack will do so. You need the rack changes to actually test and validate these since if the transport does not support mbuf compression, then the old code paths stay in place. We do in this commit take out the concept of logging if you don't have a lock (which was quite dangerous and was only for some early debugging but has been left in the code). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69a34e8d0235c0304a28bf8ab076b931aa61835f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 15:41:23 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=69a34e8d0235c0304a28bf8ab076b931aa61835f commit 69a34e8d0235c0304a28bf8ab076b931aa61835f Author: Randall Stewart AuthorDate: 2021-01-27 17:09:32 +0000 Commit: Randall Stewart CommitDate: 2021-02-17 15:41:01 +0000 Update the LRO processing code so that we can support a further CPU enhancements for compressed acks. These are acks that are compressed into an mbuf. The transport has to be aware of how to process these, and an upcoming update to rack will do so. You need the rack changes to actually test and validate these since if the transport does not support mbuf compression, then the old code paths stay in place. We do in this commit take out the concept of logging if you don't have a lock (which was quite dangerous and was only for some early debugging but has been left in the code). Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D28374 --- sys/netinet/in_pcb.h | 4 +- sys/netinet/tcp_lro.c | 888 ++++++++++++++++++++++++++++++++++++++++++------- sys/netinet/tcp_lro.h | 45 +++ sys/netinet/tcp_subr.c | 7 + sys/netinet/tcp_var.h | 7 + sys/sys/mbuf.h | 1 + 6 files changed, 829 insertions(+), 123 deletions(-) diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 080d07cc7218..9604a837cfb4 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -731,8 +731,8 @@ int inp_so_options(const struct inpcb *inp); /* * Flags for inp_flags2. */ -#define INP_2UNUSED1 0x00000001 -#define INP_2UNUSED2 0x00000002 +#define INP_MBUF_L_ACKS 0x00000001 /* We need large mbufs for ack compression */ +#define INP_MBUF_ACKCMP 0x00000002 /* TCP mbuf ack compression ok */ #define INP_PCBGROUPWILD 0x00000004 /* in pcbgroup wildcard list */ #define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */ #define INP_FREED 0x00000010 /* inp itself is not valid */ diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index baa2fe522e90..aea55d7ae33f 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -64,6 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -91,15 +93,20 @@ counter_u64_t tcp_inp_lro_compressed; counter_u64_t tcp_inp_lro_single_push; counter_u64_t tcp_inp_lro_locks_taken; counter_u64_t tcp_inp_lro_sack_wake; +counter_u64_t tcp_extra_mbuf; +counter_u64_t tcp_would_have_but; +counter_u64_t tcp_comp_total; +counter_u64_t tcp_uncomp_total; +counter_u64_t tcp_csum_hardware; +counter_u64_t tcp_csum_hardware_w_ph; +counter_u64_t tcp_csum_software; + static unsigned tcp_lro_entries = TCP_LRO_ENTRIES; -static int32_t hold_lock_over_compress = 0; -SYSCTL_INT(_net_inet_tcp_lro, OID_AUTO, hold_lock, CTLFLAG_RW, - &hold_lock_over_compress, 0, - "Do we hold the lock over the compress of mbufs?"); SYSCTL_UINT(_net_inet_tcp_lro, OID_AUTO, entries, CTLFLAG_RDTUN | CTLFLAG_MPSAFE, &tcp_lro_entries, 0, "default number of LRO entries"); + SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, fullqueue, CTLFLAG_RD, &tcp_inp_lro_direct_queue, "Number of lro's fully queued to transport"); SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, wokeup, CTLFLAG_RD, @@ -112,6 +119,22 @@ SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, lockcnt, CTLFLAG_RD, &tcp_inp_lro_locks_taken, "Number of lro's inp_wlocks taken"); SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, sackwakeups, CTLFLAG_RD, &tcp_inp_lro_sack_wake, "Number of wakeups caused by sack/fin"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, extra_mbuf, CTLFLAG_RD, + &tcp_extra_mbuf, "Number of times we had an extra compressed ack dropped into the tp"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, would_have_but, CTLFLAG_RD, + &tcp_would_have_but, "Number of times we would have had an extra compressed but out of room"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, with_m_ackcmp, CTLFLAG_RD, + &tcp_comp_total, "Number of mbufs queued with M_ACKCMP flags set"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, without_m_ackcmp, CTLFLAG_RD, + &tcp_uncomp_total, "Number of mbufs queued without M_ACKCMP"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, csum_hw, CTLFLAG_RD, + &tcp_csum_hardware, "Number of checksums processed in hardware"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, csum_hw_ph, CTLFLAG_RD, + &tcp_csum_hardware_w_ph, "Number of checksums processed in hardware with pseudo header"); +SYSCTL_COUNTER_U64(_net_inet_tcp_lro, OID_AUTO, csum_sw, CTLFLAG_RD, + &tcp_csum_software, "Number of checksums processed in software"); + + void tcp_lro_reg_mbufq(void) @@ -233,6 +256,19 @@ tcp_lro_get_th(struct lro_entry *le, struct mbuf *m) return (th); } +static void +lro_free_mbuf_chain(struct mbuf *m) +{ + struct mbuf *save; + + while (m) { + save = m->m_nextpkt; + m->m_nextpkt = NULL; + m_freem(m); + m = save; + } +} + void tcp_lro_free(struct lro_ctrl *lc) { @@ -245,7 +281,7 @@ tcp_lro_free(struct lro_ctrl *lc) /* free active mbufs, if any */ while ((le = LIST_FIRST(&lc->lro_active)) != NULL) { tcp_lro_active_remove(le); - m_freem(le->m_head); + lro_free_mbuf_chain(le->m_head); } /* free hash table */ @@ -454,11 +490,11 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, log.u_bbr.flex2 = 0; log.u_bbr.flex3 = le->append_cnt; log.u_bbr.flex4 = le->p_len; - log.u_bbr.flex5 = le->m_head->m_pkthdr.len; - log.u_bbr.delRate = le->m_head->m_flags; - log.u_bbr.rttProp = le->m_head->m_pkthdr.rcv_tstmp; - log.u_bbr.flex6 = lc->lro_length_lim; - log.u_bbr.flex7 = lc->lro_ackcnt_lim; + if (le->m_head) { + log.u_bbr.flex5 = le->m_head->m_pkthdr.len; + log.u_bbr.delRate = le->m_head->m_flags; + log.u_bbr.rttProp = le->m_head->m_pkthdr.rcv_tstmp; + } log.u_bbr.inflight = th_seq; log.u_bbr.timeStamp = cts; log.u_bbr.epoch = le->next_seq; @@ -471,6 +507,12 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, log.u_bbr.pkts_out = le->mbuf_cnt; /* Total mbufs added */ log.u_bbr.applimited = le->ulp_csum; log.u_bbr.lost = le->mbuf_appended; + log.u_bbr.pkt_epoch = le->cmp_ack_cnt; + log.u_bbr.flex6 = tcp_tv_to_usectick(&lc->lro_last_flush); + if (in_epoch(net_epoch_preempt)) + log.u_bbr.inhpts = 1; + else + log.u_bbr.inhpts = 0; TCP_LOG_EVENTP(tp, NULL, &tp->t_inpcb->inp_socket->so_rcv, &tp->t_inpcb->inp_socket->so_snd, @@ -480,7 +522,7 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, } static void -tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, int locked) +tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le) { if (le->append_cnt > 1) { struct tcphdr *th; @@ -552,9 +594,6 @@ tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, in (le->ulp_csum & 0xffff); th->th_sum = (le->ulp_csum & 0xffff); th->th_sum = ~th->th_sum; - if (tp && locked) { - tcp_lro_log(tp, lc, le, NULL, 7, 0, 0, 0, 0); - } } /* * Break any chain, this is not set to NULL on the singleton @@ -563,9 +602,6 @@ tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, in */ le->m_head->m_nextpkt = NULL; le->m_head->m_pkthdr.lro_nsegs = le->append_cnt; - if (tp && locked) { - tcp_lro_log(tp, lc, le, le->m_head, 8, 0, 0, 0, 0); - } (*lc->ifp->if_input)(lc->ifp, le->m_head); lc->lro_queued += le->append_cnt; } @@ -652,7 +688,7 @@ tcp_set_le_to_m(struct lro_ctrl *lc, struct lro_entry *le, struct mbuf *m) } static void -tcp_push_and_replace(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, struct mbuf *m, int locked) +tcp_push_and_replace(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, struct mbuf *m) { /* * Push up the stack the current le and replace @@ -664,7 +700,7 @@ tcp_push_and_replace(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le msave = le->m_head->m_nextpkt; le->m_head->m_nextpkt = NULL; /* Now push out the old le entry */ - tcp_flush_out_le(tp, lc, le, locked); + tcp_flush_out_le(tp, lc, le); /* * Now to replace the data properly in the le * we have to reset the tcp header and @@ -676,7 +712,7 @@ tcp_push_and_replace(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le } static void -tcp_lro_condense(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, int locked) +tcp_lro_condense(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le) { /* * Walk through the mbuf chain we @@ -702,6 +738,9 @@ again: /* Just the one left */ return; } + if (m->m_flags & M_ACKCMP) + panic("LRO condense lc:%p le:%p reaches with mbuf:%p ackcmp", + lc, le, m); th = tcp_lro_get_th(le, le->m_head); KASSERT(th != NULL, ("le:%p m:%p th comes back NULL?", le, le->m_head)); @@ -716,7 +755,7 @@ again: * use this guy as the head. */ le->m_head->m_nextpkt = m->m_nextpkt; - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0) { @@ -725,7 +764,9 @@ again: * before this segment, e.g. FIN. */ le->m_head->m_nextpkt = m->m_nextpkt; - tcp_push_and_replace(tp, lc, le, m, locked); + KASSERT(((m->m_flags & M_LRO_EHDRSTRP) == 0) , + ("tp:%p mbuf:%p has stripped ethernet flags:0x%x", tp, m, m->m_flags)); + tcp_push_and_replace(tp, lc, le, m); goto again; } while((m = le->m_head->m_nextpkt) != NULL) { @@ -733,6 +774,10 @@ again: * condense m into le, first * pull m out of the list. */ + KASSERT(((m->m_flags & M_LRO_EHDRSTRP) == 0) , + ("tp:%p mbuf:%p has stripped ethernet flags:0x%x", tp, m, m->m_flags)); + KASSERT(((m->m_flags & M_ACKCMP) == 0), + ("LRO condense lc:%p le:%p reaches with mbuf:%p ackcmp", lc, le, m)); le->m_head->m_nextpkt = m->m_nextpkt; m->m_nextpkt = NULL; /* Setup my data */ @@ -743,22 +788,13 @@ again: ts_ptr = (uint32_t *)(th + 1); l = (th->th_off << 2); l -= sizeof(*th); - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 1, 0, 0, 0, 0); - } if (le->append_cnt >= lc->lro_ackcnt_lim) { - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 2, 0, 0, 0, 0); - } - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if (le->p_len > (lc->lro_length_lim - tcp_data_len)) { /* Flush now if appending will result in overflow. */ - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 3, tcp_data_len, 0, 0, 0); - } - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if (l != 0 && (__predict_false(l != TCPOLEN_TSTAMP_APPA) || @@ -771,18 +807,18 @@ again: * and flush it (calling the replace again possibly * or just returning). */ - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0) { - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if (l != 0) { uint32_t tsval = ntohl(*(ts_ptr + 1)); /* Make sure timestamp values are increasing. */ if (TSTMP_GT(le->tsval, tsval)) { - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } le->tsval = tsval; @@ -794,13 +830,7 @@ again: le->ack_seq == th->th_ack && le->window == th->th_win))) { /* Out of order packet or duplicate ACK. */ - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 4, tcp_data_len, - ntohl(th->th_seq), - th->th_ack, - th->th_win); - } - tcp_push_and_replace(tp, lc, le, m, locked); + tcp_push_and_replace(tp, lc, le, m); goto again; } if (tcp_data_len || SEQ_GT(ntohl(th->th_ack), ntohl(le->ack_seq))) { @@ -815,12 +845,6 @@ again: if (tcp_data_len == 0) { le->append_cnt++; le->mbuf_cnt--; - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 5, tcp_data_len, - ntohl(th->th_seq), - th->th_ack, - th->th_win); - } m_freem(m); continue; } @@ -833,12 +857,6 @@ again: * append new segment to existing mbuf chain. */ m_adj(m, m->m_pkthdr.len - tcp_data_len); - if (tp && locked) { - tcp_lro_log(tp, lc, le, m, 6, tcp_data_len, - ntohl(th->th_seq), - th->th_ack, - th->th_win); - } m_demote_pkthdr(m); le->m_tail->m_next = m; le->m_tail = m_last(m); @@ -861,30 +879,38 @@ tcp_queue_pkts(struct tcpcb *tp, struct lro_entry *le) le->m_head = NULL; le->m_last_mbuf = NULL; } -#endif -void -tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) +static struct mbuf * +tcp_lro_get_last_if_ackcmp(struct lro_ctrl *lc, struct lro_entry *le, struct inpcb *inp) +{ + struct mbuf *m = NULL; + struct tcpcb *tp; + + tp = intotcpcb(inp); + if (tp) { + /* Look at the last mbuf if any in queue */ + if ((tp->t_tail_pkt) && + (tp->t_tail_pkt->m_flags & M_ACKCMP)) { + if (M_TRAILINGSPACE(tp->t_tail_pkt) >= sizeof(struct tcp_ackent)) { + tcp_lro_log(tp, lc, le, NULL, 23, 0, 0, 0, 0); + m = tp->t_tail_pkt; + } else { + if ((inp->inp_flags2 & INP_MBUF_L_ACKS) == 0) { + counter_u64_add(tcp_would_have_but, 1); + inp->inp_flags2 |= INP_MBUF_L_ACKS; + } + } + } + } + return (m); +} + +static struct inpcb * +tcp_lro_lookup(struct lro_ctrl *lc, struct lro_entry *le) { - struct tcpcb *tp = NULL; - int locked = 0; -#ifdef TCPHPTS struct inpcb *inp = NULL; - int need_wakeup = 0, can_queue = 0; - struct epoch_tracker et; - /* Now lets lookup the inp first */ - CURVNET_SET(lc->ifp->if_vnet); - /* - * XXXRRS Currently the common input handler for - * mbuf queuing cannot handle VLAN Tagged. This needs - * to be fixed and the or condition removed (i.e. the - * common code should do the right lookup for the vlan - * tag and anything else that the vlan_input() does). - */ - if ((tcplro_stacks_wanting_mbufq == 0) || (le->m_head->m_flags & M_VLANTAG)) - goto skip_lookup; - NET_EPOCH_ENTER(et); + NET_EPOCH_ASSERT(); switch (le->eh_type) { #ifdef INET6 case ETHERTYPE_IPV6: @@ -903,14 +929,132 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) break; #endif } - NET_EPOCH_EXIT(et); - if (inp && ((inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT)) || - (inp->inp_flags2 & INP_FREED))) { - /* We don't want this guy */ - INP_WUNLOCK(inp); - inp = NULL; + return (inp); +} + +#endif +#ifdef NO +static void +stack_guard_prep(uint32_t *sg, int len) +{ + int i; + + for (i = 0; i < len; i++) { + sg[i] = 0xdeadc0de; } - if (inp && (inp->inp_flags2 & INP_SUPPORTS_MBUFQ)) { +} + +static void +stack_guard_check(struct lro_ctrl *lc, struct lro_entry *le, uint32_t *sg, int len) +{ + int i; + + for (i = 0; i < len; i++) { + if (sg[i] != 0xdeadc0de) + panic("Stack guard fails sg[%d] = 0x%x le:%p lc:%p sg:%p\n", + i, sg[i], le, lc, sg); + } +} +#endif + +void +tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) +{ + struct tcpcb *tp = NULL; +#ifdef TCPHPTS + struct inpcb *inp = NULL; + int need_wakeup = 0, can_queue = 0; + + /* Now lets lookup the inp first */ + CURVNET_SET(lc->ifp->if_vnet); + /* + * XXXRRS Currently the common input handler for + * mbuf queuing cannot handle VLAN Tagged. This needs + * to be fixed and the or condition removed (i.e. the + * common code should do the right lookup for the vlan + * tag and anything else that the vlan_input() does). + */ + if (le->m_head == NULL) { + /* + * Everything was pushed up to the stack nothing to do + * but release the reference and be done. + */ + if (le->inp) { + INP_WLOCK(le->inp); + if (in_pcbrele_wlocked(le->inp) == 0) { + /* + * We released it and still + * have the lock. + */ + INP_WUNLOCK(le->inp); + } + } + goto done; + } + if ((tcplro_stacks_wanting_mbufq == 0) || (le->m_head->m_flags & M_VLANTAG)) + goto skip_lookup; + + if (le->inp == NULL) { + le->inp = inp = tcp_lro_lookup(lc, le); + if (inp && ((inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT)) || + (inp->inp_flags2 & INP_FREED))) { + /* + * We can't present these to the inp since + * it will not support the stripped ethernet + * header that these have nor if a compressed + * ack is presnet. + */ + INP_WUNLOCK(inp); + lro_free_mbuf_chain(le->m_head); + goto done; + } + if ((le->flags & HAS_COMP_ENTRIES) && + ((inp->inp_flags2 & INP_MBUF_ACKCMP) == 0)) { + /* + * It swapped to off, must be a stack + * switch. We need to ditch all the packets + * and the peer will just have to retransmit. + */ + INP_WUNLOCK(inp); + lro_free_mbuf_chain(le->m_head); + goto done; + } + } else { + /* We have a reference on the inp lets lock and release it */ + inp = le->inp; + INP_WLOCK(inp); + if (in_pcbrele_wlocked(inp)) { + /* + * We lost the inp. We can't present these to the inp since + * it will not support the stripped off etherent header. + */ + lro_free_mbuf_chain(le->m_head); + goto done; + } + if (inp && ((inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT)) || + (inp->inp_flags2 & INP_FREED))) { + /* + * We can't present these to the inp since + * it may not support them. + */ + INP_WUNLOCK(inp); + lro_free_mbuf_chain(le->m_head); + goto done; + } + if ((le->flags & HAS_COMP_ENTRIES) && + ((inp->inp_flags2 & INP_MBUF_ACKCMP) == 0)) { + /* + * It swapped to off, must be a stack + * switch. We need to ditch all the packets + * and the peer will just have to retransmit. + */ + INP_WUNLOCK(inp); + lro_free_mbuf_chain(le->m_head); + goto done; + } + } + if (inp && ((inp->inp_flags2 & INP_SUPPORTS_MBUFQ) || + (inp->inp_flags2 & INP_MBUF_ACKCMP))) { /* The transport supports mbuf queuing */ can_queue = 1; if (le->need_wakeup || @@ -938,10 +1082,9 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) (le->mbuf_cnt >= lc->lro_ackcnt_lim)) need_wakeup = 1; } - if (inp) { + if (inp) tp = intotcpcb(inp); - locked = 1; - } else + else tp = NULL; if (can_queue) { counter_u64_add(tcp_inp_lro_direct_queue, 1); @@ -953,35 +1096,52 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) * We must get the guy to wakeup via * hpts. */ - counter_u64_add(tcp_inp_lro_wokeup_queue, 1); - if (le->need_wakeup) + NET_EPOCH_ASSERT(); + if (le->need_wakeup == 2) { + /* + * The value 2 is set if the + * options are unrecognized i.e. + * not just a timestamp. So really + * sack is usually what it is but + * it might be some other option (CWR + * etc). + */ counter_u64_add(tcp_inp_lro_sack_wake, 1); - tcp_queue_to_input(inp); + } + counter_u64_add(tcp_inp_lro_wokeup_queue, 1); + if ((*tp->t_fb->tfb_do_queued_segments)(inp->inp_socket, tp, 0)) { + inp = NULL; + } } } - if (inp && (hold_lock_over_compress == 0)) { + if (inp) { /* Unlock it */ - locked = 0; tp = NULL; counter_u64_add(tcp_inp_lro_locks_taken, 1); INP_WUNLOCK(inp); } if (can_queue == 0) { skip_lookup: + if (le->strip_cnt) { + /* + * We have stripped mbufs, the connection + * must have changed underneath us. You + * loose the packets as a penalty. + */ + lro_free_mbuf_chain(le->m_head); + goto done; + } #endif /* TCPHPTS */ /* Old fashioned lro method */ if (le->m_head != le->m_last_mbuf) { counter_u64_add(tcp_inp_lro_compressed, 1); - tcp_lro_condense(tp, lc, le, locked); + tcp_lro_condense(tp, lc, le); } else counter_u64_add(tcp_inp_lro_single_push, 1); - tcp_flush_out_le(tp, lc, le, locked); + tcp_flush_out_le(tp, lc, le); #ifdef TCPHPTS } - if (inp && locked) { - counter_u64_add(tcp_inp_lro_locks_taken, 1); - INP_WUNLOCK(inp); - } +done: CURVNET_RESTORE(); #endif lc->lro_flushed++; @@ -1088,6 +1248,7 @@ tcp_lro_flush_all(struct lro_ctrl *lc) if (lc->lro_mbuf_count == 0) goto done; + microuptime(&lc->lro_last_flush); /* sort all mbufs according to stream */ tcp_lro_sort(lc->lro_mbuf_data, lc->lro_mbuf_count); @@ -1132,6 +1293,201 @@ lro_set_mtime(struct timeval *tv, struct timespec *ts) tv->tv_usec = ts->tv_nsec / 1000; } +static void +build_ack_entry(struct tcp_ackent *ae, struct tcphdr *th, struct mbuf *m, uint16_t hdr_len, uint16_t iptos) +{ + /* + * Given a TCP ack, summarize it down into the small tcp + * ack entry. + */ + u_char *cp; + + + KASSERT(((th->th_flags & ~(TH_ACK | TH_PUSH | TH_CWR | TH_ECE)) == 0), + ("tcphdr:%p mbuf:%p has unallowed bits %x", th, m, th->th_flags)); + ae->timestamp = m->m_pkthdr.rcv_tstmp; + if (m->m_flags & M_TSTMP_LRO) + ae->flags = TSTMP_LRO; + else if (m->m_flags & M_TSTMP) + ae->flags = TSTMP_HDWR; + ae->seq = ntohl(th->th_seq); + ae->ack = ntohl(th->th_ack); + ae->flags |= th->th_flags; + if (hdr_len) { + /* We have a timestamp options get out the bits */ + cp = (u_char *)(th + 1); + /* Skip the two NOP's at the front */ + while (*cp == TCPOPT_NOP) + cp++; + KASSERT(((*cp == TCPOPT_TIMESTAMP) && + (cp[1] == TCPOLEN_TIMESTAMP)), + ("At %p in tcphdr:%p options of %d not timestamp", + cp, th, hdr_len)); + bcopy((char *)cp + 2, + (char *)&ae->ts_value, sizeof(uint32_t)); + ae->ts_value = ntohl(ae->ts_value); + bcopy((char *)cp + 6, + (char *)&ae->ts_echo, sizeof(uint32_t)); + ae->ts_echo = ntohl(ae->ts_echo); + ae->flags |= HAS_TSTMP; + } + ae->win = ntohs(th->th_win); + ae->codepoint = iptos; +} + +static struct mbuf * +do_bpf_and_csum(struct inpcb *inp, struct lro_ctrl *lc, struct lro_entry *le, + struct ether_header *eh, struct mbuf *m, int bpf_req, int locked) +{ + /* + * Do TCP/IP checksum and BPF tap for either ACK_CMP packets or + * MBUF QUEUE type packets. + */ + struct tcphdr *th; +#ifdef INET6 + struct ip6_hdr *ip6 = NULL; /* Keep compiler happy. */ +#endif +#ifdef INET + struct ip *ip = NULL; /* Keep compiler happy. */ +#endif + + uint16_t drop_hdrlen; + int etype, tlen; + uint8_t iptos; + + /* Let the BPF see the packet */ + if (bpf_req && lc->ifp) + ETHER_BPF_MTAP(lc->ifp, m); + /* Get type and Trim off the ethernet header */ + m->m_pkthdr.lro_etype = etype = ntohs(eh->ether_type); + m_adj(m, sizeof(*eh)); + m->m_flags |= M_LRO_EHDRSTRP; + switch (etype) { +#ifdef INET6 + case ETHERTYPE_IPV6: + { + if (m->m_len < (sizeof(*ip6) + sizeof(*th))) { + m = m_pullup(m, sizeof(*ip6) + sizeof(*th)); + if (m == NULL) { + TCPSTAT_INC(tcps_rcvshort); + m_freem(m); + return (NULL); + } + } + ip6 = (struct ip6_hdr *)(eh + 1); + th = (struct tcphdr *)(ip6 + 1); + tlen = ntohs(ip6->ip6_plen); + drop_hdrlen = sizeof(*ip6); + if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) { + if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) { + counter_u64_add(tcp_csum_hardware_w_ph, 1); + th->th_sum = m->m_pkthdr.csum_data; + } else { + counter_u64_add(tcp_csum_hardware, 1); + th->th_sum = in6_cksum_pseudo(ip6, tlen, + IPPROTO_TCP, m->m_pkthdr.csum_data); + } + th->th_sum ^= 0xffff; + } else { + counter_u64_add(tcp_csum_software, 1); + th->th_sum = in6_cksum(m, IPPROTO_TCP, drop_hdrlen, tlen); + } + if (th->th_sum) { + TCPSTAT_INC(tcps_rcvbadsum); + if (locked) { + /* Log the bad news */ + struct tcpcb *tp = intotcpcb(inp); + + tcp_lro_log(tp, lc, le, m, 13, tlen, m->m_pkthdr.csum_flags, drop_hdrlen, th->th_sum); + } + m_freem(m); + return (NULL); + } + + + + + /* + * Be proactive about unspecified IPv6 address in source. + * As we use all-zero to indicate unbounded/unconnected pcb, + * unspecified IPv6 address can be used to confuse us. + * + * Note that packets with unspecified IPv6 destination is + * already dropped in ip6_input. + */ + if (IN6_IS_ADDR_UNSPECIFIED(&ip6->ip6_src)) { + /* XXX stat */ + m_freem(m); + return (NULL); + } + break; + } +#endif +#ifdef INET + case ETHERTYPE_IP: + { + if (m->m_len < sizeof (struct tcpiphdr)) { + if ((m = m_pullup(m, sizeof (struct tcpiphdr))) + == NULL) { + TCPSTAT_INC(tcps_rcvshort); + m_freem(m); + return (NULL); + } + } + ip = (struct ip *)(eh + 1); + th = (struct tcphdr *)(ip + 1); + iptos = ip->ip_tos; + drop_hdrlen = sizeof(*ip); + tlen = ntohs(ip->ip_len) - sizeof(struct ip); + if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { + if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) { + counter_u64_add(tcp_csum_hardware_w_ph, 1); + th->th_sum = m->m_pkthdr.csum_data; + } else { + counter_u64_add(tcp_csum_hardware, 1); + th->th_sum = in_pseudo(ip->ip_src.s_addr, + ip->ip_dst.s_addr, + htonl(m->m_pkthdr.csum_data + tlen + + IPPROTO_TCP)); + } + th->th_sum ^= 0xffff; + } else { + int len; + struct ipovly *ipov = (struct ipovly *)ip; + /* + * Checksum extended TCP header and data. + */ + counter_u64_add(tcp_csum_software, 1); + len = drop_hdrlen + tlen; + bzero(ipov->ih_x1, sizeof(ipov->ih_x1)); + ipov->ih_len = htons(tlen); + th->th_sum = in_cksum(m, len); + /* Reset length for SDT probes. */ + ip->ip_len = htons(len); + /* Reset TOS bits */ + ip->ip_tos = iptos; + /* Re-initialization for later version check */ + ip->ip_v = IPVERSION; + ip->ip_hl = sizeof(*ip) >> 2; + } + if (th->th_sum) { + TCPSTAT_INC(tcps_rcvbadsum); + if (locked) { + /* Log the bad news */ + struct tcpcb *tp = intotcpcb(inp); + + tcp_lro_log(tp, lc, le, m, 13, tlen, m->m_pkthdr.csum_flags, drop_hdrlen, th->th_sum); + } + m_freem(m); + return (NULL); + } + break; + } +#endif + } /* end switch */ + return (m); +} + static int tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) { @@ -1147,11 +1503,17 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) void *l3hdr = NULL; /* Keep compiler happy. */ uint32_t *ts_ptr; tcp_seq seq; - int error, ip_len, l; + int error, ip_len, hdr_len, locked = 0; uint16_t eh_type, tcp_data_len, need_flush; +#ifdef TCPHPTS + uint16_t iptos; +#endif struct lro_head *bucket; struct timespec arrv; + /* Clear the flags we may use to communicate with TCP */ + m->m_flags &= ~(M_ACKCMP|M_LRO_EHDRSTRP); + /* We expect a contiguous header [eh, ip, tcp]. */ if ((m->m_flags & (M_TSTMP_LRO|M_TSTMP)) == 0) { /* If no hardware or arrival stamp on the packet add arrival */ @@ -1177,6 +1539,9 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) if (error != 0) return (error); tcp_data_len = ntohs(ip6->ip6_plen); +#ifdef TCPHPTS + iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; +#endif ip_len = sizeof(*ip6) + tcp_data_len; break; } @@ -1196,6 +1561,9 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) if (error != 0) return (error); ip_len = ntohs(ip4->ip_len); +#ifdef TCPHPTS + iptos = ip4->ip_tos; +#endif tcp_data_len = ip_len - sizeof(*ip4); break; } @@ -1209,29 +1577,29 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) * If the frame is padded beyond the end of the IP packet, then we must * trim the extra bytes off. */ - l = m->m_pkthdr.len - (ETHER_HDR_LEN + ip_len); - if (l != 0) { - if (l < 0) + hdr_len = m->m_pkthdr.len - (ETHER_HDR_LEN + ip_len); + if (hdr_len != 0) { + if (hdr_len < 0) /* Truncated packet. */ return (TCP_LRO_CANNOT); - m_adj(m, -l); + m_adj(m, -hdr_len); } /* * Check TCP header constraints. */ + hdr_len = (th->th_off << 2); + ts_ptr = (uint32_t *)(th + 1); + tcp_data_len -= hdr_len; + hdr_len -= sizeof(*th); if (th->th_flags & TH_SYN) return (TCP_LRO_CANNOT); - if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0) + if ((th->th_flags & ~(TH_ACK | TH_PUSH)) != 0) { need_flush = 1; - else + } else need_flush = 0; - l = (th->th_off << 2); - ts_ptr = (uint32_t *)(th + 1); - tcp_data_len -= l; - l -= sizeof(*th); - if (l != 0 && (__predict_false(l != TCPOLEN_TSTAMP_APPA) || - (*ts_ptr != ntohl(TCPOPT_NOP<<24|TCPOPT_NOP<<16| + if (hdr_len != 0 && (__predict_false(hdr_len != TCPOLEN_TSTAMP_APPA) || + (*ts_ptr != ntohl(TCPOPT_NOP<<24|TCPOPT_NOP<<16| TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)))) { /* * We have an option besides Timestamps, maybe @@ -1241,7 +1609,6 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) */ need_flush = 2; } - /* If the driver did not pass in the checksum, set it now. */ if (csum == 0x0000) csum = th->th_sum; @@ -1312,6 +1679,65 @@ tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) m_freem(m); return (0); } +#ifdef TCPHPTS + if ((tcplro_stacks_wanting_mbufq == 0) || (m->m_flags & M_VLANTAG)) + goto skip_lookup_a; + if (le->inp == NULL) { + CURVNET_SET(lc->ifp->if_vnet); + le->inp = tcp_lro_lookup(lc, le); + if (le->inp) { + in_pcbref(le->inp); + locked = 1; + } + CURVNET_RESTORE(); + } else if (le->inp) { + INP_WLOCK(le->inp); + locked = 1; + } + if (locked && ((le->inp->inp_flags & (INP_DROPPED|INP_TIMEWAIT)) || + (le->inp->inp_flags2 & INP_FREED))) { + /* We can't present these to the inp since + * its dead Jim. + */ + int ret; + + ret = in_pcbrele_wlocked(le->inp); + if (ret == 0) + INP_WUNLOCK(le->inp); + le->inp = NULL; + locked = 0; + tcp_lro_active_remove(le); + if (le->strip_cnt && le->m_head) { + /* + * If we have any stripped packets we + * just dump the whole chain. The + * tcp_lro_flush code knows how + * to handle things when le->m_head is NULL + * and even le->inp is NULL. + */ + lro_free_mbuf_chain(le->m_head); + le->m_head = NULL; + } + tcp_lro_flush(lc, le); + return (TCP_LRO_CANNOT); + } + /* See if it has been switched on */ + if (le->inp && (le->inp->inp_flags2 & INP_MBUF_ACKCMP)) + le->flags |= CAN_USE_ACKCMP; + + if ((need_flush == 1) && + le->inp && *** 427 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 15:47:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DFCEC546CDE; Wed, 17 Feb 2021 15:47: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 4Dghzq63dRz3jrt; Wed, 17 Feb 2021 15:47: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 BEE1D27386; Wed, 17 Feb 2021 15:47: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 11HFlJcN073713; Wed, 17 Feb 2021 15:47:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HFlJsx073712; Wed, 17 Feb 2021 15:47:19 GMT (envelope-from git) Date: Wed, 17 Feb 2021 15:47:19 GMT Message-Id: <202102171547.11HFlJsx073712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Hans Petter Selasky Subject: git: d23b583dfdd5 - main - Bump the FreeBSD kernel version in kernel boot shim. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d23b583dfdd5669aeeb0693bdf3b30bfde98d4b4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 15:47:19 -0000 The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d23b583dfdd5669aeeb0693bdf3b30bfde98d4b4 commit d23b583dfdd5669aeeb0693bdf3b30bfde98d4b4 Author: Hans Petter Selasky AuthorDate: 2021-02-17 15:45:09 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-17 15:46:34 +0000 Bump the FreeBSD kernel version in kernel boot shim. Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index 3ec1f54f74e4..d99d9ef0cecb 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -32,7 +32,7 @@ #endif #undef __FreeBSD_version -#define __FreeBSD_version 1300000 +#define __FreeBSD_version 1400000 #include #include From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:02:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AD015547EAA; Wed, 17 Feb 2021 16:02: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 4DgjK34VRBz3lPZ; Wed, 17 Feb 2021 16:02: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 8D5A3274D8; Wed, 17 Feb 2021 16:02: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 11HG2FE4099523; Wed, 17 Feb 2021 16:02:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HG2FVf099522; Wed, 17 Feb 2021 16:02:15 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:02:15 GMT Message-Id: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility 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/main X-Git-Reftype: branch X-Git-Commit: 8ba333e02eaa59337a4e1d5534d4e894344c8226 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:02:15 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8ba333e02eaa59337a4e1d5534d4e894344c8226 commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 Author: Mark Johnston AuthorDate: 2021-02-17 15:49:38 +0000 Commit: Mark Johnston CommitDate: 2021-02-17 15:57:19 +0000 libdtrace: Stop relying on lex compatibility It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached. PR: 253440 MFC after: 3 days Sponsored by: The FreeBSD Foundation --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- cddl/lib/libdtrace/Makefile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index f2c60a2b07d4..b3f69bb6329d 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 +717,7 @@ extern dt_pcb_t *yypcb; /* pointer to current parser control block */ extern char yyintprefix; /* int token prefix for macros (+/-) */ extern char yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdecimal; /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; /* lex input buffer */ +extern char *yytext; /* lex input buffer */ extern int yylineno; /* lex line number */ extern int yydebug; /* lex debugging */ extern dt_node_t *yypragma; /* lex token list for control lines */ diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index efd73751e2c0..45ca1692cf48 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -129,8 +129,6 @@ SRCS+= dis_tables.c DSRCS+= regs_x86.d .endif -LFLAGS+=-l - YFLAGS+=-d LIBADD= ctf elf proc pthread rtld_db From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:07:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 27EA5547FB7; Wed, 17 Feb 2021 16:07: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 4DgjRD6M3gz3lTK; Wed, 17 Feb 2021 16:07: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 CCA72273DD; Wed, 17 Feb 2021 16:07: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 11HG7aDb000753; Wed, 17 Feb 2021 16:07:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HG7aXv000752; Wed, 17 Feb 2021 16:07:36 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:07:36 GMT Message-Id: <202102171607.11HG7aXv000752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: de2b94228075 - main - arm64: validate breakpoint registers 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/main X-Git-Reftype: branch X-Git-Commit: de2b9422807586d376ec7ffa7b660cd492464bdf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:07:37 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=de2b9422807586d376ec7ffa7b660cd492464bdf commit de2b9422807586d376ec7ffa7b660cd492464bdf Author: Mitchell Horne AuthorDate: 2021-02-09 18:29:38 +0000 Commit: Mitchell Horne CommitDate: 2021-02-17 16:05:00 +0000 arm64: validate breakpoint registers In particular, we want to disallow setting breakpoints on kernel addresses from userspace. The control register fields are validated or ignored as appropriate. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28560 --- sys/arm64/arm64/machdep.c | 37 +++++++++++++++++++++++++++++++++---- sys/arm64/include/armreg.h | 17 +++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 90fc19d57415..bf44dba19482 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -357,6 +357,8 @@ int set_dbregs(struct thread *td, struct dbreg *regs) { struct debug_monitor_state *monitor; + uint64_t addr; + uint32_t ctrl; int count; int i; @@ -364,11 +366,38 @@ set_dbregs(struct thread *td, struct dbreg *regs) count = 0; monitor->dbg_enable_count = 0; for (i = 0; i < DBG_BRP_MAX; i++) { - /* TODO: Check these values */ - monitor->dbg_bvr[i] = regs->db_regs[i].dbr_addr; - monitor->dbg_bcr[i] = regs->db_regs[i].dbr_ctrl; - if ((monitor->dbg_bcr[i] & 1) != 0) + addr = regs->db_regs[i].dbr_addr; + ctrl = regs->db_regs[i].dbr_ctrl; + + /* Don't let the user set a breakpoint on a kernel address. */ + if (addr >= VM_MAXUSER_ADDRESS) + return (EINVAL); + + /* + * The lowest 2 bits are ignored, so record the effective + * address. + */ + addr = rounddown2(addr, 4); + + /* + * Some control fields are ignored, and other bits reserved. + * Only unlinked, address-matching breakpoints are supported. + * + * XXX: fields that appear unvalidated, such as BAS, have + * constrained undefined behaviour. If the user mis-programs + * these, there is no risk to the system. + */ + ctrl &= DBG_BCR_EN | DBG_BCR_PMC | DBG_BCR_BAS; + if ((ctrl & DBG_BCR_EN) != 0) { + /* Only target EL0. */ + if ((ctrl & DBG_BCR_PMC) != DBG_BCR_PMC_EL0) + return (EINVAL); + monitor->dbg_enable_count++; + } + + monitor->dbg_bvr[i] = addr; + monitor->dbg_bcr[i] = ctrl; } if (monitor->dbg_enable_count > 0) monitor->dbg_flags |= DBGMON_ENABLED; diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index f5d25a572466..f2bce02782ec 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -944,6 +944,23 @@ #define DBG_MDSCR_KDE (0x1 << 13) #define DBG_MDSCR_MDE (0x1 << 15) +/* Debug Breakpoint Control Registers */ +#define DBG_BCR_EN 0x1 +#define DBG_BCR_PMC_SHIFT 1 +#define DBG_BCR_PMC (0x3 << DBG_BCR_PMC_SHIFT) +#define DBG_BCR_PMC_EL1 (0x1 << DBG_BCR_PMC_SHIFT) +#define DBG_BCR_PMC_EL0 (0x2 << DBG_BCR_PMC_SHIFT) +#define DBG_BCR_BAS_SHIFT 5 +#define DBG_BCR_BAS (0xf << DBG_BCR_BAS_SHIFT) +#define DBG_BCR_HMC_SHIFT 13 +#define DBG_BCR_HMC (0x1 << DBG_BCR_HMC_SHIFT) +#define DBG_BCR_SSC_SHIFT 14 +#define DBG_BCR_SSC (0x3 << DBG_BCR_SSC_SHIFT) +#define DBG_BCR_LBN_SHIFT 16 +#define DBG_BCR_LBN (0xf << DBG_BCR_LBN_SHIFT) +#define DBG_BCR_BT_SHIFT 20 +#define DBG_BCR_BT (0xf << DBG_BCR_BT_SHIFT) + /* Perfomance Monitoring Counters */ #define PMCR_E (1 << 0) /* Enable all counters */ #define PMCR_P (1 << 1) /* Reset all counters */ From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:08:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4FC3C54853F; Wed, 17 Feb 2021 16:08: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 4DgjS21sLKz3lm2; Wed, 17 Feb 2021 16:08: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 2852327679; Wed, 17 Feb 2021 16:08: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 11HG8IC9000957; Wed, 17 Feb 2021 16:08:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HG8Ivs000956; Wed, 17 Feb 2021 16:08:18 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:08:18 GMT Message-Id: <202102171608.11HG8Ivs000956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: bd012c715923 - main - arm64: handle watchpoint exceptions from EL0 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/main X-Git-Reftype: branch X-Git-Commit: bd012c71592323d957b409bb5e0cf7940729650e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:08:18 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=bd012c71592323d957b409bb5e0cf7940729650e commit bd012c71592323d957b409bb5e0cf7940729650e Author: Mitchell Horne AuthorDate: 2021-02-05 21:46:48 +0000 Commit: Mitchell Horne CommitDate: 2021-02-17 16:05:00 +0000 arm64: handle watchpoint exceptions from EL0 This is a prerequisite to allowing the use of hardware watchpoints for userspace debuggers. This is also a slight departure from the x86 behaviour, since `si_addr` returns the data address that triggered the watchpoint, not the address of the instruction that was executed. Otherwise, there is no straightforward way for the application to determine which watchpoint was triggered. Make a note of this in the siginfo(3) man page. Reviewed by: jhb, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28561 --- share/man/man3/siginfo.3 | 7 ++++++- sys/arm64/arm64/trap.c | 6 ++++++ sys/arm64/include/armreg.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/share/man/man3/siginfo.3 b/share/man/man3/siginfo.3 index fc4ea2ba1df7..acc8785b2f0d 100644 --- a/share/man/man3/siginfo.3 +++ b/share/man/man3/siginfo.3 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2020 +.Dd February 17, 2021 .Dt SIGINFO 3 .Os .Sh NAME @@ -218,6 +218,11 @@ and may report the address of the faulting memory access (if available) in .Va si_addr instead. +Additionally +.Dv SIGTRAP +raised by a hardware watchpoint exception may report the data address that +triggered the watchpoint in +.Va si_addr . .Pp Sychronous signals set .Va si_trapno diff --git a/sys/arm64/arm64/trap.c b/sys/arm64/arm64/trap.c index 0b2d4760cea3..cb3a05ad0163 100644 --- a/sys/arm64/arm64/trap.c +++ b/sys/arm64/arm64/trap.c @@ -474,6 +474,7 @@ do_el0_sync(struct thread *td, struct trapframe *frame) case EXCP_UNKNOWN: case EXCP_DATA_ABORT_L: case EXCP_DATA_ABORT: + case EXCP_WATCHPT_EL0: far = READ_SPECIALREG(far_el1); break; } @@ -534,6 +535,11 @@ do_el0_sync(struct thread *td, struct trapframe *frame) exception); userret(td, frame); break; + case EXCP_WATCHPT_EL0: + call_trapsignal(td, SIGTRAP, TRAP_TRACE, (void *)far, + exception); + userret(td, frame); + break; case EXCP_MSR: /* * The CPU can raise EXCP_MSR when userspace executes an mrs diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index f2bce02782ec..70390d4ebf1e 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -230,6 +230,7 @@ #define EXCP_BRKPT_EL0 0x30 /* Hardware breakpoint, from same EL */ #define EXCP_SOFTSTP_EL0 0x32 /* Software Step, from lower EL */ #define EXCP_SOFTSTP_EL1 0x33 /* Software Step, from same EL */ +#define EXCP_WATCHPT_EL0 0x34 /* Watchpoint, from lower EL */ #define EXCP_WATCHPT_EL1 0x35 /* Watchpoint, from same EL */ #define EXCP_BRK 0x3c /* Breakpoint */ From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:08:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 569605486A0; Wed, 17 Feb 2021 16:08: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 4DgjSj228Mz3m1H; Wed, 17 Feb 2021 16:08: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 38E2F26EF7; Wed, 17 Feb 2021 16:08: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 11HG8rJh001149; Wed, 17 Feb 2021 16:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HG8rpf001148; Wed, 17 Feb 2021 16:08:53 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:08:53 GMT Message-Id: <202102171608.11HG8rpf001148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: f2583be110ca - main - arm64: extend struct db_reg to include watchpoint registers 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/main X-Git-Reftype: branch X-Git-Commit: f2583be110ca3a5b32f0993f1464a5c69151c62f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:08:53 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=f2583be110ca3a5b32f0993f1464a5c69151c62f commit f2583be110ca3a5b32f0993f1464a5c69151c62f Author: Mitchell Horne AuthorDate: 2021-01-28 17:49:47 +0000 Commit: Mitchell Horne CommitDate: 2021-02-17 16:05:00 +0000 arm64: extend struct db_reg to include watchpoint registers The motivation is to provide access to these registers from userspace via ptrace(2) requests PT_GETDBREGS and PT_SETDBREGS. This change breaks the ABI of these particular requests, but is justified by the fact that the intended consumers (debuggers) have not been taught to use them yet. Making this change now enables active upstream work on lldb to begin using this interface, and take advantage of the hardware debugging registers available on the platform. PR: 252860 Reported by: Michał Górny (mgorny@gentoo.org) Reviewed by: andrew, markj (earlier version) Tested by: Michał Górny (mgorny@gentoo.org) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28415 --- sys/arm64/arm64/identcpu.c | 2 +- sys/arm64/arm64/machdep.c | 71 ++++++++++++++++++++++++++++++++++++++-------- sys/arm64/include/armreg.h | 22 ++++++++++++++ sys/arm64/include/reg.h | 13 +++++++-- 4 files changed, 92 insertions(+), 16 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index bfbaad7a6483..c3544e9de9aa 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -350,7 +350,7 @@ static struct mrs_field id_aa64dfr0_fields[] = { MRS_FIELD(ID_AA64DFR0, PMSVer, false, MRS_EXACT, id_aa64dfr0_pmsver), MRS_FIELD(ID_AA64DFR0, CTX_CMPs, false, MRS_EXACT, id_aa64dfr0_ctx_cmps), - MRS_FIELD(ID_AA64DFR0, WRPs, false, MRS_EXACT, id_aa64dfr0_wrps), + MRS_FIELD(ID_AA64DFR0, WRPs, false, MRS_LOWER, id_aa64dfr0_wrps), MRS_FIELD(ID_AA64DFR0, BRPs, false, MRS_LOWER, id_aa64dfr0_brps), MRS_FIELD(ID_AA64DFR0, PMUVer, false, MRS_EXACT, id_aa64dfr0_pmuver), MRS_FIELD(ID_AA64DFR0, TraceVer, false, MRS_EXACT, diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index bf44dba19482..73b06beeba7e 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -321,8 +321,8 @@ int fill_dbregs(struct thread *td, struct dbreg *regs) { struct debug_monitor_state *monitor; - int count, i; - uint8_t debug_ver, nbkpts; + int i; + uint8_t debug_ver, nbkpts, nwtpts; memset(regs, 0, sizeof(*regs)); @@ -330,23 +330,30 @@ fill_dbregs(struct thread *td, struct dbreg *regs) &debug_ver); extract_user_id_field(ID_AA64DFR0_EL1, ID_AA64DFR0_BRPs_SHIFT, &nbkpts); + extract_user_id_field(ID_AA64DFR0_EL1, ID_AA64DFR0_WRPs_SHIFT, + &nwtpts); /* * The BRPs field contains the number of breakpoints - 1. Armv8-A * allows the hardware to provide 2-16 breakpoints so this won't - * overflow an 8 bit value. + * overflow an 8 bit value. The same applies to the WRPs field. */ - count = nbkpts + 1; + nbkpts++; + nwtpts++; - regs->db_info = debug_ver; - regs->db_info <<= 8; - regs->db_info |= count; + regs->db_debug_ver = debug_ver; + regs->db_nbkpts = nbkpts; + regs->db_nwtpts = nwtpts; monitor = &td->td_pcb->pcb_dbg_regs; if ((monitor->dbg_flags & DBGMON_ENABLED) != 0) { - for (i = 0; i < count; i++) { - regs->db_regs[i].dbr_addr = monitor->dbg_bvr[i]; - regs->db_regs[i].dbr_ctrl = monitor->dbg_bcr[i]; + for (i = 0; i < nbkpts; i++) { + regs->db_breakregs[i].dbr_addr = monitor->dbg_bvr[i]; + regs->db_breakregs[i].dbr_ctrl = monitor->dbg_bcr[i]; + } + for (i = 0; i < nwtpts; i++) { + regs->db_watchregs[i].dbw_addr = monitor->dbg_wvr[i]; + regs->db_watchregs[i].dbw_ctrl = monitor->dbg_wcr[i]; } } @@ -365,9 +372,10 @@ set_dbregs(struct thread *td, struct dbreg *regs) monitor = &td->td_pcb->pcb_dbg_regs; count = 0; monitor->dbg_enable_count = 0; + for (i = 0; i < DBG_BRP_MAX; i++) { - addr = regs->db_regs[i].dbr_addr; - ctrl = regs->db_regs[i].dbr_ctrl; + addr = regs->db_breakregs[i].dbr_addr; + ctrl = regs->db_breakregs[i].dbr_ctrl; /* Don't let the user set a breakpoint on a kernel address. */ if (addr >= VM_MAXUSER_ADDRESS) @@ -399,6 +407,45 @@ set_dbregs(struct thread *td, struct dbreg *regs) monitor->dbg_bvr[i] = addr; monitor->dbg_bcr[i] = ctrl; } + + for (i = 0; i < DBG_WRP_MAX; i++) { + addr = regs->db_watchregs[i].dbw_addr; + ctrl = regs->db_watchregs[i].dbw_ctrl; + + /* Don't let the user set a watchpoint on a kernel address. */ + if (addr >= VM_MAXUSER_ADDRESS) + return (EINVAL); + + /* + * Some control fields are ignored, and other bits reserved. + * Only unlinked watchpoints are supported. + */ + ctrl &= DBG_WCR_EN | DBG_WCR_PAC | DBG_WCR_LSC | DBG_WCR_BAS | + DBG_WCR_MASK; + + if ((ctrl & DBG_WCR_EN) != 0) { + /* Only target EL0. */ + if ((ctrl & DBG_WCR_PAC) != DBG_WCR_PAC_EL0) + return (EINVAL); + + /* Must set at least one of the load/store bits. */ + if ((ctrl & DBG_WCR_LSC) == 0) + return (EINVAL); + + /* + * When specifying the address range with BAS, the MASK + * field must be zero. + */ + if ((ctrl & DBG_WCR_BAS) != DBG_WCR_BAS_MASK && + (ctrl & DBG_WCR_MASK) != 0) + return (EINVAL); + + monitor->dbg_enable_count++; + } + monitor->dbg_wvr[i] = addr; + monitor->dbg_wcr[i] = ctrl; + } + if (monitor->dbg_enable_count > 0) monitor->dbg_flags |= DBGMON_ENABLED; diff --git a/sys/arm64/include/armreg.h b/sys/arm64/include/armreg.h index 70390d4ebf1e..af6e84e6c772 100644 --- a/sys/arm64/include/armreg.h +++ b/sys/arm64/include/armreg.h @@ -962,6 +962,28 @@ #define DBG_BCR_BT_SHIFT 20 #define DBG_BCR_BT (0xf << DBG_BCR_BT_SHIFT) +/* Debug Watchpoint Control Registers */ +#define DBG_WCR_EN 0x1 +#define DBG_WCR_PAC_SHIFT 1 +#define DBG_WCR_PAC (0x3 << DBG_WCR_PAC_SHIFT) +#define DBG_WCR_PAC_EL1 (0x1 << DBG_WCR_PAC_SHIFT) +#define DBG_WCR_PAC_EL0 (0x2 << DBG_WCR_PAC_SHIFT) +#define DBG_WCR_LSC_SHIFT 3 +#define DBG_WCR_LSC (0x3 << DBG_WCR_LSC_SHIFT) +#define DBG_WCR_BAS_SHIFT 5 +#define DBG_WCR_BAS (0xff << DBG_WCR_BAS_SHIFT) +#define DBG_WCR_BAS_MASK DBG_WCR_BAS +#define DBG_WCR_HMC_SHIFT 13 +#define DBG_WCR_HMC (0x1 << DBG_WCR_HMC_SHIFT) +#define DBG_WCR_SSC_SHIFT 14 +#define DBG_WCR_SSC (0x3 << DBG_WCR_SSC_SHIFT) +#define DBG_WCR_LBN_SHIFT 16 +#define DBG_WCR_LBN (0xf << DBG_WCR_LBN_SHIFT) +#define DBG_WCR_WT_SHIFT 20 +#define DBG_WCR_WT (0x1 << DBG_WCR_WT_SHIFT) +#define DBG_WCR_MASK_SHIFT 24 +#define DBG_WCR_MASK (0x1f << DBG_WCR_MASK_SHIFT) + /* Perfomance Monitoring Counters */ #define PMCR_E (1 << 0) /* Enable all counters */ #define PMCR_P (1 << 1) /* Reset all counters */ diff --git a/sys/arm64/include/reg.h b/sys/arm64/include/reg.h index aafe02b70925..9cfc5ea1d437 100644 --- a/sys/arm64/include/reg.h +++ b/sys/arm64/include/reg.h @@ -60,14 +60,21 @@ struct fpreg32 { }; struct dbreg { - uint32_t db_info; - uint32_t db_pad; + uint8_t db_debug_ver; + uint8_t db_nbkpts; + uint8_t db_nwtpts; + uint8_t db_pad[5]; struct { uint64_t dbr_addr; uint32_t dbr_ctrl; uint32_t dbr_pad; - } db_regs[16]; + } db_breakregs[16]; + struct { + uint64_t dbw_addr; + uint32_t dbw_ctrl; + uint32_t dbw_pad; + } db_watchregs[16]; }; struct dbreg32 { From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:09:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 48D2E5486B7; Wed, 17 Feb 2021 16:09: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 4DgjTc1fZ8z3mFV; Wed, 17 Feb 2021 16:09: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 2B93326EF8; Wed, 17 Feb 2021 16:09: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 11HG9eva001372; Wed, 17 Feb 2021 16:09:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HG9e0k001371; Wed, 17 Feb 2021 16:09:40 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:09:40 GMT Message-Id: <202102171609.11HG9e0k001371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 45eabf5754ac - main - Bump __FreeBSD_version after f2583be110ca 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/main X-Git-Reftype: branch X-Git-Commit: 45eabf5754ac1d291bd677fdf29f59ce4bbc2c8f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:09:40 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=45eabf5754ac1d291bd677fdf29f59ce4bbc2c8f commit 45eabf5754ac1d291bd677fdf29f59ce4bbc2c8f Author: Mitchell Horne AuthorDate: 2021-02-17 15:56:40 +0000 Commit: Mitchell Horne CommitDate: 2021-02-17 16:09:06 +0000 Bump __FreeBSD_version after f2583be110ca Provide a compatibility point around the ABI-breaking change. Sponsored by: The FreeBSD Foundation --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index fa02b55d1f1b..0f0854f359fd 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400004 /* Master, propagated to newvers */ +#define __FreeBSD_version 1400005 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:10:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1053A548901; Wed, 17 Feb 2021 16:10: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 4DgjVt6mxHz3mPT; Wed, 17 Feb 2021 16:10: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 DBBFA27815; Wed, 17 Feb 2021 16:10: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 11HGAkVm009021; Wed, 17 Feb 2021 16:10:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HGAkZY009020; Wed, 17 Feb 2021 16:10:46 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:10:46 GMT Message-Id: <202102171610.11HGAkZY009020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 39df2b568230 - main - arm64: use macros to access special register values 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/main X-Git-Reftype: branch X-Git-Commit: 39df2b568230e02350684e4f4d8353023daa1749 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:10:47 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=39df2b568230e02350684e4f4d8353023daa1749 commit 39df2b568230e02350684e4f4d8353023daa1749 Author: Mitchell Horne AuthorDate: 2021-01-28 17:53:00 +0000 Commit: Mitchell Horne CommitDate: 2021-02-17 16:09:45 +0000 arm64: use macros to access special register values --- sys/arm64/arm64/debug_monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index dcb3645cf5d4..eb5d19567697 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -471,11 +471,13 @@ dbg_register_sync(struct debug_monitor_state *monitor) void dbg_monitor_init(void) { + uint64_t aa64dfr0; u_int i; /* Find out many breakpoints and watchpoints we can use */ - dbg_watchpoint_num = ((READ_SPECIALREG(id_aa64dfr0_el1) >> 20) & 0xf) + 1; - dbg_breakpoint_num = ((READ_SPECIALREG(id_aa64dfr0_el1) >> 12) & 0xf) + 1; + aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); + dbg_watchpoint_num = ID_AA64DFR0_WRPs_VAL(aa64dfr0); + dbg_breakpoint_num = ID_AA64DFR0_BRPs_VAL(aa64dfr0); if (bootverbose && PCPU_GET(cpuid) == 0) { printf("%d watchpoints and %d breakpoints supported\n", From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:35:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D955C548F6D; Wed, 17 Feb 2021 16:35: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 4Dgk3F5nMRz3nxZ; Wed, 17 Feb 2021 16:35: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 B958027BE2; Wed, 17 Feb 2021 16:35: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 11HGZLcK040038; Wed, 17 Feb 2021 16:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HGZLAd040037; Wed, 17 Feb 2021 16:35:21 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:35:21 GMT Message-Id: <202102171635.11HGZLAd040037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 962a3814d4c8 - main - Fix bootstrap tools build on macOS after 02af91c52e71e8a0f47251e637c9687f35d45dd9 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 962a3814d4c838d21a67a4b704c64be843cb2b51 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:35:21 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=962a3814d4c838d21a67a4b704c64be843cb2b51 commit 962a3814d4c838d21a67a4b704c64be843cb2b51 Author: Alex Richardson AuthorDate: 2021-02-17 16:03:11 +0000 Commit: Alex Richardson CommitDate: 2021-02-17 16:35:14 +0000 Fix bootstrap tools build on macOS after 02af91c52e71e8a0f47251e637c9687f35d45dd9 After changing the namespace.h header we need to provide _err on macOS, too. Previously we used the system libc err*/warn*, but that does not provide _err/_warn (which is used by other bootstrapped files from libc). To fix this problem bootstrap err.c on macOS as well. Fixes: 02af91c52 (Fix crossbuild bootstrap tools build with Clang 12) --- tools/build/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/build/Makefile b/tools/build/Makefile index 48e62e6561b7..effe8b9cb31d 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -158,6 +158,9 @@ INCS+= ${SRCTOP}/include/getopt.h # getcap.c is needed for cap_mkdb: .PATH: ${LIBC_SRCTOP}/gen SRCS+= getcap.c +# Glibc does not provide all err*/warn* functions, and for macOS we need the +# alias with the extra underscore. +SRCS+= err.c # Add various libbc functions that are not available in glibc: SRCS+= stringlist.c setmode.c SRCS+= strtonum.c merge.c heapsort.c reallocf.c @@ -172,8 +175,8 @@ SRCS+= strlcpy.c strlcat.c strmode.c SRCS+= fgetln_fallback.c fgetwln_fallback.c closefrom.c CFLAGS.closefrom.c+= -DSTDC_HEADERS -DHAVE_SYS_DIR_H -DHAVE_DIRENT_H \ -DHAVE_DIRFD -DHAVE_SYSCONF -# Provide warnc/errc/getprogname/setprograme -SRCS+= err.c progname.c +# Provide getprogname/setprograme +SRCS+= progname.c # Stub implementations of fflagstostr/strtofflags SRCS+= fflags.c .endif From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:50:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 00798549811; Wed, 17 Feb 2021 16:50:26 +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 4DgkNd6gVxz3qCl; Wed, 17 Feb 2021 16:50: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 D80A6278ED; Wed, 17 Feb 2021 16:50: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 11HGoPW0061000; Wed, 17 Feb 2021 16:50:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HGoPaH060999; Wed, 17 Feb 2021 16:50:25 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:50:25 GMT Message-Id: <202102171650.11HGoPaH060999@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: 00abeecb4a25 - releng/13.0 - pf: Slightly relax pf_rule_addr validation 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 00abeecb4a25728f36f763822bd584e7bf4f50b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:50:26 -0000 The branch releng/13.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=00abeecb4a25728f36f763822bd584e7bf4f50b7 commit 00abeecb4a25728f36f763822bd584e7bf4f50b7 Author: Kristof Provost AuthorDate: 2021-02-13 15:31:52 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 16:48:58 +0000 pf: Slightly relax pf_rule_addr validation Ensure we don't reject no-route / urpf-failed addresses. PR: 253479 Approved by: re (gjb) Reported by: michal AT microwave.sk Revied by: donner@ MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28650 (cherry picked from commit 5e42cb139fc17f165c9c93ac97069dc7770490e2) (cherry picked from commit f9a66bb91ae1f3f175d0c16730c683841525bd1d) --- sys/netpfil/pf/pf_ioctl.c | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 644a091808cd..edc8443dcc0a 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1557,9 +1557,33 @@ pf_krule_to_rule(const struct pf_krule *krule, struct pf_rule *rule) rule->u_src_nodes = counter_u64_fetch(krule->src_nodes); } +static int +pf_check_rule_addr(const struct pf_rule_addr *addr) +{ + + switch (addr->addr.type) { + case PF_ADDR_ADDRMASK: + case PF_ADDR_NOROUTE: + case PF_ADDR_DYNIFTL: + case PF_ADDR_TABLE: + case PF_ADDR_URPFFAILED: + case PF_ADDR_RANGE: + break; + default: + return (EINVAL); + } + + if (addr->addr.p.dyn != NULL) { + return (EINVAL); + } + + return (0); +} + static int pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) { + int ret; #ifndef INET if (rule->af == AF_INET) { @@ -1572,23 +1596,12 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) } #endif /* INET6 */ - if (rule->src.addr.type != PF_ADDR_ADDRMASK && - rule->src.addr.type != PF_ADDR_DYNIFTL && - rule->src.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->src.addr.p.dyn != NULL) { - return (EINVAL); - } - - if (rule->dst.addr.type != PF_ADDR_ADDRMASK && - rule->dst.addr.type != PF_ADDR_DYNIFTL && - rule->dst.addr.type != PF_ADDR_TABLE) { - return (EINVAL); - } - if (rule->dst.addr.p.dyn != NULL) { - return (EINVAL); - } + ret = pf_check_rule_addr(&rule->src); + if (ret != 0) + return (ret); + ret = pf_check_rule_addr(&rule->dst); + if (ret != 0) + return (ret); bzero(krule, sizeof(*krule)); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:50:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2F91F54943C; Wed, 17 Feb 2021 16:50: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 4DgkNg0n20z3qLC; Wed, 17 Feb 2021 16:50: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 04091DE; Wed, 17 Feb 2021 16:50: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 11HGoQEF061022; Wed, 17 Feb 2021 16:50:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HGoQ8I061021; Wed, 17 Feb 2021 16:50:26 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:50:26 GMT Message-Id: <202102171650.11HGoQ8I061021@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: 23f8fe51af0b - releng/13.0 - Widen ifnet_detach_sxlock coverage 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 23f8fe51af0b192857feef2d19be2aa8eb888000 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:50:27 -0000 The branch releng/13.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=23f8fe51af0b192857feef2d19be2aa8eb888000 commit 23f8fe51af0b192857feef2d19be2aa8eb888000 Author: Kristof Provost AuthorDate: 2021-02-08 09:04:27 +0000 Commit: Kristof Provost CommitDate: 2021-02-17 16:49:28 +0000 Widen ifnet_detach_sxlock coverage Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code. This ensures that we can't end up having the vnet_sysuninit free the UDP pcb while the detach code is running and trying to purge the UDP pcb. Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28530 (cherry picked from commit 6d2a10d96fb5d4ee42fd67b0b07a6d098db5d55a) (cherry picked from commit 05530211165f59b8dabc02adaf26ea29c2726ebc) --- sys/net/if.c | 13 ++++++------- sys/net/if.h | 3 +++ sys/net/vnet.c | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 74fdd066fd2d..c85cfab19bf6 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -315,7 +315,8 @@ struct sx ifnet_sxlock; SX_SYSINIT_FLAGS(ifnet_sx, &ifnet_sxlock, "ifnet_sx", SX_RECURSE); struct sx ifnet_detach_sxlock; -SX_SYSINIT(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx"); +SX_SYSINIT_FLAGS(ifnet_detach, &ifnet_detach_sxlock, "ifnet_detach_sx", + SX_RECURSE); /* * The allocation of network interfaces is a rather non-atomic affair; we @@ -546,9 +547,7 @@ vnet_if_return(const void *unused __unused) IFNET_WUNLOCK(); for (int j = 0; j < i; j++) { - sx_xlock(&ifnet_detach_sxlock); if_vmove(pending[j], pending[j]->if_home_vnet); - sx_xunlock(&ifnet_detach_sxlock); } free(pending, M_IFNET); @@ -1124,9 +1123,9 @@ if_detach(struct ifnet *ifp) CURVNET_SET_QUIET(ifp->if_vnet); found = if_unlink_ifnet(ifp, false); if (found) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); if_detach_internal(ifp, 0, NULL); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } CURVNET_RESTORE(); } @@ -3015,9 +3014,9 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct thread *td) error = priv_check(td, PRIV_NET_IFDESTROY); if (error == 0) { - sx_slock(&ifnet_detach_sxlock); + sx_xlock(&ifnet_detach_sxlock); error = if_clone_destroy(ifr->ifr_name); - sx_sunlock(&ifnet_detach_sxlock); + sx_xunlock(&ifnet_detach_sxlock); } goto out_noref; diff --git a/sys/net/if.h b/sys/net/if.h index a886474780dd..83597a7d390a 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -604,6 +604,9 @@ struct ifdownreason { MALLOC_DECLARE(M_IFADDR); MALLOC_DECLARE(M_IFMADDR); #endif + +extern struct sx ifnet_detach_sxlock; + #endif #ifndef _KERNEL diff --git a/sys/net/vnet.c b/sys/net/vnet.c index c5dafedbc6b2..2480fc8dd86c 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -283,7 +283,9 @@ vnet_destroy(struct vnet *vnet) vnet->vnet_shutdown = true; CURVNET_SET_QUIET(vnet); + sx_xlock(&ifnet_detach_sxlock); vnet_sysuninit(); + sx_xunlock(&ifnet_detach_sxlock); CURVNET_RESTORE(); /* From owner-dev-commits-src-all@freebsd.org Wed Feb 17 16:53:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A419D54946F; Wed, 17 Feb 2021 16:53: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 4DgkSQ4H3xz3qjC; Wed, 17 Feb 2021 16:53: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 8583E1ED; Wed, 17 Feb 2021 16:53: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 11HGrgLD065596; Wed, 17 Feb 2021 16:53:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HGrgKB065595; Wed, 17 Feb 2021 16:53:42 GMT (envelope-from git) Date: Wed, 17 Feb 2021 16:53:42 GMT Message-Id: <202102171653.11HGrgKB065595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 726e20f45041 - releng/13.0 - fmtree: add a deprecation notice to the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 726e20f450411981313d6a2f145107041d2ff6d2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 16:53:42 -0000 The branch releng/13.0 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=726e20f450411981313d6a2f145107041d2ff6d2 commit 726e20f450411981313d6a2f145107041d2ff6d2 Author: Kyle Evans AuthorDate: 2021-02-10 15:10:52 +0000 Commit: Kyle Evans CommitDate: 2021-02-17 16:53:25 +0000 fmtree: add a deprecation notice to the manpage Note that this mtree(8) is actually installed as fmtree(8), while mtree(8) is located in ^/contrib/mtree -- thus, the reference to mtree(8) makes a lot more sense in the context in which folks would actually notice it. Shout-out to Ravi for pointing out that this may not be an obvious fact. Approved by: re (gjb) Relnotes: yes (cherry picked from commit 6fea22cebe5cb1e51e98c894a738bea910b7bc2f) (cherry picked from commit be4b3e7a5bf9e7b497fcfcc242eebb84d29a6e42) --- usr.sbin/fmtree/mtree.8 | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/usr.sbin/fmtree/mtree.8 b/usr.sbin/fmtree/mtree.8 index c2901e6776da..f5b4de4e7438 100644 --- a/usr.sbin/fmtree/mtree.8 +++ b/usr.sbin/fmtree/mtree.8 @@ -28,7 +28,7 @@ .\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd June 16, 2007 +.Dd February 13, 2021 .Dt MTREE 8 .Os .Sh NAME @@ -362,6 +362,12 @@ style BSD.*.dist file, use .Fl n .Fl k .Cm uname,gname,mode,nochange. +.Sh DEPRECATION NOTICE +.Nm fmtree +is deprecated, and will be gone in +.Fx 14.0 . +.Xr mtree 8 +should be used instead. .Sh SEE ALSO .Xr chflags 1 , .Xr chgrp 1 , @@ -371,7 +377,8 @@ style BSD.*.dist file, use .Xr stat 2 , .Xr fts 3 , .Xr md5 3 , -.Xr chown 8 +.Xr chown 8 , +.Xr mtree 8 .Sh HISTORY The .Nm From owner-dev-commits-src-all@freebsd.org Wed Feb 17 17:50:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E03EE54C1D4; Wed, 17 Feb 2021 17:50: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 4DglkH63gQz3wQ2; Wed, 17 Feb 2021 17:50: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 C2EE9B6A; Wed, 17 Feb 2021 17:50: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 11HHoltf039865; Wed, 17 Feb 2021 17:50:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HHolCo039864; Wed, 17 Feb 2021 17:50:47 GMT (envelope-from git) Date: Wed, 17 Feb 2021 17:50:47 GMT Message-Id: <202102171750.11HHolCo039864@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: ab4fad4be144 - main - Add ifdef TCPHPTS around build_ack_entry and do_bpf_and_csum to avoid warnings when HPTS is not included MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab4fad4be14462e347ed24ee3663a18eacfb138e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 17:50:47 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=ab4fad4be14462e347ed24ee3663a18eacfb138e commit ab4fad4be14462e347ed24ee3663a18eacfb138e Author: Randall Stewart AuthorDate: 2021-02-17 17:49:42 +0000 Commit: Randall Stewart CommitDate: 2021-02-17 17:49:42 +0000 Add ifdef TCPHPTS around build_ack_entry and do_bpf_and_csum to avoid warnings when HPTS is not included Thanks to Gary Jennejohn for pointing this out. --- sys/netinet/tcp_lro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index aea55d7ae33f..199b7f9a79a0 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1293,6 +1293,7 @@ lro_set_mtime(struct timeval *tv, struct timespec *ts) tv->tv_usec = ts->tv_nsec / 1000; } +#ifdef TCPHPTS static void build_ack_entry(struct tcp_ackent *ae, struct tcphdr *th, struct mbuf *m, uint16_t hdr_len, uint16_t iptos) { @@ -1487,6 +1488,7 @@ do_bpf_and_csum(struct inpcb *inp, struct lro_ctrl *lc, struct lro_entry *le, } /* end switch */ return (m); } +#endif static int tcp_lro_rx2(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, int use_hash) From owner-dev-commits-src-all@freebsd.org Wed Feb 17 17:55:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C293554C39A; Wed, 17 Feb 2021 17:55: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 4Dglqx54RSz4RhQ; Wed, 17 Feb 2021 17:55: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 9CB04D5D; Wed, 17 Feb 2021 17:55: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 11HHtfZ0044630; Wed, 17 Feb 2021 17:55:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HHtfGr044629; Wed, 17 Feb 2021 17:55:41 GMT (envelope-from git) Date: Wed, 17 Feb 2021 17:55:41 GMT Message-Id: <202102171755.11HHtfGr044629@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: eefc7f388ab6 - stable/12 - kenv: avoid sleepable alloc for integer tunables 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: eefc7f388ab66a79f99a5f73236e9fbfc5312d4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 17:55:41 -0000 The branch stable/12 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=eefc7f388ab66a79f99a5f73236e9fbfc5312d4f commit eefc7f388ab66a79f99a5f73236e9fbfc5312d4f Author: Jason A. Harmening AuthorDate: 2020-08-14 21:37:38 +0000 Commit: Alexander Motin CommitDate: 2021-02-17 17:52:24 +0000 kenv: avoid sleepable alloc for integer tunables Avoid performing a potentially-blocking malloc for kenv lookups that will only perform non-destructive integer conversions on the returned buffer. Instead, perform the strtoq() in-place with the kenv lock held. While here, factor the logic around kenv_lock acquire and release into kenv_acquire() and kenv_release(), and use these functions for some light cleanup. Collapse getenv_string_buffer() into kern_getenv(), as the former no longer has any other callers and the only additional task performed by the latter is a WITNESS check that hasn't been useful since r362231. PR: 248250 Reported by: gbe Reviewed by: mjg Tested by: gbe Differential Revision: https://reviews.freebsd.org/D26010 --- sys/kern/kern_environment.c | 124 ++++++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 57 deletions(-) diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index f2d7dcb1de4d..761113f108ec 100644 --- a/sys/kern/kern_environment.c +++ b/sys/kern/kern_environment.c @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$"); static char *_getenv_dynamic_locked(const char *name, int *idx); static char *_getenv_dynamic(const char *name, int *idx); +static char *kenv_acquire(const char *name); +static void kenv_release(const char *buf); + static MALLOC_DEFINE(M_KENV, "kenv", "kernel environment"); #define KENV_SIZE 512 /* Maximum number of environment strings */ @@ -88,8 +91,6 @@ bool dynamic_kenv; #define KENV_CHECK if (!dynamic_kenv) \ panic("%s: called before SI_SUB_KMEM", __func__) -static char *getenv_string_buffer(const char *); - int sys_kenv(td, uap) struct thread *td; @@ -482,16 +483,24 @@ _getenv_static(const char *name) char * kern_getenv(const char *name) { - char *ret; + char *cp, *ret; + int len; if (dynamic_kenv) { - ret = getenv_string_buffer(name); - if (ret == NULL) { - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, - "getenv"); + len = KENV_MNAMELEN + 1 + kenv_mvallen + 1; + ret = uma_zalloc(kenv_zone, M_WAITOK | M_ZERO); + mtx_lock(&kenv_lock); + cp = _getenv_dynamic(name, NULL); + if (cp != NULL) + strlcpy(ret, cp, len); + mtx_unlock(&kenv_lock); + if (cp == NULL) { + uma_zfree(kenv_zone, ret); + ret = NULL; } } else ret = _getenv_static(name); + return (ret); } @@ -503,12 +512,9 @@ testenv(const char *name) { char *cp; - if (dynamic_kenv) { - mtx_lock(&kenv_lock); - cp = _getenv_dynamic(name, NULL); - mtx_unlock(&kenv_lock); - } else - cp = _getenv_static(name); + cp = kenv_acquire(name); + kenv_release(cp); + if (cp != NULL) return (1); return (0); @@ -616,30 +622,33 @@ kern_unsetenv(const char *name) } /* - * Return a buffer containing the string value from an environment variable + * Return the internal kenv buffer for the variable name, if it exists. + * If the dynamic kenv is initialized and the name is present, return + * with kenv_lock held. */ static char * -getenv_string_buffer(const char *name) +kenv_acquire(const char *name) { - char *cp, *ret; - int len; + char *value; if (dynamic_kenv) { - len = KENV_MNAMELEN + 1 + kenv_mvallen + 1; - ret = uma_zalloc(kenv_zone, M_WAITOK | M_ZERO); mtx_lock(&kenv_lock); - cp = _getenv_dynamic(name, NULL); - if (cp != NULL) - strlcpy(ret, cp, len); - mtx_unlock(&kenv_lock); - if (cp == NULL) { - uma_zfree(kenv_zone, ret); - ret = NULL; - } + value = _getenv_dynamic(name, NULL); + if (value == NULL) + mtx_unlock(&kenv_lock); + return (value); } else - ret = _getenv_static(name); + return (_getenv_static(name)); +} - return (ret); +/* + * Undo a previous kenv_acquire() operation + */ +static void +kenv_release(const char *buf) +{ + if ((buf != NULL) && dynamic_kenv) + mtx_unlock(&kenv_lock); } /* @@ -650,17 +659,13 @@ getenv_string(const char *name, char *data, int size) { char *cp; - if (dynamic_kenv) { - mtx_lock(&kenv_lock); - cp = _getenv_dynamic(name, NULL); - if (cp != NULL) - strlcpy(data, cp, size); - mtx_unlock(&kenv_lock); - } else { - cp = _getenv_static(name); - if (cp != NULL) - strlcpy(data, cp, size); - } + cp = kenv_acquire(name); + + if (cp != NULL) + strlcpy(data, cp, size); + + kenv_release(cp); + return (cp != NULL); } @@ -674,16 +679,18 @@ getenv_array(const char *name, void *pdata, int size, int *psize, uint8_t shift; int64_t value; int64_t old; - char *buf; + const char *buf; char *end; - char *ptr; + const char *ptr; int n; int rc; - if ((buf = getenv_string_buffer(name)) == NULL) - return (0); - rc = 0; /* assume failure */ + + buf = kenv_acquire(name); + if (buf == NULL) + goto error; + /* get maximum number of elements */ size /= type_size; @@ -798,8 +805,7 @@ getenv_array(const char *name, void *pdata, int size, int *psize, if (n != 0) rc = 1; /* success */ error: - if (dynamic_kenv) - uma_zfree(kenv_zone, buf); + kenv_release(buf); return (rc); } @@ -899,18 +905,21 @@ getenv_ulong(const char *name, unsigned long *data) int getenv_quad(const char *name, quad_t *data) { - char *value, *vtp; - quad_t iv; + const char *value; + char suffix, *vtp; + quad_t iv; - value = getenv_string_buffer(name); - if (value == NULL) - return (0); + value = kenv_acquire(name); + if (value == NULL) { + goto error; + } iv = strtoq(value, &vtp, 0); if (vtp == value || (vtp[0] != '\0' && vtp[1] != '\0')) { - freeenv(value); - return (0); + goto error; } - switch (vtp[0]) { + suffix = vtp[0]; + kenv_release(value); + switch (suffix) { case 't': case 'T': iv *= 1024; /* FALLTHROUGH */ @@ -925,12 +934,13 @@ getenv_quad(const char *name, quad_t *data) case '\0': break; default: - freeenv(value); return (0); } - freeenv(value); *data = iv; return (1); +error: + kenv_release(value); + return (0); } /* From owner-dev-commits-src-all@freebsd.org Wed Feb 17 18:15:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 19E7354F083; Wed, 17 Feb 2021 18:15: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 4DgmGf6x2Vz4cqC; Wed, 17 Feb 2021 18:15:22 +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 43EAA1239; Wed, 17 Feb 2021 18:15: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 11HIFKJq071246; Wed, 17 Feb 2021 18:15:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HIFKub071245; Wed, 17 Feb 2021 18:15:20 GMT (envelope-from git) Date: Wed, 17 Feb 2021 18:15:20 GMT Message-Id: <202102171815.11HIFKub071245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Neel Chauhan Subject: git: 46539a7bf0ec - stable/13 - Allow setting alias port ranges in libalias and ipfw. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 46539a7bf0ecb2f624245da69334a66598da6664 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 18:15:30 -0000 The branch stable/13 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=46539a7bf0ecb2f624245da69334a66598da6664 commit 46539a7bf0ecb2f624245da69334a66598da6664 Author: Neel Chauhan AuthorDate: 2021-02-02 21:24:17 +0000 Commit: Neel Chauhan CommitDate: 2021-02-17 18:13:54 +0000 Allow setting alias port ranges in libalias and ipfw. This will allow a system to be a true RFC 6598 NAT444 setup, where each network segment (e.g. user, subnet) can have their own dedicated port aliasing ranges. Reviewed by: donner, kp Approved by: 0mp (mentor), donner, kp Differential Revision: https://reviews.freebsd.org/D23450 (cherry picked from commit a08cdb6cfb1c84b80b5337d46c574b55d0e15c63) --- sbin/ipfw/ipfw.8 | 3 ++ sbin/ipfw/ipfw2.h | 1 + sbin/ipfw/main.c | 3 +- sbin/ipfw/nat.c | 41 ++++++++++++++++ sys/netinet/ip_fw.h | 2 + sys/netinet/libalias/alias.h | 1 + sys/netinet/libalias/alias_db.c | 30 ++++++++++-- sys/netinet/libalias/alias_local.h | 4 ++ sys/netpfil/ipfw/ip_fw_nat.c | 7 +++ tests/sys/netpfil/common/nat.sh | 99 +++++++++++++++++++++++++++++++++++++- 10 files changed, 186 insertions(+), 5 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index e77930355094..d2c4885bc119 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -3271,6 +3271,9 @@ Reverse the way libalias handles aliasing. Obey transparent proxy rules only, packet aliasing is not performed. .It Cm skip_global Skip instance in case of global state lookup (see below). +.It Cm port_range Ar lower-upper +Set the aliasing ports between the ranges given. Upper port has to be greater +than lower. .El .Pp Some specials value can be supplied instead of diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h index 764e5176e8ef..42e4f4777792 100644 --- a/sbin/ipfw/ipfw2.h +++ b/sbin/ipfw/ipfw2.h @@ -285,6 +285,7 @@ enum tokens { TOK_STATES_CHUNKS, TOK_JMAXLEN, TOK_PORT_RANGE, + TOK_PORT_ALIAS, TOK_HOST_DEL_AGE, TOK_PG_DEL_AGE, TOK_TCP_SYN_AGE, diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c index dc55d0bfa416..89f21062811c 100644 --- a/sbin/ipfw/main.c +++ b/sbin/ipfw/main.c @@ -45,7 +45,8 @@ help(void) "[pipe|queue] {zero|delete|show} [N{,N}]\n" "nat N config {ip IPADDR|if IFNAME|log|deny_in|same_ports|unreg_only|unreg_cgn|\n" " reset|reverse|proxy_only|redirect_addr linkspec|\n" -" redirect_port linkspec|redirect_proto linkspec}\n" +" redirect_port linkspec|redirect_proto linkspec|\n" +" port_range lower-upper}\n" "set [disable N... enable N...] | move [rule] X to Y | swap X Y | show\n" "set N {show|list|zero|resetlog|delete} [N{,N}] | flush\n" "table N {add ip[/bits] [value] | delete ip[/bits] | flush | list}\n" diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index bbf5be666ea0..1076e1038b8a 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -65,6 +65,7 @@ static struct _s_x nat_params[] = { { "reset", TOK_RESET_ADDR }, { "reverse", TOK_ALIAS_REV }, { "proxy_only", TOK_PROXY_ONLY }, + { "port_range", TOK_PORT_ALIAS }, { "redirect_addr", TOK_REDIR_ADDR }, { "redirect_port", TOK_REDIR_PORT }, { "redirect_proto", TOK_REDIR_PROTO }, @@ -753,12 +754,35 @@ nat_show_cfg(struct nat44_cfg_nat *n, void *arg __unused) printf("\n"); } +static int +nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) { + long lp, hp; + char *ptr; + /* Lower port parsing */ + lp = (long) strtol(str, &ptr, 10); + if (lp < 1024 || lp > 65535) + return 0; + if (!ptr || *ptr != '-') + return 0; + /* Upper port parsing */ + hp = (long) strtol(ptr, &ptr, 10); + if (hp < 1024 || hp > 65535) + return 0; + if (ptr) + return 0; + + *lpout = (u_short) lp; + *hpout = (u_short) hp; + return 1; +} + void ipfw_config_nat(int ac, char **av) { ipfw_obj_header *oh; struct nat44_cfg_nat *n; /* Nat instance configuration. */ int i, off, tok, ac1; + u_short lp, hp; char *id, *buf, **av1, *end; size_t len; @@ -786,6 +810,7 @@ ipfw_config_nat(int ac, char **av) switch (tok) { case TOK_IP: case TOK_IF: + case TOK_PORT_ALIAS: ac1--; av1++; break; @@ -925,8 +950,24 @@ ipfw_config_nat(int ac, char **av) n->redir_cnt++; off += i; break; + case TOK_PORT_ALIAS: + if (ac == 0) + errx(EX_DATAERR, "missing option"); + if (!nat_port_alias_parse(av[0], &lp, &hp)) + errx(EX_DATAERR, + "You need a range of port(s) from 1024 <= x < 65536"); + if (lp >= hp) + errx(EX_DATAERR, + "Upper port has to be greater than lower port"); + n->alias_port_lo = lp; + n->alias_port_hi = hp; + ac--; + av++; + break; } } + if (n->mode & PKT_ALIAS_SAME_PORTS && n->alias_port_lo) + errx(EX_DATAERR, "same_ports and port_range cannot both be selected"); i = do_set3(IP_FW_NAT44_XCONFIG, &oh->opheader, len); if (i != 0) diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index f0531a67132d..4d3099a781a0 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -549,6 +549,8 @@ struct nat44_cfg_nat { struct in_addr ip; /* nat IPv4 address */ uint32_t mode; /* aliasing mode */ uint32_t redir_cnt; /* number of entry in spool chain */ + u_short alias_port_lo; /* low range for port aliasing */ + u_short alias_port_hi; /* high range for port aliasing */ }; /* Nat command. */ diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h index 671241212799..91351a9eb8b9 100644 --- a/sys/netinet/libalias/alias.h +++ b/sys/netinet/libalias/alias.h @@ -86,6 +86,7 @@ struct alias_link; /* Initialization and control functions. */ struct libalias *LibAliasInit(struct libalias *); void LibAliasSetAddress(struct libalias *, struct in_addr _addr); +void LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, u_short port_hi); void LibAliasSetFWBase(struct libalias *, unsigned int _base, unsigned int _num); void LibAliasSetSkinnyPort(struct libalias *, unsigned int _port); unsigned int diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 8da9a7fe683a..1f85a606b2d5 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -595,6 +595,11 @@ GetNewPort(struct libalias *la, struct alias_link *lnk, int alias_port_param) */ port_net = lnk->src_port; port_sys = ntohs(port_net); + } else if (la->aliasPortLower) { + /* First trial is a random port in the aliasing range. */ + port_sys = la->aliasPortLower + + (arc4random() % la->aliasPortLength); + port_net = htons(port_sys); } else { /* First trial and all subsequent are random. */ port_sys = arc4random() & ALIAS_PORT_MASK; @@ -647,9 +652,15 @@ GetNewPort(struct libalias *la, struct alias_link *lnk, int alias_port_param) } #endif } - port_sys = arc4random() & ALIAS_PORT_MASK; - port_sys += ALIAS_PORT_BASE; - port_net = htons(port_sys); + if (la->aliasPortLower) { + port_sys = la->aliasPortLower + + (arc4random() % la->aliasPortLength); + port_net = htons(port_sys); + } else { + port_sys = arc4random() & ALIAS_PORT_MASK; + port_sys += ALIAS_PORT_BASE; + port_net = htons(port_sys); + } } #ifdef LIBALIAS_DEBUG @@ -2381,6 +2392,19 @@ LibAliasSetAddress(struct libalias *la, struct in_addr addr) LIBALIAS_UNLOCK(la); } + +void +LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, + u_short port_high) +{ + + LIBALIAS_LOCK(la); + la->aliasPortLower = port_low; + /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ + la->aliasPortLength = port_high - port_low + 1; + LIBALIAS_UNLOCK(la); +} + void LibAliasSetTarget(struct libalias *la, struct in_addr target_addr) { diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h index 5919851a4019..ba128638c1fe 100644 --- a/sys/netinet/libalias/alias_local.h +++ b/sys/netinet/libalias/alias_local.h @@ -163,6 +163,10 @@ struct libalias { struct in_addr true_addr; /* in network byte order. */ u_short true_port; /* in host byte order. */ + /* Port ranges for aliasing. */ + u_short aliasPortLower; + u_short aliasPortLength; + /* * sctp code support */ diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 81229b2707e9..bcda3cff011c 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -93,6 +93,8 @@ struct cfg_nat { /* chain of redir instances */ LIST_HEAD(redir_chain, cfg_redir) redir_chain; char if_name[IF_NAMESIZE]; /* interface name */ + u_short alias_port_lo; /* low range for port aliasing */ + u_short alias_port_hi; /* high range for port aliasing */ }; static eventhandler_tag ifaddr_event_tag; @@ -528,9 +530,12 @@ nat44_config(struct ip_fw_chain *chain, struct nat44_cfg_nat *ucfg) ptr->ip = ucfg->ip; ptr->redir_cnt = ucfg->redir_cnt; ptr->mode = ucfg->mode; + ptr->alias_port_lo = ucfg->alias_port_lo; + ptr->alias_port_hi = ucfg->alias_port_hi; strlcpy(ptr->if_name, ucfg->if_name, sizeof(ptr->if_name)); LibAliasSetMode(ptr->lib, ptr->mode, ~0); LibAliasSetAddress(ptr->lib, ptr->ip); + LibAliasSetAliasPortRange(ptr->lib, ptr->alias_port_lo, ptr->alias_port_hi); /* * Redir and LSNAT configuration. @@ -658,6 +663,8 @@ export_nat_cfg(struct cfg_nat *ptr, struct nat44_cfg_nat *ucfg) ucfg->ip = ptr->ip; ucfg->redir_cnt = ptr->redir_cnt; ucfg->mode = ptr->mode; + ucfg->alias_port_lo = ptr->alias_port_lo; + ucfg->alias_port_hi = ptr->alias_port_hi; strlcpy(ucfg->if_name, ptr->if_name, sizeof(ucfg->if_name)); } diff --git a/tests/sys/netpfil/common/nat.sh b/tests/sys/netpfil/common/nat.sh index f74467dce062..9aa06de51337 100644 --- a/tests/sys/netpfil/common/nat.sh +++ b/tests/sys/netpfil/common/nat.sh @@ -147,10 +147,107 @@ userspace_nat_cleanup() firewall_cleanup $firewall } +common_cgn() { + firewall=$1 + portalias=$2 + firewall_init $firewall + nat_init $firewall + + epair_host_nat=$(vnet_mkepair) + epair_client1_nat=$(vnet_mkepair) + epair_client2_nat=$(vnet_mkepair) + + vnet_mkjail nat ${epair_host_nat}b ${epair_client1_nat}a ${epair_client2_nat}a + vnet_mkjail client1 ${epair_client1_nat}b + vnet_mkjail client2 ${epair_client2_nat}b + + ifconfig ${epair_host_nat}a 198.51.100.2/24 up + jexec nat ifconfig ${epair_host_nat}b 198.51.100.1/24 up + + jexec nat ifconfig ${epair_client1_nat}a 100.64.0.1/24 up + jexec client1 ifconfig ${epair_client1_nat}b 100.64.0.2/24 up + + jexec nat ifconfig ${epair_client2_nat}a 100.64.1.1/24 up + jexec client2 ifconfig ${epair_client2_nat}b 100.64.1.2/24 up + + jexec nat sysctl net.inet.ip.forwarding=1 + + jexec client1 route add -net 198.51.100.0/24 100.64.0.1 + jexec client2 route add -net 198.51.100.0/24 100.64.1.1 + + # ping fails without NAT configuration + atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 + + if [[ $portalias ]]; then + firewall_config nat $firewall \ + "ipfw" \ + "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_alias 2000-2999" \ + "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_alias 3000-3999" \ + "ipfw -q add 1000 nat 123 all from any to 198.51.100.2 2000-2999 in via ${epair_host_nat}b" \ + "ipfw -q add 2000 nat 456 all from any to 198.51.100.2 3000-3999 in via ${epair_host_nat}b" \ + "ipfw -q add 3000 nat 123 all from 100.64.0.2 to any out via ${epair_host_nat}b" \ + "ipfw -q add 4000 nat 456 all from 100.64.1.2 to any out via ${epair_host_nat}b" + else + firewall_config nat $firewall \ + "ipfw" \ + "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn" \ + "ipfw -q add 1000 nat 123 all from any to any" + fi + + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 + + # if portalias, test a tcp server/client with nc + if [[ $portalias ]]; then + for inst in 1 2; do + daemon nc -p 198.51.100.2 7 + atf_check -s exit:0 -o ignore jexec client$inst sh -c "echo | nc -N 198.51.100.2 7" + done + fi +} + +cgn_head() +{ + atf_set descr 'IPv4 CGN (RFC 6598) test' + atf_set require.user root +} + +cgn_body() +{ + common_cgn $1 false +} + +cgn_cleanup() +{ + firewall_cleanup ipfw +} + +portalias_head() +{ + atf_set descr 'IPv4 CGN (RFC 6598) port aliasing test' + atf_set require.user root +} + +portalias_body() +{ + common_cgn $1 true +} + +portalias_cleanup() +{ + firewall_cleanup ipfw +} + setup_tests \ basic \ pf \ ipfw \ ipfnat \ userspace_nat \ - ipfw \ No newline at end of file + ipfw \ + cgn \ + ipfw \ + portalias \ + ipfw From owner-dev-commits-src-all@freebsd.org Wed Feb 17 18:19:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DAAD454F587; Wed, 17 Feb 2021 18:19: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 4DgmMW4r7Vz4gYQ; Wed, 17 Feb 2021 18:19: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 3F626142A; Wed, 17 Feb 2021 18:19: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 11HIJVV2071966; Wed, 17 Feb 2021 18:19:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HIJVhn071965; Wed, 17 Feb 2021 18:19:31 GMT (envelope-from git) Date: Wed, 17 Feb 2021 18:19:31 GMT Message-Id: <202102171819.11HIJVhn071965@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Neel Chauhan Subject: git: ab65c43e2620 - stable/12 - Allow setting alias port ranges in libalias and ipfw. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nc X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ab65c43e2620722bc3232590f74d2e015d8b6e25 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 18:19:37 -0000 The branch stable/12 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=ab65c43e2620722bc3232590f74d2e015d8b6e25 commit ab65c43e2620722bc3232590f74d2e015d8b6e25 Author: Neel Chauhan AuthorDate: 2021-02-02 21:24:17 +0000 Commit: Neel Chauhan CommitDate: 2021-02-17 18:19:02 +0000 Allow setting alias port ranges in libalias and ipfw. This will allow a system to be a true RFC 6598 NAT444 setup, where each network segment (e.g. user, subnet) can have their own dedicated port aliasing ranges. Reviewed by: donner, kp Approved by: 0mp (mentor), donner, kp Differential Revision: https://reviews.freebsd.org/D23450 (cherry picked from commit a08cdb6cfb1c84b80b5337d46c574b55d0e15c63) --- sbin/ipfw/ipfw.8 | 3 +++ sbin/ipfw/ipfw2.h | 1 + sbin/ipfw/main.c | 3 ++- sbin/ipfw/nat.c | 41 ++++++++++++++++++++++++++++++++++++++ sys/netinet/ip_fw.h | 2 ++ sys/netinet/libalias/alias.h | 1 + sys/netinet/libalias/alias_db.c | 29 ++++++++++++++++++++++++--- sys/netinet/libalias/alias_local.h | 4 ++++ sys/netpfil/ipfw/ip_fw_nat.c | 7 +++++++ 9 files changed, 87 insertions(+), 4 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index e77930355094..d2c4885bc119 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -3271,6 +3271,9 @@ Reverse the way libalias handles aliasing. Obey transparent proxy rules only, packet aliasing is not performed. .It Cm skip_global Skip instance in case of global state lookup (see below). +.It Cm port_range Ar lower-upper +Set the aliasing ports between the ranges given. Upper port has to be greater +than lower. .El .Pp Some specials value can be supplied instead of diff --git a/sbin/ipfw/ipfw2.h b/sbin/ipfw/ipfw2.h index 764e5176e8ef..42e4f4777792 100644 --- a/sbin/ipfw/ipfw2.h +++ b/sbin/ipfw/ipfw2.h @@ -285,6 +285,7 @@ enum tokens { TOK_STATES_CHUNKS, TOK_JMAXLEN, TOK_PORT_RANGE, + TOK_PORT_ALIAS, TOK_HOST_DEL_AGE, TOK_PG_DEL_AGE, TOK_TCP_SYN_AGE, diff --git a/sbin/ipfw/main.c b/sbin/ipfw/main.c index dc55d0bfa416..89f21062811c 100644 --- a/sbin/ipfw/main.c +++ b/sbin/ipfw/main.c @@ -45,7 +45,8 @@ help(void) "[pipe|queue] {zero|delete|show} [N{,N}]\n" "nat N config {ip IPADDR|if IFNAME|log|deny_in|same_ports|unreg_only|unreg_cgn|\n" " reset|reverse|proxy_only|redirect_addr linkspec|\n" -" redirect_port linkspec|redirect_proto linkspec}\n" +" redirect_port linkspec|redirect_proto linkspec|\n" +" port_range lower-upper}\n" "set [disable N... enable N...] | move [rule] X to Y | swap X Y | show\n" "set N {show|list|zero|resetlog|delete} [N{,N}] | flush\n" "table N {add ip[/bits] [value] | delete ip[/bits] | flush | list}\n" diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index bbf5be666ea0..1076e1038b8a 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -65,6 +65,7 @@ static struct _s_x nat_params[] = { { "reset", TOK_RESET_ADDR }, { "reverse", TOK_ALIAS_REV }, { "proxy_only", TOK_PROXY_ONLY }, + { "port_range", TOK_PORT_ALIAS }, { "redirect_addr", TOK_REDIR_ADDR }, { "redirect_port", TOK_REDIR_PORT }, { "redirect_proto", TOK_REDIR_PROTO }, @@ -753,12 +754,35 @@ nat_show_cfg(struct nat44_cfg_nat *n, void *arg __unused) printf("\n"); } +static int +nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) { + long lp, hp; + char *ptr; + /* Lower port parsing */ + lp = (long) strtol(str, &ptr, 10); + if (lp < 1024 || lp > 65535) + return 0; + if (!ptr || *ptr != '-') + return 0; + /* Upper port parsing */ + hp = (long) strtol(ptr, &ptr, 10); + if (hp < 1024 || hp > 65535) + return 0; + if (ptr) + return 0; + + *lpout = (u_short) lp; + *hpout = (u_short) hp; + return 1; +} + void ipfw_config_nat(int ac, char **av) { ipfw_obj_header *oh; struct nat44_cfg_nat *n; /* Nat instance configuration. */ int i, off, tok, ac1; + u_short lp, hp; char *id, *buf, **av1, *end; size_t len; @@ -786,6 +810,7 @@ ipfw_config_nat(int ac, char **av) switch (tok) { case TOK_IP: case TOK_IF: + case TOK_PORT_ALIAS: ac1--; av1++; break; @@ -925,8 +950,24 @@ ipfw_config_nat(int ac, char **av) n->redir_cnt++; off += i; break; + case TOK_PORT_ALIAS: + if (ac == 0) + errx(EX_DATAERR, "missing option"); + if (!nat_port_alias_parse(av[0], &lp, &hp)) + errx(EX_DATAERR, + "You need a range of port(s) from 1024 <= x < 65536"); + if (lp >= hp) + errx(EX_DATAERR, + "Upper port has to be greater than lower port"); + n->alias_port_lo = lp; + n->alias_port_hi = hp; + ac--; + av++; + break; } } + if (n->mode & PKT_ALIAS_SAME_PORTS && n->alias_port_lo) + errx(EX_DATAERR, "same_ports and port_range cannot both be selected"); i = do_set3(IP_FW_NAT44_XCONFIG, &oh->opheader, len); if (i != 0) diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 7a01c82ba58b..8b6055e64a6d 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -550,6 +550,8 @@ struct nat44_cfg_nat { struct in_addr ip; /* nat IPv4 address */ uint32_t mode; /* aliasing mode */ uint32_t redir_cnt; /* number of entry in spool chain */ + u_short alias_port_lo; /* low range for port aliasing */ + u_short alias_port_hi; /* high range for port aliasing */ }; /* Nat command. */ diff --git a/sys/netinet/libalias/alias.h b/sys/netinet/libalias/alias.h index 41cd7b2c23d1..c252c823ced8 100644 --- a/sys/netinet/libalias/alias.h +++ b/sys/netinet/libalias/alias.h @@ -86,6 +86,7 @@ struct alias_link; /* Initialization and control functions. */ struct libalias *LibAliasInit(struct libalias *); void LibAliasSetAddress(struct libalias *, struct in_addr _addr); +void LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, u_short port_hi); void LibAliasSetFWBase(struct libalias *, unsigned int _base, unsigned int _num); void LibAliasSetSkinnyPort(struct libalias *, unsigned int _port); unsigned int diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index cf85f40161e7..b3792c748c56 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -605,6 +605,11 @@ GetNewPort(struct libalias *la, struct alias_link *lnk, int alias_port_param) */ port_net = lnk->src_port; port_sys = ntohs(port_net); + } else if (la->aliasPortLower) { + /* First trial is a random port in the aliasing range. */ + port_sys = la->aliasPortLower + + (arc4random() % la->aliasPortLength); + port_net = htons(port_sys); } else { /* First trial and all subsequent are random. */ port_sys = arc4random() & ALIAS_PORT_MASK; @@ -658,9 +663,15 @@ GetNewPort(struct libalias *la, struct alias_link *lnk, int alias_port_param) } #endif } - port_sys = arc4random() & ALIAS_PORT_MASK; - port_sys += ALIAS_PORT_BASE; - port_net = htons(port_sys); + if (la->aliasPortLower) { + port_sys = la->aliasPortLower + + (arc4random() % la->aliasPortLength); + port_net = htons(port_sys); + } else { + port_sys = arc4random() & ALIAS_PORT_MASK; + port_sys += ALIAS_PORT_BASE; + port_net = htons(port_sys); + } } #ifdef LIBALIAS_DEBUG @@ -2447,6 +2458,18 @@ LibAliasSetAddress(struct libalias *la, struct in_addr addr) } +void +LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, + u_short port_high) +{ + + LIBALIAS_LOCK(la); + la->aliasPortLower = port_low; + /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ + la->aliasPortLength = port_high - port_low + 1; + LIBALIAS_UNLOCK(la); +} + void LibAliasSetTarget(struct libalias *la, struct in_addr target_addr) { diff --git a/sys/netinet/libalias/alias_local.h b/sys/netinet/libalias/alias_local.h index c29294256413..94eb26978658 100644 --- a/sys/netinet/libalias/alias_local.h +++ b/sys/netinet/libalias/alias_local.h @@ -163,6 +163,10 @@ struct libalias { struct in_addr true_addr; /* in network byte order. */ u_short true_port; /* in host byte order. */ + /* Port ranges for aliasing. */ + u_short aliasPortLower; + u_short aliasPortLength; + /* * sctp code support */ diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 1c445f72aee9..9e15e9addbe5 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -94,6 +94,8 @@ struct cfg_nat { /* chain of redir instances */ LIST_HEAD(redir_chain, cfg_redir) redir_chain; char if_name[IF_NAMESIZE]; /* interface name */ + u_short alias_port_lo; /* low range for port aliasing */ + u_short alias_port_hi; /* high range for port aliasing */ }; static eventhandler_tag ifaddr_event_tag; @@ -527,9 +529,12 @@ nat44_config(struct ip_fw_chain *chain, struct nat44_cfg_nat *ucfg) ptr->ip = ucfg->ip; ptr->redir_cnt = ucfg->redir_cnt; ptr->mode = ucfg->mode; + ptr->alias_port_lo = ucfg->alias_port_lo; + ptr->alias_port_hi = ucfg->alias_port_hi; strlcpy(ptr->if_name, ucfg->if_name, sizeof(ptr->if_name)); LibAliasSetMode(ptr->lib, ptr->mode, ~0); LibAliasSetAddress(ptr->lib, ptr->ip); + LibAliasSetAliasPortRange(ptr->lib, ptr->alias_port_lo, ptr->alias_port_hi); /* * Redir and LSNAT configuration. @@ -657,6 +662,8 @@ export_nat_cfg(struct cfg_nat *ptr, struct nat44_cfg_nat *ucfg) ucfg->ip = ptr->ip; ucfg->redir_cnt = ptr->redir_cnt; ucfg->mode = ptr->mode; + ucfg->alias_port_lo = ptr->alias_port_lo; + ucfg->alias_port_hi = ptr->alias_port_hi; strlcpy(ucfg->if_name, ptr->if_name, sizeof(ucfg->if_name)); } From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:09:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 033F252C668; Wed, 17 Feb 2021 19:09: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 4DgnTK6dShz3D48; Wed, 17 Feb 2021 19:09: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 D71B0218D; Wed, 17 Feb 2021 19:09: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 11HJ9fvI037185; Wed, 17 Feb 2021 19:09:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJ9fxG037184; Wed, 17 Feb 2021 19:09:41 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:09:41 GMT Message-Id: <202102171909.11HJ9fxG037184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c72043506256 - main - gicv3_its: Leave LPI interrupts enabled during handling 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/main X-Git-Reftype: branch X-Git-Commit: c720435062566324459cb5dd1bdfc1d0e108c516 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:09:42 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c720435062566324459cb5dd1bdfc1d0e108c516 commit c720435062566324459cb5dd1bdfc1d0e108c516 Author: D Scott Phillips AuthorDate: 2021-02-17 19:06:48 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:08:38 +0000 gicv3_its: Leave LPI interrupts enabled during handling This follows the behavior on x86 where edge triggered interrupts are not disabled when executing the handler. Because the ITS is a shared resource, contention for the command queue lock can be substantial. Suggested by: gallatin Reviewed by: andrew Tested by: gallatin Sponsored by: Ampere Computing LLC Differential Revision: https://reviews.freebsd.org/D28709 --- sys/arm64/arm64/gicv3_its.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 061d5a1dbdb9..ba7ccdc7d696 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1013,7 +1013,6 @@ gicv3_its_pre_ithread(device_t dev, struct intr_irqsrc *isrc) sc = device_get_softc(dev); girq = (struct gicv3_its_irqsrc *)isrc; - gicv3_its_disable_intr(dev, isrc); gic_icc_write(EOIR1, girq->gi_lpi + GIC_FIRST_LPI); } @@ -1021,7 +1020,6 @@ static void gicv3_its_post_ithread(device_t dev, struct intr_irqsrc *isrc) { - gicv3_its_enable_intr(dev, isrc); } static void From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C67AB52DDC2; Wed, 17 Feb 2021 19:28: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 4Dgnv45FhFz3DyP; Wed, 17 Feb 2021 19:28: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 A32D11DFB; Wed, 17 Feb 2021 19:28: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 11HJSWJ1063486; Wed, 17 Feb 2021 19:28:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJSWIX063485; Wed, 17 Feb 2021 19:28:32 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:32 GMT Message-Id: <202102171928.11HJSWIX063485@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: cd64031631a2 - stable/12 - Update version in openssh FREEBSD-vendor metadata 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: cd64031631a2a01594724399f9bd41f91fd44bc7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:32 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cd64031631a2a01594724399f9bd41f91fd44bc7 commit cd64031631a2a01594724399f9bd41f91fd44bc7 Author: Ed Maste AuthorDate: 2020-02-14 22:32:33 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:19:00 +0000 Update version in openssh FREEBSD-vendor metadata It appears that FREEBSD-vendor is an idea that never really took off and we should probably just remove it, but until then we might as well record the correct version. (cherry picked from commit 23f6a81e4930c69f1fdcbb90de30ce03561bb4cf) --- crypto/openssh/FREEBSD-vendor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/FREEBSD-vendor b/crypto/openssh/FREEBSD-vendor index 0fa56d03f5d5..f48cbb6c3079 100644 --- a/crypto/openssh/FREEBSD-vendor +++ b/crypto/openssh/FREEBSD-vendor @@ -1,6 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.2p1 +Version: 7.9p1 License: BSD Maintainer: des From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E01AD52E00C; Wed, 17 Feb 2021 19:28: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 4Dgnv55sYJz3FKs; Wed, 17 Feb 2021 19:28: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 BB4242166; Wed, 17 Feb 2021 19:28: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 11HJSXPd063509; Wed, 17 Feb 2021 19:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJSX2L063508; Wed, 17 Feb 2021 19:28:33 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:33 GMT Message-Id: <202102171928.11HJSX2L063508@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: e77af69d0d43 - stable/12 - openssh: refer to OpenSSL not SSLeay 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: e77af69d0d4373cdea6d174109ac82e2fac154be Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:34 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e77af69d0d4373cdea6d174109ac82e2fac154be commit e77af69d0d4373cdea6d174109ac82e2fac154be Author: Ed Maste AuthorDate: 2020-07-15 15:35:26 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:23:20 +0000 openssh: refer to OpenSSL not SSLeay This change was made upstream between 7.9p1 and 8.0p1. We've made local changes in the same places for handling the version_addendum; apply the SSLeay_version to OpenSSL_version change in advance of importing 8.0p1. Obtained from: OpenSSH-portable a65784c9f9c5 Sponsored by: The FreeBSD Foundation (cherry picked from commit 6471c6bd75af57acde7dc39f5202d9a7adf4130a) openssh: refer to OpenSSL not SSLeay, part 2 (cherry picked from commit ea64ebd08c80e4c0a7b8ed207caba45e9374908e) --- crypto/openssh/sshd.c | 2 +- crypto/openssh/version.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 39ad3dcbcf9c..06fa7b8de339 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -1749,7 +1749,7 @@ main(int ac, char **av) debug("sshd version %s, %s", SSH_VERSION, #ifdef WITH_OPENSSL - SSLeay_version(SSLEAY_VERSION) + OpenSSL_version(OPENSSL_VERSION) #else "without OpenSSL" #endif diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index c4df47dde8cf..9dbaf16e7192 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -9,7 +9,7 @@ #define SSH_VERSION_FREEBSD "FreeBSD-20200214" #ifdef WITH_OPENSSL -#define OPENSSL_VERSION_STRING SSLeay_version(SSLEAY_VERSION) +#define OPENSSL_VERSION_STRING OpenSSL_version(OPENSSL_VERSION) #else #define OPENSSL_VERSION_STRING "without OpenSSL" #endif From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0D2B552DDC3; Wed, 17 Feb 2021 19:28: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 4Dgnv66jYnz3FHy; Wed, 17 Feb 2021 19:28: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 D986223B1; Wed, 17 Feb 2021 19:28: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 11HJSYBu063527; Wed, 17 Feb 2021 19:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJSYuQ063526; Wed, 17 Feb 2021 19:28:34 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:34 GMT Message-Id: <202102171928.11HJSYuQ063526@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: 892a9b3c67f5 - stable/12 - sshd: allow UseBlocklist alias for UseBlacklist 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: 892a9b3c67f5e3d98920a9859edbea145dc03d82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:35 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=892a9b3c67f5e3d98920a9859edbea145dc03d82 commit 892a9b3c67f5e3d98920a9859edbea145dc03d82 Author: Ed Maste AuthorDate: 2020-07-29 00:34:24 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:23:38 +0000 sshd: allow UseBlocklist alias for UseBlacklist blacklistd has been renamed to blocklistd upstream, and a future import into FreeBSD will follow that change. Support the new name as an alias in config files. Reviewed by: bz, delphij Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25865 (cherry picked from commit e426c74375ef7cb3afda3c8e3010a7ea2dbd69d0) --- crypto/openssh/servconf.c | 1 + crypto/openssh/sshd_config.5 | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c index 5032fa6556d0..8b07e4b923ae 100644 --- a/crypto/openssh/servconf.c +++ b/crypto/openssh/servconf.c @@ -660,6 +660,7 @@ static struct { { "rdomain", sRDomain, SSHCFG_ALL }, { "casignaturealgorithms", sCASignatureAlgorithms, SSHCFG_ALL }, { "useblacklist", sUseBlacklist, SSHCFG_GLOBAL }, + { "useblocklist", sUseBlacklist, SSHCFG_GLOBAL }, /* alias */ { "noneenabled", sUnsupported, SSHCFG_ALL }, { "hpndisabled", sDeprecated, SSHCFG_ALL }, { "hpnbuffersize", sDeprecated, SSHCFG_ALL }, diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 8176078319d1..d3e0c43853ce 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: sshd_config.5,v 1.282 2018/09/20 03:28:06 djm Exp $ .\" $FreeBSD$ -.Dd $Mdocdate: September 20 2018 $ +.Dd $Mdocdate: July 28 2020 $ .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1603,6 +1603,11 @@ to the daemon. The default is .Cm no . +For forward compatibility with an upcoming +.Xr blacklistd +rename, the +.Cm UseBlocklist +alias can be used instead. .It Cm UseDNS Specifies whether .Xr sshd 8 From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6270552DEB8; Wed, 17 Feb 2021 19:28: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 4Dgnv902NQz3FFb; Wed, 17 Feb 2021 19:28: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 01EF41EF7; Wed, 17 Feb 2021 19:28: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 11HJSZhE063549; Wed, 17 Feb 2021 19:28:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJSZBI063548; Wed, 17 Feb 2021 19:28:35 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:35 GMT Message-Id: <202102171928.11HJSZBI063548@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: cc29cf1df81e - stable/12 - ssh: diff reduction against OpenBSD, remove unused includes 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: cc29cf1df81e6c28d5652fae629206ac26de3022 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:37 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cc29cf1df81e6c28d5652fae629206ac26de3022 commit cc29cf1df81e6c28d5652fae629206ac26de3022 Author: Ed Maste AuthorDate: 2021-02-12 01:41:02 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:23:39 +0000 ssh: diff reduction against OpenBSD, remove unused includes These appear to be leftovers from ca86bcf2531c7 and f7167e0ea0bf5 Sponsored by: The FreeBSD Foundation (cherry picked from commit 154adbbeb8fc2a0d183ec3a4db32cd13668205e8) --- crypto/openssh/misc.c | 1 - crypto/openssh/sshconnect.c | 1 - 2 files changed, 2 deletions(-) diff --git a/crypto/openssh/misc.c b/crypto/openssh/misc.c index 662d6bf48716..bdc06fdb3332 100644 --- a/crypto/openssh/misc.c +++ b/crypto/openssh/misc.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c index 2776be920a2c..b50029de71b8 100644 --- a/crypto/openssh/sshconnect.c +++ b/crypto/openssh/sshconnect.c @@ -27,7 +27,6 @@ __RCSID("$FreeBSD$"); #include #include #include -#include #include #include From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2B82F52DDD4; Wed, 17 Feb 2021 19:28: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 4DgnvB6bsmz3F9N; Wed, 17 Feb 2021 19:28: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 273971EF8; Wed, 17 Feb 2021 19:28: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 11HJSbRW063571; Wed, 17 Feb 2021 19:28:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJSaEF063570; Wed, 17 Feb 2021 19:28:36 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:36 GMT Message-Id: <202102171928.11HJSaEF063570@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: 0de9b983e6d4 - stable/12 - ssh: remove ssh-hpn leftovers 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: 0de9b983e6d41b180d0d403362667efcfb39629c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:39 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0de9b983e6d41b180d0d403362667efcfb39629c commit 0de9b983e6d41b180d0d403362667efcfb39629c Author: Ed Maste AuthorDate: 2021-02-12 14:09:00 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:23:39 +0000 ssh: remove ssh-hpn leftovers This was introduced in 8998619212f3a, and left behind when the hpn-ssh patches were removed in 60c59fad8806. Although Being able to log SO_RCVBUF in debug mode might have some small value on its own, it's not worth carrying an extra diff against upstream. Reviewed by: kevans Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28610 (cherry picked from commit a62dc346f6171ef1bd52bb8795eaf2d64394ac24) --- crypto/openssh/sshd.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 06fa7b8de339..532e5dc04fc2 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -1056,8 +1056,6 @@ listen_on_addrs(struct listenaddr *la) int ret, listen_sock; struct addrinfo *ai; char ntop[NI_MAXHOST], strport[NI_MAXSERV]; - int socksize; - socklen_t len; for (ai = la->addrs; ai; ai = ai->ai_next) { if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) @@ -1103,10 +1101,6 @@ listen_on_addrs(struct listenaddr *la) debug("Bind to port %s on %s.", strport, ntop); - len = sizeof(socksize); - getsockopt(listen_sock, SOL_SOCKET, SO_RCVBUF, &socksize, &len); - debug("Server TCP RWIN socket size: %d", socksize); - /* Bind the socket to the desired port. */ if (bind(listen_sock, ai->ai_addr, ai->ai_addrlen) < 0) { error("Bind to port %s on %s failed: %.200s.", From owner-dev-commits-src-all@freebsd.org Wed Feb 17 19:28:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9C03552DFCC; Wed, 17 Feb 2021 19:28: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 4DgnvC2xw5z3FSs; Wed, 17 Feb 2021 19:28: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 408931DFC; Wed, 17 Feb 2021 19:28: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 11HJSchu063589; Wed, 17 Feb 2021 19:28:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HJScpO063588; Wed, 17 Feb 2021 19:28:38 GMT (envelope-from git) Date: Wed, 17 Feb 2021 19:28:38 GMT Message-Id: <202102171928.11HJScpO063588@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: 4575e3ef3c51 - stable/12 - ssh: remove unused variable 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: 4575e3ef3c51f41833caa2b29d8e7bd112b85c34 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 19:28:40 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4575e3ef3c51f41833caa2b29d8e7bd112b85c34 commit 4575e3ef3c51f41833caa2b29d8e7bd112b85c34 Author: Ed Maste AuthorDate: 2021-02-12 03:21:40 +0000 Commit: Ed Maste CommitDate: 2021-02-17 19:23:39 +0000 ssh: remove unused variable This was introduced in 03f6c5cd93ec, which added use of sysctl net.inet.ip.portrange.reservedhigh instead of IPPORT_RESERVED, but it appears the rest of that change was lost in some subsequent update. The change should probably be restored, but until then there is no reason to leave an unused variable around. Sponsored by: The FreeBSD Foundation (cherry picked from commit 9e14b918f956c532d0b81c945160bd9bc85c5604) --- crypto/openssh/readconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssh/readconf.c b/crypto/openssh/readconf.c index 434da47ce9e2..75fbd4ca222f 100644 --- a/crypto/openssh/readconf.c +++ b/crypto/openssh/readconf.c @@ -336,7 +336,7 @@ void add_local_forward(Options *options, const struct Forward *newfwd) { struct Forward *fwd; - int i, ipport_reserved; + int i; /* Don't add duplicates */ for (i = 0; i < options->num_local_forwards; i++) { From owner-dev-commits-src-all@freebsd.org Wed Feb 17 20:45:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9CFD2532080; Wed, 17 Feb 2021 20:45:16 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dgqbc27Zmz3MNs; Wed, 17 Feb 2021 20:45:15 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613594714; bh=Qg4lEJjxDesXoGA156htEplNvKPK4BJnHa7jCcAKTQs=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=bLE1FSd/FEKu8dKl60vAN9+WjZEXQNKYA7oDqDRt7cRpxggZhU/KmZe3kDVYEqoi5 GXahHg+7GgtfSd5dWp0PTHV94PdORWqn8oLd2KJKVlqRSSCeEh75JiC0um+5SpOuk4 zyE36zy09ULA5JYznFHgYx89acbRhMpVQClhJybk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermann.fritz.box ([77.13.209.169]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MpDNl-1leBLK3LMl-00qn4z; Wed, 17 Feb 2021 21:45:13 +0100 Date: Wed, 17 Feb 2021 21:45:05 +0100 From: "Hartmann, O." To: Mark Johnston Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility Message-ID: <20210217214505.0d4b544e@hermann.fritz.box> In-Reply-To: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> References: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> Organization: walstatt.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/xVHYogKjgyXovADc1VoD_Ap"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Provags-ID: V03:K1:M7c2psTg4HBoxoZdt4QzITJ6xqdbeRJBPZvPh+XAhiTMwCRfLxn L8OPi8KNM6/201MacOiQRZN3IFEmknFlRt0sHn5z+5Xk4BkBPnTKKS1Hp8rZ4TkSPDpt/bs WH8PLTHmHDhf8q9CN8rfQn8Z8CaJHNkgvmA6huiz7AK7A6/e63UWcYxh5s9xg6TYTrBzTEz kDidMbgTlfOG/f/Q5Iv/g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:nHnNPZyBuqA=:cp0qavC1shzuBvP2Jhx1gs t4e25jDmrkmb0VFwn/vh1tzayxWlldJG8BzOqiEPF+uxbo0Eax1SErVuCNRwg2JzFg/asscOO AhK7JF0xz1WSGD9hO0EltByn3U8mH+1eC84gyah/RbliC9CC1L+98Q0Q/OY+9dgW40zQDpeqY /w4p0GR313Z7SOLLShOjwBRsUd0a1UCAuNPKQ5jwQ89r0ibHgFHohPRB3tzp+2BaUP2Lj0l+6 ayZuFiKkQZiv+uZpuIgjzfRaJV4KZ5EZc0EYuMfY+H5At9D8VBSz/NlMASiJbDRon50sbBWu5 1EfBFVfYIfbKcIE18TDpuh2L0zJxquVUiRx0GEVBkwwLxUK7H5I/tV9CutPulOBBNtvaxJffA r/qZadq+kUbyRQNNPWoDDqHdB8LFCLo3JbI6OvvR2j/3FTb46kx2HNV/K+CsxtWCTT6UI9WHu 5kqo4XIm9ycqNDO5d3GTYEcRI7ZgSBIOAuCr+TY/b0moZIxrjJgNL9kTb2qWpbwFJRYq+w5tf 6Bptgc0jK48ZQ8l0VK9YUHm7uZ9ixd8Asp6aZfVtI7ROa67ebAmdsZVQ0vDxAypxL9Mmobl5g LzdElIVtm63sdEtQ4+CNQm9995r5c8cypWiMGoXb4b3pqoS4qbHGjprC/S9mXcW9TIE/lCCb6 58MgvHoRGen8Ci7RxjkCfZ1/kwhQ9eZlhVmbkzhSqnI/9A0oxaWdqHzOYnSPi0NPKuRDQBaAg jcou+tnrYprgqmcDFdBvqUvrwlolsoenBCL7sOaVV8od7+gHlp3/44BKRk+C/3hlL7/D36iL9 8IpL7hk3pGZv7SU5/0hQKBdcFseVUuv2lQoKkQ37fCpK1M0DHp46d0YYvOD3oejdef05H2cvm 5gKNW0842xrvgA8tAW7w== X-Rspamd-Queue-Id: 4Dgqbc27Zmz3MNs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 20:45:16 -0000 --Sig_/xVHYogKjgyXovADc1VoD_Ap Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 17 Feb 2021 16:02:15 GMT Mark Johnston wrote: > The branch main has been updated by markj: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8ba333e02eaa59337a4e1d5534= d4e894344c8226 >=20 > commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 > Author: Mark Johnston > AuthorDate: 2021-02-17 15:49:38 +0000 > Commit: Mark Johnston > CommitDate: 2021-02-17 15:57:19 +0000 >=20 > libdtrace: Stop relying on lex compatibility > =20 > It does not appear to be required, and as of commit 6b7e592c215f > ("lex: Do not let input() return 0 when end-of-file is reached") it > causes input to return 0 instead of EOF when end-of-input is reached. > =20 > PR: 253440 > MFC after: 3 days > Sponsored by: The FreeBSD Foundation > --- > cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- > cddl/lib/libdtrace/Makefile | 2 -- > 2 files changed, 1 insertion(+), 3 deletions(-) >=20 > diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index > f2c60a2b07d4..b3f69bb6329d 100644 --- > a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 +717,= 7 @@ extern > dt_pcb_t *yypcb; /* pointer to current parser control block */ extern > char yyintprefix; /* int token prefix for macros (+/-) */ extern char > yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdecimal; > /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; > /* lex input buffer */ +extern char *yytext; /* lex input buffer */ > extern int yylineno; /* lex line number */ > extern int yydebug; /* lex debugging */ > extern dt_node_t *yypragma; /* lex token list for control lines */ > diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile > index efd73751e2c0..45ca1692cf48 100644 > --- a/cddl/lib/libdtrace/Makefile > +++ b/cddl/lib/libdtrace/Makefile > @@ -129,8 +129,6 @@ SRCS+=3D dis_tables.c > DSRCS+=3D regs_x86.d > .endif > =20 > -LFLAGS+=3D-l > - > YFLAGS+=3D-d > =20 > LIBADD=3D ctf elf proc pthread rtld_db > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebs= d.org" This commit breaks buildworld (also breask starting from scratch/clean /usr= /obj): [...] -MD -MF.depend.arc_os.pico -MTarc_os.pico -std=3Diso9899:1999 -Wno-format-= zero-length -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninit= ialized -Wno-pointer-sign -Wno-unknown-pragmas -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-sw= itch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/src/sys/contrib/openzfs/module/os/linux/zfs/arc_os.c -o arc_os.pico --- all_subdir_cddl/lib/libdtrace --- --- dt_names.o --- --- dt_lex.o --- In fi= le included from /usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l:38: /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= /common/dt_impl.h:720:14: error: redeclaration of 'yytext' with a different type: 'char *' vs 'char [= 8192]' extern char *yytext; /* lex input buffer */ ^ dt_lex.c:1075:6: note: pr= evious definition is here char yytext[YYLMAX]; ^ 1 error generated. *** [dt_lex.o]= Error code 1 make[5]: stopped in /usr/src/cddl/lib/libdtrace --- all_subdir_cddl/lib/libzpool --- --Sig_/xVHYogKjgyXovADc1VoD_Ap Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYC2AUgAKCRA4N1ZZPba5 R/vgAP42V9RDDJU336cu1MV3elRbnQRQxvKyk+DmfPVXCWNALQD9GnIDPvIko2yW p1DqKDGDs/qPpQPfU3zyvFMMmtenVgs= =bNBT -----END PGP SIGNATURE----- --Sig_/xVHYogKjgyXovADc1VoD_Ap-- From owner-dev-commits-src-all@freebsd.org Wed Feb 17 20:46:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A10745320CA; Wed, 17 Feb 2021 20:46:50 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgqdP6r2gz3Mq3; Wed, 17 Feb 2021 20:46:49 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f180.google.com with SMTP id m144so14172375qke.10; Wed, 17 Feb 2021 12:46:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C+rKdBrHYLqZ8xAtnZcz5YG3Rl17+5P82eSWdP1yRhM=; b=jFg2034mcEBXGjuhfFp5dLn5nxRbxfWyPbd0zTFoQsLrjtFcknSoLR2KlELloR/2tK wQPbi7UlquFH0s/V3O5bXSRGzDatsFRXlbuNyki3kOozzj/m9p74ib0X1IMZWUpt4ZoK mbBOH/yUVYMTHu9mgdzx3Rzdynj4iBc70fCAsQmumBvNEQZz5ZYY6P3SvuI9yqpdbiD+ wcXFapPAZEfgR1EQoorxnRoMlvTkHVN050nMuYhwk9c4HbG6oUav1z/HHvvGXYnWRroN XjeSOiJuqYbIvpEi3J7NnlvebZWbZjwLGKE1NWsGXUxnaLuqHWnWGuiKwGirgh6iibt+ 86Xw== X-Gm-Message-State: AOAM530k7E+ejIy6fezGGI4RFyPKj8BpbzHaj9cym/1FHWipdWipei6L UqXsA+adeoZ5aSyc4XFvFLLH96V4ARA= X-Google-Smtp-Source: ABdhPJyqtVrPJDWH5iXuLPpfB+D+WNXEetgDs9bj2kge3+I4KDq0YnUrMBP+9feUdkSnQynR3kW2vw== X-Received: by 2002:ae9:c30e:: with SMTP id n14mr1060783qkg.291.1613594808371; Wed, 17 Feb 2021 12:46:48 -0800 (PST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com. [209.85.160.175]) by smtp.gmail.com with ESMTPSA id o12sm2542220qko.117.2021.02.17.12.46.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Feb 2021 12:46:48 -0800 (PST) Received: by mail-qt1-f175.google.com with SMTP id h16so10565968qth.11; Wed, 17 Feb 2021 12:46:48 -0800 (PST) X-Received: by 2002:ac8:d44:: with SMTP id r4mr1092255qti.7.1613594807753; Wed, 17 Feb 2021 12:46:47 -0800 (PST) MIME-Version: 1.0 References: <202102031604.113G4SQq019037@gitrepo.freebsd.org> In-Reply-To: <202102031604.113G4SQq019037@gitrepo.freebsd.org> From: Ryan Libby Date: Wed, 17 Feb 2021 12:46:36 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 8fa6abb6f4f6 - main - Expose clang's alignment builtins and use them for roundup2/rounddown2 To: Alex Richardson Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4DgqdP6r2gz3Mq3 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rlibby@gmail.com designates 209.85.222.180 as permitted sender) smtp.mailfrom=rlibby@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[rlibby@freebsd.org,rlibby@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.222.180:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[rlibby@freebsd.org,rlibby@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[rlibby]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.222.180:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[209.85.222.180:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.222.180:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 20:46:50 -0000 On Wed, Feb 3, 2021 at 8:04 AM Alex Richardson wrote: > > The branch main has been updated by arichardson: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8fa6abb6f4f64f4f23e2920e2aea7996566851a4 > > commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4 > Author: Alex Richardson > AuthorDate: 2021-02-03 15:27:17 +0000 > Commit: Alex Richardson > CommitDate: 2021-02-03 16:02:54 +0000 > > Expose clang's alignment builtins and use them for roundup2/rounddown2 > > This makes roundup2/rounddown2 type- and const-preserving and allows > using it on pointer types without casting to uintptr_t first. Not > performing pointer-to-integer conversions also helps the compiler's > optimization passes and can therefore result in better code generation. > When using it with integer values there should be no change other than > the compiler checking that the alignment value is a valid power-of-two. > > I originally implemented these builtins for CHERI a few years ago and > they have been very useful for CheriBSD. However, they are also useful > for non-CHERI code so I was able to upstream them for Clang 10.0. > > Rationale from the clang documentation: > Clang provides builtins to support checking and adjusting alignment > of pointers and integers. These builtins can be used to avoid relying > on implementation-defined behavior of arithmetic on integers derived > from pointers. Additionally, these builtins retain type information > and, unlike bitwise arithmetic, they can perform semantic checking on > the alignment value. > > There is also a feature request for GCC, so GCC may also support it in > the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 > > Reviewed By: brooks, jhb, imp > Differential Revision: https://reviews.freebsd.org/D28332 > --- > sys/sys/cdefs.h | 19 +++++++++++++++++++ > sys/sys/param.h | 4 ++-- > 2 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 75bedd4b8128..72ef942084f2 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -884,4 +884,23 @@ > #define __guarded_by(x) __lock_annotate(guarded_by(x)) > #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > > +/* Alignment builtins for better type checking and improved code generation. */ > +/* Provide fallback versions for other compilers (GCC/Clang < 10): */ > +#if !__has_builtin(__builtin_is_aligned) > +#define __builtin_is_aligned(x, align) \ > + (((__uintptr_t)x & ((align) - 1)) == 0) > +#endif > +#if !__has_builtin(__builtin_align_up) > +#define __builtin_align_up(x, align) \ > + ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) > +#endif > +#if !__has_builtin(__builtin_align_down) > +#define __builtin_align_down(x, align) \ > + ((__typeof__(x))((x)&(~((align)-1)))) > +#endif > + > +#define __align_up(x, y) __builtin_align_up(x, y) > +#define __align_down(x, y) __builtin_align_down(x, y) > +#define __is_aligned(x, y) __builtin_is_aligned(x, y) > + Since these are only valid for powers of 2, I think it would be good to indicate that in the names (__align_up2() etc). > #endif /* !_SYS_CDEFS_H_ */ > diff --git a/sys/sys/param.h b/sys/sys/param.h > index 079357a19d47..d6f1eb21dcd2 100644 > --- a/sys/sys/param.h > +++ b/sys/sys/param.h > @@ -305,9 +305,9 @@ > #endif > #define nitems(x) (sizeof((x)) / sizeof((x)[0])) > #define rounddown(x, y) (((x)/(y))*(y)) > -#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ > +#define rounddown2(x, y) __align_down(x, y) /* if y is power of two */ > #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ > -#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ > +#define roundup2(x, y) __align_up(x, y) /* if y is powers of two */ > #define powerof2(x) ((((x)-1)&(x))==0) > > /* Macros for min/max. */ This broke the gcc build: https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc6_build/3200/console 00:40:30 --- all_subdir_firewire --- 00:40:30 In file included from /workspace/src/sys/sys/types.h:43:0, 00:40:30 from /workspace/src/sys/sys/param.h:99, 00:40:30 from /workspace/src/sys/dev/firewire/fwohci.c:40: 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c: In function 'fwohci_get_plen': 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c:2699:17: error: 'typeof' applied to a bit-field 00:40:30 r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); We could: - Drop the cast for the fallback. - Cast with (__typeof__(+(x))) which unfortunately promotes e.g. char to int but otherwise I think behaves okay, and the promotion was previously happening for roundup2/rounddown2 anyway. - Punt the casting burden to callers of roundup2/rounddown2. Ryan From owner-dev-commits-src-all@freebsd.org Wed Feb 17 20:59:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 96EE753276D; Wed, 17 Feb 2021 20:59:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgqwS1PfDz3NTR; Wed, 17 Feb 2021 20:59:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id CTvIlZB0v2SWTCTvJl2g25; Wed, 17 Feb 2021 13:59:50 -0700 X-Authority-Analysis: v=2.4 cv=fdJod2cF c=1 sm=1 tr=0 ts=602d83c6 a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=6I5d2MoRAAAA:8 a=vUPWEWiMAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=OeR2YKnim2uLRTrlnSYA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=s3Yi14Of9AgBIP63TAoC:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id EE7B397C; Wed, 17 Feb 2021 12:59:46 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11HKxkCj012745; Wed, 17 Feb 2021 12:59:46 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102172059.11HKxkCj012745@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Hartmann, O." cc: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility In-reply-to: <20210217214505.0d4b544e@hermann.fritz.box> References: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> <20210217214505.0d4b544e@hermann.fritz.box> Comments: In-reply-to "Hartmann, O." message dated "Wed, 17 Feb 2021 21:45:05 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Feb 2021 12:59:46 -0800 X-CMAE-Envelope: MS4xfNGdJaT9ubaLNmCxPu/+N6ClsSMiSo064Dv3lG3OUecDUdOZZDO14/VAQEizIoXaRf+ogFObQniytDd/i3IDUgE0OxmOYLv66i9/W3uPzfQG4SdDP343 sAFbrwNVZ/lvoI6lW+cRTeqglXWyhiNZP9iGVwQR3CX2k1UCN2VdybSsXI10tPp6lWulrgQ1l95Nl/BL+k4TpCncyxSmzAjfYS3rYDr1UezQjxpr61FMDgKf gzIjdA87ivk1n8rTrOWr3ffSk+agfwTZu0J04NBbjzQMD3gU38SUS9Hu6v+dqXvH56TrC2mRWnEY6A78bzgVPUERfvTUiDMgMycvQz+UXatO6hVsmy8SFUZ+ oU3mDYWwG5+langVun9sS1I1bV9q7w== X-Rspamd-Queue-Id: 4DgqwS1PfDz3NTR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 20:59:52 -0000 In message <20210217214505.0d4b544e@hermann.fritz.box>, "Hartmann, O." writes: > --Sig_/xVHYogKjgyXovADc1VoD_Ap > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: quoted-printable > > On Wed, 17 Feb 2021 16:02:15 GMT > Mark Johnston wrote: > > > The branch main has been updated by markj: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D8ba333e02eaa59337a4e1d5534= > d4e894344c8226 > >=20 > > commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 > > Author: Mark Johnston > > AuthorDate: 2021-02-17 15:49:38 +0000 > > Commit: Mark Johnston > > CommitDate: 2021-02-17 15:57:19 +0000 > >=20 > > libdtrace: Stop relying on lex compatibility > > =20 > > It does not appear to be required, and as of commit 6b7e592c215f > > ("lex: Do not let input() return 0 when end-of-file is reached") it > > causes input to return 0 instead of EOF when end-of-input is reached. > > =20 > > PR: 253440 > > MFC after: 3 days > > Sponsored by: The FreeBSD Foundation > > --- > > cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- > > cddl/lib/libdtrace/Makefile | 2 -- > > 2 files changed, 1 insertion(+), 3 deletions(-) > >=20 > > diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index > > f2c60a2b07d4..b3f69bb6329d 100644 --- > > a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 +717,= > 7 @@ extern > > dt_pcb_t *yypcb; /* pointer to current parser control block */ e > xtern > > char yyintprefix; /* int token prefix for macros (+/-) */ extern char > > yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdecima > l; > > /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; > > /* lex input buffer */ +extern char *yytext; /* lex input bu > ffer */ > > extern int yylineno; /* lex line number */ > > extern int yydebug; /* lex debugging */ > > extern dt_node_t *yypragma; /* lex token list for control lines */ > > diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile > > index efd73751e2c0..45ca1692cf48 100644 > > --- a/cddl/lib/libdtrace/Makefile > > +++ b/cddl/lib/libdtrace/Makefile > > @@ -129,8 +129,6 @@ SRCS+=3D dis_tables.c > > DSRCS+=3D regs_x86.d > > .endif > > =20 > > -LFLAGS+=3D-l > > - > > YFLAGS+=3D-d > > =20 > > LIBADD=3D ctf elf proc pthread rtld_db > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebs= > d.org" > > This commit breaks buildworld (also breask starting from scratch/clean /usr= > /obj): > > [...] > -MD -MF.depend.arc_os.pico -MTarc_os.pico -std=3Diso9899:1999 -Wno-format-= > zero-length > -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninit= > ialized > -Wno-pointer-sign -Wno-unknown-pragmas -Wno-empty-body -Wno-string-plus-int > -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value > -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion > -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-sw= > itch-enum > -Wno-knr-promoted-parameter -Qunused-arguments -c > /usr/src/sys/contrib/openzfs/module/os/linux/zfs/arc_os.c -o arc_os.pico --- > all_subdir_cddl/lib/libdtrace --- --- dt_names.o --- --- dt_lex.o --- In fi= > le included > from /usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l:38: > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdtrace= > /common/dt_impl.h:720:14: > error: redeclaration of 'yytext' with a different type: 'char *' vs 'char [= > 8192]' extern > char *yytext; /* lex input buffer */ ^ dt_lex.c:1075:6: note: pr= > evious > definition is here char yytext[YYLMAX]; ^ 1 error generated. *** [dt_lex.o]= > Error code 1 > > make[5]: stopped in /usr/src/cddl/lib/libdtrace > --- all_subdir_cddl/lib/libzpool --- > Restart your build without -DNO_CLEAN. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:01:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C048D532C1D; Wed, 17 Feb 2021 21:01:19 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dgqy74xR8z3NxC; Wed, 17 Feb 2021 21:01:19 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f47.google.com with SMTP id d8so11447967ejc.4; Wed, 17 Feb 2021 13:01:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hNWAUYw4bNtQpFWGNJx557HzSo6foXDFS1pTJATUoS0=; b=FTRvOEdeICFo6cb8nTWrox6qfRJwJrjoiP5qIxg63U5vKRD8AwS7gYcHue9UdjRyC7 TU1zAJ9G52nnn4eSSsYiFz7OhW8JSis/YByc4/r2Xn9O4z4vf5XIKgoK5pjvkoUYkGrV kTRy7dNnMyzJLQIfyKw0QGKbM0tHBc24XcTpaZ0H9xkQXhDbFHaggp3AYWN0jFelrn9B iC7eojbq5tuLmczHKnpl3Xb/RbAMJnJivs1te282Izp9PyGxSmXcEuUTI4TWcQolLABG IrNfvwEUZqmdFskZ0YUnJx1PF0kksd0l9M2e0j7koVfiqk9ooXJ10xJD+tlaUJvME0KD ViIg== X-Gm-Message-State: AOAM532Q+BUWE0i1JvjONcIjnnBPn7SNFAQSIoFXBxBrD0PucQ3XgbOq kMBslVcDA4P+d18JipRLHWBbs3i4AJQ= X-Google-Smtp-Source: ABdhPJyTKQE6nKJC0J+rzlLyP3ynTJ/JFjE6sIwrm9wLgsmNN97N3AFaCBEA/fxO7ah1hX+a5O3gbQ== X-Received: by 2002:a17:906:2358:: with SMTP id m24mr771265eja.333.1613595677613; Wed, 17 Feb 2021 13:01:17 -0800 (PST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com. [209.85.221.45]) by smtp.gmail.com with ESMTPSA id g20sm1591039ejz.54.2021.02.17.13.01.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Feb 2021 13:01:17 -0800 (PST) Received: by mail-wr1-f45.google.com with SMTP id u14so18846971wri.3; Wed, 17 Feb 2021 13:01:17 -0800 (PST) X-Received: by 2002:a5d:444a:: with SMTP id x10mr1001394wrr.409.1613595676783; Wed, 17 Feb 2021 13:01:16 -0800 (PST) MIME-Version: 1.0 References: <202102031604.113G4SQq019037@gitrepo.freebsd.org> In-Reply-To: From: Alexander Richardson Date: Wed, 17 Feb 2021 21:01:05 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 8fa6abb6f4f6 - main - Expose clang's alignment builtins and use them for roundup2/rounddown2 To: Ryan Libby , John Baldwin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dgqy74xR8z3NxC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:01:19 -0000 On Wed, 17 Feb 2021 at 20:46, Ryan Libby wrote: > > On Wed, Feb 3, 2021 at 8:04 AM Alex Richardson wrote: > > > > The branch main has been updated by arichardson: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=8fa6abb6f4f64f4f23e2920e2aea7996566851a4 > > > > commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4 > > Author: Alex Richardson > > AuthorDate: 2021-02-03 15:27:17 +0000 > > Commit: Alex Richardson > > CommitDate: 2021-02-03 16:02:54 +0000 > > > > Expose clang's alignment builtins and use them for roundup2/rounddown2 > > > > This makes roundup2/rounddown2 type- and const-preserving and allows > > using it on pointer types without casting to uintptr_t first. Not > > performing pointer-to-integer conversions also helps the compiler's > > optimization passes and can therefore result in better code generation. > > When using it with integer values there should be no change other than > > the compiler checking that the alignment value is a valid power-of-two. > > > > I originally implemented these builtins for CHERI a few years ago and > > they have been very useful for CheriBSD. However, they are also useful > > for non-CHERI code so I was able to upstream them for Clang 10.0. > > > > Rationale from the clang documentation: > > Clang provides builtins to support checking and adjusting alignment > > of pointers and integers. These builtins can be used to avoid relying > > on implementation-defined behavior of arithmetic on integers derived > > from pointers. Additionally, these builtins retain type information > > and, unlike bitwise arithmetic, they can perform semantic checking on > > the alignment value. > > > > There is also a feature request for GCC, so GCC may also support it in > > the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 > > > > Reviewed By: brooks, jhb, imp > > Differential Revision: https://reviews.freebsd.org/D28332 > > --- > > sys/sys/cdefs.h | 19 +++++++++++++++++++ > > sys/sys/param.h | 4 ++-- > > 2 files changed, 21 insertions(+), 2 deletions(-) > > > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > > index 75bedd4b8128..72ef942084f2 100644 > > --- a/sys/sys/cdefs.h > > +++ b/sys/sys/cdefs.h > > @@ -884,4 +884,23 @@ > > #define __guarded_by(x) __lock_annotate(guarded_by(x)) > > #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > > > > +/* Alignment builtins for better type checking and improved code generation. */ > > +/* Provide fallback versions for other compilers (GCC/Clang < 10): */ > > +#if !__has_builtin(__builtin_is_aligned) > > +#define __builtin_is_aligned(x, align) \ > > + (((__uintptr_t)x & ((align) - 1)) == 0) > > +#endif > > +#if !__has_builtin(__builtin_align_up) > > +#define __builtin_align_up(x, align) \ > > + ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) > > +#endif > > +#if !__has_builtin(__builtin_align_down) > > +#define __builtin_align_down(x, align) \ > > + ((__typeof__(x))((x)&(~((align)-1)))) > > +#endif > > + > > +#define __align_up(x, y) __builtin_align_up(x, y) > > +#define __align_down(x, y) __builtin_align_down(x, y) > > +#define __is_aligned(x, y) __builtin_is_aligned(x, y) > > + > > Since these are only valid for powers of 2, I think it would be good to > indicate that in the names (__align_up2() etc). > > > #endif /* !_SYS_CDEFS_H_ */ > > diff --git a/sys/sys/param.h b/sys/sys/param.h > > index 079357a19d47..d6f1eb21dcd2 100644 > > --- a/sys/sys/param.h > > +++ b/sys/sys/param.h > > @@ -305,9 +305,9 @@ > > #endif > > #define nitems(x) (sizeof((x)) / sizeof((x)[0])) > > #define rounddown(x, y) (((x)/(y))*(y)) > > -#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ > > +#define rounddown2(x, y) __align_down(x, y) /* if y is power of two */ > > #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ > > -#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ > > +#define roundup2(x, y) __align_up(x, y) /* if y is powers of two */ > > #define powerof2(x) ((((x)-1)&(x))==0) > > > > /* Macros for min/max. */ > > This broke the gcc build: > https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc6_build/3200/console > 00:40:30 --- all_subdir_firewire --- > 00:40:30 In file included from /workspace/src/sys/sys/types.h:43:0, > 00:40:30 from /workspace/src/sys/sys/param.h:99, > 00:40:30 from /workspace/src/sys/dev/firewire/fwohci.c:40: > 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c: In function > 'fwohci_get_plen': > 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c:2699:17: error: > 'typeof' applied to a bit-field > 00:40:30 r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); > > We could: > - Drop the cast for the fallback. > - Cast with (__typeof__(+(x))) which unfortunately promotes e.g. char > to int but otherwise I think behaves okay, and the promotion was > previously happening for roundup2/rounddown2 anyway. > - Punt the casting burden to callers of roundup2/rounddown2. > > Ryan Hi Ryan, https://reviews.freebsd.org/D28599 fixes this specific issue. One reason for the typeof() is to allow using it with pointer types. Currently there are no such uses, but we have some in CheriBSD. Unfortunately +(x) would break that. (x)+0 should work for most cases, but does break void*. I believe the current approach only breaks with bitfields (which is hopefully rare), so I think adding casts for GCC when roundup2() in those cases might be the simplest solution. Thanks, Alex From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:12:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AA5FC53343C; Wed, 17 Feb 2021 21:12: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 4DgrCD4WmJz3QKT; Wed, 17 Feb 2021 21:12: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 8E3EC3D60; Wed, 17 Feb 2021 21:12: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 11HLCe74006520; Wed, 17 Feb 2021 21:12:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLCevw006519; Wed, 17 Feb 2021 21:12:40 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:12:40 GMT Message-Id: <202102172112.11HLCevw006519@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 50a61f8db532 - main - fwohci: Cast bitfield to uint32_t before passing it to roundup2(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50a61f8db532676d7dc37410540fff7209b7c072 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:12:40 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=50a61f8db532676d7dc37410540fff7209b7c072 commit 50a61f8db532676d7dc37410540fff7209b7c072 Author: John Baldwin AuthorDate: 2021-02-17 21:12:06 +0000 Commit: John Baldwin CommitDate: 2021-02-17 21:12:06 +0000 fwohci: Cast bitfield to uint32_t before passing it to roundup2(). The fallback for __align_up() used by roundup2() uses __typeof__() which doesn't work for bitfields. This fixes the build on GCC which uses the fallback. Reviewed by: arichardson, markj Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D28599 --- sys/dev/firewire/fwohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index 30eca83900e7..634c78e6afe8 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -2696,7 +2696,7 @@ fwohci_get_plen(struct fwohci_softc *sc, struct fwohci_dbch *dbch, struct fw_pkt info = &tinfo[fp->mode.common.tcode]; r = info->hdr_len + sizeof(uint32_t); if ((info->flag & FWTI_BLOCK_ASY) != 0) - r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); + r += roundup2((uint32_t)fp->mode.wreqb.len, sizeof(uint32_t)); if (r == sizeof(uint32_t)) { /* XXX */ From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:17:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E9EF053355A; Wed, 17 Feb 2021 21:17:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DgrKG62MWz3QcZ; Wed, 17 Feb 2021 21:17:54 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qk1-x72c.google.com with SMTP id x14so101616qkm.2; Wed, 17 Feb 2021 13:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2kKM0vSiLjLXI3YLj8VV1qfIi+4oP79gApR52c8ph/k=; b=TAmqXNeIgPHlFhNSoUsYW4ow9yYKMJ9c7qM+hDiPr0oEpQtI4pt2r5vzQTfWCwvyaA oj1syUR5oA07XOPxrJhnf0KyDXDJkXA6TE0jmYPYqMoUx0LslaU6DA0zKuP5HHVQiXqH zmLIwBMFt7JlEq70Zbn4G9RGNaCyo5FgbCQf0vsLDI/1heItM8qbV3tyGAe1FClfAs3j 0P/Xso1EOkbdbdDeakWNHeIMRFOPUDGSnFLn46A+DBhDk/ufCx1RHezXu3a8gNYWDUeD aDvYyUT63G8TqGO5NvmxIoKX7ElbIQxVGJp82qwkiaAsedZWbxejVyzVIbv8UcT2pUtk ioPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=2kKM0vSiLjLXI3YLj8VV1qfIi+4oP79gApR52c8ph/k=; b=qNourubezC4ypoh2Wp0yJyVEiMyH7hVrYv1MEzYAO2iCHuqAwUZq3ioqt11DAenCqo qkCuW8rnCOA4BuZ65C70mbCP8VONlRqfVng2c5JBQ79L2lgXJfVw8sb4pIZx1SSCIoXh KXmk7uyg3am+ZFCsjX7AicSScvzgOrS53Cb9cjkw3iMEUPLp8TN0lmH//6+RNLCQsVdx u192iiz+U789VEohAPwVeFVZgYEIgOuu0v0SxFQkIOJoFd7dGSxcNlkb8r6Rc1EEpHQs dp/I1btAfIWuCN8qzfQQXlcs85GTCwbXCAcR4G6nKImo9gYHXf5BxRg9JDyVroxiM7y+ qHWA== X-Gm-Message-State: AOAM532ZSdFTQEgIJSLtqN7lSeE5f3aDTmmo7B6dxhAltfjRs27utedy BCOQp2HD/1kFShTc/Ca6cbJbQGi8XY0= X-Google-Smtp-Source: ABdhPJxL4jed6d7iG71SLHV2Iltaa0oondFw5XS2L9vbZSGna93kWBKYHXis/hYNDmcwugvSXmzlVA== X-Received: by 2002:a37:806:: with SMTP id 6mr1197285qki.258.1613596673688; Wed, 17 Feb 2021 13:17:53 -0800 (PST) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id d1sm2389849qkj.123.2021.02.17.13.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 13:17:53 -0800 (PST) Sender: Mark Johnston Date: Wed, 17 Feb 2021 16:17:54 -0500 From: Mark Johnston To: "Hartmann, O." Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility Message-ID: References: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> <20210217214505.0d4b544e@hermann.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210217214505.0d4b544e@hermann.fritz.box> X-Rspamd-Queue-Id: 4DgrKG62MWz3QcZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:17:55 -0000 On Wed, Feb 17, 2021 at 09:45:05PM +0100, Hartmann, O. wrote: > On Wed, 17 Feb 2021 16:02:15 GMT > Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=8ba333e02eaa59337a4e1d5534d4e894344c8226 > > > > commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 > > Author: Mark Johnston > > AuthorDate: 2021-02-17 15:49:38 +0000 > > Commit: Mark Johnston > > CommitDate: 2021-02-17 15:57:19 +0000 > > > > libdtrace: Stop relying on lex compatibility > > > > It does not appear to be required, and as of commit 6b7e592c215f > > ("lex: Do not let input() return 0 when end-of-file is reached") it > > causes input to return 0 instead of EOF when end-of-input is reached. > > > > PR: 253440 > > MFC after: 3 days > > Sponsored by: The FreeBSD Foundation > > --- > > cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- > > cddl/lib/libdtrace/Makefile | 2 -- > > 2 files changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index > > f2c60a2b07d4..b3f69bb6329d 100644 --- > > a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 +717,7 @@ extern > > dt_pcb_t *yypcb; /* pointer to current parser control block */ extern > > char yyintprefix; /* int token prefix for macros (+/-) */ extern char > > yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdecimal; > > /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; > > /* lex input buffer */ +extern char *yytext; /* lex input buffer */ > > extern int yylineno; /* lex line number */ > > extern int yydebug; /* lex debugging */ > > extern dt_node_t *yypragma; /* lex token list for control lines */ > > diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile > > index efd73751e2c0..45ca1692cf48 100644 > > --- a/cddl/lib/libdtrace/Makefile > > +++ b/cddl/lib/libdtrace/Makefile > > @@ -129,8 +129,6 @@ SRCS+= dis_tables.c > > DSRCS+= regs_x86.d > > .endif > > > > -LFLAGS+=-l > > - > > YFLAGS+=-d > > > > LIBADD= ctf elf proc pthread rtld_db > > _______________________________________________ > > dev-commits-src-main@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" > > This commit breaks buildworld (also breask starting from scratch/clean /usr/obj): I'm surprised that it breaks with a clean buildworld. Can you verify from the build logs that dt_lex.c is being re-generated during the libdtrace build? From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:29:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 26B215339D8; Wed, 17 Feb 2021 21:29: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 4DgrZ70X49z3R37; Wed, 17 Feb 2021 21:29: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 04D7E4200; Wed, 17 Feb 2021 21:29: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 11HLT2ZV020387; Wed, 17 Feb 2021 21:29:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLT2Ru020386; Wed, 17 Feb 2021 21:29:02 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:29:02 GMT Message-Id: <202102172129.11HLT2Ru020386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1deaad936417 - main - Handle negative return values from syncache_expand(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1deaad936417ed2315476718fbd2648de08585bf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:29:03 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1deaad936417ed2315476718fbd2648de08585bf commit 1deaad936417ed2315476718fbd2648de08585bf Author: John Baldwin AuthorDate: 2021-02-17 21:28:04 +0000 Commit: John Baldwin CommitDate: 2021-02-17 21:28:04 +0000 Handle negative return values from syncache_expand(). These errors do not clear so to NULL, so the existing check was treating these failures as success. The rest of do_pass_establish() then tried to use the listen socket as if it was a connection socket newly created by syncache_expand(). In addition, for negative return values, do not send a RST to the peer. Reported by: Sony Arpita Das @ Chelsio Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D28243 --- sys/dev/cxgbe/tom/t4_listen.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index bd9361d9a165..ba30f2a60120 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -88,7 +88,7 @@ static struct listen_ctx *listen_hash_find(struct adapter *, struct inpcb *); static struct listen_ctx *listen_hash_del(struct adapter *, struct inpcb *); static struct inpcb *release_lctx(struct adapter *, struct listen_ctx *); -static void send_reset_synqe(struct toedev *, struct synq_entry *); +static void send_abort_rpl_synqe(struct toedev *, struct synq_entry *, int); static int alloc_stid(struct adapter *sc, struct listen_ctx *lctx, int isipv6) @@ -391,7 +391,8 @@ send_flowc_wr_synqe(struct adapter *sc, struct synq_entry *synqe) } static void -send_reset_synqe(struct toedev *tod, struct synq_entry *synqe) +send_abort_rpl_synqe(struct toedev *tod, struct synq_entry *synqe, + int rst_status) { struct adapter *sc = tod->tod_softc; struct wrqe *wr; @@ -419,7 +420,7 @@ send_reset_synqe(struct toedev *tod, struct synq_entry *synqe) INIT_TP_WR_MIT_CPL(req, CPL_ABORT_REQ, synqe->tid); req->rsvd0 = 0; /* don't have a snd_nxt */ req->rsvd1 = 1; /* no data sent yet */ - req->cmd = CPL_ABORT_SEND_RST; + req->cmd = rst_status; t4_l2t_send(sc, wr, &sc->l2t->l2tab[synqe->params.l2t_idx]); } @@ -1465,6 +1466,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_header *rss, struct in_conninfo inc; struct toepcb *toep; struct epoch_tracker et; + int rstreason; #ifdef INVARIANTS unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif @@ -1491,7 +1493,7 @@ do_pass_establish(struct sge_iq *iq, const struct rss_header *rss, if (__predict_false(inp->inp_flags & INP_DROPPED)) { reset: - send_reset_synqe(TOEDEV(ifp), synqe); + send_abort_rpl_synqe(TOEDEV(ifp), synqe, CPL_ABORT_SEND_RST); INP_WUNLOCK(inp); NET_EPOCH_EXIT(et); CURVNET_RESTORE(); @@ -1524,7 +1526,15 @@ reset: so = inp->inp_socket; KASSERT(so != NULL, ("%s: socket is NULL", __func__)); - if (!toe_syncache_expand(&inc, &to, &th, &so) || so == NULL) { + rstreason = toe_syncache_expand(&inc, &to, &th, &so); + if (rstreason < 0) { + free_toepcb(toep); + send_abort_rpl_synqe(TOEDEV(ifp), synqe, CPL_ABORT_NO_RST); + INP_WUNLOCK(inp); + NET_EPOCH_EXIT(et); + CURVNET_RESTORE(); + return (0); + } else if (rstreason == 0 || so == NULL) { free_toepcb(toep); goto reset; } From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:30:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3EA28533F23; Wed, 17 Feb 2021 21:30:56 +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 4DgrcJ1Mc8z3h4H; Wed, 17 Feb 2021 21:30:56 +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 21BC8403B; Wed, 17 Feb 2021 21:30:56 +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 11HLUuCm028123; Wed, 17 Feb 2021 21:30:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLUuxd028122; Wed, 17 Feb 2021 21:30:56 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:30:56 GMT Message-Id: <202102172130.11HLUuxd028122@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: cace1baa12a5 - stable/12 - mount_nfs: update man page description for oneopenown 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: cace1baa12a53dc089dcb49b8b34976bffa02702 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:30:56 -0000 The branch stable/12 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cace1baa12a53dc089dcb49b8b34976bffa02702 commit cace1baa12a53dc089dcb49b8b34976bffa02702 Author: Rick Macklem AuthorDate: 2021-01-18 03:00:41 +0000 Commit: Rick Macklem CommitDate: 2021-02-17 21:28:40 +0000 mount_nfs: update man page description for oneopenown A recent email discussion indicated that a large accumulation of NFSv4 Opens was occurring on a mount. This appears to have been caused by a shared library within the mount being used by several processes, such that there is always at least one of these processes running. A new Open was created by each process and were not closed, since all the Opens were never closed. This is alleviated by using the "oneopenown" mount option. This man page update attempts to indicate the use of "oneopenown" for this case. This is a content change. (cherry picked from commit 448de00de556753575ec0a2e705712e7c606e680) --- sbin/mount_nfs/mount_nfs.8 | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8 index debfb3fd7f1e..41fc8310fa84 100644 --- a/sbin/mount_nfs/mount_nfs.8 +++ b/sbin/mount_nfs/mount_nfs.8 @@ -28,7 +28,7 @@ .\" @(#)mount_nfs.8 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd November 30, 2020 +.Dd January 17, 2021 .Dt MOUNT_NFS 8 .Os .Sh NAME @@ -215,6 +215,19 @@ Make a minor version 1 of the NFS Version 4 protocol mount use a single OpenOwne for all Opens. This may be useful for a server with a very low limit on OpenOwners, such as AmazonEFS. +It may be required when an accumulation of NFS version 4 Opens occurs, +as indicated by the +.Dq Opens +count displayed by +.Xr nfsstat 8 +with the +.Fl c +and +.Fl E +command-line options. +A common case for an accumulation of Opens is a shared library within +the NFS mount that is used by several +processes, where at least one of these processes is always running. This option cannot be used for an NFS Version 4, minor version 0 mount. As such, this option requires the .Cm minorversion From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:31:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C73D8533EBE for ; Wed, 17 Feb 2021 21:31: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 4Dgrcd4fqSz3h5F; Wed, 17 Feb 2021 21:31: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 930D543BA; Wed, 17 Feb 2021 21:31: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 11HLVDgJ028287; Wed, 17 Feb 2021 21:31:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLVDEM028285; Wed, 17 Feb 2021 21:31:13 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:31:13 GMT Message-Id: <202102172131.11HLVDEM028285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Stefan Eßer Subject: git: f131090388ae - vendor/bc - Vendor import of Gavin Howard's bc-3.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/vendor/bc X-Git-Reftype: branch X-Git-Commit: f131090388ae3272660242339b6c9e010309d811 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:31:13 -0000 The branch vendor/bc has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=f131090388ae3272660242339b6c9e010309d811 commit f131090388ae3272660242339b6c9e010309d811 Author: Stefan Eßer AuthorDate: 2021-02-17 21:29:31 +0000 Commit: Stefan Eßer CommitDate: 2021-02-17 21:29:31 +0000 Vendor import of Gavin Howard's bc-3.3.0 --- Makefile.in | 2 +- NEWS.md | 20 ++++++++++++++++++++ README.md | 2 +- configure.sh | 7 +------ include/args.h | 2 +- include/status.h | 10 +++++++--- include/vm.h | 1 + manuals/bc.1.md.in | 23 ++++++++++++++++------- manuals/bc/A.1 | 25 +++++++++++++++++++------ manuals/bc/A.1.md | 23 ++++++++++++++++------- manuals/bc/E.1 | 25 +++++++++++++++++++------ manuals/bc/E.1.md | 23 ++++++++++++++++------- manuals/bc/EH.1 | 25 +++++++++++++++++++------ manuals/bc/EH.1.md | 23 ++++++++++++++++------- manuals/bc/EHN.1 | 25 +++++++++++++++++++------ manuals/bc/EHN.1.md | 23 ++++++++++++++++------- manuals/bc/EHNP.1 | 25 +++++++++++++++++++------ manuals/bc/EHNP.1.md | 23 ++++++++++++++++------- manuals/bc/EHP.1 | 25 +++++++++++++++++++------ manuals/bc/EHP.1.md | 23 ++++++++++++++++------- manuals/bc/EN.1 | 25 +++++++++++++++++++------ manuals/bc/EN.1.md | 23 ++++++++++++++++------- manuals/bc/ENP.1 | 25 +++++++++++++++++++------ manuals/bc/ENP.1.md | 23 ++++++++++++++++------- manuals/bc/EP.1 | 25 +++++++++++++++++++------ manuals/bc/EP.1.md | 23 ++++++++++++++++------- manuals/bc/H.1 | 25 +++++++++++++++++++------ manuals/bc/H.1.md | 23 ++++++++++++++++------- manuals/bc/HN.1 | 25 +++++++++++++++++++------ manuals/bc/HN.1.md | 23 ++++++++++++++++------- manuals/bc/HNP.1 | 25 +++++++++++++++++++------ manuals/bc/HNP.1.md | 23 ++++++++++++++++------- manuals/bc/HP.1 | 25 +++++++++++++++++++------ manuals/bc/HP.1.md | 23 ++++++++++++++++------- manuals/bc/N.1 | 25 +++++++++++++++++++------ manuals/bc/N.1.md | 23 ++++++++++++++++------- manuals/bc/NP.1 | 25 +++++++++++++++++++------ manuals/bc/NP.1.md | 23 ++++++++++++++++------- manuals/bc/P.1 | 25 +++++++++++++++++++------ manuals/bc/P.1.md | 23 ++++++++++++++++------- manuals/bcl.3 | 2 +- manuals/build.md | 16 ++++++++++++++++ manuals/dc.1.md.in | 27 ++++++++++++++++++--------- manuals/dc/A.1 | 29 +++++++++++++++++++++-------- manuals/dc/A.1.md | 27 ++++++++++++++++++--------- manuals/dc/E.1 | 27 ++++++++++++++++++++------- manuals/dc/E.1.md | 25 +++++++++++++++++-------- manuals/dc/EH.1 | 27 ++++++++++++++++++++------- manuals/dc/EH.1.md | 25 +++++++++++++++++-------- manuals/dc/EHN.1 | 27 ++++++++++++++++++++------- manuals/dc/EHN.1.md | 25 +++++++++++++++++-------- manuals/dc/EHNP.1 | 27 ++++++++++++++++++++------- manuals/dc/EHNP.1.md | 25 +++++++++++++++++-------- manuals/dc/EHP.1 | 27 ++++++++++++++++++++------- manuals/dc/EHP.1.md | 25 +++++++++++++++++-------- manuals/dc/EN.1 | 27 ++++++++++++++++++++------- manuals/dc/EN.1.md | 25 +++++++++++++++++-------- manuals/dc/ENP.1 | 27 ++++++++++++++++++++------- manuals/dc/ENP.1.md | 25 +++++++++++++++++-------- manuals/dc/EP.1 | 27 ++++++++++++++++++++------- manuals/dc/EP.1.md | 25 +++++++++++++++++-------- manuals/dc/H.1 | 29 +++++++++++++++++++++-------- manuals/dc/H.1.md | 27 ++++++++++++++++++--------- manuals/dc/HN.1 | 29 +++++++++++++++++++++-------- manuals/dc/HN.1.md | 27 ++++++++++++++++++--------- manuals/dc/HNP.1 | 29 +++++++++++++++++++++-------- manuals/dc/HNP.1.md | 27 ++++++++++++++++++--------- manuals/dc/HP.1 | 29 +++++++++++++++++++++-------- manuals/dc/HP.1.md | 27 ++++++++++++++++++--------- manuals/dc/N.1 | 29 +++++++++++++++++++++-------- manuals/dc/N.1.md | 27 ++++++++++++++++++--------- manuals/dc/NP.1 | 29 +++++++++++++++++++++-------- manuals/dc/NP.1.md | 27 ++++++++++++++++++--------- manuals/dc/P.1 | 29 +++++++++++++++++++++-------- manuals/dc/P.1.md | 27 ++++++++++++++++++--------- manuals/header_bc.txt | 2 +- manuals/header_bcl.txt | 2 +- manuals/header_dc.txt | 2 +- release.sh | 2 +- src/args.c | 4 +++- src/vm.c | 6 +++--- tests/script.sh | 2 +- 82 files changed, 1262 insertions(+), 502 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8ae982bd99fe..dbb5debd44cc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.2.6 +VERSION = 3.3.0 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/NEWS.md b/NEWS.md index 5982defb754c..6a8899200f4a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,25 @@ # News +## 3.3.0 + +This is a production release that changes one behavior and fixes documentation +bugs. + +The changed behavior is the treatment of `-e` and `-f` when given through +`BC_ENV_ARGS` or `DC_ENV_ARGS`. Now `bc` and `dc` do not exit when those options +(or their equivalents) are given through those environment variables. However, +`bc` and `dc` still exit when they or their equivalents are given on the +command-line. + +## 3.2.7 + +This is a production release that removes a small non-portable shell operation +in `configure.sh`. This problem was only noticed on OpenBSD, not FreeBSD or +Linux. + +Non-OpenBSD users do ***NOT*** need to upgrade, although NetBSD users may also +need to upgrade. + ## 3.2.6 This is a production release that fixes the build on FreeBSD. diff --git a/README.md b/README.md index beda88d23f90..2f95e16ed246 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ Folders: [20]: https://git.yzena.com/gavin/bc [21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ [22]: https://www.deepl.com/translator -[23]: https://svnweb.freebsd.org/base/head/contrib/bc/ +[23]: https://cgit.freebsd.org/src/tree/contrib/bc [24]: https://bugs.freebsd.org/ [25]: https://reviews.freebsd.org/ [26]: ./manuals/bcl.3.md diff --git a/configure.sh b/configure.sh index ae1675cde97d..310c26882906 100755 --- a/configure.sh +++ b/configure.sh @@ -253,7 +253,7 @@ replace_ext() { _replace_ext_ext1="$2" _replace_ext_ext2="$3" - _replace_ext_result=${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2 + _replace_ext_result="${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2" printf '%s\n' "$_replace_ext_result" } @@ -1199,17 +1199,12 @@ SRC_TARGETS="" src_files=$(find_src_files $unneeded) -temp_ifs="$IFS" -IFS=$'\n' - for f in $src_files; do o=$(replace_ext "$f" "c" "o") SRC_TARGETS=$(printf '%s\n\n%s: %s %s\n\t$(CC) $(CFLAGS) -o %s -c %s\n' \ "$SRC_TARGETS" "$o" "$headers" "$f" "$o" "$f") done -IFS="$temp_ifs" - contents=$(replace "$contents" "HEADERS" "$headers") contents=$(replace "$contents" "BC_ENABLED" "$bc") diff --git a/include/args.h b/include/args.h index 6b68ed300440..d53785067237 100644 --- a/include/args.h +++ b/include/args.h @@ -39,7 +39,7 @@ #include #include -void bc_args(int argc, char *argv[]); +void bc_args(int argc, char *argv[], bool exit_exprs); extern const char* const bc_args_env_name; diff --git a/include/status.h b/include/status.h index 3fa844485690..cf41a3ce4670 100644 --- a/include/status.h +++ b/include/status.h @@ -176,11 +176,15 @@ typedef enum BcErr { #endif // __STDC_VERSION__ #if defined(__clang__) || defined(__GNUC__) -#if defined(__has_attribute) && __has_attribute(fallthrough) +#if defined(__has_attribute) +#if __has_attribute(fallthrough) #define BC_FALLTHROUGH __attribute__((fallthrough)); -#else // defined(__has_attribute) && __has_attribute(fallthrough) +#else // __has_attribute(fallthrough) #define BC_FALLTHROUGH -#endif // defined(__has_attribute) && __has_attribute(fallthrough) +#endif // __has_attribute(fallthrough) +#else // defined(__has_attribute) +#define BC_FALLTHROUGH +#endif // defined(__has_attribute) #else // defined(__clang__) || defined(__GNUC__) #define BC_FALLTHROUGH #endif // defined(__clang__) || defined(__GNUC__) diff --git a/include/vm.h b/include/vm.h index 8b0babff4d81..80a060edd42f 100644 --- a/include/vm.h +++ b/include/vm.h @@ -356,6 +356,7 @@ typedef struct BcVm { uint16_t line_len; bool no_exit_exprs; + bool exit_exprs; bool eof; #endif // !BC_ENABLE_LIBRARY diff --git a/manuals/bc.1.md.in b/manuals/bc.1.md.in index 624ea3fb54ab..1ce83b8237cd 100644 --- a/manuals/bc.1.md.in +++ b/manuals/bc.1.md.in @@ -229,10 +229,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -242,8 +245,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -251,7 +258,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/A.1 b/manuals/bc/A.1 index da35e8c7eaee..d1e80769c855 100644 --- a/manuals/bc/A.1 +++ b/manuals/bc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -230,12 +230,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -247,9 +251,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -258,6 +268,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/A.1.md b/manuals/bc/A.1.md index 293a21ad0259..0cf7a4a0d70e 100644 --- a/manuals/bc/A.1.md +++ b/manuals/bc/A.1.md @@ -187,10 +187,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -200,8 +203,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -209,7 +216,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/E.1 b/manuals/bc/E.1 index 02a56e6c653c..597cde782788 100644 --- a/manuals/bc/E.1 +++ b/manuals/bc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -220,6 +230,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/E.1.md b/manuals/bc/E.1.md index 7cbc1a56548a..864cf32068bf 100644 --- a/manuals/bc/E.1.md +++ b/manuals/bc/E.1.md @@ -171,10 +171,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -184,8 +187,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -193,7 +200,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EH.1 b/manuals/bc/EH.1 index 8cb2a3bc8335..dca77a99162e 100644 --- a/manuals/bc/EH.1 +++ b/manuals/bc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EH.1.md b/manuals/bc/EH.1.md index 351882878cd3..c1e324ab6ebc 100644 --- a/manuals/bc/EH.1.md +++ b/manuals/bc/EH.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHN.1 b/manuals/bc/EHN.1 index f751f9d31beb..6b208ade85fd 100644 --- a/manuals/bc/EHN.1 +++ b/manuals/bc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHN.1.md b/manuals/bc/EHN.1.md index dfe1c401970f..4ee01a4bbcc8 100644 --- a/manuals/bc/EHN.1.md +++ b/manuals/bc/EHN.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHNP.1 b/manuals/bc/EHNP.1 index e25cd1a7da42..7bd46f38e104 100644 --- a/manuals/bc/EHNP.1 +++ b/manuals/bc/EHNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHNP.1.md b/manuals/bc/EHNP.1.md index e55673769736..8aca89e6f7b0 100644 --- a/manuals/bc/EHNP.1.md +++ b/manuals/bc/EHNP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EHP.1 b/manuals/bc/EHP.1 index 7f35d1a1be7f..31c02f1b9591 100644 --- a/manuals/bc/EHP.1 +++ b/manuals/bc/EHP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/manuals/bc/EHP.1.md b/manuals/bc/EHP.1.md index 11050003420f..2c9ab3909dd6 100644 --- a/manuals/bc/EHP.1.md +++ b/manuals/bc/EHP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/manuals/bc/EN.1 b/manuals/bc/EN.1 index c8e3a327b2f8..faa6bf488e28 100644 --- a/manuals/bc/EN.1 +++ b/manuals/bc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -220,6 +230,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP *** 3425 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:31:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D3E11533DE0 for ; Wed, 17 Feb 2021 21:31: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 4Dgrcf5bBbz3RLM; Wed, 17 Feb 2021 21:31: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 B2DD5411C; Wed, 17 Feb 2021 21:31: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 11HLVEJM028817; Wed, 17 Feb 2021 21:31:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLVEYB028816; Wed, 17 Feb 2021 21:31:14 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:31:14 GMT Message-Id: <202102172131.11HLVEYB028816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Stefan Eßer Subject: git: 559d09aa6eca - Create tag vendor/bc/bc-3.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/tags/vendor/bc/bc-3.3.0 X-Git-Reftype: annotated tag X-Git-Commit: 559d09aa6ecaecf258b0447ba6e8dc5fb23d3d1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:31:14 -0000 The annotated tag vendor/bc/bc-3.3.0 has been created by se: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/bc/bc-3.3.0 tag vendor/bc/bc-3.3.0 Tagger: Stefan Eßer TaggerDate: 2021-02-17 21:30:02 +0000 Tag bc-3.3.0 commit f131090388ae3272660242339b6c9e010309d811 Author: Stefan Eßer AuthorDate: 2021-02-17 21:29:31 +0000 Commit: Stefan Eßer CommitDate: 2021-02-17 21:29:31 +0000 Vendor import of Gavin Howard's bc-3.3.0 From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:33:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 28A3E533EE6; Wed, 17 Feb 2021 21:33: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 4DgrgN0fxfz3j9S; Wed, 17 Feb 2021 21:33: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 09A78424C; Wed, 17 Feb 2021 21:33: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 11HLXZwg032924; Wed, 17 Feb 2021 21:33:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLXZlv032923; Wed, 17 Feb 2021 21:33:35 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:33:35 GMT Message-Id: <202102172133.11HLXZlv032923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 00065c7630c2 - main - Giant: move back Giant removal until 14 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00065c7630c25850298dd3ba6919c2d3628e8ad9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:33:36 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=00065c7630c25850298dd3ba6919c2d3628e8ad9 commit 00065c7630c25850298dd3ba6919c2d3628e8ad9 Author: Warner Losh AuthorDate: 2021-02-17 16:28:41 +0000 Commit: Warner Losh CommitDate: 2021-02-17 21:33:09 +0000 Giant: move back Giant removal until 14 Update the Giant Lock warning message to FreeBSD 14. It's growing increasling clear that this won't be done before 13.0. MFC: Insta (re@'s request) --- sys/kern/kern_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 5211422199bb..29103f83c049 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -667,7 +667,7 @@ prep_cdevsw(struct cdevsw *devsw, int flags) if (devsw->d_flags & D_NEEDGIANT) { printf("WARNING: Device \"%s\" is Giant locked and may be " - "deleted before FreeBSD 13.0.\n", + "deleted before FreeBSD 14.0.\n", devsw->d_name == NULL ? "???" : devsw->d_name); if (devsw->d_gianttrick == NULL) { memcpy(dsw2, devsw, sizeof *dsw2); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:55:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B8134535C95; Wed, 17 Feb 2021 21:55: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 4Dgs8R4qM8z3kf9; Wed, 17 Feb 2021 21:55: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 8E37346AC; Wed, 17 Feb 2021 21:55: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 11HLtJfq059424; Wed, 17 Feb 2021 21:55:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLtJBV059423; Wed, 17 Feb 2021 21:55:19 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:55:19 GMT Message-Id: <202102172155.11HLtJBV059423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: D Scott Phillips Subject: git: 3046eb03ccf0 - main - gicv3_its: Don't restrict target CPUs based on SRAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: scottph X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3046eb03ccf0a5fe63f5e6f4aad13ca422d3d011 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:55:19 -0000 The branch main has been updated by scottph: URL: https://cgit.FreeBSD.org/src/commit/?id=3046eb03ccf0a5fe63f5e6f4aad13ca422d3d011 commit 3046eb03ccf0a5fe63f5e6f4aad13ca422d3d011 Author: D Scott Phillips AuthorDate: 2021-02-16 18:07:27 +0000 Commit: D Scott Phillips CommitDate: 2021-02-17 21:54:51 +0000 gicv3_its: Don't restrict target CPUs based on SRAT ACPI Sec 5.2.16.5 (SRAT, GIC Interrupt Translation Service (ITS) Affinity Structure) says: > The GIC ITS Affinity Structure provides the association between > a GIC ITS and a proximity domain. This enables the OSPM to > discover the memory that is closest to the ITS, and use that in > allocating its management tables and command queue. Previously the ITS driver was using the proximity domain to restrict which CPUs can be targeted by an LPI. We keep that logic just for the original dual socket ThunderX which cannot forward LPIs between sockets. We also use the SRAT entry for its intended purpose of attempting to allocate ITS table structures near the ITS. Reviewed by: andrew Sponsored by: Ampere Computing LLC Differential Revision: https://reviews.freebsd.org/D28340 --- sys/arm64/arm64/gicv3_its.c | 51 ++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index ba7ccdc7d696..11cf05b04cfe 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -246,6 +247,7 @@ struct gicv3_its_softc { struct resource *sc_its_res; cpuset_t sc_cpus; + struct domainset *sc_ds; u_int gic_irq_cpu; struct its_ptable sc_its_ptab[GITS_BASER_NUM]; @@ -385,8 +387,9 @@ gicv3_its_cmdq_init(struct gicv3_its_softc *sc) uint64_t reg, tmp; /* Set up the command circular buffer */ - sc->sc_its_cmd_base = contigmalloc(ITS_CMDQ_SIZE, M_GICV3_ITS, - M_WAITOK | M_ZERO, 0, (1ul << 48) - 1, ITS_CMDQ_ALIGN, 0); + sc->sc_its_cmd_base = contigmalloc_domainset(ITS_CMDQ_SIZE, M_GICV3_ITS, + sc->sc_ds, M_WAITOK | M_ZERO, 0, (1ul << 48) - 1, ITS_CMDQ_ALIGN, + 0); sc->sc_its_cmd_next_idx = 0; cmd_paddr = vtophys(sc->sc_its_cmd_base); @@ -486,9 +489,9 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_softc *sc) npages = howmany(its_tbl_size, PAGE_SIZE); /* Allocate the table */ - table = (vm_offset_t)contigmalloc(npages * PAGE_SIZE, - M_GICV3_ITS, M_WAITOK | M_ZERO, 0, (1ul << 48) - 1, - PAGE_SIZE_64K, 0); + table = (vm_offset_t)contigmalloc_domainset(npages * PAGE_SIZE, + M_GICV3_ITS, sc->sc_ds, M_WAITOK | M_ZERO, 0, + (1ul << 48) - 1, PAGE_SIZE_64K, 0); sc->sc_its_ptab[i].ptab_vaddr = table; sc->sc_its_ptab[i].ptab_size = npages * PAGE_SIZE; @@ -844,6 +847,7 @@ gicv3_its_attach(device_t dev) sc->ma = malloc(sizeof(struct vm_page), M_DEVBUF, M_WAITOK | M_ZERO); vm_page_initfake(sc->ma, phys, VM_MEMATTR_DEFAULT); + CPU_COPY(&all_cpus, &sc->sc_cpus); iidr = gic_its_read_4(sc, GITS_IIDR); for (i = 0; i < nitems(its_quirks); i++) { if ((iidr & its_quirks[i].iidr_mask) == its_quirks[i].iidr) { @@ -856,6 +860,12 @@ gicv3_its_attach(device_t dev) } } + if (bus_get_domain(dev, &domain) == 0 && domain < MAXMEMDOM) { + sc->sc_ds = DOMAINSET_PREF(domain); + } else { + sc->sc_ds = DOMAINSET_RR(); + } + /* Allocate the private tables */ err = gicv3_its_table_init(dev, sc); if (err != 0) @@ -867,22 +877,15 @@ gicv3_its_attach(device_t dev) /* Protects access to the ITS command circular buffer. */ mtx_init(&sc->sc_its_cmd_lock, "ITS cmd lock", NULL, MTX_SPIN); - CPU_ZERO(&sc->sc_cpus); - if (bus_get_domain(dev, &domain) == 0) { - if (domain < MAXMEMDOM) - CPU_COPY(&cpuset_domain[domain], &sc->sc_cpus); - } else { - CPU_COPY(&all_cpus, &sc->sc_cpus); - } - /* Allocate the command circular buffer */ gicv3_its_cmdq_init(sc); /* Allocate the per-CPU collections */ for (int cpu = 0; cpu <= mp_maxid; cpu++) if (CPU_ISSET(cpu, &sc->sc_cpus) != 0) - sc->sc_its_cols[cpu] = malloc( + sc->sc_its_cols[cpu] = malloc_domainset( sizeof(*sc->sc_its_cols[0]), M_GICV3_ITS, + DOMAINSET_PREF(pcpu_find(cpu)->pc_domain), M_WAITOK | M_ZERO); else sc->sc_its_cols[cpu] = NULL; @@ -934,9 +937,23 @@ static void its_quirk_cavium_22375(device_t dev) { struct gicv3_its_softc *sc; + int domain; sc = device_get_softc(dev); sc->sc_its_flags |= ITS_FLAGS_ERRATA_CAVIUM_22375; + + /* + * We need to limit which CPUs we send these interrupts to on + * the original dual socket ThunderX as it is unable to + * forward them between the two sockets. + */ + if (bus_get_domain(dev, &domain) == 0) { + if (domain < MAXMEMDOM) { + CPU_COPY(&cpuset_domain[domain], &sc->sc_cpus); + } else { + CPU_ZERO(&sc->sc_cpus); + } + } } static void @@ -1171,9 +1188,9 @@ its_device_get(device_t dev, device_t child, u_int nvecs) * PA has to be 256 B aligned. At least two entries for device. */ its_dev->itt_size = roundup2(MAX(nvecs, 2) * esize, 256); - its_dev->itt = (vm_offset_t)contigmalloc(its_dev->itt_size, - M_GICV3_ITS, M_NOWAIT | M_ZERO, 0, LPI_INT_TRANS_TAB_MAX_ADDR, - LPI_INT_TRANS_TAB_ALIGN, 0); + its_dev->itt = (vm_offset_t)contigmalloc_domainset(its_dev->itt_size, + M_GICV3_ITS, sc->sc_ds, M_NOWAIT | M_ZERO, 0, + LPI_INT_TRANS_TAB_MAX_ADDR, LPI_INT_TRANS_TAB_ALIGN, 0); if (its_dev->itt == 0) { vmem_free(sc->sc_irq_alloc, its_dev->lpis.lpi_base, nvecs); free(its_dev, M_GICV3_ITS); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:56:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2679A5364F6; Wed, 17 Feb 2021 21:56: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 4DgsB401dHz3kx2; Wed, 17 Feb 2021 21:56: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 D9C1446AE; Wed, 17 Feb 2021 21:56: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 11HLuhsq059734; Wed, 17 Feb 2021 21:56:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLuhBt059733; Wed, 17 Feb 2021 21:56:43 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:56:43 GMT Message-Id: <202102172156.11HLuhBt059733@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: b4bf7bdeb70d - stable/12 - Giant: move back Giant removal until 14 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: b4bf7bdeb70d9378bcff6de889bd8047fd3e13a2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:56:44 -0000 The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4bf7bdeb70d9378bcff6de889bd8047fd3e13a2 commit b4bf7bdeb70d9378bcff6de889bd8047fd3e13a2 Author: Warner Losh AuthorDate: 2021-02-17 16:28:41 +0000 Commit: Warner Losh CommitDate: 2021-02-17 21:55:38 +0000 Giant: move back Giant removal until 14 Update the Giant Lock warning message to FreeBSD 14. It's growing increasling clear that this won't be done before 13.0. MFC: Insta (re@'s request) Approved by: re@ (gjb for 13.0 release cycle) (cherry picked from commit 00065c7630c25850298dd3ba6919c2d3628e8ad9) --- sys/kern/kern_conf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 242ba15a1b49..089ec5bd6c3f 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -665,6 +665,9 @@ prep_cdevsw(struct cdevsw *devsw, int flags) } if (devsw->d_flags & D_NEEDGIANT) { + printf("WARNING: Device \"%s\" is Giant locked and may be " + "deleted before FreeBSD 14.0.\n", + devsw->d_name == NULL ? "???" : devsw->d_name); if (devsw->d_gianttrick == NULL) { memcpy(dsw2, devsw, sizeof *dsw2); devsw->d_gianttrick = dsw2; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 21:56:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A188B536598; Wed, 17 Feb 2021 21:56: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 4DgsBG39zPz3lGD; Wed, 17 Feb 2021 21:56:54 +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 4718C4726; Wed, 17 Feb 2021 21:56: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 11HLuqRP059859; Wed, 17 Feb 2021 21:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HLuqmB059858; Wed, 17 Feb 2021 21:56:52 GMT (envelope-from git) Date: Wed, 17 Feb 2021 21:56:52 GMT Message-Id: <202102172156.11HLuqmB059858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: d2fb8eb1472c - stable/13 - Giant: move back Giant removal until 14 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d2fb8eb1472ccc1b2175238f7668816544bf15f7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 21:56:56 -0000 The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d2fb8eb1472ccc1b2175238f7668816544bf15f7 commit d2fb8eb1472ccc1b2175238f7668816544bf15f7 Author: Warner Losh AuthorDate: 2021-02-17 16:28:41 +0000 Commit: Warner Losh CommitDate: 2021-02-17 21:46:40 +0000 Giant: move back Giant removal until 14 Update the Giant Lock warning message to FreeBSD 14. It's growing increasling clear that this won't be done before 13.0. MFC: Insta (re@'s request) Approved by: re@ (gjb requested insta-mfc to make release) (cherry picked from commit 00065c7630c25850298dd3ba6919c2d3628e8ad9) --- sys/kern/kern_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 5211422199bb..29103f83c049 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -667,7 +667,7 @@ prep_cdevsw(struct cdevsw *devsw, int flags) if (devsw->d_flags & D_NEEDGIANT) { printf("WARNING: Device \"%s\" is Giant locked and may be " - "deleted before FreeBSD 13.0.\n", + "deleted before FreeBSD 14.0.\n", devsw->d_name == NULL ? "???" : devsw->d_name); if (devsw->d_gianttrick == NULL) { memcpy(dsw2, devsw, sizeof *dsw2); From owner-dev-commits-src-all@freebsd.org Wed Feb 17 22:02:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EB99B536774; Wed, 17 Feb 2021 22:02:07 +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 4DgsJH6HFzz3ldf; Wed, 17 Feb 2021 22:02:07 +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 CAB7644E1; Wed, 17 Feb 2021 22:02:07 +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 11HM27KV071614; Wed, 17 Feb 2021 22:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HM27eQ071611; Wed, 17 Feb 2021 22:02:07 GMT (envelope-from git) Date: Wed, 17 Feb 2021 22:02:07 GMT Message-Id: <202102172202.11HM27eQ071611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Stefan Eßer Subject: git: 9a995fe18625 - main - Upgrade to version 3.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a995fe186257315e7b3d01e24c55d86bb18fd32 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 22:02:08 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=9a995fe186257315e7b3d01e24c55d86bb18fd32 commit 9a995fe186257315e7b3d01e24c55d86bb18fd32 Author: Stefan Eßer AuthorDate: 2021-02-17 21:56:16 +0000 Commit: Stefan Eßer CommitDate: 2021-02-17 22:02:01 +0000 Upgrade to version 3.3.0 This update changes the behavior of "-e" or "-f" in BC_ENV_ARGS: Use of these options on the command line makes bc exit after executing the given commands. These options will not cause bc to exit when passed via the environment (but EOF in STDIN or -e or -f on the command line will make bc exit as before). The same applies to DC_ENV_ARGS with regard to the dc program. --- contrib/bc/Makefile.in | 2 +- contrib/bc/NEWS.md | 20 ++++++++++++++++++++ contrib/bc/README.md | 2 +- contrib/bc/configure.sh | 7 +------ contrib/bc/include/args.h | 2 +- contrib/bc/include/status.h | 10 +++++++--- contrib/bc/include/vm.h | 1 + contrib/bc/manuals/bc.1.md.in | 23 ++++++++++++++++------- contrib/bc/manuals/bc/A.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/A.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/E.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/E.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EH.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EH.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EHN.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EHN.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EHNP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EHNP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EHP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EHP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EN.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EN.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/ENP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/ENP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/EP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/EP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/H.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/H.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/HN.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/HN.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/HNP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/HNP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/HP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/HP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/N.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/N.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/NP.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/NP.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bc/P.1 | 25 +++++++++++++++++++------ contrib/bc/manuals/bc/P.1.md | 23 ++++++++++++++++------- contrib/bc/manuals/bcl.3 | 2 +- contrib/bc/manuals/build.md | 16 ++++++++++++++++ contrib/bc/manuals/dc.1.md.in | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/A.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/A.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/E.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/E.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EH.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EH.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EHN.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EHN.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EHNP.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EHNP.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EHP.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EHP.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EN.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EN.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/ENP.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/ENP.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/EP.1 | 27 ++++++++++++++++++++------- contrib/bc/manuals/dc/EP.1.md | 25 +++++++++++++++++-------- contrib/bc/manuals/dc/H.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/H.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/HN.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/HN.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/HNP.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/HNP.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/HP.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/HP.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/N.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/N.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/NP.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/NP.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/dc/P.1 | 29 +++++++++++++++++++++-------- contrib/bc/manuals/dc/P.1.md | 27 ++++++++++++++++++--------- contrib/bc/manuals/header_bc.txt | 2 +- contrib/bc/manuals/header_bcl.txt | 2 +- contrib/bc/manuals/header_dc.txt | 2 +- contrib/bc/release.sh | 2 +- contrib/bc/src/args.c | 4 +++- contrib/bc/src/vm.c | 6 +++--- contrib/bc/tests/script.sh | 2 +- 82 files changed, 1262 insertions(+), 502 deletions(-) diff --git a/contrib/bc/Makefile.in b/contrib/bc/Makefile.in index 8ae982bd99fe..dbb5debd44cc 100644 --- a/contrib/bc/Makefile.in +++ b/contrib/bc/Makefile.in @@ -29,7 +29,7 @@ # .POSIX: -VERSION = 3.2.6 +VERSION = 3.3.0 SRC = %%SRC%% OBJ = %%OBJ%% diff --git a/contrib/bc/NEWS.md b/contrib/bc/NEWS.md index 5982defb754c..6a8899200f4a 100644 --- a/contrib/bc/NEWS.md +++ b/contrib/bc/NEWS.md @@ -1,5 +1,25 @@ # News +## 3.3.0 + +This is a production release that changes one behavior and fixes documentation +bugs. + +The changed behavior is the treatment of `-e` and `-f` when given through +`BC_ENV_ARGS` or `DC_ENV_ARGS`. Now `bc` and `dc` do not exit when those options +(or their equivalents) are given through those environment variables. However, +`bc` and `dc` still exit when they or their equivalents are given on the +command-line. + +## 3.2.7 + +This is a production release that removes a small non-portable shell operation +in `configure.sh`. This problem was only noticed on OpenBSD, not FreeBSD or +Linux. + +Non-OpenBSD users do ***NOT*** need to upgrade, although NetBSD users may also +need to upgrade. + ## 3.2.6 This is a production release that fixes the build on FreeBSD. diff --git a/contrib/bc/README.md b/contrib/bc/README.md index beda88d23f90..2f95e16ed246 100644 --- a/contrib/bc/README.md +++ b/contrib/bc/README.md @@ -342,7 +342,7 @@ Folders: [20]: https://git.yzena.com/gavin/bc [21]: https://gavinhoward.com/2020/04/i-am-moving-away-from-github/ [22]: https://www.deepl.com/translator -[23]: https://svnweb.freebsd.org/base/head/contrib/bc/ +[23]: https://cgit.freebsd.org/src/tree/contrib/bc [24]: https://bugs.freebsd.org/ [25]: https://reviews.freebsd.org/ [26]: ./manuals/bcl.3.md diff --git a/contrib/bc/configure.sh b/contrib/bc/configure.sh index ae1675cde97d..310c26882906 100755 --- a/contrib/bc/configure.sh +++ b/contrib/bc/configure.sh @@ -253,7 +253,7 @@ replace_ext() { _replace_ext_ext1="$2" _replace_ext_ext2="$3" - _replace_ext_result=${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2 + _replace_ext_result="${_replace_ext_file%.$_replace_ext_ext1}.$_replace_ext_ext2" printf '%s\n' "$_replace_ext_result" } @@ -1199,17 +1199,12 @@ SRC_TARGETS="" src_files=$(find_src_files $unneeded) -temp_ifs="$IFS" -IFS=$'\n' - for f in $src_files; do o=$(replace_ext "$f" "c" "o") SRC_TARGETS=$(printf '%s\n\n%s: %s %s\n\t$(CC) $(CFLAGS) -o %s -c %s\n' \ "$SRC_TARGETS" "$o" "$headers" "$f" "$o" "$f") done -IFS="$temp_ifs" - contents=$(replace "$contents" "HEADERS" "$headers") contents=$(replace "$contents" "BC_ENABLED" "$bc") diff --git a/contrib/bc/include/args.h b/contrib/bc/include/args.h index 6b68ed300440..d53785067237 100644 --- a/contrib/bc/include/args.h +++ b/contrib/bc/include/args.h @@ -39,7 +39,7 @@ #include #include -void bc_args(int argc, char *argv[]); +void bc_args(int argc, char *argv[], bool exit_exprs); extern const char* const bc_args_env_name; diff --git a/contrib/bc/include/status.h b/contrib/bc/include/status.h index 3fa844485690..cf41a3ce4670 100644 --- a/contrib/bc/include/status.h +++ b/contrib/bc/include/status.h @@ -176,11 +176,15 @@ typedef enum BcErr { #endif // __STDC_VERSION__ #if defined(__clang__) || defined(__GNUC__) -#if defined(__has_attribute) && __has_attribute(fallthrough) +#if defined(__has_attribute) +#if __has_attribute(fallthrough) #define BC_FALLTHROUGH __attribute__((fallthrough)); -#else // defined(__has_attribute) && __has_attribute(fallthrough) +#else // __has_attribute(fallthrough) #define BC_FALLTHROUGH -#endif // defined(__has_attribute) && __has_attribute(fallthrough) +#endif // __has_attribute(fallthrough) +#else // defined(__has_attribute) +#define BC_FALLTHROUGH +#endif // defined(__has_attribute) #else // defined(__clang__) || defined(__GNUC__) #define BC_FALLTHROUGH #endif // defined(__clang__) || defined(__GNUC__) diff --git a/contrib/bc/include/vm.h b/contrib/bc/include/vm.h index 8b0babff4d81..80a060edd42f 100644 --- a/contrib/bc/include/vm.h +++ b/contrib/bc/include/vm.h @@ -356,6 +356,7 @@ typedef struct BcVm { uint16_t line_len; bool no_exit_exprs; + bool exit_exprs; bool eof; #endif // !BC_ENABLE_LIBRARY diff --git a/contrib/bc/manuals/bc.1.md.in b/contrib/bc/manuals/bc.1.md.in index 624ea3fb54ab..1ce83b8237cd 100644 --- a/contrib/bc/manuals/bc.1.md.in +++ b/contrib/bc/manuals/bc.1.md.in @@ -229,10 +229,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -242,8 +245,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -251,7 +258,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/A.1 b/contrib/bc/manuals/bc/A.1 index da35e8c7eaee..d1e80769c855 100644 --- a/contrib/bc/manuals/bc/A.1 +++ b/contrib/bc/manuals/bc/A.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -230,12 +230,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -247,9 +251,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -258,6 +268,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/A.1.md b/contrib/bc/manuals/bc/A.1.md index 293a21ad0259..0cf7a4a0d70e 100644 --- a/contrib/bc/manuals/bc/A.1.md +++ b/contrib/bc/manuals/bc/A.1.md @@ -187,10 +187,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -200,8 +203,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -209,7 +216,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/E.1 b/contrib/bc/manuals/bc/E.1 index 02a56e6c653c..597cde782788 100644 --- a/contrib/bc/manuals/bc/E.1 +++ b/contrib/bc/manuals/bc/E.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -220,6 +230,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/E.1.md b/contrib/bc/manuals/bc/E.1.md index 7cbc1a56548a..864cf32068bf 100644 --- a/contrib/bc/manuals/bc/E.1.md +++ b/contrib/bc/manuals/bc/E.1.md @@ -171,10 +171,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -184,8 +187,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -193,7 +200,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/EH.1 b/contrib/bc/manuals/bc/EH.1 index 8cb2a3bc8335..dca77a99162e 100644 --- a/contrib/bc/manuals/bc/EH.1 +++ b/contrib/bc/manuals/bc/EH.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/EH.1.md b/contrib/bc/manuals/bc/EH.1.md index 351882878cd3..c1e324ab6ebc 100644 --- a/contrib/bc/manuals/bc/EH.1.md +++ b/contrib/bc/manuals/bc/EH.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/EHN.1 b/contrib/bc/manuals/bc/EHN.1 index f751f9d31beb..6b208ade85fd 100644 --- a/contrib/bc/manuals/bc/EHN.1 +++ b/contrib/bc/manuals/bc/EHN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -189,12 +189,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -206,9 +210,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -217,6 +227,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/EHN.1.md b/contrib/bc/manuals/bc/EHN.1.md index dfe1c401970f..4ee01a4bbcc8 100644 --- a/contrib/bc/manuals/bc/EHN.1.md +++ b/contrib/bc/manuals/bc/EHN.1.md @@ -168,10 +168,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -181,8 +184,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -190,7 +197,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/EHNP.1 b/contrib/bc/manuals/bc/EHNP.1 index e25cd1a7da42..7bd46f38e104 100644 --- a/contrib/bc/manuals/bc/EHNP.1 +++ b/contrib/bc/manuals/bc/EHNP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/EHNP.1.md b/contrib/bc/manuals/bc/EHNP.1.md index e55673769736..8aca89e6f7b0 100644 --- a/contrib/bc/manuals/bc/EHNP.1.md +++ b/contrib/bc/manuals/bc/EHNP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/EHP.1 b/contrib/bc/manuals/bc/EHP.1 index 7f35d1a1be7f..31c02f1b9591 100644 --- a/contrib/bc/manuals/bc/EHP.1 +++ b/contrib/bc/manuals/bc/EHP.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -184,12 +184,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -201,9 +205,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -212,6 +222,9 @@ All long options are \f[B]non-portable extensions\f[R]. .SH STDOUT .PP Any non-error output is written to \f[B]stdout\f[R]. +In addition, if history (see the \f[B]HISTORY\f[R] section) and the +prompt (see the \f[B]TTY MODE\f[R] section) are enabled, both are output +to \f[B]stdout\f[R]. .PP \f[B]Note\f[R]: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the \f[B]EXIT STATUS\f[R] section) if it cannot diff --git a/contrib/bc/manuals/bc/EHP.1.md b/contrib/bc/manuals/bc/EHP.1.md index 11050003420f..2c9ab3909dd6 100644 --- a/contrib/bc/manuals/bc/EHP.1.md +++ b/contrib/bc/manuals/bc/EHP.1.md @@ -164,10 +164,13 @@ The following are the options that bc(1) accepts. evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. - However, if any other **-e**, **--expression**, **-f**, or **--file** - arguments are given after that, bc(1) will give a fatal error and exit. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**, whether on the + command-line or in **BC_ENV_ARGS**. However, if any other **-e**, + **--expression**, **-f**, or **--file** arguments are given after **-f-** or + equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -177,8 +180,12 @@ The following are the options that bc(1) accepts. through **stdin**. If expressions are also given (see above), the expressions are evaluated in the order given. - After processing all expressions and files, bc(1) will exit, unless **-** - (**stdin**) was given as an argument at least once to **-f** or **--file**. + If this option is given on the command-line (i.e., not in **BC_ENV_ARGS**, + see the **ENVIRONMENT VARIABLES** section), then after processing all + expressions and files, bc(1) will exit, unless **-** (**stdin**) was given + as an argument at least once to **-f** or **--file**. However, if any other + **-e**, **--expression**, **-f**, or **--file** arguments are given after + **-f-** or equivalent is given, bc(1) will give a fatal error and exit. This is a **non-portable extension**. @@ -186,7 +193,9 @@ All long options are **non-portable extensions**. # STDOUT -Any non-error output is written to **stdout**. +Any non-error output is written to **stdout**. In addition, if history (see the +**HISTORY** section) and the prompt (see the **TTY MODE** section) are enabled, +both are output to **stdout**. **Note**: Unlike other bc(1) implementations, this bc(1) will issue a fatal error (see the **EXIT STATUS** section) if it cannot write to **stdout**, so if diff --git a/contrib/bc/manuals/bc/EN.1 b/contrib/bc/manuals/bc/EN.1 index c8e3a327b2f8..faa6bf488e28 100644 --- a/contrib/bc/manuals/bc/EN.1 +++ b/contrib/bc/manuals/bc/EN.1 @@ -25,7 +25,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.TH "BC" "1" "January 2021" "Gavin D. Howard" "General Commands Manual" +.TH "BC" "1" "February 2021" "Gavin D. Howard" "General Commands Manual" .SH NAME .PP bc - arbitrary-precision decimal arithmetic language and calculator @@ -192,12 +192,16 @@ This means that if a file is given before an expression, the file is read in and evaluated first. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to -\f[B]-f\f[R] or \f[B]\[en]file\f[R]. +\f[B]-f\f[R] or \f[B]\[en]file\f[R], whether on the command-line or in +\f[B]BC_ENV_ARGS\f[R]. However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], -\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after that, -bc(1) will give a fatal error and exit. +\f[B]-f\f[R], or \f[B]\[en]file\f[R] arguments are given after +\f[B]-f-\f[R] or equivalent is given, bc(1) will give a fatal error and +exit. .PP This is a \f[B]non-portable extension\f[R]. .RE @@ -209,9 +213,15 @@ If expressions are also given (see above), the expressions are evaluated in the order given. .RS .PP -After processing all expressions and files, bc(1) will exit, unless +If this option is given on the command-line (i.e., not in +\f[B]BC_ENV_ARGS\f[R], see the \f[B]ENVIRONMENT VARIABLES\f[R] section), +then after processing all expressions and files, bc(1) will exit, unless \f[B]-\f[R] (\f[B]stdin\f[R]) was given as an argument at least once to \f[B]-f\f[R] or \f[B]\[en]file\f[R]. +However, if any other \f[B]-e\f[R], \f[B]\[en]expression\f[R], *** 3434 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Feb 17 22:12:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8D490537537; Wed, 17 Feb 2021 22:12:26 +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 4DgsXB3fJBz3nPR; Wed, 17 Feb 2021 22:12: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 702EF4A95; Wed, 17 Feb 2021 22:12: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 11HMCQTx086019; Wed, 17 Feb 2021 22:12:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HMCQqq086018; Wed, 17 Feb 2021 22:12:26 GMT (envelope-from git) Date: Wed, 17 Feb 2021 22:12:26 GMT Message-Id: <202102172212.11HMCQqq086018@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 955b6109bb36 - main - uart: only use MSI on devices that advertise 1 MSI vector MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 955b6109bb36036e9357006be42dfa89cd7cb0f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 22:12:26 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=955b6109bb36036e9357006be42dfa89cd7cb0f2 commit 955b6109bb36036e9357006be42dfa89cd7cb0f2 Author: Warner Losh AuthorDate: 2021-02-17 22:08:19 +0000 Commit: Warner Losh CommitDate: 2021-02-17 22:08:19 +0000 uart: only use MSI on devices that advertise 1 MSI vector This updates r311987/fb1d9b7f4113d which allowed any number of vectors to be used. Since we're just attaching one instance, the meaning of more than one vector is not clear and seems to cause problems. Fall back to old methods for these cards. PR: 235016 Submitted by: David Cross --- sys/dev/uart/uart_bus_pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/uart/uart_bus_pci.c b/sys/dev/uart/uart_bus_pci.c index 0ed3d7f4f974..fbd1d68b88ca 100644 --- a/sys/dev/uart/uart_bus_pci.c +++ b/sys/dev/uart/uart_bus_pci.c @@ -227,10 +227,10 @@ uart_pci_attach(device_t dev) sc = device_get_softc(dev); /* - * Use MSI in preference to legacy IRQ if available. - * Whilst some PCIe UARTs support >1 MSI vector, use only the first. + * Use MSI in preference to legacy IRQ if available. However, experience + * suggests this is only reliable when one MSI vector is advertised. */ - if (pci_msi_count(dev) > 0) { + if (pci_msi_count(dev) == 1) { count = 1; if (pci_alloc_msi(dev, &count) == 0) { sc->sc_irid = 1; From owner-dev-commits-src-all@freebsd.org Wed Feb 17 22:27:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EF86053802F; Wed, 17 Feb 2021 22:27: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 4DgssP6W4yz3pL4; Wed, 17 Feb 2021 22:27: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 D2A074DDE; Wed, 17 Feb 2021 22:27: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 11HMRLDK099680; Wed, 17 Feb 2021 22:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HMRLYi099679; Wed, 17 Feb 2021 22:27:21 GMT (envelope-from git) Date: Wed, 17 Feb 2021 22:27:21 GMT Message-Id: <202102172227.11HMRLYi099679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: d616ae46b484 - main - Add fileprefixmap compiler feature MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d616ae46b4849b0678326dfacbba5fd7c8febbea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 22:27:22 -0000 The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d616ae46b4849b0678326dfacbba5fd7c8febbea commit d616ae46b4849b0678326dfacbba5fd7c8febbea Author: Dan McGregor AuthorDate: 2021-02-17 22:26:49 +0000 Commit: Brooks Davis CommitDate: 2021-02-17 22:26:49 +0000 Add fileprefixmap compiler feature -ffile-prefix-map== is a compiler feature first added in GCC 8, and implemented for clang 10. It remaps old paths to new paths in both debug information and __FILE__ and __BASE_FILE__ macros. It can be used to improve reproducibility or to hide local system directories. I intend to use it to replace the real source directory and real object directory with constant values across all builds. Reviewed by: brooks Differential Revision: https://reviews.freebsd.org/D28632 --- share/mk/bsd.compiler.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index fa8e6c44a17e..0d8f02489f00 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -226,6 +226,10 @@ ${X_}COMPILER_FEATURES+= c++17 .if ${${X_}COMPILER_TYPE} == "clang" ${X_}COMPILER_FEATURES+= retpoline init-all .endif +.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000 || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 80100) +${X_}COMPILER_FEATURES+= fileprefixmap +.endif .else # Use CC's values From owner-dev-commits-src-all@freebsd.org Wed Feb 17 22:53:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4864B538B39; Wed, 17 Feb 2021 22:53: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 4DgtR91B4tz3rCc; Wed, 17 Feb 2021 22:53: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 1B8A55076; Wed, 17 Feb 2021 22:53: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 11HMr9v6038377; Wed, 17 Feb 2021 22:53:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HMr9mN038376; Wed, 17 Feb 2021 22:53:09 GMT (envelope-from git) Date: Wed, 17 Feb 2021 22:53:09 GMT Message-Id: <202102172253.11HMr9mN038376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9b2f020c14af - main - Handle partial data re-sending on ktls/sendfile on FreeBSD MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b2f020c14af71a2606012143432dd717c7cf90e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 22:53:09 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9b2f020c14af71a2606012143432dd717c7cf90e commit 9b2f020c14af71a2606012143432dd717c7cf90e Author: Oleksandr Tymoshenko AuthorDate: 2021-02-17 22:49:30 +0000 Commit: John Baldwin CommitDate: 2021-02-17 22:51:55 +0000 Handle partial data re-sending on ktls/sendfile on FreeBSD Add a handler for EBUSY sendfile error in addition to EAGAIN. With EBUSY returned the data still can be partially sent and user code has to be notified about it, otherwise it may try to send data multiple times. PR: 251969 Reviewed by: jkim Obtained from: OpenSSL (dfcfd17f2818cf520ce6381aed9ec3d2fc12170d) MFC after: 1 week Sponsored by: Netflix (merging to FreeBSD) Differential Revision: https://reviews.freebsd.org/D28714 --- crypto/openssl/doc/man3/SSL_write.pod | 3 ++- crypto/openssl/include/internal/ktls.h | 9 +++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crypto/openssl/doc/man3/SSL_write.pod b/crypto/openssl/doc/man3/SSL_write.pod index 20c7953deb06..9b271d8e65a2 100644 --- a/crypto/openssl/doc/man3/SSL_write.pod +++ b/crypto/openssl/doc/man3/SSL_write.pod @@ -120,7 +120,8 @@ For SSL_sendfile(), the following return values can occur: =item Z<>>= 0 The write operation was successful, the return value is the number -of bytes of the file written to the TLS/SSL connection. +of bytes of the file written to the TLS/SSL connection. The return +value can be less than B for a partial write. =item E 0 diff --git a/crypto/openssl/include/internal/ktls.h b/crypto/openssl/include/internal/ktls.h index 9032c0ed6174..622d7be76d1e 100644 --- a/crypto/openssl/include/internal/ktls.h +++ b/crypto/openssl/include/internal/ktls.h @@ -192,15 +192,12 @@ static ossl_inline int ktls_read_record(int fd, void *data, size_t length) static ossl_inline ossl_ssize_t ktls_sendfile(int s, int fd, off_t off, size_t size, int flags) { - off_t sbytes; + off_t sbytes = 0; int ret; ret = sendfile(fd, s, off, size, NULL, &sbytes, flags); - if (ret == -1) { - if (errno == EAGAIN && sbytes != 0) - return sbytes; - return -1; - } + if (ret == -1 && sbytes == 0) + return -1; return sbytes; } From owner-dev-commits-src-all@freebsd.org Wed Feb 17 23:21:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 17BCE53B28D; Wed, 17 Feb 2021 23:21: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 4Dgv3c60Nsz3tb0; Wed, 17 Feb 2021 23:21:16 +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 BD0F1595B; Wed, 17 Feb 2021 23:21:16 +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 11HNLG6n073445; Wed, 17 Feb 2021 23:21:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HNLGVV073444; Wed, 17 Feb 2021 23:21:16 GMT (envelope-from git) Date: Wed, 17 Feb 2021 23:21:16 GMT Message-Id: <202102172321.11HNLGVV073444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jung-uk Kim Subject: git: 351d06eeb509 - main - OpenSSL: Regen manual page for the previous commit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 351d06eeb509a420f3470c96b4a265467c87e2c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 23:21:17 -0000 The branch main has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=351d06eeb509a420f3470c96b4a265467c87e2c2 commit 351d06eeb509a420f3470c96b4a265467c87e2c2 Author: Jung-uk Kim AuthorDate: 2021-02-17 23:19:13 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-17 23:19:13 +0000 OpenSSL: Regen manual page for the previous commit This is regen for 9b2f020c14af71a2606012143432dd717c7cf90e. MFC after: 1 week --- secure/lib/libcrypto/man/man3/SSL_write.3 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/secure/lib/libcrypto/man/man3/SSL_write.3 b/secure/lib/libcrypto/man/man3/SSL_write.3 index 99e76b5ac013..db4800fb059d 100644 --- a/secure/lib/libcrypto/man/man3/SSL_write.3 +++ b/secure/lib/libcrypto/man/man3/SSL_write.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "SSL_WRITE 3" -.TH SSL_WRITE 3 "2021-02-16" "1.1.1j" "OpenSSL" +.TH SSL_WRITE 3 "2021-02-17" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -245,7 +245,8 @@ For \fBSSL_sendfile()\fR, the following return values can occur: .IP ">= 0" 4 .IX Item ">= 0" The write operation was successful, the return value is the number -of bytes of the file written to the \s-1TLS/SSL\s0 connection. +of bytes of the file written to the \s-1TLS/SSL\s0 connection. The return +value can be less than \fBsize\fR for a partial write. .IP "< 0" 4 .IX Item "< 0" The write operation was not successful, because either the connection was From owner-dev-commits-src-all@freebsd.org Wed Feb 17 23:23:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3B89A53B31F; Wed, 17 Feb 2021 23:23: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 4Dgv5f15W1z3tyj; Wed, 17 Feb 2021 23:23: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 18AB95D02; Wed, 17 Feb 2021 23:23: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 11HNN1hC077931; Wed, 17 Feb 2021 23:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11HNN1xo077930; Wed, 17 Feb 2021 23:23:01 GMT (envelope-from git) Date: Wed, 17 Feb 2021 23:23:01 GMT Message-Id: <202102172323.11HNN1xo077930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: fa3bd463cee5 - main - lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2021 23:23:02 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 commit fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 Author: Konstantin Belousov AuthorDate: 2021-01-29 23:48:55 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-17 23:22:05 +0000 lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) or EX_SHLOCK. Do it by setting a vnode iflag indicating that the locking exclusive open is in progress, and not allowing F_LOCK request to make a progress until the first open finishes. Requested by: mckusick Reviewed by: markj, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28697 --- sys/kern/vfs_default.c | 15 +++++++++++++++ sys/kern/vfs_vnops.c | 23 ++++++++++++++++++++--- sys/sys/fcntl.h | 1 + sys/sys/vnode.h | 2 ++ 4 files changed, 38 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 382fbb2d9ace..3c428d7b7511 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -423,10 +423,25 @@ int vop_stdadvlock(struct vop_advlock_args *ap) { struct vnode *vp; + struct mount *mp; struct vattr vattr; int error; vp = ap->a_vp; + + /* + * Provide atomicity of open(O_CREAT | O_EXCL | O_EXLOCK) for + * local filesystems. See vn_open_cred() for reciprocal part. + */ + mp = vp->v_mount; + if (mp != NULL && (mp->mnt_flag & MNT_LOCAL) != 0 && + ap->a_op == F_SETLK && (ap->a_flags & F_FIRSTOPEN) == 0) { + VI_LOCK(vp); + while ((vp->v_iflag & VI_FOPENING) != 0) + msleep(vp, VI_MTX(vp), PLOCK, "lockfo", 0); + VI_UNLOCK(vp); + } + if (ap->a_fl->l_whence == SEEK_END) { /* * The NFSv4 server must avoid doing a vn_lock() here, since it diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 71dd379558cb..781968f2db53 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -228,8 +228,10 @@ vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, u_int vn_open_flags, struct vattr vat; struct vattr *vap = &vat; int fmode, error; + bool first_open; restart: + first_open = false; fmode = *flagp; if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT | O_EXCL | O_DIRECTORY)) @@ -275,8 +277,16 @@ restart: #endif error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, vap); - VOP_VPUT_PAIR(ndp->ni_dvp, error == 0 ? &ndp->ni_vp : - NULL, false); + vp = ndp->ni_vp; + if (error == 0 && (fmode & O_EXCL) != 0 && + (fmode & (O_EXLOCK | O_SHLOCK)) != 0) { + VI_LOCK(vp); + vp->v_iflag |= VI_FOPENING; + VI_UNLOCK(vp); + first_open = true; + } + VOP_VPUT_PAIR(ndp->ni_dvp, error == 0 ? &vp : NULL, + false); vn_finished_write(mp); if (error) { NDFREE(ndp, NDF_ONLY_PNBUF); @@ -287,7 +297,6 @@ restart: return (error); } fmode &= ~O_TRUNC; - vp = ndp->ni_vp; } else { if (ndp->ni_dvp == ndp->ni_vp) vrele(ndp->ni_dvp); @@ -317,6 +326,12 @@ restart: vp = ndp->ni_vp; } error = vn_open_vnode(vp, fmode, cred, td, fp); + if (first_open) { + VI_LOCK(vp); + vp->v_iflag &= ~VI_FOPENING; + wakeup(vp); + VI_UNLOCK(vp); + } if (error) goto bad; *flagp = fmode; @@ -352,6 +367,8 @@ vn_open_vnode_advlock(struct vnode *vp, int fmode, struct file *fp) type = F_FLOCK; if ((fmode & FNONBLOCK) == 0) type |= F_WAIT; + if ((fmode & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) + type |= F_FIRSTOPEN; error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type); if (error == 0) fp->f_flag |= FHASLOCK; diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h index 3c29c04e46db..70e68246be13 100644 --- a/sys/sys/fcntl.h +++ b/sys/sys/fcntl.h @@ -287,6 +287,7 @@ typedef __pid_t pid_t; #define F_POSIX 0x040 /* Use POSIX semantics for lock */ #define F_REMOTE 0x080 /* Lock owner is remote NFS client */ #define F_NOINTR 0x100 /* Ignore signals when waiting */ +#define F_FIRSTOPEN 0x200 /* First right to advlock file */ #endif /* diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 639a16881e09..9d68f9e236f6 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -254,6 +254,8 @@ struct xvnode { #define VI_DOINGINACT 0x0004 /* VOP_INACTIVE is in progress */ #define VI_OWEINACT 0x0008 /* Need to call inactive */ #define VI_DEFINACT 0x0010 /* deferred inactive */ +#define VI_FOPENING 0x0020 /* In open, with opening process having the + first right to advlock file */ #define VV_ROOT 0x0001 /* root of its filesystem */ #define VV_ISTTY 0x0002 /* vnode represents a tty */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 00:35:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1D17953F1E6; Thu, 18 Feb 2021 00:35: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 4Dgwjb0L8sz4TWG; Thu, 18 Feb 2021 00:35: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 F26546A92; Thu, 18 Feb 2021 00:35: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 11I0Zksx070310; Thu, 18 Feb 2021 00:35:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I0Zksx070309; Thu, 18 Feb 2021 00:35:46 GMT (envelope-from git) Date: Thu, 18 Feb 2021 00:35:46 GMT Message-Id: <202102180035.11I0Zksx070309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 67932460c7b6 - main - Add a VA_IS_CLEANMAP() macro. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 67932460c7b6893a637a47d98d5f29d63e92c727 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 00:35:47 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=67932460c7b6893a637a47d98d5f29d63e92c727 commit 67932460c7b6893a637a47d98d5f29d63e92c727 Author: John Baldwin AuthorDate: 2021-02-18 00:32:11 +0000 Commit: John Baldwin CommitDate: 2021-02-18 00:32:11 +0000 Add a VA_IS_CLEANMAP() macro. This macro returns true if a provided virtual address is contained in the kernel's clean submap. In CHERI kernels, the buffer cache and transient I/O map are allocated as separate regions. Abstracting this check reduces the diff relative to FreeBSD. It is perhaps slightly more readable as well. Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28710 --- sys/amd64/amd64/pmap.c | 5 ++--- sys/arm/arm/pmap-v6.c | 5 ++--- sys/arm64/arm64/pmap.c | 2 +- sys/i386/i386/pmap.c | 6 +++--- sys/mips/mips/pmap.c | 5 ++--- sys/powerpc/aim/mmu_radix.c | 5 ++--- sys/riscv/riscv/pmap.c | 2 +- sys/vm/vm.h | 3 +++ 8 files changed, 16 insertions(+), 17 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 0e1d1c02d1fc..7dddeb3ee4ea 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6747,8 +6747,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)", va)); - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || - va >= kmi.clean_eva, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || !VA_IS_CLEANMAP(va), ("pmap_enter: managed mapping within the clean submap")); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -7262,7 +7261,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, { pt_entry_t newpte, *pte, PG_V; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); PG_V = pmap_valid_bit(pmap); diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index c9b939f6ce34..f596ace35ba7 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -3873,8 +3873,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, KASSERT(va < UPT2V_MIN_ADDRESS || va >= UPT2V_MAX_ADDRESS, ("%s: invalid to pmap_enter page table pages (va: 0x%x)", __func__, va)); - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || - va >= kmi.clean_eva, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || !VA_IS_CLEANMAP(va), ("%s: managed mapping within the clean submap", __func__)); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -4535,7 +4534,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, struct spglist free; uint32_t l2prot; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("%s: managed mapping within the clean submap", __func__)); rw_assert(&pvh_global_lock, RA_WLOCKED); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index d4047fc84096..bb307b79d4c2 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4438,7 +4438,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_paddr_t pa; int lvl; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index bc650cf378e0..b1014b332150 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -3654,7 +3654,7 @@ __CONCAT(PMTYPE, enter)(pmap_t pmap, vm_offset_t va, vm_page_t m, ("pmap_enter: invalid to pmap_enter into trampoline (va: 0x%x)", va)); KASSERT(pmap != kernel_pmap || (m->oflags & VPO_UNMANAGED) != 0 || - va < kmi.clean_sva || va >= kmi.clean_eva, + !VA_IS_CLEANMAP(va), ("pmap_enter: managed mapping within the clean submap")); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -4108,8 +4108,8 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, { pt_entry_t newpte, *pte; - KASSERT(pmap != kernel_pmap || va < kmi.clean_sva || - va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, + KASSERT(pmap != kernel_pmap || !VA_IS_CLEANMAP(va) || + (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_WLOCKED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 866013cbf38a..a022e7619bc5 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -2125,8 +2125,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, va &= ~PAGE_MASK; KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || - va >= kmi.clean_eva, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || !VA_IS_CLEANMAP(va), ("pmap_enter: managed mapping within the clean submap")); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -2328,7 +2327,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pt_entry_t *pte, npte; vm_paddr_t pa; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_WLOCKED); diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c index 2373425afd30..b2500e4ec359 100644 --- a/sys/powerpc/aim/mmu_radix.c +++ b/sys/powerpc/aim/mmu_radix.c @@ -2813,8 +2813,7 @@ mmu_radix_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, CTR6(KTR_PMAP, "pmap_enter(%p, %#lx, %p, %#x, %#x, %d)", pmap, va, m, prot, flags, psind); KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); - KASSERT((m->oflags & VPO_UNMANAGED) != 0 || va < kmi.clean_sva || - va >= kmi.clean_eva, + KASSERT((m->oflags & VPO_UNMANAGED) != 0 || !VA_IS_CLEANMAP(va), ("pmap_enter: managed mapping within the clean submap")); if ((m->oflags & VPO_UNMANAGED) == 0) VM_PAGE_OBJECT_BUSY_ASSERT(m); @@ -3298,7 +3297,7 @@ mmu_radix_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pt_entry_t *pte; vm_paddr_t pa; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("mmu_radix_enter_quick_locked: managed mapping within the clean submap")); PMAP_LOCK_ASSERT(pmap, MA_OWNED); diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index f30dda17afae..d0b51d5199e2 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -3103,7 +3103,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, pd_entry_t *l2; pt_entry_t *l3, newl3; - KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || + KASSERT(!VA_IS_CLEANMAP(va) || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); rw_assert(&pvh_global_lock, RA_LOCKED); diff --git a/sys/vm/vm.h b/sys/vm/vm.h index 296449edc7c1..9bf77db4118c 100644 --- a/sys/vm/vm.h +++ b/sys/vm/vm.h @@ -145,6 +145,9 @@ struct kva_md_info { vm_offset_t clean_eva; }; +#define VA_IS_CLEANMAP(va) \ + ((va) >= kmi.clean_sva && (va) < kmi.clean_eva) + extern struct kva_md_info kmi; extern void vm_ksubmap_init(struct kva_md_info *); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 00:35:48 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3C97A53F694; Thu, 18 Feb 2021 00:35:48 +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 4Dgwjc1J1Pz4TLp; Thu, 18 Feb 2021 00:35:48 +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 1F7C6697D; Thu, 18 Feb 2021 00:35:48 +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 11I0ZmLM070333; Thu, 18 Feb 2021 00:35:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I0Zm9t070332; Thu, 18 Feb 2021 00:35:48 GMT (envelope-from git) Date: Thu, 18 Feb 2021 00:35:48 GMT Message-Id: <202102180035.11I0Zm9t070332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dd176fd7e7b5 - main - riscv: Don't set __NO_TLS to disable some uses of TLS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd176fd7e7b5aad231cd6ebf49fd14ae7394dfee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 00:35:48 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dd176fd7e7b5aad231cd6ebf49fd14ae7394dfee commit dd176fd7e7b5aad231cd6ebf49fd14ae7394dfee Author: John Baldwin AuthorDate: 2021-02-18 00:33:09 +0000 Commit: John Baldwin CommitDate: 2021-02-18 00:33:09 +0000 riscv: Don't set __NO_TLS to disable some uses of TLS. __NO_TLS was originally added to disable use of _Thread in the locale code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. The initial RISC-V import set this for RISC-V presumably due to immaturity in the toolchains at the time. However, TLS via _Thread works fine in both GCC and clang on RISC-V. Reviewed by: mhorne, imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28712 --- sys/sys/cdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 72ef942084f2..64f26480a2f5 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -768,7 +768,7 @@ #endif #endif /* __STDC_WANT_LIB_EXT1__ */ -#if defined(__mips) || defined(__riscv) || \ +#if defined(__mips) || \ (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) #define __NO_TLS 1 #endif From owner-dev-commits-src-all@freebsd.org Thu Feb 18 00:35:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 92CDA53F4D0; Thu, 18 Feb 2021 00:35:51 +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 4Dgwjd5h7gz4Tlp; Thu, 18 Feb 2021 00:35:49 +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 5E23B65F5; Thu, 18 Feb 2021 00:35:49 +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 11I0ZnqP070355; Thu, 18 Feb 2021 00:35:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I0ZnL3070354; Thu, 18 Feb 2021 00:35:49 GMT (envelope-from git) Date: Thu, 18 Feb 2021 00:35:49 GMT Message-Id: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24fd63e0970f91189dd2acde987bd2e4c8c04a50 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 00:35:51 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=24fd63e0970f91189dd2acde987bd2e4c8c04a50 commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50 Author: John Baldwin AuthorDate: 2021-02-18 00:34:23 +0000 Commit: John Baldwin CommitDate: 2021-02-18 00:34:23 +0000 mips: Don't set __NO_TLS to disable some uses of TLS. __NO_TLS was originally added to disable use of _Thread in the locale code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. At the time libc did not support TLS on MIPS (I believe), but TLS support was added to libc (at least _set_tp.c) for MIPS about a month after __NO_TLS was added, but __NO_TLS was still left around. Reviewed by: imp Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D28713 --- sys/sys/cdefs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 64f26480a2f5..ff18911f6acf 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -768,8 +768,7 @@ #endif #endif /* __STDC_WANT_LIB_EXT1__ */ -#if defined(__mips) || \ - (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) #define __NO_TLS 1 #endif From owner-dev-commits-src-all@freebsd.org Thu Feb 18 00:48:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AEB6C53F9F9; Thu, 18 Feb 2021 00:48:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dgx084b0zz4VrD; Thu, 18 Feb 2021 00:48:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:4492:1dca:b2dc:b55d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 35A24462; Thu, 18 Feb 2021 00:48:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> Message-ID: <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> Date: Wed, 17 Feb 2021 16:48:22 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 00:48:24 -0000 On 2/17/21 4:35 PM, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=24fd63e0970f91189dd2acde987bd2e4c8c04a50 > > commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50 > Author: John Baldwin > AuthorDate: 2021-02-18 00:34:23 +0000 > Commit: John Baldwin > CommitDate: 2021-02-18 00:34:23 +0000 > > mips: Don't set __NO_TLS to disable some uses of TLS. > > __NO_TLS was originally added to disable use of _Thread in the locale > code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. At the time > libc did not support TLS on MIPS (I believe), but TLS support was > added to libc (at least _set_tp.c) for MIPS about a month after > __NO_TLS was added, but __NO_TLS was still left around. > > Reviewed by: imp > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D28713 > --- > sys/sys/cdefs.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > index 64f26480a2f5..ff18911f6acf 100644 > --- a/sys/sys/cdefs.h > +++ b/sys/sys/cdefs.h > @@ -768,8 +768,7 @@ > #endif > #endif /* __STDC_WANT_LIB_EXT1__ */ > > -#if defined(__mips) || \ > - (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) > +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) > #define __NO_TLS 1 > #endif It would be really nice to kill __NO_TLS entirely. There is at least one unconditional use of _Thread_local (sorry, should have used that instead of _Thread above) in libc in stdlib/cxa_thread_atexit_impl.c, so it seems highly unlikely that TLS is actually broken on any of our platforms as the libc build would have been broken instead. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Thu Feb 18 01:16:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E268C5416D7; Thu, 18 Feb 2021 01:16:59 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dgxd75tRhz4Xth; Thu, 18 Feb 2021 01:16:59 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wm1-x32a.google.com with SMTP id m1so443102wml.2; Wed, 17 Feb 2021 17:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qhtvHO+deyRPjvZXBIfnP+dlgYrn+n5NJGIhVMJSDC0=; b=okd2O9mITdpEtFFPXsuhMxK8dw1hpCoFXtRE+7J54fuy4RMvMLYg/shi+lOMDoaC9N pwRZO9gEdzBRiMga5kHqZQtpwkHk2dit2JfohH6+3jhRFn+qibNy+ZniPReU8Tw1EsyS lVJP1e1+AHrH68RuZCmpb2ySVG+HagLoi2O9RmsACzAH9PYrP67sxDCSIkD4wAHa596U y6Gu+DHpCkFQzb6+ixabyEZ53c6zF0g87i+36aI0sW1E38fRSGdBFWwcQvALBzVIVtvf wqyye9zWUQhPDxlckn/HUfxwLQtLWdxDkBKhlr3cPptqJeWd/9jDGe5QeBkTStJYfJxK j/zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qhtvHO+deyRPjvZXBIfnP+dlgYrn+n5NJGIhVMJSDC0=; b=NRE3Wo4X0Acas9kmQaQXHNVVIiWwwhpYZScwajVIWJGg2ryce1FAqp38MXfi5w7ACZ kQ0IQg+qzwRRZHocqiRUQn8vXYXOCQIZbSypgUNP2OzxGTLBw0zfYv6F47Uhvs2wbHUL o5oJEYLIw0fts80U8vwkt0VFOf8xET0JvPPqStHqkLgCBhclaitkIUuFSF55WUN1ZnS5 XAnzv8JUUfLil2OnDE2WuCf2Zf/SH+2u0e3uk8uJ9VTCi/yWAdFShnmhYbevK9B3EV/t XAGOW59mjp1rLt3podWooujFjw69Nw4AwFy7n9CXtiryLZfaZzWL42MSyIiIHYP17okH vTlQ== X-Gm-Message-State: AOAM53124xTZA5hgpVffjL2iaXKiceyF8G+xYRGBtvop5aEaypZ3NJS7 IvcxeE/reduFev/NSEI+nHAvxYmbrghEwTm+HCL7Jkoe X-Google-Smtp-Source: ABdhPJx4I7jR5MqBs1hmdrE33tX4b4I/0+qZFE7qxbhhiAYACjGo3uQpc66nHor0sHvafoKu0by0ripGdwKgHZeflfE= X-Received: by 2002:a05:600c:47c4:: with SMTP id l4mr1244769wmo.83.1613611017638; Wed, 17 Feb 2021 17:16:57 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:e406:0:0:0:0:0 with HTTP; Wed, 17 Feb 2021 17:16:56 -0800 (PST) In-Reply-To: <202102172323.11HNN1xo077930@gitrepo.freebsd.org> References: <202102172323.11HNN1xo077930@gitrepo.freebsd.org> From: Mateusz Guzik Date: Thu, 18 Feb 2021 02:16:56 +0100 Message-ID: Subject: Re: git: fa3bd463cee5 - main - lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dgxd75tRhz4Xth X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 01:16:59 -0000 On 2/18/21, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 > > commit fa3bd463cee5c3abeac29a83dc86eb3abfa97b06 > Author: Konstantin Belousov > AuthorDate: 2021-01-29 23:48:55 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-02-17 23:22:05 +0000 > > lockf: ensure atomicity of lockf for open(O_CREAT|O_EXCL|O_EXLOCK) > > or EX_SHLOCK. Do it by setting a vnode iflag indicating that the > locking > exclusive open is in progress, and not allowing F_LOCK request to make > a progress until the first open finishes. > > Requested by: mckusick > Reviewed by: markj, mckusick > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D28697 > --- > sys/kern/vfs_default.c | 15 +++++++++++++++ > sys/kern/vfs_vnops.c | 23 ++++++++++++++++++++--- > sys/sys/fcntl.h | 1 + > sys/sys/vnode.h | 2 ++ > 4 files changed, 38 insertions(+), 3 deletions(-) > > diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c > index 382fbb2d9ace..3c428d7b7511 100644 > --- a/sys/kern/vfs_default.c > +++ b/sys/kern/vfs_default.c > @@ -423,10 +423,25 @@ int > vop_stdadvlock(struct vop_advlock_args *ap) > { > struct vnode *vp; > + struct mount *mp; > struct vattr vattr; > int error; > > vp = ap->a_vp; > + > + /* > + * Provide atomicity of open(O_CREAT | O_EXCL | O_EXLOCK) for > + * local filesystems. See vn_open_cred() for reciprocal part. > + */ > + mp = vp->v_mount; > + if (mp != NULL && (mp->mnt_flag & MNT_LOCAL) != 0 && > + ap->a_op == F_SETLK && (ap->a_flags & F_FIRSTOPEN) == 0) { This should check for FIRSTOPEN first, which will be least likely of the entire bunch. > + VI_LOCK(vp); > + while ((vp->v_iflag & VI_FOPENING) != 0) > + msleep(vp, VI_MTX(vp), PLOCK, "lockfo", 0); > + VI_UNLOCK(vp); > + } > + > if (ap->a_fl->l_whence == SEEK_END) { > /* > * The NFSv4 server must avoid doing a vn_lock() here, since it > diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c > index 71dd379558cb..781968f2db53 100644 > --- a/sys/kern/vfs_vnops.c > +++ b/sys/kern/vfs_vnops.c > @@ -228,8 +228,10 @@ vn_open_cred(struct nameidata *ndp, int *flagp, int > cmode, u_int vn_open_flags, > struct vattr vat; > struct vattr *vap = &vat; > int fmode, error; > + bool first_open; > > restart: > + first_open = false; > fmode = *flagp; > if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT | > O_EXCL | O_DIRECTORY)) > @@ -275,8 +277,16 @@ restart: > #endif > error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, > &ndp->ni_cnd, vap); > - VOP_VPUT_PAIR(ndp->ni_dvp, error == 0 ? &ndp->ni_vp : > - NULL, false); > + vp = ndp->ni_vp; > + if (error == 0 && (fmode & O_EXCL) != 0 && > + (fmode & (O_EXLOCK | O_SHLOCK)) != 0) { > + VI_LOCK(vp); > + vp->v_iflag |= VI_FOPENING; > + VI_UNLOCK(vp); > + first_open = true; > + } error tends to be 0, so this can inspect fmode first > + VOP_VPUT_PAIR(ndp->ni_dvp, error == 0 ? &vp : NULL, > + false); > vn_finished_write(mp); > if (error) { > NDFREE(ndp, NDF_ONLY_PNBUF); > @@ -287,7 +297,6 @@ restart: > return (error); > } > fmode &= ~O_TRUNC; > - vp = ndp->ni_vp; > } else { > if (ndp->ni_dvp == ndp->ni_vp) > vrele(ndp->ni_dvp); > @@ -317,6 +326,12 @@ restart: > vp = ndp->ni_vp; > } > error = vn_open_vnode(vp, fmode, cred, td, fp); > + if (first_open) { > + VI_LOCK(vp); > + vp->v_iflag &= ~VI_FOPENING; > + wakeup(vp); > + VI_UNLOCK(vp); > + } > if (error) > goto bad; > *flagp = fmode; > @@ -352,6 +367,8 @@ vn_open_vnode_advlock(struct vnode *vp, int fmode, > struct file *fp) > type = F_FLOCK; > if ((fmode & FNONBLOCK) == 0) > type |= F_WAIT; > + if ((fmode & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) > + type |= F_FIRSTOPEN; > error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, type); > if (error == 0) > fp->f_flag |= FHASLOCK; > diff --git a/sys/sys/fcntl.h b/sys/sys/fcntl.h > index 3c29c04e46db..70e68246be13 100644 > --- a/sys/sys/fcntl.h > +++ b/sys/sys/fcntl.h > @@ -287,6 +287,7 @@ typedef __pid_t pid_t; > #define F_POSIX 0x040 /* Use POSIX semantics for lock */ > #define F_REMOTE 0x080 /* Lock owner is remote NFS client */ > #define F_NOINTR 0x100 /* Ignore signals when waiting */ > +#define F_FIRSTOPEN 0x200 /* First right to advlock file */ > #endif > > /* > diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h > index 639a16881e09..9d68f9e236f6 100644 > --- a/sys/sys/vnode.h > +++ b/sys/sys/vnode.h > @@ -254,6 +254,8 @@ struct xvnode { > #define VI_DOINGINACT 0x0004 /* VOP_INACTIVE is in progress */ > #define VI_OWEINACT 0x0008 /* Need to call inactive */ > #define VI_DEFINACT 0x0010 /* deferred inactive */ > +#define VI_FOPENING 0x0020 /* In open, with opening process having the > + first right to advlock file */ The flag was not added to vn_printf > > #define VV_ROOT 0x0001 /* root of its filesystem */ > #define VV_ISTTY 0x0002 /* vnode represents a tty */ > _______________________________________________ > dev-commits-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all > To unsubscribe, send any mail to > "dev-commits-src-all-unsubscribe@freebsd.org" > -- Mateusz Guzik From owner-dev-commits-src-all@freebsd.org Thu Feb 18 01:29:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A20E554248C; Thu, 18 Feb 2021 01: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 4DgxvN47qSz4YqW; Thu, 18 Feb 2021 01: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 806977523; Thu, 18 Feb 2021 01: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 11I1TK7n036565; Thu, 18 Feb 2021 01: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 11I1TK4O036564; Thu, 18 Feb 2021 01:29:20 GMT (envelope-from git) Date: Thu, 18 Feb 2021 01:29:20 GMT Message-Id: <202102180129.11I1TK4O036564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 6f21b7996a95 - stable/13 - zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6f21b7996a95b7d93d1687787b55e57289689066 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 01:29:20 -0000 The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=6f21b7996a95b7d93d1687787b55e57289689066 commit 6f21b7996a95b7d93d1687787b55e57289689066 Author: Martin Matuska AuthorDate: 2021-02-15 07:40:27 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 01:28:37 +0000 zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681 (cherry picked from commit f15e18a642cb3f7ebc747f8e9cdf11274140107d) --- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 10 -- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- .../tests/functional/redundancy/Makefile.am | 1 + .../functional/redundancy/redundancy_raidz.ksh | 198 +++++++++++++++++++++ 4 files changed, 202 insertions(+), 12 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c index 989b90dc2635..5b152f38bd63 100644 --- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c +++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c @@ -1922,16 +1922,6 @@ raidz_parity_verify(zio_t *zio, raidz_row_t *rr) if (checksum == ZIO_CHECKSUM_NOPARITY) return (ret); - /* - * All data columns must have been successfully read in order - * to use them to generate parity columns for comparison. - */ - for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) { - rc = &rr->rr_col[c]; - if (!rc->rc_tried || rc->rc_error != 0) - return (ret); - } - for (c = 0; c < rr->rr_firstdatacol; c++) { rc = &rr->rr_col[c]; if (!rc->rc_tried || rc->rc_error != 0) diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run index 171db4c0c022..c0bfc09ac5b3 100644 --- a/sys/contrib/openzfs/tests/runfiles/common.run +++ b/sys/contrib/openzfs/tests/runfiles/common.run @@ -727,8 +727,9 @@ tags = ['functional', 'raidz'] [tests/functional/redundancy] tests = ['redundancy_draid1', 'redundancy_draid2', 'redundancy_draid3', 'redundancy_draid_spare1', 'redundancy_draid_spare2', - 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz1', - 'redundancy_raidz2', 'redundancy_raidz3', 'redundancy_stripe'] + 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz', + 'redundancy_raidz1', 'redundancy_raidz2', 'redundancy_raidz3', + 'redundancy_stripe'] tags = ['functional', 'redundancy'] [tests/functional/refquota] diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am index b2d4414b2906..7b85d6a1bf5f 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am @@ -9,6 +9,7 @@ dist_pkgdata_SCRIPTS = \ redundancy_draid_spare2.ksh \ redundancy_draid_spare3.ksh \ redundancy_mirror.ksh \ + redundancy_raidz.ksh \ redundancy_raidz1.ksh \ redundancy_raidz2.ksh \ redundancy_raidz3.ksh \ diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh new file mode 100644 index 000000000000..8d32e0603ae8 --- /dev/null +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh @@ -0,0 +1,198 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2020 by vStack. All rights reserved. +# Copyright (c) 2021 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/redundancy/redundancy.kshlib + +# +# DESCRIPTION: +# RAIDZ should provide redundancy +# +# STRATEGY: +# 1. Create block device files for the test raidz pool +# 2. For each parity value [1..3] +# - create raidz pool +# - fill it with some directories/files +# - verify resilver by replacing devices +# - verify scrub by zeroing devices +# - destroy the raidz pool + +typeset -r devs=6 +typeset -r dev_size_mb=512 + +typeset -a disks + +prefetch_disable=$(get_tunable PREFETCH_DISABLE) + +function cleanup +{ + poolexists "$TESTPOOL" && destroy_pool "$TESTPOOL" + + for i in {0..$devs}; do + rm -f "$TEST_BASE_DIR/dev-$i" + done + + set_tunable32 PREFETCH_DISABLE $prefetch_disable +} + +function test_resilver # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool +} + +function test_scrub # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + typeset combrec=$4 + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool +} + +log_onexit cleanup + +log_must set_tunable32 PREFETCH_DISABLE 1 + +# Disk files which will be used by pool +for i in {0..$(($devs - 1))}; do + device=$TEST_BASE_DIR/dev-$i + log_must truncate -s ${dev_size_mb}M $device + disks[${#disks[*]}+1]=$device +done + +# Disk file which will be attached +log_must truncate -s 512M $TEST_BASE_DIR/dev-$devs + +for nparity in 1 2 3; do + raid=raidz$nparity + dir=$TEST_BASE_DIR + + log_must zpool create -f -o cachefile=none $TESTPOOL $raid ${disks[@]} + log_must zfs set primarycache=metadata $TESTPOOL + + log_must zfs create $TESTPOOL/fs + log_must fill_fs /$TESTPOOL/fs 1 512 100 1024 R + + log_must zfs create -o compress=on $TESTPOOL/fs2 + log_must fill_fs /$TESTPOOL/fs2 1 512 100 1024 R + + log_must zfs create -o compress=on -o recordsize=8k $TESTPOOL/fs3 + log_must fill_fs /$TESTPOOL/fs3 1 512 100 1024 R + + typeset pool_size=$(get_pool_prop size $TESTPOOL) + + log_must zpool export $TESTPOOL + log_must zpool import -o cachefile=none -d $dir $TESTPOOL + + log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + test_resilver $TESTPOOL $nparity $dir + test_scrub $TESTPOOL $nparity $dir + + log_must zpool destroy "$TESTPOOL" +done + +log_pass "raidz redundancy test succeeded." From owner-dev-commits-src-all@freebsd.org Thu Feb 18 01:30:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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 69CBF542591; Thu, 18 Feb 2021 01:30:05 +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 4DgxwF265Dz4ZLM; Thu, 18 Feb 2021 01:30:05 +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 3AA897524; Thu, 18 Feb 2021 01:30:05 +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 11I1U5TO038377; Thu, 18 Feb 2021 01:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I1U5Yv038373; Thu, 18 Feb 2021 01:30:05 GMT (envelope-from git) Date: Thu, 18 Feb 2021 01:30:05 GMT Message-Id: <202102180130.11I1U5Yv038373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: edb9049c3a78 - stable/13 - zfs: Avoid updating the L2ARC device header unnecessarily MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: edb9049c3a782a51a77bd81a478c28cd1745323c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 01:30:05 -0000 The branch stable/13 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=edb9049c3a782a51a77bd81a478c28cd1745323c commit edb9049c3a782a51a77bd81a478c28cd1745323c Author: Martin Matuska AuthorDate: 2021-02-15 08:10:01 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 01:29:46 +0000 zfs: Avoid updating the L2ARC device header unnecessarily From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682 (cherry picked from commit 5dce03847fdc7bc6eb959282c0ae2117b1991746) --- sys/contrib/openzfs/module/zfs/arc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c index e05b11d51942..fecc752e16ff 100644 --- a/sys/contrib/openzfs/module/zfs/arc.c +++ b/sys/contrib/openzfs/module/zfs/arc.c @@ -9062,6 +9062,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) l2arc_write_callback_t *cb = NULL; zio_t *pio, *wzio; uint64_t guid = spa_load_guid(spa); + l2arc_dev_hdr_phys_t *l2dhdr = dev->l2ad_dev_hdr; ASSERT3P(dev->l2ad_vdev, !=, NULL); @@ -9293,7 +9294,8 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) * Although we did not write any buffers l2ad_evict may * have advanced. */ - l2arc_dev_hdr_update(dev); + if (dev->l2ad_evict != l2dhdr->dh_evict) + l2arc_dev_hdr_update(dev); return (0); } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 02:54:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 36503549C44; Thu, 18 Feb 2021 02:54: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 4Dgznh12VYz4jhQ; Thu, 18 Feb 2021 02:54: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 0C24F10D6C; Thu, 18 Feb 2021 02:54: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 11I2sVEg053687; Thu, 18 Feb 2021 02:54:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I2sV9n053686; Thu, 18 Feb 2021 02:54:31 GMT (envelope-from git) Date: Thu, 18 Feb 2021 02:54:31 GMT Message-Id: <202102180254.11I2sV9n053686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: 4f4065e0a220 - main - libvmm: clean up vmmapi.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f4065e0a220a57afa03420d4f8fa97dbcb5644c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 02:54:32 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=4f4065e0a220a57afa03420d4f8fa97dbcb5644c commit 4f4065e0a220a57afa03420d4f8fa97dbcb5644c Author: Robert Wing AuthorDate: 2021-01-29 08:30:31 +0000 Commit: Robert Wing CommitDate: 2021-02-18 02:46:42 +0000 libvmm: clean up vmmapi.h struct checkpoint_op, enum checkpoint_opcodes, and MAX_SNAPSHOT_VMNAME are not vmm specific, move them out of the vmmapi header. They are used for the save/restore functionality that bhyve(8) provides and are better suited in usr.sbin/bhyve/snapshot.h Since bhyvectl(8) requires these, the Makefile for bhyvectl has been modified to include usr.sbin/bhyve/snapshot.h Reviewed by: kevans, grehan Differential Revision: https://reviews.freebsd.org/D28410 --- lib/libvmmapi/vmmapi.h | 13 ------------- usr.sbin/bhyve/snapshot.h | 12 ++++++++++++ usr.sbin/bhyvectl/Makefile | 4 ++++ usr.sbin/bhyvectl/bhyvectl.c | 4 ++++ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 2fe2bf7906a4..9dc44f391d2c 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -255,19 +255,6 @@ void vm_setup_freebsd_gdt(uint64_t *gdtr); /* * Save and restore */ - -#define MAX_SNAPSHOT_VMNAME 100 - -enum checkpoint_opcodes { - START_CHECKPOINT = 0, - START_SUSPEND = 1, -}; - -struct checkpoint_op { - unsigned int op; - char snapshot_filename[MAX_SNAPSHOT_VMNAME]; -}; - int vm_snapshot_req(struct vm_snapshot_meta *meta); int vm_restore_time(struct vmctx *ctx); diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index f9ea3d573089..eba46c497ab2 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -42,6 +42,8 @@ #include #include +#define MAX_SNAPSHOT_VMNAME 100 + struct vmctx; struct restore_state { @@ -57,6 +59,16 @@ struct restore_state { ucl_object_t *meta_root_obj; }; +enum checkpoint_opcodes { + START_CHECKPOINT = 0, + START_SUSPEND = 1, +}; + +struct checkpoint_op { + unsigned int op; + char snapshot_filename[MAX_SNAPSHOT_VMNAME]; +}; + struct checkpoint_thread_info { struct vmctx *ctx; int socket_fd; diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile index 58eaf49dae3a..12fdb706cadb 100644 --- a/usr.sbin/bhyvectl/Makefile +++ b/usr.sbin/bhyvectl/Makefile @@ -18,6 +18,10 @@ CFLAGS+= -I${SRCTOP}/sys/amd64/vmm .if ${MK_BHYVE_SNAPSHOT} != "no" CFLAGS+= -DBHYVE_SNAPSHOT + +# usr.sbin/bhyve/snapshot.h needs ucl header +CFLAGS+= -I${SRCTOP}/contrib/libucl/include +CFLAGS+= -I${SRCTOP}/usr.sbin/bhyve .endif .include diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c index c54aa1f33dc1..b404f9f3c255 100644 --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -63,6 +63,10 @@ __FBSDID("$FreeBSD$"); #include "amd/vmcb.h" #include "intel/vmcs.h" +#ifdef BHYVE_SNAPSHOT +#include "snapshot.h" +#endif + #define MB (1UL << 20) #define GB (1UL << 30) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:00:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 63EE254B7F8; Thu, 18 Feb 2021 04:00:22 +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 4Dh1Ff2LR7z4p6X; Thu, 18 Feb 2021 04:00:22 +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 4341911ABC; Thu, 18 Feb 2021 04:00:22 +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 11I40MCD041139; Thu, 18 Feb 2021 04:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I40MEe041138; Thu, 18 Feb 2021 04:00:22 GMT (envelope-from git) Date: Thu, 18 Feb 2021 04:00:22 GMT Message-Id: <202102180400.11I40MEe041138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: f61e92ca5a23 - main - release: permanently remove the 'reldoc' target and associates MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f61e92ca5a23450bc28169bbdd71d7674df98c19 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:00:22 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=f61e92ca5a23450bc28169bbdd71d7674df98c19 commit f61e92ca5a23450bc28169bbdd71d7674df98c19 Author: Glen Barber AuthorDate: 2021-02-18 04:00:03 +0000 Commit: Glen Barber CommitDate: 2021-02-18 04:00:03 +0000 release: permanently remove the 'reldoc' target and associates Following 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac, the structure for the reldoc target has significantly changed as result of the ASCIIDoctor/Hugo migration. As the release notes related files on the installation medium are inherently out of date, purge them entirely. Discussed within: re, doceng No objection: re (silence), doceng (silence) Timeout: 2 weeks MFC after: 1 week MFC to: stable/13, stable/12, and stable/11 only Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile | 41 ------------------------------- release/arm/GENERICSD.conf | 1 - release/arm/RPI-B.conf | 1 - release/arm64/PINE64-LTS.conf | 1 - release/arm64/PINE64.conf | 1 - release/arm64/PINEBOOK.conf | 1 - release/arm64/ROCK64.conf | 1 - release/arm64/ROCKPRO64.conf | 1 - release/arm64/RPI.conf | 1 - release/release.conf.sample | 7 ------ release/release.sh | 56 +++++-------------------------------------- release/riscv/GENERICSD.conf | 1 - 12 files changed, 6 insertions(+), 107 deletions(-) diff --git a/release/Makefile b/release/Makefile index 77df7762e412..fee5f9acf59b 100644 --- a/release/Makefile +++ b/release/Makefile @@ -20,12 +20,10 @@ # WORLDDIR: location of src tree -- must have built world and default kernel # (by default, the directory above this one) # PORTSDIR: location of ports tree to distribute (default: /usr/ports) -# DOCDIR: location of doc tree (default: /usr/doc) # XTRADIR: xtra-bits-dir argument for /mkisoimages.sh # NOPKG: if set, do not distribute third-party packages # NOPORTS: if set, do not distribute ports tree # NOSRC: if set, do not distribute source tree -# NODOC: if set, do not generate release documentation # WITH_DVD: if set, generate dvd1.iso # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) @@ -38,7 +36,6 @@ WORLDDIR?= ${.CURDIR}/.. PORTSDIR?= /usr/ports -DOCDIR?= /usr/doc RELNOTES_LANG?= en_US.ISO8859-1 .if !defined(TARGET) || empty(TARGET) @@ -74,9 +71,6 @@ VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} VOLUME_LABEL= FreeBSD_Install .endif -.if !exists(${DOCDIR}) -NODOC= true -.endif .if !exists(${PORTSDIR}) NOPORTS= true .endif @@ -88,9 +82,6 @@ EXTRA_PACKAGES+= ports.txz .if !defined(NOSRC) EXTRA_PACKAGES+= src.txz .endif -#.if !defined(NODOC) -#EXTRA_PACKAGES+= reldoc -#.endif RELEASE_TARGETS= ftp IMAGES= @@ -119,9 +110,6 @@ CLEANFILES+= ${I}.xz CLEANFILES+= pkg-stage .endif CLEANDIRS= dist ftp disc1 bootonly dvd -#.if !defined(NODOC) -#CLEANDIRS+= reldoc rdoc -#.endif beforeclean: chflags -R noschg . .include @@ -161,23 +149,6 @@ ports.txz: --exclude 'usr/ports/INDEX*' --exclude work usr/ports | \ ${XZ_CMD} > ${.OBJDIR}/ports.txz -#reldoc: -# cd ${DOCDIR}/en_US.ISO8859-1/htdocs/releases/${REVISION}R && \ -# env MAN4DIR=${WORLDDIR}/share/man/man4 \ -# _BRANCH=${BRANCH} \ -# ${MAKE} all install clean "FORMATS=html txt" \ -# INSTALL_COMPRESSED='' URLS_ABSOLUTE=YES DOCDIR=${.OBJDIR}/rdoc \ -# WEBDIR=${DOCDIR} DESTDIR=${.OBJDIR}/rdoc -# mkdir -p reldoc -#.for i in hardware readme relnotes errata -# ln -f ${.OBJDIR}/rdoc/${i:tl}.txt \ -# reldoc/${i:tu}.TXT -# ln -f ${.OBJDIR}/rdoc/${i:tl}.html \ -# reldoc/${i:tu}.HTML -#.endfor -# cp ${.OBJDIR}/rdoc/docbook.css \ -# reldoc/ - disc1: packagesystem # Install system mkdir -p ${.TARGET} @@ -193,10 +164,6 @@ disc1: packagesystem for dist in MANIFEST $$(ls *.txz | grep -vE -- '(base|lib32)-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done -# Copy documentation, if generated -#.if !defined(NODOC) -# cp reldoc/* ${.TARGET} -#.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -221,10 +188,6 @@ bootonly: packagesystem # Copy manifest only (no distfiles) to get checksums mkdir -p ${.TARGET}/usr/freebsd-dist cp MANIFEST ${.TARGET}/usr/freebsd-dist -# Copy documentation, if generated -#.if !defined(NODOC) -# cp reldoc/* ${.TARGET} -#.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf @@ -246,10 +209,6 @@ dvd: packagesystem for dist in MANIFEST $$(ls *.txz | grep -v -- '(base|lib32)-dbg'); \ do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done -# Copy documentation, if generated -#.if !defined(NODOC) -# cp reldoc/* ${.TARGET} -#.endif # Set up installation environment ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf diff --git a/release/arm/GENERICSD.conf b/release/arm/GENERICSD.conf index 8749f5fd95cf..c76829b22b04 100644 --- a/release/arm/GENERICSD.conf +++ b/release/arm/GENERICSD.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 BBB_UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" RPI_UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" diff --git a/release/arm/RPI-B.conf b/release/arm/RPI-B.conf index 27fa6aac2644..f164edd25b90 100644 --- a/release/arm/RPI-B.conf +++ b/release/arm/RPI-B.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="RPI-B" MD_ARGS="-x 63 -y 255" -NODOC=1 UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" OL_DIR="${RPI_FIRMWARE_DIR}/overlays" diff --git a/release/arm64/PINE64-LTS.conf b/release/arm64/PINE64-LTS.conf index 60de485703c8..4006f6273307 100644 --- a/release/arm64/PINE64-LTS.conf +++ b/release/arm64/PINE64-LTS.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64-LTS" diff --git a/release/arm64/PINE64.conf b/release/arm64/PINE64.conf index 12435e38730d..87cb9c584c54 100644 --- a/release/arm64/PINE64.conf +++ b/release/arm64/PINE64.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINE64" diff --git a/release/arm64/PINEBOOK.conf b/release/arm64/PINEBOOK.conf index 20e5b7713161..da5d31149c04 100644 --- a/release/arm64/PINEBOOK.conf +++ b/release/arm64/PINEBOOK.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" FDT_OVERLAYS="sun50i-a64-timer,sun50i-a64-opp" export BOARDNAME="PINEBOOK" diff --git a/release/arm64/ROCK64.conf b/release/arm64/ROCK64.conf index 02041dd789d7..e77930b73661 100644 --- a/release/arm64/ROCK64.conf +++ b/release/arm64/ROCK64.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" export BOARDNAME="ROCK64" diff --git a/release/arm64/ROCKPRO64.conf b/release/arm64/ROCKPRO64.conf index fc454e30ec72..e09c3a8b491f 100644 --- a/release/arm64/ROCKPRO64.conf +++ b/release/arm64/ROCKPRO64.conf @@ -12,7 +12,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" export BOARDNAME="ROCKPRO64" diff --git a/release/arm64/RPI.conf b/release/arm64/RPI.conf index 2dfe23547ae9..e7fd12f95090 100644 --- a/release/arm64/RPI.conf +++ b/release/arm64/RPI.conf @@ -14,7 +14,6 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 OL_DIR="${DTB_DIR}/overlays" OVERLAYS="mmc.dtbo pwm.dtbo disable-bt.dtbo" PART_SCHEME="MBR" diff --git a/release/release.conf.sample b/release/release.conf.sample index bb9c8acb1b87..4de068750228 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -16,11 +16,9 @@ CHROOTDIR="/scratch" GITROOT="https://git.freebsd.org/" GITSRC="src.git" GITPORTS="ports.git" -GITDOC="doc.git" ## Set the src/, ports/, and doc/ branches or tags. SRCBRANCH="main" -DOCBRANCH="main" PORTBRANCH="main" ## Sample configuration for using git from ports. @@ -45,7 +43,6 @@ PORTBRANCH="main" #KERNEL_FLAGS="-j $(( $(( $(sysctl -n hw.ncpu) + 1 )) / 2 ))" ## Set miscellaneous 'make release' settings. -#NODOC= #NOPORTS= #NOSRC= #WITH_DVD= @@ -80,10 +77,6 @@ PORTBRANCH="main" ## the chroot. This is intended for use when /usr/src already exists. #SRC_UPDATE_SKIP= -## Set to a non-empty value skip checkout or update of /usr/doc in -## the chroot. This is intended for use when /usr/doc already exists. -#DOC_UPDATE_SKIP= - ## Set to a non-empty value skip checkout or update of /usr/ports in ## the chroot. This is intended for use when /usr/ports already exists. #PORTS_UPDATE_SKIP= diff --git a/release/release.sh b/release/release.sh index 58f946b9bba1..3d7612ef6b80 100755 --- a/release/release.sh +++ b/release/release.sh @@ -86,11 +86,9 @@ env_setup() { # and ports/. GITROOT="https://git.FreeBSD.org/" SRCBRANCH="main" - DOCBRANCH="main" PORTBRANCH="head" GITSRC="src.git" GITPORTS="ports.git" - GITDOC="doc.git" # Set for embedded device builds. EMBEDDEDBUILD= @@ -112,8 +110,6 @@ env_setup() { KERNEL="GENERIC" # Set to non-empty value to disable checkout of doc/ and/or ports/. - # Disabling ports/ checkout also forces NODOC to be set. - NODOC= NOPORTS= # Set to non-empty value to disable distributing source tree. @@ -145,14 +141,12 @@ env_check() { # Prefix the branches with the GITROOT for the full checkout URL. SRC="${GITROOT}${GITSRC}" - DOC="${GITROOT}${GITDOC}" #PORT="${GITROOT}${GITPORTS}" PORT="svn://svn.freebsd.org/ports/" if [ -n "${EMBEDDEDBUILD}" ]; then WITH_DVD= WITH_COMPRESSED_IMAGES= - NODOC=yes case ${EMBEDDED_TARGET}:${EMBEDDED_TARGET_ARCH} in arm:arm*|arm64:aarch64|riscv:riscv64*) chroot_build_release_cmd="chroot_arm_build_release" @@ -162,26 +156,15 @@ env_check() { esac fi - # If PORTS is set and NODOC is unset, force NODOC=yes because the ports - # tree is required to build the documentation set. - if [ -n "${NOPORTS}" ] && [ -z "${NODOC}" ]; then - echo "*** NOTICE: Setting NODOC=1 since ports tree is required" - echo " and NOPORTS is set." - NODOC=yes - fi - - # If NOSRC, NOPORTS and/or NODOC are unset, they must not pass to make + # If NOSRC and/or NOPORTS are unset, they must not pass to make # as variables. The release makefile verifies definedness of the - # NOPORTS/NODOC variables instead of their values. - SRCDOCPORTS= + # NOPORTS variable instead of its value. + SRCPORTS= if [ -n "${NOPORTS}" ]; then - SRCDOCPORTS="NOPORTS=yes" - fi - if [ -n "${NODOC}" ]; then - SRCDOCPORTS="${SRCDOCPORTS}${SRCDOCPORTS:+ }NODOC=yes" + SRCPORTS="NOPORTS=yes" fi if [ -n "${NOSRC}" ]; then - SRCDOCPORTS="${SRCDOCPORTS}${SRCDOCPORTS:+ }NOSRC=yes" + SRCPORTS="${SRCPORTS}${SRCPORTS:+ }NOSRC=yes" fi # The aggregated build-time flags based upon variables defined within @@ -219,7 +202,7 @@ env_check() { RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} \ KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} \ - KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCDOCPORTS} \ + KERNCONF=\"${KERNEL}\" ${CONF_FILES} ${SRCPORTS} \ WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ WITH_CLOUDWARE=${WITH_CLOUDWARE} XZ_THREADS=${XZ_THREADS}" @@ -238,13 +221,6 @@ chroot_setup() { ${VCSCMD} ${SRC} -b ${SRCBRANCH} ${CHROOTDIR}/usr/src fi fi - if [ -z "${NODOC}" ] && [ -z "${DOC_UPDATE_SKIP}" ]; then - if [ -d "${CHROOTDIR}/usr/doc/.git" ]; then - git -C ${CHROOTDIR}/usr/doc pull -q - else - ${VCSCMD} ${DOC} -b ${DOCBRANCH} ${CHROOTDIR}/usr/doc - fi - fi if [ -z "${NOPORTS}" ] && [ -z "${PORTS_UPDATE_SKIP}" ]; then # if [ -d "${CHROOTDIR}/usr/ports/.git" ]; then # git -C ${CHROOTDIR}/usr/ports pull -q @@ -326,26 +302,6 @@ extra_chroot_setup() { pkg clean -y fi fi - if [ -z "${NODOC}" ] && [ -d ${CHROOTDIR}/usr/ports ]; then - # Trick the ports 'run-autotools-fixup' target to do the right - # thing. - _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) - REVISION=$(chroot ${CHROOTDIR} make -C /usr/src/release -V REVISION) - BRANCH=$(chroot ${CHROOTDIR} make -C /usr/src/release -V BRANCH) - UNAME_r=${REVISION}-${BRANCH} - if [ -d ${CHROOTDIR}/usr/doc ] && [ -z "${NODOC}" ]; then - PBUILD_FLAGS="OSVERSION=${_OSVERSION} BATCH=yes" - PBUILD_FLAGS="${PBUILD_FLAGS} UNAME_r=${UNAME_r}" - PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" - PBUILD_FLAGS="${PBUILD_FLAGS} WRKDIRPREFIX=/tmp/ports" - PBUILD_FLAGS="${PBUILD_FLAGS} DISTDIR=/tmp/distfiles" - chroot ${CHROOTDIR} env ${PBUILD_FLAGS} \ - OPTIONS_UNSET="AVAHI FOP IGOR" make -C \ - /usr/ports/textproc/docproj \ - FORCE_PKG_REGISTER=1 \ - install clean distclean - fi - fi if [ ! -z "${EMBEDDEDPORTS}" ]; then _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) diff --git a/release/riscv/GENERICSD.conf b/release/riscv/GENERICSD.conf index 52734b1dd8e8..d85a8ff7cd93 100644 --- a/release/riscv/GENERICSD.conf +++ b/release/riscv/GENERICSD.conf @@ -11,6 +11,5 @@ FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" -NODOC=1 PART_SCHEME="GPT" export BOARDNAME="GENERICSD" From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:18:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AB46054E571; Thu, 18 Feb 2021 04:18:17 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh1fJ3cbwz4r21; Thu, 18 Feb 2021 04:18:16 +0000 (UTC) (envelope-from ohartmann@walstatt.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613621884; bh=JuOx92Z3YhBmMBsXQ+KtJpVPkfKfL46mheB1IfpyPok=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=TqGP61Wt4xeom0EgQ+Ynf6oVMnCrYxH6RvyWjkkL3KHowDuDX9mAe+Sv7W9AfGvLn x8uBx2oV2tB1xH2DDPgd0/O55bnvI2DJQ/x7btezGhtahmlkHD+Ks2OsLTYvDXyr68 s0mZD4aaFP137bmf5Dyfymduontb7Bqo96ho/hgs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from hermann.fritz.box ([89.12.31.213]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJmKh-1lRdhq3iB7-00K56s; Thu, 18 Feb 2021 05:18:03 +0100 Date: Thu, 18 Feb 2021 05:17:55 +0100 From: "Hartmann, O." To: Cy Schubert Cc: "Hartmann, O." , Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility Message-ID: <20210218051755.42e541ae@hermann.fritz.box> In-Reply-To: <202102172059.11HKxkCj012745@slippy.cwsent.com> References: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> <20210217214505.0d4b544e@hermann.fritz.box> <202102172059.11HKxkCj012745@slippy.cwsent.com> Organization: walstatt.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/X1LkchSIHpgyL/AopZmz9/Y"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Provags-ID: V03:K1:GBZoLsUz/ouYNcWn6WBWCqwTqOEFxIGw6VFxE2dqr51ilG055Lp onFVO8bBl4b9AeJM4wACNGXiLHIdn6dQV4s6G1uPIt45k31kAZc3DwwBPJgx4JI/oBdUjny fKGmjMVgSBaj7IrW2hXVO4d/rLSHFkwbbL0kAP3z/VtkwGRpHeniBAEmEUzMCLoy5s5KNP7 EBhUi7+Wz3oLq0x9H4Yww== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qMHvLTOmW1s=:hNmj1kXoAI5UBWOnKBidSs D2XO2bxBYG+dSwrbAeqjgU1qUSaqkTkRqdIGqcLfnfw2858d9ZmHZI3siljXsZKE0xvUALBLY V+M6kSc4t7WvrSCFi39lnZHcRO0N59IzIbPo4+oMUVmUCJ4dCx0sZjKe9J2rOk4aqHhIukL4U aoQhrrRGmqHY1DqsoN/CCd+jRaFAau4WM4Sl2oK5M7bSskqaZy+BeDyJS6HgM1M1wepDl5+TV H+p5b6prZKQTpTOlgF4lK6JtEOFU1k89KhkKwCUuWLgSqw2hW/tr1XfqoywUiqpkaYvyuw1LI tLGi/ecCPE5oj+RWLdmlJ7xIAErt/2FZDbwoQuXFRSF0UMSybFTw3941667UU0ugJjwjmFJ5q U3n09zGyUYO+Pgbi8VoArTQF00ddoG3bMFi7VtogfRg8+1pto+N8wyFe/V8/yK7BJRNJTVggJ eebvIaTcROa/AoHl9hssITaaFkkal8oBR98Manc+hlv+Hj/hjfGlUXu9qigNS5AZ7QQWpYtd4 esDYL0u1QLFp47yAPk61qnNNxTass9IcFtKBYnx6GG/turXjOuEzBCofBgsPhe7m84csiu0rD 0i9EV1qo5iJwG0MZg1YM9UwtE0mbtN/XmbXBE8WpKSxL/tNKHEAQRsIeg+yiAxI6TRsi2S+YH bt6CJXDBWJbepzheqQq/Ttxaq6LOENblofNE7ZDjtUx09wr1fSVZLijk9lOe2VhmsBPbHfYKa srS+zhbid8+IifmLpdQKPqG0YlE56/jIzioWYJu7MjhcYID7MBpxvVs7U1SHBGWv0WKXQup0F NmZslMEkAcym07NJTh3q42/KENoKOqMlTNVNOoVeUuxSOOrrj1TSFn/2pUV5Vj/tNZrOOw/Xg aJ1So8S0OO+eo8oFTMdw== X-Rspamd-Queue-Id: 4Dh1fJ3cbwz4r21 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.b=TqGP61Wt; dmarc=none; spf=none (mx1.freebsd.org: domain of ohartmann@walstatt.org has no SPF policy when checking 212.227.15.19) smtp.mailfrom=ohartmann@walstatt.org X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; HAS_ORG_HEADER(0.00)[]; DKIM_TRACE(0.00)[gmx.net:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_LOW(-0.10)[212.227.15.19:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[212.227.15.19:from]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RECEIVED_SPAMHAUS_PBL(0.00)[89.12.31.213:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmx.net:s=badeba3b8450]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[walstatt.org]; SPAMHAUS_ZRD(0.00)[212.227.15.19:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[212.227.15.19:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-main,dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:18:17 -0000 --Sig_/X1LkchSIHpgyL/AopZmz9/Y Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 17 Feb 2021 12:59:46 -0800 Cy Schubert wrote: > In message <20210217214505.0d4b544e@hermann.fritz.box>, "Hartmann, O."=20 > writes: > > --Sig_/xVHYogKjgyXovADc1VoD_Ap > > Content-Type: text/plain; charset=3DUS-ASCII > > Content-Transfer-Encoding: quoted-printable > > > > On Wed, 17 Feb 2021 16:02:15 GMT > > Mark Johnston wrote: > > =20 > > > The branch main has been updated by markj: > > >=3D20 > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3D8ba333e02eaa59337a4e= 1d5534=3D =20 > > d4e894344c8226 =20 > > >=3D20 > > > commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 > > > Author: Mark Johnston > > > AuthorDate: 2021-02-17 15:49:38 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2021-02-17 15:57:19 +0000 > > >=3D20 > > > libdtrace: Stop relying on lex compatibility > > > =3D20 > > > It does not appear to be required, and as of commit 6b7e592c215f > > > ("lex: Do not let input() return 0 when end-of-file is reached") = it > > > causes input to return 0 instead of EOF when end-of-input is reac= hed. > > > =3D20 > > > PR: 253440 > > > MFC after: 3 days > > > Sponsored by: The FreeBSD Foundation > > > --- > > > cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- > > > cddl/lib/libdtrace/Makefile | 2 -- > > > 2 files changed, 1 insertion(+), 3 deletions(-) > > >=3D20 > > > diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h > > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index > > > f2c60a2b07d4..b3f69bb6329d 100644 --- > > > a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ > > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 += 717,=3D =20 > > 7 @@ extern =20 > > > dt_pcb_t *yypcb; /* pointer to current parser control block */ e =20 > > xtern =20 > > > char yyintprefix; /* int token prefix for macros (+/-) */ extern char > > > yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdeci= ma =20 > > l; =20 > > > /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; > > > /* lex input buffer */ +extern char *yytext; /* lex input bu =20 > > ffer */ =20 > > > extern int yylineno; /* lex line number */ > > > extern int yydebug; /* lex debugging */ > > > extern dt_node_t *yypragma; /* lex token list for control lines */ > > > diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile > > > index efd73751e2c0..45ca1692cf48 100644 > > > --- a/cddl/lib/libdtrace/Makefile > > > +++ b/cddl/lib/libdtrace/Makefile > > > @@ -129,8 +129,6 @@ SRCS+=3D3D dis_tables.c > > > DSRCS+=3D3D regs_x86.d > > > .endif > > > =3D20 > > > -LFLAGS+=3D3D-l > > > - > > > YFLAGS+=3D3D-d > > > =3D20 > > > LIBADD=3D3D ctf elf proc pthread rtld_db > > > _______________________________________________ > > > dev-commits-src-main@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@fr= eebs=3D =20 > > d.org" > > > > This commit breaks buildworld (also breask starting from scratch/clean = /usr=3D > > /obj): > > > > [...] > > -MD -MF.depend.arc_os.pico -MTarc_os.pico -std=3D3Diso9899:1999 -Wno-f= ormat-=3D > > zero-length > > -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-un= init=3D > > ialized > > -Wno-pointer-sign -Wno-unknown-pragmas -Wno-empty-body -Wno-string-plus= -int > > -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value > > -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion > > -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wn= o-sw=3D > > itch-enum > > -Wno-knr-promoted-parameter -Qunused-arguments -c > > /usr/src/sys/contrib/openzfs/module/os/linux/zfs/arc_os.c -o arc_os.pic= o --- > > all_subdir_cddl/lib/libdtrace --- --- dt_names.o --- --- dt_lex.o --- I= n fi=3D > > le included > > from /usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l:38: > > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdt= race=3D > > /common/dt_impl.h:720:14: > > error: redeclaration of 'yytext' with a different type: 'char *' vs 'ch= ar [=3D > > 8192]' extern > > char *yytext; /* lex input buffer */ ^ dt_lex.c:1075:6: note= : pr=3D > > evious > > definition is here char yytext[YYLMAX]; ^ 1 error generated. *** [dt_le= x.o]=3D > > Error code 1 > > > > make[5]: stopped in /usr/src/cddl/lib/libdtrace > > --- all_subdir_cddl/lib/libzpool --- > > =20 >=20 > Restart your build without -DNO_CLEAN. >=20 >=20 I did, that worked for me. Tried to avoid, my hardware isn't very fast and take the night to build. cleanworld salvaged the problem. Kind regards and thank you very much O. Hartmann --Sig_/X1LkchSIHpgyL/AopZmz9/Y Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQSy8IBxAPDkqVBaTJ44N1ZZPba5RwUCYC3qcwAKCRA4N1ZZPba5 Rw5AAP9TE1+iLkGke/UCkqRbNDlS/cAnqNMvhg/YqA5I3Ed4OAD/UTdOUDu7oxDz qnaCiOLCd6+0Q8MvUlVNsbehaqbPlQw= =kO2x -----END PGP SIGNATURE----- --Sig_/X1LkchSIHpgyL/AopZmz9/Y-- From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:21:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5376854F902; Thu, 18 Feb 2021 04:21: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 4Dh1kL1rWdz4rTF; Thu, 18 Feb 2021 04:21: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 31DEA12281; Thu, 18 Feb 2021 04:21: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 11I4LkeA070611; Thu, 18 Feb 2021 04:21:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I4Lj7Q070607; Thu, 18 Feb 2021 04:21:45 GMT (envelope-from git) Date: Thu, 18 Feb 2021 04:21:45 GMT Message-Id: <202102180421.11I4Lj7Q070607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: e57523de1905 - releng/13.0 - OpenSSL: Merge OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: e57523de190573403a48ad3af3845171d04f58b0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:21:46 -0000 The branch releng/13.0 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=e57523de190573403a48ad3af3845171d04f58b0 commit e57523de190573403a48ad3af3845171d04f58b0 Author: Jung-uk Kim AuthorDate: 2021-02-16 22:00:27 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 00:14:19 +0000 OpenSSL: Merge OpenSSL 1.1.1j (cherry picked from commit 88e852c0b5c872b1a3234515623104ae61b60773) (cherry picked from commit a4f76f79ffe88cb51ebc7b65b065a333fd64a75b) Approved by: re (gjb) --- crypto/openssl/AUTHORS | 7 +++ crypto/openssl/CHANGES | 37 +++++++++++++++ crypto/openssl/CONTRIBUTING | 4 +- crypto/openssl/Configure | 29 ++++++------ crypto/openssl/INSTALL | 15 +++--- crypto/openssl/NEWS | 10 ++++ crypto/openssl/README | 2 +- crypto/openssl/apps/ca.c | 53 +++++++++------------- crypto/openssl/apps/progs.pl | 0 crypto/openssl/crypto/armcap.c | 19 +++++++- crypto/openssl/crypto/asn1/charmap.h | 2 +- crypto/openssl/crypto/asn1/charmap.pl | 0 crypto/openssl/crypto/bf/asm/bf-586.pl | 0 crypto/openssl/crypto/bn/asm/bn-586.pl | 0 crypto/openssl/crypto/bn/asm/co-586.pl | 0 crypto/openssl/crypto/bn/asm/ppc.pl | 0 crypto/openssl/crypto/bn/bn_prime.h | 2 +- crypto/openssl/crypto/bn/bn_prime.pl | 0 crypto/openssl/crypto/cast/asm/cast-586.pl | 0 crypto/openssl/crypto/conf/conf_def.c | 16 ++++++- crypto/openssl/crypto/conf/conf_def.h | 2 +- crypto/openssl/crypto/conf/keysets.pl | 0 crypto/openssl/crypto/des/asm/crypt586.pl | 0 crypto/openssl/crypto/des/asm/des-586.pl | 0 crypto/openssl/crypto/des/asm/desboth.pl | 0 crypto/openssl/crypto/dh/dh_key.c | 33 ++++++++++++-- crypto/openssl/crypto/err/openssl.txt | 3 +- crypto/openssl/crypto/evp/evp_enc.c | 27 +++++++++++ crypto/openssl/crypto/evp/evp_err.c | 4 +- crypto/openssl/crypto/md5/asm/md5-586.pl | 0 crypto/openssl/crypto/mem_sec.c | 8 +++- crypto/openssl/crypto/objects/obj_dat.h | 2 +- crypto/openssl/crypto/objects/obj_dat.pl | 0 crypto/openssl/crypto/objects/obj_xref.h | 2 +- crypto/openssl/crypto/objects/objects.pl | 0 crypto/openssl/crypto/perlasm/cbc.pl | 0 crypto/openssl/crypto/perlasm/x86asm.pl | 0 crypto/openssl/crypto/perlasm/x86nasm.pl | 0 .../openssl/crypto/poly1305/asm/poly1305-armv4.pl | 13 ++++-- crypto/openssl/crypto/ppccap.c | 20 +++++++- crypto/openssl/crypto/rc4/asm/rc4-586.pl | 0 crypto/openssl/crypto/rc5/asm/rc5-586.pl | 0 crypto/openssl/crypto/ripemd/asm/rmd-586.pl | 0 crypto/openssl/crypto/rsa/rsa_ssl.c | 10 +++- crypto/openssl/crypto/sha/asm/sha1-586.pl | 0 crypto/openssl/crypto/sha/asm/sha1-ia64.pl | 0 crypto/openssl/crypto/srp/srp_lib.c | 13 ++++-- crypto/openssl/crypto/x509/x509_cmp.c | 24 ++++++---- crypto/openssl/crypto/x509/x509_vfy.c | 15 +++--- crypto/openssl/crypto/x509/x_all.c | 4 +- crypto/openssl/crypto/x509/x_attrib.c | 5 +- crypto/openssl/crypto/x509v3/v3_purp.c | 14 ++++-- crypto/openssl/crypto/x86_64cpuid.pl | 0 crypto/openssl/crypto/x86cpuid.pl | 0 crypto/openssl/doc/man1/ca.pod | 4 +- crypto/openssl/doc/man1/cms.pod | 4 +- crypto/openssl/doc/man1/crl2pkcs7.pod | 4 +- crypto/openssl/doc/man1/dgst.pod | 4 +- crypto/openssl/doc/man1/dsa.pod | 6 +-- crypto/openssl/doc/man1/ec.pod | 6 +-- crypto/openssl/doc/man1/enc.pod | 4 +- crypto/openssl/doc/man1/genpkey.pod | 4 +- crypto/openssl/doc/man1/genrsa.pod | 4 +- crypto/openssl/doc/man1/pkcs12.pod | 14 ++---- crypto/openssl/doc/man1/pkcs8.pod | 6 +-- crypto/openssl/doc/man1/pkey.pod | 6 +-- crypto/openssl/doc/man1/pkeyutl.pod | 4 +- crypto/openssl/doc/man1/req.pod | 6 +-- crypto/openssl/doc/man1/rsa.pod | 6 +-- crypto/openssl/doc/man1/s_client.pod | 4 +- crypto/openssl/doc/man1/s_server.pod | 4 +- crypto/openssl/doc/man1/smime.pod | 4 +- crypto/openssl/doc/man1/spkac.pod | 4 +- crypto/openssl/doc/man1/storeutl.pod | 4 +- crypto/openssl/doc/man1/ts.pod | 4 +- crypto/openssl/doc/man1/x509.pod | 4 +- crypto/openssl/doc/man3/DH_generate_key.pod | 27 +++++++++-- crypto/openssl/doc/man3/OCSP_sendreq_new.pod | 28 ++++++++++-- crypto/openssl/doc/man3/OPENSSL_malloc.pod | 2 +- .../openssl/doc/man3/X509_get_extension_flags.pod | 11 +++-- crypto/openssl/include/openssl/evperr.h | 7 ++- crypto/openssl/include/openssl/obj_mac.h | 2 +- crypto/openssl/include/openssl/opensslv.h | 4 +- crypto/openssl/include/openssl/x509v3.h | 7 +-- crypto/openssl/ssl/d1_lib.c | 11 +++-- crypto/openssl/ssl/record/rec_layer_d1.c | 5 +- crypto/openssl/ssl/ssl_local.h | 3 +- crypto/openssl/ssl/statem/extensions.c | 5 +- crypto/openssl/ssl/statem/statem_clnt.c | 3 +- crypto/openssl/ssl/statem/statem_lib.c | 15 +++++- 90 files changed, 433 insertions(+), 202 deletions(-) diff --git a/crypto/openssl/AUTHORS b/crypto/openssl/AUTHORS index ac93b2e7b975..dac46f8b7e08 100644 --- a/crypto/openssl/AUTHORS +++ b/crypto/openssl/AUTHORS @@ -13,6 +13,8 @@ Ben Kaduk Bernd Edlinger Bodo Möller David Benjamin +David von Oheimb +Dmitry Belyavskiy (Дмитрий Белявский) Emilia Käsper Eric Young Geoff Thorpe @@ -22,14 +24,19 @@ Lutz Jänicke Mark J. Cox Matt Caswell Matthias St. Pierre +Nicola Tuveri Nils Larsch +Patrick Steuer Paul Dale Paul C. Sutton +Paul Yang Ralf S. Engelschall Rich Salz Richard Levitte +Shane Lontis Stephen Henson Steve Marquess Tim Hudson +Tomáš Mráz Ulf Möller Viktor Dukhovni diff --git a/crypto/openssl/CHANGES b/crypto/openssl/CHANGES index 4d61c1dadbaa..a4a63a9bea22 100644 --- a/crypto/openssl/CHANGES +++ b/crypto/openssl/CHANGES @@ -7,6 +7,43 @@ https://github.com/openssl/openssl/commits/ and pick the appropriate release branch. + Changes between 1.1.1i and 1.1.1j [16 Feb 2021] + + *) Fixed the X509_issuer_and_serial_hash() function. It attempts to + create a unique hash value based on the issuer and serial number data + contained within an X509 certificate. However it was failing to correctly + handle any errors that may occur while parsing the issuer field (which might + occur if the issuer field is maliciously constructed). This may subsequently + result in a NULL pointer deref and a crash leading to a potential denial of + service attack. + (CVE-2021-23841) + [Matt Caswell] + + *) Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks. This is considered a + bug in OpenSSL 1.1.1 because it does not support SSLv2. In 1.0.2 this is + CVE-2021-23839. + [Matt Caswell] + + *) Fixed the EVP_CipherUpdate, EVP_EncryptUpdate and EVP_DecryptUpdate + functions. Previously they could overflow the output length argument in some + cases where the input length is close to the maximum permissable length for + an integer on the platform. In such cases the return value from the function + call would be 1 (indicating success), but the output length value would be + negative. This could cause applications to behave incorrectly or crash. + (CVE-2021-23840) + [Matt Caswell] + + *) Fixed SRP_Calc_client_key so that it runs in constant time. The previous + implementation called BN_mod_exp without setting BN_FLG_CONSTTIME. This + could be exploited in a side channel attack to recover the password. Since + the attack is local host only this is outside of the current OpenSSL + threat model and therefore no CVE is assigned. + + Thanks to Mohammed Sabt and Daniel De Almeida Braga for reporting this + issue. + [Matt Caswell] + Changes between 1.1.1h and 1.1.1i [8 Dec 2020] *) Fixed NULL pointer deref in the GENERAL_NAME_cmp function diff --git a/crypto/openssl/CONTRIBUTING b/crypto/openssl/CONTRIBUTING index 57be75ce2b8a..83c0dde12819 100644 --- a/crypto/openssl/CONTRIBUTING +++ b/crypto/openssl/CONTRIBUTING @@ -41,8 +41,8 @@ guidelines: https://www.openssl.org/policies/codingstyle.html) and compile without warnings. Where gcc or clang is available you should use the --strict-warnings Configure option. OpenSSL compiles on many varied - platforms: try to ensure you only use portable features. Clean builds - via Travis and AppVeyor are required, and they are started automatically + platforms: try to ensure you only use portable features. Clean builds via + GitHub Actions and AppVeyor are required, and they are started automatically whenever a PR is created or updated. 5. When at all possible, patches should include tests. These can diff --git a/crypto/openssl/Configure b/crypto/openssl/Configure index 1423e1bfe14f..8e7ee1a599cc 100755 --- a/crypto/openssl/Configure +++ b/crypto/openssl/Configure @@ -1,6 +1,6 @@ #! /usr/bin/env perl # -*- mode: perl; -*- -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -1203,6 +1203,10 @@ foreach (keys %useradd) { # At this point, we can forget everything about %user and %useradd, # because it's now all been merged into the corresponding $config entry +if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { + disable('static', 'pic', 'threads'); +} + # Allow overriding the build file name $config{build_file} = env('BUILDFILE') || $target{build_file} || "Makefile"; @@ -1523,10 +1527,6 @@ if ($strict_warnings) } } -if (grep { $_ eq '-static' } @{$config{LDFLAGS}}) { - disable('static', 'pic', 'threads'); -} - $config{CFLAGS} = [ map { $_ eq '--ossl-strict-warnings' ? @strict_warnings_collection : ( $_ ) } @@ -2640,19 +2640,22 @@ _____ } print "\nEnabled features:\n\n"; foreach my $what (@disablables) { - print " $what\n" unless $disabled{$what}; + print " $what\n" + unless grep { $_ =~ /^${what}$/ } keys %disabled; } print "\nDisabled features:\n\n"; foreach my $what (@disablables) { - if ($disabled{$what}) { - print " $what", ' ' x ($longest - length($what) + 1), - "[$disabled{$what}]", ' ' x ($longest2 - length($disabled{$what}) + 1); - print $disabled_info{$what}->{macro} - if $disabled_info{$what}->{macro}; + my @what2 = grep { $_ =~ /^${what}$/ } keys %disabled; + my $what3 = $what2[0]; + if ($what3) { + print " $what3", ' ' x ($longest - length($what3) + 1), + "[$disabled{$what3}]", ' ' x ($longest2 - length($disabled{$what3}) + 1); + print $disabled_info{$what3}->{macro} + if $disabled_info{$what3}->{macro}; print ' (skip ', - join(', ', @{$disabled_info{$what}->{skipped}}), + join(', ', @{$disabled_info{$what3}->{skipped}}), ')' - if $disabled_info{$what}->{skipped}; + if $disabled_info{$what3}->{skipped}; print "\n"; } } diff --git a/crypto/openssl/INSTALL b/crypto/openssl/INSTALL index be84f2aa8e5d..f6f754fd5e26 100644 --- a/crypto/openssl/INSTALL +++ b/crypto/openssl/INSTALL @@ -106,8 +106,7 @@ This will build and install OpenSSL in the default location, which is: Unix: normal installation directories under /usr/local - OpenVMS: SYS$COMMON:[OPENSSL-'version'...], where 'version' is the - OpenSSL version number with underscores instead of periods. + OpenVMS: SYS$COMMON:[OPENSSL] Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL The installation directory should be appropriately protected to ensure @@ -116,7 +115,9 @@ your Operating System it is recommended that you do not overwrite the system version and instead install to somewhere else. - If you want to install it anywhere else, run config like this: + If you want to install it anywhere else, run config like this (the options + --prefix and --openssldir are explained further down, and the values shown + here are mere examples): On Unix: @@ -198,7 +199,7 @@ Unix: /usr/local Windows: C:\Program Files\OpenSSL or C:\Program Files (x86)\OpenSSL - OpenVMS: SYS$COMMON:[OPENSSL-'version'] + OpenVMS: SYS$COMMON:[OPENSSL] --release Build OpenSSL without debugging symbols. This is the default. @@ -970,9 +971,9 @@ share/doc/openssl/html/man7 Contains the HTML rendition of the man-pages. - OpenVMS ('arch' is replaced with the architecture name, "Alpha" - or "ia64", 'sover' is replaced with the shared library version - (0101 for 1.1), and 'pz' is replaced with the pointer size + OpenVMS ('arch' is replaced with the architecture name, "ALPHA" + or "IA64", 'sover' is replaced with the shared library version + (0101 for 1.1.x), and 'pz' is replaced with the pointer size OpenSSL was built with): [.EXE.'arch'] Contains the openssl binary. diff --git a/crypto/openssl/NEWS b/crypto/openssl/NEWS index 98f6791a8b79..3cce52506645 100644 --- a/crypto/openssl/NEWS +++ b/crypto/openssl/NEWS @@ -5,6 +5,16 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.1.1i and OpenSSL 1.1.1j [16 Feb 2021] + + o Fixed a NULL pointer deref in the X509_issuer_and_serial_hash() + function (CVE-2021-23841) + o Fixed the RSA_padding_check_SSLv23() function and the RSA_SSLV23_PADDING + padding mode to correctly check for rollback attacks + o Fixed an overflow in the EVP_CipherUpdate, EVP_EncryptUpdate and + EVP_DecryptUpdate functions (CVE-2021-23840) + o Fixed SRP_Calc_client_key so that it runs in constant time + Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020] o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971) diff --git a/crypto/openssl/README b/crypto/openssl/README index 6325127b5693..da5629f92c81 100644 --- a/crypto/openssl/README +++ b/crypto/openssl/README @@ -1,5 +1,5 @@ - OpenSSL 1.1.1i 8 Dec 2020 + OpenSSL 1.1.1j 16 Feb 2021 Copyright (c) 1998-2020 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson diff --git a/crypto/openssl/apps/ca.c b/crypto/openssl/apps/ca.c index 6c9b1e57bc67..390ac37493c8 100644 --- a/crypto/openssl/apps/ca.c +++ b/crypto/openssl/apps/ca.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -2223,62 +2223,51 @@ static int get_certificate_status(const char *serial, CA_DB *db) static int do_updatedb(CA_DB *db) { - ASN1_UTCTIME *a_tm = NULL; + ASN1_TIME *a_tm = NULL; int i, cnt = 0; - int db_y2k, a_y2k; /* flags = 1 if y >= 2000 */ - char **rrow, *a_tm_s; + char **rrow; - a_tm = ASN1_UTCTIME_new(); + a_tm = ASN1_TIME_new(); if (a_tm == NULL) return -1; - /* get actual time and make a string */ + /* get actual time */ if (X509_gmtime_adj(a_tm, 0) == NULL) { - ASN1_UTCTIME_free(a_tm); + ASN1_TIME_free(a_tm); return -1; } - a_tm_s = app_malloc(a_tm->length + 1, "time string"); - - memcpy(a_tm_s, a_tm->data, a_tm->length); - a_tm_s[a_tm->length] = '\0'; - - if (strncmp(a_tm_s, "49", 2) <= 0) - a_y2k = 1; - else - a_y2k = 0; for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { rrow = sk_OPENSSL_PSTRING_value(db->db->data, i); if (rrow[DB_type][0] == DB_TYPE_VAL) { /* ignore entries that are not valid */ - if (strncmp(rrow[DB_exp_date], "49", 2) <= 0) - db_y2k = 1; - else - db_y2k = 0; + ASN1_TIME *exp_date = NULL; - if (db_y2k == a_y2k) { - /* all on the same y2k side */ - if (strcmp(rrow[DB_exp_date], a_tm_s) <= 0) { - rrow[DB_type][0] = DB_TYPE_EXP; - rrow[DB_type][1] = '\0'; - cnt++; + exp_date = ASN1_TIME_new(); + if (exp_date == NULL) { + ASN1_TIME_free(a_tm); + return -1; + } - BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); - } - } else if (db_y2k < a_y2k) { + if (!ASN1_TIME_set_string(exp_date, rrow[DB_exp_date])) { + ASN1_TIME_free(a_tm); + ASN1_TIME_free(exp_date); + return -1; + } + + if (ASN1_TIME_compare(exp_date, a_tm) <= 0) { rrow[DB_type][0] = DB_TYPE_EXP; rrow[DB_type][1] = '\0'; cnt++; BIO_printf(bio_err, "%s=Expired\n", rrow[DB_serial]); } - + ASN1_TIME_free(exp_date); } } - ASN1_UTCTIME_free(a_tm); - OPENSSL_free(a_tm_s); + ASN1_TIME_free(a_tm); return cnt; } diff --git a/crypto/openssl/apps/progs.pl b/crypto/openssl/apps/progs.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/armcap.c b/crypto/openssl/crypto/armcap.c index 58e54f0da2e1..8bf96f10214f 100644 --- a/crypto/openssl/crypto/armcap.c +++ b/crypto/openssl/crypto/armcap.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -69,6 +69,23 @@ void OPENSSL_cpuid_setup(void) __attribute__ ((constructor)); # define OSSL_IMPLEMENT_GETAUXVAL # endif # endif +# if defined(__FreeBSD__) +# include +# if __FreeBSD_version >= 1200000 +# include +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif +# endif /* * ARM puts the feature bits for Crypto Extensions in AT_HWCAP2, whereas diff --git a/crypto/openssl/crypto/asn1/charmap.h b/crypto/openssl/crypto/asn1/charmap.h index cac354c6bf33..e234c9e615d0 100644 --- a/crypto/openssl/crypto/asn1/charmap.h +++ b/crypto/openssl/crypto/asn1/charmap.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/asn1/charmap.pl * - * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/asn1/charmap.pl b/crypto/openssl/crypto/asn1/charmap.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bf/asm/bf-586.pl b/crypto/openssl/crypto/bf/asm/bf-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/bn-586.pl b/crypto/openssl/crypto/bn/asm/bn-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/co-586.pl b/crypto/openssl/crypto/bn/asm/co-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/asm/ppc.pl b/crypto/openssl/crypto/bn/asm/ppc.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/bn/bn_prime.h b/crypto/openssl/crypto/bn/bn_prime.h index ba48244534b0..1a25c285773a 100644 --- a/crypto/openssl/crypto/bn/bn_prime.h +++ b/crypto/openssl/crypto/bn/bn_prime.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/bn/bn_prime.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/bn/bn_prime.pl b/crypto/openssl/crypto/bn/bn_prime.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/cast/asm/cast-586.pl b/crypto/openssl/crypto/cast/asm/cast-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/conf/conf_def.c b/crypto/openssl/crypto/conf/conf_def.c index 3d710f12ae07..31c02cc49e22 100644 --- a/crypto/openssl/crypto/conf/conf_def.c +++ b/crypto/openssl/crypto/conf/conf_def.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -185,6 +185,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BUF_MEM *buff = NULL; char *s, *p, *end; int again; + int first_call = 1; long eline = 0; char btmp[DECIMAL_SIZE(eline) + 1]; CONF_VALUE *v = NULL, *tv; @@ -233,6 +234,19 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) BIO_gets(in, p, CONFBUFSIZE - 1); p[CONFBUFSIZE - 1] = '\0'; ii = i = strlen(p); + if (first_call) { + /* Other BOMs imply unsupported multibyte encoding, + * so don't strip them and let the error raise */ + const unsigned char utf8_bom[3] = {0xEF, 0xBB, 0xBF}; + + if (i >= 3 && memcmp(p, utf8_bom, 3) == 0) { + memmove(p, p + 3, i - 3); + p[i - 3] = 0; + i -= 3; + ii -= 3; + } + first_call = 0; + } if (i == 0 && !again) { /* the currently processed BIO is at EOF */ BIO *parent; diff --git a/crypto/openssl/crypto/conf/conf_def.h b/crypto/openssl/crypto/conf/conf_def.h index 2ced300e40d6..1e4a03e10bbd 100644 --- a/crypto/openssl/crypto/conf/conf_def.h +++ b/crypto/openssl/crypto/conf/conf_def.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/conf/keysets.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/openssl/crypto/conf/keysets.pl b/crypto/openssl/crypto/conf/keysets.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/crypt586.pl b/crypto/openssl/crypto/des/asm/crypt586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/des-586.pl b/crypto/openssl/crypto/des/asm/des-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/des/asm/desboth.pl b/crypto/openssl/crypto/des/asm/desboth.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/dh/dh_key.c b/crypto/openssl/crypto/dh/dh_key.c index daffdf74dd37..117f2fa883ff 100644 --- a/crypto/openssl/crypto/dh/dh_key.c +++ b/crypto/openssl/crypto/dh/dh_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -25,18 +25,45 @@ int DH_generate_key(DH *dh) return dh->meth->generate_key(dh); } +/*- + * NB: This function is inherently not constant time due to the + * RFC 5246 (8.1.2) padding style that strips leading zero bytes. + */ int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { - return dh->meth->compute_key(key, pub_key, dh); + int ret = 0, i; + volatile size_t npad = 0, mask = 1; + + /* compute the key; ret is constant unless compute_key is external */ + if ((ret = dh->meth->compute_key(key, pub_key, dh)) <= 0) + return ret; + + /* count leading zero bytes, yet still touch all bytes */ + for (i = 0; i < ret; i++) { + mask &= !key[i]; + npad += mask; + } + + /* unpad key */ + ret -= npad; + /* key-dependent memory access, potentially leaking npad / ret */ + memmove(key, key + npad, ret); + /* key-dependent memory access, potentially leaking npad / ret */ + memset(key + ret, 0, npad); + + return ret; } int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh) { int rv, pad; + + /* rv is constant unless compute_key is external */ rv = dh->meth->compute_key(key, pub_key, dh); if (rv <= 0) return rv; pad = BN_num_bytes(dh->p) - rv; + /* pad is constant (zero) unless compute_key is external */ if (pad > 0) { memmove(key + pad, key, rv); memset(key, 0, pad); @@ -212,7 +239,7 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) goto err; } - ret = BN_bn2bin(tmp, key); + ret = BN_bn2binpad(tmp, key, BN_num_bytes(dh->p)); err: BN_CTX_end(ctx); BN_CTX_free(ctx); diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index d547c45913d6..b22e8a735ccf 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -1,4 +1,4 @@ -# Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -2284,6 +2284,7 @@ EVP_R_ONLY_ONESHOT_SUPPORTED:177:only oneshot supported EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE:150:\ operation not supported for this keytype EVP_R_OPERATON_NOT_INITIALIZED:151:operaton not initialized +EVP_R_OUTPUT_WOULD_OVERFLOW:184:output would overflow EVP_R_PARTIALLY_OVERLAPPING:162:partially overlapping buffers EVP_R_PBKDF2_ERROR:181:pbkdf2 error EVP_R_PKEY_APPLICATION_ASN1_METHOD_ALREADY_REGISTERED:179:\ diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index b9b6490fe069..0843caf4f0a4 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -8,6 +8,7 @@ */ #include +#include #include #include "internal/cryptlib.h" #include @@ -355,6 +356,19 @@ static int evp_EncryptDecryptUpdate(EVP_CIPHER_CTX *ctx, return 1; } else { j = bl - i; + + /* + * Once we've processed the first j bytes from in, the amount of + * data left that is a multiple of the block length is: + * (inl - j) & ~(bl - 1) + * We must ensure that this amount of data, plus the one block that + * we process from ctx->buf does not exceed INT_MAX + */ + if (((inl - j) & ~(bl - 1)) > INT_MAX - bl) { + EVPerr(EVP_F_EVP_ENCRYPTDECRYPTUPDATE, + EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(&(ctx->buf[i]), in, j); inl -= j; in += j; @@ -502,6 +516,19 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING); return 0; } + /* + * final_used is only ever set if buf_len is 0. Therefore the maximum + * length output we will ever see from evp_EncryptDecryptUpdate is + * the maximum multiple of the block length that is <= inl, or just: + * inl & ~(b - 1) + * Since final_used has been set then the final output length is: + * (inl & ~(b - 1)) + b + * This must never exceed INT_MAX + */ + if ((inl & ~(b - 1)) > INT_MAX - b) { + EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(out, ctx->final, b); out += b; fix_len = 1; diff --git a/crypto/openssl/crypto/evp/evp_err.c b/crypto/openssl/crypto/evp/evp_err.c index 05481d827fb4..32ac0125de24 100644 --- a/crypto/openssl/crypto/evp/evp_err.c +++ b/crypto/openssl/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -239,6 +239,8 @@ static const ERR_STRING_DATA EVP_str_reasons[] = { "operation not supported for this keytype"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"}, + {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OUTPUT_WOULD_OVERFLOW), + "output would overflow"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PARTIALLY_OVERLAPPING), "partially overlapping buffers"}, {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_PBKDF2_ERROR), "pbkdf2 error"}, diff --git a/crypto/openssl/crypto/md5/asm/md5-586.pl b/crypto/openssl/crypto/md5/asm/md5-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/mem_sec.c b/crypto/openssl/crypto/mem_sec.c index b5f959ba15d5..222c786cbaef 100644 --- a/crypto/openssl/crypto/mem_sec.c +++ b/crypto/openssl/crypto/mem_sec.c @@ -34,6 +34,12 @@ # include # endif # endif +# if defined(__FreeBSD__) +# define MADV_DONTDUMP MADV_NOCORE +# endif +# if !defined(MAP_CONCEAL) +# define MAP_CONCEAL 0 +# endif # include # include # include @@ -442,7 +448,7 @@ static int sh_init(size_t size, int minsize) if (1) { #ifdef MAP_ANON sh.map_result = mmap(NULL, sh.map_size, - PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0); + PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_CONCEAL, -1, 0); } else { #endif int fd; diff --git a/crypto/openssl/crypto/objects/obj_dat.h b/crypto/openssl/crypto/objects/obj_dat.h index d1b1bc7faf91..24b49a2df258 100644 --- a/crypto/openssl/crypto/objects/obj_dat.h +++ b/crypto/openssl/crypto/objects/obj_dat.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by crypto/objects/obj_dat.pl * - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at diff --git a/crypto/openssl/crypto/objects/obj_dat.pl b/crypto/openssl/crypto/objects/obj_dat.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/objects/obj_xref.h b/crypto/openssl/crypto/objects/obj_xref.h index 1ca04bbff19f..5c3561ab7d7e 100644 --- a/crypto/openssl/crypto/objects/obj_xref.h +++ b/crypto/openssl/crypto/objects/obj_xref.h @@ -2,7 +2,7 @@ * WARNING: do not edit! * Generated by objxref.pl * - * Copyright 1998-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1998-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy diff --git a/crypto/openssl/crypto/objects/objects.pl b/crypto/openssl/crypto/objects/objects.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/cbc.pl b/crypto/openssl/crypto/perlasm/cbc.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/x86asm.pl b/crypto/openssl/crypto/perlasm/x86asm.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/perlasm/x86nasm.pl b/crypto/openssl/crypto/perlasm/x86nasm.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl b/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl index f77e1170f66b..70f46cd140aa 100755 --- a/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl +++ b/crypto/openssl/crypto/poly1305/asm/poly1305-armv4.pl @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -133,10 +133,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -352,6 +352,7 @@ $code.=<<___; .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4-r11} .Lpoly1305_emit_enter: @@ -671,6 +672,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[$ctx,#36] @ is_base2_26 ands $len,$len,#-16 beq .Lno_data_neon @@ -1157,6 +1159,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[$ctx,#36] @ is_base2_26 stmdb sp!,{r4-r11} diff --git a/crypto/openssl/crypto/ppccap.c b/crypto/openssl/crypto/ppccap.c index b12cd949ccfe..e51156468ae5 100644 --- a/crypto/openssl/crypto/ppccap.c +++ b/crypto/openssl/crypto/ppccap.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2009-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -214,6 +214,24 @@ size_t OPENSSL_instrument_bus2(unsigned int *out, size_t cnt, size_t max) # endif #endif +#if defined(__FreeBSD__) +# include +# if __FreeBSD_version >= 1200000 +# include +# define OSSL_IMPLEMENT_GETAUXVAL + +static unsigned long getauxval(unsigned long key) +{ + unsigned long val = 0ul; + + if (elf_aux_info((int)key, &val, sizeof(val)) != 0) + return 0ul; + + return val; +} +# endif +#endif + /* I wish was universally available */ #define HWCAP 16 /* AT_HWCAP */ #define HWCAP_PPC64 (1U << 30) diff --git a/crypto/openssl/crypto/rc4/asm/rc4-586.pl b/crypto/openssl/crypto/rc4/asm/rc4-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/rc5/asm/rc5-586.pl b/crypto/openssl/crypto/rc5/asm/rc5-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/ripemd/asm/rmd-586.pl b/crypto/openssl/crypto/ripemd/asm/rmd-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/rsa/rsa_ssl.c b/crypto/openssl/crypto/rsa/rsa_ssl.c index 1f155be175da..ecdb3cee1fa3 100644 --- a/crypto/openssl/crypto/rsa/rsa_ssl.c +++ b/crypto/openssl/crypto/rsa/rsa_ssl.c @@ -55,7 +55,7 @@ int RSA_padding_add_SSLv23(unsigned char *to, int tlen, /* * Copy of RSA_padding_check_PKCS1_type_2 with a twist that rejects padding - * if nul delimiter is not preceded by 8 consecutive 0x03 bytes. It also + * if nul delimiter is preceded by 8 consecutive 0x03 bytes. It also * preserves error code reporting for backward compatibility. */ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, @@ -122,7 +122,13 @@ int RSA_padding_check_SSLv23(unsigned char *to, int tlen, RSA_R_NULL_BEFORE_BLOCK_MISSING); mask = ~good; - good &= constant_time_ge(threes_in_row, 8); + /* + * Reject if nul delimiter is preceded by 8 consecutive 0x03 bytes. Note + * that RFC5246 incorrectly states this the other way around, i.e. reject + * if it is not preceded by 8 consecutive 0x03 bytes. However this is + * corrected in subsequent errata for that RFC. + */ + good &= constant_time_lt(threes_in_row, 8); err = constant_time_select_int(mask | good, err, RSA_R_SSLV3_ROLLBACK_ATTACK); mask = ~good; diff --git a/crypto/openssl/crypto/sha/asm/sha1-586.pl b/crypto/openssl/crypto/sha/asm/sha1-586.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/sha/asm/sha1-ia64.pl b/crypto/openssl/crypto/sha/asm/sha1-ia64.pl old mode 100644 new mode 100755 diff --git a/crypto/openssl/crypto/srp/srp_lib.c b/crypto/openssl/crypto/srp/srp_lib.c index 4f417de0c989..ce3504825c53 100644 --- a/crypto/openssl/crypto/srp/srp_lib.c +++ b/crypto/openssl/crypto/srp/srp_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 2004-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. * Copyright (c) 2004, EdelKey Project. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use @@ -177,6 +177,7 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, const BIGNUM *x, const BIGNUM *a, const BIGNUM *u) { BIGNUM *tmp = NULL, *tmp2 = NULL, *tmp3 = NULL, *k = NULL, *K = NULL; + BIGNUM *xtmp = NULL; BN_CTX *bn_ctx; if (u == NULL || B == NULL || N == NULL || g == NULL || x == NULL @@ -185,10 +186,13 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, if ((tmp = BN_new()) == NULL || (tmp2 = BN_new()) == NULL || - (tmp3 = BN_new()) == NULL) + (tmp3 = BN_new()) == NULL || + (xtmp = BN_new()) == NULL) goto err; - if (!BN_mod_exp(tmp, g, x, N, bn_ctx)) + BN_with_flags(xtmp, x, BN_FLG_CONSTTIME); + BN_set_flags(tmp, BN_FLG_CONSTTIME); + if (!BN_mod_exp(tmp, g, xtmp, N, bn_ctx)) goto err; if ((k = srp_Calc_k(N, g)) == NULL) goto err; @@ -196,7 +200,7 @@ BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, goto err; if (!BN_mod_sub(tmp, B, tmp2, N, bn_ctx)) *** 1153 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:21:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EAE2654F903; Thu, 18 Feb 2021 04:21: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 4Dh1kM5my0z4rNl; Thu, 18 Feb 2021 04:21: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 B90C212244; Thu, 18 Feb 2021 04:21: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 11I4LlUa070630; Thu, 18 Feb 2021 04:21:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I4Ll6I070629; Thu, 18 Feb 2021 04:21:47 GMT (envelope-from git) Date: Thu, 18 Feb 2021 04:21:47 GMT Message-Id: <202102180421.11I4Ll6I070629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 28025add118d - releng/13.0 - OpenSSL: Regen manual pages for OpenSSL 1.1.1j. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 28025add118d9369ba016433dc670d74a5077a20 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:21:48 -0000 The branch releng/13.0 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=28025add118d9369ba016433dc670d74a5077a20 commit 28025add118d9369ba016433dc670d74a5077a20 Author: Jung-uk Kim AuthorDate: 2021-02-16 22:05:00 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 00:15:19 +0000 OpenSSL: Regen manual pages for OpenSSL 1.1.1j. (cherry picked from commit e25db73fea9b641a7dcf29303cf104e0d3847d6c) (cherry picked from commit e8cbe40ac3ba0582d995d584f58009168f2c9dc6) Approved by: re (gjb) --- secure/lib/libcrypto/Makefile.inc | 4 +- secure/lib/libcrypto/man/man3/ADMISSIONS.3 | 2 +- .../libcrypto/man/man3/ASN1_INTEGER_get_int64.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 | 2 +- secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 | 2 +- .../lib/libcrypto/man/man3/ASN1_generate_nconf.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/ASYNC_start_job.3 | 2 +- secure/lib/libcrypto/man/man3/BF_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDR.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_base64.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_buffer.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_cipher.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_md.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_f_ssl.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_find_type.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_data.3 | 2 +- .../lib/libcrypto/man/man3/BIO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_get_ktls_send.3 | 280 --------------------- secure/lib/libcrypto/man/man3/BIO_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_new_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_parse_hostserv.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_printf.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_push.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_read.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_accept.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_bio.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_connect.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_fd.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_file.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_mem.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_null.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_s_socket.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_set_callback.3 | 2 +- secure/lib/libcrypto/man/man3/BIO_should_retry.3 | 2 +- secure/lib/libcrypto/man/man3/BN_BLINDING_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_CTX_start.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add.3 | 2 +- secure/lib/libcrypto/man/man3/BN_add_word.3 | 2 +- secure/lib/libcrypto/man/man3/BN_bn2bin.3 | 2 +- secure/lib/libcrypto/man/man3/BN_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/BN_copy.3 | 2 +- secure/lib/libcrypto/man/man3/BN_generate_prime.3 | 2 +- secure/lib/libcrypto/man/man3/BN_mod_inverse.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_montgomery.3 | 2 +- .../lib/libcrypto/man/man3/BN_mod_mul_reciprocal.3 | 2 +- secure/lib/libcrypto/man/man3/BN_new.3 | 2 +- secure/lib/libcrypto/man/man3/BN_num_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/BN_rand.3 | 2 +- secure/lib/libcrypto/man/man3/BN_security_bits.3 | 2 +- secure/lib/libcrypto/man/man3/BN_set_bit.3 | 2 +- secure/lib/libcrypto/man/man3/BN_swap.3 | 2 +- secure/lib/libcrypto/man/man3/BN_zero.3 | 2 +- secure/lib/libcrypto/man/man3/BUF_MEM_new.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add0_cert.3 | 2 +- .../libcrypto/man/man3/CMS_add1_recipient_cert.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_add1_signer.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_compress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_final.3 | 2 +- .../libcrypto/man/man3/CMS_get0_RecipientInfos.3 | 2 +- .../lib/libcrypto/man/man3/CMS_get0_SignerInfos.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_get0_type.3 | 2 +- .../libcrypto/man/man3/CMS_get1_ReceiptRequest.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_sign_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_uncompress.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify.3 | 2 +- secure/lib/libcrypto/man/man3/CMS_verify_receipt.3 | 2 +- secure/lib/libcrypto/man/man3/CONF_modules_free.3 | 2 +- .../libcrypto/man/man3/CONF_modules_load_file.3 | 2 +- .../libcrypto/man/man3/CRYPTO_THREAD_run_once.3 | 2 +- .../libcrypto/man/man3/CRYPTO_get_ex_new_index.3 | 2 +- secure/lib/libcrypto/man/man3/CRYPTO_memcmp.3 | 2 +- .../man/man3/CTLOG_STORE_get0_log_by_id.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_STORE_new.3 | 2 +- secure/lib/libcrypto/man/man3/CTLOG_new.3 | 2 +- .../libcrypto/man/man3/CT_POLICY_EVAL_CTX_new.3 | 2 +- secure/lib/libcrypto/man/man3/DEFINE_STACK_OF.3 | 2 +- secure/lib/libcrypto/man/man3/DES_random_key.3 | 2 +- secure/lib/libcrypto/man/man3/DH_generate_key.3 | 27 +- .../libcrypto/man/man3/DH_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DH_get_1024_160.3 | 2 +- secure/lib/libcrypto/man/man3/DH_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new.3 | 2 +- secure/lib/libcrypto/man/man3/DH_new_by_nid.3 | 2 +- secure/lib/libcrypto/man/man3/DH_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DH_size.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_SIG_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_do_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_dup_DH.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_generate_key.3 | 2 +- .../libcrypto/man/man3/DSA_generate_parameters.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_get0_pqg.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_new.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_sign.3 | 2 +- secure/lib/libcrypto/man/man3/DSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_get_data_mtu.3 | 2 +- secure/lib/libcrypto/man/man3/DTLS_set_timer_cb.3 | 2 +- secure/lib/libcrypto/man/man3/DTLSv1_listen.3 | 2 +- secure/lib/libcrypto/man/man3/ECDSA_SIG_new.3 | 2 +- .../lib/libcrypto/man/man3/ECPKParameters_print.3 | 2 +- .../lib/libcrypto/man/man3/EC_GFp_simple_method.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_copy.3 | 2 +- secure/lib/libcrypto/man/man3/EC_GROUP_new.3 | 2 +- .../lib/libcrypto/man/man3/EC_KEY_get_enc_flags.3 | 2 +- secure/lib/libcrypto/man/man3/EC_KEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_add.3 | 2 +- secure/lib/libcrypto/man/man3/EC_POINT_new.3 | 2 +- secure/lib/libcrypto/man/man3/ENGINE_add.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_GET_LIB.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_clear_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_error_string.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_get_error.3 | 2 +- .../libcrypto/man/man3/ERR_load_crypto_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_load_strings.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_print_errors.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_put_error.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_remove_state.3 | 2 +- secure/lib/libcrypto/man/man3/ERR_set_mark.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_BytesToKey.3 | 2 +- .../man/man3/EVP_CIPHER_CTX_get_cipher_data.3 | 2 +- .../lib/libcrypto/man/man3/EVP_CIPHER_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_DigestSignInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_DigestVerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncodeInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_EncryptInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_MD_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_OpenInit.3 | 2 +- .../lib/libcrypto/man/man3/EVP_PKEY_ASN1_METHOD.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_ctrl.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_CTX_new.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set1_pbe_pass.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_hkdf_md.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_CTX_set_scrypt_N.3 | 2 +- .../man/man3/EVP_PKEY_CTX_set_tls1_prf_md.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_asn1_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_derive.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_encrypt.3 | 2 +- .../man/man3/EVP_PKEY_get_default_digest_nid.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_keygen.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_meth_get_count.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_new.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_print_private.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_set1_RSA.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_sign.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_size.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_PKEY_verify.3 | 2 +- .../libcrypto/man/man3/EVP_PKEY_verify_recover.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SealInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_SignInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_VerifyInit.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aes.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_aria.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_bf_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_blake2b512.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_camellia.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_cast5_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_chacha20.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_des.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_desx_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_idea_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md4.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_md5.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_mdc2.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc2_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_rc4.3 | 2 +- .../lib/libcrypto/man/man3/EVP_rc5_32_12_16_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_ripemd160.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_seed_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha1.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sha3_224.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm3.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_sm4_cbc.3 | 2 +- secure/lib/libcrypto/man/man3/EVP_whirlpool.3 | 2 +- secure/lib/libcrypto/man/man3/HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/MD5.3 | 2 +- secure/lib/libcrypto/man/man3/MDC2_Init.3 | 2 +- secure/lib/libcrypto/man/man3/Makefile | 6 +- secure/lib/libcrypto/man/man3/OBJ_nid2obj.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_REQUEST_new.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_cert_to_id.3 | 2 +- .../libcrypto/man/man3/OCSP_request_add1_nonce.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_resp_find_status.3 | 2 +- .../lib/libcrypto/man/man3/OCSP_response_status.3 | 2 +- secure/lib/libcrypto/man/man3/OCSP_sendreq_new.3 | 22 +- secure/lib/libcrypto/man/man3/OPENSSL_Applink.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_LH_COMPFUNC.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_LH_stats.3 | 2 +- .../libcrypto/man/man3/OPENSSL_VERSION_NUMBER.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_config.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_fork_prepare.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_ia32cap.3 | 2 +- .../lib/libcrypto/man/man3/OPENSSL_init_crypto.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_init_ssl.3 | 2 +- .../libcrypto/man/man3/OPENSSL_instrument_bus.3 | 2 +- .../man/man3/OPENSSL_load_builtin_modules.3 | 2 +- secure/lib/libcrypto/man/man3/OPENSSL_malloc.3 | 4 +- .../lib/libcrypto/man/man3/OPENSSL_secure_malloc.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_INFO.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_LOADER.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_SEARCH.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_expect.3 | 2 +- secure/lib/libcrypto/man/man3/OSSL_STORE_open.3 | 2 +- .../man/man3/OpenSSL_add_all_algorithms.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_bytes_read_bio.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_CMS.3 | 2 +- .../libcrypto/man/man3/PEM_read_bio_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/PEM_read_bio_ex.3 | 2 +- .../libcrypto/man/man3/PEM_write_bio_CMS_stream.3 | 2 +- .../man/man3/PEM_write_bio_PKCS7_stream.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_create.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_newpass.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS12_parse.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS5_PBKDF2_HMAC.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_decrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_sign.3 | 2 +- .../lib/libcrypto/man/man3/PKCS7_sign_add_signer.3 | 2 +- secure/lib/libcrypto/man/man3/PKCS7_verify.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_generate.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_get0_master.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_new.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_DRBG_reseed.3 | 2 +- .../libcrypto/man/man3/RAND_DRBG_set_callbacks.3 | 2 +- .../lib/libcrypto/man/man3/RAND_DRBG_set_ex_data.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_add.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_bytes.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_cleanup.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_egd.3 | 2 +- secure/lib/libcrypto/man/man3/RAND_load_file.3 | 2 +- .../lib/libcrypto/man/man3/RAND_set_rand_method.3 | 2 +- secure/lib/libcrypto/man/man3/RC4_set_key.3 | 2 +- secure/lib/libcrypto/man/man3/RIPEMD160_Init.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_blinding_on.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_check_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_generate_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_get0_key.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_meth_new.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_new.3 | 2 +- .../man/man3/RSA_padding_add_PKCS1_type_1.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_print.3 | 2 +- .../lib/libcrypto/man/man3/RSA_private_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_public_encrypt.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_set_method.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_sign.3 | 2 +- .../man/man3/RSA_sign_ASN1_OCTET_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/RSA_size.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_new.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_print.3 | 2 +- secure/lib/libcrypto/man/man3/SCT_validate.3 | 2 +- secure/lib/libcrypto/man/man3/SHA256_Init.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_read_PKCS7.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_CMS.3 | 2 +- secure/lib/libcrypto/man/man3/SMIME_write_PKCS7.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CIPHER_get_name.3 | 2 +- .../man/man3/SSL_COMP_add_compression_method.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_CTX_new.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set1_prefix.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_flags.3 | 2 +- .../libcrypto/man/man3/SSL_CONF_CTX_set_ssl_ctx.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CONF_cmd_argv.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_add1_chain_cert.3 | 2 +- .../man/man3/SSL_CTX_add_extra_chain_cert.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_add_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_config.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_ctrl.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_dane_enable.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_flush_sessions.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_get0_param.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_get_verify_mode.3 | 2 +- .../man/man3/SSL_CTX_has_client_custom_ext.3 | 2 +- .../man/man3/SSL_CTX_load_verify_locations.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_new.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_sess_number.3 | 2 +- .../man/man3/SSL_CTX_sess_set_cache_size.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_sess_set_get_cb.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_sessions.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set0_CA_list.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_curves.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set1_sigalgs.3 | 2 +- .../man/man3/SSL_CTX_set1_verify_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_alpn_select_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_cert_cb.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cert_store.3 | 2 +- .../man/man3/SSL_CTX_set_cert_verify_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_cipher_list.3 | 2 +- .../man/man3/SSL_CTX_set_client_cert_cb.3 | 2 +- .../man/man3/SSL_CTX_set_client_hello_cb.3 | 2 +- .../man/man3/SSL_CTX_set_ct_validation_callback.3 | 2 +- .../man/man3/SSL_CTX_set_ctlog_list_file.3 | 2 +- .../man/man3/SSL_CTX_set_default_passwd_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_ex_data.3 | 2 +- .../man/man3/SSL_CTX_set_generate_session_id.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_info_callback.3 | 2 +- .../man/man3/SSL_CTX_set_keylog_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_max_cert_list.3 | 2 +- .../man/man3/SSL_CTX_set_min_proto_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_mode.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_msg_callback.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_num_tickets.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_options.3 | 2 +- .../man/man3/SSL_CTX_set_psk_client_callback.3 | 2 +- .../man/man3/SSL_CTX_set_quiet_shutdown.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_read_ahead.3 | 2 +- .../man/man3/SSL_CTX_set_record_padding_callback.3 | 2 +- .../man/man3/SSL_CTX_set_security_level.3 | 2 +- .../man/man3/SSL_CTX_set_session_cache_mode.3 | 2 +- .../man/man3/SSL_CTX_set_session_id_context.3 | 2 +- .../man/man3/SSL_CTX_set_session_ticket_cb.3 | 2 +- .../man/man3/SSL_CTX_set_split_send_fragment.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_set_ssl_version.3 | 2 +- .../SSL_CTX_set_stateless_cookie_generate_cb.3 | 2 +- .../lib/libcrypto/man/man3/SSL_CTX_set_timeout.3 | 2 +- .../man3/SSL_CTX_set_tlsext_servername_callback.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_status_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_ticket_key_cb.3 | 2 +- .../man/man3/SSL_CTX_set_tlsext_use_srtp.3 | 2 +- .../man/man3/SSL_CTX_set_tmp_dh_callback.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_CTX_set_verify.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_certificate.3 | 2 +- .../man/man3/SSL_CTX_use_psk_identity_hint.3 | 2 +- .../libcrypto/man/man3/SSL_CTX_use_serverinfo.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_free.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get0_hostname.3 | 2 +- .../man/man3/SSL_SESSION_get0_id_context.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get0_peer.3 | 2 +- .../man/man3/SSL_SESSION_get_compress_id.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_get_ex_data.3 | 2 +- .../man/man3/SSL_SESSION_get_protocol_version.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_get_time.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_has_ticket.3 | 2 +- .../libcrypto/man/man3/SSL_SESSION_is_resumable.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_SESSION_print.3 | 2 +- .../lib/libcrypto/man/man3/SSL_SESSION_set1_id.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_accept.3 | 2 +- .../lib/libcrypto/man/man3/SSL_alert_type_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_alloc_buffers.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_check_chain.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_clear.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_connect.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_do_handshake.3 | 2 +- .../man/man3/SSL_export_keying_material.3 | 2 +- .../libcrypto/man/man3/SSL_extension_supported.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_free.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get0_peer_scts.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_SSL_CTX.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_all_async_fds.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_ciphers.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_client_random.3 | 2 +- .../libcrypto/man/man3/SSL_get_current_cipher.3 | 2 +- .../libcrypto/man/man3/SSL_get_default_timeout.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_error.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_extms_support.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_fd.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_cert_chain.3 | 2 +- .../libcrypto/man/man3/SSL_get_peer_certificate.3 | 2 +- .../man/man3/SSL_get_peer_signature_nid.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_peer_tmp_key.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_psk_identity.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_rbio.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_session.3 | 2 +- .../libcrypto/man/man3/SSL_get_shared_sigalgs.3 | 2 +- .../lib/libcrypto/man/man3/SSL_get_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_in_init.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_key_update.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_library_init.3 | 2 +- .../libcrypto/man/man3/SSL_load_client_CA_file.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_new.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_pending.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_read.3 | 2 +- .../lib/libcrypto/man/man3/SSL_read_early_data.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_rstate_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_session_reused.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set1_host.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_bio.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_connect_state.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_fd.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_session.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_set_shutdown.3 | 2 +- .../lib/libcrypto/man/man3/SSL_set_verify_result.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_shutdown.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_state_string.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_want.3 | 2 +- secure/lib/libcrypto/man/man3/SSL_write.3 | 2 +- secure/lib/libcrypto/man/man3/UI_STRING.3 | 2 +- secure/lib/libcrypto/man/man3/UI_UTIL_read_pw.3 | 2 +- secure/lib/libcrypto/man/man3/UI_create_method.3 | 2 +- secure/lib/libcrypto/man/man3/UI_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509V3_get_d2i.3 | 2 +- secure/lib/libcrypto/man/man3/X509_ALGOR_dup.3 | 2 +- .../libcrypto/man/man3/X509_CRL_get0_by_serial.3 | 2 +- .../libcrypto/man/man3/X509_EXTENSION_set_object.3 | 2 +- secure/lib/libcrypto/man/man3/X509_LOOKUP.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_hash_dir.3 | 2 +- .../lib/libcrypto/man/man3/X509_LOOKUP_meth_new.3 | 2 +- .../man/man3/X509_NAME_ENTRY_get_object.3 | 2 +- .../man/man3/X509_NAME_add_entry_by_txt.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_get0_der.3 | 2 +- .../man/man3/X509_NAME_get_index_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/X509_NAME_print_ex.3 | 2 +- secure/lib/libcrypto/man/man3/X509_PUBKEY_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_SIG_get0.3 | 2 +- .../libcrypto/man/man3/X509_STORE_CTX_get_error.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_CTX_new.3 | 2 +- .../man/man3/X509_STORE_CTX_set_verify_cb.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_add_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509_STORE_get0_param.3 | 2 +- secure/lib/libcrypto/man/man3/X509_STORE_new.3 | 2 +- .../man/man3/X509_STORE_set_verify_cb_func.3 | 2 +- .../man/man3/X509_VERIFY_PARAM_set_flags.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_ca.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_host.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_issued.3 | 2 +- .../libcrypto/man/man3/X509_check_private_key.3 | 2 +- secure/lib/libcrypto/man/man3/X509_check_purpose.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp.3 | 2 +- secure/lib/libcrypto/man/man3/X509_cmp_time.3 | 2 +- secure/lib/libcrypto/man/man3/X509_digest.3 | 2 +- secure/lib/libcrypto/man/man3/X509_dup.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_notBefore.3 | 2 +- .../lib/libcrypto/man/man3/X509_get0_signature.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get0_uids.3 | 2 +- .../libcrypto/man/man3/X509_get_extension_flags.3 | 12 +- secure/lib/libcrypto/man/man3/X509_get_pubkey.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_serialNumber.3 | 2 +- .../lib/libcrypto/man/man3/X509_get_subject_name.3 | 2 +- secure/lib/libcrypto/man/man3/X509_get_version.3 | 2 +- secure/lib/libcrypto/man/man3/X509_new.3 | 2 +- secure/lib/libcrypto/man/man3/X509_sign.3 | 2 +- secure/lib/libcrypto/man/man3/X509_verify_cert.3 | 2 +- .../lib/libcrypto/man/man3/X509v3_get_ext_by_NID.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_DHparams.3 | 2 +- .../libcrypto/man/man3/d2i_PKCS8PrivateKey_bio.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_PrivateKey.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_SSL_SESSION.3 | 2 +- secure/lib/libcrypto/man/man3/d2i_X509.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_CMS_bio_stream.3 | 2 +- .../lib/libcrypto/man/man3/i2d_PKCS7_bio_stream.3 | 2 +- secure/lib/libcrypto/man/man3/i2d_re_X509_tbs.3 | 2 +- secure/lib/libcrypto/man/man3/o2i_SCT_LIST.3 | 2 +- secure/lib/libcrypto/man/man5/x509v3_config.5 | 2 +- secure/lib/libcrypto/man/man7/Ed25519.7 | 2 +- secure/lib/libcrypto/man/man7/RAND.7 | 2 +- secure/lib/libcrypto/man/man7/RAND_DRBG.7 | 2 +- secure/lib/libcrypto/man/man7/RSA-PSS.7 | 2 +- secure/lib/libcrypto/man/man7/SM2.7 | 2 +- secure/lib/libcrypto/man/man7/X25519.7 | 2 +- secure/lib/libcrypto/man/man7/bio.7 | 2 +- secure/lib/libcrypto/man/man7/ct.7 | 2 +- secure/lib/libcrypto/man/man7/des_modes.7 | 2 +- secure/lib/libcrypto/man/man7/evp.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store-file.7 | 2 +- secure/lib/libcrypto/man/man7/ossl_store.7 | 2 +- .../lib/libcrypto/man/man7/passphrase-encoding.7 | 2 +- secure/lib/libcrypto/man/man7/proxy-certificates.7 | 2 +- secure/lib/libcrypto/man/man7/scrypt.7 | 2 +- secure/lib/libcrypto/man/man7/ssl.7 | 2 +- secure/lib/libcrypto/man/man7/x509.7 | 2 +- secure/usr.bin/openssl/Makefile.man | 4 + secure/usr.bin/openssl/man/CA.pl.1 | 2 +- secure/usr.bin/openssl/man/asn1parse.1 | 2 +- secure/usr.bin/openssl/man/ca.1 | 6 +- secure/usr.bin/openssl/man/ciphers.1 | 2 +- secure/usr.bin/openssl/man/cms.1 | 6 +- secure/usr.bin/openssl/man/crl.1 | 2 +- secure/usr.bin/openssl/man/crl2pkcs7.1 | 6 +- secure/usr.bin/openssl/man/dgst.1 | 6 +- secure/usr.bin/openssl/man/dhparam.1 | 2 +- secure/usr.bin/openssl/man/dsa.1 | 8 +- secure/usr.bin/openssl/man/dsaparam.1 | 2 +- secure/usr.bin/openssl/man/ec.1 | 8 +- secure/usr.bin/openssl/man/ecparam.1 | 2 +- secure/usr.bin/openssl/man/enc.1 | 6 +- secure/usr.bin/openssl/man/engine.1 | 2 +- secure/usr.bin/openssl/man/errstr.1 | 2 +- secure/usr.bin/openssl/man/gendsa.1 | 2 +- secure/usr.bin/openssl/man/genpkey.1 | 6 +- secure/usr.bin/openssl/man/genrsa.1 | 6 +- secure/usr.bin/openssl/man/list.1 | 2 +- secure/usr.bin/openssl/man/nseq.1 | 2 +- secure/usr.bin/openssl/man/ocsp.1 | 2 +- secure/usr.bin/openssl/man/openssl.1 | 2 +- secure/usr.bin/openssl/man/passwd.1 | 2 +- secure/usr.bin/openssl/man/pkcs12.1 | 16 +- secure/usr.bin/openssl/man/pkcs7.1 | 2 +- secure/usr.bin/openssl/man/pkcs8.1 | 8 +- secure/usr.bin/openssl/man/pkey.1 | 8 +- secure/usr.bin/openssl/man/pkeyparam.1 | 2 +- secure/usr.bin/openssl/man/pkeyutl.1 | 6 +- secure/usr.bin/openssl/man/prime.1 | 2 +- secure/usr.bin/openssl/man/rand.1 | 2 +- secure/usr.bin/openssl/man/req.1 | 8 +- secure/usr.bin/openssl/man/rsa.1 | 8 +- secure/usr.bin/openssl/man/rsautl.1 | 2 +- secure/usr.bin/openssl/man/s_client.1 | 6 +- secure/usr.bin/openssl/man/s_server.1 | 6 +- secure/usr.bin/openssl/man/s_time.1 | 2 +- secure/usr.bin/openssl/man/sess_id.1 | 2 +- secure/usr.bin/openssl/man/smime.1 | 6 +- secure/usr.bin/openssl/man/speed.1 | 2 +- secure/usr.bin/openssl/man/spkac.1 | 6 +- secure/usr.bin/openssl/man/srp.1 | 2 +- secure/usr.bin/openssl/man/storeutl.1 | 6 +- secure/usr.bin/openssl/man/ts.1 | 6 +- secure/usr.bin/openssl/man/tsget.1 | 2 +- secure/usr.bin/openssl/man/verify.1 | 2 +- secure/usr.bin/openssl/man/version.1 | 2 +- secure/usr.bin/openssl/man/x509.1 | 6 +- 539 files changed, 642 insertions(+), 1167 deletions(-) diff --git a/secure/lib/libcrypto/Makefile.inc b/secure/lib/libcrypto/Makefile.inc index f70a506ed5a9..d60b9ca78eb3 100644 --- a/secure/lib/libcrypto/Makefile.inc +++ b/secure/lib/libcrypto/Makefile.inc @@ -3,8 +3,8 @@ .include # OpenSSL version used for manual page generation -OPENSSL_VER= 1.1.1i -OPENSSL_DATE= 2020-12-08 +OPENSSL_VER= 1.1.1j +OPENSSL_DATE= 2021-02-16 LCRYPTO_SRC= ${SRCTOP}/crypto/openssl LCRYPTO_DOC= ${LCRYPTO_SRC}/doc diff --git a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 index 048d4fc2b64b..2720754cf9e8 100644 --- a/secure/lib/libcrypto/man/man3/ADMISSIONS.3 +++ b/secure/lib/libcrypto/man/man3/ADMISSIONS.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ADMISSIONS 3" -.TH ADMISSIONS 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ADMISSIONS 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 index 135a622a91c8..2daf11f19a0d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_INTEGER_get_int64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_INTEGER_GET_INT64 3" -.TH ASN1_INTEGER_GET_INT64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_INTEGER_GET_INT64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 index 9ac1969ef577..f45f3fdc98ab 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_ITEM_lookup.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_ITEM_LOOKUP 3" -.TH ASN1_ITEM_LOOKUP 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_ITEM_LOOKUP 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 index f5a4c0f68510..69678622d9fa 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_OBJECT_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_NEW 3" -.TH ASN1_OBJECT_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_OBJECT_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 index 9b9613637d3a..9b9393cc5290 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_TABLE_add.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_TABLE_ADD 3" -.TH ASN1_STRING_TABLE_ADD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_TABLE_ADD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 index ad33ca4b7b2a..ca15f898e6a8 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_length.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_LENGTH 3" -.TH ASN1_STRING_LENGTH 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_LENGTH 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 index f2c2afe53015..e4f6859c186d 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_NEW 3" -.TH ASN1_STRING_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 index d2394acf12e7..fbfcf517275f 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_STRING_print_ex.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_PRINT_EX 3" -.TH ASN1_STRING_PRINT_EX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_STRING_PRINT_EX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 index 562929c6cd9f..00b72c375820 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TIME_set.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TIME_SET 3" -.TH ASN1_TIME_SET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TIME_SET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 index 930a32de6d33..4845c5280b6b 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_TYPE_get.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_TYPE_GET 3" -.TH ASN1_TYPE_GET 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_TYPE_GET 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 index c139f0a79d4a..ce95ffd0fc29 100644 --- a/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 +++ b/secure/lib/libcrypto/man/man3/ASN1_generate_nconf.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_GENERATE_NCONF 3" -.TH ASN1_GENERATE_NCONF 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASN1_GENERATE_NCONF 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 index b09d540d97e5..b761db6b5b7a 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_WAIT_CTX_new.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_WAIT_CTX_NEW 3" -.TH ASYNC_WAIT_CTX_NEW 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_WAIT_CTX_NEW 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 index 0917cbf28d0a..03b06aff8fec 100644 --- a/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 +++ b/secure/lib/libcrypto/man/man3/ASYNC_start_job.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASYNC_START_JOB 3" -.TH ASYNC_START_JOB 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH ASYNC_START_JOB 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BF_encrypt.3 b/secure/lib/libcrypto/man/man3/BF_encrypt.3 index 1e67cea75097..8916feee640f 100644 --- a/secure/lib/libcrypto/man/man3/BF_encrypt.3 +++ b/secure/lib/libcrypto/man/man3/BF_encrypt.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BF_ENCRYPT 3" -.TH BF_ENCRYPT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BF_ENCRYPT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 index 3f0f0cfd2170..0dbedbf16b9d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDR.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDR.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDR 3" -.TH BIO_ADDR 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDR 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 index 5df20d27fde8..fb1d199796cb 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ADDRINFO.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ADDRINFO 3" -.TH BIO_ADDRINFO 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_ADDRINFO 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_connect.3 b/secure/lib/libcrypto/man/man3/BIO_connect.3 index f9fdd9b15d37..44b80366360d 100644 --- a/secure/lib/libcrypto/man/man3/BIO_connect.3 +++ b/secure/lib/libcrypto/man/man3/BIO_connect.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CONNECT 3" -.TH BIO_CONNECT 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_CONNECT 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 index 487f6d192c8c..7d90a1a40792 100644 --- a/secure/lib/libcrypto/man/man3/BIO_ctrl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_ctrl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_CTRL 3" -.TH BIO_CTRL 3 "2021-01-21" "1.1.1i" "OpenSSL" +.TH BIO_CTRL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 index d42d2eb6c9ec..39b94d930d17 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_base64.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_base64.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BASE64 3" -.TH BIO_F_BASE64 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BASE64 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 index 9b4bc1c800c5..61cfe1eec579 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_buffer.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_BUFFER 3" -.TH BIO_F_BUFFER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_BUFFER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 index a26d0f5cca2f..33e6f6c95c6e 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_cipher.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_CIPHER 3" -.TH BIO_F_CIPHER 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_CIPHER 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_md.3 b/secure/lib/libcrypto/man/man3/BIO_f_md.3 index ba7f598a14fc..04c3fdaecc20 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_md.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_md.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_MD 3" -.TH BIO_F_MD 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_MD 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_null.3 b/secure/lib/libcrypto/man/man3/BIO_f_null.3 index 44d680123203..21225c1e17fe 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_null.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_null.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_NULL 3" -.TH BIO_F_NULL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_NULL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 index ce95b5d29fd3..02b2bcd5e714 100644 --- a/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 +++ b/secure/lib/libcrypto/man/man3/BIO_f_ssl.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_F_SSL 3" -.TH BIO_F_SSL 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_F_SSL 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_find_type.3 b/secure/lib/libcrypto/man/man3/BIO_find_type.3 index 8ed77ea8ae03..579435574865 100644 --- a/secure/lib/libcrypto/man/man3/BIO_find_type.3 +++ b/secure/lib/libcrypto/man/man3/BIO_find_type.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_FIND_TYPE 3" -.TH BIO_FIND_TYPE 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_FIND_TYPE 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_data.3 b/secure/lib/libcrypto/man/man3/BIO_get_data.3 index dc9eb33aba84..df2d8f5667dd 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_data.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_data.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_DATA 3" -.TH BIO_GET_DATA 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_DATA 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 index a1ff83189d93..31914a912318 100644 --- a/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 +++ b/secure/lib/libcrypto/man/man3/BIO_get_ex_new_index.3 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_GET_EX_NEW_INDEX 3" -.TH BIO_GET_EX_NEW_INDEX 3 "2020-12-08" "1.1.1i" "OpenSSL" +.TH BIO_GET_EX_NEW_INDEX 3 "2021-02-16" "1.1.1j" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 b/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 deleted file mode 100644 index 487f6d192c8c..000000000000 --- a/secure/lib/libcrypto/man/man3/BIO_get_ktls_recv.3 +++ /dev/null @@ -1,280 +0,0 @@ -.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -. ds C` -. ds C' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is >0, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.\" -.\" Avoid warning from groff about undefined register 'F'. -.de IX -.. -.nr rF 0 *** 7777 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:21:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CDE8B54F61F; Thu, 18 Feb 2021 04:21:49 +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 4Dh1kP0CCwz4rKt; Thu, 18 Feb 2021 04:21:49 +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 E5D7311D6B; Thu, 18 Feb 2021 04:21:48 +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 11I4Lmff070652; Thu, 18 Feb 2021 04:21:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I4LmYu070650; Thu, 18 Feb 2021 04:21:48 GMT (envelope-from git) Date: Thu, 18 Feb 2021 04:21:48 GMT Message-Id: <202102180421.11I4LmYu070650@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: f7e7c4d4062f - releng/13.0 - OpenSSL: Remove obsolete include directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: f7e7c4d4062f2710b10d7b6843a0ab81fd82f402 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:21:51 -0000 The branch releng/13.0 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=f7e7c4d4062f2710b10d7b6843a0ab81fd82f402 commit f7e7c4d4062f2710b10d7b6843a0ab81fd82f402 Author: Jung-uk Kim AuthorDate: 2021-02-17 03:53:37 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 00:15:49 +0000 OpenSSL: Remove obsolete include directory This directory was deprecated since OpenSSL 1.1.1e. https://github.com/openssl/openssl/pull/9681 (cherry picked from commit b84081606110af6b5df764e3568c0271a5699daa) (cherry picked from commit 36c368d91c22e84e2e0d0b570c3af45da61c1bc6) Approved by: re (gjb) --- .../include/internal/__DECC_INCLUDE_EPILOGUE.H | 16 - .../include/internal/__DECC_INCLUDE_PROLOGUE.H | 20 - crypto/openssl/crypto/include/internal/aria.h | 50 --- crypto/openssl/crypto/include/internal/asn1_int.h | 113 ------ crypto/openssl/crypto/include/internal/async.h | 15 - .../openssl/crypto/include/internal/bn_conf.h.in | 27 -- crypto/openssl/crypto/include/internal/bn_dh.h | 24 -- crypto/openssl/crypto/include/internal/bn_int.h | 90 ----- crypto/openssl/crypto/include/internal/bn_srp.h | 32 -- crypto/openssl/crypto/include/internal/chacha.h | 42 -- .../openssl/crypto/include/internal/cryptlib_int.h | 35 -- crypto/openssl/crypto/include/internal/ctype.h | 82 ---- .../openssl/crypto/include/internal/dso_conf.h.in | 31 -- crypto/openssl/crypto/include/internal/ec_int.h | 53 --- crypto/openssl/crypto/include/internal/engine.h | 20 - crypto/openssl/crypto/include/internal/err_int.h | 19 - crypto/openssl/crypto/include/internal/evp_int.h | 442 --------------------- crypto/openssl/crypto/include/internal/lhash.h | 15 - .../openssl/crypto/include/internal/md32_common.h | 256 ------------ crypto/openssl/crypto/include/internal/objects.h | 12 - crypto/openssl/crypto/include/internal/poly1305.h | 21 - crypto/openssl/crypto/include/internal/rand_int.h | 134 ------- crypto/openssl/crypto/include/internal/sha.h | 19 - crypto/openssl/crypto/include/internal/siphash.h | 25 -- crypto/openssl/crypto/include/internal/sm2.h | 78 ---- crypto/openssl/crypto/include/internal/sm2err.h | 65 --- crypto/openssl/crypto/include/internal/sm3.h | 39 -- crypto/openssl/crypto/include/internal/sm4.h | 37 -- crypto/openssl/crypto/include/internal/store.h | 10 - crypto/openssl/crypto/include/internal/store_int.h | 26 -- crypto/openssl/crypto/include/internal/x509_int.h | 286 ------------- secure/lib/libcrypto/Makefile.inc | 1 - 32 files changed, 2135 deletions(-) diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H deleted file mode 100644 index c350018ad190..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_EPILOGUE.H +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* restore state. Must correspond to the save in __decc_include_prologue.h */ -#pragma names restore diff --git a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H b/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H deleted file mode 100644 index 9a9c777f93f8..000000000000 --- a/crypto/openssl/crypto/include/internal/__DECC_INCLUDE_PROLOGUE.H +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This file is only used by HP C on VMS, and is included automatically - * after each header file from this directory - */ - -/* save state */ -#pragma names save -/* have the compiler shorten symbols larger than 31 chars to 23 chars - * followed by a 8 hex char CRC - */ -#pragma names as_is,shortened diff --git a/crypto/openssl/crypto/include/internal/aria.h b/crypto/openssl/crypto/include/internal/aria.h deleted file mode 100644 index 355abe539805..000000000000 --- a/crypto/openssl/crypto/include/internal/aria.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved. - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - - /* Copyright (c) 2017 National Security Research Institute. All rights reserved. */ - -#ifndef HEADER_ARIA_H -# define HEADER_ARIA_H - -# include - -# ifdef OPENSSL_NO_ARIA -# error ARIA is disabled. -# endif - -# define ARIA_ENCRYPT 1 -# define ARIA_DECRYPT 0 - -# define ARIA_BLOCK_SIZE 16 /* Size of each encryption/decryption block */ -# define ARIA_MAX_KEYS 17 /* Number of keys needed in the worst case */ - -typedef union { - unsigned char c[ARIA_BLOCK_SIZE]; - unsigned int u[ARIA_BLOCK_SIZE / sizeof(unsigned int)]; -} ARIA_u128; - -typedef unsigned char ARIA_c128[ARIA_BLOCK_SIZE]; - -struct aria_key_st { - ARIA_u128 rd_key[ARIA_MAX_KEYS]; - unsigned int rounds; -}; -typedef struct aria_key_st ARIA_KEY; - - -int aria_set_encrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); -int aria_set_decrypt_key(const unsigned char *userKey, const int bits, - ARIA_KEY *key); - -void aria_encrypt(const unsigned char *in, unsigned char *out, - const ARIA_KEY *key); - -#endif diff --git a/crypto/openssl/crypto/include/internal/asn1_int.h b/crypto/openssl/crypto/include/internal/asn1_int.h deleted file mode 100644 index 9c9b4d897456..000000000000 --- a/crypto/openssl/crypto/include/internal/asn1_int.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal ASN1 structures and functions: not for application use */ - -/* ASN1 public key method structure */ - -struct evp_pkey_asn1_method_st { - int pkey_id; - int pkey_base_id; - unsigned long pkey_flags; - char *pem_str; - char *info; - int (*pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub); - int (*pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk); - int (*pub_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*pub_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*priv_decode) (EVP_PKEY *pk, const PKCS8_PRIV_KEY_INFO *p8inf); - int (*priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk); - int (*priv_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*pkey_size) (const EVP_PKEY *pk); - int (*pkey_bits) (const EVP_PKEY *pk); - int (*pkey_security_bits) (const EVP_PKEY *pk); - int (*param_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*param_encode) (const EVP_PKEY *pkey, unsigned char **pder); - int (*param_missing) (const EVP_PKEY *pk); - int (*param_copy) (EVP_PKEY *to, const EVP_PKEY *from); - int (*param_cmp) (const EVP_PKEY *a, const EVP_PKEY *b); - int (*param_print) (BIO *out, const EVP_PKEY *pkey, int indent, - ASN1_PCTX *pctx); - int (*sig_print) (BIO *out, - const X509_ALGOR *sigalg, const ASN1_STRING *sig, - int indent, ASN1_PCTX *pctx); - void (*pkey_free) (EVP_PKEY *pkey); - int (*pkey_ctrl) (EVP_PKEY *pkey, int op, long arg1, void *arg2); - /* Legacy functions for old PEM */ - int (*old_priv_decode) (EVP_PKEY *pkey, - const unsigned char **pder, int derlen); - int (*old_priv_encode) (const EVP_PKEY *pkey, unsigned char **pder); - /* Custom ASN1 signature verification */ - int (*item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey); - int (*item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, - X509_ALGOR *alg1, X509_ALGOR *alg2, - ASN1_BIT_STRING *sig); - int (*siginf_set) (X509_SIG_INFO *siginf, const X509_ALGOR *alg, - const ASN1_STRING *sig); - /* Check */ - int (*pkey_check) (const EVP_PKEY *pk); - int (*pkey_public_check) (const EVP_PKEY *pk); - int (*pkey_param_check) (const EVP_PKEY *pk); - /* Get/set raw private/public key data */ - int (*set_priv_key) (EVP_PKEY *pk, const unsigned char *priv, size_t len); - int (*set_pub_key) (EVP_PKEY *pk, const unsigned char *pub, size_t len); - int (*get_priv_key) (const EVP_PKEY *pk, unsigned char *priv, size_t *len); - int (*get_pub_key) (const EVP_PKEY *pk, unsigned char *pub, size_t *len); -} /* EVP_PKEY_ASN1_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD) - -extern const EVP_PKEY_ASN1_METHOD cmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dh_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dhx_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD dsa_asn1_meths[5]; -extern const EVP_PKEY_ASN1_METHOD eckey_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ecx448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD ed448_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD sm2_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD poly1305_asn1_meth; - -extern const EVP_PKEY_ASN1_METHOD hmac_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD rsa_asn1_meths[2]; -extern const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth; -extern const EVP_PKEY_ASN1_METHOD siphash_asn1_meth; - -/* - * These are used internally in the ASN1_OBJECT to keep track of whether the - * names and data need to be free()ed - */ -# define ASN1_OBJECT_FLAG_DYNAMIC 0x01/* internal use */ -# define ASN1_OBJECT_FLAG_CRITICAL 0x02/* critical x509v3 object id */ -# define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04/* internal use */ -# define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08/* internal use */ -struct asn1_object_st { - const char *sn, *ln; - int nid; - int length; - const unsigned char *data; /* data remains const after init */ - int flags; /* Should we free this one */ -}; - -/* ASN1 print context structure */ - -struct asn1_pctx_st { - unsigned long flags; - unsigned long nm_flags; - unsigned long cert_flags; - unsigned long oid_flags; - unsigned long str_flags; -} /* ASN1_PCTX */ ; - -int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb); diff --git a/crypto/openssl/crypto/include/internal/async.h b/crypto/openssl/crypto/include/internal/async.h deleted file mode 100644 index dc8e937b0ced..000000000000 --- a/crypto/openssl/crypto/include/internal/async.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -int async_init(void); -void async_deinit(void); -void async_delete_thread_state(void); - diff --git a/crypto/openssl/crypto/include/internal/bn_conf.h.in b/crypto/openssl/crypto/include/internal/bn_conf.h.in deleted file mode 100644 index ec6e4f6c1b5e..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_conf.h.in +++ /dev/null @@ -1,27 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_CONF_H -# define HEADER_BN_CONF_H - -/* - * The contents of this file are not used in the UEFI build, as - * both 32-bit and 64-bit builds are supported from a single run - * of the Configure script. - */ - -/* Should we define BN_DIV2W here? */ - -/* Only one for the following should be defined */ -{- $config{b64l} ? "#define" : "#undef" -} SIXTY_FOUR_BIT_LONG -{- $config{b64} ? "#define" : "#undef" -} SIXTY_FOUR_BIT -{- $config{b32} ? "#define" : "#undef" -} THIRTY_TWO_BIT - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_dh.h b/crypto/openssl/crypto/include/internal/bn_dh.h deleted file mode 100644 index 70ebca28753c..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_dh.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#define declare_dh_bn(x) \ - extern const BIGNUM _bignum_dh##x##_p; \ - extern const BIGNUM _bignum_dh##x##_g; \ - extern const BIGNUM _bignum_dh##x##_q; - -declare_dh_bn(1024_160) -declare_dh_bn(2048_224) -declare_dh_bn(2048_256) - -extern const BIGNUM _bignum_ffdhe2048_p; -extern const BIGNUM _bignum_ffdhe3072_p; -extern const BIGNUM _bignum_ffdhe4096_p; -extern const BIGNUM _bignum_ffdhe6144_p; -extern const BIGNUM _bignum_ffdhe8192_p; -extern const BIGNUM _bignum_const_2; diff --git a/crypto/openssl/crypto/include/internal/bn_int.h b/crypto/openssl/crypto/include/internal/bn_int.h deleted file mode 100644 index 30be7efe14d8..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_int.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_BN_INT_H -# define HEADER_BN_INT_H - -# include -# include - -BIGNUM *bn_wexpand(BIGNUM *a, int words); -BIGNUM *bn_expand2(BIGNUM *a, int words); - -void bn_correct_top(BIGNUM *a); - -/* - * Determine the modified width-(w+1) Non-Adjacent Form (wNAF) of 'scalar'. - * This is an array r[] of values that are either zero or odd with an - * absolute value less than 2^w satisfying scalar = \sum_j r[j]*2^j where at - * most one of any w+1 consecutive digits is non-zero with the exception that - * the most significant digit may be only w-1 zeros away from that next - * non-zero digit. - */ -signed char *bn_compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len); - -int bn_get_top(const BIGNUM *a); - -int bn_get_dmax(const BIGNUM *a); - -/* Set all words to zero */ -void bn_set_all_zero(BIGNUM *a); - -/* - * Copy the internal BIGNUM words into out which holds size elements (and size - * must be bigger than top) - */ -int bn_copy_words(BN_ULONG *out, const BIGNUM *in, int size); - -BN_ULONG *bn_get_words(const BIGNUM *a); - -/* - * Set the internal data words in a to point to words which contains size - * elements. The BN_FLG_STATIC_DATA flag is set - */ -void bn_set_static_words(BIGNUM *a, const BN_ULONG *words, int size); - -/* - * Copy words into the BIGNUM |a|, reallocating space as necessary. - * The negative flag of |a| is not modified. - * Returns 1 on success and 0 on failure. - */ -/* - * |num_words| is int because bn_expand2 takes an int. This is an internal - * function so we simply trust callers not to pass negative values. - */ -int bn_set_words(BIGNUM *a, const BN_ULONG *words, int num_words); - -/* - * Some BIGNUM functions assume most significant limb to be non-zero, which - * is customarily arranged by bn_correct_top. Output from below functions - * is not processed with bn_correct_top, and for this reason it may not be - * returned out of public API. It may only be passed internally into other - * functions known to support non-minimal or zero-padded BIGNUMs. Even - * though the goal is to facilitate constant-time-ness, not each subroutine - * is constant-time by itself. They all have pre-conditions, consult source - * code... - */ -int bn_mul_mont_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - BN_MONT_CTX *mont, BN_CTX *ctx); -int bn_to_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_from_mont_fixed_top(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, - BN_CTX *ctx); -int bn_mod_add_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mod_sub_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, - const BIGNUM *m); -int bn_mul_fixed_top(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); -int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); -int bn_lshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_rshift_fixed_top(BIGNUM *r, const BIGNUM *a, int n); -int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, - const BIGNUM *d, BN_CTX *ctx); - -#endif diff --git a/crypto/openssl/crypto/include/internal/bn_srp.h b/crypto/openssl/crypto/include/internal/bn_srp.h deleted file mode 100644 index d4b282a6bbbe..000000000000 --- a/crypto/openssl/crypto/include/internal/bn_srp.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef OPENSSL_NO_SRP - -extern const BIGNUM bn_group_1024; - -extern const BIGNUM bn_group_1536; - -extern const BIGNUM bn_group_2048; - -extern const BIGNUM bn_group_3072; - -extern const BIGNUM bn_group_4096; - -extern const BIGNUM bn_group_6144; - -extern const BIGNUM bn_group_8192; - -extern const BIGNUM bn_generator_19; - -extern const BIGNUM bn_generator_5; - -extern const BIGNUM bn_generator_2; - -#endif diff --git a/crypto/openssl/crypto/include/internal/chacha.h b/crypto/openssl/crypto/include/internal/chacha.h deleted file mode 100644 index 67243f222801..000000000000 --- a/crypto/openssl/crypto/include/internal/chacha.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_CHACHA_H -#define HEADER_CHACHA_H - -#include - -/* - * ChaCha20_ctr32 encrypts |len| bytes from |inp| with the given key and - * nonce and writes the result to |out|, which may be equal to |inp|. - * The |key| is not 32 bytes of verbatim key material though, but the - * said material collected into 8 32-bit elements array in host byte - * order. Same approach applies to nonce: the |counter| argument is - * pointer to concatenated nonce and counter values collected into 4 - * 32-bit elements. This, passing crypto material collected into 32-bit - * elements as opposite to passing verbatim byte vectors, is chosen for - * efficiency in multi-call scenarios. - */ -void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, - size_t len, const unsigned int key[8], - const unsigned int counter[4]); -/* - * You can notice that there is no key setup procedure. Because it's - * as trivial as collecting bytes into 32-bit elements, it's reckoned - * that below macro is sufficient. - */ -#define CHACHA_U8TOU32(p) ( \ - ((unsigned int)(p)[0]) | ((unsigned int)(p)[1]<<8) | \ - ((unsigned int)(p)[2]<<16) | ((unsigned int)(p)[3]<<24) ) - -#define CHACHA_KEY_SIZE 32 -#define CHACHA_CTR_SIZE 16 -#define CHACHA_BLK_SIZE 64 - -#endif diff --git a/crypto/openssl/crypto/include/internal/cryptlib_int.h b/crypto/openssl/crypto/include/internal/cryptlib_int.h deleted file mode 100644 index 38b5dac9a364..000000000000 --- a/crypto/openssl/crypto/include/internal/cryptlib_int.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "internal/cryptlib.h" - -/* This file is not scanned by mkdef.pl, whereas cryptlib.h is */ - -struct thread_local_inits_st { - int async; - int err_state; - int rand; -}; - -int ossl_init_thread_start(uint64_t opts); - -/* - * OPENSSL_INIT flags. The primary list of these is in crypto.h. Flags below - * are those omitted from crypto.h because they are "reserved for internal - * use". - */ -# define OPENSSL_INIT_ZLIB 0x00010000L -# define OPENSSL_INIT_BASE_ONLY 0x00040000L - -/* OPENSSL_INIT_THREAD flags */ -# define OPENSSL_INIT_THREAD_ASYNC 0x01 -# define OPENSSL_INIT_THREAD_ERR_STATE 0x02 -# define OPENSSL_INIT_THREAD_RAND 0x04 - -void ossl_malloc_setup_failures(void); diff --git a/crypto/openssl/crypto/include/internal/ctype.h b/crypto/openssl/crypto/include/internal/ctype.h deleted file mode 100644 index 9f3a58339c4f..000000000000 --- a/crypto/openssl/crypto/include/internal/ctype.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* - * This version of ctype.h provides a standardised and platform - * independent implementation that supports seven bit ASCII characters. - * The specific intent is to not pass extended ASCII characters (> 127) - * even if the host operating system would. - * - * There is EBCDIC support included for machines which use this. However, - * there are a number of concerns about how well EBCDIC is supported - * throughout the rest of the source code. Refer to issue #4154 for - * details. - */ -#ifndef INTERNAL_CTYPE_H -# define INTERNAL_CTYPE_H - -# define CTYPE_MASK_lower 0x1 -# define CTYPE_MASK_upper 0x2 -# define CTYPE_MASK_digit 0x4 -# define CTYPE_MASK_space 0x8 -# define CTYPE_MASK_xdigit 0x10 -# define CTYPE_MASK_blank 0x20 -# define CTYPE_MASK_cntrl 0x40 -# define CTYPE_MASK_graph 0x80 -# define CTYPE_MASK_print 0x100 -# define CTYPE_MASK_punct 0x200 -# define CTYPE_MASK_base64 0x400 -# define CTYPE_MASK_asn1print 0x800 - -# define CTYPE_MASK_alpha (CTYPE_MASK_lower | CTYPE_MASK_upper) -# define CTYPE_MASK_alnum (CTYPE_MASK_alpha | CTYPE_MASK_digit) - -/* - * The ascii mask assumes that any other classification implies that - * the character is ASCII and that there are no ASCII characters - * that aren't in any of the classifications. - * - * This assumption holds at the moment, but it might not in the future. - */ -# define CTYPE_MASK_ascii (~0) - -# ifdef CHARSET_EBCDIC -int ossl_toascii(int c); -int ossl_fromascii(int c); -# else -# define ossl_toascii(c) (c) -# define ossl_fromascii(c) (c) -# endif -int ossl_ctype_check(int c, unsigned int mask); -int ossl_tolower(int c); -int ossl_toupper(int c); - -int ascii_isdigit(const char inchar); - -# define ossl_isalnum(c) (ossl_ctype_check((c), CTYPE_MASK_alnum)) -# define ossl_isalpha(c) (ossl_ctype_check((c), CTYPE_MASK_alpha)) -# ifdef CHARSET_EBCDIC -# define ossl_isascii(c) (ossl_ctype_check((c), CTYPE_MASK_ascii)) -# else -# define ossl_isascii(c) (((c) & ~127) == 0) -# endif -# define ossl_isblank(c) (ossl_ctype_check((c), CTYPE_MASK_blank)) -# define ossl_iscntrl(c) (ossl_ctype_check((c), CTYPE_MASK_cntrl)) -# define ossl_isdigit(c) (ossl_ctype_check((c), CTYPE_MASK_digit)) -# define ossl_isgraph(c) (ossl_ctype_check((c), CTYPE_MASK_graph)) -# define ossl_islower(c) (ossl_ctype_check((c), CTYPE_MASK_lower)) -# define ossl_isprint(c) (ossl_ctype_check((c), CTYPE_MASK_print)) -# define ossl_ispunct(c) (ossl_ctype_check((c), CTYPE_MASK_punct)) -# define ossl_isspace(c) (ossl_ctype_check((c), CTYPE_MASK_space)) -# define ossl_isupper(c) (ossl_ctype_check((c), CTYPE_MASK_upper)) -# define ossl_isxdigit(c) (ossl_ctype_check((c), CTYPE_MASK_xdigit)) -# define ossl_isbase64(c) (ossl_ctype_check((c), CTYPE_MASK_base64)) -# define ossl_isasn1print(c) (ossl_ctype_check((c), CTYPE_MASK_asn1print)) - -#endif diff --git a/crypto/openssl/crypto/include/internal/dso_conf.h.in b/crypto/openssl/crypto/include/internal/dso_conf.h.in deleted file mode 100644 index 2a76818b50d9..000000000000 --- a/crypto/openssl/crypto/include/internal/dso_conf.h.in +++ /dev/null @@ -1,31 +0,0 @@ -{- join("\n",map { "/* $_ */" } @autowarntext) -} -/* - * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef HEADER_DSO_CONF_H -# define HEADER_DSO_CONF_H -{- # The DSO code currently always implements all functions so that no - # applications will have to worry about that from a compilation point - # of view. However, the "method"s may return zero unless that platform - # has support compiled in for them. Currently each method is enabled - # by a define "DSO_" ... we translate the "dso_scheme" config - # string entry into using the following logic; - my $scheme = uc $target{dso_scheme}; - if (!$scheme) { - $scheme = "NONE"; - } - my @macros = ( "DSO_$scheme" ); - if ($scheme eq 'DLFCN') { - @macros = ( "DSO_DLFCN", "HAVE_DLFCN_H" ); - } elsif ($scheme eq "DLFCN_NO_H") { - @macros = ( "DSO_DLFCN" ); - } - join("\n", map { "# define $_" } @macros); -} -# define DSO_EXTENSION "{- $target{dso_extension} -}" -#endif diff --git a/crypto/openssl/crypto/include/internal/ec_int.h b/crypto/openssl/crypto/include/internal/ec_int.h deleted file mode 100644 index 182c39cc8056..000000000000 --- a/crypto/openssl/crypto/include/internal/ec_int.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -/* Internal EC functions for other submodules: not for application use */ - -#ifndef HEADER_OSSL_EC_INTERNAL_H -# define HEADER_OSSL_EC_INTERNAL_H -# include - -# ifndef OPENSSL_NO_EC - -# include - -/*- - * Computes the multiplicative inverse of x in the range - * [1,EC_GROUP::order), where EC_GROUP::order is the cardinality of the - * subgroup generated by the generator G: - * - * res := x^(-1) (mod EC_GROUP::order). - * - * This function expects the following two conditions to hold: - * - the EC_GROUP order is prime, and - * - x is included in the range [1, EC_GROUP::order). - * - * This function returns 1 on success, 0 on error. - * - * If the EC_GROUP order is even, this function explicitly returns 0 as - * an error. - * In case any of the two conditions stated above is not satisfied, - * the correctness of its output is not guaranteed, even if the return - * value could still be 1 (as primality testing and a conditional modular - * reduction round on the input can be omitted by the underlying - * implementations for better SCA properties on regular input values). - */ -__owur int ec_group_do_inverse_ord(const EC_GROUP *group, BIGNUM *res, - const BIGNUM *x, BN_CTX *ctx); - -/*- - * ECDH Key Derivation Function as defined in ANSI X9.63 - */ -int ecdh_KDF_X9_63(unsigned char *out, size_t outlen, - const unsigned char *Z, size_t Zlen, - const unsigned char *sinfo, size_t sinfolen, - const EVP_MD *md); - -# endif /* OPENSSL_NO_EC */ -#endif diff --git a/crypto/openssl/crypto/include/internal/engine.h b/crypto/openssl/crypto/include/internal/engine.h deleted file mode 100644 index f80ae3ec30c9..000000000000 --- a/crypto/openssl/crypto/include/internal/engine.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include - -void engine_load_openssl_int(void); -void engine_load_devcrypto_int(void); -void engine_load_rdrand_int(void); -void engine_load_dynamic_int(void); -void engine_load_padlock_int(void); -void engine_load_capi_int(void); -void engine_load_dasync_int(void); -void engine_load_afalg_int(void); -void engine_cleanup_int(void); diff --git a/crypto/openssl/crypto/include/internal/err_int.h b/crypto/openssl/crypto/include/internal/err_int.h deleted file mode 100644 index 44ac94462750..000000000000 --- a/crypto/openssl/crypto/include/internal/err_int.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#ifndef INTERNAL_ERR_INT_H -# define INTERNAL_ERR_INT_H - -int err_load_crypto_strings_int(void); -void err_cleanup(void); -void err_delete_thread_state(void); -int err_shelve_state(void **); -void err_unshelve_state(void *); - -#endif diff --git a/crypto/openssl/crypto/include/internal/evp_int.h b/crypto/openssl/crypto/include/internal/evp_int.h deleted file mode 100644 index d86aed36f075..000000000000 --- a/crypto/openssl/crypto/include/internal/evp_int.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include -#include "internal/refcount.h" - -/* - * Don't free up md_ctx->pctx in EVP_MD_CTX_reset, use the reserved flag - * values in evp.h - */ -#define EVP_MD_CTX_FLAG_KEEP_PKEY_CTX 0x0400 - -struct evp_pkey_ctx_st { - /* Method associated with this operation */ - const EVP_PKEY_METHOD *pmeth; - /* Engine that implements this method or NULL if builtin */ - ENGINE *engine; - /* Key: may be NULL */ - EVP_PKEY *pkey; - /* Peer key for key agreement, may be NULL */ - EVP_PKEY *peerkey; - /* Actual operation */ - int operation; - /* Algorithm specific data */ - void *data; - /* Application specific data */ - void *app_data; - /* Keygen callback */ - EVP_PKEY_gen_cb *pkey_gencb; - /* implementation specific keygen data */ - int *keygen_info; - int keygen_info_count; -} /* EVP_PKEY_CTX */ ; - -#define EVP_PKEY_FLAG_DYNAMIC 1 - -struct evp_pkey_method_st { - int pkey_id; - int flags; - int (*init) (EVP_PKEY_CTX *ctx); - int (*copy) (EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src); - void (*cleanup) (EVP_PKEY_CTX *ctx); - int (*paramgen_init) (EVP_PKEY_CTX *ctx); - int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*keygen_init) (EVP_PKEY_CTX *ctx); - int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey); - int (*sign_init) (EVP_PKEY_CTX *ctx); - int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_init) (EVP_PKEY_CTX *ctx); - int (*verify) (EVP_PKEY_CTX *ctx, - const unsigned char *sig, size_t siglen, - const unsigned char *tbs, size_t tbslen); - int (*verify_recover_init) (EVP_PKEY_CTX *ctx); - int (*verify_recover) (EVP_PKEY_CTX *ctx, - unsigned char *rout, size_t *routlen, - const unsigned char *sig, size_t siglen); - int (*signctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, - EVP_MD_CTX *mctx); - int (*verifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); - int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, - EVP_MD_CTX *mctx); - int (*encrypt_init) (EVP_PKEY_CTX *ctx); - int (*encrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*decrypt_init) (EVP_PKEY_CTX *ctx); - int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, - const unsigned char *in, size_t inlen); - int (*derive_init) (EVP_PKEY_CTX *ctx); - int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); - int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2); - int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value); - int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, - const unsigned char *tbs, size_t tbslen); - int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, - size_t siglen, const unsigned char *tbs, - size_t tbslen); - int (*check) (EVP_PKEY *pkey); - int (*public_check) (EVP_PKEY *pkey); - int (*param_check) (EVP_PKEY *pkey); - - int (*digest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx); -} /* EVP_PKEY_METHOD */ ; - -DEFINE_STACK_OF_CONST(EVP_PKEY_METHOD) - -void evp_pkey_set_cb_translate(BN_GENCB *cb, EVP_PKEY_CTX *ctx); - -extern const EVP_PKEY_METHOD cmac_pkey_meth; -extern const EVP_PKEY_METHOD dh_pkey_meth; -extern const EVP_PKEY_METHOD dhx_pkey_meth; -extern const EVP_PKEY_METHOD dsa_pkey_meth; -extern const EVP_PKEY_METHOD ec_pkey_meth; -extern const EVP_PKEY_METHOD sm2_pkey_meth; -extern const EVP_PKEY_METHOD ecx25519_pkey_meth; -extern const EVP_PKEY_METHOD ecx448_pkey_meth; -extern const EVP_PKEY_METHOD ed25519_pkey_meth; -extern const EVP_PKEY_METHOD ed448_pkey_meth; -extern const EVP_PKEY_METHOD hmac_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pkey_meth; -extern const EVP_PKEY_METHOD rsa_pss_pkey_meth; -extern const EVP_PKEY_METHOD scrypt_pkey_meth; -extern const EVP_PKEY_METHOD tls1_prf_pkey_meth; -extern const EVP_PKEY_METHOD hkdf_pkey_meth; -extern const EVP_PKEY_METHOD poly1305_pkey_meth; -extern const EVP_PKEY_METHOD siphash_pkey_meth; - -struct evp_md_st { - int type; - int pkey_type; - int md_size; - unsigned long flags; - int (*init) (EVP_MD_CTX *ctx); - int (*update) (EVP_MD_CTX *ctx, const void *data, size_t count); - int (*final) (EVP_MD_CTX *ctx, unsigned char *md); - int (*copy) (EVP_MD_CTX *to, const EVP_MD_CTX *from); - int (*cleanup) (EVP_MD_CTX *ctx); - int block_size; - int ctx_size; /* how big does the ctx->md_data need to be */ - /* control function */ - int (*md_ctrl) (EVP_MD_CTX *ctx, int cmd, int p1, void *p2); -} /* EVP_MD */ ; - -struct evp_cipher_st { - int nid; - int block_size; - /* Default value for variable length ciphers */ - int key_len; - int iv_len; - /* Various flags */ - unsigned long flags; - /* init key */ - int (*init) (EVP_CIPHER_CTX *ctx, const unsigned char *key, - const unsigned char *iv, int enc); - /* encrypt/decrypt data */ - int (*do_cipher) (EVP_CIPHER_CTX *ctx, unsigned char *out, - const unsigned char *in, size_t inl); - /* cleanup ctx */ - int (*cleanup) (EVP_CIPHER_CTX *); - /* how big ctx->cipher_data needs to be */ - int ctx_size; - /* Populate a ASN1_TYPE with parameters */ - int (*set_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Get parameters from a ASN1_TYPE */ - int (*get_asn1_parameters) (EVP_CIPHER_CTX *, ASN1_TYPE *); - /* Miscellaneous operations */ - int (*ctrl) (EVP_CIPHER_CTX *, int type, int arg, void *ptr); - /* Application data */ - void *app_data; -} /* EVP_CIPHER */ ; - -/* Macros to code block cipher wrappers */ - -/* Wrapper functions for each cipher mode */ *** 1400 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:21:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4217954F622; Thu, 18 Feb 2021 04:21:54 +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 4Dh1kR4jzKz4rNv; Thu, 18 Feb 2021 04:21:51 +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 39A2712118; Thu, 18 Feb 2021 04:21: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 11I4LnjC070670; Thu, 18 Feb 2021 04:21:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I4LnB6070669; Thu, 18 Feb 2021 04:21:49 GMT (envelope-from git) Date: Thu, 18 Feb 2021 04:21:49 GMT Message-Id: <202102180421.11I4LnB6070669@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: ba4d5b4d5951 - releng/13.0 - OpenSSL: Regen assembly files for OpenSSL 1.1.1j MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: ba4d5b4d5951b1b2e3e7eb280b62a34cc95988d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:21:54 -0000 The branch releng/13.0 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=ba4d5b4d5951b1b2e3e7eb280b62a34cc95988d6 commit ba4d5b4d5951b1b2e3e7eb280b62a34cc95988d6 Author: Jung-uk Kim AuthorDate: 2021-02-17 05:35:11 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 00:16:20 +0000 OpenSSL: Regen assembly files for OpenSSL 1.1.1j (cherry picked from commit 3396647c8dc40e859609995d8f5415df43504416) (cherry picked from commit 7973db046cb057192199dcc72c64789afc160ced) Approved by: re (gjb) --- sys/crypto/openssl/arm/poly1305-armv4.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/crypto/openssl/arm/poly1305-armv4.S b/sys/crypto/openssl/arm/poly1305-armv4.S index c3041f6e2905..02d745f510b7 100644 --- a/sys/crypto/openssl/arm/poly1305-armv4.S +++ b/sys/crypto/openssl/arm/poly1305-armv4.S @@ -87,10 +87,10 @@ poly1305_init: # ifdef __thumb2__ itete eq # endif - addeq r12,r11,#(poly1305_emit-.Lpoly1305_init) - addne r12,r11,#(poly1305_emit_neon-.Lpoly1305_init) - addeq r11,r11,#(poly1305_blocks-.Lpoly1305_init) - addne r11,r11,#(poly1305_blocks_neon-.Lpoly1305_init) + addeq r12,r11,#(.Lpoly1305_emit-.Lpoly1305_init) + addne r12,r11,#(.Lpoly1305_emit_neon-.Lpoly1305_init) + addeq r11,r11,#(.Lpoly1305_blocks-.Lpoly1305_init) + addne r11,r11,#(.Lpoly1305_blocks_neon-.Lpoly1305_init) # endif # ifdef __thumb2__ orr r12,r12,#1 @ thumb-ify address @@ -292,6 +292,7 @@ poly1305_blocks: .type poly1305_emit,%function .align 5 poly1305_emit: +.Lpoly1305_emit: stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} .Lpoly1305_emit_enter: @@ -602,6 +603,7 @@ poly1305_init_neon: .type poly1305_blocks_neon,%function .align 5 poly1305_blocks_neon: +.Lpoly1305_blocks_neon: ldr ip,[r0,#36] @ is_base2_26 ands r2,r2,#-16 beq .Lno_data_neon @@ -1088,6 +1090,7 @@ poly1305_blocks_neon: .type poly1305_emit_neon,%function .align 5 poly1305_emit_neon: +.Lpoly1305_emit_neon: ldr ip,[r0,#36] @ is_base2_26 stmdb sp!,{r4,r5,r6,r7,r8,r9,r10,r11} From owner-dev-commits-src-all@freebsd.org Thu Feb 18 04:30:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B23C754FDFE; Thu, 18 Feb 2021 04:30:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh1wY21Zgz4sYJ; Thu, 18 Feb 2021 04:30:37 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.229.168]) by shaw.ca with ESMTPA id CaxTlOx27HmS3CaxVlU8Nr; Wed, 17 Feb 2021 21:30:34 -0700 X-Authority-Analysis: v=2.4 cv=MaypB7zf c=1 sm=1 tr=0 ts=602ded6b a=7AlCcx2GqMg+lh9P3BclKA==:117 a=7AlCcx2GqMg+lh9P3BclKA==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=qa6Q16uM49sA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=vUPWEWiMAAAA:8 a=EkcXrb_YAAAA:8 a=aAvXwLtq6XM9aN7SCsIA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=s3Yi14Of9AgBIP63TAoC:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id A170D1ADB; Wed, 17 Feb 2021 20:30:29 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.16.1/8.16.1) with ESMTP id 11I4URfn029789; Wed, 17 Feb 2021 20:30:27 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202102180430.11I4URfn029789@slippy.cwsent.com> X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Hartmann, O." cc: Cy Schubert , Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 8ba333e02eaa - main - libdtrace: Stop relying on lex compatibility In-reply-to: <20210218051755.42e541ae@hermann.fritz.box> References: <202102171602.11HG2FVf099522@gitrepo.freebsd.org> <20210217214505.0d4b544e@hermann.fritz.box> <202102172059.11HKxkCj012745@slippy.cwsent.com> <20210218051755.42e541ae@hermann.fritz.box> Comments: In-reply-to "Hartmann, O." message dated "Thu, 18 Feb 2021 05:17:55 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Feb 2021 20:30:27 -0800 X-CMAE-Envelope: MS4xfBG8xzifwqJADUKy1XjSz5RhE1euTjfdR6qSXCKLXEmXpwyzuNdNxxveYVwFcYs3IJDX0FlzH4aKl8u3vKjghWAOPixlCyw2EYfjPhTebeNd/bjtG4oP IkTDAOC98XMOvJit3IdljPbhGPDeR2yIa3UXvwTtVX1j4CKLJvdQcp/EYDEUHb4dkB28DTHs9idqyp9XmYGKfxM/9epyxvy8pGmeNJ4BzgSDaJ1i9z6MUC4K LmW8x/hQDapTjyPmoE/KQybUAA/kv6eKIdYFSVMsu7QJBPBgGBkAwHUzesQ5W46Qm1sc63IF2SBQRnNOpdFGRNO19suNrrDynOWfhJKGJ2tBpvTxiIqnpEEx 80sVIaYyNZiG51pBZEg2DqgCVFDn/g== X-Rspamd-Queue-Id: 4Dh1wY21Zgz4sYJ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 04:30:37 -0000 In message <20210218051755.42e541ae@hermann.fritz.box>, "Hartmann, O." writes: > --Sig_/X1LkchSIHpgyL/AopZmz9/Y > Content-Type: text/plain; charset=US-ASCII > Content-Transfer-Encoding: quoted-printable > > On Wed, 17 Feb 2021 12:59:46 -0800 > Cy Schubert wrote: > > > In message <20210217214505.0d4b544e@hermann.fritz.box>, "Hartmann, O."=20 > > writes: > > > --Sig_/xVHYogKjgyXovADc1VoD_Ap > > > Content-Type: text/plain; charset=3DUS-ASCII > > > Content-Transfer-Encoding: quoted-printable > > > > > > On Wed, 17 Feb 2021 16:02:15 GMT > > > Mark Johnston wrote: > > > =20 > > > > The branch main has been updated by markj: > > > >=3D20 > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D3D8ba333e02eaa59337a4e= > 1d5534=3D =20 > > > d4e894344c8226 =20 > > > >=3D20 > > > > commit 8ba333e02eaa59337a4e1d5534d4e894344c8226 > > > > Author: Mark Johnston > > > > AuthorDate: 2021-02-17 15:49:38 +0000 > > > > Commit: Mark Johnston > > > > CommitDate: 2021-02-17 15:57:19 +0000 > > > >=3D20 > > > > libdtrace: Stop relying on lex compatibility > > > > =3D20 > > > > It does not appear to be required, and as of commit 6b7e592c215f > > > > ("lex: Do not let input() return 0 when end-of-file is reached") = > it > > > > causes input to return 0 instead of EOF when end-of-input is reac= > hed. > > > > =3D20 > > > > PR: 253440 > > > > MFC after: 3 days > > > > Sponsored by: The FreeBSD Foundation > > > > --- > > > > cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- > > > > cddl/lib/libdtrace/Makefile | 2 -- > > > > 2 files changed, 1 insertion(+), 3 deletions(-) > > > >=3D20 > > > > diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h > > > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index > > > > f2c60a2b07d4..b3f69bb6329d 100644 --- > > > > a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ > > > > b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 += > 717,=3D =20 > > > 7 @@ extern =20 > > > > dt_pcb_t *yypcb; /* pointer to current parser control bl > ock */ e =20 > > > xtern =20 > > > > char yyintprefix; /* int token prefix for macros (+/-) */ extern > char > > > > yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdeci= > ma =20 > > > l; =20 > > > > /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; > > > > /* lex input buffer */ +extern char *yytext; /* lex input bu > =20 > > > ffer */ =20 > > > > extern int yylineno; /* lex line number */ > > > > extern int yydebug; /* lex debugging */ > > > > extern dt_node_t *yypragma; /* lex token list for control lines */ > > > > diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile > > > > index efd73751e2c0..45ca1692cf48 100644 > > > > --- a/cddl/lib/libdtrace/Makefile > > > > +++ b/cddl/lib/libdtrace/Makefile > > > > @@ -129,8 +129,6 @@ SRCS+=3D3D dis_tables.c > > > > DSRCS+=3D3D regs_x86.d > > > > .endif > > > > =3D20 > > > > -LFLAGS+=3D3D-l > > > > - > > > > YFLAGS+=3D3D-d > > > > =3D20 > > > > LIBADD=3D3D ctf elf proc pthread rtld_db > > > > _______________________________________________ > > > > dev-commits-src-main@freebsd.org mailing list > > > > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > > > > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@fr= > eebs=3D =20 > > > d.org" > > > > > > This commit breaks buildworld (also breask starting from scratch/clean = > /usr=3D > > > /obj): > > > > > > [...] > > > -MD -MF.depend.arc_os.pico -MTarc_os.pico -std=3D3Diso9899:1999 -Wno-f= > ormat-=3D > > > zero-length > > > -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-un= > init=3D > > > ialized > > > -Wno-pointer-sign -Wno-unknown-pragmas -Wno-empty-body -Wno-string-plus= > -int > > > -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value > > > -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion > > > -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wn= > o-sw=3D > > > itch-enum > > > -Wno-knr-promoted-parameter -Qunused-arguments -c > > > /usr/src/sys/contrib/openzfs/module/os/linux/zfs/arc_os.c -o arc_os.pic= > o --- > > > all_subdir_cddl/lib/libdtrace --- --- dt_names.o --- --- dt_lex.o --- I= > n fi=3D > > > le included > > > from /usr/src/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l:38: > > > /usr/src/cddl/lib/libdtrace/../../../cddl/contrib/opensolaris/lib/libdt= > race=3D > > > /common/dt_impl.h:720:14: > > > error: redeclaration of 'yytext' with a different type: 'char *' vs 'ch= > ar [=3D > > > 8192]' extern > > > char *yytext; /* lex input buffer */ ^ dt_lex.c:1075:6: note= > : pr=3D > > > evious > > > definition is here char yytext[YYLMAX]; ^ 1 error generated. *** [dt_le= > x.o]=3D > > > Error code 1 > > > > > > make[5]: stopped in /usr/src/cddl/lib/libdtrace > > > --- all_subdir_cddl/lib/libzpool --- > > > =20 > >=20 > > Restart your build without -DNO_CLEAN. > >=20 > >=20 > > I did, that worked for me. > Tried to avoid, my hardware isn't very fast and take the night to build. > > cleanworld salvaged the problem. > > Kind regards and thank you very much > > O. Hartmann In situations such as this one can surgically remove the offending file or directory in /usr/obj. Since __FreeBSD_version had already been updated, at least since my last build, going through the extra effort to save a couple of minutes wouldn't have done much. However the directory to remove would have been /usr/obj/.../cddl/contrib/openslolaris/libdtrace, or there about. The other change that forced a complete rebuild was an update to ctype.h, again causing an almost complete rebuild. In this case rather than spend the time simply rebuild from scratch. Either way you're rebuilding everything anyway. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-dev-commits-src-all@freebsd.org Thu Feb 18 06:28:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0FE6E52B35C; Thu, 18 Feb 2021 06:28: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 4Dh4Wz71Svz3Gbj; Thu, 18 Feb 2021 06:27: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 E3AA8138C4; Thu, 18 Feb 2021 06:27: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 11I6Rxe6030229; Thu, 18 Feb 2021 06:27:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I6Rxa4030228; Thu, 18 Feb 2021 06:27:59 GMT (envelope-from git) Date: Thu, 18 Feb 2021 06:27:59 GMT Message-Id: <202102180627.11I6Rxa4030228@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: 0a4f851074a3 - main - Fix another pesky missing #ifdef TCPHPTS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a4f851074a3ca74cd4859c20e7d9807b2aeca65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 06:28:00 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=0a4f851074a3ca74cd4859c20e7d9807b2aeca65 commit 0a4f851074a3ca74cd4859c20e7d9807b2aeca65 Author: Randall Stewart AuthorDate: 2021-02-18 06:27:30 +0000 Commit: Randall Stewart CommitDate: 2021-02-18 06:27:30 +0000 Fix another pesky missing #ifdef TCPHPTS --- sys/netinet/tcp_lro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 199b7f9a79a0..a8e751b67071 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -470,6 +470,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, struct mbuf *m, struct ip *ip4, } #endif +#ifdef TCPHPTS static void tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le, struct mbuf *m, int frm, int32_t tcp_data_len, @@ -520,6 +521,7 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, 0, &log, false, &tv); } } +#endif static void tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 08:39:05 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3BE9C52FA85; Thu, 18 Feb 2021 08:39:05 +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 4Dh7RF1Gtwz3QF8; Thu, 18 Feb 2021 08:39:05 +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 1E77C14F7B; Thu, 18 Feb 2021 08:39:05 +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 11I8d5S6000624; Thu, 18 Feb 2021 08:39:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I8d5PR000623; Thu, 18 Feb 2021 08:39:05 GMT (envelope-from git) Date: Thu, 18 Feb 2021 08:39:05 GMT Message-Id: <202102180839.11I8d5PR000623@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2ed689a674c3 - main - pf: Fix osfp configuration 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/main X-Git-Reftype: branch X-Git-Commit: 2ed689a674c380e48245933d5326da4dda65f94d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 08:39:05 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2ed689a674c380e48245933d5326da4dda65f94d commit 2ed689a674c380e48245933d5326da4dda65f94d Author: Kristof Provost AuthorDate: 2021-02-18 07:36:46 +0000 Commit: Kristof Provost CommitDate: 2021-02-18 07:38:28 +0000 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Reported by: delphij@ MFC after: 3 days --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index ea71664756d7..c32a961f5a0b 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1623,7 +1623,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) /* Don't allow userspace to set evaulations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ - krule->os_fingerprint = krule->os_fingerprint; + krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 08:42:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 220EA52FF03; Thu, 18 Feb 2021 08:42: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 4Dh7WP0Nlsz3QQ7; Thu, 18 Feb 2021 08:42: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 001E615726; Thu, 18 Feb 2021 08:42: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 11I8ge5f012557; Thu, 18 Feb 2021 08:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I8geGx012556; Thu, 18 Feb 2021 08:42:40 GMT (envelope-from git) Date: Thu, 18 Feb 2021 08:42:40 GMT Message-Id: <202102180842.11I8geGx012556@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: c558999977fb - stable/13 - MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c558999977fb759a64eede4cca96bee71a6a77d4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 08:42:41 -0000 The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=c558999977fb759a64eede4cca96bee71a6a77d4 commit c558999977fb759a64eede4cca96bee71a6a77d4 Author: Hans Petter Selasky AuthorDate: 2021-02-14 19:29:16 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-18 08:41:50 +0000 MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Found by: Stefan Ehmann Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4) --- sys/dev/sound/usb/uaudio.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index c2a7e328b49e..095078b47e65 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2313,11 +2313,16 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: if (ch_rec != NULL) { + /* + * NOTE: The play and record callbacks are + * executed from the same USB thread and + * locking the record channel mutex here is + * not needed. This avoids a LOR situation. + */ + /* reset receive jitter counters */ - mtx_lock(ch_rec->pcm_mtx); ch_rec->jitter_curr = 0; ch_rec->jitter_rem = 0; - mtx_unlock(ch_rec->pcm_mtx); } /* reset transmit jitter counters */ @@ -2338,10 +2343,17 @@ tr_setup: */ if (ch_rec != NULL && uaudio_chan_is_async(ch, ch->cur_alt) != 0) { - mtx_lock(ch_rec->pcm_mtx); - if (ch_rec->cur_alt < ch_rec->num_alt) { + uint32_t rec_alt = ch_rec->cur_alt; + if (rec_alt < ch_rec->num_alt) { int64_t tx_jitter; int64_t rx_rate; + /* + * NOTE: The play and record callbacks + * are executed from the same USB + * thread and locking the record + * channel mutex here is not needed. + * This avoids a LOR situation. + */ /* translate receive jitter into transmit jitter */ tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; @@ -2353,11 +2365,10 @@ tr_setup: ch_rec->jitter_rem = 0; /* compute exact number of transmit jitter samples */ - rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + rx_rate = ch_rec->usb_alt[rec_alt].sample_rate; ch->jitter_curr += tx_jitter / rx_rate; ch->jitter_rem = tx_jitter % rx_rate; } - mtx_unlock(ch_rec->pcm_mtx); } /* start the SYNC transfer one time per second, if any */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 08:44:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C910D52FEBB; Thu, 18 Feb 2021 08:44: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 4Dh7Yj3ctJz3QwW; Thu, 18 Feb 2021 08:44: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 6F150150EF; Thu, 18 Feb 2021 08:44: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 11I8ifte012991; Thu, 18 Feb 2021 08:44:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I8ifTP012990; Thu, 18 Feb 2021 08:44:41 GMT (envelope-from git) Date: Thu, 18 Feb 2021 08:44:41 GMT Message-Id: <202102180844.11I8ifTP012990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 3ea88413d607 - stable/12 - MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3ea88413d607eea79450cb6570e9a8c6067dd9ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 08:44:41 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=3ea88413d607eea79450cb6570e9a8c6067dd9ae commit 3ea88413d607eea79450cb6570e9a8c6067dd9ae Author: Hans Petter Selasky AuthorDate: 2021-02-14 19:29:16 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-18 08:43:46 +0000 MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Found by: Stefan Ehmann Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4) --- sys/dev/sound/usb/uaudio.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 3285710be961..895456d84c58 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2323,11 +2323,16 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: if (ch_rec != NULL) { + /* + * NOTE: The play and record callbacks are + * executed from the same USB thread and + * locking the record channel mutex here is + * not needed. This avoids a LOR situation. + */ + /* reset receive jitter counters */ - mtx_lock(ch_rec->pcm_mtx); ch_rec->jitter_curr = 0; ch_rec->jitter_rem = 0; - mtx_unlock(ch_rec->pcm_mtx); } /* reset transmit jitter counters */ @@ -2348,10 +2353,17 @@ tr_setup: */ if (ch_rec != NULL && uaudio_chan_is_async(ch, ch->cur_alt) != 0) { - mtx_lock(ch_rec->pcm_mtx); - if (ch_rec->cur_alt < ch_rec->num_alt) { + uint32_t rec_alt = ch_rec->cur_alt; + if (rec_alt < ch_rec->num_alt) { int64_t tx_jitter; int64_t rx_rate; + /* + * NOTE: The play and record callbacks + * are executed from the same USB + * thread and locking the record + * channel mutex here is not needed. + * This avoids a LOR situation. + */ /* translate receive jitter into transmit jitter */ tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; @@ -2363,11 +2375,10 @@ tr_setup: ch_rec->jitter_rem = 0; /* compute exact number of transmit jitter samples */ - rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + rx_rate = ch_rec->usb_alt[rec_alt].sample_rate; ch->jitter_curr += tx_jitter / rx_rate; ch->jitter_rem = tx_jitter % rx_rate; } - mtx_unlock(ch_rec->pcm_mtx); } /* start the SYNC transfer one time per second, if any */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 08:46:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A71CD52FF56; Thu, 18 Feb 2021 08:46: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 4Dh7bG4LKrz3R78; Thu, 18 Feb 2021 08:46: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 87CE41588C; Thu, 18 Feb 2021 08:46: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 11I8k2VF013313; Thu, 18 Feb 2021 08:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I8k2sJ013312; Thu, 18 Feb 2021 08:46:02 GMT (envelope-from git) Date: Thu, 18 Feb 2021 08:46:02 GMT Message-Id: <202102180846.11I8k2sJ013312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: e710703067b1 - stable/11 - MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: e710703067b1468226bf4d60e343d63928859ac0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 08:46:02 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=e710703067b1468226bf4d60e343d63928859ac0 commit e710703067b1468226bf4d60e343d63928859ac0 Author: Hans Petter Selasky AuthorDate: 2021-02-14 19:29:16 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-18 08:45:26 +0000 MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Found by: Stefan Ehmann Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4) --- sys/dev/sound/usb/uaudio.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index 955ecd84e01d..2ccdaac63196 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2321,11 +2321,16 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: if (ch_rec != NULL) { + /* + * NOTE: The play and record callbacks are + * executed from the same USB thread and + * locking the record channel mutex here is + * not needed. This avoids a LOR situation. + */ + /* reset receive jitter counters */ - mtx_lock(ch_rec->pcm_mtx); ch_rec->jitter_curr = 0; ch_rec->jitter_rem = 0; - mtx_unlock(ch_rec->pcm_mtx); } /* reset transmit jitter counters */ @@ -2346,10 +2351,17 @@ tr_setup: */ if (ch_rec != NULL && uaudio_chan_is_async(ch, ch->cur_alt) != 0) { - mtx_lock(ch_rec->pcm_mtx); - if (ch_rec->cur_alt < ch_rec->num_alt) { + uint32_t rec_alt = ch_rec->cur_alt; + if (rec_alt < ch_rec->num_alt) { int64_t tx_jitter; int64_t rx_rate; + /* + * NOTE: The play and record callbacks + * are executed from the same USB + * thread and locking the record + * channel mutex here is not needed. + * This avoids a LOR situation. + */ /* translate receive jitter into transmit jitter */ tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; @@ -2361,11 +2373,10 @@ tr_setup: ch_rec->jitter_rem = 0; /* compute exact number of transmit jitter samples */ - rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + rx_rate = ch_rec->usb_alt[rec_alt].sample_rate; ch->jitter_curr += tx_jitter / rx_rate; ch->jitter_rem = tx_jitter % rx_rate; } - mtx_unlock(ch_rec->pcm_mtx); } /* start the SYNC transfer one time per second, if any */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 08:48:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 734E45301AB; Thu, 18 Feb 2021 08:48:20 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh7dw2f9Rz3RDy; Thu, 18 Feb 2021 08:48:20 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-ej1-x633.google.com with SMTP id ly28so3664129ejb.13; Thu, 18 Feb 2021 00:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z7waTr4CvQI+snUSmqR7g2yBe5SuJQ+GHIfYUt3eLCc=; b=c8ga7VMPFSZJroupBHIoJBr+wjDy07Sy+kQamWVzqv3LoCjmGJrRNm1Nmm7fHaFovu +TROJ9Z/3pmfT+CL2xOyIgQM/eDrkAq2eHOyHU2NKWXPNfyn9LAuOJ4bCLssl5ZHy/1D br3EE1J7sxcXkvWStHBLRNYur6uXWMCfBl3EKKRzBfh5yf80Gkel4rMOm9ujMwcB1WGA xRDgfEyvGMq6x91y3unYhEtQLRUoVAR8M4FoxbASymXz4Wv1e0MN/MgG11xKnWT5SmQX kUDGTl/DCH4hBffrCnAQDsNysibO6WezZK9aN3MpXOVErqEIDWYwT4i+1PFMcd3B0OJk TryA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z7waTr4CvQI+snUSmqR7g2yBe5SuJQ+GHIfYUt3eLCc=; b=sWRy0x5HYCTnW4jTnBvnlUFs+PY6fyey0AyAPocK07DGLHFESOAq5+xOCDRn5hVs7u kSx3ho55yUeo4ErPUqvS8+6QWmdBgLZ5RtTq4ryiaXkn6Z9H6AYhFQwARMh7BKfwohR2 lMelQfZJsQ6cL4IOPDm9PvkJxDyxGKQTJcWauSdIiT1UhhuZgPe9zB/lPSe6ueLJ9ceg mY9ueUAN2Y6jfbQ2nhng3pTAJXI0uOzdbjYUx6dbvQAgmfaVwBP5WT7duBzUGmU4G9sc hsXFDvBqo5HSP88GwQfixKg8kJReZaE2dVWD6n+WjxwW/0SWr0v+g0dhKxGLDSXmCcNS jv9A== X-Gm-Message-State: AOAM5310SzWSaBYdmNLkvaj5iqVY5j64uiTgJAIcB4sSN+gGzKCUfmfz hqDEfjcfIPVMtE45ePsqO1tzv/ilwqLpwE53Az3iyxmhlnY= X-Google-Smtp-Source: ABdhPJz+dg8MIKH5MsCRFw7Yi2pCe0Ota9zAFfB2C7Q5Wks9lSa9OuSy82AsL/c7/h9jTZgnygN3ZQPoDo4l5wtLhW4= X-Received: by 2002:a17:906:2c56:: with SMTP id f22mr2971186ejh.16.1613638098140; Thu, 18 Feb 2021 00:48:18 -0800 (PST) MIME-Version: 1.0 References: <202102180627.11I6Rxa4030228@gitrepo.freebsd.org> In-Reply-To: <202102180627.11I6Rxa4030228@gitrepo.freebsd.org> From: Navdeep Parhar Date: Thu, 18 Feb 2021 00:48:06 -0800 Message-ID: Subject: Re: git: 0a4f851074a3 - main - Fix another pesky missing #ifdef TCPHPTS To: Randall Stewart Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Dh7dw2f9Rz3RDy X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 08:48:20 -0000 I still get build failures in tcp_lro.c for i386/amd64 LINT-NOINET builds after this. --- tcp_lro.o --- /storage/src/head/sys/netinet/tcp_lro.c:1359:10: error: unused variable 'iptos' [-Werror,-Wunused-variable] uint8_t iptos; ^ 1 error generated. *** [tcp_lro.o] Error code 1 make[5]: stopped in /storage/obj/storage/src/head/amd64.amd64/sys/LINT-NOINET Regards, Navdeep On Wed, Feb 17, 2021 at 10:28 PM Randall Stewart wrote: > > The branch main has been updated by rrs: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0a4f851074a3ca74cd4859c20e7d9807b2aeca65 > > commit 0a4f851074a3ca74cd4859c20e7d9807b2aeca65 > Author: Randall Stewart > AuthorDate: 2021-02-18 06:27:30 +0000 > Commit: Randall Stewart > CommitDate: 2021-02-18 06:27:30 +0000 > > Fix another pesky missing #ifdef TCPHPTS > --- > sys/netinet/tcp_lro.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c > index 199b7f9a79a0..a8e751b67071 100644 > --- a/sys/netinet/tcp_lro.c > +++ b/sys/netinet/tcp_lro.c > @@ -470,6 +470,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, struct mbuf *m, struct ip *ip4, > } > #endif > > +#ifdef TCPHPTS > static void > tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, > struct lro_entry *le, struct mbuf *m, int frm, int32_t tcp_data_len, > @@ -520,6 +521,7 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, > 0, &log, false, &tv); > } > } > +#endif > > static void > tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_entry *le) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 09:01:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4C306530652; Thu, 18 Feb 2021 09:01: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 4Dh7wY1kZTz3hcL; Thu, 18 Feb 2021 09:01: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 2EA4B15A90; Thu, 18 Feb 2021 09:01: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 11I9116V037719; Thu, 18 Feb 2021 09:01:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I911Sp037718; Thu, 18 Feb 2021 09:01:01 GMT (envelope-from git) Date: Thu, 18 Feb 2021 09:01:01 GMT Message-Id: <202102180901.11I911Sp037718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 223debfb954c - releng/13.0 - zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 223debfb954c924897aad393dc8b830cb1d507f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 09:01:01 -0000 The branch releng/13.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=223debfb954c924897aad393dc8b830cb1d507f8 commit 223debfb954c924897aad393dc8b830cb1d507f8 Author: Martin Matuska AuthorDate: 2021-02-15 07:40:27 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 08:59:38 +0000 zfs: fix RAIDZ2/3 not healing parity with 2+ bad disks From openzfs-master 62d4287f2 commit message: When scrubbing, (non-sequential) resilvering, or correcting a checksum error using RAIDZ parity, ZFS should heal any incorrect RAIDZ parity by overwriting it. For example, if P disks are silently corrupted (P being the number of failures tolerated; e.g. RAIDZ2 has P=2), `zpool scrub` should detect and heal all the bad state on these disks, including parity. This way if there is a subsequent failure we are fully protected. With RAIDZ2 or RAIDZ3, a block can have silent damage to a parity sector, and also damage (silent or known) to a data sector. In this case the parity should be healed but it is not. Cherry-picked from openzfs 62d4287f279a0d184f8f332475f27af58b7aa87e Patch Author: Matthew Ahrens Approved by: re (gjb) Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28681 (cherry picked from commit f15e18a642cb3f7ebc747f8e9cdf11274140107d) (cherry picked from commit 6f21b7996a95b7d93d1687787b55e57289689066) --- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 10 -- sys/contrib/openzfs/tests/runfiles/common.run | 5 +- .../tests/functional/redundancy/Makefile.am | 1 + .../functional/redundancy/redundancy_raidz.ksh | 198 +++++++++++++++++++++ 4 files changed, 202 insertions(+), 12 deletions(-) diff --git a/sys/contrib/openzfs/module/zfs/vdev_raidz.c b/sys/contrib/openzfs/module/zfs/vdev_raidz.c index 989b90dc2635..5b152f38bd63 100644 --- a/sys/contrib/openzfs/module/zfs/vdev_raidz.c +++ b/sys/contrib/openzfs/module/zfs/vdev_raidz.c @@ -1922,16 +1922,6 @@ raidz_parity_verify(zio_t *zio, raidz_row_t *rr) if (checksum == ZIO_CHECKSUM_NOPARITY) return (ret); - /* - * All data columns must have been successfully read in order - * to use them to generate parity columns for comparison. - */ - for (c = rr->rr_firstdatacol; c < rr->rr_cols; c++) { - rc = &rr->rr_col[c]; - if (!rc->rc_tried || rc->rc_error != 0) - return (ret); - } - for (c = 0; c < rr->rr_firstdatacol; c++) { rc = &rr->rr_col[c]; if (!rc->rc_tried || rc->rc_error != 0) diff --git a/sys/contrib/openzfs/tests/runfiles/common.run b/sys/contrib/openzfs/tests/runfiles/common.run index 171db4c0c022..c0bfc09ac5b3 100644 --- a/sys/contrib/openzfs/tests/runfiles/common.run +++ b/sys/contrib/openzfs/tests/runfiles/common.run @@ -727,8 +727,9 @@ tags = ['functional', 'raidz'] [tests/functional/redundancy] tests = ['redundancy_draid1', 'redundancy_draid2', 'redundancy_draid3', 'redundancy_draid_spare1', 'redundancy_draid_spare2', - 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz1', - 'redundancy_raidz2', 'redundancy_raidz3', 'redundancy_stripe'] + 'redundancy_draid_spare3', 'redundancy_mirror', 'redundancy_raidz', + 'redundancy_raidz1', 'redundancy_raidz2', 'redundancy_raidz3', + 'redundancy_stripe'] tags = ['functional', 'redundancy'] [tests/functional/refquota] diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am index b2d4414b2906..7b85d6a1bf5f 100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/Makefile.am @@ -9,6 +9,7 @@ dist_pkgdata_SCRIPTS = \ redundancy_draid_spare2.ksh \ redundancy_draid_spare3.ksh \ redundancy_mirror.ksh \ + redundancy_raidz.ksh \ redundancy_raidz1.ksh \ redundancy_raidz2.ksh \ redundancy_raidz3.ksh \ diff --git a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh new file mode 100644 index 000000000000..8d32e0603ae8 --- /dev/null +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/redundancy/redundancy_raidz.ksh @@ -0,0 +1,198 @@ +#!/bin/ksh -p +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2020 by vStack. All rights reserved. +# Copyright (c) 2021 by Delphix. All rights reserved. +# + +. $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/redundancy/redundancy.kshlib + +# +# DESCRIPTION: +# RAIDZ should provide redundancy +# +# STRATEGY: +# 1. Create block device files for the test raidz pool +# 2. For each parity value [1..3] +# - create raidz pool +# - fill it with some directories/files +# - verify resilver by replacing devices +# - verify scrub by zeroing devices +# - destroy the raidz pool + +typeset -r devs=6 +typeset -r dev_size_mb=512 + +typeset -a disks + +prefetch_disable=$(get_tunable PREFETCH_DISABLE) + +function cleanup +{ + poolexists "$TESTPOOL" && destroy_pool "$TESTPOOL" + + for i in {0..$devs}; do + rm -f "$TEST_BASE_DIR/dev-$i" + done + + set_tunable32 PREFETCH_DISABLE $prefetch_disable +} + +function test_resilver # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=0; i<$nparity; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool offline $pool $dir/dev-$i + done + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool labelclear -f $dir/dev-$i + done + + log_must zpool import -o cachefile=none -d $dir $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + log_must zpool replace -fw $pool $dir/dev-$i + done + + log_must check_pool_status $pool "errors" "No known data errors" + resilver_cksum=$(cksum_pool $pool) + if [[ $resilver_cksum != 0 ]]; then + log_must zpool status -v $pool + log_fail "resilver cksum errors: $resilver_cksum" + fi + + log_must zpool clear $pool +} + +function test_scrub # +{ + typeset pool=$1 + typeset nparity=$2 + typeset dir=$3 + typeset combrec=$4 + + log_must zpool export $pool + + for (( i=0; i<$nparity; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool + + log_must zpool export $pool + + for (( i=$nparity; i<$nparity*2; i=i+1 )); do + dd conv=notrunc if=/dev/zero of=$dir/dev-$i \ + bs=1M seek=4 count=$(($dev_size_mb-4)) + done + + log_must zpool import -o cachefile=none -d $dir $pool + + log_must zpool scrub -w $pool + log_must check_pool_status $pool "errors" "No known data errors" + + log_must zpool clear $pool +} + +log_onexit cleanup + +log_must set_tunable32 PREFETCH_DISABLE 1 + +# Disk files which will be used by pool +for i in {0..$(($devs - 1))}; do + device=$TEST_BASE_DIR/dev-$i + log_must truncate -s ${dev_size_mb}M $device + disks[${#disks[*]}+1]=$device +done + +# Disk file which will be attached +log_must truncate -s 512M $TEST_BASE_DIR/dev-$devs + +for nparity in 1 2 3; do + raid=raidz$nparity + dir=$TEST_BASE_DIR + + log_must zpool create -f -o cachefile=none $TESTPOOL $raid ${disks[@]} + log_must zfs set primarycache=metadata $TESTPOOL + + log_must zfs create $TESTPOOL/fs + log_must fill_fs /$TESTPOOL/fs 1 512 100 1024 R + + log_must zfs create -o compress=on $TESTPOOL/fs2 + log_must fill_fs /$TESTPOOL/fs2 1 512 100 1024 R + + log_must zfs create -o compress=on -o recordsize=8k $TESTPOOL/fs3 + log_must fill_fs /$TESTPOOL/fs3 1 512 100 1024 R + + typeset pool_size=$(get_pool_prop size $TESTPOOL) + + log_must zpool export $TESTPOOL + log_must zpool import -o cachefile=none -d $dir $TESTPOOL + + log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + test_resilver $TESTPOOL $nparity $dir + test_scrub $TESTPOOL $nparity $dir + + log_must zpool destroy "$TESTPOOL" +done + +log_pass "raidz redundancy test succeeded." From owner-dev-commits-src-all@freebsd.org Thu Feb 18 09:05:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E1BE6530956; Thu, 18 Feb 2021 09:05:12 +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 4Dh81N5nJzz3j36; Thu, 18 Feb 2021 09:05:12 +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 B4F5415ABB; Thu, 18 Feb 2021 09:05:12 +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 11I95CnD039384; Thu, 18 Feb 2021 09:05:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I95CDF039383; Thu, 18 Feb 2021 09:05:12 GMT (envelope-from git) Date: Thu, 18 Feb 2021 09:05:12 GMT Message-Id: <202102180905.11I95CDF039383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Martin Matuska Subject: git: 0be7053c91b9 - releng/13.0 - zfs: Avoid updating the L2ARC device header unnecessarily MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 0be7053c91b9fadc9a344926f8ccbd5424b9f2fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 09:05:12 -0000 The branch releng/13.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0be7053c91b9fadc9a344926f8ccbd5424b9f2fc commit 0be7053c91b9fadc9a344926f8ccbd5424b9f2fc Author: Martin Matuska AuthorDate: 2021-02-15 08:10:01 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 09:01:16 +0000 zfs: Avoid updating the L2ARC device header unnecessarily From openzfs-master 0ae184a6b commit message: If we do not write any buffers to the cache device and the evict hand has not advanced do not update the cache device header. Cherry-picked from openzfs 0ae184a6baaf71e155e9b19af81b75474622ff58 Patch Author: George Amanakis Approved by: re (gjb) Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D28682 (cherry picked from commit 5dce03847fdc7bc6eb959282c0ae2117b1991746) (cherry picked from commit edb9049c3a782a51a77bd81a478c28cd1745323c) --- sys/contrib/openzfs/module/zfs/arc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c index e05b11d51942..fecc752e16ff 100644 --- a/sys/contrib/openzfs/module/zfs/arc.c +++ b/sys/contrib/openzfs/module/zfs/arc.c @@ -9062,6 +9062,7 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) l2arc_write_callback_t *cb = NULL; zio_t *pio, *wzio; uint64_t guid = spa_load_guid(spa); + l2arc_dev_hdr_phys_t *l2dhdr = dev->l2ad_dev_hdr; ASSERT3P(dev->l2ad_vdev, !=, NULL); @@ -9293,7 +9294,8 @@ l2arc_write_buffers(spa_t *spa, l2arc_dev_t *dev, uint64_t target_sz) * Although we did not write any buffers l2ad_evict may * have advanced. */ - l2arc_dev_hdr_update(dev); + if (dev->l2ad_evict != l2dhdr->dh_evict) + l2arc_dev_hdr_update(dev); return (0); } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 09:20:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CD570530DD0; Thu, 18 Feb 2021 09:20:26 +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 4Dh8Ly5SHzz3jNG; Thu, 18 Feb 2021 09:20: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 AE0AA15A5F; Thu, 18 Feb 2021 09:20: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 11I9KQPK061076; Thu, 18 Feb 2021 09:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I9KQAt061075; Thu, 18 Feb 2021 09:20:26 GMT (envelope-from git) Date: Thu, 18 Feb 2021 09:20:26 GMT Message-Id: <202102180920.11I9KQAt061075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 0abf8ecb11ca - releng/13.0 - MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 0abf8ecb11ca3e40c96ca99b0180bef5be95f428 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 09:20:26 -0000 The branch releng/13.0 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=0abf8ecb11ca3e40c96ca99b0180bef5be95f428 commit 0abf8ecb11ca3e40c96ca99b0180bef5be95f428 Author: Hans Petter Selasky AuthorDate: 2021-02-14 19:29:16 +0000 Commit: Hans Petter Selasky CommitDate: 2021-02-18 09:19:43 +0000 MFC 12148d4300db: Fix for locking order reversal in USB audio driver, when using mmap(). Locking the second lock which causes the LOR, can be skipped because the code updating the shared variables is always executing from the same USB thread. lock order reversal: 1st 0xfffff80005cc3840 pcm7:play:dsp7.p0 (pcm play channel, sleep mutex) @ usb_transfer.c:2342 2nd 0xfffff80005cc3860 pcm7:record:dsp7.r0 (pcm record channel, sleep mutex) @ uaudio.c:2317 lock order pcm record channel -> pcm play channel established at: witness_checkorder+0x461 __mtx_lock_flags+0x98 dsp_mmap_single+0x151 vm_mmap_cdev+0x65 devfs_mmap_f+0x143 kern_mmap_req+0x594 sys_mmap+0x46 amd64_syscall+0x12e fast_syscall_common+0xf8 lock order pcm play channel -> pcm record channel attempted at: witness_checkorder+0xd82 __mtx_lock_flags+0x98 uaudio_chan_play_callback+0xeb usbd_callback_wrapper+0x7ec usb_command_wrapper+0x7e usb_callback_proc+0x8e usb_process+0xf3 fork_exit+0x80 fork_trampoline+0xe Approved by: re (gjb) Found by: Stefan Ehmann Sponsored by: Mellanox Technologies // NVIDIA Networking (cherry picked from commit 12148d4300dbbd93260bf2801cdb9eda8b3b05a4) --- sys/dev/sound/usb/uaudio.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index c2a7e328b49e..095078b47e65 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -2313,11 +2313,16 @@ uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) case USB_ST_SETUP: tr_setup: if (ch_rec != NULL) { + /* + * NOTE: The play and record callbacks are + * executed from the same USB thread and + * locking the record channel mutex here is + * not needed. This avoids a LOR situation. + */ + /* reset receive jitter counters */ - mtx_lock(ch_rec->pcm_mtx); ch_rec->jitter_curr = 0; ch_rec->jitter_rem = 0; - mtx_unlock(ch_rec->pcm_mtx); } /* reset transmit jitter counters */ @@ -2338,10 +2343,17 @@ tr_setup: */ if (ch_rec != NULL && uaudio_chan_is_async(ch, ch->cur_alt) != 0) { - mtx_lock(ch_rec->pcm_mtx); - if (ch_rec->cur_alt < ch_rec->num_alt) { + uint32_t rec_alt = ch_rec->cur_alt; + if (rec_alt < ch_rec->num_alt) { int64_t tx_jitter; int64_t rx_rate; + /* + * NOTE: The play and record callbacks + * are executed from the same USB + * thread and locking the record + * channel mutex here is not needed. + * This avoids a LOR situation. + */ /* translate receive jitter into transmit jitter */ tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; @@ -2353,11 +2365,10 @@ tr_setup: ch_rec->jitter_rem = 0; /* compute exact number of transmit jitter samples */ - rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + rx_rate = ch_rec->usb_alt[rec_alt].sample_rate; ch->jitter_curr += tx_jitter / rx_rate; ch->jitter_rem = tx_jitter % rx_rate; } - mtx_unlock(ch_rec->pcm_mtx); } /* start the SYNC transfer one time per second, if any */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 09:24:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B128A531239; Thu, 18 Feb 2021 09:24: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 4Dh8R84d3Lz3kB7; Thu, 18 Feb 2021 09:24: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 90B7416187; Thu, 18 Feb 2021 09:24: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 11I9O4ba065764; Thu, 18 Feb 2021 09:24:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I9O4av065763; Thu, 18 Feb 2021 09:24:04 GMT (envelope-from git) Date: Thu, 18 Feb 2021 09:24:04 GMT Message-Id: <202102180924.11I9O4av065763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: fae028dd97d8 - main - cxgbe(4): Break up t4_read_chip_settings. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fae028dd97d8fc8f9ba5153408b177481dbefd70 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 09:24:04 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=fae028dd97d8fc8f9ba5153408b177481dbefd70 commit fae028dd97d8fc8f9ba5153408b177481dbefd70 Author: Navdeep Parhar AuthorDate: 2021-02-18 09:15:46 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-18 09:22:42 +0000 cxgbe(4): Break up t4_read_chip_settings. Read the PF-only hardware settings directly in get_params__post_init. Split the rest into two routines used by both the PF and VF drivers: one that reads the SGE rx buffer configuration and another that verifies miscellaneous hardware configuration. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 3 +- sys/dev/cxgbe/common/common.h | 2 +- sys/dev/cxgbe/common/t4_hw.c | 4 +-- sys/dev/cxgbe/t4_main.c | 16 +++++++--- sys/dev/cxgbe/t4_sge.c | 72 ++++++++++++++++++++++++------------------- sys/dev/cxgbe/t4_vf.c | 9 +++--- 6 files changed, 62 insertions(+), 44 deletions(-) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 4b2f86d00052..8b8e6bf339e8 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1262,7 +1262,8 @@ void t4_sge_modload(void); void t4_sge_modunload(void); uint64_t t4_sge_extfree_refs(void); void t4_tweak_chip_settings(struct adapter *); -int t4_read_chip_settings(struct adapter *); +int t4_verify_chip_settings(struct adapter *); +void t4_init_rx_buf_info(struct adapter *); int t4_create_dma_tag(struct adapter *); void t4_sge_sysctls(struct adapter *, struct sysctl_ctx_list *, struct sysctl_oid_list *); diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 4c387d563365..9cc923eaf2f6 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -643,7 +643,7 @@ int t4_prep_adapter(struct adapter *adapter, u32 *buf); int t4_shutdown_adapter(struct adapter *adapter); int t4_init_devlog_params(struct adapter *adapter, int fw_attach); int t4_init_sge_params(struct adapter *adapter); -int t4_init_tp_params(struct adapter *adap, bool sleep_ok); +int t4_init_tp_params(struct adapter *adap); int t4_filter_field_shift(const struct adapter *adap, int filter_sel); int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id); void t4_fatal_err(struct adapter *adapter, bool fw_error); diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index b54a71a02ca4..36d8864de960 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9677,7 +9677,7 @@ static void read_filter_mode_and_ingress_config(struct adapter *adap, * * Initialize various fields of the adapter's TP Parameters structure. */ -int t4_init_tp_params(struct adapter *adap, bool sleep_ok) +int t4_init_tp_params(struct adapter *adap) { int chan; u32 tx_len, rx_len, r, v; @@ -9691,7 +9691,7 @@ int t4_init_tp_params(struct adapter *adap, bool sleep_ok) for (chan = 0; chan < MAX_NCHAN; chan++) tpp->tx_modq[chan] = chan; - read_filter_mode_and_ingress_config(adap, sleep_ok); + read_filter_mode_and_ingress_config(adap, true); if (chip_id(adap) > CHELSIO_T5) { v = t4_read_reg(adap, A_TP_OUT_CONFIG); diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index 18a83df763ab..f64d349b46ae 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -4754,13 +4754,19 @@ get_params__post_init(struct adapter *sc) sc->vres.key.size = val[1] - val[0] + 1; } - t4_init_sge_params(sc); - /* - * We've got the params we wanted to query via the firmware. Now grab - * some others directly from the chip. + * We've got the params we wanted to query directly from the firmware. + * Grab some others via other means. */ - rc = t4_read_chip_settings(sc); + t4_init_sge_params(sc); + t4_init_tp_params(sc); + t4_read_mtu_tbl(sc, sc->params.mtus, NULL); + t4_load_mtus(sc, sc->params.mtus, sc->params.a_wnd, sc->params.b_wnd); + + rc = t4_verify_chip_settings(sc); + if (rc != 0) + return (rc); + t4_init_rx_buf_info(sc); return (rc); } diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index d16f17c45614..741b1ec5ac86 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -826,16 +826,15 @@ hwsz_ok(struct adapter *sc, int hwsz) } /* - * XXX: driver really should be able to deal with unexpected settings. + * Initialize the rx buffer sizes and figure out which zones the buffers will + * be allocated from. */ -int -t4_read_chip_settings(struct adapter *sc) +void +t4_init_rx_buf_info(struct adapter *sc) { struct sge *s = &sc->sge; struct sge_params *sp = &sc->params.sge; - int i, j, n, rc = 0; - uint32_t m, v, r; - uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); + int i, j, n; static int sw_buf_sizes[] = { /* Sorted by size */ MCLBYTES, #if MJUMPAGESIZE != MCLBYTES @@ -846,23 +845,6 @@ t4_read_chip_settings(struct adapter *sc) }; struct rx_buf_info *rxb; - m = F_RXPKTCPLMODE; - v = F_RXPKTCPLMODE; - r = sc->params.sge.sge_control; - if ((r & m) != v) { - device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); - rc = EINVAL; - } - - /* - * If this changes then every single use of PAGE_SHIFT in the driver - * needs to be carefully reviewed for PAGE_SHIFT vs sp->page_shift. - */ - if (sp->page_shift != PAGE_SHIFT) { - device_printf(sc->dev, "invalid SGE_HOST_PAGE_SIZE(0x%x)\n", r); - rc = EINVAL; - } - s->safe_zidx = -1; rxb = &s->rx_buf_info[0]; for (i = 0; i < SW_ZONE_SIZES; i++, rxb++) { @@ -907,6 +889,36 @@ t4_read_chip_settings(struct adapter *sc) if (s->safe_zidx == -1 && rxb->size1 == safest_rx_cluster) s->safe_zidx = i; } +} + +/* + * Verify some basic SGE settings for the PF and VF driver, and other + * miscellaneous settings for the PF driver. + */ +int +t4_verify_chip_settings(struct adapter *sc) +{ + struct sge_params *sp = &sc->params.sge; + uint32_t m, v, r; + int rc = 0; + const uint16_t indsz = min(RX_COPY_THRESHOLD - 1, M_INDICATESIZE); + + m = F_RXPKTCPLMODE; + v = F_RXPKTCPLMODE; + r = sp->sge_control; + if ((r & m) != v) { + device_printf(sc->dev, "invalid SGE_CONTROL(0x%x)\n", r); + rc = EINVAL; + } + + /* + * If this changes then every single use of PAGE_SHIFT in the driver + * needs to be carefully reviewed for PAGE_SHIFT vs sp->page_shift. + */ + if (sp->page_shift != PAGE_SHIFT) { + device_printf(sc->dev, "invalid SGE_HOST_PAGE_SIZE(0x%x)\n", r); + rc = EINVAL; + } if (sc->flags & IS_VF) return (0); @@ -915,14 +927,16 @@ t4_read_chip_settings(struct adapter *sc) r = t4_read_reg(sc, A_ULP_RX_TDDP_PSZ); if (r != v) { device_printf(sc->dev, "invalid ULP_RX_TDDP_PSZ(0x%x)\n", r); - rc = EINVAL; + if (sc->vres.ddp.size != 0) + rc = EINVAL; } m = v = F_TDDPTAGTCB; r = t4_read_reg(sc, A_ULP_RX_CTL); if ((r & m) != v) { device_printf(sc->dev, "invalid ULP_RX_CTL(0x%x)\n", r); - rc = EINVAL; + if (sc->vres.ddp.size != 0) + rc = EINVAL; } m = V_INDICATESIZE(M_INDICATESIZE) | F_REARMDDPOFFSET | @@ -931,14 +945,10 @@ t4_read_chip_settings(struct adapter *sc) r = t4_read_reg(sc, A_TP_PARA_REG5); if ((r & m) != v) { device_printf(sc->dev, "invalid TP_PARA_REG5(0x%x)\n", r); - rc = EINVAL; + if (sc->vres.ddp.size != 0) + rc = EINVAL; } - t4_init_tp_params(sc, 1); - - t4_read_mtu_tbl(sc, sc->params.mtus, NULL); - t4_load_mtus(sc, sc->params.mtus, sc->params.a_wnd, sc->params.b_wnd); - return (rc); } diff --git a/sys/dev/cxgbe/t4_vf.c b/sys/dev/cxgbe/t4_vf.c index 6c736e37faac..4ad5e9d7839d 100644 --- a/sys/dev/cxgbe/t4_vf.c +++ b/sys/dev/cxgbe/t4_vf.c @@ -253,10 +253,6 @@ get_params__post_init(struct adapter *sc) return (EINVAL); } - rc = t4_read_chip_settings(sc); - if (rc != 0) - return (rc); - /* * Grab our Virtual Interface resource allocation, extract the * features that we're interested in and do a bit of sanity testing on @@ -290,6 +286,11 @@ get_params__post_init(struct adapter *sc) else sc->params.max_pkts_per_eth_tx_pkts_wr = 14; + rc = t4_verify_chip_settings(sc); + if (rc != 0) + return (rc); + t4_init_rx_buf_info(sc); + return (0); } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 09:26:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ACD935313E9 for ; Thu, 18 Feb 2021 09:26: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 4Dh8VT4VLWz3kNR; Thu, 18 Feb 2021 09:26: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 8D48415F28; Thu, 18 Feb 2021 09:26: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 11I9QvsQ066301; Thu, 18 Feb 2021 09:26:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11I9QvvC066297; Thu, 18 Feb 2021 09:26:57 GMT (envelope-from git) Date: Thu, 18 Feb 2021 09:26:57 GMT Message-Id: <202102180926.11I9QvvC066297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 62ceb3c592a5 - vendor/openzfs - Update OpenZFS to master-bf156c966 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs X-Git-Reftype: branch X-Git-Commit: 62ceb3c592a54fc54d9cb3beee91906979c3df14 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 09:26:57 -0000 The branch vendor/openzfs has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=62ceb3c592a54fc54d9cb3beee91906979c3df14 commit 62ceb3c592a54fc54d9cb3beee91906979c3df14 Author: Martin Matuska AuthorDate: 2021-02-18 09:14:16 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 09:14:16 +0000 Update OpenZFS to master-bf156c966 Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets --- cmd/zpool/Makefile.am | 47 +- cmd/zpool/compatibility.d/compat-2018 | 12 + cmd/zpool/compatibility.d/compat-2019 | 15 + cmd/zpool/compatibility.d/compat-2020 | 15 + cmd/zpool/compatibility.d/compat-2021 | 19 + cmd/zpool/compatibility.d/freebsd-11.0 | 15 + cmd/zpool/compatibility.d/freebsd-11.2 | 18 + cmd/zpool/compatibility.d/freebsd-11.3 | 19 + cmd/zpool/compatibility.d/freenas-9.10.2 | 13 + cmd/zpool/compatibility.d/grub2 | 12 + cmd/zpool/compatibility.d/openzfs-2.0-freebsd | 33 + cmd/zpool/compatibility.d/openzfs-2.0-linux | 34 + cmd/zpool/compatibility.d/openzfsonosx-1.7.0 | 16 + cmd/zpool/compatibility.d/openzfsonosx-1.8.1 | 21 + cmd/zpool/compatibility.d/openzfsonosx-1.9.3 | 27 + cmd/zpool/compatibility.d/zol-0.6.5 | 12 + cmd/zpool/compatibility.d/zol-0.7 | 18 + cmd/zpool/compatibility.d/zol-0.8 | 27 + cmd/zpool/zpool_main.c | 165 +- cmd/ztest/ztest.c | 4 +- config/Rules.am | 1 + include/libzfs.h | 16 + include/sys/fs/zfs.h | 19 +- include/sys/spa_impl.h | 2 + include/zfeature_common.h | 2 - lib/libzfs/libzfs.abi | 6933 ++++++++++++-------- lib/libzfs/libzfs_pool.c | 228 + lib/libzfs/libzfs_status.c | 29 +- lib/libzutil/zutil_import.c | 10 + man/man5/zpool-features.5 | 59 +- man/man8/zpool-create.8 | 16 +- man/man8/zpool-upgrade.8 | 16 +- man/man8/zpoolprops.8 | 19 + module/os/freebsd/zfs/abd_os.c | 19 - module/zcommon/zfeature_common.c | 13 +- module/zcommon/zpool_prop.c | 4 + module/zfs/spa.c | 30 + module/zfs/spa_config.c | 4 + rpm/generic/zfs.spec.in | 6 +- scripts/Makefile.am | 1 + tests/runfiles/common.run | 8 +- tests/zfs-tests/cmd/xattrtest/xattrtest.c | 6 +- tests/zfs-tests/include/default.cfg.in | 1 + .../functional/cli_root/zpool_create/Makefile.am | 3 + .../cli_root/zpool_create/zpool_create.shlib | 81 + .../zpool_create/zpool_create_features_006_pos.ksh | 58 + .../zpool_create/zpool_create_features_007_pos.ksh | 54 + .../zpool_create/zpool_create_features_008_pos.ksh | 54 + .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../functional/cli_root/zpool_status/Makefile.am | 3 +- .../zpool_status/zpool_status_features_001_pos.ksh | 63 + .../functional/cli_root/zpool_upgrade/Makefile.am | 3 +- .../zpool_upgrade_features_001_pos.ksh | 67 + 53 files changed, 5513 insertions(+), 2858 deletions(-) diff --git a/cmd/zpool/Makefile.am b/cmd/zpool/Makefile.am index fb03e99a3054..d47051e4fe50 100644 --- a/cmd/zpool/Makefile.am +++ b/cmd/zpool/Makefile.am @@ -39,7 +39,7 @@ include $(top_srcdir)/config/CppCheck.am zpoolconfdir = $(sysconfdir)/zfs/zpool.d zpoolexecdir = $(zfsexecdir)/zpool.d -EXTRA_DIST = zpool.d/README +EXTRA_DIST = zpool.d/README compatibility.d dist_zpoolexec_SCRIPTS = \ zpool.d/dm-deps \ @@ -129,6 +129,48 @@ zpoolconfdefaults = \ test_progress \ test_ended +zpoolcompatdir = $(pkgdatadir)/compatibility.d + +dist_zpoolcompat_DATA = \ + compatibility.d/compat-2018 \ + compatibility.d/compat-2019 \ + compatibility.d/compat-2020 \ + compatibility.d/compat-2021 \ + compatibility.d/freebsd-11.0 \ + compatibility.d/freebsd-11.2 \ + compatibility.d/freebsd-11.3 \ + compatibility.d/freenas-9.10.2 \ + compatibility.d/grub2 \ + compatibility.d/openzfsonosx-1.7.0 \ + compatibility.d/openzfsonosx-1.8.1 \ + compatibility.d/openzfsonosx-1.9.3 \ + compatibility.d/openzfs-2.0-freebsd \ + compatibility.d/openzfs-2.0-linux \ + compatibility.d/zol-0.6.5 \ + compatibility.d/zol-0.7 \ + compatibility.d/zol-0.8 + +# canonical <- alias symbolic link pairs +# eg: "2018" is a link to "compat-2018" +zpoolcompatlinks = \ + "compat-2018 2018" \ + "compat-2019 2019" \ + "compat-2020 2020" \ + "compat-2021 2021" \ + "freebsd-11.0 freebsd-11.1" \ + "freebsd-11.0 freenas-11.0" \ + "freebsd-11.2 freenas-11.2" \ + "freebsd-11.3 freebsd-11.4" \ + "freebsd-11.3 freebsd-12.0" \ + "freebsd-11.3 freebsd-12.1" \ + "freebsd-11.3 freebsd-12.2" \ + "freebsd-11.3 freenas-11.3" \ + "freenas-11.0 freenas-11.1" \ + "openzfsonosx-1.9.3 openzfsonosx-1.9.4" \ + "openzfs-2.0-freebsd truenas-12.0" \ + "zol-0.7 ubuntu-18.04" \ + "zol-0.8 ubuntu-20.04" + install-data-hook: $(MKDIR_P) "$(DESTDIR)$(zpoolconfdir)" for f in $(zpoolconfdefaults); do \ @@ -136,3 +178,6 @@ install-data-hook: -L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \ ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \ done + for l in $(zpoolcompatlinks); do \ + (cd "$(DESTDIR)$(zpoolcompatdir)"; ln -s $${l} ); \ + done diff --git a/cmd/zpool/compatibility.d/compat-2018 b/cmd/zpool/compatibility.d/compat-2018 new file mode 100644 index 000000000000..7be44e1eee95 --- /dev/null +++ b/cmd/zpool/compatibility.d/compat-2018 @@ -0,0 +1,12 @@ +# Features supported by all Tier 1 platforms as of 2018 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/compat-2019 b/cmd/zpool/compatibility.d/compat-2019 new file mode 100644 index 000000000000..c105cc70c290 --- /dev/null +++ b/cmd/zpool/compatibility.d/compat-2019 @@ -0,0 +1,15 @@ +# Features supported by all Tier 1 platforms as of 2019 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +sha512 +skein +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/compat-2020 b/cmd/zpool/compatibility.d/compat-2020 new file mode 100644 index 000000000000..8d46a571e6ef --- /dev/null +++ b/cmd/zpool/compatibility.d/compat-2020 @@ -0,0 +1,15 @@ +# Features supported by all Tier 1 platforms as of 2020 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +sha512 +skein +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/compat-2021 b/cmd/zpool/compatibility.d/compat-2021 new file mode 100644 index 000000000000..f45c82d6560f --- /dev/null +++ b/cmd/zpool/compatibility.d/compat-2021 @@ -0,0 +1,19 @@ +# Features supported by all Tier 1 platforms as of 2021 +async_destroy +bookmarks +device_removal +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +obsolete_counts +sha512 +skein +spacemap_histogram +spacemap_v2 +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/freebsd-11.0 b/cmd/zpool/compatibility.d/freebsd-11.0 new file mode 100644 index 000000000000..8718559ffb4c --- /dev/null +++ b/cmd/zpool/compatibility.d/freebsd-11.0 @@ -0,0 +1,15 @@ +# Features supported by FreeBSD 11.0 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +sha512 +skein +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/freebsd-11.2 b/cmd/zpool/compatibility.d/freebsd-11.2 new file mode 100644 index 000000000000..14d2d573b2a0 --- /dev/null +++ b/cmd/zpool/compatibility.d/freebsd-11.2 @@ -0,0 +1,18 @@ +# Features supported by FreeBSD 11.2 +async_destroy +bookmarks +device_removal +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +obsolete_counts +sha512 +skein +spacemap_histogram +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/freebsd-11.3 b/cmd/zpool/compatibility.d/freebsd-11.3 new file mode 100644 index 000000000000..802cc3630de7 --- /dev/null +++ b/cmd/zpool/compatibility.d/freebsd-11.3 @@ -0,0 +1,19 @@ +# Features supported by FreeBSD 11.3 +async_destroy +bookmarks +device_removal +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +obsolete_counts +sha512 +skein +spacemap_histogram +spacemap_v2 +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/freenas-9.10.2 b/cmd/zpool/compatibility.d/freenas-9.10.2 new file mode 100644 index 000000000000..10789c96cc8f --- /dev/null +++ b/cmd/zpool/compatibility.d/freenas-9.10.2 @@ -0,0 +1,13 @@ +# Features supported by FreeNAS 9.10.2 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/grub2 b/cmd/zpool/compatibility.d/grub2 new file mode 100644 index 000000000000..4e8f21362554 --- /dev/null +++ b/cmd/zpool/compatibility.d/grub2 @@ -0,0 +1,12 @@ +# Features which are supported by GRUB2 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/openzfs-2.0-freebsd b/cmd/zpool/compatibility.d/openzfs-2.0-freebsd new file mode 100644 index 000000000000..e7ee2f247670 --- /dev/null +++ b/cmd/zpool/compatibility.d/openzfs-2.0-freebsd @@ -0,0 +1,33 @@ +# Features supported by OpenZFS 2.0 on FreeBSD +allocation_classes +async_destroy +bookmark_v2 +bookmark_written +bookmarks +device_rebuild +device_removal +embedded_data +empty_bpobj +enabled_txg +encryption +extensible_dataset +filesystem_limits +hole_birth +large_blocks +large_dnode +livelist +log_spacemap +lz4_compress +multi_vdev_crash_dump +obsolete_counts +project_quota +redacted_datasets +redaction_bookmarks +resilver_defer +sha512 +skein +spacemap_histogram +spacemap_v2 +userobj_accounting +zpool_checkpoint +zstd_compress diff --git a/cmd/zpool/compatibility.d/openzfs-2.0-linux b/cmd/zpool/compatibility.d/openzfs-2.0-linux new file mode 100644 index 000000000000..ac0f5c863468 --- /dev/null +++ b/cmd/zpool/compatibility.d/openzfs-2.0-linux @@ -0,0 +1,34 @@ +# Features supported by OpenZFS 2.0 on Linux +allocation_classes +async_destroy +bookmark_v2 +bookmark_written +bookmarks +device_rebuild +device_removal +edonr +embedded_data +empty_bpobj +enabled_txg +encryption +extensible_dataset +filesystem_limits +hole_birth +large_blocks +large_dnode +livelist +log_spacemap +lz4_compress +multi_vdev_crash_dump +obsolete_counts +project_quota +redacted_datasets +redaction_bookmarks +resilver_defer +sha512 +skein +spacemap_histogram +spacemap_v2 +userobj_accounting +zpool_checkpoint +zstd_compress diff --git a/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 b/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 new file mode 100644 index 000000000000..4ae87c964c5e --- /dev/null +++ b/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 @@ -0,0 +1,16 @@ +# Features supported by OpenZFSonOSX 1.7.0 +async_destroy +bookmarks +edonr +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +sha512 +skein +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 b/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 new file mode 100644 index 000000000000..162ff32a7803 --- /dev/null +++ b/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 @@ -0,0 +1,21 @@ +# Features supported by OpenZFSonOSX 1.8.1 +async_destroy +bookmarks +device_removal +edonr +embedded_data +empty_bpobj +enabled_txg +encryption +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +multi_vdev_crash_dump +obsolete_counts +sha512 +skein +spacemap_histogram +spacemap_v2 +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 b/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 new file mode 100644 index 000000000000..b0b28ec04939 --- /dev/null +++ b/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 @@ -0,0 +1,27 @@ +# Features supported by OpenZFSonOSX 1.9.3 +allocation_classes +async_destroy +bookmark_v2 +bookmarks +device_removal +edonr +embedded_data +empty_bpobj +enabled_txg +encryption +extensible_dataset +filesystem_limits +hole_birth +large_blocks +large_dnode +lz4_compress +multi_vdev_crash_dump +obsolete_counts +project_quota +resilver_defer +sha512 +skein +spacemap_histogram +spacemap_v2 +userobj_accounting +zpool_checkpoint diff --git a/cmd/zpool/compatibility.d/zol-0.6.5 b/cmd/zpool/compatibility.d/zol-0.6.5 new file mode 100644 index 000000000000..cb9a94d88951 --- /dev/null +++ b/cmd/zpool/compatibility.d/zol-0.6.5 @@ -0,0 +1,12 @@ +# Features supported by ZFSonLinux v0.6.5 +async_destroy +bookmarks +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +lz4_compress +spacemap_histogram diff --git a/cmd/zpool/compatibility.d/zol-0.7 b/cmd/zpool/compatibility.d/zol-0.7 new file mode 100644 index 000000000000..22a02936df8c --- /dev/null +++ b/cmd/zpool/compatibility.d/zol-0.7 @@ -0,0 +1,18 @@ +# Features supported by ZFSonLinux v0.7 +async_destroy +bookmarks +edonr +embedded_data +empty_bpobj +enabled_txg +extensible_dataset +filesystem_limits +hole_birth +large_blocks +large_dnode +lz4_compress +multi_vdev_crash_dump +sha512 +skein +spacemap_histogram +userobj_accounting diff --git a/cmd/zpool/compatibility.d/zol-0.8 b/cmd/zpool/compatibility.d/zol-0.8 new file mode 100644 index 000000000000..762848ef7b4b --- /dev/null +++ b/cmd/zpool/compatibility.d/zol-0.8 @@ -0,0 +1,27 @@ +# Features supported by ZFSonLinux v0.8 +allocation_classes +async_destroy +bookmark_v2 +bookmarks +device_removal +edonr +embedded_data +empty_bpobj +enabled_txg +encryption +extensible_dataset +filesystem_limits +hole_birth +large_blocks +large_dnode +lz4_compress +multi_vdev_crash_dump +obsolete_counts +project_quota +resilver_defer +sha512 +skein +spacemap_histogram +spacemap_v2 +userobj_accounting +zpool_checkpoint diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 50adc0add605..29252e6a24f4 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -31,6 +31,7 @@ * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2019, loli10K + * Copyright (c) 2021, Colm Buckley */ #include @@ -124,6 +125,9 @@ static int zpool_do_version(int, char **); static int zpool_do_wait(int, char **); +static zpool_compat_status_t zpool_do_load_compat( + const char *, boolean_t *); + /* * These libumem hooks provide a reasonable set of defaults for the allocator's * debugging facilities. @@ -782,6 +786,8 @@ add_prop_list(const char *propname, char *propval, nvlist_t **props, if (poolprop) { const char *vname = zpool_prop_to_name(ZPOOL_PROP_VERSION); + const char *fname = + zpool_prop_to_name(ZPOOL_PROP_COMPATIBILITY); if ((prop = zpool_name_to_prop(propname)) == ZPOOL_PROP_INVAL && !zpool_prop_feature(propname)) { @@ -804,6 +810,19 @@ add_prop_list(const char *propname, char *propval, nvlist_t **props, return (2); } + /* + * compatibility property and version should not be specified + * at the same time. + */ + if ((prop == ZPOOL_PROP_COMPATIBILITY && + nvlist_exists(proplist, vname)) || + (prop == ZPOOL_PROP_VERSION && + nvlist_exists(proplist, fname))) { + (void) fprintf(stderr, gettext("'compatibility' and " + "'version' properties cannot be specified " + "together\n")); + return (2); + } if (zpool_prop_feature(propname)) normnm = propname; @@ -1374,13 +1393,15 @@ zpool_do_create(int argc, char **argv) { boolean_t force = B_FALSE; boolean_t dryrun = B_FALSE; - boolean_t enable_all_pool_feat = B_TRUE; + boolean_t enable_pool_features = B_TRUE; + int c; nvlist_t *nvroot = NULL; char *poolname; char *tname = NULL; int ret = 1; char *altroot = NULL; + char *compat = NULL; char *mountpoint = NULL; nvlist_t *fsprops = NULL; nvlist_t *props = NULL; @@ -1396,7 +1417,7 @@ zpool_do_create(int argc, char **argv) dryrun = B_TRUE; break; case 'd': - enable_all_pool_feat = B_FALSE; + enable_pool_features = B_FALSE; break; case 'R': altroot = optarg; @@ -1434,11 +1455,14 @@ zpool_do_create(int argc, char **argv) ver = strtoull(propval, &end, 10); if (*end == '\0' && ver < SPA_VERSION_FEATURES) { - enable_all_pool_feat = B_FALSE; + enable_pool_features = B_FALSE; } } if (zpool_name_to_prop(optarg) == ZPOOL_PROP_ALTROOT) altroot = propval; + if (zpool_name_to_prop(optarg) == + ZPOOL_PROP_COMPATIBILITY) + compat = propval; break; case 'O': if ((propval = strchr(optarg, '=')) == NULL) { @@ -1632,10 +1656,26 @@ zpool_do_create(int argc, char **argv) ret = 0; } else { /* - * Hand off to libzfs. + * Load in feature set. + * Note: if compatibility property not given, we'll have + * NULL, which means 'all features'. */ - spa_feature_t i; - for (i = 0; i < SPA_FEATURES; i++) { + boolean_t requested_features[SPA_FEATURES]; + if (zpool_do_load_compat(compat, requested_features) != + ZPOOL_COMPATIBILITY_OK) + goto errout; + + /* + * props contains list of features to enable. + * For each feature: + * - remove it if feature@name=disabled + * - leave it there if feature@name=enabled + * - add it if: + * - enable_pool_features (ie: no '-d' or '-o version') + * - it's supported by the kernel module + * - it's in the requested feature set + */ + for (spa_feature_t i = 0; i < SPA_FEATURES; i++) { char propname[MAXPATHLEN]; char *propval; zfeature_info_t *feat = &spa_feature_table[i]; @@ -1643,18 +1683,14 @@ zpool_do_create(int argc, char **argv) (void) snprintf(propname, sizeof (propname), "feature@%s", feat->fi_uname); - /* - * Only features contained in props will be enabled: - * remove from the nvlist every ZFS_FEATURE_DISABLED - * value and add every missing ZFS_FEATURE_ENABLED if - * enable_all_pool_feat is set. - */ if (!nvlist_lookup_string(props, propname, &propval)) { if (strcmp(propval, ZFS_FEATURE_DISABLED) == 0) (void) nvlist_remove_all(props, propname); - } else if (enable_all_pool_feat && - feat->fi_zfs_mod_supported) { + } else if ( + enable_pool_features && + feat->fi_zfs_mod_supported && + requested_features[i]) { ret = add_prop_list(propname, ZFS_FEATURE_ENABLED, &props, B_TRUE); if (ret != 0) @@ -2674,8 +2710,15 @@ show_import(nvlist_t *config) case ZPOOL_STATUS_FEAT_DISABLED: printf_color(ANSI_BOLD, gettext("status: ")); - printf_color(ANSI_YELLOW, gettext("Some supported features are " - "not enabled on the pool.\n")); + printf_color(ANSI_YELLOW, gettext("Some supported and " + "requested features are not enabled on the pool.\n")); + break; + + case ZPOOL_STATUS_COMPATIBILITY_ERR: + printf_color(ANSI_BOLD, gettext("status: ")); + printf_color(ANSI_YELLOW, gettext("Error reading or parsing " + "the file(s) indicated by the 'compatibility'\n" + "property.\n")); break; case ZPOOL_STATUS_UNSUP_FEAT_READ: @@ -2767,6 +2810,12 @@ show_import(nvlist_t *config) "imported using its name or numeric identifier, " "though\n\tsome features will not be available " "without an explicit 'zpool upgrade'.\n")); + } else if (reason == ZPOOL_STATUS_COMPATIBILITY_ERR) { + (void) printf(gettext(" action: The pool can be " + "imported using its name or numeric\n\tidentifier, " + "though the file(s) indicated by its " + "'compatibility'\n\tproperty cannot be parsed at " + "this time.\n")); } else if (reason == ZPOOL_STATUS_HOSTID_MISMATCH) { (void) printf(gettext(" action: The pool can be " "imported using its name or numeric " @@ -7942,7 +7991,8 @@ status_callback(zpool_handle_t *zhp, void *data) if (cbp->cb_explain && (reason == ZPOOL_STATUS_OK || reason == ZPOOL_STATUS_VERSION_OLDER || - reason == ZPOOL_STATUS_FEAT_DISABLED)) { + reason == ZPOOL_STATUS_FEAT_DISABLED || + reason == ZPOOL_STATUS_COMPATIBILITY_ERR)) { if (!cbp->cb_allpools) { (void) printf(gettext("pool '%s' is healthy\n"), zpool_get_name(zhp)); @@ -8117,9 +8167,10 @@ status_callback(zpool_handle_t *zhp, void *data) case ZPOOL_STATUS_FEAT_DISABLED: printf_color(ANSI_BOLD, gettext("status: ")); - printf_color(ANSI_YELLOW, gettext("Some supported features are " - "not enabled on the pool. The pool can\n\tstill be used, " - "but some features are unavailable.\n")); + printf_color(ANSI_YELLOW, gettext("Some supported and " + "requested features are not enabled on the pool.\n\t" + "The pool can still be used, but some features are " + "unavailable.\n")); printf_color(ANSI_BOLD, gettext("action: ")); printf_color(ANSI_YELLOW, gettext("Enable all features using " "'zpool upgrade'. Once this is done,\n\tthe pool may no " @@ -8127,6 +8178,19 @@ status_callback(zpool_handle_t *zhp, void *data) "the features. See zpool-features(5) for details.\n")); break; + case ZPOOL_STATUS_COMPATIBILITY_ERR: + printf_color(ANSI_BOLD, gettext("status: ")); + printf_color(ANSI_YELLOW, gettext("This pool has a " + "compatibility list specified, but it could not be\n\t" + "read/parsed at this time. The pool can still be used, " + "but this\n\tshould be investigated.\n")); + printf_color(ANSI_BOLD, gettext("action: ")); + printf_color(ANSI_YELLOW, gettext("Check the value of the " + "'compatibility' property against the\n\t" + "appropriate file in " ZPOOL_SYSCONF_COMPAT_D " or " + ZPOOL_DATA_COMPAT_D ".\n")); + break; + case ZPOOL_STATUS_UNSUP_FEAT_READ: printf_color(ANSI_BOLD, gettext("status: ")); printf_color(ANSI_YELLOW, gettext("The pool cannot be accessed " @@ -8625,11 +8689,25 @@ upgrade_enable_all(zpool_handle_t *zhp, int *countp) boolean_t firstff = B_TRUE; nvlist_t *enabled = zpool_get_features(zhp); + char compat[ZFS_MAXPROPLEN]; + if (zpool_get_prop(zhp, ZPOOL_PROP_COMPATIBILITY, compat, + ZFS_MAXPROPLEN, NULL, B_FALSE) != 0) + compat[0] = '\0'; + + boolean_t requested_features[SPA_FEATURES]; + if (zpool_do_load_compat(compat, requested_features) != + ZPOOL_COMPATIBILITY_OK) + return (-1); + count = 0; for (i = 0; i < SPA_FEATURES; i++) { const char *fname = spa_feature_table[i].fi_uname; const char *fguid = spa_feature_table[i].fi_guid; - if (!nvlist_exists(enabled, fguid)) { + + if (!spa_feature_table[i].fi_zfs_mod_supported) + continue; + + if (!nvlist_exists(enabled, fguid) && requested_features[i]) { char *propname; verify(-1 != asprintf(&propname, "feature@%s", fname)); ret = zpool_set_prop(zhp, propname, @@ -8759,6 +8837,10 @@ upgrade_list_disabled_cb(zpool_handle_t *zhp, void *arg) for (i = 0; i < SPA_FEATURES; i++) { const char *fguid = spa_feature_table[i].fi_guid; const char *fname = spa_feature_table[i].fi_uname; + + if (!spa_feature_table[i].fi_zfs_mod_supported) + continue; + if (!nvlist_exists(enabled, fguid)) { if (cbp->cb_first) { (void) printf(gettext("\nSome " @@ -8847,7 +8929,7 @@ upgrade_one(zpool_handle_t *zhp, void *data) printnl = B_TRUE; } else if (cur_version == SPA_VERSION) { (void) printf(gettext("Pool '%s' already has all " - "supported features enabled.\n"), + "supported and requested features enabled.\n"), zpool_get_name(zhp)); } } @@ -9008,8 +9090,8 @@ zpool_do_upgrade(int argc, char **argv) (void) printf(gettext("All pools are already " "formatted using feature flags.\n\n")); (void) printf(gettext("Every feature flags " - "pool already has all supported features " - "enabled.\n")); + "pool already has all supported and " + "requested features enabled.\n")); } else { (void) printf(gettext("All pools are already " "formatted with version %llu or higher.\n"), @@ -9035,7 +9117,7 @@ zpool_do_upgrade(int argc, char **argv) if (cb.cb_first) { (void) printf(gettext("Every feature flags pool has " - "all supported features enabled.\n")); + "all supported and requested features enabled.\n")); } else { (void) printf(gettext("\n")); } @@ -10339,6 +10421,39 @@ zpool_do_version(int argc, char **argv) return (0); } +/* + * Do zpool_load_compat() and print error message on failure + */ +static zpool_compat_status_t +zpool_do_load_compat(const char *compat, boolean_t *list) +{ + char badword[ZFS_MAXPROPLEN]; + char badfile[MAXPATHLEN]; + zpool_compat_status_t ret; + + switch (ret = zpool_load_compat(compat, list, badword, badfile)) { + case ZPOOL_COMPATIBILITY_OK: + break; + case ZPOOL_COMPATIBILITY_READERR: + (void) fprintf(stderr, gettext("error reading compatibility " + "file '%s'\n"), badfile); + break; + case ZPOOL_COMPATIBILITY_BADFILE: + (void) fprintf(stderr, gettext("compatibility file '%s' " + "too large or not newline-terminated\n"), badfile); + break; + case ZPOOL_COMPATIBILITY_BADWORD: + (void) fprintf(stderr, gettext("unknown feature '%s' in " + "compatibility file '%s'\n"), badword, badfile); + break; + case ZPOOL_COMPATIBILITY_NOFILES: + (void) fprintf(stderr, gettext("no compatibility files " + "specified\n")); + break; + } + return (ret); +} + int main(int argc, char **argv) { diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index ab20a635d55a..d2bf0101993e 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -133,7 +133,7 @@ #include #include #include -#ifdef __GLIBC__ +#if (__GLIBC__ && !__UCLIBC__) #include /* for backtrace() */ #endif @@ -563,7 +563,7 @@ dump_debug_buffer(void) static void sig_handler(int signo) { struct sigaction action; -#ifdef __GLIBC__ /* backtrace() is a GNU extension */ +#if (__GLIBC__ && !__UCLIBC__) /* backtrace() is a GNU extension */ int nptrs; void *buffer[BACKTRACE_SZ]; diff --git a/config/Rules.am b/config/Rules.am index e9cd134edea8..99587eab2bf8 100644 --- a/config/Rules.am +++ b/config/Rules.am @@ -44,6 +44,7 @@ AM_CPPFLAGS += -DLIBEXECDIR=\"$(libexecdir)\" AM_CPPFLAGS += -DRUNSTATEDIR=\"$(runstatedir)\" AM_CPPFLAGS += -DSBINDIR=\"$(sbindir)\" AM_CPPFLAGS += -DSYSCONFDIR=\"$(sysconfdir)\" +AM_CPPFLAGS += -DPKGDATADIR=\"$(pkgdatadir)\" AM_CPPFLAGS += $(DEBUG_CPPFLAGS) AM_CPPFLAGS += $(CODE_COVERAGE_CPPFLAGS) if BUILD_LINUX diff --git a/include/libzfs.h b/include/libzfs.h index 66cedd0ee0fe..5f0bc03be144 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -28,6 +28,7 @@ * Copyright 2016 Nexenta Systems, Inc. * Copyright (c) 2017 Open-E, Inc. All Rights Reserved. * Copyright (c) 2019 Datto Inc. + * Copyright (c) 2021, Colm Buckley */ #ifndef _LIBZFS_H @@ -391,6 +392,7 @@ typedef enum { ZPOOL_STATUS_REBUILDING, /* device being rebuilt */ ZPOOL_STATUS_REBUILD_SCRUB, /* recommend scrubbing the pool */ ZPOOL_STATUS_NON_NATIVE_ASHIFT, /* (e.g. 512e dev with ashift of 9) */ + ZPOOL_STATUS_COMPATIBILITY_ERR, /* bad 'compatibility' property */ /* * Finally, the following indicates a healthy pool. @@ -912,6 +914,20 @@ int zfs_smb_acl_rename(libzfs_handle_t *, char *, char *, char *, char *); extern int zpool_enable_datasets(zpool_handle_t *, const char *, int); extern int zpool_disable_datasets(zpool_handle_t *, boolean_t); +/* + * Parse a features file for -o compatibility + */ +typedef enum { + ZPOOL_COMPATIBILITY_OK, + ZPOOL_COMPATIBILITY_READERR, + ZPOOL_COMPATIBILITY_BADFILE, + ZPOOL_COMPATIBILITY_BADWORD, + ZPOOL_COMPATIBILITY_NOFILES +} zpool_compat_status_t; + +extern zpool_compat_status_t zpool_load_compat(const char *, + boolean_t *, char *, char *); + #ifdef __FreeBSD__ /* diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 65515e3829f3..71d736d5cc97 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -27,10 +27,10 @@ * Copyright (c) 2014 Integros [integros.com] * Copyright (c) 2017, Intel Corporation. * Copyright (c) 2019 Datto Inc. + * Portions Copyright 2010 Robert Milkowski + * Copyright (c) 2021, Colm Buckley */ -/* Portions Copyright 2010 Robert Milkowski */ - #ifndef _SYS_FS_ZFS_H #define _SYS_FS_ZFS_H *** 9803 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 10:14:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6951A5321C0; Thu, 18 Feb 2021 10:14:54 +0000 (UTC) (envelope-from rscheff@gmx.at) Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh9Yp0fVZz3mw7; Thu, 18 Feb 2021 10:14:53 +0000 (UTC) (envelope-from rscheff@gmx.at) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1613643291; bh=wsdgtuuMjF3w8+x8gBBSNqGVP7kwN+9Fz01QU92ZpDA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=VSGaiKKHRMkm4Xsy37O3NXmeOx8SWb6c+xMfjmTPFeMxuGHwYOL4OnSOewtLODbFu wWXl//Dlp9fk5CiBdJckWguTvn4ohJ1WAB1tiN5sU7d4D1QAcOx2PLgdPHf+P0Ixtw Pu+OZUzghWsT0a/Fl5+tIR66S6sSxq4TB3KMTEME= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [212.95.5.214] ([212.95.5.214]) by msvc-mesg-gmx023.server.lan (via HTTP); Thu, 18 Feb 2021 11:14:51 +0100 MIME-Version: 1.0 Message-ID: From: rscheff@gmx.at To: Navdeep Parhar Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, Randall Stewart , src-committers Subject: Re: Re: git: 0a4f851074a3 - main - Fix another pesky missing #ifdef TCPHPTS Content-Type: text/plain; charset=UTF-8 Date: Thu, 18 Feb 2021 11:14:51 +0100 In-Reply-To: References: <202102180627.11I6Rxa4030228@gitrepo.freebsd.org> X-Provags-ID: V03:K1:wFrKxsVDDmXDW0vEHokhfAPyKEwa62/ApO2p0mLOSkWSqhWyRdCmmdH3vwW1MdjHZ+YRj if6fd5j3QvrLTdFInxDC/74kODtiOGg8E45AGG4kOzvjji1fov4jb8IBYJm0z+cQ7YWY2d2a4rzr cI2qrqVsItVx+5So0FV8zsPfGMCAIwa/TlBWGa/BVnl9ChleynRHvRrRbcZvxfyfP5vhnS69JEPy eRqcY+FJX3L8kk7aCm9ymdFdf5acbhk4nRsF/wOdZBjdAOqgxFIxxBiqPKFpKXL7xBwq+D+7+n/k gA= X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ARKyZyxohp4=:Fi8LpkqpkX1VtNKSIsn8Ok dl8OYqaQfK4yOuUtReO1nCjcd3Xv7CgVuIoIsfpyj5epxGyQqFv38+LVzSimlJFaqqVJ5p4Ac N+MHmOeKkgA67rqdA+gnbWdps6raMQUMUPcdiZHKvo85TADFCmrLoUO0v6DoKVrqb1BPUC0AK nmh81MVlKayh2LHmg2pa5vGl/T8a4EjVpfKy4PzrLGVN4e1gE6Tq3+3YT2cBU6Npz4RnfrbaZ hEsLJ8BcX90M833SZUjDe387TKmGxMWSMvrNCPohSdTLuEvSLNJPJo2GhoA/SIz/koCIuni6u CYjwn9QhnzBbGkOckd8Tw6uwFz7PGPvYf5pcC8uuMZpSCt8jtQmVeLZ2jeGmZg+VPIwCs0OAq H6hHL2mmuyBIN+19NnchnTl+ThyFLb4+eft/AyVBkT+Osd1kLNDzuvC72HuhMaND9ScDa22nc IxYzX+JWJM9COz7keE0m8mCB9hnPRyrFRzejjF7n6zKLb2ZqZcrz6QPSNzTO0IathAbl0Ax3t ec1GwbL/TGw6kTwqHMHPwKXUrxwiXilxocXVvVW8V5DfIZsdsGpqRa0aqIP0tknSkVRInb6L4 jFSiA8YXhXZEY= Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Dh9Yp0fVZz3mw7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 10:14:54 -0000 I remember having added this in the driver to expose the tos byte for tso/= lro operations; interesting that it is unused now. Hope the IP ECN flags are still propagated in the fastpath.... Gesendet mit der GMX Mail App Am 18.02.21 um 09:48 schrieb Navdeep Parhar > I still get build failures in tcp_lro.c for i386/amd64 LINT-NOINET > builds after this. > > --- tcp_lro.o --- > /storage/src/head/sys/netinet/tcp_lro.c:1359:10: error: unused > variable 'iptos' [-Werror,-Wunused-variable] > uint8_t iptos; > ^ > 1 error generated. > *** [tcp_lro.o] Error code 1 > > make[5]: stopped in /storage/obj/storage/src/head/amd64.amd64/sys/LINT-N= OINET > > Regards, > Navdeep > > On Wed, Feb 17, 2021 at 10:28 PM Randall Stewart wrote= : > > > > The branch main has been updated by rrs: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D0a4f851074a3ca74cd4859c= 20e7d9807b2aeca65 > > > > commit 0a4f851074a3ca74cd4859c20e7d9807b2aeca65 > > Author: Randall Stewart > > AuthorDate: 2021-02-18 06:27:30 +0000 > > Commit: Randall Stewart > > CommitDate: 2021-02-18 06:27:30 +0000 > > > > Fix another pesky missing #ifdef TCPHPTS > > --- > > sys/netinet/tcp_lro.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c > > index 199b7f9a79a0..a8e751b67071 100644 > > --- a/sys/netinet/tcp_lro.c > > +++ b/sys/netinet/tcp_lro.c > > @@ -470,6 +470,7 @@ tcp_lro_rx_ipv4(struct lro_ctrl *lc, struct mbuf *= m, struct ip *ip4, > > } > > #endif > > > > +#ifdef TCPHPTS > > static void > > tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, > > struct lro_entry *le, struct mbuf *m, int frm, int32_t tcp= _data_len, > > @@ -520,6 +521,7 @@ tcp_lro_log(struct tcpcb *tp, struct lro_ctrl *lc, > > 0, &log, false, &tv); > > } > > } > > +#endif > > > > static void > > tcp_flush_out_le(struct tcpcb *tp, struct lro_ctrl *lc, struct lro_en= try *le) > From owner-dev-commits-src-all@freebsd.org Thu Feb 18 10:19:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0D64A532A06; Thu, 18 Feb 2021 10:19:08 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dh9fg6sfpz3n1W; Thu, 18 Feb 2021 10:19:07 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ej1-f46.google.com with SMTP id g5so4566442ejt.2; Thu, 18 Feb 2021 02:19:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=FkwOadppfJpiHj3u2c/OLplqR9BqZg/VDaiHuBPxGy4=; b=jX1mtr3DMAkLQ10HLkbHK2yt2qqvN//QFEnTNELt0qrtlpomcqWKUkM0cs1fOErwBp SSWHxNN8voGmegjC0dTpVZvI03je+UMAJY0RxHSF2kLc/eDpXFRTo4PnYB7S7Pj+RlJI YFT6qAG4Bef0mB/o60AoqEJAAXpU6L/S04Ezk9NMZHG1YBm3ShsZ6cD3/5hXN5fusDyB u0grHCwbiqijj1BR/B3DefLfEpoEIFM7CqxsnLK0yZgxy8+YTk1dTxVaiHT5c40gqa8E HXYNSo5Y7+TOVxtvhsaGVVW3n8/s+IjiS8ayKjsujerIPTtMVZWHZ2t+EmszrCwx9Qqe gfmw== X-Gm-Message-State: AOAM533LE12poR3FKBl6a6myvkUCumCoZoNZiyXte06G4KbwQ5GREOWP uReN7sfyPAbkrcxyZBWGYThAMC4PahUzcQ== X-Google-Smtp-Source: ABdhPJwR4bRKWgONOVD93QkUNuAGp8fSTGRbsfXJifn/v/azcDuwih8TS6lVS16iiT5TbjFevnpjWw== X-Received: by 2002:a17:906:c049:: with SMTP id bm9mr3169788ejb.535.1613643546308; Thu, 18 Feb 2021 02:19:06 -0800 (PST) Received: from [192.168.0.202] (ip5f5af629.dynamic.kabel-deutschland.de. [95.90.246.41]) by smtp.gmail.com with ESMTPSA id b17sm2418703edv.56.2021.02.18.02.19.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Feb 2021 02:19:05 -0800 (PST) Subject: Re: git: f61e92ca5a23 - main - release: permanently remove the 'reldoc' target and associates To: Glen Barber , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202102180400.11I40MEe041138@gitrepo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: Date: Thu, 18 Feb 2021 11:19:45 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <202102180400.11I40MEe041138@gitrepo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 4Dh9fg6sfpz3n1W X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 10:19:08 -0000 Hi Glen, On 18/02/2021 05:00, Glen Barber wrote: > The branch main has been updated by gjb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=f61e92ca5a23450bc28169bbdd71d7674df98c19 > > commit f61e92ca5a23450bc28169bbdd71d7674df98c19 > Author: Glen Barber > AuthorDate: 2021-02-18 04:00:03 +0000 > Commit: Glen Barber > CommitDate: 2021-02-18 04:00:03 +0000 > > release: permanently remove the 'reldoc' target and associates > > Following 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac, the structure > for the reldoc target has significantly changed as result of the > ASCIIDoctor/Hugo migration. As the release notes related files > on the installation medium are inherently out of date, purge them > entirely. > We've got to update the release(7) manual after this commit. I've opened a PR on Bugzilla for that: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253615 Cheers, Mateusz From owner-dev-commits-src-all@freebsd.org Thu Feb 18 12:46:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 67D88536A04; Thu, 18 Feb 2021 12:46:29 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay114.isp.belgacom.be (mailrelay114.isp.belgacom.be [195.238.20.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign RSA OV SSL CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhDwh4VvJz4RHx; Thu, 18 Feb 2021 12:46:28 +0000 (UTC) (envelope-from tijl@freebsd.org) IronPort-SDR: KHGenJt7xZwth9oKwZTMHennWwwJJ2LsZZt71S9vE9aB25GYBRZVjplDnk64YSkoMHMCyYIPu4 prbmNYlcEW+E0I6ndz/qY1XrVkiHD3wPqeeyMDjX37qnyE1gt8K+CXA0INMA5IjjUI99NUZT0n sQg78bngU1MeeILktVSiq4R2q0xHyGA1IFOfZgrSRrbGFCfRWhu8OQaiZFbKphmsoIdvv5NyD7 9DeelginMGGefcffCnheFiR9EsBwRnFdo4OaM0naxqWuQ334+PJdBBi3iTh5zmm+Fs8xN/7O2R Uw4= IronPort-PHdr: =?us-ascii?q?9a23=3AaNHRkhVW9IWCX22g6ZEVW1ZUDQrV8LGtZVwlr6?= =?us-ascii?q?E/grcLSJyIuqrYZRaCuKdThVPEFb/W9+hDw7KP9fy5CCpfvd3Y4TgrS99lb1?= =?us-ascii?q?c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUh?= =?us-ascii?q?rwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrqQjdrMsbjIRtJqoszh?= =?us-ascii?q?bCv2dFdflRyW50P1yYggzy5t23/J5t8iRQv+wu+stdWqjkfKo2UKJVAi0+P2?= =?us-ascii?q?86+MPkux/DTRCS5nQHSWUZjgBIAwne4x7kWJr6rzb3ufB82CmeOs32UKw0VD?= =?us-ascii?q?G/5KplVBPklCEKPCMi/WrJlsJ/kr5UoBO5pxx+3YHUZp2VNOFjda/ZZN8WWH?= =?us-ascii?q?ZNUtpUWyFHH4iybZYAD/AZMOhWr4fzuUYAoxi8CgmiC+zg1jBGi2Tq3aA4ye?= =?us-ascii?q?ktDR3K0BA+E98IrX/arM/1NKAXUe2t0qfKyDHDZO5I1Df674jIaQ4uofSWUr?= =?us-ascii?q?J2asra1E4iFx/EjlWSrYzoJDOb1v4TvGeF8uduSOyhh3QgqwFrrTii38EhgZ?= =?us-ascii?q?TGiYwJ0F7L7zl5wJorKt2iTk52ed2pHZhRuiyZN4V6X8MsTmJotig6xbAIt5?= =?us-ascii?q?61cDQUxJkn2xPSavKJfoqW7hzsSeqcPDd1iGxldr++hxu/70eux+36W8Kp3l?= =?us-ascii?q?hKqS9FncPNtnALzxHT5NKHReVj8Ui6wjaAyhrf6uZeIUA7jabbJJghwqMqmp?= =?us-ascii?q?oUq0TDESn7k1j1gq+Obkgp+fWk5/75brjpuJOQLZJ4hwPgPqg0lcGyB/kzPB?= =?us-ascii?q?IUUGiB4+u80aXu/Uj+QLpXkPI7irLZsJXGJcQDoa65HhNV3p4j6xmhCzem18?= =?us-ascii?q?wVnXodI1JBeRKHipbmO0vJIPziEfe/glaskDNxy//aOb3hBY7NIWbGkLj7e7?= =?us-ascii?q?Z98FRQyA0pzdBQ/55UC7cBL+zvWkLpt9HUEwU1PxK7zur5Etlxy4ETVXyVDq?= =?us-ascii?q?KWKK/StEWH5uMrI+mCfo8VvzP9JuA55/7vj385nUQQfaez3ZQJdn+3Be9mLF?= =?us-ascii?q?iDbXrrmNcBHn8GvhAiQ+zylF2CTTlTam6vUK0i+DE3EZ6pDYDGRoCogbyBwD?= =?us-ascii?q?y7EoRNZmBcFl+ACHLoeJ+FW/cKcy+SLNVhnSIaWre6UI8uyAuitAjgy7poNu?= =?us-ascii?q?DU4DEXtYr/1Nhp4O3ejQw9+iJqD8iEz26NSGR0nmYJRz8qx6BzuFd9yk2f3q?= =?us-ascii?q?RhmfNYEdhT6uhHUgcgK5HT0fd1C8vvVQ7bedeJUlmmSM28AT4tVtIx38MOY0?= =?us-ascii?q?FlFtW5lBDMwzOmDKMSl7yOAZw0877c32TvKMZn0HbLz6chj0M4TcRRLmKmnb?= =?us-ascii?q?Nw+xLUB47TnEWTj7yqergE3C7R6GeDynKDvENYUAFrSqjFU2ofaVXIotvi/U?= =?us-ascii?q?PNUqWiCbM9MgtO0cSCMLdFasX1jVVaQ/fuIM7eY2awm2irHhmJxqiBbITwe2?= =?us-ascii?q?oDwirSE1MEnB0J8XaBLwg+CT+ro3jCAzx2CVLvf0Ts/PFkp3OhT0870wGKYF?= =?us-ascii?q?d717Wo4R4VgvqcRugd3rIepigutS57HE2g0N7MDNqAvQVhL+1gZoYU5FpX3G?= =?us-ascii?q?TVuhY1BJ2rL6l4ikUZdUwjtlnv3BV+EIlbls4ComknwQBpJeSfylwXJB2C2p?= =?us-ascii?q?WlBlrTYkL1+wuibqfQwRmKzNeU/o8h8vk1gW7P+gazGRxxoD1cz9BJ3i7Etd?= =?us-ascii?q?3xBw0IXMe0Cx5v+g=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BEAABSYS5g/wSs8lFiGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQEBAQEBARIBAQEBAQEBAQEBAQFAB4FIgwwVVgFQGo1FhjqCFgM3AYh?= =?us-ascii?q?BgiiRJwsBAQEBAQEBAQEzCgQBAYRNAoIMJjgTAgMBAQEDAgUBAQYBAQEBAQE?= =?us-ascii?q?FBAGGGDkNgjgpAYNjAQUnEz8QCw4KIwtXBhMbglGDCguueoEBM4Q/AYUOgQI?= =?us-ascii?q?GgTgBjT9CggKEKz6CRhcBAxeBKIYTBIJGAT0+EwEbCAgggTk6ATcpj3WMX5x?= =?us-ascii?q?OgwWJOpJFMaM2hjKZP5IbA4ZKgXpNMAiDJFAZDY4rFhSITYVGQAMvAgksAgY?= =?us-ascii?q?KAQEDCYwTAQE?= X-IPAS-Result: =?us-ascii?q?A2BEAABSYS5g/wSs8lFiGQEBAQEBAQEBAQEBAQEBAQEBA?= =?us-ascii?q?RIBAQEBAQEBAQEBAQFAB4FIgwwVVgFQGo1FhjqCFgM3AYhBgiiRJwsBAQEBA?= =?us-ascii?q?QEBAQEzCgQBAYRNAoIMJjgTAgMBAQEDAgUBAQYBAQEBAQEFBAGGGDkNgjgpA?= =?us-ascii?q?YNjAQUnEz8QCw4KIwtXBhMbglGDCguueoEBM4Q/AYUOgQIGgTgBjT9CggKEK?= =?us-ascii?q?z6CRhcBAxeBKIYTBIJGAT0+EwEbCAgggTk6ATcpj3WMX5xOgwWJOpJFMaM2h?= =?us-ascii?q?jKZP5IbA4ZKgXpNMAiDJFAZDY4rFhSITYVGQAMvAgksAgYKAQEDCYwTAQE?= Received: from 4.172-242-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.242.172.4]) by relay.proximus.be with ESMTP; 18 Feb 2021 13:46:17 +0100 Received: from localhost (localhost [127.0.0.1]) by kalimero.tijl.coosemans.org (8.16.1/8.16.1) with ESMTP id 11ICkFEi013384; Thu, 18 Feb 2021 13:46:16 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Thu, 18 Feb 2021 13:46:14 +0100 From: =?UTF-8?B?VMSzbA==?= Coosemans To: Alexander Richardson Cc: Ryan Libby , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8fa6abb6f4f6 - main - Expose clang's alignment builtins and use them for roundup2/rounddown2 Message-ID: <20210218134614.376e4eaa@FreeBSD.org> In-Reply-To: References: <202102031604.113G4SQq019037@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DhDwh4VvJz4RHx X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 12:46:29 -0000 On Wed, 17 Feb 2021 21:01:05 +0000 Alexander Richardson wrote: > On Wed, 17 Feb 2021 at 20:46, Ryan Libby wrote: >> On Wed, Feb 3, 2021 at 8:04 AM Alex Richardson wrote: >>> The branch main has been updated by arichardson: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=8fa6abb6f4f64f4f23e2920e2aea7996566851a4 >>> >>> commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4 >>> Author: Alex Richardson >>> AuthorDate: 2021-02-03 15:27:17 +0000 >>> Commit: Alex Richardson >>> CommitDate: 2021-02-03 16:02:54 +0000 >>> >>> Expose clang's alignment builtins and use them for roundup2/rounddown2 >>> >>> This makes roundup2/rounddown2 type- and const-preserving and allows >>> using it on pointer types without casting to uintptr_t first. Not >>> performing pointer-to-integer conversions also helps the compiler's >>> optimization passes and can therefore result in better code generation. >>> When using it with integer values there should be no change other than >>> the compiler checking that the alignment value is a valid power-of-two. >>> >>> I originally implemented these builtins for CHERI a few years ago and >>> they have been very useful for CheriBSD. However, they are also useful >>> for non-CHERI code so I was able to upstream them for Clang 10.0. >>> >>> Rationale from the clang documentation: >>> Clang provides builtins to support checking and adjusting alignment >>> of pointers and integers. These builtins can be used to avoid relying >>> on implementation-defined behavior of arithmetic on integers derived >>> from pointers. Additionally, these builtins retain type information >>> and, unlike bitwise arithmetic, they can perform semantic checking on >>> the alignment value. >>> >>> There is also a feature request for GCC, so GCC may also support it in >>> the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98641 >>> >>> Reviewed By: brooks, jhb, imp >>> Differential Revision: https://reviews.freebsd.org/D28332 >>> --- >>> sys/sys/cdefs.h | 19 +++++++++++++++++++ >>> sys/sys/param.h | 4 ++-- >>> 2 files changed, 21 insertions(+), 2 deletions(-) >>> >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>> index 75bedd4b8128..72ef942084f2 100644 >>> --- a/sys/sys/cdefs.h >>> +++ b/sys/sys/cdefs.h >>> @@ -884,4 +884,23 @@ >>> #define __guarded_by(x) __lock_annotate(guarded_by(x)) >>> #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) >>> >>> +/* Alignment builtins for better type checking and improved code generation. */ >>> +/* Provide fallback versions for other compilers (GCC/Clang < 10): */ >>> +#if !__has_builtin(__builtin_is_aligned) >>> +#define __builtin_is_aligned(x, align) \ >>> + (((__uintptr_t)x & ((align) - 1)) == 0) >>> +#endif >>> +#if !__has_builtin(__builtin_align_up) >>> +#define __builtin_align_up(x, align) \ >>> + ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) >>> +#endif >>> +#if !__has_builtin(__builtin_align_down) >>> +#define __builtin_align_down(x, align) \ >>> + ((__typeof__(x))((x)&(~((align)-1)))) >>> +#endif >>> + >>> +#define __align_up(x, y) __builtin_align_up(x, y) >>> +#define __align_down(x, y) __builtin_align_down(x, y) >>> +#define __is_aligned(x, y) __builtin_is_aligned(x, y) >>> + >> >> Since these are only valid for powers of 2, I think it would be good to >> indicate that in the names (__align_up2() etc). >> >>> #endif /* !_SYS_CDEFS_H_ */ >>> diff --git a/sys/sys/param.h b/sys/sys/param.h >>> index 079357a19d47..d6f1eb21dcd2 100644 >>> --- a/sys/sys/param.h >>> +++ b/sys/sys/param.h >>> @@ -305,9 +305,9 @@ >>> #endif >>> #define nitems(x) (sizeof((x)) / sizeof((x)[0])) >>> #define rounddown(x, y) (((x)/(y))*(y)) >>> -#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */ >>> +#define rounddown2(x, y) __align_down(x, y) /* if y is power of two */ >>> #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */ >>> -#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ >>> +#define roundup2(x, y) __align_up(x, y) /* if y is powers of two */ >>> #define powerof2(x) ((((x)-1)&(x))==0) >>> >>> /* Macros for min/max. */ >> >> This broke the gcc build: >> https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc6_build/3200/console >> 00:40:30 --- all_subdir_firewire --- >> 00:40:30 In file included from /workspace/src/sys/sys/types.h:43:0, >> 00:40:30 from /workspace/src/sys/sys/param.h:99, >> 00:40:30 from /workspace/src/sys/dev/firewire/fwohci.c:40: >> 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c: In function >> 'fwohci_get_plen': >> 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c:2699:17: error: >> 'typeof' applied to a bit-field >> 00:40:30 r += roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); >> >> We could: >> - Drop the cast for the fallback. >> - Cast with (__typeof__(+(x))) which unfortunately promotes e.g. char >> to int but otherwise I think behaves okay, and the promotion was >> previously happening for roundup2/rounddown2 anyway. >> - Punt the casting burden to callers of roundup2/rounddown2. > > https://reviews.freebsd.org/D28599 fixes this specific issue. One > reason for the typeof() is to allow using it with pointer types. > Currently there are no such uses, but we have some in CheriBSD. > Unfortunately +(x) would break that. (x)+0 should work for most cases, > but does break void*. > I believe the current approach only breaks with bitfields (which is > hopefully rare), so I think adding casts for GCC when roundup2() in > those cases might be the simplest solution. The comma operator might work here: typeof(((void)0,(x))). From owner-dev-commits-src-all@freebsd.org Thu Feb 18 12:51:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6BE12537117; Thu, 18 Feb 2021 12:51: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 4DhF2l2DSlz4RyD; Thu, 18 Feb 2021 12:51: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 211AC188CF; Thu, 18 Feb 2021 12:51: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 11ICphL7033791; Thu, 18 Feb 2021 12:51:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ICpheY033790; Thu, 18 Feb 2021 12:51:43 GMT (envelope-from git) Date: Thu, 18 Feb 2021 12:51:43 GMT Message-Id: <202102181251.11ICpheY033790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Randall Stewart Subject: git: e13e4fa6c4eb - main - fix Navdeeps LINT_NOINET error. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rrs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e13e4fa6c4eba72de5c4685942de5dbe8f43db73 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 12:51:43 -0000 The branch main has been updated by rrs: URL: https://cgit.FreeBSD.org/src/commit/?id=e13e4fa6c4eba72de5c4685942de5dbe8f43db73 commit e13e4fa6c4eba72de5c4685942de5dbe8f43db73 Author: Randall Stewart AuthorDate: 2021-02-18 12:29:12 +0000 Commit: Randall Stewart CommitDate: 2021-02-18 12:29:12 +0000 fix Navdeeps LINT_NOINET error. --- sys/netinet/tcp_lro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index a8e751b67071..b4d64b8a6893 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1356,7 +1356,9 @@ do_bpf_and_csum(struct inpcb *inp, struct lro_ctrl *lc, struct lro_entry *le, uint16_t drop_hdrlen; int etype, tlen; +#ifdef INET uint8_t iptos; +#endif /* Let the BPF see the packet */ if (bpf_req && lc->ifp) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 12:54:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E1E87537249; Thu, 18 Feb 2021 12:54:49 +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 4DhF6K62yvz4SmG; Thu, 18 Feb 2021 12:54:49 +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 C25CC18C05; Thu, 18 Feb 2021 12:54:49 +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 11ICsnIB038134; Thu, 18 Feb 2021 12:54:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ICsnho038133; Thu, 18 Feb 2021 12:54:49 GMT (envelope-from git) Date: Thu, 18 Feb 2021 12:54:49 GMT Message-Id: <202102181254.11ICsnho038133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 1c808fcd859f - main - Allocate BAR for ENA MSIx vector table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c808fcd859f5ce24132a903a4c7c9996e0513b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 12:54:49 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=1c808fcd859f5ce24132a903a4c7c9996e0513b1 commit 1c808fcd859f5ce24132a903a4c7c9996e0513b1 Author: Michal Krawczyk AuthorDate: 2021-02-18 09:00:58 +0000 Commit: Marcin Wojtas CommitDate: 2021-02-18 12:54:36 +0000 Allocate BAR for ENA MSIx vector table In the new ENA-based instances like c6gn, the vector table moved to a new PCIe bar - BAR1. Previously it was always located on the BAR0, so the resources were already allocated together with the registers. As the FreeBSD isn't doing any resource allocation behind the scenes, the driver is responsible to allocate them explicitly, before other parts of the OS (like the PCI code allocating MSIx) will be able to access them. To determine dynamically BAR on which the MSIx vector table is present the pci_msix_table_bar() is being used and the new BAR is allocated if needed. Submitted by: Michal Krawczyk Obtained from: Semihalf Sponsored by: Amazon, Inc MFC after: 3 days --- sys/dev/ena/ena.c | 21 +++++++++++++++++++++ sys/dev/ena/ena.h | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/sys/dev/ena/ena.c b/sys/dev/ena/ena.c index b0e05f23b563..680eb0e9d049 100644 --- a/sys/dev/ena/ena.c +++ b/sys/dev/ena/ena.c @@ -299,6 +299,11 @@ ena_free_pci_resources(struct ena_adapter *adapter) bus_release_resource(pdev, SYS_RES_MEMORY, PCIR_BAR(ENA_REG_BAR), adapter->registers); } + + if (adapter->msix != NULL) { + bus_release_resource(pdev, SYS_RES_MEMORY, + adapter->msix_rid, adapter->msix); + } } static int @@ -3532,6 +3537,7 @@ ena_attach(device_t pdev) struct ena_adapter *adapter; struct ena_com_dev *ena_dev = NULL; uint32_t max_num_io_queues; + int msix_rid; int rid, rc; adapter = device_get_softc(pdev); @@ -3570,6 +3576,20 @@ ena_attach(device_t pdev) goto err_dev_free; } + /* MSIx vector table may reside on BAR0 with registers or on BAR1. */ + msix_rid = pci_msix_table_bar(pdev); + if (msix_rid != rid) { + adapter->msix = bus_alloc_resource_any(pdev, SYS_RES_MEMORY, + &msix_rid, RF_ACTIVE); + if (unlikely(adapter->msix == NULL)) { + device_printf(pdev, + "unable to allocate bus resource: msix!\n"); + rc = ENOMEM; + goto err_pci_free; + } + adapter->msix_rid = msix_rid; + } + ena_dev->bus = malloc(sizeof(struct ena_bus), M_DEVBUF, M_WAITOK | M_ZERO); @@ -3735,6 +3755,7 @@ err_com_free: ena_com_mmio_reg_read_request_destroy(ena_dev); err_bus_free: free(ena_dev->bus, M_DEVBUF); +err_pci_free: ena_free_pci_resources(adapter); err_dev_free: free(ena_dev, M_DEVBUF); diff --git a/sys/dev/ena/ena.h b/sys/dev/ena/ena.h index 28da047e2e1b..f3e92f31341a 100644 --- a/sys/dev/ena/ena.h +++ b/sys/dev/ena/ena.h @@ -41,7 +41,7 @@ #define DRV_MODULE_VER_MAJOR 2 #define DRV_MODULE_VER_MINOR 3 -#define DRV_MODULE_VER_SUBMINOR 0 +#define DRV_MODULE_VER_SUBMINOR 1 #define DRV_MODULE_NAME "ena" @@ -398,6 +398,8 @@ struct ena_adapter { /* OS resources */ struct resource *memory; struct resource *registers; + struct resource *msix; + int msix_rid; struct sx global_lock; From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:03:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8A37C539665; Thu, 18 Feb 2021 14:03: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 4DhGf63Tzqz4Xyh; Thu, 18 Feb 2021 14:03: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 6A2DE199EA; Thu, 18 Feb 2021 14:03: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 11IE3wUL030861; Thu, 18 Feb 2021 14:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IE3wxL030860; Thu, 18 Feb 2021 14:03:58 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:03:58 GMT Message-Id: <202102181403.11IE3wxL030860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 2aa3ef285a23 - main - libc: Fix t_spawn_fileactions test after ATF update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2aa3ef285a23d802f0bd6c7281612e16834e9b68 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:03:58 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=2aa3ef285a23d802f0bd6c7281612e16834e9b68 commit 2aa3ef285a23d802f0bd6c7281612e16834e9b68 Author: Alex Richardson AuthorDate: 2021-02-18 10:07:51 +0000 Commit: Alex Richardson CommitDate: 2021-02-18 14:02:47 +0000 libc: Fix t_spawn_fileactions test after ATF update Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da ATF opens the results file on startup. This fixes problems like capsicumized tests not being able to open the file on exit. However, this test closes all file descriptors above 3 to get a deterministic fd table allocation for the child. Instead of using closefrom (which will close the ATF output file FD) I've changed this test use the lowest available fd and pass that to the helper program as a string. We could also try to re-open the results file in ATF if we get a EBADF error, but that will fail when running under Capsicum. Reviewed By: cem Differential Revision: https://reviews.freebsd.org/D28684 --- .../lib/libc/gen/posix_spawn/h_fileactions.c | 47 ++++++++++++++-------- .../lib/libc/gen/posix_spawn/t_fileactions.c | 22 ++++++---- 2 files changed, 45 insertions(+), 24 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/h_fileactions.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/h_fileactions.c index d92337074481..fd7fb21ad6f5 100644 --- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/h_fileactions.c +++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/h_fileactions.c @@ -49,48 +49,61 @@ int main(int argc, char **argv) { int res = EXIT_SUCCESS; + long lowfd; char buf[BUFSIZE]; struct stat sb0, sb1; + if (argc < 2) { + fprintf(stderr, "%s: Not enough arguments: %d\n", getprogname(), + argc); + return EXIT_FAILURE; + } + lowfd = strtol(argv[1], NULL, 10); + if (lowfd < 3) { + fprintf(stderr, "%s: Invalid lowfd %d (as str: %s) \n", + getprogname(), argc, argv[1]); + return EXIT_FAILURE; + } + strcpy(buf, "test..."); - /* file desc 3 should be closed via addclose */ - if (read(3, buf, BUFSIZE) != -1 || errno != EBADF) { - fprintf(stderr, "%s: filedesc 3 is not closed\n", + /* First fd should be closed via addclose */ + if (read(lowfd, buf, BUFSIZE) != -1 || errno != EBADF) { + fprintf(stderr, "%s: first filedesc is not closed\n", getprogname()); res = EXIT_FAILURE; } - /* file desc 4 should be closed via closeonexec */ - if (read(4, buf, BUFSIZE) != -1 || errno != EBADF) { - fprintf(stderr, "%s: filedesc 4 is not closed\n", + /* Next file desc should be closed via closeonexec */ + if (read(lowfd + 1, buf, BUFSIZE) != -1 || errno != EBADF) { + fprintf(stderr, "%s: filedesc +1 is not closed\n", getprogname()); res = EXIT_FAILURE; } - /* file desc 5 remains open */ - if (write(5, buf, BUFSIZE) <= 0) { - fprintf(stderr, "%s: could not write to filedesc 5\n", + /* file desc + 2 remains open */ + if (write(lowfd + 2, buf, BUFSIZE) <= 0) { + fprintf(stderr, "%s: could not write to filedesc +2\n", getprogname()); res = EXIT_FAILURE; } - /* file desc 6 should be open (via addopen) */ - if (write(6, buf, BUFSIZE) <= 0) { - fprintf(stderr, "%s: could not write to filedesc 6\n", + /* file desc + 3 should be open (via addopen) */ + if (write(lowfd + 3, buf, BUFSIZE) <= 0) { + fprintf(stderr, "%s: could not write to filedesc +3\n", getprogname()); res = EXIT_FAILURE; } - /* file desc 7 should refer to stdout */ + /* file desc + 4 should refer to stdout */ fflush(stdout); if (fstat(fileno(stdout), &sb0) != 0) { fprintf(stderr, "%s: could not fstat stdout\n", getprogname()); res = EXIT_FAILURE; } - if (fstat(7, &sb1) != 0) { - fprintf(stderr, "%s: could not fstat filedesc 7\n", + if (fstat(lowfd + 4, &sb1) != 0) { + fprintf(stderr, "%s: could not fstat filedesc +4\n", getprogname()); res = EXIT_FAILURE; } - if (write(7, buf, strlen(buf)) <= 0) { - fprintf(stderr, "%s: could not write to filedesc 7\n", + if (write(lowfd + 4, buf, strlen(buf)) <= 0) { + fprintf(stderr, "%s: could not write to filedesc +4\n", getprogname()); res = EXIT_FAILURE; } diff --git a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c index 74009a805758..b3d364207fbb 100644 --- a/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c +++ b/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c @@ -301,26 +301,34 @@ ATF_TC_BODY(t_spawn_fileactions, tc) { int fd1, fd2, fd3, status, err; pid_t pid; - char * const args[2] = { __UNCONST("h_fileactions"), NULL }; + char *args[3] = { __UNCONST("h_fileactions"), NULL, NULL }; + int lowfd; + char lowfdstr[32]; char helper[FILENAME_MAX]; posix_spawn_file_actions_t fa; posix_spawn_file_actions_init(&fa); - closefrom(fileno(stderr)+1); + /* Note: this assumes no gaps in the fd table */ + lowfd = open("/", O_RDONLY); + ATF_REQUIRE(lowfd > 0); + ATF_REQUIRE_EQ(0, close(lowfd)); + snprintf(lowfdstr, sizeof(lowfdstr), "%d", lowfd); + args[1] = lowfdstr; fd1 = open("/dev/null", O_RDONLY); - ATF_REQUIRE(fd1 == 3); + ATF_REQUIRE_EQ(fd1, lowfd); fd2 = open("/dev/null", O_WRONLY, O_CLOEXEC); - ATF_REQUIRE(fd2 == 4); + ATF_REQUIRE_EQ(fd2, lowfd + 1); fd3 = open("/dev/null", O_WRONLY); - ATF_REQUIRE(fd3 == 5); + ATF_REQUIRE_EQ(fd3, lowfd + 2); posix_spawn_file_actions_addclose(&fa, fd1); - posix_spawn_file_actions_addopen(&fa, 6, "/dev/null", O_RDWR, 0); - posix_spawn_file_actions_adddup2(&fa, 1, 7); + posix_spawn_file_actions_addopen(&fa, lowfd + 3, "/dev/null", O_RDWR, + 0); + posix_spawn_file_actions_adddup2(&fa, 1, lowfd + 4); snprintf(helper, sizeof helper, "%s/h_fileactions", atf_tc_get_config_var(tc, "srcdir")); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:03:59 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A04E5539992; Thu, 18 Feb 2021 14:03: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 4DhGf74CQ7z4YC5; Thu, 18 Feb 2021 14:03: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 8365319549; Thu, 18 Feb 2021 14:03: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 11IE3xlU030879; Thu, 18 Feb 2021 14:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IE3xJd030878; Thu, 18 Feb 2021 14:03:59 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:03:59 GMT Message-Id: <202102181403.11IE3xJd030878@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: cbcfe28f9d5f - main - libc/qsort: Don't allow interposing recursive calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbcfe28f9d5f975f97b7fb4a0d72bc9780eb0c46 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:03:59 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=cbcfe28f9d5f975f97b7fb4a0d72bc9780eb0c46 commit cbcfe28f9d5f975f97b7fb4a0d72bc9780eb0c46 Author: Alex Richardson AuthorDate: 2021-02-18 10:12:29 +0000 Commit: Alex Richardson CommitDate: 2021-02-18 14:02:48 +0000 libc/qsort: Don't allow interposing recursive calls This causes problems when using ASAN with a runtime older than 12.0 since the intercept does not expect qsort() to call itself using an interposable function call. This results in infinite recursion and stack exhaustion when a binary compiled with -fsanitize=address calls qsort. See also https://bugs.llvm.org/show_bug.cgi?id=46832 and https://reviews.llvm.org/D84509 (ASAN runtime patch). To prevent this problem, this patch uses a static helper function for the actual qsort() implementation. This prevents interposition and allows for direct calls. As a nice side-effect, we can also move the qsort_s checks to the top-level function and out of the recursive calls. Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D28133 --- lib/libc/stdlib/qsort.c | 98 ++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 27d03ea8e829..cfd2d99025f0 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -91,41 +91,23 @@ __unused :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); } +/* + * The actual qsort() implementation is static to avoid preemptible calls when + * recursing. Also give them different names for improved debugging. + */ #if defined(I_AM_QSORT_R) -void -qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) +#define local_qsort local_qsort_r #elif defined(I_AM_QSORT_S) -errno_t -qsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *thunk) -#else -#define thunk NULL -void -qsort(void *a, size_t n, size_t es, cmp_t *cmp) +#define local_qsort local_qsort_s #endif +static void +local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d1, d2; int cmp_result; int swap_cnt; -#ifdef I_AM_QSORT_S - if (n > RSIZE_MAX) { - __throw_constraint_handler_s("qsort_s : n > RSIZE_MAX", EINVAL); - return (EINVAL); - } else if (es > RSIZE_MAX) { - __throw_constraint_handler_s("qsort_s : es > RSIZE_MAX", EINVAL); - return (EINVAL); - } else if (n != 0) { - if (a == NULL) { - __throw_constraint_handler_s("qsort_s : a == NULL", EINVAL); - return (EINVAL); - } else if (cmp == NULL) { - __throw_constraint_handler_s("qsort_s : cmp == NULL", EINVAL); - return (EINVAL); - } - } -#endif - loop: swap_cnt = 0; if (n < 7) { @@ -134,11 +116,7 @@ loop: pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swapfunc(pl, pl - es, es); -#ifdef I_AM_QSORT_S - return (0); -#else return; -#endif } pm = (char *)a + (n / 2) * es; if (n > 7) { @@ -187,11 +165,7 @@ loop: pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) swapfunc(pl, pl - es, es); -#ifdef I_AM_QSORT_S - return (0); -#else return; -#endif } pn = (char *)a + n * es; @@ -205,13 +179,7 @@ loop: if (d1 <= d2) { /* Recurse on left partition, then iterate on right partition */ if (d1 > es) { -#if defined(I_AM_QSORT_R) - qsort_r(a, d1 / es, es, thunk, cmp); -#elif defined(I_AM_QSORT_S) - qsort_s(a, d1 / es, es, cmp, thunk); -#else - qsort(a, d1 / es, es, cmp); -#endif + local_qsort(a, d1 / es, es, cmp, thunk); } if (d2 > es) { /* Iterate rather than recurse to save stack space */ @@ -223,13 +191,7 @@ loop: } else { /* Recurse on right partition, then iterate on left partition */ if (d2 > es) { -#if defined(I_AM_QSORT_R) - qsort_r(pn - d2, d2 / es, es, thunk, cmp); -#elif defined(I_AM_QSORT_S) - qsort_s(pn - d2, d2 / es, es, cmp, thunk); -#else - qsort(pn - d2, d2 / es, es, cmp); -#endif + local_qsort(pn - d2, d2 / es, es, cmp, thunk); } if (d1 > es) { /* Iterate rather than recurse to save stack space */ @@ -238,8 +200,44 @@ loop: goto loop; } } +} + +#if defined(I_AM_QSORT_R) +void +qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp) +{ + local_qsort_r(a, n, es, cmp, thunk); +} +#elif defined(I_AM_QSORT_S) +errno_t +qsort_s(void *a, rsize_t n, rsize_t es, cmp_t *cmp, void *thunk) +{ + if (n > RSIZE_MAX) { + __throw_constraint_handler_s("qsort_s : n > RSIZE_MAX", EINVAL); + return (EINVAL); + } else if (es > RSIZE_MAX) { + __throw_constraint_handler_s("qsort_s : es > RSIZE_MAX", + EINVAL); + return (EINVAL); + } else if (n != 0) { + if (a == NULL) { + __throw_constraint_handler_s("qsort_s : a == NULL", + EINVAL); + return (EINVAL); + } else if (cmp == NULL) { + __throw_constraint_handler_s("qsort_s : cmp == NULL", + EINVAL); + return (EINVAL); + } + } -#ifdef I_AM_QSORT_S + local_qsort_s(a, n, es, cmp, thunk); return (0); -#endif } +#else +void +qsort(void *a, size_t n, size_t es, cmp_t *cmp) +{ + local_qsort(a, n, es, cmp, NULL); +} +#endif From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:04:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 06E0153981D; Thu, 18 Feb 2021 14:04: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 4DhGf86Skjz4Xyq; Thu, 18 Feb 2021 14:04: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 BA00819759; Thu, 18 Feb 2021 14:04: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 11IE40Du030902; Thu, 18 Feb 2021 14:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IE40Oi030901; Thu, 18 Feb 2021 14:04:00 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:04:00 GMT Message-Id: <202102181404.11IE40Oi030901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: df093aa9463b - main - tests/sys/audit: Avoid race caused by starting auditd(8) for testing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df093aa9463b2121d8307fb91c4ba7cf17f4ea64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:04:01 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=df093aa9463b2121d8307fb91c4ba7cf17f4ea64 commit df093aa9463b2121d8307fb91c4ba7cf17f4ea64 Author: Alex Richardson AuthorDate: 2021-02-18 10:14:27 +0000 Commit: Alex Richardson CommitDate: 2021-02-18 14:02:48 +0000 tests/sys/audit: Avoid race caused by starting auditd(8) for testing In the CheriBSD CI we reproducibly see the first test in sys/audit (administrative:acct_failure) fail due to a missing startup message. It appears this is caused by a race condition when starting auditd: `service auditd onestart` returns as soon as the initial auditd() parent exits (after the daemon(3) call). We can avoid this problem by setting up the auditd infrastructure in-process: libauditd contains audit_quick_{start,stop}() functions that look like they are ideally suited to this task. This patch also avoids forking lots of shell processes for each of the 418 tests by using `auditon(A_SENDTRIGGER, &trigger, sizeof(trigger))` to check for a running auditd(8) instead of using `service auditd onestatus`. With these two changes (and D28388 to fix the XFAIL'd test) I can now boot and run `cd /usr/tests/sys/audit && kyua test` without any failures in a single-core QEMU instance. Before there would always be at least one failed test. Besides making the tests more reliable in CI, a nice side-effect of this change is that it also significantly speeds up running them by avoiding lots of fork()/execve() caused by shell scripts: Running kyua test on an AArch64 QEMU took 315s before and now takes 68s, so it's roughly 3.5 times faster. This effect is even larger when running on a CHERI-RISC-V QEMU since emulating CHERI instructions on an x86 host is noticeably slower than emulating AArch64. Test Plan: aarch64+amd64 QEMU no longer fail. Reviewed By: asomers Differential Revision: https://reviews.freebsd.org/D28451 --- tests/sys/audit/Makefile | 9 +++++ tests/sys/audit/administrative.c | 10 ++++- tests/sys/audit/utils.c | 86 +++++++++++++++++++++++++++++++++++----- 3 files changed, 93 insertions(+), 12 deletions(-) diff --git a/tests/sys/audit/Makefile b/tests/sys/audit/Makefile index c2267e52698f..d074bcc1f28d 100644 --- a/tests/sys/audit/Makefile +++ b/tests/sys/audit/Makefile @@ -48,10 +48,19 @@ SRCS.miscellaneous+= utils.c TEST_METADATA+= timeout="30" TEST_METADATA+= required_user="root" +# Only one process can be auditing, if we attempt to run these tests in parallel +# some of them will fail to start auditing. +# TODO: it would be nice to be able to run them in parallel with other non-audit +# tests using some internal form of synchronization. +# TODO: In addititon to test failures, running in parallel can trigger a kernel +# panic: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253616 TEST_METADATA+= is_exclusive="true" TEST_METADATA+= required_files="/etc/rc.d/auditd /dev/auditpipe" LDFLAGS+= -lbsm -lutil +OPENBSMDIR=${SRCTOP}/contrib/openbsm +CFLAGS+= -I${OPENBSMDIR} +LDADD+= ${LIBAUDITD} CFLAGS.process-control.c+= -I${SRCTOP}/tests diff --git a/tests/sys/audit/administrative.c b/tests/sys/audit/administrative.c index 4ec73f4710e0..d75f6147cdf4 100644 --- a/tests/sys/audit/administrative.c +++ b/tests/sys/audit/administrative.c @@ -341,10 +341,16 @@ ATF_TC_CLEANUP(auditctl_success, tc) * at the configured path. To reset this, we need to stop and start the * auditd(8) again. Here, we check if auditd(8) was running already * before the test started. If so, we stop and start it again. + * + * TODO: should we skip this test if auditd(8) is already running to + * avoid restarting it? */ - system("service auditd onestop > /dev/null 2>&1"); - if (!atf_utils_file_exists("started_auditd")) + if (!atf_utils_file_exists("started_fake_auditd")) { + system("service auditd onestop > /dev/null 2>&1"); system("service auditd onestart > /dev/null 2>&1"); + } else { + cleanup(); + } } diff --git a/tests/sys/audit/utils.c b/tests/sys/audit/utils.c index be31f4138412..e94279ff93bf 100644 --- a/tests/sys/audit/utils.c +++ b/tests/sys/audit/utils.c @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -222,13 +223,44 @@ skip_if_extattr_not_supported(const char *path) } } -FILE -*setup(struct pollfd fd[], const char *name) +static bool +is_auditd_running(void) +{ + int trigger; + int err; + + /* + * AUDIT_TRIGGER_INITIALIZE is a no-op message on FreeBSD and can + * therefore be used to check whether auditd has already been started. + * This is significantly cheaper than running `service auditd onestatus` + * for each test case. It is also slightly less racy since it will only + * return true once auditd() has opened the trigger file rather than + * just when the pidfile has been created. + */ + trigger = AUDIT_TRIGGER_INITIALIZE; + err = auditon(A_SENDTRIGGER, &trigger, sizeof(trigger)); + if (err == 0) { + fprintf(stderr, "auditd(8) is running.\n"); + return (true); + } else { + /* + * A_SENDTRIGGER returns ENODEV if auditd isn't listening, + * all other error codes indicate a fatal error. + */ + ATF_REQUIRE_MSG(errno == ENODEV, + "Unexpected error from auditon(2): %s", strerror(errno)); + return (false); + } + +} + +FILE * +setup(struct pollfd fd[], const char *name) { au_mask_t fmask, nomask; + FILE *pipestream; fmask = get_audit_mask(name); nomask = get_audit_mask("no"); - FILE *pipestream; ATF_REQUIRE((fd[0].fd = open("/dev/auditpipe", O_RDONLY)) != -1); ATF_REQUIRE((pipestream = fdopen(fd[0].fd, "r")) != NULL); @@ -244,12 +276,39 @@ FILE /* Set local preselection audit_class as "no" for audit startup */ set_preselect_mode(fd[0].fd, &nomask); - ATF_REQUIRE_EQ(0, system("service auditd onestatus || \ - { service auditd onestart && touch started_auditd ; }")); - - /* If 'started_auditd' exists, that means we started auditd(8) */ - if (atf_utils_file_exists("started_auditd")) + if (!is_auditd_running()) { + fprintf(stderr, "Running audit_quick_start() for testing... "); + /* + * Previously, this test started auditd using + * `service auditd onestart`. However, there is a race condition + * there since service can return before auditd(8) has + * fully started (once the daemon parent process has forked) + * and this can cause check_audit_startup() to fail sometimes. + * + * In the CheriBSD CI this caused the first test executed by + * kyua (administrative:acct_failure) to fail every time, but + * subsequent ones would almost always succeed. + * + * To avoid this problem (and as a nice side-effect this speeds + * up the test quite a bit), we register this process as a + * "fake" auditd(8) using the audit_quick_start() function from + * libauditd. + */ + atf_utils_create_file("started_fake_auditd", "yes\n"); + ATF_REQUIRE(atf_utils_file_exists("started_fake_auditd")); + ATF_REQUIRE_EQ_MSG(0, audit_quick_start(), + "Failed to start fake auditd: %m"); + fprintf(stderr, "done.\n"); + /* audit_quick_start() should log an audit start event. */ check_audit_startup(fd, "audit startup", pipestream); + /* + * If we exit cleanly shutdown audit_quick_start(), if not + * cleanup() will take care of it. + * This is not required, but makes it easier to run individual + * tests outside of kyua. + */ + atexit(cleanup); + } /* Set local preselection parameters specific to "name" audit_class */ set_preselect_mode(fd[0].fd, &fmask); @@ -259,6 +318,13 @@ FILE void cleanup(void) { - if (atf_utils_file_exists("started_auditd")) - system("service auditd onestop > /dev/null 2>&1"); + if (atf_utils_file_exists("started_fake_auditd")) { + fprintf(stderr, "Running audit_quick_stop()... "); + if (audit_quick_stop() != 0) { + fprintf(stderr, "Failed to stop fake auditd: %m\n"); + abort(); + } + fprintf(stderr, "done.\n"); + unlink("started_fake_auditd"); + } } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:04:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ACE9E539671; Thu, 18 Feb 2021 14:04: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 4DhGfB1vhbz4Y2W; Thu, 18 Feb 2021 14:04: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 022FD1975A; Thu, 18 Feb 2021 14:04: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 11IE41v7030924; Thu, 18 Feb 2021 14:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IE412g030923; Thu, 18 Feb 2021 14:04:01 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:04:01 GMT Message-Id: <202102181404.11IE412g030923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: fa2528ac6435 - main - Use atomic loads/stores when updating td->td_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa2528ac643519072c498b483d0dcc1fa5d99bc1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:04:02 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=fa2528ac643519072c498b483d0dcc1fa5d99bc1 commit fa2528ac643519072c498b483d0dcc1fa5d99bc1 Author: Alex Richardson AuthorDate: 2021-02-18 10:25:10 +0000 Commit: Alex Richardson CommitDate: 2021-02-18 14:02:48 +0000 Use atomic loads/stores when updating td->td_state KCSAN complains about racy accesses in the locking code. Those races are fine since they are inside a TD_SET_RUNNING() loop that expects the value to be changed by another CPU. Use relaxed atomic stores/loads to indicate that this variable can be written/read by multiple CPUs at the same time. This will also prevent the compiler from doing unexpected re-ordering. Reported by: GENERIC-KCSAN Test Plan: KCSAN no longer complains, kernel still runs fine. Reviewed By: markj, mjg (earlier version) Differential Revision: https://reviews.freebsd.org/D28569 --- lib/libkvm/kvm_proc.c | 2 +- sys/compat/linprocfs/linprocfs.c | 2 +- sys/ddb/db_command.c | 2 +- sys/ddb/db_ps.c | 12 ++++++------ sys/gdb/gdb_main.c | 6 +++--- sys/kern/init_main.c | 2 +- sys/kern/kern_intr.c | 2 +- sys/kern/kern_prot.c | 2 +- sys/kern/kern_racct.c | 2 +- sys/kern/kern_synch.c | 4 ++-- sys/kern/kern_thread.c | 8 ++++---- sys/kern/sched_4bsd.c | 2 +- sys/kern/subr_turnstile.c | 6 +++--- sys/sys/proc.h | 34 +++++++++++++++++++++++----------- sys/vm/vm_meter.c | 2 +- 15 files changed, 50 insertions(+), 38 deletions(-) diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 63f7c2a8a824..eed2f3de6075 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -426,7 +426,7 @@ nopgrp: TD_CAN_RUN(&mtd) || TD_IS_RUNNING(&mtd)) { kp->ki_stat = SRUN; - } else if (mtd.td_state == + } else if (TD_GET_STATE(&mtd) == TDS_INHIBITED) { if (P_SHOULDSTOP(&proc)) { kp->ki_stat = SSTOP; diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 79ffc4dfd5aa..fc2c29240893 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1054,7 +1054,7 @@ linprocfs_doprocstatus(PFS_FILL_ARGS) state = "X (exiting)"; break; } - switch(td2->td_state) { + switch(TD_GET_STATE(td2)) { case TDS_INHIBITED: state = "S (sleeping)"; break; diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 21ff75f78e6a..fedec1dd33a4 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -854,7 +854,7 @@ _db_stack_trace_all(bool active_only) for (td = kdb_thr_first(); td != NULL; td = kdb_thr_next(td)) { prev_jb = kdb_jmpbuf(jb); if (setjmp(jb) == 0) { - if (td->td_state == TDS_RUNNING) + if (TD_IS_RUNNING(td)) db_printf("\nTracing command %s pid %d" " tid %ld td %p (CPU %d)\n", td->td_proc->p_comm, td->td_proc->p_pid, diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index 44b803299ee9..a5245528ca83 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -173,9 +173,9 @@ db_ps_proc(struct proc *p) */ rflag = sflag = dflag = lflag = wflag = 0; FOREACH_THREAD_IN_PROC(p, td) { - if (td->td_state == TDS_RUNNING || - td->td_state == TDS_RUNQ || - td->td_state == TDS_CAN_RUN) + if (TD_GET_STATE(td) == TDS_RUNNING || + TD_GET_STATE(td) == TDS_RUNQ || + TD_GET_STATE(td) == TDS_CAN_RUN) rflag++; if (TD_ON_LOCK(td)) lflag++; @@ -267,7 +267,7 @@ dumpthread(volatile struct proc *p, volatile struct thread *td, int all) if (all) { db_printf("%6d ", td->td_tid); - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_RUNNING: snprintf(state, sizeof(state), "Run"); break; @@ -367,7 +367,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) db_printf(" flags: %#x ", td->td_flags); db_printf(" pflags: %#x\n", td->td_pflags); db_printf(" state: "); - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_INACTIVE: db_printf("INACTIVE\n"); break; @@ -413,7 +413,7 @@ DB_SHOW_COMMAND(thread, db_show_thread) db_printf("}\n"); break; default: - db_printf("??? (%#x)\n", td->td_state); + db_printf("??? (%#x)\n", TD_GET_STATE(td)); break; } if (TD_ON_LOCK(td)) diff --git a/sys/gdb/gdb_main.c b/sys/gdb/gdb_main.c index 6e0c9f21f947..a9e935ebfbb5 100644 --- a/sys/gdb/gdb_main.c +++ b/sys/gdb/gdb_main.c @@ -510,11 +510,11 @@ do_qXfer_threads_read(void) sbuf_putc(&ctx.qXfer.sb, '>'); - if (ctx.iter->td_state == TDS_RUNNING) + if (TD_GET_STATE(ctx.iter) == TDS_RUNNING) sbuf_cat(&ctx.qXfer.sb, "Running"); - else if (ctx.iter->td_state == TDS_RUNQ) + else if (TD_GET_STATE(ctx.iter) == TDS_RUNQ) sbuf_cat(&ctx.qXfer.sb, "RunQ"); - else if (ctx.iter->td_state == TDS_CAN_RUN) + else if (TD_GET_STATE(ctx.iter) == TDS_CAN_RUN) sbuf_cat(&ctx.qXfer.sb, "CanRun"); else if (TD_ON_LOCK(ctx.iter)) sbuf_cat(&ctx.qXfer.sb, "Blocked"); diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 5eb8186c23ca..2d6a4f636240 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -499,7 +499,7 @@ proc0_init(void *dummy __unused) p->p_nice = NZERO; td->td_tid = THREAD0_TID; tidhash_add(td); - td->td_state = TDS_RUNNING; + TD_SET_STATE(td, TDS_RUNNING); td->td_pri_class = PRI_TIMESHARE; td->td_user_pri = PUSER; td->td_base_user_pri = PUSER; diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 0e11af2123e2..af7c52c6b176 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -992,7 +992,7 @@ intr_event_schedule_thread(struct intr_event *ie) sched_add(td, SRQ_INTR); } else { CTR5(KTR_INTR, "%s: pid %d (%s): it_need %d, state %d", - __func__, td->td_proc->p_pid, td->td_name, it->it_need, td->td_state); + __func__, td->td_proc->p_pid, td->td_name, it->it_need, TD_GET_STATE(td)); thread_unlock(td); } diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 170e9598835e..a107c7cced95 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1955,7 +1955,7 @@ credbatch_add(struct credbatch *crb, struct thread *td) MPASS(td->td_realucred != NULL); MPASS(td->td_realucred == td->td_ucred); - MPASS(td->td_state == TDS_INACTIVE); + MPASS(TD_GET_STATE(td) == TDS_INACTIVE); cr = td->td_realucred; KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p", __func__, cr->cr_users, cr)); diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 4df1c72d50f7..7d179fe69844 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -1147,7 +1147,7 @@ racct_proc_throttle(struct proc *p, int timeout) thread_lock(td); td->td_flags |= TDF_ASTPENDING; - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_RUNQ: /* * If the thread is on the scheduler run-queue, we can diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 4c0491ab6e85..dcca67326264 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -570,7 +570,7 @@ setrunnable(struct thread *td, int srqflags) ("setrunnable: pid %d is a zombie", td->td_proc->p_pid)); swapin = 0; - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_RUNNING: case TDS_RUNQ: break; @@ -593,7 +593,7 @@ setrunnable(struct thread *td, int srqflags) } break; default: - panic("setrunnable: state 0x%x", td->td_state); + panic("setrunnable: state 0x%x", TD_GET_STATE(td)); } if ((srqflags & (SRQ_HOLD | SRQ_HOLDTD)) == 0) thread_unlock(td); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3561895d9fff..ea569576e7c9 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -346,7 +346,7 @@ thread_ctor(void *mem, int size, void *arg, int flags) struct thread *td; td = (struct thread *)mem; - td->td_state = TDS_INACTIVE; + TD_SET_STATE(td, TDS_INACTIVE); td->td_lastcpu = td->td_oncpu = NOCPU; /* @@ -379,7 +379,7 @@ thread_dtor(void *mem, int size, void *arg) #ifdef INVARIANTS /* Verify that this thread is in a safe state to free. */ - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_INHIBITED: case TDS_RUNNING: case TDS_CAN_RUN: @@ -944,7 +944,7 @@ thread_exit(void) rucollect(&p->p_ru, &td->td_ru); PROC_STATUNLOCK(p); - td->td_state = TDS_INACTIVE; + TD_SET_STATE(td, TDS_INACTIVE); #ifdef WITNESS witness_thread_exit(td); #endif @@ -993,7 +993,7 @@ thread_link(struct thread *td, struct proc *p) * its lock has been created. * PROC_LOCK_ASSERT(p, MA_OWNED); */ - td->td_state = TDS_INACTIVE; + TD_SET_STATE(td, TDS_INACTIVE); td->td_proc = p; td->td_flags = TDF_INMEM; diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 7b44e12ef330..7ce9bd81704f 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1764,7 +1764,7 @@ sched_affinity(struct thread *td) if (td->td_pinned != 0 || td->td_flags & TDF_BOUND) return; - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_RUNQ: /* * If we are on a per-CPU runqueue that is in the set, diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 2c8f2909f2b3..d966a796c867 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -288,7 +288,7 @@ propagate_priority(struct thread *td) */ KASSERT(TD_ON_LOCK(td), ( "thread %d(%s):%d holds %s but isn't blocked on a lock\n", - td->td_tid, td->td_name, td->td_state, + td->td_tid, td->td_name, TD_GET_STATE(td), ts->ts_lockobj->lo_name)); /* @@ -1185,7 +1185,7 @@ print_lockchain(struct thread *td, const char *prefix) } db_printf("%sthread %d (pid %d, %s) is ", prefix, td->td_tid, td->td_proc->p_pid, td->td_name); - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_INACTIVE: db_printf("inactive\n"); return; @@ -1224,7 +1224,7 @@ print_lockchain(struct thread *td, const char *prefix) db_printf("inhibited: %s\n", KTDSTATE(td)); return; default: - db_printf("??? (%#x)\n", td->td_state); + db_printf("??? (%#x)\n", TD_GET_STATE(td)); return; } } diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 99257878c2e0..0073fee2a42e 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -347,6 +347,7 @@ struct thread { TDS_RUNQ, TDS_RUNNING } td_state; /* (t) thread state */ + /* Note: td_state must be accessed using TD_{GET,SET}_STATE(). */ union { register_t tdu_retval[2]; off_t tdu_off; @@ -540,10 +541,15 @@ do { \ #define TD_IS_SWAPPED(td) ((td)->td_inhibitors & TDI_SWAPPED) #define TD_ON_LOCK(td) ((td)->td_inhibitors & TDI_LOCK) #define TD_AWAITING_INTR(td) ((td)->td_inhibitors & TDI_IWAIT) -#define TD_IS_RUNNING(td) ((td)->td_state == TDS_RUNNING) -#define TD_ON_RUNQ(td) ((td)->td_state == TDS_RUNQ) -#define TD_CAN_RUN(td) ((td)->td_state == TDS_CAN_RUN) -#define TD_IS_INHIBITED(td) ((td)->td_state == TDS_INHIBITED) +#ifdef _KERNEL +#define TD_GET_STATE(td) atomic_load_int(&(td)->td_state) +#else +#define TD_GET_STATE(td) ((td)->td_state) +#endif +#define TD_IS_RUNNING(td) (TD_GET_STATE(td) == TDS_RUNNING) +#define TD_ON_RUNQ(td) (TD_GET_STATE(td) == TDS_RUNQ) +#define TD_CAN_RUN(td) (TD_GET_STATE(td) == TDS_CAN_RUN) +#define TD_IS_INHIBITED(td) (TD_GET_STATE(td) == TDS_INHIBITED) #define TD_ON_UPILOCK(td) ((td)->td_flags & TDF_UPIBLOCKED) #define TD_IS_IDLETHREAD(td) ((td)->td_flags & TDF_IDLETD) @@ -557,15 +563,15 @@ do { \ ((td)->td_inhibitors & TDI_LOCK) != 0 ? "blocked" : \ ((td)->td_inhibitors & TDI_IWAIT) != 0 ? "iwait" : "yielding") -#define TD_SET_INHIB(td, inhib) do { \ - (td)->td_state = TDS_INHIBITED; \ - (td)->td_inhibitors |= (inhib); \ +#define TD_SET_INHIB(td, inhib) do { \ + TD_SET_STATE(td, TDS_INHIBITED); \ + (td)->td_inhibitors |= (inhib); \ } while (0) #define TD_CLR_INHIB(td, inhib) do { \ if (((td)->td_inhibitors & (inhib)) && \ (((td)->td_inhibitors &= ~(inhib)) == 0)) \ - (td)->td_state = TDS_CAN_RUN; \ + TD_SET_STATE(td, TDS_CAN_RUN); \ } while (0) #define TD_SET_SLEEPING(td) TD_SET_INHIB((td), TDI_SLEEPING) @@ -581,9 +587,15 @@ do { \ #define TD_CLR_SUSPENDED(td) TD_CLR_INHIB((td), TDI_SUSPENDED) #define TD_CLR_IWAIT(td) TD_CLR_INHIB((td), TDI_IWAIT) -#define TD_SET_RUNNING(td) (td)->td_state = TDS_RUNNING -#define TD_SET_RUNQ(td) (td)->td_state = TDS_RUNQ -#define TD_SET_CAN_RUN(td) (td)->td_state = TDS_CAN_RUN +#ifdef _KERNEL +#define TD_SET_STATE(td, state) atomic_store_int(&(td)->td_state, state) +#else +#define TD_SET_STATE(td, state) (td)->td_state = state +#endif +#define TD_SET_RUNNING(td) TD_SET_STATE(td, TDS_RUNNING) +#define TD_SET_RUNQ(td) TD_SET_STATE(td, TDS_RUNQ) +#define TD_SET_CAN_RUN(td) TD_SET_STATE(td, TDS_CAN_RUN) + #define TD_SBDRY_INTR(td) \ (((td)->td_flags & (TDF_SEINTR | TDF_SERESTART)) != 0) diff --git a/sys/vm/vm_meter.c b/sys/vm/vm_meter.c index 44d3ac999c5a..f9e2b0c66cc8 100644 --- a/sys/vm/vm_meter.c +++ b/sys/vm/vm_meter.c @@ -207,7 +207,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) if (p->p_state != PRS_NEW) { FOREACH_THREAD_IN_PROC(p, td) { thread_lock(td); - switch (td->td_state) { + switch (TD_GET_STATE(td)) { case TDS_INHIBITED: if (TD_IS_SWAPPED(td)) total.t_sw++; From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:20:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B571553A699; Thu, 18 Feb 2021 14:20: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 4DhH0n4RkHz4b9R; Thu, 18 Feb 2021 14:20: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 8B48819C96; Thu, 18 Feb 2021 14:20: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 11IEK9Tb047330; Thu, 18 Feb 2021 14:20:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IEK9KJ047278; Thu, 18 Feb 2021 14:20:09 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:20:09 GMT Message-Id: <202102181420.11IEK9KJ047278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: ee36e25a86cb - main - zfs: merge OpenZFS master-bf156c966 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee36e25a86cbe2a9474c1d61f2c4b450da8ef952 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:20:09 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ee36e25a86cbe2a9474c1d61f2c4b450da8ef952 commit ee36e25a86cbe2a9474c1d61f2c4b450da8ef952 Merge: fa2528ac6435 62ceb3c592a5 Author: Martin Matuska AuthorDate: 2021-02-18 14:17:31 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 14:19:35 +0000 zfs: merge OpenZFS master-bf156c966 Notable upstream changes: bf156c966 Remove unused abd_alloc_scatter_offset_chunkcnt 658fb8020 Add "compatibility" property for zpool feature sets This update introduces a new pool property called "compatibility" that can be used to enable a limited set of pool features on pool creation and "stick" to it, so the "zpool upgrade" does not accidentally enable features that are not desired. The value of this property may then be changed later. See zpool-features(5) for more information about the "compatibility" pool property. Obtained from: OpenZFS MFC after: 2 weeks sys/contrib/openzfs/cmd/zpool/Makefile.am | 47 +- .../openzfs/cmd/zpool/compatibility.d/compat-2018 | 12 + .../openzfs/cmd/zpool/compatibility.d/compat-2019 | 15 + .../openzfs/cmd/zpool/compatibility.d/compat-2020 | 15 + .../openzfs/cmd/zpool/compatibility.d/compat-2021 | 19 + .../openzfs/cmd/zpool/compatibility.d/freebsd-11.0 | 15 + .../openzfs/cmd/zpool/compatibility.d/freebsd-11.2 | 18 + .../openzfs/cmd/zpool/compatibility.d/freebsd-11.3 | 19 + .../cmd/zpool/compatibility.d/freenas-9.10.2 | 13 + .../openzfs/cmd/zpool/compatibility.d/grub2 | 12 + .../cmd/zpool/compatibility.d/openzfs-2.0-freebsd | 33 + .../cmd/zpool/compatibility.d/openzfs-2.0-linux | 34 + .../cmd/zpool/compatibility.d/openzfsonosx-1.7.0 | 16 + .../cmd/zpool/compatibility.d/openzfsonosx-1.8.1 | 21 + .../cmd/zpool/compatibility.d/openzfsonosx-1.9.3 | 27 + .../openzfs/cmd/zpool/compatibility.d/zol-0.6.5 | 12 + .../openzfs/cmd/zpool/compatibility.d/zol-0.7 | 18 + .../openzfs/cmd/zpool/compatibility.d/zol-0.8 | 27 + sys/contrib/openzfs/cmd/zpool/zpool_main.c | 165 +- sys/contrib/openzfs/cmd/ztest/ztest.c | 4 +- sys/contrib/openzfs/config/Rules.am | 1 + sys/contrib/openzfs/include/libzfs.h | 16 + sys/contrib/openzfs/include/sys/fs/zfs.h | 19 +- sys/contrib/openzfs/include/sys/spa_impl.h | 2 + sys/contrib/openzfs/include/zfeature_common.h | 2 - sys/contrib/openzfs/lib/libzfs/libzfs.abi | 6933 ++++++++++++-------- sys/contrib/openzfs/lib/libzfs/libzfs_pool.c | 228 + sys/contrib/openzfs/lib/libzfs/libzfs_status.c | 29 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 10 + sys/contrib/openzfs/man/man5/zpool-features.5 | 59 +- sys/contrib/openzfs/man/man8/zpool-create.8 | 16 +- sys/contrib/openzfs/man/man8/zpool-upgrade.8 | 16 +- sys/contrib/openzfs/man/man8/zpoolprops.8 | 19 + sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 19 - .../openzfs/module/zcommon/zfeature_common.c | 13 +- sys/contrib/openzfs/module/zcommon/zpool_prop.c | 4 + sys/contrib/openzfs/module/zfs/spa.c | 30 + sys/contrib/openzfs/module/zfs/spa_config.c | 4 + sys/contrib/openzfs/rpm/generic/zfs.spec.in | 6 +- sys/contrib/openzfs/scripts/Makefile.am | 1 + sys/contrib/openzfs/tests/runfiles/common.run | 8 +- .../tests/zfs-tests/cmd/xattrtest/xattrtest.c | 6 +- .../openzfs/tests/zfs-tests/include/default.cfg.in | 1 + .../functional/cli_root/zpool_create/Makefile.am | 3 + .../cli_root/zpool_create/zpool_create.shlib | 81 + .../zpool_create/zpool_create_features_006_pos.ksh | 58 + .../zpool_create/zpool_create_features_007_pos.ksh | 54 + .../zpool_create/zpool_create_features_008_pos.ksh | 54 + .../functional/cli_root/zpool_get/zpool_get.cfg | 1 + .../functional/cli_root/zpool_status/Makefile.am | 3 +- .../zpool_status/zpool_status_features_001_pos.ksh | 63 + .../functional/cli_root/zpool_upgrade/Makefile.am | 3 +- .../zpool_upgrade_features_001_pos.ksh | 67 + 53 files changed, 5513 insertions(+), 2858 deletions(-) diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2018 index 000000000000,7be44e1eee95..7be44e1eee95 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2018 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2018 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2019 index 000000000000,c105cc70c290..c105cc70c290 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2019 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2019 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2020 index 000000000000,8d46a571e6ef..8d46a571e6ef mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2020 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2020 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2021 index 000000000000,f45c82d6560f..f45c82d6560f mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2021 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/compat-2021 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.0 index 000000000000,8718559ffb4c..8718559ffb4c mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.0 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.0 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.2 index 000000000000,14d2d573b2a0..14d2d573b2a0 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.2 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.2 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.3 index 000000000000,802cc3630de7..802cc3630de7 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.3 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/freebsd-11.3 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/freenas-9.10.2 index 000000000000,10789c96cc8f..10789c96cc8f mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/freenas-9.10.2 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/freenas-9.10.2 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/grub2 index 000000000000,4e8f21362554..4e8f21362554 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/grub2 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/grub2 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-freebsd index 000000000000,e7ee2f247670..e7ee2f247670 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-freebsd +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-freebsd diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-linux index 000000000000,ac0f5c863468..ac0f5c863468 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-linux +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfs-2.0-linux diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 index 000000000000,4ae87c964c5e..4ae87c964c5e mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.7.0 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 index 000000000000,162ff32a7803..162ff32a7803 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.8.1 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 index 000000000000,b0b28ec04939..b0b28ec04939 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/openzfsonosx-1.9.3 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.5 index 000000000000,cb9a94d88951..cb9a94d88951 mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.5 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.6.5 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.7 index 000000000000,22a02936df8c..22a02936df8c mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.7 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.7 diff --cc sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.8 index 000000000000,762848ef7b4b..762848ef7b4b mode 000000,100644..100644 --- a/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.8 +++ b/sys/contrib/openzfs/cmd/zpool/compatibility.d/zol-0.8 diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_006_pos.ksh index 000000000000,fe98434d1bb6..fe98434d1bb6 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_006_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_006_pos.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_007_pos.ksh index 000000000000,8c812911b3b3..8c812911b3b3 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_007_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_007_pos.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_008_pos.ksh index 000000000000,0580d444e724..0580d444e724 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_008_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_features_008_pos.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh index 000000000000,635125fc0d1e..635125fc0d1e mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_status/zpool_status_features_001_pos.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_features_001_pos.ksh index 000000000000,5170d31b46da..5170d31b46da mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_features_001_pos.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_upgrade/zpool_upgrade_features_001_pos.ksh From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:21:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 22ECF53A5A8; Thu, 18 Feb 2021 14:21:20 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhH276tNzz4b6j; Thu, 18 Feb 2021 14:21:19 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ej1-f52.google.com with SMTP id do6so5896078ejc.3; Thu, 18 Feb 2021 06:21:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=tOo/ca+h4vpQK5ULzyamHUfdq0d/IRI49AmlAhJwi5Q=; b=cYKs3kGJWgg9waXdzbTVt9GJ2/QQBNzC6VPbTUT8SZhjvQc//r1Y3zNkB7qQMTVLls MztxiM2rA6bwUcc6b1oe9avCz6DaotxDJok+VJzoTyu/ZQm5LAFTQjGuthcOJ5j3mSKU bTCH749ETH6/k69evledEAspmkrt52eqpWWGqjLHv2EXuTV3mZqBWn6y/7ao8fSl2ROg rAPUrUoDjQfzH7dHYGZiQs7rkUlcM5f8h5jNtdFfRK1Zk/nW4Jnw99BAStVeDdRiD4LV ysyt22PS8lPOSgPk8FnpLOpkB/pLWMpjS+qJAKkkVJPtnF8lJY+0z9H5Qz25NHJiDXGo fbEw== X-Gm-Message-State: AOAM532u7JDgc7u8VnPxaafANNjhxDRUJd9jFxe8O5hehpn1WKeRkoCF Qfa8K4xRSP3GnSnEyAEkaFqmT0CFie6rZw== X-Google-Smtp-Source: ABdhPJzfMsB8I+D2pRn9KZQgxhTebWluWj+Uny8r5SZTERIdm4pGk66xY0K6+Bp41HejEJU+f/e/Iw== X-Received: by 2002:a17:906:2681:: with SMTP id t1mr4254463ejc.29.1613658077932; Thu, 18 Feb 2021 06:21:17 -0800 (PST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com. [209.85.128.54]) by smtp.gmail.com with ESMTPSA id hr3sm2451842ejc.41.2021.02.18.06.21.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Feb 2021 06:21:17 -0800 (PST) Received: by mail-wm1-f54.google.com with SMTP id x4so4107844wmi.3; Thu, 18 Feb 2021 06:21:17 -0800 (PST) X-Received: by 2002:a1c:b607:: with SMTP id g7mr3830014wmf.67.1613658076983; Thu, 18 Feb 2021 06:21:16 -0800 (PST) MIME-Version: 1.0 References: <202102031604.113G4SQq019037@gitrepo.freebsd.org> <20210218134614.376e4eaa@FreeBSD.org> In-Reply-To: <20210218134614.376e4eaa@FreeBSD.org> From: Alexander Richardson Date: Thu, 18 Feb 2021 14:21:06 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 8fa6abb6f4f6 - main - Expose clang's alignment builtins and use them for roundup2/rounddown2 To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: Ryan Libby , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4DhH276tNzz4b6j X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:21:20 -0000 On Thu, 18 Feb 2021 at 12:46, T=C4=B3l Coosemans wrote: > > On Wed, 17 Feb 2021 21:01:05 +0000 Alexander Richardson > wrote: > > On Wed, 17 Feb 2021 at 20:46, Ryan Libby wrote: > >> On Wed, Feb 3, 2021 at 8:04 AM Alex Richardson wrote: > >>> The branch main has been updated by arichardson: > >>> > >>> URL: https://cgit.FreeBSD.org/src/commit/?id=3D8fa6abb6f4f64f4f23e292= 0e2aea7996566851a4 > >>> > >>> commit 8fa6abb6f4f64f4f23e2920e2aea7996566851a4 > >>> Author: Alex Richardson > >>> AuthorDate: 2021-02-03 15:27:17 +0000 > >>> Commit: Alex Richardson > >>> CommitDate: 2021-02-03 16:02:54 +0000 > >>> > >>> Expose clang's alignment builtins and use them for roundup2/round= down2 > >>> > >>> This makes roundup2/rounddown2 type- and const-preserving and all= ows > >>> using it on pointer types without casting to uintptr_t first. Not > >>> performing pointer-to-integer conversions also helps the compiler= 's > >>> optimization passes and can therefore result in better code gener= ation. > >>> When using it with integer values there should be no change other= than > >>> the compiler checking that the alignment value is a valid power-o= f-two. > >>> > >>> I originally implemented these builtins for CHERI a few years ago= and > >>> they have been very useful for CheriBSD. However, they are also u= seful > >>> for non-CHERI code so I was able to upstream them for Clang 10.0. > >>> > >>> Rationale from the clang documentation: > >>> Clang provides builtins to support checking and adjusting alignme= nt > >>> of pointers and integers. These builtins can be used to avoid rel= ying > >>> on implementation-defined behavior of arithmetic on integers deri= ved > >>> from pointers. Additionally, these builtins retain type informati= on > >>> and, unlike bitwise arithmetic, they can perform semantic checkin= g on > >>> the alignment value. > >>> > >>> There is also a feature request for GCC, so GCC may also support = it in > >>> the future: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98641 > >>> > >>> Reviewed By: brooks, jhb, imp > >>> Differential Revision: https://reviews.freebsd.org/D28332 > >>> --- > >>> sys/sys/cdefs.h | 19 +++++++++++++++++++ > >>> sys/sys/param.h | 4 ++-- > >>> 2 files changed, 21 insertions(+), 2 deletions(-) > >>> > >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > >>> index 75bedd4b8128..72ef942084f2 100644 > >>> --- a/sys/sys/cdefs.h > >>> +++ b/sys/sys/cdefs.h > >>> @@ -884,4 +884,23 @@ > >>> #define __guarded_by(x) __lock_annotate(guarded_by(x)= ) > >>> #define __pt_guarded_by(x) __lock_annotate(pt_guarded_by= (x)) > >>> > >>> +/* Alignment builtins for better type checking and improved code gen= eration. */ > >>> +/* Provide fallback versions for other compilers (GCC/Clang < 10): *= / > >>> +#if !__has_builtin(__builtin_is_aligned) > >>> +#define __builtin_is_aligned(x, align) \ > >>> + (((__uintptr_t)x & ((align) - 1)) =3D=3D 0) > >>> +#endif > >>> +#if !__has_builtin(__builtin_align_up) > >>> +#define __builtin_align_up(x, align) \ > >>> + ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)= ))) > >>> +#endif > >>> +#if !__has_builtin(__builtin_align_down) > >>> +#define __builtin_align_down(x, align) \ > >>> + ((__typeof__(x))((x)&(~((align)-1)))) > >>> +#endif > >>> + > >>> +#define __align_up(x, y) __builtin_align_up(x, y) > >>> +#define __align_down(x, y) __builtin_align_down(x, y) > >>> +#define __is_aligned(x, y) __builtin_is_aligned(x, y) > >>> + > >> > >> Since these are only valid for powers of 2, I think it would be good t= o > >> indicate that in the names (__align_up2() etc). > >> > >>> #endif /* !_SYS_CDEFS_H_ */ > >>> diff --git a/sys/sys/param.h b/sys/sys/param.h > >>> index 079357a19d47..d6f1eb21dcd2 100644 > >>> --- a/sys/sys/param.h > >>> +++ b/sys/sys/param.h > >>> @@ -305,9 +305,9 @@ > >>> #endif > >>> #define nitems(x) (sizeof((x)) / sizeof((x)[0])) > >>> #define rounddown(x, y) (((x)/(y))*(y)) > >>> -#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is= power of two */ > >>> +#define rounddown2(x, y) __align_down(x, y) /* if y is power = of two */ > >>> #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any = y */ > >>> -#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is= powers of two */ > >>> +#define roundup2(x, y) __align_up(x, y) /* if y is powers of= two */ > >>> #define powerof2(x) ((((x)-1)&(x))=3D=3D0) > >>> > >>> /* Macros for min/max. */ > >> > >> This broke the gcc build: > >> https://ci.freebsd.org/job/FreeBSD-main-amd64-gcc6_build/3200/console > >> 00:40:30 --- all_subdir_firewire --- > >> 00:40:30 In file included from /workspace/src/sys/sys/types.h:43:0, > >> 00:40:30 from /workspace/src/sys/sys/param.h:99, > >> 00:40:30 from /workspace/src/sys/dev/firewire/fwohci.= c:40: > >> 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c: In function > >> 'fwohci_get_plen': > >> 00:40:30 /workspace/src/sys/dev/firewire/fwohci.c:2699:17: error: > >> 'typeof' applied to a bit-field > >> 00:40:30 r +=3D roundup2(fp->mode.wreqb.len, sizeof(uint32_t)); > >> > >> We could: > >> - Drop the cast for the fallback. > >> - Cast with (__typeof__(+(x))) which unfortunately promotes e.g. char > >> to int but otherwise I think behaves okay, and the promotion was > >> previously happening for roundup2/rounddown2 anyway. > >> - Punt the casting burden to callers of roundup2/rounddown2. > > > > https://reviews.freebsd.org/D28599 fixes this specific issue. One > > reason for the typeof() is to allow using it with pointer types. > > Currently there are no such uses, but we have some in CheriBSD. > > Unfortunately +(x) would break that. (x)+0 should work for most cases, > > but does break void*. > > I believe the current approach only breaks with bitfields (which is > > hopefully rare), so I think adding casts for GCC when roundup2() in > > those cases might be the simplest solution. > > The comma operator might work here: typeof(((void)0,(x))). Thanks, I hadn't considered that. It looks like GCC is happy with that for both pointers and bitfields: https://godbolt.org/z/KvMEYs From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:22:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4066253A6D2; Thu, 18 Feb 2021 14:22: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 4DhH301Pn4z4bLq; Thu, 18 Feb 2021 14:22: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 232AB194FE; Thu, 18 Feb 2021 14:22: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 11IEM4UD056577; Thu, 18 Feb 2021 14:22:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IEM44p056576; Thu, 18 Feb 2021 14:22:04 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:22:04 GMT Message-Id: <202102181422.11IEM44p056576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 10f57cb98fd6 - main - zfs: bump version and install new share files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10f57cb98fd61b2669640a84aa73ad118601f281 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:22:04 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=10f57cb98fd61b2669640a84aa73ad118601f281 commit 10f57cb98fd61b2669640a84aa73ad118601f281 Author: Martin Matuska AuthorDate: 2021-02-18 11:08:20 +0000 Commit: Martin Matuska CommitDate: 2021-02-18 14:21:10 +0000 zfs: bump version and install new share files - bump version to 2.0.0-FreeBSD_gbf156c966 - install definition files for the new "-o compatibility" option to "zpool create" MFC after: 2 weeks --- cddl/Makefile | 2 +- cddl/lib/libzfs/Makefile | 2 ++ cddl/sbin/zpool/Makefile | 3 ++- cddl/share/Makefile | 13 +++++++++++++ cddl/share/zfs/Makefile | 9 +++++++++ cddl/share/zfs/compatibility.d/Makefile | 28 ++++++++++++++++++++++++++++ etc/mtree/BSD.root.dist | 2 ++ etc/mtree/BSD.usr.dist | 4 ++++ sys/modules/zfs/zfs_config.h | 4 ++-- 9 files changed, 63 insertions(+), 4 deletions(-) diff --git a/cddl/Makefile b/cddl/Makefile index d01199b5d9af..7b9d13146afa 100644 --- a/cddl/Makefile +++ b/cddl/Makefile @@ -3,7 +3,7 @@ .include SUBDIR= lib .WAIT \ - sbin usr.bin usr.sbin + sbin share usr.bin usr.sbin SUBDIR.${MK_TESTS}+= tests diff --git a/cddl/lib/libzfs/Makefile b/cddl/lib/libzfs/Makefile index d0b3458eda64..b159955c0212 100644 --- a/cddl/lib/libzfs/Makefile +++ b/cddl/lib/libzfs/Makefile @@ -103,6 +103,8 @@ CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h CFLAGS+= -DHAVE_ISSETUGID CFLAGS+= -include ${SRCTOP}/sys/modules/zfs/zfs_config.h +CFLAGS+= -DSYSCONFDIR=\"/etc\" +CFLAGS+= -DPKGDATADIR=\"/usr/share/zfs\" .include diff --git a/cddl/sbin/zpool/Makefile b/cddl/sbin/zpool/Makefile index fbde6beec331..43cc8f2997b7 100644 --- a/cddl/sbin/zpool/Makefile +++ b/cddl/sbin/zpool/Makefile @@ -71,7 +71,8 @@ CFLAGS+= \ -include ${ZFSTOP}/include/os/freebsd/spl/sys/ccompile.h \ -DHAVE_ISSETUGID \ -include ${SRCTOP}/sys/modules/zfs/zfs_config.h \ - -DSYSCONFDIR=\"/etc\" + -DSYSCONFDIR=\"/etc\" \ + -DPKGDATADIR=\"/usr/share/zfs\" LIBADD= geom nvpair uutil zfs zutil avl spl tpool zfs_core m LDADD+= -pthread diff --git a/cddl/share/Makefile b/cddl/share/Makefile new file mode 100644 index 000000000000..68670ffbe7e0 --- /dev/null +++ b/cddl/share/Makefile @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.include + +SUBDIR= ${_zfs} + +.if ${MK_ZFS} != "no" +_zfs= zfs +.endif + +SUBDIR_PARALLEL= + +.include diff --git a/cddl/share/zfs/Makefile b/cddl/share/zfs/Makefile new file mode 100644 index 000000000000..98e10b60aae6 --- /dev/null +++ b/cddl/share/zfs/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +SUBDIR= compatibility.d + +SUBDIR_PARALLEL= + +.include diff --git a/cddl/share/zfs/compatibility.d/Makefile b/cddl/share/zfs/compatibility.d/Makefile new file mode 100644 index 000000000000..6531430ef050 --- /dev/null +++ b/cddl/share/zfs/compatibility.d/Makefile @@ -0,0 +1,28 @@ +# $FreeBSD$ + +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd/zpool/compatibility.d + +FILES= \ + compat-2018 \ + compat-2019 \ + compat-2020 \ + compat-2021 \ + freebsd-11.0 \ + freebsd-11.2 \ + freebsd-11.3 \ + freenas-9.10.2 \ + grub2 \ + openzfsonosx-1.7.0 \ + openzfsonosx-1.8.1 \ + openzfsonosx-1.9.3 \ + openzfs-2.0-freebsd \ + openzfs-2.0-linux \ + zol-0.6.5 \ + zol-0.7 \ + zol-0.8 + +FILESDIR= ${SHAREDIR}/zfs/compatibility.d + +.include diff --git a/etc/mtree/BSD.root.dist b/etc/mtree/BSD.root.dist index 2cfa18dd5662..f734f7891429 100644 --- a/etc/mtree/BSD.root.dist +++ b/etc/mtree/BSD.root.dist @@ -95,6 +95,8 @@ syslog.d .. zfs + compatibility.d + .. .. .. lib diff --git a/etc/mtree/BSD.usr.dist b/etc/mtree/BSD.usr.dist index 375cf3a96447..9ae3acbe6eba 100644 --- a/etc/mtree/BSD.usr.dist +++ b/etc/mtree/BSD.usr.dist @@ -1230,6 +1230,10 @@ keymaps .. .. + zfs + compatibility.d + .. + .. zoneinfo Africa .. diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index 73a56f9291c6..18ca44d1b3c1 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -734,7 +734,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.0.0-FreeBSD_g436ab35a5" +#define ZFS_META_ALIAS "zfs-2.0.0-FreeBSD_gbf156c966" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -764,7 +764,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_g436ab35a5" +#define ZFS_META_RELEASE "FreeBSD_gbf156c966" /* Define the project version. */ #define ZFS_META_VERSION "2.0.0" From owner-dev-commits-src-all@freebsd.org Thu Feb 18 14:28:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9E32353A5FF; Thu, 18 Feb 2021 14:28:49 +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 4DhHBn44yZz4c3j; Thu, 18 Feb 2021 14:28:49 +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 7F74A19C28; Thu, 18 Feb 2021 14:28:49 +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 11IESniY057728; Thu, 18 Feb 2021 14:28:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IESnB2057727; Thu, 18 Feb 2021 14:28:49 GMT (envelope-from git) Date: Thu, 18 Feb 2021 14:28:49 GMT Message-Id: <202102181428.11IESnB2057727@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 662283b1088d - main - vn_printf: handle VI_FOPENING MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 662283b1088d6488671b90ab18a66a997c526448 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 14:28:49 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=662283b1088d6488671b90ab18a66a997c526448 commit 662283b1088d6488671b90ab18a66a997c526448 Author: Konstantin Belousov AuthorDate: 2021-02-18 14:24:55 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-18 14:28:28 +0000 vn_printf: handle VI_FOPENING Noted by: mjg Sponsored by: The FreeBSD Foundation MFC after: 6 days Fixes: fa3bd463cee --- sys/kern/vfs_subr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 04cd0e0175f9..3e39d19666e5 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -4116,8 +4116,10 @@ vn_printf(struct vnode *vp, const char *fmt, ...) strlcat(buf, "|VI_OWEINACT", sizeof(buf)); if (vp->v_iflag & VI_DEFINACT) strlcat(buf, "|VI_DEFINACT", sizeof(buf)); + if (vp->v_iflag & VI_FOPENING) + strlcat(buf, "|VI_FOPENING", sizeof(buf)); flags = vp->v_iflag & ~(VI_TEXT_REF | VI_MOUNT | VI_DOINGINACT | - VI_OWEINACT | VI_DEFINACT); + VI_OWEINACT | VI_DEFINACT | VI_FOPENING); if (flags != 0) { snprintf(buf2, sizeof(buf2), "|VI(0x%lx)", flags); strlcat(buf, buf2, sizeof(buf)); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 15:05:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1D72D53B56A; Thu, 18 Feb 2021 15:05: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 4DhJ1G3wtqz4fQ9; Thu, 18 Feb 2021 15:05: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 8C4AF1A2D5; Thu, 18 Feb 2021 15:05: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 11IF5bwi009631; Thu, 18 Feb 2021 15:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IF5b19009630; Thu, 18 Feb 2021 15:05:37 GMT (envelope-from git) Date: Thu, 18 Feb 2021 15:05:37 GMT Message-Id: <202102181505.11IF5b19009630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: 0577e39bec76 - main - Fix ibnd_* manpages sources MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0577e39bec76b23aa099b68d5d1c832cc3823c38 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 15:05:39 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0577e39bec76b23aa099b68d5d1c832cc3823c38 commit 0577e39bec76b23aa099b68d5d1c832cc3823c38 Author: Fernando Apesteguía AuthorDate: 2021-02-17 14:55:57 +0000 Commit: Fernando Apesteguía CommitDate: 2021-02-18 14:59:34 +0000 Fix ibnd_* manpages sources Some ibnd_* manpages source other manpages from a `man3/` directory when it should reference the pages in the current directory. Instead of modifying contributing sources and using `.so` (discouraged by mandoc(1)) use MLINKS in the proper Makefile and do not install the affected manpages. PR: 237693 Reported by: wosch@FreeBSD.org Reviewed by: gbe@ (mentor) yuripv@ Approved by: gbe@ (mentor) yuripv@ Differential Revision: https://reviews.freebsd.org/D28727 --- lib/ofed/libibnetdisc/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/ofed/libibnetdisc/Makefile b/lib/ofed/libibnetdisc/Makefile index 0c43685fa236..eb1706197442 100644 --- a/lib/ofed/libibnetdisc/Makefile +++ b/lib/ofed/libibnetdisc/Makefile @@ -18,14 +18,15 @@ ibnetdisc_cache.c \ query_smp.c MAN= \ -ibnd_debug.3 \ -ibnd_destroy_fabric.3 \ ibnd_discover_fabric.3 \ -ibnd_find_node_dr.3 \ ibnd_find_node_guid.3 \ -ibnd_iter_nodes.3 \ -ibnd_iter_nodes_type.3 \ -ibnd_show_progress.3 +ibnd_iter_nodes.3 + +MLINKS+=ibnd_discover_fabric.3 ibnd_debug.3 +MLINKS+=ibnd_discover_fabric.3 ibnd_destroy_fabric.3 +MLINKS+=ibnd_discover_fabric.3 ibnd_show_progress.3 +MLINKS+=ibnd_find_node_guid.3 ibnd_find_node_dr.3 +MLINKS+=ibnd_iter_nodes.3 ibnd_iter_nodes_type.3 LIBADD= osmcomp ibmad ibumad CFLAGS+= -DHAVE_CONFIG_H=1 From owner-dev-commits-src-all@freebsd.org Thu Feb 18 15:50:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5634953D6D6; Thu, 18 Feb 2021 15:50: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 4DhK0k23Rkz4j85; Thu, 18 Feb 2021 15:50: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 398831B08F; Thu, 18 Feb 2021 15:50: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 11IFoEGS066683; Thu, 18 Feb 2021 15:50:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IFoEQu066677; Thu, 18 Feb 2021 15:50:14 GMT (envelope-from git) Date: Thu, 18 Feb 2021 15:50:14 GMT Message-Id: <202102181550.11IFoEQu066677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 8c280db0b4d2 - main - ipmi_ssif: Fix inverted for the end of multi-part reads MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c280db0b4d22ad92152bf05f941201428c80b87 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 15:50:14 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=8c280db0b4d22ad92152bf05f941201428c80b87 commit 8c280db0b4d22ad92152bf05f941201428c80b87 Author: Allan Jude AuthorDate: 2021-02-18 15:48:01 +0000 Commit: Allan Jude CommitDate: 2021-02-18 15:48:01 +0000 ipmi_ssif: Fix inverted for the end of multi-part reads As per Intelligent Platform Management Interface Specification v2.0 rev. 1.1, section 12.5: SSIF Multi-part Read Transactions Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D28749 --- sys/dev/ipmi/ipmi_ssif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi_ssif.c b/sys/dev/ipmi/ipmi_ssif.c index 197c317dcc09..e761cfdeb081 100644 --- a/sys/dev/ipmi/ipmi_ssif.c +++ b/sys/dev/ipmi/ipmi_ssif.c @@ -297,7 +297,7 @@ read_start: len += count - 1; /* If this was the last block we are done. */ - if (ssif_buf[0] != 0xff) + if (ssif_buf[0] == 0xff) break; block++; } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 15:50:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4799D53D5EB; Thu, 18 Feb 2021 15:50: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 4DhK0j1bdnz4jF3; Thu, 18 Feb 2021 15:50: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 239A61AF1E; Thu, 18 Feb 2021 15:50: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 11IFoDwQ066154; Thu, 18 Feb 2021 15:50:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IFoDnm066144; Thu, 18 Feb 2021 15:50:13 GMT (envelope-from git) Date: Thu, 18 Feb 2021 15:50:13 GMT Message-Id: <202102181550.11IFoDnm066144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 37ef8d4cd6b5 - main - ig4(4): Increase timeout to about 1 second MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37ef8d4cd6b570c0882e97826df961a5d6003d07 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 15:50:13 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=37ef8d4cd6b570c0882e97826df961a5d6003d07 commit 37ef8d4cd6b570c0882e97826df961a5d6003d07 Author: Allan Jude AuthorDate: 2021-02-18 15:47:17 +0000 Commit: Allan Jude CommitDate: 2021-02-18 15:47:17 +0000 ig4(4): Increase timeout to about 1 second Per the i2c spec, a slave device can stretch SCL idefinitely, so 25ms is a bit arbitrary in general. smbus does specify an optional timeout recovery mechanism to be done at about 25~35ms, but the IPMI SSIF spec says that BMCs don't have any obligation to implement that. The BMC on Altra seems to mostly respond within 25ms, but occasionally will stretch SCL for ~300 msec. Also, the count_us mechanism seems to actually timeout around 25% earlier than it would claim (timeout really happening around 19ms instead of 25ms). Sponsored by: Ampere Computing LLC Submitted by: Klara Inc. Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D28747 --- sys/dev/ichiic/ig4_iic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ichiic/ig4_iic.c b/sys/dev/ichiic/ig4_iic.c index b684dc7d87cd..4781154f03c8 100644 --- a/sys/dev/ichiic/ig4_iic.c +++ b/sys/dev/ichiic/ig4_iic.c @@ -267,7 +267,7 @@ wait_intr(ig4iic_softc_t *sc, uint32_t intr) int error; int txlvl = -1; u_int count_us = 0; - u_int limit_us = 25000; /* 25ms */ + u_int limit_us = 1000000; /* 1sec */ for (;;) { /* From owner-dev-commits-src-all@freebsd.org Thu Feb 18 15:51:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7064153DB3E; Thu, 18 Feb 2021 15:51:56 +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 4DhK2h2qBZz4jXq; Thu, 18 Feb 2021 15:51:56 +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 53F2A1AEB6; Thu, 18 Feb 2021 15:51:56 +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 11IFpuGc074620; Thu, 18 Feb 2021 15:51:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IFputm074619; Thu, 18 Feb 2021 15:51:56 GMT (envelope-from git) Date: Thu, 18 Feb 2021 15:51:56 GMT Message-Id: <202102181551.11IFputm074619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 17d0f830dddf - main - arm64: Include NUMA locality info 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/main X-Git-Reftype: branch X-Git-Commit: 17d0f830dddf38724068f4139b6bef9a5dab70c5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 15:51:56 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=17d0f830dddf38724068f4139b6bef9a5dab70c5 commit 17d0f830dddf38724068f4139b6bef9a5dab70c5 Author: Mark Johnston AuthorDate: 2021-02-18 15:50:57 +0000 Commit: Mark Johnston CommitDate: 2021-02-18 15:51:38 +0000 arm64: Include NUMA locality info in the CPU topology The scheduler 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: mmel Submitted by: Klara, Inc. Sponsored by: Ampere Computing MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28579 --- sys/arm64/arm64/mp_machdep.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 8f1118d36bf5..8d5d82879571 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -437,8 +437,35 @@ ipi_stop(void *dummy __unused) struct cpu_group * cpu_topo(void) { + struct cpu_group *dom, *root; + int i; + + root = smp_topo_alloc(1); + dom = smp_topo_alloc(vm_ndomains); + + root->cg_parent = NULL; + root->cg_child = dom; + CPU_COPY(&all_cpus, &root->cg_mask); + root->cg_count = mp_ncpus; + root->cg_children = vm_ndomains; + root->cg_level = CG_SHARE_NONE; + root->cg_flags = 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++) { + dom->cg_parent = root; + dom->cg_child = NULL; + CPU_COPY(&cpuset_domain[i], &dom->cg_mask); + dom->cg_count = CPU_COUNT(&dom->cg_mask); + dom->cg_children = 0; + dom->cg_level = CG_SHARE_L3; + dom->cg_flags = 0; + } - return (smp_topo_none()); + return (root); } /* Determine if we running MP machine */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 15:56:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D140253DEB2; Thu, 18 Feb 2021 15:56: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 4DhK7d5YJQz4jxJ; Thu, 18 Feb 2021 15:56: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 ACF591B03E; Thu, 18 Feb 2021 15:56: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 11IFuDw7075379; Thu, 18 Feb 2021 15:56:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IFuDMW075378; Thu, 18 Feb 2021 15:56:13 GMT (envelope-from git) Date: Thu, 18 Feb 2021 15:56:13 GMT Message-Id: <202102181556.11IFuDMW075378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 9976b42b697c - main - ddb: fix show devmap output on 32-bit arm 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/main X-Git-Reftype: branch X-Git-Commit: 9976b42b697ce203b1d257b2a6fe64c8a2961645 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 15:56:13 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=9976b42b697ce203b1d257b2a6fe64c8a2961645 commit 9976b42b697ce203b1d257b2a6fe64c8a2961645 Author: Thomas Skibo AuthorDate: 2021-01-11 20:58:12 +0000 Commit: Mitchell Horne CommitDate: 2021-02-18 15:53:14 +0000 ddb: fix show devmap output on 32-bit arm The output has been broken since 1b6dd6d772ca. Casting to uintmax_t before the call to printf is necessary to ensure that 32-bit addresses are interpreted correctly. PR: 243236 MFC after: 3 days --- sys/kern/subr_devmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c index 8e07199b7f73..23baceb05129 100644 --- a/sys/kern/subr_devmap.c +++ b/sys/kern/subr_devmap.c @@ -74,7 +74,9 @@ devmap_dump_table(int (*prfunc)(const char *, ...)) prfunc("Static device mappings:\n"); for (pd = devmap_table; pd->pd_size != 0; ++pd) { prfunc(" 0x%08jx - 0x%08jx mapped at VA 0x%08jx\n", - pd->pd_pa, pd->pd_pa + pd->pd_size - 1, pd->pd_va); + (uintmax_t)pd->pd_pa, + (uintmax_t)(pd->pd_pa + pd->pd_size - 1), + (uintmax_t)pd->pd_va); } } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 16:00:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 46FDF53DFB1; Thu, 18 Feb 2021 16:00:54 +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 4DhKF21PDNz4kWS; Thu, 18 Feb 2021 16:00:54 +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 22E7E1AFEC; Thu, 18 Feb 2021 16:00:54 +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 11IG0sKm086139; Thu, 18 Feb 2021 16:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IG0sPW086138; Thu, 18 Feb 2021 16:00:54 GMT (envelope-from git) Date: Thu, 18 Feb 2021 16:00:54 GMT Message-Id: <202102181600.11IG0sPW086138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 57ba8673d7de - main - git-arc: Globally save and restore the git checkout head 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/main X-Git-Reftype: branch X-Git-Commit: 57ba8673d7de509c9f2d23fdc1a5e179ff4ff3cc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 16:00:54 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=57ba8673d7de509c9f2d23fdc1a5e179ff4ff3cc commit 57ba8673d7de509c9f2d23fdc1a5e179ff4ff3cc Author: Mark Johnston AuthorDate: 2021-02-18 15:59:32 +0000 Commit: Mark Johnston CommitDate: 2021-02-18 16:00:09 +0000 git-arc: Globally save and restore the git checkout head This script uses -e, so it's prone to exiting in awkward places. In particular, if arc diff fails, the script just exits without restoring the checkout. Mitigate this for now by using a global variable to record the previous checkout and use a trap handler to restore it in the face of errors. A better solution might be to use arc diff's --head parameter but that will require more testing. Reported by: kevans Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D28631 --- tools/tools/git/git-arc.sh | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index e8c84ea672f7..2de7e1858c00 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -29,7 +29,6 @@ # TODO: # - roll back after errors or SIGINT -# - current checkout # - created revs # - main (for git arc stage) @@ -320,20 +319,20 @@ show_and_prompt() save_head() { - local commit orig + local orig if ! orig=$(git symbolic-ref --short -q HEAD); then orig=$(git show -s --pretty=%H HEAD) fi - echo $orig + SAVED_HEAD=$orig } restore_head() { - local orig - - orig=$1 - git checkout -q $orig + if [ -n "$SAVED_HEAD" ]; then + git checkout -q $SAVED_HEAD + SAVED_HEAD= + fi } build_commit_list() @@ -353,8 +352,7 @@ build_commit_list() gitarc::create() { - local commit commits doprompt list o orig prev reviewers - local subscribers + local commit commits doprompt list o prev reviewers subscribers list= if eval $(git config --bool --default false --get arc.list); then @@ -391,7 +389,7 @@ gitarc::create() doprompt= fi - orig=$(save_head) + save_head prev="" for commit in ${commits}; do if create_one_review "$commit" "$reviewers" "$subscribers" "$prev" \ @@ -401,7 +399,7 @@ gitarc::create() prev="" fi done - restore_head $orig + restore_head } gitarc::list() @@ -501,7 +499,7 @@ gitarc::stage() gitarc::update() { - local commit diff orig + local commit diff commit=$1 diff=$(commit2diff $commit) @@ -510,7 +508,8 @@ gitarc::update() return fi - orig=$(save_head) + save_head + git checkout -q $commit # The linter is stupid and applies patches to the working copy. @@ -518,7 +517,7 @@ gitarc::update() # names. arc diff --allow-untracked --never-apply-patches --update $diff HEAD~ - restore_head $orig + restore_head } set -e @@ -591,4 +590,6 @@ if eval $(git config --bool --default false --get arc.browse); then BROWSE=--browse fi +trap restore_head EXIT INT + gitarc::${verb} $@ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 16:00:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 578C453DFBA; Thu, 18 Feb 2021 16:00: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 4DhKF326Tmz4kbr; Thu, 18 Feb 2021 16:00: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 3B02D1B25B; Thu, 18 Feb 2021 16:00: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 11IG0t4E086159; Thu, 18 Feb 2021 16:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IG0tJ4086158; Thu, 18 Feb 2021 16:00:55 GMT (envelope-from git) Date: Thu, 18 Feb 2021 16:00:55 GMT Message-Id: <202102181600.11IG0tJ4086158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cd6114d1a65c - main - git-arc: Preserve the commit author when staging commits 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/main X-Git-Reftype: branch X-Git-Commit: cd6114d1a65cda09410e91ed4dc220df825a8ba2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 16:00:55 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd6114d1a65cda09410e91ed4dc220df825a8ba2 commit cd6114d1a65cda09410e91ed4dc220df825a8ba2 Author: Mark Johnston AuthorDate: 2021-02-18 15:59:43 +0000 Commit: Mark Johnston CommitDate: 2021-02-18 16:00:09 +0000 git-arc: Preserve the commit author when staging commits Reported by: jhb --- tools/tools/git/git-arc.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh index 2de7e1858c00..07b042ceb151 100644 --- a/tools/tools/git/git-arc.sh +++ b/tools/tools/git/git-arc.sh @@ -452,7 +452,7 @@ gitarc::patch() gitarc::stage() { - local branch commit commits diff reviewers tmp + local author branch commit commits diff reviewers tmp branch=main while getopts b: o; do @@ -488,12 +488,13 @@ gitarc::stage() fi printf "Differential Revision:\thttps://reviews.freebsd.org/${diff}" >> $tmp fi + author=$(git show -s --format='%an <%ae>' ${commit}) if ! git cherry-pick --no-commit ${commit}; then warn "Failed to apply $(git rev-parse --short ${commit}). Are you staging patches in the wrong order?" git checkout -f break fi - git commit --edit --file $tmp + git commit --edit --file $tmp --author "${author}" done } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:02:08 2021 Return-Path: Delivered-To: dev-commits-src-all@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 915C853FDDB; Thu, 18 Feb 2021 17:02:08 +0000 (UTC) (envelope-from gjb@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhLbh27qJz4pN5; Thu, 18 Feb 2021 17:02:08 +0000 (UTC) (envelope-from gjb@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1613667728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YRLvsBh7Fvm7hTRneL6NeQj44NtAGhou/Qad5RLgDGk=; b=sKTnVrRVGjVC0OFLrPoigH7nOckmK6Ysro+bJW66BXxmEu5sbi6wY/LCPTt26odm5AnZ5I yQ4Eb1pi2vih8/rfDbbDgOKutBxPtN6Cw5utpGnaryfQC1HeINLbiAZDBK+81e7/yg9BH5 mcBPptbBW06p6R5yUsczYTh3KV0eL8J4HhTA8LwtMm9IMfypf2IoZ3qzoqW9EaIIhXxUl/ Y0aQ7trpRGo85L1v9VlY5q19uC4lMquxWTo6xrps/HpyyuJKC4pg4OOjO9VyAB/npZYApa 7gU5AMqgbGO/MazqJOAd+jIit9MHbo34pvfgG/+zYWI5denvJ6Q230ya8lZJ7w== Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 982FAAD88; Thu, 18 Feb 2021 17:02:07 +0000 (UTC) (envelope-from gjb@freebsd.org) Date: Thu, 18 Feb 2021 17:02:05 +0000 From: Glen Barber To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f61e92ca5a23 - main - release: permanently remove the 'reldoc' target and associates Message-ID: <20210218170205.GF90948@FreeBSD.org> References: <202102180400.11I40MEe041138@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GLp9dJVi+aaipsRk" Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1613667728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YRLvsBh7Fvm7hTRneL6NeQj44NtAGhou/Qad5RLgDGk=; b=Xd9krUagtSzCgLAZ9jLHYopCtaNyzv58GbHJ87u55c6c7miBaDJ1c8mvnrxjuTvxC6ZpNr 2xXIg2p2PViA2G/PspQhk55uh7YvNRkdjdptqfnRFeVh4IJGn03uUYEDVTFr7EwfoX+PwB uAxH6tlOWxEPyhMANHAtcQKHTv4i7sB5K22+ntETA8ScgawUN3lClbY8MnDMgiyfdUjlP4 iwU5QrrB2vW1o/hRP79Fqn7gbSkbTfuu68ElS/wmx8y7cuXBd4ridyIhfjpWquDOEFk9x7 N/RSaJm6YNa8PZxpe3j3KnrUAqorRfdQ06TRmYV0Xr+19gDYWsouYDM4ylUeLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1613667728; a=rsa-sha256; cv=none; b=QZeY1iu5IOyh9CDZa6gm5bcGIlw2npTSZv/Idiw52pZbD11dQZG/cLJHKlrbwMC33qMQux Th9puO5Tson3HqEhSCCEXopNF4+PLa+iWz0bVUCgufsj+zI8MBp+y7qDlQjZO8FxB+bD/M H9UkQBhvciqp3Tm7xSMvmeHHQ06U4WjwjMqWFVebIvRvBHmBXZxVAouunDRDm4QXOYz5OK +dl4clBkwHbm8xa2fE2NNnd8dS2Vdq8c26TCkqgG/tKrFj3rrZx7Mxe1hSUqT8sauW0g9O 0oJL+jLatIuHtc6c94UIivmqltae4UaZVCTEb6HBYIY/SP5lwLrNSSEhlcg9rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:02:08 -0000 --GLp9dJVi+aaipsRk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 18, 2021 at 11:19:45AM +0100, Mateusz Piotrowski wrote: > Hi Glen, >=20 > On 18/02/2021 05:00, Glen Barber wrote: > > The branch main has been updated by gjb: > >=20 > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Df61e92ca5a23450bc28169bb= dd71d7674df98c19 > >=20 > > commit f61e92ca5a23450bc28169bbdd71d7674df98c19 > > Author: Glen Barber > > AuthorDate: 2021-02-18 04:00:03 +0000 > > Commit: Glen Barber > > CommitDate: 2021-02-18 04:00:03 +0000 > >=20 > > release: permanently remove the 'reldoc' target and associates > > Following 7b1d1a1658ffb69eff93afc713f9e88ed8b20eac, the structure > > for the reldoc target has significantly changed as result of the > > ASCIIDoctor/Hugo migration. As the release notes related files > > on the installation medium are inherently out of date, purge them > > entirely. >=20 > We've got to update the release(7) manual after this commit. I've opened a > PR on Bugzilla for that: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D253615 >=20 Yep, I am aware. Thank you for filing a PR. Glen --GLp9dJVi+aaipsRk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEjRJAPC5sqwhs9k2jAxRYpUeP4pMFAmAunY0ACgkQAxRYpUeP 4pNvMA/+JEG5tw/JekLBb4rGfopTyB30MpotLWpVQfnXpA6sMDl0u6ZMROWHB3NJ LH7cT1Q92Jus/9wCMtBwGtZi2o/g3VgkGoL5n4QWsm5QQfoUhA7iO1ZI4+Mc5Lp0 ruX72cGzks5DikmFMshaBK+AvmnTckbqTTKXxQ95jwqVWaxqfYspeiLR57lRPYKN e85smENZzteZSYiTQAqQ5RgoafaV/tdBYxsNfadVnEyDFEt+fq0SLuZcVbVSR+BX WRx6sivWgo1IHScfXkFTx5YC65iDKdLOPQZ7JSRRYlF8eqZfv33xQDh2lkHdN8HP 49yVqRx286cIGCvpT52wZTeesvHtiXJCaXvG2ozS9GF5xW8ypQXdQ7M6uGdC+f2K MimCkxSsWledKLzsH5r5rj1keeGVhuXLpb+hrLklJXFwkHTmFi3VsaY6kHN8biGh 1t2w00I951EnVO/o1qtSGiA40lYAFz4akOiqesMtn3R6AZ5VmQxpAnwQKWYDE0Dm GvwRskPXU/o1SYxLILNN3q4poXroLv8rcGWnaM5F8YlHc08uAg4lk5P0dMgb0i7F WGXBUqb0VYnFZCaz73LT1cm8KvIS+tM2YJ2Aq2i60X4I4zLYNtddu1HjbUay9ndz nBHb74hvMHzZQL2YbkFNNPrMpY+GuXQuEVomp74H1kcHMlt8scE= =QCMF -----END PGP SIGNATURE----- --GLp9dJVi+aaipsRk-- From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:47:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A83F1541386; Thu, 18 Feb 2021 17:47: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 4DhMc84JxXz4ryn; Thu, 18 Feb 2021 17:47: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 7C9501C953; Thu, 18 Feb 2021 17:47: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 11IHlauI021150; Thu, 18 Feb 2021 17:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHlaIg021149; Thu, 18 Feb 2021 17:47:36 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:47:36 GMT Message-Id: <202102181747.11IHlaIg021149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 9e94eac9765f - stable/11 - OpenSSL: Don't overflow the output length in EVP_CipherUpdate calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 9e94eac9765f54671b90150955e0851579959daa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:47:36 -0000 The branch stable/11 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=9e94eac9765f54671b90150955e0851579959daa commit 9e94eac9765f54671b90150955e0851579959daa Author: Jung-uk Kim AuthorDate: 2021-02-18 17:43:29 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 17:43:29 +0000 OpenSSL: Don't overflow the output length in EVP_CipherUpdate calls Note it is backported from OpenSSL 1.1.1j to fix CVE-2021-23840. https://github.com/openssl/openssl/commit/6a51b9e1d0cf0bf8515f7201b68fb0a3482b3dc1 --- crypto/openssl/crypto/evp/evp.h | 2 ++ crypto/openssl/crypto/evp/evp_enc.c | 27 +++++++++++++++++++++++++++ crypto/openssl/crypto/evp/evp_err.c | 4 +++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/evp/evp.h b/crypto/openssl/crypto/evp/evp.h index 883a9434899b..4ec0e25d07ac 100644 --- a/crypto/openssl/crypto/evp/evp.h +++ b/crypto/openssl/crypto/evp/evp.h @@ -1491,6 +1491,7 @@ void ERR_load_EVP_strings(void); # define EVP_F_EVP_DECRYPTFINAL_EX 101 # define EVP_F_EVP_DECRYPTUPDATE 181 # define EVP_F_EVP_DIGESTINIT_EX 128 +# define EVP_F_EVP_ENCRYPTDECRYPTUPDATE 182 # define EVP_F_EVP_ENCRYPTFINAL_EX 127 # define EVP_F_EVP_ENCRYPTUPDATE 180 # define EVP_F_EVP_MD_CTX_COPY_EX 110 @@ -1602,6 +1603,7 @@ void ERR_load_EVP_strings(void); # define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 # define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 # define EVP_R_OPERATON_NOT_INITIALIZED 151 +# define EVP_R_OUTPUT_WOULD_OVERFLOW 172 # define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 # define EVP_R_PRIVATE_KEY_DECODE_ERROR 145 # define EVP_R_PRIVATE_KEY_ENCODE_ERROR 146 diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index c63fb53ac85e..f392f6d01363 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -57,6 +57,7 @@ */ #include +#include #include "cryptlib.h" #include #include @@ -357,6 +358,19 @@ static int evp_EncryptDecryptUpdate(EVP_CIPHER_CTX *ctx, return 1; } else { j = bl - i; + + /* + * Once we've processed the first j bytes from in, the amount of + * data left that is a multiple of the block length is: + * (inl - j) & ~(bl - 1) + * We must ensure that this amount of data, plus the one block that + * we process from ctx->buf does not exceed INT_MAX + */ + if (((inl - j) & ~(bl - 1)) > INT_MAX - bl) { + EVPerr(EVP_F_EVP_ENCRYPTDECRYPTUPDATE, + EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(&(ctx->buf[i]), in, j); if (!M_do_cipher(ctx, out, ctx->buf, bl)) return 0; @@ -482,6 +496,19 @@ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, OPENSSL_assert(b <= sizeof(ctx->final)); if (ctx->final_used) { + /* + * final_used is only ever set if buf_len is 0. Therefore the maximum + * length output we will ever see from evp_EncryptDecryptUpdate is + * the maximum multiple of the block length that is <= inl, or just: + * inl & ~(b - 1) + * Since final_used has been set then the final output length is: + * (inl & ~(b - 1)) + b + * This must never exceed INT_MAX + */ + if ((inl & ~(b - 1)) > INT_MAX - b) { + EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_OUTPUT_WOULD_OVERFLOW); + return 0; + } memcpy(out, ctx->final, b); out += b; fix_len = 1; diff --git a/crypto/openssl/crypto/evp/evp_err.c b/crypto/openssl/crypto/evp/evp_err.c index 11647b92c613..0b1e59ead606 100644 --- a/crypto/openssl/crypto/evp/evp_err.c +++ b/crypto/openssl/crypto/evp/evp_err.c @@ -1,6 +1,6 @@ /* crypto/evp/evp_err.c */ /* ==================================================================== - * Copyright (c) 1999-2019 The OpenSSL Project. All rights reserved. + * Copyright (c) 1999-2021 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -94,6 +94,7 @@ static ERR_STRING_DATA EVP_str_functs[] = { {ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"}, {ERR_FUNC(EVP_F_EVP_DECRYPTUPDATE), "EVP_DecryptUpdate"}, {ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, + {ERR_FUNC(EVP_F_EVP_ENCRYPTDECRYPTUPDATE), "EVP_ENCRYPTDECRYPTUPDATE"}, {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, {ERR_FUNC(EVP_F_EVP_ENCRYPTUPDATE), "EVP_EncryptUpdate"}, {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, @@ -215,6 +216,7 @@ static ERR_STRING_DATA EVP_str_reasons[] = { {ERR_REASON(EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE), "operation not supported for this keytype"}, {ERR_REASON(EVP_R_OPERATON_NOT_INITIALIZED), "operaton not initialized"}, + {ERR_REASON(EVP_R_OUTPUT_WOULD_OVERFLOW), "output would overflow"}, {ERR_REASON(EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE), "pkcs8 unknown broken type"}, {ERR_REASON(EVP_R_PRIVATE_KEY_DECODE_ERROR), "private key decode error"}, From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:47:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C3FEA5410DD; Thu, 18 Feb 2021 17:47: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 4DhMc9550xz4rwF; Thu, 18 Feb 2021 17:47: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 A19321C47C; Thu, 18 Feb 2021 17:47: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 11IHlbQv021168; Thu, 18 Feb 2021 17:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHlbB9021167; Thu, 18 Feb 2021 17:47:37 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:47:37 GMT Message-Id: <202102181747.11IHlbB9021167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 2dcaecea30c0 - stable/11 - OpenSSL: Fix Null pointer deref in X509_issuer_and_serial_hash() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 2dcaecea30c0258d0541aaf434df95d143d07c06 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:47:37 -0000 The branch stable/11 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=2dcaecea30c0258d0541aaf434df95d143d07c06 commit 2dcaecea30c0258d0541aaf434df95d143d07c06 Author: Jung-uk Kim AuthorDate: 2021-02-18 17:46:10 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 17:46:10 +0000 OpenSSL: Fix Null pointer deref in X509_issuer_and_serial_hash() Note it is backported from OpenSSL 1.1.1j to fix CVE-2021-23841. https://github.com/openssl/openssl/commit/122a19ab48091c657f7cb1fb3af9fc07bd557bbf --- crypto/openssl/crypto/x509/x509_cmp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/openssl/crypto/x509/x509_cmp.c b/crypto/openssl/crypto/x509/x509_cmp.c index a7b90e6a42f5..62868f0c9c2e 100644 --- a/crypto/openssl/crypto/x509/x509_cmp.c +++ b/crypto/openssl/crypto/x509/x509_cmp.c @@ -87,6 +87,8 @@ unsigned long X509_issuer_and_serial_hash(X509 *a) EVP_MD_CTX_init(&ctx); f = X509_NAME_oneline(a->cert_info->issuer, NULL, 0); + if (f == NULL) + goto err; if (!EVP_DigestInit_ex(&ctx, EVP_md5(), NULL)) goto err; if (!EVP_DigestUpdate(&ctx, (unsigned char *)f, strlen(f))) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 70CF85415B0; Thu, 18 Feb 2021 17:54:34 +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 4DhMmB2lrcz4sQN; Thu, 18 Feb 2021 17:54: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 518B31CA9E; Thu, 18 Feb 2021 17:54: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 11IHsY2P033849; Thu, 18 Feb 2021 17:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsY6Z033848; Thu, 18 Feb 2021 17:54:34 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:34 GMT Message-Id: <202102181754.11IHsY6Z033848@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: fc8fc743d893 - main - Add an OCF algorithm for ChaCha20-Poly1305 AEAD. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc8fc743d89388c0c5b97a491428fab2b36beac8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:34 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=fc8fc743d89388c0c5b97a491428fab2b36beac8 commit fc8fc743d89388c0c5b97a491428fab2b36beac8 Author: John Baldwin AuthorDate: 2021-02-18 17:21:56 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:26:00 +0000 Add an OCF algorithm for ChaCha20-Poly1305 AEAD. Note that this algorithm implements the mode defined in RFC 8439. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27836 --- share/man/man7/crypto.7 | 4 +++- sys/conf/files | 1 + sys/modules/crypto/Makefile | 1 + sys/opencrypto/crypto.c | 12 +++++----- sys/opencrypto/cryptodev.c | 11 +++++++++ sys/opencrypto/cryptodev.h | 5 +++- sys/opencrypto/xform_chacha20_poly1305.c | 41 ++++++++++++++++++++++++++++++++ sys/opencrypto/xform_enc.h | 1 + 8 files changed, 68 insertions(+), 8 deletions(-) diff --git a/share/man/man7/crypto.7 b/share/man/man7/crypto.7 index d6cae1e39819..ccc2d1fc9be3 100644 --- a/share/man/man7/crypto.7 +++ b/share/man/man7/crypto.7 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2021 +.Dd February 18, 2021 .Dt CRYPTO 7 .Os .Sh NAME @@ -161,6 +161,8 @@ The following AEAD algorithms are supported: AES Galois/Counter Mode .It Dv CRYPTO_AES_CCM_16 Ta 12 Ta 16, 24, 32 Ta 16 Ta AES Counter with CBC-MAC +.It Dv CRYPTO_CHACHA20_POLY1305 Ta 12 Ta 32 Ta 16 Ta +ChaCha20-Poly1305 .El .Sh SEE ALSO .Xr crypto 4 , diff --git a/sys/conf/files b/sys/conf/files index f1a76b0575d9..8705287e89f1 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4925,6 +4925,7 @@ opencrypto/gfmult.c optional crypto | ipsec | ipsec_support opencrypto/rmd160.c optional crypto | ipsec | ipsec_support opencrypto/xform.c optional crypto | ipsec | ipsec_support opencrypto/xform_cbc_mac.c optional crypto +opencrypto/xform_chacha20_poly1305.c optional crypto opencrypto/xform_poly1305.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index 01ade43a0e51..89af6ab8fc61 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -67,6 +67,7 @@ SRCS += randombytes.c CFLAGS.randombytes.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} SRCS += utils.c CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} +SRCS += xform_chacha20_poly1305.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h SRCS += opt_compat.h diff --git a/sys/opencrypto/crypto.c b/sys/opencrypto/crypto.c index 3b489739f067..1c9d79af8c91 100644 --- a/sys/opencrypto/crypto.c +++ b/sys/opencrypto/crypto.c @@ -600,6 +600,8 @@ crypto_cipher(const struct crypto_session_params *csp) return (&enc_xform_chacha20); case CRYPTO_AES_CCM_16: return (&enc_xform_ccm); + case CRYPTO_CHACHA20_POLY1305: + return (&enc_xform_chacha20_poly1305); default: return (NULL); } @@ -691,6 +693,7 @@ static enum alg_type { [CRYPTO_POLY1305] = ALG_KEYED_DIGEST, [CRYPTO_AES_CCM_CBC_MAC] = ALG_KEYED_DIGEST, [CRYPTO_AES_CCM_16] = ALG_AEAD, + [CRYPTO_CHACHA20_POLY1305] = ALG_AEAD, }; static enum alg_type @@ -835,6 +838,7 @@ check_csp(const struct crypto_session_params *csp) switch (csp->csp_cipher_alg) { case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: if (csp->csp_auth_mlen > 16) return (false); break; @@ -1308,12 +1312,8 @@ crp_sanity(struct cryptop *crp) crp->crp_op == (CRYPTO_OP_DECRYPT | CRYPTO_OP_VERIFY_DIGEST), ("invalid AEAD op %x", crp->crp_op)); - if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) - KASSERT(crp->crp_flags & CRYPTO_F_IV_SEPARATE, - ("GCM without a separate IV")); - if (csp->csp_cipher_alg == CRYPTO_AES_CCM_16) - KASSERT(crp->crp_flags & CRYPTO_F_IV_SEPARATE, - ("CCM without a separate IV")); + KASSERT(crp->crp_flags & CRYPTO_F_IV_SEPARATE, + ("AEAD without a separate IV")); break; case CSP_MODE_ETA: KASSERT(crp->crp_op == diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c index 9bb95bcb21f0..ed7e3cfd0354 100644 --- a/sys/opencrypto/cryptodev.c +++ b/sys/opencrypto/cryptodev.c @@ -428,6 +428,9 @@ cse_create(struct fcrypt *fcr, struct session2_op *sop) case CRYPTO_AES_CCM_16: txform = &enc_xform_ccm; break; + case CRYPTO_CHACHA20_POLY1305: + txform = &enc_xform_chacha20_poly1305; + break; default: CRYPTDEB("invalid cipher"); SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); @@ -586,6 +589,12 @@ cse_create(struct fcrypt *fcr, struct session2_op *sop) return (EINVAL); } csp.csp_mode = CSP_MODE_AEAD; + } else if (sop->cipher == CRYPTO_CHACHA20_POLY1305) { + if (sop->mac != 0) { + SDT_PROBE1(opencrypto, dev, ioctl, error, __LINE__); + return (EINVAL); + } + csp.csp_mode = CSP_MODE_AEAD; } else if (txform != NULL && thash != NULL) csp.csp_mode = CSP_MODE_ETA; else if (txform != NULL) @@ -679,6 +688,8 @@ cse_create(struct fcrypt *fcr, struct session2_op *sop) cse->hashsize = AES_GMAC_HASH_LEN; else if (csp.csp_cipher_alg == CRYPTO_AES_CCM_16) cse->hashsize = AES_CBC_MAC_HASH_LEN; + else if (csp.csp_cipher_alg == CRYPTO_CHACHA20_POLY1305) + cse->hashsize = POLY1305_HASH_LEN; cse->ivsize = csp.csp_ivlen; mtx_lock(&fcr->lock); diff --git a/sys/opencrypto/cryptodev.h b/sys/opencrypto/cryptodev.h index 659599cb7d60..bd9e65eb9428 100644 --- a/sys/opencrypto/cryptodev.h +++ b/sys/opencrypto/cryptodev.h @@ -124,6 +124,7 @@ #define AES_CCM_IV_LEN 12 #define AES_XTS_IV_LEN 8 #define AES_XTS_ALPHA 0x87 /* GF(2^128) generator polynomial */ +#define CHACHA20_POLY1305_IV_LEN 12 /* Min and Max Encryption Key Sizes */ #define NULL_MIN_KEY 0 @@ -136,6 +137,7 @@ #define AES_XTS_MAX_KEY (2 * AES_MAX_KEY) #define CAMELLIA_MIN_KEY 16 #define CAMELLIA_MAX_KEY 32 +#define CHACHA20_POLY1305_KEY 32 /* Maximum hash algorithm result length */ #define AALG_MAX_RESULT_LEN 64 /* Keep this updated */ @@ -184,7 +186,8 @@ #define CRYPTO_POLY1305 38 #define CRYPTO_AES_CCM_CBC_MAC 39 /* auth side */ #define CRYPTO_AES_CCM_16 40 /* cipher side */ -#define CRYPTO_ALGORITHM_MAX 40 /* Keep updated - see below */ +#define CRYPTO_CHACHA20_POLY1305 41 /* combined AEAD cipher per RFC 8439 */ +#define CRYPTO_ALGORITHM_MAX 41 /* Keep updated - see below */ #define CRYPTO_ALGO_VALID(x) ((x) >= CRYPTO_ALGORITHM_MIN && \ (x) <= CRYPTO_ALGORITHM_MAX) diff --git a/sys/opencrypto/xform_chacha20_poly1305.c b/sys/opencrypto/xform_chacha20_poly1305.c new file mode 100644 index 000000000000..e568e76cad51 --- /dev/null +++ b/sys/opencrypto/xform_chacha20_poly1305.c @@ -0,0 +1,41 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Netflix Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +struct enc_xform enc_xform_chacha20_poly1305 = { + .type = CRYPTO_CHACHA20_POLY1305, + .name = "ChaCha20-Poly1305", + .ctxsize = sizeof(struct chacha_ctx), + .blocksize = 1, + .native_blocksize = CHACHA_BLOCKLEN, + .ivsize = CHACHA20_POLY1305_IV_LEN, + .minkey = CHACHA20_POLY1305_KEY, + .maxkey = CHACHA20_POLY1305_KEY, +}; + diff --git a/sys/opencrypto/xform_enc.h b/sys/opencrypto/xform_enc.h index b44f1ff0c270..e8325f20917b 100644 --- a/sys/opencrypto/xform_enc.h +++ b/sys/opencrypto/xform_enc.h @@ -81,6 +81,7 @@ extern struct enc_xform enc_xform_aes_nist_gmac; extern struct enc_xform enc_xform_aes_xts; extern struct enc_xform enc_xform_camellia; extern struct enc_xform enc_xform_chacha20; +extern struct enc_xform enc_xform_chacha20_poly1305; extern struct enc_xform enc_xform_ccm; struct aes_icm_ctx { From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 957C65414C1; Thu, 18 Feb 2021 17:54: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 4DhMmC3t4Kz4snG; Thu, 18 Feb 2021 17:54: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 786581CC91; Thu, 18 Feb 2021 17:54: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 11IHsZn6033871; Thu, 18 Feb 2021 17:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsZdC033870; Thu, 18 Feb 2021 17:54:35 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:35 GMT Message-Id: <202102181754.11IHsZdC033870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: dd2e1352b68a - main - Add an implementation of CHACHA20_POLY1305 to cryptosoft. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd2e1352b68aa33f7f6f8c19aaf88cf287013ae8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:35 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=dd2e1352b68aa33f7f6f8c19aaf88cf287013ae8 commit dd2e1352b68aa33f7f6f8c19aaf88cf287013ae8 Author: John Baldwin AuthorDate: 2021-02-18 17:22:18 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:26:23 +0000 Add an implementation of CHACHA20_POLY1305 to cryptosoft. This uses the chacha20 IETF and poly1305 implementations from libsodium. A seperate auth_hash is created for the auth side whose Setkey method derives the poly1305 key from the AEAD key and nonce as described in RFC 8439. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27837 --- sys/conf/files | 3 +- sys/modules/crypto/Makefile | 9 +- sys/opencrypto/cryptosoft.c | 199 +++++++++++++++++++++++++++++++ sys/opencrypto/xform_auth.h | 1 + sys/opencrypto/xform_chacha20_poly1305.c | 128 +++++++++++++++++++- 5 files changed, 335 insertions(+), 5 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 8705287e89f1..8501f6fa9c1a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4925,7 +4925,8 @@ opencrypto/gfmult.c optional crypto | ipsec | ipsec_support opencrypto/rmd160.c optional crypto | ipsec | ipsec_support opencrypto/xform.c optional crypto | ipsec | ipsec_support opencrypto/xform_cbc_mac.c optional crypto -opencrypto/xform_chacha20_poly1305.c optional crypto +opencrypto/xform_chacha20_poly1305.c optional crypto \ + compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" opencrypto/xform_poly1305.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ diff --git a/sys/modules/crypto/Makefile b/sys/modules/crypto/Makefile index 89af6ab8fc61..f64ea1f6fc8b 100644 --- a/sys/modules/crypto/Makefile +++ b/sys/modules/crypto/Makefile @@ -15,6 +15,8 @@ LIBSODIUM=${SRCTOP}/sys/contrib/libsodium/src/libsodium .PATH: ${SRCTOP}/sys/contrib/libb2 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305 .PATH: ${LIBSODIUM}/crypto_onetimeauth/poly1305/donna +.PATH: ${LIBSODIUM}/crypto_stream/chacha20 +.PATH: ${LIBSODIUM}/crypto_stream/chacha20/ref .PATH: ${LIBSODIUM}/crypto_verify/sodium .PATH: ${SRCTOP}/sys/crypto/libsodium @@ -55,8 +57,14 @@ SRCS += chacha-sw.c LIBSODIUM_INC=${LIBSODIUM}/include LIBSODIUM_COMPAT=${SRCTOP}/sys/crypto/libsodium +SRCS += xform_chacha20_poly1305.c +CFLAGS.xform_chacha20_poly1305.c+= -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} SRCS += xform_poly1305.c CFLAGS.xform_poly1305.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} +SRCS += stream_chacha20.c +CFLAGS.stream_chacha20.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT} +SRCS += chacha20_ref.c +CFLAGS.chacha20_ref.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT} SRCS += onetimeauth_poly1305.c CFLAGS.onetimeauth_poly1305.c += -I${LIBSODIUM_INC}/sodium -I${LIBSODIUM_COMPAT} SRCS += poly1305_donna.c @@ -67,7 +75,6 @@ SRCS += randombytes.c CFLAGS.randombytes.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} SRCS += utils.c CFLAGS.utils.c += -I${LIBSODIUM_INC} -I${LIBSODIUM_COMPAT} -SRCS += xform_chacha20_poly1305.c SRCS += opt_param.h cryptodev_if.h bus_if.h device_if.h SRCS += opt_compat.h diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index e5a1139039d0..b92e25e86f76 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -867,6 +867,168 @@ out: return (error); } +static int +swcr_chacha20_poly1305(struct swcr_session *ses, struct cryptop *crp) +{ + const struct crypto_session_params *csp; + uint64_t blkbuf[howmany(CHACHA20_NATIVE_BLOCK_LEN, sizeof(uint64_t))]; + u_char *blk = (u_char *)blkbuf; + u_char tag[POLY1305_HASH_LEN]; + struct crypto_buffer_cursor cc_in, cc_out; + const u_char *inblk; + u_char *outblk; + uint64_t *blkp; + union authctx ctx; + struct swcr_auth *swa; + struct swcr_encdec *swe; + struct auth_hash *axf; + struct enc_xform *exf; + int blksz, error, r, resid; + + swa = &ses->swcr_auth; + axf = swa->sw_axf; + + swe = &ses->swcr_encdec; + exf = swe->sw_exf; + blksz = exf->native_blocksize; + KASSERT(blksz <= sizeof(blkbuf), ("%s: blocksize mismatch", __func__)); + + if ((crp->crp_flags & CRYPTO_F_IV_SEPARATE) == 0) + return (EINVAL); + + csp = crypto_get_params(crp->crp_session); + + /* Generate Poly1305 key. */ + if (crp->crp_cipher_key != NULL) + axf->Setkey(&ctx, crp->crp_cipher_key, csp->csp_cipher_klen); + else + axf->Setkey(&ctx, csp->csp_cipher_key, csp->csp_cipher_klen); + axf->Reinit(&ctx, crp->crp_iv, csp->csp_ivlen); + + /* Supply MAC with AAD */ + if (crp->crp_aad != NULL) + axf->Update(&ctx, crp->crp_aad, crp->crp_aad_length); + else + crypto_apply(crp, crp->crp_aad_start, + crp->crp_aad_length, axf->Update, &ctx); + if (crp->crp_aad_length % 16 != 0) { + /* padding1 */ + memset(blk, 0, 16); + axf->Update(&ctx, blk, 16 - crp->crp_aad_length % 16); + } + + if (crp->crp_cipher_key != NULL) + exf->setkey(swe->sw_kschedule, crp->crp_cipher_key, + csp->csp_cipher_klen); + exf->reinit(swe->sw_kschedule, crp->crp_iv); + + /* Do encryption with MAC */ + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_payload_start); + if (CRYPTO_HAS_OUTPUT_BUFFER(crp)) { + crypto_cursor_init(&cc_out, &crp->crp_obuf); + crypto_cursor_advance(&cc_out, crp->crp_payload_output_start); + } else + cc_out = cc_in; + for (resid = crp->crp_payload_length; resid >= blksz; resid -= blksz) { + if (crypto_cursor_seglen(&cc_in) < blksz) { + crypto_cursor_copydata(&cc_in, blksz, blk); + inblk = blk; + } else { + inblk = crypto_cursor_segbase(&cc_in); + crypto_cursor_advance(&cc_in, blksz); + } + if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { + if (crypto_cursor_seglen(&cc_out) < blksz) + outblk = blk; + else + outblk = crypto_cursor_segbase(&cc_out); + exf->encrypt(swe->sw_kschedule, inblk, outblk); + axf->Update(&ctx, outblk, blksz); + if (outblk == blk) + crypto_cursor_copyback(&cc_out, blksz, blk); + else + crypto_cursor_advance(&cc_out, blksz); + } else { + axf->Update(&ctx, inblk, blksz); + } + } + if (resid > 0) { + crypto_cursor_copydata(&cc_in, resid, blk); + if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { + exf->encrypt_last(swe->sw_kschedule, blk, blk, resid); + crypto_cursor_copyback(&cc_out, resid, blk); + } + axf->Update(&ctx, blk, resid); + if (resid % 16 != 0) { + /* padding2 */ + memset(blk, 0, 16); + axf->Update(&ctx, blk, 16 - resid % 16); + } + } + + /* lengths */ + blkp = (uint64_t *)blk; + blkp[0] = htole64(crp->crp_aad_length); + blkp[1] = htole64(crp->crp_payload_length); + axf->Update(&ctx, blk, sizeof(uint64_t) * 2); + + /* Finalize MAC */ + axf->Final(tag, &ctx); + + /* Validate tag */ + error = 0; + if (!CRYPTO_OP_IS_ENCRYPT(crp->crp_op)) { + u_char tag2[POLY1305_HASH_LEN]; + + crypto_copydata(crp, crp->crp_digest_start, swa->sw_mlen, tag2); + + r = timingsafe_bcmp(tag, tag2, swa->sw_mlen); + explicit_bzero(tag2, sizeof(tag2)); + if (r != 0) { + error = EBADMSG; + goto out; + } + + /* tag matches, decrypt data */ + crypto_cursor_init(&cc_in, &crp->crp_buf); + crypto_cursor_advance(&cc_in, crp->crp_payload_start); + for (resid = crp->crp_payload_length; resid > blksz; + resid -= blksz) { + if (crypto_cursor_seglen(&cc_in) < blksz) { + crypto_cursor_copydata(&cc_in, blksz, blk); + inblk = blk; + } else { + inblk = crypto_cursor_segbase(&cc_in); + crypto_cursor_advance(&cc_in, blksz); + } + if (crypto_cursor_seglen(&cc_out) < blksz) + outblk = blk; + else + outblk = crypto_cursor_segbase(&cc_out); + exf->decrypt(swe->sw_kschedule, inblk, outblk); + if (outblk == blk) + crypto_cursor_copyback(&cc_out, blksz, blk); + else + crypto_cursor_advance(&cc_out, blksz); + } + if (resid > 0) { + crypto_cursor_copydata(&cc_in, resid, blk); + exf->decrypt_last(swe->sw_kschedule, blk, blk, resid); + crypto_cursor_copyback(&cc_out, resid, blk); + } + } else { + /* Inject the authentication data */ + crypto_copyback(crp, crp->crp_digest_start, swa->sw_mlen, tag); + } + +out: + explicit_bzero(blkbuf, sizeof(blkbuf)); + explicit_bzero(tag, sizeof(tag)); + explicit_bzero(&ctx, sizeof(ctx)); + return (error); +} + /* * Apply a cipher and a digest to perform EtA. */ @@ -1171,6 +1333,33 @@ swcr_setup_ccm(struct swcr_session *ses, return (swcr_setup_cipher(ses, csp)); } +static int +swcr_setup_chacha20_poly1305(struct swcr_session *ses, + const struct crypto_session_params *csp) +{ + struct swcr_auth *swa; + struct auth_hash *axf; + + if (csp->csp_ivlen != CHACHA20_POLY1305_IV_LEN) + return (EINVAL); + + /* First, setup the auth side. */ + swa = &ses->swcr_auth; + axf = &auth_hash_chacha20_poly1305; + swa->sw_axf = axf; + if (csp->csp_auth_mlen < 0 || csp->csp_auth_mlen > axf->hashsize) + return (EINVAL); + if (csp->csp_auth_mlen == 0) + swa->sw_mlen = axf->hashsize; + else + swa->sw_mlen = csp->csp_auth_mlen; + + /* The auth state is regenerated for each nonce. */ + + /* Second, setup the cipher side. */ + return (swcr_setup_cipher(ses, csp)); +} + static bool swcr_auth_supported(const struct crypto_session_params *csp) { @@ -1258,6 +1447,7 @@ swcr_probesession(device_t dev, const struct crypto_session_params *csp) switch (csp->csp_cipher_alg) { case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: return (EINVAL); default: if (!swcr_cipher_supported(csp)) @@ -1273,6 +1463,7 @@ swcr_probesession(device_t dev, const struct crypto_session_params *csp) switch (csp->csp_cipher_alg) { case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: break; default: return (EINVAL); @@ -1283,6 +1474,7 @@ swcr_probesession(device_t dev, const struct crypto_session_params *csp) switch (csp->csp_cipher_alg) { case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: return (EINVAL); } switch (csp->csp_auth_alg) { @@ -1343,6 +1535,7 @@ swcr_newsession(device_t dev, crypto_session_t cses, #ifdef INVARIANTS case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: panic("bad cipher algo"); #endif default: @@ -1366,6 +1559,11 @@ swcr_newsession(device_t dev, crypto_session_t cses, if (error == 0) ses->swcr_process = swcr_ccm; break; + case CRYPTO_CHACHA20_POLY1305: + error = swcr_setup_chacha20_poly1305(ses, csp); + if (error == 0) + ses->swcr_process = swcr_chacha20_poly1305; + break; #ifdef INVARIANTS default: panic("bad aead algo"); @@ -1377,6 +1575,7 @@ swcr_newsession(device_t dev, crypto_session_t cses, switch (csp->csp_cipher_alg) { case CRYPTO_AES_NIST_GCM_16: case CRYPTO_AES_CCM_16: + case CRYPTO_CHACHA20_POLY1305: panic("bad eta cipher algo"); } switch (csp->csp_auth_alg) { diff --git a/sys/opencrypto/xform_auth.h b/sys/opencrypto/xform_auth.h index dbdb278209b5..6427965671d3 100644 --- a/sys/opencrypto/xform_auth.h +++ b/sys/opencrypto/xform_auth.h @@ -84,6 +84,7 @@ extern struct auth_hash auth_hash_poly1305; extern struct auth_hash auth_hash_ccm_cbc_mac_128; extern struct auth_hash auth_hash_ccm_cbc_mac_192; extern struct auth_hash auth_hash_ccm_cbc_mac_256; +extern struct auth_hash auth_hash_chacha20_poly1305; union authctx { SHA1_CTX sha1ctx; diff --git a/sys/opencrypto/xform_chacha20_poly1305.c b/sys/opencrypto/xform_chacha20_poly1305.c index e568e76cad51..3a72c06f931b 100644 --- a/sys/opencrypto/xform_chacha20_poly1305.c +++ b/sys/opencrypto/xform_chacha20_poly1305.c @@ -25,17 +25,139 @@ * SUCH DAMAGE. */ -#include +#include #include +#include +#include + +struct chacha20_poly1305_cipher_ctx { + const void *key; + uint32_t ic; + char nonce[CHACHA20_POLY1305_IV_LEN]; +}; + +static int +chacha20_poly1305_setkey(void *vctx, const uint8_t *key, int len) +{ + struct chacha20_poly1305_cipher_ctx *ctx = vctx; + + if (len != CHACHA20_POLY1305_KEY) + return (EINVAL); + + ctx->key = key; + return (0); +} + +static void +chacha20_poly1305_reinit(void *vctx, const uint8_t *iv) +{ + struct chacha20_poly1305_cipher_ctx *ctx = vctx; + + /* Block 0 is used for the poly1305 key. */ + memcpy(ctx->nonce, iv, sizeof(ctx->nonce)); + ctx->ic = 1; +} + +static void +chacha20_poly1305_crypt(void *vctx, const uint8_t *in, uint8_t *out) +{ + struct chacha20_poly1305_cipher_ctx *ctx = vctx; + int error; + + error = crypto_stream_chacha20_ietf_xor_ic(out, in, + CHACHA20_NATIVE_BLOCK_LEN, ctx->nonce, ctx->ic, ctx->key); + KASSERT(error == 0, ("%s failed: %d", __func__, error)); + ctx->ic++; +} + +static void +chacha20_poly1305_crypt_last(void *vctx, const uint8_t *in, uint8_t *out, + size_t len) +{ + struct chacha20_poly1305_cipher_ctx *ctx = vctx; + + int error; + + error = crypto_stream_chacha20_ietf_xor_ic(out, in, len, ctx->nonce, + ctx->ic, ctx->key); + KASSERT(error == 0, ("%s failed: %d", __func__, error)); +} + struct enc_xform enc_xform_chacha20_poly1305 = { .type = CRYPTO_CHACHA20_POLY1305, .name = "ChaCha20-Poly1305", - .ctxsize = sizeof(struct chacha_ctx), + .ctxsize = sizeof(struct chacha20_poly1305_cipher_ctx), .blocksize = 1, - .native_blocksize = CHACHA_BLOCKLEN, + .native_blocksize = CHACHA20_NATIVE_BLOCK_LEN, .ivsize = CHACHA20_POLY1305_IV_LEN, .minkey = CHACHA20_POLY1305_KEY, .maxkey = CHACHA20_POLY1305_KEY, + .encrypt = chacha20_poly1305_crypt, + .decrypt = chacha20_poly1305_crypt, + .setkey = chacha20_poly1305_setkey, + .reinit = chacha20_poly1305_reinit, + .encrypt_last = chacha20_poly1305_crypt_last, + .decrypt_last = chacha20_poly1305_crypt_last, }; +struct chacha20_poly1305_auth_ctx { + struct crypto_onetimeauth_poly1305_state state; + const void *key; +}; +CTASSERT(sizeof(union authctx) >= sizeof(struct chacha20_poly1305_auth_ctx)); + +static void +chacha20_poly1305_Init(void *vctx) +{ +} + +static void +chacha20_poly1305_Setkey(void *vctx, const uint8_t *key, u_int klen) +{ + struct chacha20_poly1305_auth_ctx *ctx = vctx; + + ctx->key = key; +} + +static void +chacha20_poly1305_Reinit(void *vctx, const uint8_t *nonce, u_int noncelen) +{ + struct chacha20_poly1305_auth_ctx *ctx = vctx; + char block[CHACHA20_NATIVE_BLOCK_LEN]; + + crypto_stream_chacha20_ietf(block, sizeof(block), nonce, ctx->key); + crypto_onetimeauth_poly1305_init(&ctx->state, block); + explicit_bzero(block, sizeof(block)); +} + +static int +chacha20_poly1305_Update(void *vctx, const void *data, u_int len) +{ + struct chacha20_poly1305_auth_ctx *ctx = vctx; + + crypto_onetimeauth_poly1305_update(&ctx->state, data, len); + return (0); +} + +static void +chacha20_poly1305_Final(uint8_t *digest, void *vctx) +{ + struct chacha20_poly1305_auth_ctx *ctx = vctx; + + crypto_onetimeauth_poly1305_final(&ctx->state, digest); +} + +struct auth_hash auth_hash_chacha20_poly1305 = { + .type = CRYPTO_POLY1305, + .name = "ChaCha20-Poly1305", + .keysize = POLY1305_KEY_LEN, + .hashsize = POLY1305_HASH_LEN, + .ctxsize = sizeof(struct chacha20_poly1305_auth_ctx), + .blocksize = crypto_onetimeauth_poly1305_BYTES, + .Init = chacha20_poly1305_Init, + .Setkey = chacha20_poly1305_Setkey, + .Reinit = chacha20_poly1305_Reinit, + .Update = chacha20_poly1305_Update, + .Final = chacha20_poly1305_Final, +}; From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C23B3541554; Thu, 18 Feb 2021 17:54: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 4DhMmD554Hz4slV; Thu, 18 Feb 2021 17:54: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 9F2EE1C87C; Thu, 18 Feb 2021 17:54: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 11IHsauS033890; Thu, 18 Feb 2021 17:54:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsaq2033889; Thu, 18 Feb 2021 17:54:36 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:36 GMT Message-Id: <202102181754.11IHsaq2033889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1bd9fc96d4e4 - main - cryptocheck: Add Chacha20-Poly1305 AEAD coverage. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bd9fc96d4e4a26bb0060698c07b6f13d19cd819 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:36 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1bd9fc96d4e4a26bb0060698c07b6f13d19cd819 commit 1bd9fc96d4e4a26bb0060698c07b6f13d19cd819 Author: John Baldwin AuthorDate: 2021-02-18 17:23:36 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:26:32 +0000 cryptocheck: Add Chacha20-Poly1305 AEAD coverage. - Make openssl_gcm_encrypt generic to AEAD ciphers (aside from CCM) and use it for Chacha20-Poly1305. - Use generic AEAD control constants instead of GCM/CCM specific names. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27838 --- tools/tools/crypto/cryptocheck.c | 46 +++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/tools/tools/crypto/cryptocheck.c b/tools/tools/crypto/cryptocheck.c index efb68f8966ef..fc08396b45f5 100644 --- a/tools/tools/crypto/cryptocheck.c +++ b/tools/tools/crypto/cryptocheck.c @@ -120,6 +120,7 @@ * aes-ccm 128-bit AES-CCM * aes-ccm192 192-bit AES-CCM * aes-ccm256 256-bit AES-CCM + * chacha20-poly1305 Chacha20 (96 bit nonce) with Poly1305 per RFC 8439 */ #include @@ -149,6 +150,7 @@ static const struct alg { int cipher; int mac; enum { T_HASH, T_HMAC, T_GMAC, T_CIPHER, T_ETA, T_AEAD } type; + int tag_len; const EVP_CIPHER *(*evp_cipher)(void); const EVP_MD *(*evp_md)(void); } algs[] = { @@ -177,11 +179,11 @@ static const struct alg { { .name = "blake2s", .mac = CRYPTO_BLAKE2S, .type = T_HASH, .evp_md = EVP_blake2s256 }, { .name = "gmac", .mac = CRYPTO_AES_NIST_GMAC, .type = T_GMAC, - .evp_cipher = EVP_aes_128_gcm }, + .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_128_gcm }, { .name = "gmac192", .mac = CRYPTO_AES_NIST_GMAC, .type = T_GMAC, - .evp_cipher = EVP_aes_192_gcm }, + .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_192_gcm }, { .name = "gmac256", .mac = CRYPTO_AES_NIST_GMAC, .type = T_GMAC, - .evp_cipher = EVP_aes_256_gcm }, + .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_256_gcm }, { .name = "aes-cbc", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, .evp_cipher = EVP_aes_128_cbc }, { .name = "aes-cbc192", .cipher = CRYPTO_AES_CBC, .type = T_CIPHER, @@ -201,17 +203,22 @@ static const struct alg { { .name = "chacha20", .cipher = CRYPTO_CHACHA20, .type = T_CIPHER, .evp_cipher = EVP_chacha20 }, { .name = "aes-gcm", .cipher = CRYPTO_AES_NIST_GCM_16, .type = T_AEAD, - .evp_cipher = EVP_aes_128_gcm }, + .tag_len = AES_GMAC_HASH_LEN, .evp_cipher = EVP_aes_128_gcm }, { .name = "aes-gcm192", .cipher = CRYPTO_AES_NIST_GCM_16, - .type = T_AEAD, .evp_cipher = EVP_aes_192_gcm }, + .type = T_AEAD, .tag_len = AES_GMAC_HASH_LEN, + .evp_cipher = EVP_aes_192_gcm }, { .name = "aes-gcm256", .cipher = CRYPTO_AES_NIST_GCM_16, - .type = T_AEAD, .evp_cipher = EVP_aes_256_gcm }, + .type = T_AEAD, .tag_len = AES_GMAC_HASH_LEN, + .evp_cipher = EVP_aes_256_gcm }, { .name = "aes-ccm", .cipher = CRYPTO_AES_CCM_16, .type = T_AEAD, - .evp_cipher = EVP_aes_128_ccm }, + .evp_cipher = EVP_aes_128_ccm, .tag_len = AES_CBC_MAC_HASH_LEN }, { .name = "aes-ccm192", .cipher = CRYPTO_AES_CCM_16, .type = T_AEAD, - .evp_cipher = EVP_aes_192_ccm }, + .evp_cipher = EVP_aes_192_ccm, .tag_len = AES_CBC_MAC_HASH_LEN }, { .name = "aes-ccm256", .cipher = CRYPTO_AES_CCM_16, .type = T_AEAD, - .evp_cipher = EVP_aes_256_ccm }, + .evp_cipher = EVP_aes_256_ccm, .tag_len = AES_CBC_MAC_HASH_LEN }, + { .name = "chacha20-poly1305", .cipher = CRYPTO_CHACHA20_POLY1305, + .type = T_AEAD, .tag_len = POLY1305_HASH_LEN, + .evp_cipher = EVP_chacha20_poly1305 }, }; static bool verbose; @@ -1046,7 +1053,7 @@ openssl_gmac(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, if (EVP_EncryptFinal_ex(ctx, NULL, &outl) != 1) errx(1, "OpenSSL %s (%zu) final failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, AES_GMAC_HASH_LEN, + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, tag) != 1) errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); @@ -1133,7 +1140,7 @@ out: } static void -openssl_gcm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, +openssl_aead_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) { @@ -1168,7 +1175,7 @@ openssl_gcm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, if ((size_t)total != size) errx(1, "OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, size, total); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, AES_GMAC_HASH_LEN, + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, alg->tag_len, tag) != 1) errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); @@ -1177,7 +1184,7 @@ openssl_gcm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, #ifdef notused static bool -openssl_gcm_decrypt(const struct alg *alg, const EVP_CIPHER *cipher, +openssl_aead_decrypt(const struct alg *alg, const EVP_CIPHER *cipher, const char *key, const char *iv, const char *aad, size_t aad_len, const char *input, char *output, size_t size, char *tag) { @@ -1206,7 +1213,7 @@ openssl_gcm_decrypt(const struct alg *alg, const EVP_CIPHER *cipher, errx(1, "OpenSSL %s (%zu) decrypt update failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); total = outl; - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, AES_GMAC_HASH_LEN, + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, alg->tag_len, tag) != 1) errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); @@ -1235,10 +1242,10 @@ openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, if (EVP_EncryptInit_ex(ctx, cipher, NULL, NULL, NULL) != 1) errx(1, "OpenSSL %s (%zu) ctx init failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_IVLEN, iv_len, NULL) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN, iv_len, NULL) != 1) errx(1, "OpenSSL %s (%zu) setting iv length failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1) + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, AES_CBC_MAC_HASH_LEN, NULL) != 1) errx(1, "OpenSSL %s (%zu) setting tag length failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); if (EVP_EncryptInit_ex(ctx, NULL, NULL, (const u_char *)key, @@ -1268,7 +1275,7 @@ openssl_ccm_encrypt(const struct alg *alg, const EVP_CIPHER *cipher, if ((size_t)total != size) errx(1, "OpenSSL %s (%zu) encrypt size mismatch: %d", alg->name, size, total); - if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_CCM_GET_TAG, AES_CBC_MAC_HASH_LEN, + if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, AES_CBC_MAC_HASH_LEN, tag) != 1) errx(1, "OpenSSL %s (%zu) get tag failed: %s", alg->name, size, ERR_error_string(ERR_get_error(), NULL)); @@ -1311,7 +1318,8 @@ ocf_aead(const struct ocf_session *ses, const char *iv, size_t iv_len, return (0); } -#define AEAD_MAX_TAG_LEN MAX(AES_GMAC_HASH_LEN, AES_CBC_MAC_HASH_LEN) +#define AEAD_MAX_TAG_LEN \ + MAX(MAX(AES_GMAC_HASH_LEN, AES_CBC_MAC_HASH_LEN), POLY1305_HASH_LEN) static void run_aead_test(const struct alg *alg, size_t aad_len, size_t size) @@ -1368,7 +1376,7 @@ run_aead_test(const struct alg *alg, size_t aad_len, size_t size) openssl_ccm_encrypt(alg, cipher, key, iv, iv_len, aad, aad_len, cleartext, ciphertext, size, control_tag); else - openssl_gcm_encrypt(alg, cipher, key, iv, aad, aad_len, + openssl_aead_encrypt(alg, cipher, key, iv, aad, aad_len, cleartext, ciphertext, size, control_tag); if (!ocf_init_aead_session(alg, key, key_len, &ses)) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7900154178F; Thu, 18 Feb 2021 17:54: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 4DhMmH3J9Nz4slg; Thu, 18 Feb 2021 17:54: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 18E2F1C67C; Thu, 18 Feb 2021 17:54: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 11IHsclX033926; Thu, 18 Feb 2021 17:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsc2n033925; Thu, 18 Feb 2021 17:54:38 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:38 GMT Message-Id: <202102181754.11IHsc2n033925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4dd6800e22b0 - main - Add Chacha20-Poly1305 support in the OCF backend for KTLS. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dd6800e22b08fa1f756115600e9436818abb168 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:40 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4dd6800e22b08fa1f756115600e9436818abb168 commit 4dd6800e22b08fa1f756115600e9436818abb168 Author: John Baldwin AuthorDate: 2021-02-18 17:24:26 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:30:13 +0000 Add Chacha20-Poly1305 support in the OCF backend for KTLS. This supports Chacha20-Poly1305 for both send and receive for TLS 1.2 and for send in TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27841 --- sys/opencrypto/ktls_ocf.c | 116 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 95 insertions(+), 21 deletions(-) diff --git a/sys/opencrypto/ktls_ocf.c b/sys/opencrypto/ktls_ocf.c index 28c55257b047..fd4a230fedea 100644 --- a/sys/opencrypto/ktls_ocf.c +++ b/sys/opencrypto/ktls_ocf.c @@ -87,11 +87,21 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_gcm_crypts, CTLFLAG_RD, &ocf_tls12_gcm_crypts, "Total number of OCF TLS 1.2 GCM encryption operations"); +static COUNTER_U64_DEFINE_EARLY(ocf_tls12_chacha20_crypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls12_chacha20_crypts, + CTLFLAG_RD, &ocf_tls12_chacha20_crypts, + "Total number of OCF TLS 1.2 Chacha20-Poly1305 encryption operations"); + static COUNTER_U64_DEFINE_EARLY(ocf_tls13_gcm_crypts); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_gcm_crypts, CTLFLAG_RD, &ocf_tls13_gcm_crypts, "Total number of OCF TLS 1.3 GCM encryption operations"); +static COUNTER_U64_DEFINE_EARLY(ocf_tls13_chacha20_crypts); +SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, tls13_chacha20_crypts, + CTLFLAG_RD, &ocf_tls13_chacha20_crypts, + "Total number of OCF TLS 1.3 Chacha20-Poly1305 encryption operations"); + static COUNTER_U64_DEFINE_EARLY(ocf_inplace); SYSCTL_COUNTER_U64(_kern_ipc_tls_stats_ocf, OID_AUTO, inplace, CTLFLAG_RD, &ocf_inplace, @@ -326,7 +336,7 @@ ktls_ocf_tls_cbc_encrypt(struct ktls_session *tls, } static int -ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, +ktls_ocf_tls12_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, struct iovec *outiov, int iovcnt, uint64_t seqno, uint8_t record_type __unused) @@ -357,12 +367,26 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, crypto_initreq(&crp, os->sid); /* Setup the IV. */ - memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); - memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); + memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, + sizeof(uint64_t)); + } else { + /* + * Chacha20-Poly1305 constructs the IV for TLS 1.2 + * identically to constructing the IV for AEAD in TLS + * 1.3. + */ + memcpy(crp.crp_iv, tls->params.iv, tls->params.iv_len); + *(uint64_t *)(crp.crp_iv + 4) ^= htobe64(seqno); + } /* Setup the AAD. */ - tls_comp_len = ntohs(hdr->tls_length) - - (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_comp_len = ntohs(hdr->tls_length) - + (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + else + tls_comp_len = ntohs(hdr->tls_length) - POLY1305_HASH_LEN; ad.seq = htobe64(seqno); ad.type = hdr->tls_type; ad.tls_vmajor = hdr->tls_vmajor; @@ -402,7 +426,10 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, if (!inplace) crypto_use_output_uio(&crp, &out_uio); - counter_u64_add(ocf_tls12_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls12_gcm_crypts, 1); + else + counter_u64_add(ocf_tls12_chacha20_crypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -414,7 +441,7 @@ ktls_ocf_tls12_gcm_encrypt(struct ktls_session *tls, } static int -ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, +ktls_ocf_tls12_aead_decrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, struct mbuf *m, uint64_t seqno, int *trailer_len) { @@ -433,12 +460,26 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, crypto_initreq(&crp, os->sid); /* Setup the IV. */ - memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); - memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + memcpy(crp.crp_iv, tls->params.iv, TLS_AEAD_GCM_LEN); + memcpy(crp.crp_iv + TLS_AEAD_GCM_LEN, hdr + 1, + sizeof(uint64_t)); + } else { + /* + * Chacha20-Poly1305 constructs the IV for TLS 1.2 + * identically to constructing the IV for AEAD in TLS + * 1.3. + */ + memcpy(crp.crp_iv, tls->params.iv, tls->params.iv_len); + *(uint64_t *)(crp.crp_iv + 4) ^= htobe64(seqno); + } /* Setup the AAD. */ - tls_comp_len = ntohs(hdr->tls_length) - - (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + tls_comp_len = ntohs(hdr->tls_length) - + (AES_GMAC_HASH_LEN + sizeof(uint64_t)); + else + tls_comp_len = ntohs(hdr->tls_length) - POLY1305_HASH_LEN; ad.seq = htobe64(seqno); ad.type = hdr->tls_type; ad.tls_vmajor = hdr->tls_vmajor; @@ -455,7 +496,10 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, crp.crp_flags = CRYPTO_F_CBIMM | CRYPTO_F_IV_SEPARATE; crypto_use_mbuf(&crp, m); - counter_u64_add(ocf_tls12_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls12_gcm_crypts, 1); + else + counter_u64_add(ocf_tls12_chacha20_crypts, 1); error = ktls_ocf_dispatch(os, &crp); crypto_destroyreq(&crp); @@ -464,7 +508,7 @@ ktls_ocf_tls12_gcm_decrypt(struct ktls_session *tls, } static int -ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, +ktls_ocf_tls13_aead_encrypt(struct ktls_session *tls, const struct tls_record_layer *hdr, uint8_t *trailer, struct iovec *iniov, struct iovec *outiov, int iovcnt, uint64_t seqno, uint8_t record_type) { @@ -514,11 +558,11 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, */ memcpy(iov, iniov, iovcnt * sizeof(*iov)); iov[iovcnt].iov_base = trailer; - iov[iovcnt].iov_len = AES_GMAC_HASH_LEN + 1; + iov[iovcnt].iov_len = tls->params.tls_tlen; uio.uio_iov = iov; uio.uio_iovcnt = iovcnt + 1; uio.uio_offset = 0; - uio.uio_resid = crp.crp_payload_length + AES_GMAC_HASH_LEN; + uio.uio_resid = crp.crp_payload_length + tls->params.tls_tlen - 1; uio.uio_segflg = UIO_SYSSPACE; uio.uio_td = curthread; crypto_use_uio(&crp, &uio); @@ -532,7 +576,7 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, out_uio.uio_iovcnt = iovcnt + 1; out_uio.uio_offset = 0; out_uio.uio_resid = crp.crp_payload_length + - AES_GMAC_HASH_LEN; + tls->params.tls_tlen - 1; out_uio.uio_segflg = UIO_SYSSPACE; out_uio.uio_td = curthread; crypto_use_output_uio(&crp, &out_uio); @@ -543,7 +587,10 @@ ktls_ocf_tls13_gcm_encrypt(struct ktls_session *tls, memcpy(crp.crp_iv, nonce, sizeof(nonce)); - counter_u64_add(ocf_tls13_gcm_crypts, 1); + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) + counter_u64_add(ocf_tls13_gcm_crypts, 1); + else + counter_u64_add(ocf_tls13_chacha20_crypts, 1); if (inplace) counter_u64_add(ocf_inplace, 1); else @@ -651,6 +698,32 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) mac_csp.csp_auth_key = tls->params.auth_key; mac_csp.csp_auth_klen = tls->params.auth_key_len; break; + case CRYPTO_CHACHA20_POLY1305: + switch (tls->params.cipher_key_len) { + case 256 / 8: + break; + default: + return (EINVAL); + } + + /* Only TLS 1.2 and 1.3 are supported. */ + if (tls->params.tls_vmajor != TLS_MAJOR_VER_ONE || + tls->params.tls_vminor < TLS_MINOR_VER_TWO || + tls->params.tls_vminor > TLS_MINOR_VER_THREE) + return (EPROTONOSUPPORT); + + /* TLS 1.3 is not yet supported for receive. */ + if (direction == KTLS_RX && + tls->params.tls_vminor == TLS_MINOR_VER_THREE) + return (EPROTONOSUPPORT); + + csp.csp_flags |= CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD; + csp.csp_mode = CSP_MODE_AEAD; + csp.csp_cipher_alg = CRYPTO_CHACHA20_POLY1305; + csp.csp_cipher_key = tls->params.cipher_key; + csp.csp_cipher_klen = tls->params.cipher_key_len; + csp.csp_ivlen = CHACHA20_POLY1305_IV_LEN; + break; default: return (EPROTONOSUPPORT); } @@ -679,14 +752,15 @@ ktls_ocf_try(struct socket *so, struct ktls_session *tls, int direction) mtx_init(&os->lock, "ktls_ocf", NULL, MTX_DEF); tls->cipher = os; - if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16) { + if (tls->params.cipher_algorithm == CRYPTO_AES_NIST_GCM_16 || + tls->params.cipher_algorithm == CRYPTO_CHACHA20_POLY1305) { if (direction == KTLS_TX) { if (tls->params.tls_vminor == TLS_MINOR_VER_THREE) - tls->sw_encrypt = ktls_ocf_tls13_gcm_encrypt; + tls->sw_encrypt = ktls_ocf_tls13_aead_encrypt; else - tls->sw_encrypt = ktls_ocf_tls12_gcm_encrypt; + tls->sw_encrypt = ktls_ocf_tls12_aead_encrypt; } else { - tls->sw_decrypt = ktls_ocf_tls12_gcm_decrypt; + tls->sw_decrypt = ktls_ocf_tls12_aead_decrypt; } } else { tls->sw_encrypt = ktls_ocf_tls_cbc_encrypt; From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:43 2021 Return-Path: Delivered-To: dev-commits-src-all@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 82A045414CC; Thu, 18 Feb 2021 17:54: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 4DhMmK6xJ7z4sTS; Thu, 18 Feb 2021 17:54: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 441DC1C9B9; Thu, 18 Feb 2021 17:54: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 11IHsdCu033944; Thu, 18 Feb 2021 17:54:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsdSq033943; Thu, 18 Feb 2021 17:54:39 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:39 GMT Message-Id: <202102181754.11IHsdSq033943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a10020cfe283 - main - cryptosoft: Support per-op keys for AES-GCM and AES-CCM. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a10020cfe2830e9626ac58ae97ecd12afb3553be Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:43 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a10020cfe2830e9626ac58ae97ecd12afb3553be commit a10020cfe2830e9626ac58ae97ecd12afb3553be Author: John Baldwin AuthorDate: 2021-02-18 17:24:35 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:53:25 +0000 cryptosoft: Support per-op keys for AES-GCM and AES-CCM. Reviewed by: cem Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D28752 --- sys/opencrypto/cryptosoft.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c index b92e25e86f76..947f27a388d1 100644 --- a/sys/opencrypto/cryptosoft.c +++ b/sys/opencrypto/cryptosoft.c @@ -537,6 +537,9 @@ swcr_gcm(struct swcr_session *ses, struct cryptop *crp) } } + if (crp->crp_cipher_key != NULL) + exf->setkey(swe->sw_kschedule, crp->crp_cipher_key, + crypto_get_params(crp->crp_session)->csp_cipher_klen); exf->reinit(swe->sw_kschedule, iv); /* Do encryption with MAC */ @@ -755,6 +758,9 @@ swcr_ccm(struct swcr_session *ses, struct cryptop *crp) if (error) return (error); + if (crp->crp_cipher_key != NULL) + exf->setkey(swe->sw_kschedule, crp->crp_cipher_key, + crypto_get_params(crp->crp_session)->csp_cipher_klen); exf->reinit(swe->sw_kschedule, iv); /* Do encryption/decryption with MAC */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:54:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7BA0F54175A; Thu, 18 Feb 2021 17:54: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 4DhMmG1Xvnz4sld; Thu, 18 Feb 2021 17:54: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 E0F3D1CC92; Thu, 18 Feb 2021 17:54: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 11IHsbvH033908; Thu, 18 Feb 2021 17:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHsb4G033907; Thu, 18 Feb 2021 17:54:37 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:54:37 GMT Message-Id: <202102181754.11IHsb4G033907@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9c64fc40290e - main - Add Chacha20-Poly1305 as a KTLS cipher suite. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c64fc40290e08f6dc6b75aa04084b04e48a61af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:54:40 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c64fc40290e08f6dc6b75aa04084b04e48a61af commit 9c64fc40290e08f6dc6b75aa04084b04e48a61af Author: John Baldwin AuthorDate: 2021-02-18 17:23:59 +0000 Commit: John Baldwin CommitDate: 2021-02-18 17:26:32 +0000 Add Chacha20-Poly1305 as a KTLS cipher suite. Chacha20-Poly1305 for TLS is an AEAD cipher suite for both TLS 1.2 and TLS 1.3 (RFCs 7905 and 8446). For both versions, Chacha20 uses the server and client IVs as implicit nonces xored with the record sequence number to generate the per-record nonce matching the construction used with AES-GCM for TLS 1.3. Reviewed by: gallatin Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D27839 --- sys/kern/uipc_ktls.c | 76 ++++++++++++++++++++++++++++++++++++++++++---------- sys/sys/ktls.h | 1 + 2 files changed, 63 insertions(+), 14 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 26912e410239..f92314d9c607 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -199,6 +199,11 @@ static COUNTER_U64_DEFINE_EARLY(ktls_sw_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, gcm, CTLFLAG_RD, &ktls_sw_gcm, "Active number of software TLS sessions using AES-GCM"); +static COUNTER_U64_DEFINE_EARLY(ktls_sw_chacha20); +SYSCTL_COUNTER_U64(_kern_ipc_tls_sw, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_sw_chacha20, + "Active number of software TLS sessions using Chacha20-Poly1305"); + static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_cbc); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, cbc, CTLFLAG_RD, &ktls_ifnet_cbc, @@ -209,6 +214,11 @@ SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, gcm, CTLFLAG_RD, &ktls_ifnet_gcm, "Active number of ifnet TLS sessions using AES-GCM"); +static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_chacha20); +SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_ifnet_chacha20, + "Active number of ifnet TLS sessions using Chacha20-Poly1305"); + static COUNTER_U64_DEFINE_EARLY(ktls_ifnet_reset); SYSCTL_COUNTER_U64(_kern_ipc_tls_ifnet, OID_AUTO, reset, CTLFLAG_RD, &ktls_ifnet_reset, "TLS sessions updated to a new ifnet send tag"); @@ -238,6 +248,11 @@ static COUNTER_U64_DEFINE_EARLY(ktls_toe_gcm); SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, gcm, CTLFLAG_RD, &ktls_toe_gcm, "Active number of TOE TLS sessions using AES-GCM"); + +static counter_u64_t ktls_toe_chacha20; +SYSCTL_COUNTER_U64(_kern_ipc_tls_toe, OID_AUTO, chacha20, CTLFLAG_RD, + &ktls_toe_chacha20, + "Active number of TOE TLS sessions using Chacha20-Poly1305"); #endif static MALLOC_DEFINE(M_KTLS, "ktls", "Kernel TLS"); @@ -507,6 +522,15 @@ ktls_create_session(struct socket *so, struct tls_enable *en, if (en->auth_key_len == 0) return (EINVAL); break; + case CRYPTO_CHACHA20_POLY1305: + if (en->auth_algorithm != 0 || en->auth_key_len != 0) + return (EINVAL); + if (en->tls_vminor != TLS_MINOR_VER_TWO && + en->tls_vminor != TLS_MINOR_VER_THREE) + return (EINVAL); + if (en->iv_len != TLS_CHACHA20_IV_LEN) + return (EINVAL); + break; default: return (EINVAL); } @@ -538,15 +562,6 @@ ktls_create_session(struct socket *so, struct tls_enable *en, if (en->tls_vminor < TLS_MINOR_VER_THREE) tls->params.tls_hlen += sizeof(uint64_t); tls->params.tls_tlen = AES_GMAC_HASH_LEN; - - /* - * TLS 1.3 includes optional padding which we - * do not support, and also puts the "real" record - * type at the end of the encrypted data. - */ - if (en->tls_vminor == TLS_MINOR_VER_THREE) - tls->params.tls_tlen += sizeof(uint8_t); - tls->params.tls_bs = 1; break; case CRYPTO_AES_CBC: @@ -575,10 +590,25 @@ ktls_create_session(struct socket *so, struct tls_enable *en, } tls->params.tls_bs = AES_BLOCK_LEN; break; + case CRYPTO_CHACHA20_POLY1305: + /* + * Chacha20 uses a 12 byte implicit IV. + */ + tls->params.tls_tlen = POLY1305_HASH_LEN; + tls->params.tls_bs = 1; + break; default: panic("invalid cipher"); } + /* + * TLS 1.3 includes optional padding which we do not support, + * and also puts the "real" record type at the end of the + * encrypted data. + */ + if (en->tls_vminor == TLS_MINOR_VER_THREE) + tls->params.tls_tlen += sizeof(uint8_t); + KASSERT(tls->params.tls_hlen <= MBUF_PEXT_HDR_LEN, ("TLS header length too long: %d", tls->params.tls_hlen)); KASSERT(tls->params.tls_tlen <= MBUF_PEXT_TRAIL_LEN, @@ -602,9 +632,9 @@ ktls_create_session(struct socket *so, struct tls_enable *en, goto out; /* - * This holds the implicit portion of the nonce for GCM and - * the initial implicit IV for TLS 1.0. The explicit portions - * of the IV are generated in ktls_frame(). + * This holds the implicit portion of the nonce for AEAD + * ciphers and the initial implicit IV for TLS 1.0. The + * explicit portions of the IV are generated in ktls_frame(). */ if (en->iv_len != 0) { tls->params.iv_len = en->iv_len; @@ -613,8 +643,8 @@ ktls_create_session(struct socket *so, struct tls_enable *en, goto out; /* - * For TLS 1.2, generate an 8-byte nonce as a counter - * to generate unique explicit IVs. + * For TLS 1.2 with GCM, generate an 8-byte nonce as a + * counter to generate unique explicit IVs. * * Store this counter in the last 8 bytes of the IV * array so that it is 8-byte aligned. @@ -679,6 +709,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_sw_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_sw_chacha20, -1); + break; } tls->free(tls); break; @@ -690,6 +723,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_ifnet_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_ifnet_chacha20, -1); + break; } if (tls->snd_tag != NULL) m_snd_tag_rele(tls->snd_tag); @@ -703,6 +739,9 @@ ktls_cleanup(struct ktls_session *tls) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_toe_gcm, -1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_toe_chacha20, -1); + break; } break; #endif @@ -761,6 +800,9 @@ ktls_try_toe(struct socket *so, struct ktls_session *tls, int direction) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_toe_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_toe_chacha20, 1); + break; } } return (error); @@ -883,6 +925,9 @@ ktls_try_ifnet(struct socket *so, struct ktls_session *tls, bool force) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_ifnet_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_ifnet_chacha20, 1); + break; } } return (error); @@ -926,6 +971,9 @@ ktls_try_sw(struct socket *so, struct ktls_session *tls, int direction) case CRYPTO_AES_NIST_GCM_16: counter_u64_add(ktls_sw_gcm, 1); break; + case CRYPTO_CHACHA20_POLY1305: + counter_u64_add(ktls_sw_chacha20, 1); + break; } return (0); } diff --git a/sys/sys/ktls.h b/sys/sys/ktls.h index 8d591888466c..d3da1286403c 100644 --- a/sys/sys/ktls.h +++ b/sys/sys/ktls.h @@ -44,6 +44,7 @@ struct tls_record_layer { #define TLS_MAX_PARAM_SIZE 1024 /* Max key/mac/iv in sockopt */ #define TLS_AEAD_GCM_LEN 4 #define TLS_1_3_GCM_IV_LEN 12 +#define TLS_CHACHA20_IV_LEN 12 #define TLS_CBC_IMPLICIT_IV_LEN 16 /* Type values for the record layer */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 17:59:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0BBC354236A; Thu, 18 Feb 2021 17:59:54 +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 4DhMtK6vgFz4th5; Thu, 18 Feb 2021 17:59: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 D5C4B1CB3A; Thu, 18 Feb 2021 17:59: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 11IHxrGe034890; Thu, 18 Feb 2021 17:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IHxrvr034889; Thu, 18 Feb 2021 17:59:53 GMT (envelope-from git) Date: Thu, 18 Feb 2021 17:59:53 GMT Message-Id: <202102181759.11IHxrvr034889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: acab1d58befa - main - mq_unlink(3): Add manual page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acab1d58befaa8f42930bd62c26558e6005e1c13 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 17:59:54 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=acab1d58befaa8f42930bd62c26558e6005e1c13 commit acab1d58befaa8f42930bd62c26558e6005e1c13 Author: Fernando Apesteguía AuthorDate: 2021-02-18 17:53:06 +0000 Commit: Fernando Apesteguía CommitDate: 2021-02-18 17:56:52 +0000 mq_unlink(3): Add manual page Summary: Add a succinct manual page for mq_unlink Mostly borrowed from https://pubs.opengroup.org/onlinepubs/9699959099/ and hence, the disclaimer note at the bottom. PR: 243174 Reported by: rfg-freebsd@tristatelogic.com Reviewed by: gbe@, yuripv@ Approved by: gbe@ (mentor), yuripv@ Differential Revision: https://reviews.freebsd.org/D28593 --- lib/libc/sys/Makefile.inc | 1 + lib/libc/sys/mq_unlink.2 | 121 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 82d16fb81b6b..9a417f4a7c74 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -251,6 +251,7 @@ MAN+= abort2.2 \ mq_receive.2 \ mq_send.2 \ mq_setattr.2 \ + mq_unlink.2 \ msgctl.2 \ msgget.2 \ msgrcv.2 \ diff --git a/lib/libc/sys/mq_unlink.2 b/lib/libc/sys/mq_unlink.2 new file mode 100644 index 000000000000..15b7018ae368 --- /dev/null +++ b/lib/libc/sys/mq_unlink.2 @@ -0,0 +1,121 @@ +.\" Copyright (c) 2021 Fernando Apesteguia +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice(s), this list of conditions and the following disclaimer as +.\" the first lines of this file unmodified other than the possible +.\" addition of one or more copyright notices. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice(s), this list of conditions and the following disclaimer in +.\" the documentation and/or other materials provided with the +.\" distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY +.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" Portions of this text are reprinted and reproduced in electronic form +.\" from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- +.\" Portable Operating System Interface (POSIX), The Open Group Base +.\" Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of +.\" Electrical and Electronics Engineers, Inc and The Open Group. In the +.\" event of any discrepancy between this version and the original IEEE and +.\" The Open Group Standard, the original IEEE and The Open Group Standard is +.\" the referee document. The original Standard can be obtained online at +.\" http://www.opengroup.org/unix/online.html. +.\" +.\" $FreeBSD$ +.\" +.Dd February 15, 2021 +.Dt MQ_UNLINK 2 +.Os +.Sh NAME +.Nm mq_unlink +.Nd "mq_unlink - remove a message queue (REALTIME)" +.Sh LIBRARY +.Lb librt +.Sh SYNOPSIS +.In mqueue.h +.Ft int +.Fn mq_unlink "const char *name" +.Sh DESCRIPTION +The +.Fn mq_unlink +function removes the message queue named by the string +.Fa name . +If one or more processes have the message queue open when +.Fn mq_unlink +is called, destruction of the message queue will be postponed +until all references to the message queue have been closed. +However, the +.Fn mq_unlink +call need not block until all references have been closed; it may return +immediately. +.Pp +After a successful call to +.Fn mq_unlink , +reuse of the name will subsequently cause +.Xr mq_open 2 +to behave as if no message queue of this name exists. +.Sh RETURN VALUES +.Rv -std +.Sh ERRORS +The +.Fn mq_unlink +system call +will fail if: +.Bl -tag -width Er +.It Bq Er EACCESS +Permission is denied to unlink the message queue represented by +.Fa name . +.It Bq Er EINVAL +.Fa name +is invalid. +.It Bq Er ENAMETOOLONG +The length of the +.Fa name +argument exceeds +.Brq Dv PATH_MAX +or +a pathname component is longer than +.Brq Dv NAME_MAX . +.It Bq Er ENOENT +The message queue does not exist. +.It Bq Er ENOSYS +.Xr mqueuefs 5 +module is neither loaded nor included in the kernel. +.El +.Sh SEE ALSO +.Xr mq_open 2 +.Sh STANDARDS +The +.Fn mq_unlink +system call conforms to +.St -p1003.1-2004 . +The +.Bq Er EACCESS +error code is an extension to the standard. +.Sh HISTORY +Support for POSIX message queues first appeared in +.Fx 7.0 . +.Sh COPYRIGHT +Portions of this text are reprinted and reproduced in electronic form +from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- +Portable Operating System Interface (POSIX), The Open Group Base +Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of +Electrical and Electronics Engineers, Inc and The Open Group. +In the event of any discrepancy between this version and the original IEEE and +The Open Group Standard, the original IEEE and The Open Group Standard is +the referee document. +The original Standard can be obtained online at +http://www.opengroup.org/unix/online.html. From owner-dev-commits-src-all@freebsd.org Thu Feb 18 18:12:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B02CF543E42; Thu, 18 Feb 2021 18:12: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 4DhN9P48Fqz3D88; Thu, 18 Feb 2021 18:12: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 8133A1CA6E; Thu, 18 Feb 2021 18:12: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 11IICvVp060174; Thu, 18 Feb 2021 18:12:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IICvvv060173; Thu, 18 Feb 2021 18:12:57 GMT (envelope-from git) Date: Thu, 18 Feb 2021 18:12:57 GMT Message-Id: <202102181812.11IICvvv060173@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: 97232b0dc031 - stable/13 - Fix incorrect hypotl(3) result with subnormal numbers 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: 97232b0dc03146c0e6466a4886edaaca4f95c3a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 18:12:57 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=97232b0dc03146c0e6466a4886edaaca4f95c3a7 commit 97232b0dc03146c0e6466a4886edaaca4f95c3a7 Author: Dimitry Andric AuthorDate: 2021-02-10 22:28:43 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 18:08:27 +0000 Fix incorrect hypotl(3) result with subnormal numbers This adjusts the factor used to scale the subnormal numbers, so it becomes the right value after adjusting its exponent. Thanks to Steve Kargl for finding the most elegant fix. Also enable the hypot tests, and add a test case for this bug. PR: 253313 (cherry picked from commit d3338f3355a612cf385632291f46c5777bba8d18) Fix lib/msun/test builds on platforms without 80-bit long doubles After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case 'hypotl_near_underflow' would fail to compile on platforms where long doubles weren't 80 bit, like on x86. Disable this particular test on such platforms for now. PR: 253313 (cherry picked from commit 25120662284466ecef976df8f86e97bafdedf991) --- contrib/netbsd-tests/lib/libm/t_hypot.c | 24 ++++++++++++++++++++++++ lib/msun/src/e_hypotl.c | 2 +- lib/msun/tests/Makefile | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_hypot.c b/contrib/netbsd-tests/lib/libm/t_hypot.c index deb7e86ad5ac..cbb056ee470e 100644 --- a/contrib/netbsd-tests/lib/libm/t_hypot.c +++ b/contrib/netbsd-tests/lib/libm/t_hypot.c @@ -70,12 +70,36 @@ ATF_TC_BODY(pr50698, tc) ATF_CHECK(!isnan(val)); } +#if __LDBL_MANT_DIG__ == 64 +ATF_TC(hypotl_near_underflow); +ATF_TC_HEAD(hypotl_near_underflow, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test hypotl near underflow"); +} + +ATF_TC_BODY(hypotl_near_underflow, tc) +{ + volatile long double a = 0x1.b2933cafa0bb7p-16383L; + volatile long double b = 0x1.fffffffffffffp-16351L; + volatile long double e = 0x1.fffffffffffffp-16351L; + volatile long double ulp = __LDBL_EPSILON__; + + volatile long double val = hypotl(a, b); + + ATF_CHECK(!isinf(val)); + ATF_CHECK(fabsl(val - e) <= 2 * ulp); +} +#endif /* __LDBL_MANT_DIG__ == 64 */ + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, hypot_integer); ATF_TP_ADD_TC(tp, hypotf_integer); ATF_TP_ADD_TC(tp, pr50698); +#if __LDBL_MANT_DIG__ == 64 + ATF_TP_ADD_TC(tp, hypotl_near_underflow); +#endif /* __LDBL_MANT_DIG__ == 64 */ return atf_no_error(); } diff --git a/lib/msun/src/e_hypotl.c b/lib/msun/src/e_hypotl.c index 9189b1fab54d..fc43538dfa65 100644 --- a/lib/msun/src/e_hypotl.c +++ b/lib/msun/src/e_hypotl.c @@ -82,7 +82,7 @@ hypotl(long double x, long double y) man_t manh, manl; GET_LDBL_MAN(manh,manl,b); if((manh|manl)==0) return a; - t1=0; + t1=1; SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */ b *= t1; a *= t1; diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 5e9c54189bb7..67a38855309e 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -31,6 +31,7 @@ NETBSD_ATF_TESTS_C+= erf_test NETBSD_ATF_TESTS_C+= exp_test NETBSD_ATF_TESTS_C+= fmod_test NETBSD_ATF_TESTS_C+= fe_round_test +NETBSD_ATF_TESTS_C+= hypot_test NETBSD_ATF_TESTS_C+= infinity_test NETBSD_ATF_TESTS_C+= ilogb_test NETBSD_ATF_TESTS_C+= ldexp_test From owner-dev-commits-src-all@freebsd.org Thu Feb 18 18:13:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CA8FC543E68; Thu, 18 Feb 2021 18:13:22 +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 4DhN9t4zvSz3DFQ; Thu, 18 Feb 2021 18:13:22 +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 939881CAE0; Thu, 18 Feb 2021 18:13:22 +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 11IIDMpM060354; Thu, 18 Feb 2021 18:13:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IIDMJ5060353; Thu, 18 Feb 2021 18:13:22 GMT (envelope-from git) Date: Thu, 18 Feb 2021 18:13:22 GMT Message-Id: <202102181813.11IIDMJ5060353@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: be49cd3ec6a5 - stable/12 - Fix incorrect hypotl(3) result with subnormal numbers 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: be49cd3ec6a53aa6b0b5c5635202dd92bcaacfc6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 18:13:22 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=be49cd3ec6a53aa6b0b5c5635202dd92bcaacfc6 commit be49cd3ec6a53aa6b0b5c5635202dd92bcaacfc6 Author: Dimitry Andric AuthorDate: 2021-02-10 22:28:43 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 18:10:32 +0000 Fix incorrect hypotl(3) result with subnormal numbers This adjusts the factor used to scale the subnormal numbers, so it becomes the right value after adjusting its exponent. Thanks to Steve Kargl for finding the most elegant fix. Also enable the hypot tests, and add a test case for this bug. PR: 253313 (cherry picked from commit d3338f3355a612cf385632291f46c5777bba8d18) Fix lib/msun/test builds on platforms without 80-bit long doubles After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case 'hypotl_near_underflow' would fail to compile on platforms where long doubles weren't 80 bit, like on x86. Disable this particular test on such platforms for now. PR: 253313 (cherry picked from commit 25120662284466ecef976df8f86e97bafdedf991) --- contrib/netbsd-tests/lib/libm/t_hypot.c | 24 ++++++++++++++++++++++++ lib/msun/src/e_hypotl.c | 2 +- lib/msun/tests/Makefile | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_hypot.c b/contrib/netbsd-tests/lib/libm/t_hypot.c index deb7e86ad5ac..cbb056ee470e 100644 --- a/contrib/netbsd-tests/lib/libm/t_hypot.c +++ b/contrib/netbsd-tests/lib/libm/t_hypot.c @@ -70,12 +70,36 @@ ATF_TC_BODY(pr50698, tc) ATF_CHECK(!isnan(val)); } +#if __LDBL_MANT_DIG__ == 64 +ATF_TC(hypotl_near_underflow); +ATF_TC_HEAD(hypotl_near_underflow, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test hypotl near underflow"); +} + +ATF_TC_BODY(hypotl_near_underflow, tc) +{ + volatile long double a = 0x1.b2933cafa0bb7p-16383L; + volatile long double b = 0x1.fffffffffffffp-16351L; + volatile long double e = 0x1.fffffffffffffp-16351L; + volatile long double ulp = __LDBL_EPSILON__; + + volatile long double val = hypotl(a, b); + + ATF_CHECK(!isinf(val)); + ATF_CHECK(fabsl(val - e) <= 2 * ulp); +} +#endif /* __LDBL_MANT_DIG__ == 64 */ + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, hypot_integer); ATF_TP_ADD_TC(tp, hypotf_integer); ATF_TP_ADD_TC(tp, pr50698); +#if __LDBL_MANT_DIG__ == 64 + ATF_TP_ADD_TC(tp, hypotl_near_underflow); +#endif /* __LDBL_MANT_DIG__ == 64 */ return atf_no_error(); } diff --git a/lib/msun/src/e_hypotl.c b/lib/msun/src/e_hypotl.c index 9189b1fab54d..fc43538dfa65 100644 --- a/lib/msun/src/e_hypotl.c +++ b/lib/msun/src/e_hypotl.c @@ -82,7 +82,7 @@ hypotl(long double x, long double y) man_t manh, manl; GET_LDBL_MAN(manh,manl,b); if((manh|manl)==0) return a; - t1=0; + t1=1; SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */ b *= t1; a *= t1; diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 949b0a5b7aad..cd60f7c71a15 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -30,6 +30,7 @@ NETBSD_ATF_TESTS_C+= erf_test NETBSD_ATF_TESTS_C+= exp_test NETBSD_ATF_TESTS_C+= fmod_test NETBSD_ATF_TESTS_C+= fe_round_test +NETBSD_ATF_TESTS_C+= hypot_test NETBSD_ATF_TESTS_C+= infinity_test NETBSD_ATF_TESTS_C+= ilogb_test NETBSD_ATF_TESTS_C+= ldexp_test From owner-dev-commits-src-all@freebsd.org Thu Feb 18 18:14:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 09819543F8F; Thu, 18 Feb 2021 18:14: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 4DhNBx3xdNz3DQ1; Thu, 18 Feb 2021 18:14: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 1482C1CE37; Thu, 18 Feb 2021 18:14: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 11IIEGwO060606; Thu, 18 Feb 2021 18:14:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IIEGh3060605; Thu, 18 Feb 2021 18:14:16 GMT (envelope-from git) Date: Thu, 18 Feb 2021 18:14:16 GMT Message-Id: <202102181814.11IIEGh3060605@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: 6287b5978c5f - stable/11 - Fix incorrect hypotl(3) result with subnormal numbers 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: 6287b5978c5f3959ad7f9494681cf94d1243120e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 18:14:18 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6287b5978c5f3959ad7f9494681cf94d1243120e commit 6287b5978c5f3959ad7f9494681cf94d1243120e Author: Dimitry Andric AuthorDate: 2021-02-10 22:28:43 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 18:11:19 +0000 Fix incorrect hypotl(3) result with subnormal numbers This adjusts the factor used to scale the subnormal numbers, so it becomes the right value after adjusting its exponent. Thanks to Steve Kargl for finding the most elegant fix. Also enable the hypot tests, and add a test case for this bug. PR: 253313 (cherry picked from commit d3338f3355a612cf385632291f46c5777bba8d18) Fix lib/msun/test builds on platforms without 80-bit long doubles After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case 'hypotl_near_underflow' would fail to compile on platforms where long doubles weren't 80 bit, like on x86. Disable this particular test on such platforms for now. PR: 253313 (cherry picked from commit 25120662284466ecef976df8f86e97bafdedf991) --- contrib/netbsd-tests/lib/libm/t_hypot.c | 24 ++++++++++++++++++++++++ lib/msun/src/e_hypotl.c | 2 +- lib/msun/tests/Makefile | 1 + 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/contrib/netbsd-tests/lib/libm/t_hypot.c b/contrib/netbsd-tests/lib/libm/t_hypot.c index deb7e86ad5ac..cbb056ee470e 100644 --- a/contrib/netbsd-tests/lib/libm/t_hypot.c +++ b/contrib/netbsd-tests/lib/libm/t_hypot.c @@ -70,12 +70,36 @@ ATF_TC_BODY(pr50698, tc) ATF_CHECK(!isnan(val)); } +#if __LDBL_MANT_DIG__ == 64 +ATF_TC(hypotl_near_underflow); +ATF_TC_HEAD(hypotl_near_underflow, tc) +{ + atf_tc_set_md_var(tc, "descr", "Test hypotl near underflow"); +} + +ATF_TC_BODY(hypotl_near_underflow, tc) +{ + volatile long double a = 0x1.b2933cafa0bb7p-16383L; + volatile long double b = 0x1.fffffffffffffp-16351L; + volatile long double e = 0x1.fffffffffffffp-16351L; + volatile long double ulp = __LDBL_EPSILON__; + + volatile long double val = hypotl(a, b); + + ATF_CHECK(!isinf(val)); + ATF_CHECK(fabsl(val - e) <= 2 * ulp); +} +#endif /* __LDBL_MANT_DIG__ == 64 */ + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, hypot_integer); ATF_TP_ADD_TC(tp, hypotf_integer); ATF_TP_ADD_TC(tp, pr50698); +#if __LDBL_MANT_DIG__ == 64 + ATF_TP_ADD_TC(tp, hypotl_near_underflow); +#endif /* __LDBL_MANT_DIG__ == 64 */ return atf_no_error(); } diff --git a/lib/msun/src/e_hypotl.c b/lib/msun/src/e_hypotl.c index 7b5ab89562fe..3633079a10f4 100644 --- a/lib/msun/src/e_hypotl.c +++ b/lib/msun/src/e_hypotl.c @@ -82,7 +82,7 @@ hypotl(long double x, long double y) man_t manh, manl; GET_LDBL_MAN(manh,manl,b); if((manh|manl)==0) return a; - t1=0; + t1=1; SET_HIGH_WORD(t1,ESW(MAX_EXP-2)); /* t1=2^(MAX_EXP-2) */ b *= t1; a *= t1; diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 949b0a5b7aad..cd60f7c71a15 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -30,6 +30,7 @@ NETBSD_ATF_TESTS_C+= erf_test NETBSD_ATF_TESTS_C+= exp_test NETBSD_ATF_TESTS_C+= fmod_test NETBSD_ATF_TESTS_C+= fe_round_test +NETBSD_ATF_TESTS_C+= hypot_test NETBSD_ATF_TESTS_C+= infinity_test NETBSD_ATF_TESTS_C+= ilogb_test NETBSD_ATF_TESTS_C+= ldexp_test From owner-dev-commits-src-all@freebsd.org Thu Feb 18 18:15:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1C6435443C5; Thu, 18 Feb 2021 18:15: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 4DhND16FDrz3DZM; Thu, 18 Feb 2021 18:15: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 28A5A1CAE8; Thu, 18 Feb 2021 18:15: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 11IIFC3d060912; Thu, 18 Feb 2021 18:15:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IIFCDm060911; Thu, 18 Feb 2021 18:15:12 GMT (envelope-from git) Date: Thu, 18 Feb 2021 18:15:12 GMT Message-Id: <202102181815.11IIFCDm060911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando Apesteguía Subject: git: cee8be2c78f1 - main - vis(1): Add EXAMPLES section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cee8be2c78f15bed6d2339d41e3f8c232d41bb33 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 18:15:14 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cee8be2c78f15bed6d2339d41e3f8c232d41bb33 commit cee8be2c78f15bed6d2339d41e3f8c232d41bb33 Author: Fernando Apesteguía AuthorDate: 2021-02-18 18:04:23 +0000 Commit: Fernando Apesteguía CommitDate: 2021-02-18 18:10:33 +0000 vis(1): Add EXAMPLES section Add three examples showing the use of `-h`, `-l`, `-t`, `-w` christos@netbsd.org to be notified. Reviewed by: bcr@, gbe@, imp@ Approved by: bcr@, gbe@ (mentor), imp@ Differential Revision: https://reviews.freebsd.org/D25242 --- contrib/vis/vis.1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/contrib/vis/vis.1 b/contrib/vis/vis.1 index 6f7c82ff7ab5..803d34eda5f9 100644 --- a/contrib/vis/vis.1 +++ b/contrib/vis/vis.1 @@ -155,6 +155,25 @@ instead. Specify the locale of the input data. Set to C if the input data locale is unknown. .El +.Sh EXAMPLES +Visualize characters encoding white spaces and tabs: +.Bd -literal -offset indent +$ echo -e "\\x10\\n\\t" | vis -w -t +\\^P\\012\\011\\012 +.Ed +.Pp +Same as above but using `\\$' for newline followed by an actual newline: +.Bd -literal -offset indent +$ echo -e "\\x10\\n\\t" | vis -w -t -l +\\^P\\$ +\\011\\$ +.Ed +.Pp +Visualize string using URI encoding: +.Bd -literal -offset indent +$ echo http://www.freebsd.org | vis -h +http%3a%2f%2fwww.freebsd.org%0a +.Ed .Sh SEE ALSO .Xr unvis 1 , .Xr svis 3 , From owner-dev-commits-src-all@freebsd.org Thu Feb 18 19:42:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DE4795495C4; Thu, 18 Feb 2021 19:42: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 4DhQ8c615Sz3Mvs; Thu, 18 Feb 2021 19:42: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 C024C1E3AF; Thu, 18 Feb 2021 19:42: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 11IJgOcY078685; Thu, 18 Feb 2021 19:42:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IJgOi0078684; Thu, 18 Feb 2021 19:42:24 GMT (envelope-from git) Date: Thu, 18 Feb 2021 19:42:24 GMT Message-Id: <202102181942.11IJgOi0078684@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: 207f42897114 - stable/13 - readelf: do not trucate section name with -W 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: 207f4289711423b4ffb2f92520b8f2a4a03350de Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 19:42:24 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=207f4289711423b4ffb2f92520b8f2a4a03350de commit 207f4289711423b4ffb2f92520b8f2a4a03350de Author: Ed Maste AuthorDate: 2021-02-02 14:35:04 +0000 Commit: Ed Maste CommitDate: 2021-02-18 19:31:28 +0000 readelf: do not trucate section name with -W PR: 246015 Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28461 (cherry picked from commit 847dfd2803f6c8b077e3ebc68e35adff2c79a65f) --- contrib/elftoolchain/readelf/readelf.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/elftoolchain/readelf/readelf.c b/contrib/elftoolchain/readelf/readelf.c index fe8e0e70e7a1..ff2fe8e7245f 100644 --- a/contrib/elftoolchain/readelf/readelf.c +++ b/contrib/elftoolchain/readelf/readelf.c @@ -2632,16 +2632,21 @@ dump_shdr(struct readelf *re) " %6.6jx %6.6jx %2.2jx %2u %3u %2ju\n" " %s\n", ST_CT); else - printf(" [%2d] %-17.17s %-15.15s %8.8jx" - " %6.6jx %6.6jx %2.2jx %3s %2u %3u %2ju\n", - S_CT); + if (re->options & RE_WW) + printf(" [%2d] %-17s %-15.15s " + "%8.8jx %6.6jx %6.6jx %2.2jx %3s " + "%2u %3u %2ju\n", S_CT); + else + printf(" [%2d] %-17.17s %-15.15s " + "%8.8jx %6.6jx %6.6jx %2.2jx %3s " + "%2u %3u %2ju\n", S_CT); } else if (re->options & RE_WW) { if (re->options & RE_T) printf(" [%2d] %s\n %-15.15s %16.16jx" " %6.6jx %6.6jx %2.2jx %2u %3u %2ju\n" " %s\n", ST_CT); else - printf(" [%2d] %-17.17s %-15.15s %16.16jx" + printf(" [%2d] %-17s %-15.15s %16.16jx" " %6.6jx %6.6jx %2.2jx %3s %2u %3u %2ju\n", S_CT); } else { From owner-dev-commits-src-all@freebsd.org Thu Feb 18 19:42:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A783549464; Thu, 18 Feb 2021 19:42:26 +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 4DhQ8d6TgMz3N43; Thu, 18 Feb 2021 19:42: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 D17B31E5CE; Thu, 18 Feb 2021 19:42: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 11IJgP6Y078707; Thu, 18 Feb 2021 19:42:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IJgPu6078706; Thu, 18 Feb 2021 19:42:25 GMT (envelope-from git) Date: Thu, 18 Feb 2021 19:42:25 GMT Message-Id: <202102181942.11IJgPu6078706@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: 4f17bbf19f21 - stable/13 - arch.7: update 11.x to 11.4 as the last FreeBSD 11 release 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: 4f17bbf19f211b1dca18fe96c0c918469864a932 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 19:42:26 -0000 The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4f17bbf19f211b1dca18fe96c0c918469864a932 commit 4f17bbf19f211b1dca18fe96c0c918469864a932 Author: Ed Maste AuthorDate: 2021-01-28 20:02:24 +0000 Commit: Ed Maste CommitDate: 2021-02-18 19:41:10 +0000 arch.7: update 11.x to 11.4 as the last FreeBSD 11 release armeb and pc98 were both discontinued after FreeBSD 11. FreeBSD 11.4 is now known to be the final 11.x release, so update to the specific version. (cherry picked from commit 4f9548640dd1c7e9602f0d01647b112e51792224) --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index a334d509d7b7..45df736b8a37 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -92,7 +92,7 @@ architectures, the final release. .It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 Ta 12.x -.It armeb Ta 8.0 Ta 11.x +.It armeb Ta 8.0 Ta 11.4 .It armv6 Ta 10.0 .It armv7 Ta 12.0 .It ia64 Ta 5.0 Ta 10.4 @@ -106,7 +106,7 @@ architectures, the final release. .It mips64el Ta 9.0 .It mips64elhf Ta 12.0 .It mips64hf Ta 12.0 -.It pc98 Ta 2.2 Ta 11.x +.It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 6.0 From owner-dev-commits-src-all@freebsd.org Thu Feb 18 19:43:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 43EE65499B6; Thu, 18 Feb 2021 19:43:22 +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 4DhQ9k1R8Nz3NDV; Thu, 18 Feb 2021 19:43:22 +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 23DB21E24B; Thu, 18 Feb 2021 19:43:22 +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 11IJhMKs078949; Thu, 18 Feb 2021 19:43:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IJhMki078948; Thu, 18 Feb 2021 19:43:22 GMT (envelope-from git) Date: Thu, 18 Feb 2021 19:43:22 GMT Message-Id: <202102181943.11IJhMki078948@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: 1be660d28896 - stable/12 - arch.7: update 11.x to 11.4 as the last FreeBSD 11 release 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: 1be660d28896a2e35c04e7a889ca19f72a72e9b1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 19:43:22 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1be660d28896a2e35c04e7a889ca19f72a72e9b1 commit 1be660d28896a2e35c04e7a889ca19f72a72e9b1 Author: Ed Maste AuthorDate: 2021-01-28 20:02:24 +0000 Commit: Ed Maste CommitDate: 2021-02-18 19:40:52 +0000 arch.7: update 11.x to 11.4 as the last FreeBSD 11 release armeb and pc98 were both discontinued after FreeBSD 11. FreeBSD 11.4 is now known to be the final 11.x release, so update to the specific version. (cherry picked from commit 4f9548640dd1c7e9602f0d01647b112e51792224) --- share/man/man7/arch.7 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man7/arch.7 b/share/man/man7/arch.7 index 8a468c4655c0..3f2456f4f14d 100644 --- a/share/man/man7/arch.7 +++ b/share/man/man7/arch.7 @@ -94,7 +94,7 @@ architectures, the final release. .It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 Ta 12.x -.It armeb Ta 8.0 Ta 11.x +.It armeb Ta 8.0 Ta 11.4 .It armv6 Ta 10.0 .It armv7 Ta 12.0 .It ia64 Ta 5.0 Ta 10.4 @@ -108,7 +108,7 @@ architectures, the final release. .It mips64el Ta 9.0 .It mips64elhf Ta 12.0 .It mips64hf Ta 12.0 -.It pc98 Ta 2.2 Ta 11.x +.It pc98 Ta 2.2 Ta 11.4 .It powerpc Ta 6.0 .It powerpcspe Ta 12.0 .It powerpc64 Ta 6.0 From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:04:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D6B0954BF77; Thu, 18 Feb 2021 20:04: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 4DhQfC5J5Wz3QL6; Thu, 18 Feb 2021 20:04: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 A6A2C1E7B0; Thu, 18 Feb 2021 20:04: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 11IK4ZXo005753; Thu, 18 Feb 2021 20:04:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IK4ZLW005752; Thu, 18 Feb 2021 20:04:35 GMT (envelope-from git) Date: Thu, 18 Feb 2021 20:04:35 GMT Message-Id: <202102182004.11IK4ZLW005752@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: 83b1614a2e39 - stable/13 - Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: 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: 83b1614a2e395e821e8a3064f1dad1c854a9e3f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:04:35 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=83b1614a2e395e821e8a3064f1dad1c854a9e3f9 commit 83b1614a2e395e821e8a3064f1dad1c854a9e3f9 Author: Dimitry Andric AuthorDate: 2021-02-13 13:38:51 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 20:03:57 +0000 Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: https://subversion.apache.org/docs/release-notes/1.14 NOTE 1: There is no need to dump and reload repositories, and the working copy format is still the same as Subversion 1.8 through 1.13. NOTE 2: The upstream release also contains a fix for a security issue in mod_dav_svn (CVE-2020-17525), but since we do not build or use any Apache modules, it is not an issue for the FreeBSD base system. Relnotes: yes (cherry-picked from 0ff1014944897f4f3ffa4462406cdee920b53400) --- contrib/subversion/.editorconfig | 1 + contrib/subversion/.swig_pl_checked | 0 contrib/subversion/.swig_py_checked | 0 contrib/subversion/.swig_rb_checked | 0 contrib/subversion/CHANGES | 68 +++++- contrib/subversion/INSTALL | 12 +- contrib/subversion/NOTICE | 2 +- contrib/subversion/autogen.sh | 4 +- contrib/subversion/build-outputs.mk | 29 ++- contrib/subversion/build.conf | 15 +- contrib/subversion/configure | 240 +++++++++++---------- contrib/subversion/configure.ac | 2 +- contrib/subversion/gen-make.py | 2 +- .../subversion/include/private/svn_dep_compat.h | 11 + .../subversion/include/private/svn_sorts_private.h | 10 +- contrib/subversion/subversion/include/svn_ra.h | 2 +- contrib/subversion/subversion/include/svn_types.h | 29 +++ .../subversion/subversion/include/svn_version.h | 6 +- .../subversion/subversion/libsvn_client/merge.c | 40 +++- .../subversion/libsvn_client/mergeinfo.h | 2 - contrib/subversion/subversion/libsvn_client/mtcc.c | 3 +- contrib/subversion/subversion/libsvn_fs_fs/index.c | 2 +- contrib/subversion/subversion/libsvn_repos/authz.c | 31 ++- .../subversion/libsvn_repos/config_file.c | 4 + .../subversion/subversion/libsvn_subr/apr_escape.c | 135 ++++++++++++ .../subversion/subversion/libsvn_subr/cmdline.c | 101 +++++++-- contrib/subversion/subversion/libsvn_subr/iter.c | 26 +++ contrib/subversion/subversion/libsvn_subr/opt.c | 2 +- .../subversion/subversion/libsvn_subr/version.c | 2 +- .../subversion/subversion/libsvn_wc/wc-metadata.h | 2 +- .../subversion/libsvn_wc/wc-metadata.sql | 2 +- .../subversion/subversion/libsvn_wc/wc-queries.h | 2 +- contrib/subversion/subversion/svn/cl-conflicts.c | 6 +- contrib/subversion/subversion/svn/filesize.c | 57 +++-- contrib/subversion/win-tests.py | 11 +- usr.bin/svn/lib/libsvn_subr/Makefile | 1 + usr.bin/svn/svn_private_config.h | 4 +- 37 files changed, 668 insertions(+), 198 deletions(-) diff --git a/contrib/subversion/.editorconfig b/contrib/subversion/.editorconfig index 13868c63e3f8..b000de12aff1 100644 --- a/contrib/subversion/.editorconfig +++ b/contrib/subversion/.editorconfig @@ -10,6 +10,7 @@ trim_trailing_whitespace = false [**/Makefile*] indent_style = tab +indent_size = 8 [build-outputs.mk] indent_style = tab diff --git a/contrib/subversion/.swig_pl_checked b/contrib/subversion/.swig_pl_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_py_checked b/contrib/subversion/.swig_py_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_rb_checked b/contrib/subversion/.swig_rb_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/CHANGES b/contrib/subversion/CHANGES index 08398a98ac8b..656b1898d7d0 100644 --- a/contrib/subversion/CHANGES +++ b/contrib/subversion/CHANGES @@ -4,8 +4,51 @@ # To view an issue listed as (issue #XXXX), visit: # https://subversion.apache.org/issue-XXXX +Version 1.14.1 +(10 Feb 2021, from /branches/1.14.x) + User-visible changes: + - Client-side improvements and bugfixes: + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Do not suggest --help -v for commands which do not support -v (r1882157) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix problems in human-readable file size formatting (r1878909, -18, -50) + * Improve an error message from svnmucc (r1877072) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + * Fix filename encoding/quoting when invoking editor on Windows (r1885953) + * Convert filename for editor from UTF-8 to the locale's encoding (r1882234) + + - Server-side improvements and bugfixes: + * Fix authz doesn't combine global and repository rules (issue #4762) + * Make the hot-backup.py script work with Python 3 (r1878855, r1878859) + * Fix an uninitialized read in FSFS (r1880374) + * Make mailer.py work properly with Python 3 (r1884427 et al) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + - General: + * Restore support for building with APR 1.4 (r1881958, r1882128) + * Rewrite internal test data to avoid literal trailing spaces (r1875675) + * Remove use of os.dup2() from tests for Python 3.6 on Windows (r1883337) + * Note in INSTALL that non-release mode is required for Python 2 (r1877960) + * Make gen-make.py --debug work with Python 3 (r1876906) + * Make test suite run correctly with Python 3 on Windows (r1876707 et al) + * Fix compilation errors with Visual Studio 2008 (r1877259) + * Use Doxygen comment leader for comments with doxygen syntax (r1877794) + - Bindings: + * Fix win-tests.py to load Python 3 bindings with debug config (r1884642) + * Fix C4204 errors building swig-py with Python 3.9 on Windows (r1883570) + * Fix unable to load *.pyd files with Python 3.8.x on Windows (r1883335) + * Add SWIG4 support for SWIG Python binding on Windows (r1877338) + * Fix incorrect cache in JavaHL SVNBase::createCppBoundObject (r1882115) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * autogen.sh: Remove .swig_*_checked files from release tarballs (r1878413) + * Avoid version check for Python if --without-swig is used (r1876662) + * siwg-py: Fix a syntax error for Python 3.6 and later (r1885112) + * Fix several crashes and JNI warnings in javahl TunnelAgent (r1886029) + Version 1.14.0 -(6 May 2020, from /branches/1.14.x) +(27 May 2020, from /branches/1.14.x) https://svn.apache.org/repos/asf/subversion/tags/1.14.0 User-visible changes: @@ -222,6 +265,29 @@ http://svn.apache.org/repos/asf/subversion/tags/1.11.0 * Fix a potential crash in JavaHL (issue #4764) +Version 1.10.7 +(10 Feb 2021, from /branches/1.10.x) + User-visible changes: + - Client-side bugfixes: + * Fix 'svn patch' setting mode 0600 on patched files with props (r1864440) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix a crash seen when using git-svn with kwallet (r1875680) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + + - Server-side bugfixes: + * mod_dav_svn: install cleanup handler for FS warning logging (r1865266) + * mod_dav_svn: Fix missing Last-Modified header on 'external' GET requests (r1866425) + * Fix formatting type size mismatches in FSFS (r1865987, -8) + * Fix an undefined behavior problem in FSFS caching code (r1876054) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + * Fix Requires(.private) fields in pkg-config files (r1863987, -90) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * Fix an EOL issue in tests on Windows (r1881985 et al) + Version 1.10.6 (24 Jul 2019, from /branches/1.10.x) https://svn.apache.org/repos/asf/subversion/tags/1.10.6 diff --git a/contrib/subversion/INSTALL b/contrib/subversion/INSTALL index 64f821a31057..44a916b4ac49 100644 --- a/contrib/subversion/INSTALL +++ b/contrib/subversion/INSTALL @@ -3,7 +3,7 @@ A Quick Guide ====================================== -$LastChangedDate: 2020-02-17 03:49:42 +0000 (Mon, 17 Feb 2020) $ +$LastChangedDate: 2020-12-18 04:00:24 +0000 (Fri, 18 Dec 2020) $ Contents: @@ -206,7 +206,7 @@ I. INTRODUCTION commands described in section II.B before installing the following. - 1. Apache Portable Runtime 1.5 or newer (REQUIRED) + 1. Apache Portable Runtime 1.4 or newer (REQUIRED) Whenever you want to build any part of Subversion, you need the Apache Portable Runtime (APR) and the APR Utility (APR-util) @@ -506,6 +506,12 @@ I. INTRODUCTION reached end of life. All users are strongly encouraged to move to Python 3. + Note: If you are using a Subversion distribution tarball and want + to build the Python bindings for Python 2, you should rebuild + the build environment in non-release mode by running + 'sh autogen.sh' before running the ./configure script; see + section II.B for more about autogen.sh. + 13. Perl 5.8 or newer (Windows only) (OPTIONAL) @@ -832,7 +838,7 @@ II. INSTALLATION needed to compile Apache. Note that this is the actual awk program, not an installer - just rename it to awk.exe and it is ready to use. * Apache apr, apr-util, and optionally apr-iconv libraries, version - 1.5 or later (1.2 for apr-iconv). If you are building from a Subversion + 1.4 or later (1.2 for apr-iconv). If you are building from a Subversion checkout and have not downloaded Apache 2, then get these 3 libraries from https://www.apache.org/dist/apr/. * SQLite 3.8.2 or higher from https://www.sqlite.org/download.html diff --git a/contrib/subversion/NOTICE b/contrib/subversion/NOTICE index a3e794d536e7..84d77667c40d 100644 --- a/contrib/subversion/NOTICE +++ b/contrib/subversion/NOTICE @@ -1,5 +1,5 @@ Apache Subversion -Copyright 2020 The Apache Software Foundation +Copyright 2021 The Apache Software Foundation This product includes software developed by many people, and distributed under Contributor License Agreements to The Apache Software Foundation diff --git a/contrib/subversion/autogen.sh b/contrib/subversion/autogen.sh index 84a6e2ca33cc..6579daa9e415 100755 --- a/contrib/subversion/autogen.sh +++ b/contrib/subversion/autogen.sh @@ -178,8 +178,8 @@ if test -n "$RELEASE_MODE"; then # Build the SWIG-related files make -f autogen-standalone.mk autogen-swig || gen_failed=1 - # Remove the .swig_checked file - rm -f .swig_checked + # Remove the .swig_*checked files + rm -f .swig_checked .swig_pl_checked .swig_py_checked .swig_rb_checked fi if test -n "$SKIP_DEPS"; then diff --git a/contrib/subversion/build-outputs.mk b/contrib/subversion/build-outputs.mk index aee265351a80..3f7ac1a100f8 100644 --- a/contrib/subversion/build-outputs.mk +++ b/contrib/subversion/build-outputs.mk @@ -23,21 +23,21 @@ RA_SERF_LINK = ../../subversion/libsvn_ra_serf/libsvn_ra_serf-1.la ../../subvers RA_SVN_DEPS = subversion/libsvn_ra_svn/libsvn_ra_svn-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la RA_SVN_LINK = ../../subversion/libsvn_ra_svn/libsvn_ra_svn-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subversion/libsvn_auth_gnome _keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subversion/tests/libsvn_ra_loc al subversion/tests/libsvn_ra subversion/tes! ts/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy +BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/client subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subv ersion/libsvn_auth_gnome_keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subver sion/tests/libsvn_ra_local subversion/tests/! libsvn_ra subversion/tests/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy BDB_TEST_DEPS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) BDB_TEST_PROGRAMS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) -TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) s ubversion/tests/libsvn_subr/prefix-string-te! st$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/ libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subvers ion/tests/cmdline/dav_tests.py subversion/te! sts/cmdli! ne/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/ cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_t ests.py subversion/tests/cmdline/trans_tests! .py subve! rsion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) su bversion/tests/libsvn_subr/path-test$(EXEEXT! ) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta /svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subv! ersion/te! sts/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversio n/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnver sion_tests.py subversion/tests/cmdline/switc! h_tests.p! y subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py -TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) sub version/tests/libsvn_ra/ra-test$(EXEEXT) sub! version/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_su br/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline /log_tests.py subversion/tests/cmdline/merge! _authz_te! sts.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndum pfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/t ests/libsvn_ra_local/ra-local-test$(EXEEXT) ! subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_sub r/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests /cmdline/lock_tests.py subversion/tests/cmdl! ine/log_t! ests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/sv nauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py check-deps test-deps: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) MANPAGES = subversion/svn/svn.1 subversion/svnadmin/svnadmin.1 subversion/svndumpfilter/svndumpfilter.1 subversion/svnlook/svnlook.1 subversion/svnmucc/svnmucc.1 subversion/svnrdump/svnrdump.1 subversion/svnserve/svnserve.8 subversion/svnserve/svnserve.conf.5 subversion/svnsync/svnsync.1 subversion/svnversion/svnversion.1 -CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subver sion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree_conflict_tests.pyc subversion/tests/cmdline/me rgeinfo_tests.pyc subversion/tests/cmdline/m! od_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/cmdline/svnrdump_tests.pyc subversion/tests/cmdl ine/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEX T) subversion/tests/libsvn_fs/locks-test$(EX! EEXT) sub! version/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEX T) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/test s/libsvn_subr/string-test$(EXEEXT) subversio! n/tests/l! ibsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconfl ict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) +CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subversion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree _conflict_tests.pyc subversion/tests/cmdline! /mergeinfo_tests.pyc subversion/tests/cmdline/mod_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/c mdline/svnrdump_tests.pyc subversion/tests/cmdline/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EX EEXT) subversion/tests/libsvn_fs/fs-test$(EX! EEXT) sub! version/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) su bversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/l ibsvn_subr/stream-test$(EXEEXT) subversion/t! ests/libs! vn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) t ools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) EXTRACLEAN_FILES = subversion/libsvn_fs_fs/rep-cache-db.h subversion/libsvn_fs_x/rep-cache-db.h subversion/libsvn_subr/internal_statements.h subversion/libsvn_wc/wc-queries.h subversion/tests/libsvn_wc/wc-test-queries.h \ $(abs_builddir)/subversion/libsvn_subr/errorcode.inc \ $(abs_builddir)/subversion/libsvn_subr/config_keys.inc \ @@ -285,6 +285,12 @@ error_test_OBJECTS = error-test.lo subversion/tests/libsvn_subr/error-test$(EXEEXT): $(error_test_DEPS) cd subversion/tests/libsvn_subr && $(LINK) $(error_test_LDFLAGS) -o error-test$(EXEEXT) $(error_test_OBJECTS) ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) +filesize_test_PATH = subversion/tests/client +filesize_test_DEPS = subversion/tests/client/filesize-test.lo subversion/libsvn_client/libsvn_client-1.la subversion/tests/libsvn_test-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_subr/libsvn_subr-1.la +filesize_test_OBJECTS = filesize-test.lo +subversion/tests/client/filesize-test$(EXEEXT): $(filesize_test_DEPS) + cd subversion/tests/client && $(LINK) $(filesize_test_LDFLAGS) -o filesize-test$(EXEEXT) $(filesize_test_OBJECTS) ../../../subversion/libsvn_client/libsvn_client-1.la ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_wc/libsvn_wc-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) + fs_base_test_PATH = subversion/tests/libsvn_fs_base fs_base_test_DEPS = subversion/tests/libsvn_fs_base/fs-base-test.lo subversion/tests/libsvn_test-1.la subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_fs_base/libsvn_fs_base-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_fs_util/libsvn_fs_util-1.la subversion/libsvn_subr/libsvn_subr-1.la fs_base_test_OBJECTS = fs-base-test.lo @@ -518,8 +524,8 @@ subversion/libsvn_repos/libsvn_repos-1.la: $(libsvn_repos_DEPS) cd subversion/libsvn_repos && $(LINK_LIB) $(libsvn_repos_LDFLAGS) -o libsvn_repos-1.la $(LT_NO_UNDEFINED) $(libsvn_repos_OBJECTS) ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) libsvn_subr_PATH = subversion/libsvn_subr -libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/libsvn_subr/dso.lo subversion/libsvn_s ubr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subversion/libsvn_subr/sorts.lo subversion /libsvn_subr/spillbuf.lo subversion/libsvn_s! ubr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subversion/libsvn_subr/x509parse.lo subver sion/libsvn_subr/xml.lo -libsvn_subr_OBJECTS = adler32.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo validate.lo versi on.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo +libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/apr_escape.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/l ibsvn_subr/dso.lo subversion/libsvn_subr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subve rsion/libsvn_subr/sorts.lo subversion/libsvn! _subr/spillbuf.lo subversion/libsvn_subr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subve rsion/libsvn_subr/x509parse.lo subversion/libsvn_subr/xml.lo +libsvn_subr_OBJECTS = adler32.lo apr_escape.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo val idate.lo version.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo subversion/libsvn_subr/libsvn_subr-1.la: $(libsvn_subr_DEPS) cd subversion/libsvn_subr && $(LINK_LIB) $(libsvn_subr_LDFLAGS) -o libsvn_subr-1.la $(LT_NO_UNDEFINED) $(libsvn_subr_OBJECTS) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(SVN_XML_LIBS) $(SVN_ZLIB_LIBS) $(SVN_APR_MEMCACHE_LIBS) $(SVN_SQLITE_LIBS) $(SVN_MAGIC_LIBS) $(SVN_INTL_LIBS) $(SVN_LZ4_LIBS) $(SVN_UTF8PROC_LIBS) $(SVN_MACOS_PLIST_LIBS) $(SVN_MACOS_KEYCHAIN_LIBS) $(LIBS) @@ -1152,7 +1158,7 @@ swig-rb: subversion/bindings/swig/ruby/client.la subversion/bindings/swig/ruby/c swig-rb-lib: subversion/bindings/swig/ruby/libsvn_swig_ruby/libsvn_swig_ruby-1.la -test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libs vn_subr/path-test$(EXEEXT) subversion/tests/! libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/l ibsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) +test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff /parse-diff-test$(EXEEXT) subversion/tests/l! ibsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn _delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) tools: tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/server-side/mod_dontdothat/mod_dontdothat.la tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/x509-parser$(EXEEXT) @@ -1496,6 +1502,7 @@ entries-compat-test: subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) entries-dump: subversion/tests/cmdline/entries-dump$(EXEEXT) error-code-test: subversion/tests/libsvn_subr/error-code-test$(EXEEXT) error-test: subversion/tests/libsvn_subr/error-test$(EXEEXT) +filesize-test: subversion/tests/client/filesize-test$(EXEEXT) fs-base-test: subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) fs-fs-fuzzy-test: subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) fs-fs-pack-test: subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) @@ -2890,6 +2897,8 @@ subversion/libsvn_repos/rev_hunt.lo: subversion/libsvn_repos/rev_hunt.c subversi subversion/libsvn_subr/adler32.lo: subversion/libsvn_subr/adler32.c subversion/include/private/svn_adler32.h +subversion/libsvn_subr/apr_escape.lo: subversion/libsvn_subr/apr_escape.c subversion/include/private/svn_dep_compat.h + subversion/libsvn_subr/atomic.lo: subversion/libsvn_subr/atomic.c subversion/include/private/svn_atomic.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_mutex.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_pools.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/auth.lo: subversion/libsvn_subr/auth.c subversion/include/private/svn_auth_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_version.h subversion/libsvn_subr/auth.h subversion/svn_private_config.h @@ -2912,7 +2921,7 @@ subversion/libsvn_subr/cache_config.lo: subversion/libsvn_subr/cache_config.c su subversion/libsvn_subr/checksum.lo: subversion/libsvn_subr/checksum.c subversion/include/private/svn_debug.h subversion/include/private/svn_subr_private.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/checksum.h subversion/libsvn_subr/fnv1a.h subversion/svn_private_config.h -subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_utf.h subvers ion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h +subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types _impl.h subversion/include/svn_utf.h subversion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h subversion/libsvn_subr/compat.lo: subversion/libsvn_subr/compat.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_compat.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h @@ -3402,9 +3411,11 @@ subversion/tests/afl/afl-svndiff.lo: subversion/tests/afl/afl-svndiff.c subversi subversion/tests/afl/afl-x509.lo: subversion/tests/afl/afl-x509.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_x509.h +subversion/tests/client/filesize-test.lo: subversion/tests/client/filesize-test.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_path.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/svn/cl.h subversion/svn/filesize.c subversion/tests/svn_test.h + subversion/tests/cmdline/atomic-ra-revprop-change.lo: subversion/tests/cmdline/atomic-ra-revprop-change.c subversion/include/private/svn_debug.h subversion/include/private/svn_skel.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/svn_private_config.h -subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/sv n_private_config.h +subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/include/svn_xml.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/li bsvn_wc/wc_db.h subversion/svn_private_config.h subversion/tests/cmdline/lock-helper.lo: subversion/tests/cmdline/lock-helper.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h diff --git a/contrib/subversion/build.conf b/contrib/subversion/build.conf index 1f0d2d8054a6..95875a7ebdb1 100644 --- a/contrib/subversion/build.conf +++ b/contrib/subversion/build.conf @@ -53,6 +53,7 @@ private-includes = subversion/libsvn_subr/utf8proc/utf8proc_internal.h subversion/libsvn_subr/utf8proc/utf8proc.c subversion/libsvn_subr/utf8proc/utf8proc_data.c + subversion/svn/filesize.c private-built-includes = subversion/svn_private_config.h subversion/libsvn_fs_fs/rep-cache-db.h @@ -1338,6 +1339,18 @@ install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes +# ---------------------------------------------------------------------------- +# Tests for the client's internal functions + +[filesize-test] +description = Test conversion of file sizes to human-readable form +type = exe +path = subversion/tests/client +sources = filesize-test.c +install = test +libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr +msvc-force-static = yes + # ---------------------------------------------------------------------------- # These are not unit tests at all, they are small programs that exercise # parts of the libsvn_delta API from the command line. They are stuck here @@ -1565,7 +1578,7 @@ libs = __ALL__ checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test packed-data-test path-test prefix-string-test priority-queue-test root-pools-test stream-test - string-test time-test utf-test bit-array-test + string-test time-test utf-test bit-array-test filesize-test error-test error-code-test cache-test spillbuf-test crypto-test revision-test subst_translate-test io-test diff --git a/contrib/subversion/configure b/contrib/subversion/configure index 4666c5d0c5fd..76cad5a00cd3 100755 --- a/contrib/subversion/configure +++ b/contrib/subversion/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.14.0. +# Generated by GNU Autoconf 2.69 for subversion 1.14.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.14.0' -PACKAGE_STRING='subversion 1.14.0' +PACKAGE_VERSION='1.14.1' +PACKAGE_STRING='subversion 1.14.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -1504,7 +1504,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.14.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.14.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1570,7 +1570,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.14.0:";; + short | recursive ) echo "Configuration of subversion 1.14.1:";; esac cat <<\_ACEOF @@ -1826,7 +1826,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.14.0 +subversion configure 1.14.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2370,7 +2370,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.14.0, which was +It was created by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2750,8 +2750,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.14.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.14.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -4773,7 +4773,7 @@ fi # ==== Libraries, for which we may have source to build ====================== -APR_VER_REGEXES="1\.[5-9]\. 2\." +APR_VER_REGEXES="1\.[4-9]\. 2\." APR_WANTED_REGEXES="$APR_VER_REGEXES" @@ -24462,46 +24462,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25093,46 +25099,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25724,46 +25736,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -26358,46 +26376,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -28361,7 +28385,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.14.0, which was +This file was extended by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28427,7 +28451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.14.0 +subversion config.status 1.14.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/subversion/configure.ac b/contrib/subversion/configure.ac index 07103e550a81..42a9f14e8fb5 100644 --- a/contrib/subversion/configure.ac +++ b/contrib/subversion/configure.ac @@ -91,7 +91,7 @@ AC_SUBST([MKDIR]) dnl verify apr version and set apr flags dnl These regular expressions should not contain "\(" and "\)". -APR_VER_REGEXES=["1\.[5-9]\. 2\."] +APR_VER_REGEXES=["1\.[4-9]\. 2\."] SVN_LIB_APR($APR_VER_REGEXES) diff --git a/contrib/subversion/gen-make.py b/contrib/subversion/gen-make.py index bdb359394e1c..5811705322cc 100755 --- a/contrib/subversion/gen-make.py +++ b/contrib/subversion/gen-make.py @@ -70,7 +70,7 @@ def main(fname, gentype, verfname=None, if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): - sorted_targets = list(target_dict.keys()); sorted_targets.sort() + sorted_targets = sorted(target_dict.keys(), key=str) for target in sorted_targets: print(dep_type + ": " + _objinfo(target)) for source in target_dict[target]: diff --git a/contrib/subversion/subversion/include/private/svn_dep_compat.h b/contrib/subversion/subversion/include/private/svn_dep_compat.h index 7e6603826135..9a2e49a19cba 100644 --- a/contrib/subversion/subversion/include/private/svn_dep_compat.h +++ b/contrib/subversion/subversion/include/private/svn_dep_compat.h @@ -29,6 +29,7 @@ #define SVN_DEP_COMPAT_H #include +#include #ifdef __cplusplus extern "C" { @@ -193,6 +194,16 @@ extern "C" { ((major*1000000 + minor*1000 + patch) <= SVN_SQLITE_MIN_VERSION_NUMBER) #endif /* SQLITE_VERSION_AT_LEAST */ +/** + * Support for 'apr_escape_shell() which was introduced in APR 1.5. + */ +#if !APR_VERSION_AT_LEAST(1,5,0) +/* from apr_escape.h */ +#define APR_ESCAPE_STRING (-1) +APR_DECLARE(apr_status_t) apr_escape_shell(char *escaped, const char *str, + apr_ssize_t slen, apr_size_t *len); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/contrib/subversion/subversion/include/private/svn_sorts_private.h b/contrib/subversion/subversion/include/private/svn_sorts_private.h index d0fddc0c6488..d11ebbe1a992 100644 --- a/contrib/subversion/subversion/include/private/svn_sorts_private.h +++ b/contrib/subversion/subversion/include/private/svn_sorts_private.h @@ -80,7 +80,7 @@ svn_sort__array(apr_array_header_t *array, int (*comparison_func)(const void *, const void *)); -/* Return the lowest index at which the element @a *key should be inserted into +/** Return the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -93,7 +93,7 @@ svn_sort__bsearch_lower_bound(const apr_array_header_t *array, const void *key, int (*compare_func)(const void *, const void *)); -/* Find the lowest index at which the element @a *key should be inserted into +/** Find the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -116,7 +116,7 @@ svn_sort__array_lookup(const apr_array_header_t *array, int (*compare_func)(const void *, const void *)); -/* Insert a shallow copy of @a *new_element into the array @a array at the index +/** Insert a shallow copy of @a *new_element into the array @a array at the index * @a insert_index, growing the array and shuffling existing elements along to * make room. * @@ -131,7 +131,7 @@ svn_sort__array_insert2(apr_array_header_t *array, int insert_index); -/* Remove @a elements_to_delete elements starting at @a delete_index from the +/** Remove @a elements_to_delete elements starting at @a delete_index from the * array @a arr. * * Raise an error if the indexes to delete extends outside the array bounds @@ -144,7 +144,7 @@ svn_sort__array_delete2(apr_array_header_t *arr, int delete_index, int elements_to_delete); -/* Reverse the order of elements in @a array, in place. +/** Reverse the order of elements in @a array, in place. * * @note Private. For use by Subversion's own code only. */ diff --git a/contrib/subversion/subversion/include/svn_ra.h b/contrib/subversion/subversion/include/svn_ra.h index 4c71520dd1ff..d534ab70caa1 100644 --- a/contrib/subversion/subversion/include/svn_ra.h +++ b/contrib/subversion/subversion/include/svn_ra.h @@ -2244,7 +2244,7 @@ svn_ra_has_capability(svn_ra_session_t *session, /** * The capability of a server to automatically remove transaction - * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX. + * properties prefixed with #SVN_PROP_TXN_PREFIX. * * @since New in 1.8. */ diff --git a/contrib/subversion/subversion/include/svn_types.h b/contrib/subversion/subversion/include/svn_types.h index 418d6ac9cc84..d9f98f23150a 100644 --- a/contrib/subversion/subversion/include/svn_types.h +++ b/contrib/subversion/subversion/include/svn_types.h @@ -248,6 +248,35 @@ typedef struct svn_version_t svn_version_t; /** @} */ + +/** @defgroup apr_hash_utilities APR Hash Table Helpers + * These functions enable the caller to dereference an APR hash table index + * without type casts or temporary variables. + * + * These functions are provided by APR itself from version 1.5. + * Definitions are provided here for when using older versions of APR. + * @{ + */ + +#if !APR_VERSION_AT_LEAST(1, 5, 0) + +/** Return the key of the hash table entry indexed by @a hi. */ +const void * +apr_hash_this_key(apr_hash_index_t *hi); + +/** Return the key length of the hash table entry indexed by @a hi. */ +apr_ssize_t +apr_hash_this_key_len(apr_hash_index_t *hi); + +/** Return the value of the hash table entry indexed by @a hi. */ +void * +apr_hash_this_val(apr_hash_index_t *hi); + +#endif + +/** @} */ + + /** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of * invalid-pathname error but not ERROR_INVALID_NAME, so we include it. diff --git a/contrib/subversion/subversion/include/svn_version.h b/contrib/subversion/subversion/include/svn_version.h index 25bbe542df5b..69e886cc5437 100644 --- a/contrib/subversion/subversion/include/svn_version.h +++ b/contrib/subversion/subversion/include/svn_version.h @@ -70,7 +70,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 1 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -93,7 +93,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1876290)" +#define SVN_VER_TAG " (r1886195)" /** Number tag: a string describing the version. @@ -117,7 +117,7 @@ extern "C" { * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1876290 +#define SVN_VER_REVISION 1886195 /* Version strings composed from the above definitions. */ diff --git a/contrib/subversion/subversion/libsvn_client/merge.c b/contrib/subversion/subversion/libsvn_client/merge.c index 9d9a1c300a10..e535647d8649 100644 --- a/contrib/subversion/subversion/libsvn_client/merge.c +++ b/contrib/subversion/subversion/libsvn_client/merge.c @@ -264,7 +264,7 @@ typedef struct merge_cmd_baton_t { /* Reference to the one-and-only CHILDREN_WITH_MERGEINFO (see global comment) or a similar list for single-file-merges */ - const apr_array_header_t *children_with_mergeinfo; *** 828 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:05:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9145B54C544; Thu, 18 Feb 2021 20:05: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 4DhQgC3ZPlz3QWw; Thu, 18 Feb 2021 20:05: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 6D3A21E90D; Thu, 18 Feb 2021 20:05: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 11IK5R6O005990; Thu, 18 Feb 2021 20:05:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IK5RZH005989; Thu, 18 Feb 2021 20:05:27 GMT (envelope-from git) Date: Thu, 18 Feb 2021 20:05:27 GMT Message-Id: <202102182005.11IK5RZH005989@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: b6f78045a61e - stable/12 - Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: 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: b6f78045a61e2c1b86b08cb4eb57aa9ee8d79f0d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:05:27 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b6f78045a61e2c1b86b08cb4eb57aa9ee8d79f0d commit b6f78045a61e2c1b86b08cb4eb57aa9ee8d79f0d Author: Dimitry Andric AuthorDate: 2021-02-13 13:38:51 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 20:03:49 +0000 Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: https://subversion.apache.org/docs/release-notes/1.14 NOTE 1: There is no need to dump and reload repositories, and the working copy format is still the same as Subversion 1.8 through 1.13. NOTE 2: The upstream release also contains a fix for a security issue in mod_dav_svn (CVE-2020-17525), but since we do not build or use any Apache modules, it is not an issue for the FreeBSD base system. Relnotes: yes (cherry-picked from 0ff1014944897f4f3ffa4462406cdee920b53400) --- contrib/subversion/.editorconfig | 1 + contrib/subversion/.swig_pl_checked | 0 contrib/subversion/.swig_py_checked | 0 contrib/subversion/.swig_rb_checked | 0 contrib/subversion/CHANGES | 68 +++++- contrib/subversion/INSTALL | 12 +- contrib/subversion/NOTICE | 2 +- contrib/subversion/autogen.sh | 4 +- contrib/subversion/build-outputs.mk | 29 ++- contrib/subversion/build.conf | 15 +- contrib/subversion/configure | 240 +++++++++++---------- contrib/subversion/configure.ac | 2 +- contrib/subversion/gen-make.py | 2 +- .../subversion/include/private/svn_dep_compat.h | 11 + .../subversion/include/private/svn_sorts_private.h | 10 +- contrib/subversion/subversion/include/svn_ra.h | 2 +- contrib/subversion/subversion/include/svn_types.h | 29 +++ .../subversion/subversion/include/svn_version.h | 6 +- .../subversion/subversion/libsvn_client/merge.c | 40 +++- .../subversion/libsvn_client/mergeinfo.h | 2 - contrib/subversion/subversion/libsvn_client/mtcc.c | 3 +- contrib/subversion/subversion/libsvn_fs_fs/index.c | 2 +- contrib/subversion/subversion/libsvn_repos/authz.c | 31 ++- .../subversion/libsvn_repos/config_file.c | 4 + .../subversion/subversion/libsvn_subr/apr_escape.c | 135 ++++++++++++ .../subversion/subversion/libsvn_subr/cmdline.c | 101 +++++++-- contrib/subversion/subversion/libsvn_subr/iter.c | 26 +++ contrib/subversion/subversion/libsvn_subr/opt.c | 2 +- .../subversion/subversion/libsvn_subr/version.c | 2 +- .../subversion/subversion/libsvn_wc/wc-metadata.h | 2 +- .../subversion/libsvn_wc/wc-metadata.sql | 2 +- .../subversion/subversion/libsvn_wc/wc-queries.h | 2 +- contrib/subversion/subversion/svn/cl-conflicts.c | 6 +- contrib/subversion/subversion/svn/filesize.c | 57 +++-- contrib/subversion/win-tests.py | 11 +- usr.bin/svn/lib/libsvn_subr/Makefile | 1 + usr.bin/svn/svn_private_config.h | 4 +- 37 files changed, 668 insertions(+), 198 deletions(-) diff --git a/contrib/subversion/.editorconfig b/contrib/subversion/.editorconfig index 13868c63e3f8..b000de12aff1 100644 --- a/contrib/subversion/.editorconfig +++ b/contrib/subversion/.editorconfig @@ -10,6 +10,7 @@ trim_trailing_whitespace = false [**/Makefile*] indent_style = tab +indent_size = 8 [build-outputs.mk] indent_style = tab diff --git a/contrib/subversion/.swig_pl_checked b/contrib/subversion/.swig_pl_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_py_checked b/contrib/subversion/.swig_py_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_rb_checked b/contrib/subversion/.swig_rb_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/CHANGES b/contrib/subversion/CHANGES index 08398a98ac8b..656b1898d7d0 100644 --- a/contrib/subversion/CHANGES +++ b/contrib/subversion/CHANGES @@ -4,8 +4,51 @@ # To view an issue listed as (issue #XXXX), visit: # https://subversion.apache.org/issue-XXXX +Version 1.14.1 +(10 Feb 2021, from /branches/1.14.x) + User-visible changes: + - Client-side improvements and bugfixes: + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Do not suggest --help -v for commands which do not support -v (r1882157) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix problems in human-readable file size formatting (r1878909, -18, -50) + * Improve an error message from svnmucc (r1877072) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + * Fix filename encoding/quoting when invoking editor on Windows (r1885953) + * Convert filename for editor from UTF-8 to the locale's encoding (r1882234) + + - Server-side improvements and bugfixes: + * Fix authz doesn't combine global and repository rules (issue #4762) + * Make the hot-backup.py script work with Python 3 (r1878855, r1878859) + * Fix an uninitialized read in FSFS (r1880374) + * Make mailer.py work properly with Python 3 (r1884427 et al) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + - General: + * Restore support for building with APR 1.4 (r1881958, r1882128) + * Rewrite internal test data to avoid literal trailing spaces (r1875675) + * Remove use of os.dup2() from tests for Python 3.6 on Windows (r1883337) + * Note in INSTALL that non-release mode is required for Python 2 (r1877960) + * Make gen-make.py --debug work with Python 3 (r1876906) + * Make test suite run correctly with Python 3 on Windows (r1876707 et al) + * Fix compilation errors with Visual Studio 2008 (r1877259) + * Use Doxygen comment leader for comments with doxygen syntax (r1877794) + - Bindings: + * Fix win-tests.py to load Python 3 bindings with debug config (r1884642) + * Fix C4204 errors building swig-py with Python 3.9 on Windows (r1883570) + * Fix unable to load *.pyd files with Python 3.8.x on Windows (r1883335) + * Add SWIG4 support for SWIG Python binding on Windows (r1877338) + * Fix incorrect cache in JavaHL SVNBase::createCppBoundObject (r1882115) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * autogen.sh: Remove .swig_*_checked files from release tarballs (r1878413) + * Avoid version check for Python if --without-swig is used (r1876662) + * siwg-py: Fix a syntax error for Python 3.6 and later (r1885112) + * Fix several crashes and JNI warnings in javahl TunnelAgent (r1886029) + Version 1.14.0 -(6 May 2020, from /branches/1.14.x) +(27 May 2020, from /branches/1.14.x) https://svn.apache.org/repos/asf/subversion/tags/1.14.0 User-visible changes: @@ -222,6 +265,29 @@ http://svn.apache.org/repos/asf/subversion/tags/1.11.0 * Fix a potential crash in JavaHL (issue #4764) +Version 1.10.7 +(10 Feb 2021, from /branches/1.10.x) + User-visible changes: + - Client-side bugfixes: + * Fix 'svn patch' setting mode 0600 on patched files with props (r1864440) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix a crash seen when using git-svn with kwallet (r1875680) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + + - Server-side bugfixes: + * mod_dav_svn: install cleanup handler for FS warning logging (r1865266) + * mod_dav_svn: Fix missing Last-Modified header on 'external' GET requests (r1866425) + * Fix formatting type size mismatches in FSFS (r1865987, -8) + * Fix an undefined behavior problem in FSFS caching code (r1876054) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + * Fix Requires(.private) fields in pkg-config files (r1863987, -90) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * Fix an EOL issue in tests on Windows (r1881985 et al) + Version 1.10.6 (24 Jul 2019, from /branches/1.10.x) https://svn.apache.org/repos/asf/subversion/tags/1.10.6 diff --git a/contrib/subversion/INSTALL b/contrib/subversion/INSTALL index 64f821a31057..44a916b4ac49 100644 --- a/contrib/subversion/INSTALL +++ b/contrib/subversion/INSTALL @@ -3,7 +3,7 @@ A Quick Guide ====================================== -$LastChangedDate: 2020-02-17 03:49:42 +0000 (Mon, 17 Feb 2020) $ +$LastChangedDate: 2020-12-18 04:00:24 +0000 (Fri, 18 Dec 2020) $ Contents: @@ -206,7 +206,7 @@ I. INTRODUCTION commands described in section II.B before installing the following. - 1. Apache Portable Runtime 1.5 or newer (REQUIRED) + 1. Apache Portable Runtime 1.4 or newer (REQUIRED) Whenever you want to build any part of Subversion, you need the Apache Portable Runtime (APR) and the APR Utility (APR-util) @@ -506,6 +506,12 @@ I. INTRODUCTION reached end of life. All users are strongly encouraged to move to Python 3. + Note: If you are using a Subversion distribution tarball and want + to build the Python bindings for Python 2, you should rebuild + the build environment in non-release mode by running + 'sh autogen.sh' before running the ./configure script; see + section II.B for more about autogen.sh. + 13. Perl 5.8 or newer (Windows only) (OPTIONAL) @@ -832,7 +838,7 @@ II. INSTALLATION needed to compile Apache. Note that this is the actual awk program, not an installer - just rename it to awk.exe and it is ready to use. * Apache apr, apr-util, and optionally apr-iconv libraries, version - 1.5 or later (1.2 for apr-iconv). If you are building from a Subversion + 1.4 or later (1.2 for apr-iconv). If you are building from a Subversion checkout and have not downloaded Apache 2, then get these 3 libraries from https://www.apache.org/dist/apr/. * SQLite 3.8.2 or higher from https://www.sqlite.org/download.html diff --git a/contrib/subversion/NOTICE b/contrib/subversion/NOTICE index a3e794d536e7..84d77667c40d 100644 --- a/contrib/subversion/NOTICE +++ b/contrib/subversion/NOTICE @@ -1,5 +1,5 @@ Apache Subversion -Copyright 2020 The Apache Software Foundation +Copyright 2021 The Apache Software Foundation This product includes software developed by many people, and distributed under Contributor License Agreements to The Apache Software Foundation diff --git a/contrib/subversion/autogen.sh b/contrib/subversion/autogen.sh index 84a6e2ca33cc..6579daa9e415 100755 --- a/contrib/subversion/autogen.sh +++ b/contrib/subversion/autogen.sh @@ -178,8 +178,8 @@ if test -n "$RELEASE_MODE"; then # Build the SWIG-related files make -f autogen-standalone.mk autogen-swig || gen_failed=1 - # Remove the .swig_checked file - rm -f .swig_checked + # Remove the .swig_*checked files + rm -f .swig_checked .swig_pl_checked .swig_py_checked .swig_rb_checked fi if test -n "$SKIP_DEPS"; then diff --git a/contrib/subversion/build-outputs.mk b/contrib/subversion/build-outputs.mk index aee265351a80..3f7ac1a100f8 100644 --- a/contrib/subversion/build-outputs.mk +++ b/contrib/subversion/build-outputs.mk @@ -23,21 +23,21 @@ RA_SERF_LINK = ../../subversion/libsvn_ra_serf/libsvn_ra_serf-1.la ../../subvers RA_SVN_DEPS = subversion/libsvn_ra_svn/libsvn_ra_svn-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la RA_SVN_LINK = ../../subversion/libsvn_ra_svn/libsvn_ra_svn-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subversion/libsvn_auth_gnome _keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subversion/tests/libsvn_ra_loc al subversion/tests/libsvn_ra subversion/tes! ts/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy +BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/client subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subv ersion/libsvn_auth_gnome_keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subver sion/tests/libsvn_ra_local subversion/tests/! libsvn_ra subversion/tests/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy BDB_TEST_DEPS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) BDB_TEST_PROGRAMS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) -TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) s ubversion/tests/libsvn_subr/prefix-string-te! st$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/ libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subvers ion/tests/cmdline/dav_tests.py subversion/te! sts/cmdli! ne/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/ cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_t ests.py subversion/tests/cmdline/trans_tests! .py subve! rsion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) su bversion/tests/libsvn_subr/path-test$(EXEEXT! ) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta /svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subv! ersion/te! sts/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversio n/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnver sion_tests.py subversion/tests/cmdline/switc! h_tests.p! y subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py -TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) sub version/tests/libsvn_ra/ra-test$(EXEEXT) sub! version/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_su br/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline /log_tests.py subversion/tests/cmdline/merge! _authz_te! sts.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndum pfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/t ests/libsvn_ra_local/ra-local-test$(EXEEXT) ! subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_sub r/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests /cmdline/lock_tests.py subversion/tests/cmdl! ine/log_t! ests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/sv nauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py check-deps test-deps: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) MANPAGES = subversion/svn/svn.1 subversion/svnadmin/svnadmin.1 subversion/svndumpfilter/svndumpfilter.1 subversion/svnlook/svnlook.1 subversion/svnmucc/svnmucc.1 subversion/svnrdump/svnrdump.1 subversion/svnserve/svnserve.8 subversion/svnserve/svnserve.conf.5 subversion/svnsync/svnsync.1 subversion/svnversion/svnversion.1 -CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subver sion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree_conflict_tests.pyc subversion/tests/cmdline/me rgeinfo_tests.pyc subversion/tests/cmdline/m! od_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/cmdline/svnrdump_tests.pyc subversion/tests/cmdl ine/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEX T) subversion/tests/libsvn_fs/locks-test$(EX! EEXT) sub! version/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEX T) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/test s/libsvn_subr/string-test$(EXEEXT) subversio! n/tests/l! ibsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconfl ict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) +CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subversion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree _conflict_tests.pyc subversion/tests/cmdline! /mergeinfo_tests.pyc subversion/tests/cmdline/mod_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/c mdline/svnrdump_tests.pyc subversion/tests/cmdline/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EX EEXT) subversion/tests/libsvn_fs/fs-test$(EX! EEXT) sub! version/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) su bversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/l ibsvn_subr/stream-test$(EXEEXT) subversion/t! ests/libs! vn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) t ools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) EXTRACLEAN_FILES = subversion/libsvn_fs_fs/rep-cache-db.h subversion/libsvn_fs_x/rep-cache-db.h subversion/libsvn_subr/internal_statements.h subversion/libsvn_wc/wc-queries.h subversion/tests/libsvn_wc/wc-test-queries.h \ $(abs_builddir)/subversion/libsvn_subr/errorcode.inc \ $(abs_builddir)/subversion/libsvn_subr/config_keys.inc \ @@ -285,6 +285,12 @@ error_test_OBJECTS = error-test.lo subversion/tests/libsvn_subr/error-test$(EXEEXT): $(error_test_DEPS) cd subversion/tests/libsvn_subr && $(LINK) $(error_test_LDFLAGS) -o error-test$(EXEEXT) $(error_test_OBJECTS) ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) +filesize_test_PATH = subversion/tests/client +filesize_test_DEPS = subversion/tests/client/filesize-test.lo subversion/libsvn_client/libsvn_client-1.la subversion/tests/libsvn_test-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_subr/libsvn_subr-1.la +filesize_test_OBJECTS = filesize-test.lo +subversion/tests/client/filesize-test$(EXEEXT): $(filesize_test_DEPS) + cd subversion/tests/client && $(LINK) $(filesize_test_LDFLAGS) -o filesize-test$(EXEEXT) $(filesize_test_OBJECTS) ../../../subversion/libsvn_client/libsvn_client-1.la ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_wc/libsvn_wc-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) + fs_base_test_PATH = subversion/tests/libsvn_fs_base fs_base_test_DEPS = subversion/tests/libsvn_fs_base/fs-base-test.lo subversion/tests/libsvn_test-1.la subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_fs_base/libsvn_fs_base-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_fs_util/libsvn_fs_util-1.la subversion/libsvn_subr/libsvn_subr-1.la fs_base_test_OBJECTS = fs-base-test.lo @@ -518,8 +524,8 @@ subversion/libsvn_repos/libsvn_repos-1.la: $(libsvn_repos_DEPS) cd subversion/libsvn_repos && $(LINK_LIB) $(libsvn_repos_LDFLAGS) -o libsvn_repos-1.la $(LT_NO_UNDEFINED) $(libsvn_repos_OBJECTS) ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) libsvn_subr_PATH = subversion/libsvn_subr -libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/libsvn_subr/dso.lo subversion/libsvn_s ubr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subversion/libsvn_subr/sorts.lo subversion /libsvn_subr/spillbuf.lo subversion/libsvn_s! ubr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subversion/libsvn_subr/x509parse.lo subver sion/libsvn_subr/xml.lo -libsvn_subr_OBJECTS = adler32.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo validate.lo versi on.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo +libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/apr_escape.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/l ibsvn_subr/dso.lo subversion/libsvn_subr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subve rsion/libsvn_subr/sorts.lo subversion/libsvn! _subr/spillbuf.lo subversion/libsvn_subr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subve rsion/libsvn_subr/x509parse.lo subversion/libsvn_subr/xml.lo +libsvn_subr_OBJECTS = adler32.lo apr_escape.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo val idate.lo version.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo subversion/libsvn_subr/libsvn_subr-1.la: $(libsvn_subr_DEPS) cd subversion/libsvn_subr && $(LINK_LIB) $(libsvn_subr_LDFLAGS) -o libsvn_subr-1.la $(LT_NO_UNDEFINED) $(libsvn_subr_OBJECTS) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(SVN_XML_LIBS) $(SVN_ZLIB_LIBS) $(SVN_APR_MEMCACHE_LIBS) $(SVN_SQLITE_LIBS) $(SVN_MAGIC_LIBS) $(SVN_INTL_LIBS) $(SVN_LZ4_LIBS) $(SVN_UTF8PROC_LIBS) $(SVN_MACOS_PLIST_LIBS) $(SVN_MACOS_KEYCHAIN_LIBS) $(LIBS) @@ -1152,7 +1158,7 @@ swig-rb: subversion/bindings/swig/ruby/client.la subversion/bindings/swig/ruby/c swig-rb-lib: subversion/bindings/swig/ruby/libsvn_swig_ruby/libsvn_swig_ruby-1.la -test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libs vn_subr/path-test$(EXEEXT) subversion/tests/! libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/l ibsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) +test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff /parse-diff-test$(EXEEXT) subversion/tests/l! ibsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn _delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) tools: tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/server-side/mod_dontdothat/mod_dontdothat.la tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/x509-parser$(EXEEXT) @@ -1496,6 +1502,7 @@ entries-compat-test: subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) entries-dump: subversion/tests/cmdline/entries-dump$(EXEEXT) error-code-test: subversion/tests/libsvn_subr/error-code-test$(EXEEXT) error-test: subversion/tests/libsvn_subr/error-test$(EXEEXT) +filesize-test: subversion/tests/client/filesize-test$(EXEEXT) fs-base-test: subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) fs-fs-fuzzy-test: subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) fs-fs-pack-test: subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) @@ -2890,6 +2897,8 @@ subversion/libsvn_repos/rev_hunt.lo: subversion/libsvn_repos/rev_hunt.c subversi subversion/libsvn_subr/adler32.lo: subversion/libsvn_subr/adler32.c subversion/include/private/svn_adler32.h +subversion/libsvn_subr/apr_escape.lo: subversion/libsvn_subr/apr_escape.c subversion/include/private/svn_dep_compat.h + subversion/libsvn_subr/atomic.lo: subversion/libsvn_subr/atomic.c subversion/include/private/svn_atomic.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_mutex.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_pools.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/auth.lo: subversion/libsvn_subr/auth.c subversion/include/private/svn_auth_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_version.h subversion/libsvn_subr/auth.h subversion/svn_private_config.h @@ -2912,7 +2921,7 @@ subversion/libsvn_subr/cache_config.lo: subversion/libsvn_subr/cache_config.c su subversion/libsvn_subr/checksum.lo: subversion/libsvn_subr/checksum.c subversion/include/private/svn_debug.h subversion/include/private/svn_subr_private.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/checksum.h subversion/libsvn_subr/fnv1a.h subversion/svn_private_config.h -subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_utf.h subvers ion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h +subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types _impl.h subversion/include/svn_utf.h subversion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h subversion/libsvn_subr/compat.lo: subversion/libsvn_subr/compat.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_compat.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h @@ -3402,9 +3411,11 @@ subversion/tests/afl/afl-svndiff.lo: subversion/tests/afl/afl-svndiff.c subversi subversion/tests/afl/afl-x509.lo: subversion/tests/afl/afl-x509.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_x509.h +subversion/tests/client/filesize-test.lo: subversion/tests/client/filesize-test.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_path.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/svn/cl.h subversion/svn/filesize.c subversion/tests/svn_test.h + subversion/tests/cmdline/atomic-ra-revprop-change.lo: subversion/tests/cmdline/atomic-ra-revprop-change.c subversion/include/private/svn_debug.h subversion/include/private/svn_skel.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/svn_private_config.h -subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/sv n_private_config.h +subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/include/svn_xml.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/li bsvn_wc/wc_db.h subversion/svn_private_config.h subversion/tests/cmdline/lock-helper.lo: subversion/tests/cmdline/lock-helper.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h diff --git a/contrib/subversion/build.conf b/contrib/subversion/build.conf index 1f0d2d8054a6..95875a7ebdb1 100644 --- a/contrib/subversion/build.conf +++ b/contrib/subversion/build.conf @@ -53,6 +53,7 @@ private-includes = subversion/libsvn_subr/utf8proc/utf8proc_internal.h subversion/libsvn_subr/utf8proc/utf8proc.c subversion/libsvn_subr/utf8proc/utf8proc_data.c + subversion/svn/filesize.c private-built-includes = subversion/svn_private_config.h subversion/libsvn_fs_fs/rep-cache-db.h @@ -1338,6 +1339,18 @@ install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes +# ---------------------------------------------------------------------------- +# Tests for the client's internal functions + +[filesize-test] +description = Test conversion of file sizes to human-readable form +type = exe +path = subversion/tests/client +sources = filesize-test.c +install = test +libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr +msvc-force-static = yes + # ---------------------------------------------------------------------------- # These are not unit tests at all, they are small programs that exercise # parts of the libsvn_delta API from the command line. They are stuck here @@ -1565,7 +1578,7 @@ libs = __ALL__ checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test packed-data-test path-test prefix-string-test priority-queue-test root-pools-test stream-test - string-test time-test utf-test bit-array-test + string-test time-test utf-test bit-array-test filesize-test error-test error-code-test cache-test spillbuf-test crypto-test revision-test subst_translate-test io-test diff --git a/contrib/subversion/configure b/contrib/subversion/configure index 4666c5d0c5fd..76cad5a00cd3 100755 --- a/contrib/subversion/configure +++ b/contrib/subversion/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.14.0. +# Generated by GNU Autoconf 2.69 for subversion 1.14.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.14.0' -PACKAGE_STRING='subversion 1.14.0' +PACKAGE_VERSION='1.14.1' +PACKAGE_STRING='subversion 1.14.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -1504,7 +1504,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.14.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.14.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1570,7 +1570,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.14.0:";; + short | recursive ) echo "Configuration of subversion 1.14.1:";; esac cat <<\_ACEOF @@ -1826,7 +1826,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.14.0 +subversion configure 1.14.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2370,7 +2370,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.14.0, which was +It was created by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2750,8 +2750,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.14.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.14.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -4773,7 +4773,7 @@ fi # ==== Libraries, for which we may have source to build ====================== -APR_VER_REGEXES="1\.[5-9]\. 2\." +APR_VER_REGEXES="1\.[4-9]\. 2\." APR_WANTED_REGEXES="$APR_VER_REGEXES" @@ -24462,46 +24462,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25093,46 +25099,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25724,46 +25736,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -26358,46 +26376,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -28361,7 +28385,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.14.0, which was +This file was extended by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28427,7 +28451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.14.0 +subversion config.status 1.14.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/subversion/configure.ac b/contrib/subversion/configure.ac index 07103e550a81..42a9f14e8fb5 100644 --- a/contrib/subversion/configure.ac +++ b/contrib/subversion/configure.ac @@ -91,7 +91,7 @@ AC_SUBST([MKDIR]) dnl verify apr version and set apr flags dnl These regular expressions should not contain "\(" and "\)". -APR_VER_REGEXES=["1\.[5-9]\. 2\."] +APR_VER_REGEXES=["1\.[4-9]\. 2\."] SVN_LIB_APR($APR_VER_REGEXES) diff --git a/contrib/subversion/gen-make.py b/contrib/subversion/gen-make.py index bdb359394e1c..5811705322cc 100755 --- a/contrib/subversion/gen-make.py +++ b/contrib/subversion/gen-make.py @@ -70,7 +70,7 @@ def main(fname, gentype, verfname=None, if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): - sorted_targets = list(target_dict.keys()); sorted_targets.sort() + sorted_targets = sorted(target_dict.keys(), key=str) for target in sorted_targets: print(dep_type + ": " + _objinfo(target)) for source in target_dict[target]: diff --git a/contrib/subversion/subversion/include/private/svn_dep_compat.h b/contrib/subversion/subversion/include/private/svn_dep_compat.h index 7e6603826135..9a2e49a19cba 100644 --- a/contrib/subversion/subversion/include/private/svn_dep_compat.h +++ b/contrib/subversion/subversion/include/private/svn_dep_compat.h @@ -29,6 +29,7 @@ #define SVN_DEP_COMPAT_H #include +#include #ifdef __cplusplus extern "C" { @@ -193,6 +194,16 @@ extern "C" { ((major*1000000 + minor*1000 + patch) <= SVN_SQLITE_MIN_VERSION_NUMBER) #endif /* SQLITE_VERSION_AT_LEAST */ +/** + * Support for 'apr_escape_shell() which was introduced in APR 1.5. + */ +#if !APR_VERSION_AT_LEAST(1,5,0) +/* from apr_escape.h */ +#define APR_ESCAPE_STRING (-1) +APR_DECLARE(apr_status_t) apr_escape_shell(char *escaped, const char *str, + apr_ssize_t slen, apr_size_t *len); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/contrib/subversion/subversion/include/private/svn_sorts_private.h b/contrib/subversion/subversion/include/private/svn_sorts_private.h index d0fddc0c6488..d11ebbe1a992 100644 --- a/contrib/subversion/subversion/include/private/svn_sorts_private.h +++ b/contrib/subversion/subversion/include/private/svn_sorts_private.h @@ -80,7 +80,7 @@ svn_sort__array(apr_array_header_t *array, int (*comparison_func)(const void *, const void *)); -/* Return the lowest index at which the element @a *key should be inserted into +/** Return the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -93,7 +93,7 @@ svn_sort__bsearch_lower_bound(const apr_array_header_t *array, const void *key, int (*compare_func)(const void *, const void *)); -/* Find the lowest index at which the element @a *key should be inserted into +/** Find the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -116,7 +116,7 @@ svn_sort__array_lookup(const apr_array_header_t *array, int (*compare_func)(const void *, const void *)); -/* Insert a shallow copy of @a *new_element into the array @a array at the index +/** Insert a shallow copy of @a *new_element into the array @a array at the index * @a insert_index, growing the array and shuffling existing elements along to * make room. * @@ -131,7 +131,7 @@ svn_sort__array_insert2(apr_array_header_t *array, int insert_index); -/* Remove @a elements_to_delete elements starting at @a delete_index from the +/** Remove @a elements_to_delete elements starting at @a delete_index from the * array @a arr. * * Raise an error if the indexes to delete extends outside the array bounds @@ -144,7 +144,7 @@ svn_sort__array_delete2(apr_array_header_t *arr, int delete_index, int elements_to_delete); -/* Reverse the order of elements in @a array, in place. +/** Reverse the order of elements in @a array, in place. * * @note Private. For use by Subversion's own code only. */ diff --git a/contrib/subversion/subversion/include/svn_ra.h b/contrib/subversion/subversion/include/svn_ra.h index 4c71520dd1ff..d534ab70caa1 100644 --- a/contrib/subversion/subversion/include/svn_ra.h +++ b/contrib/subversion/subversion/include/svn_ra.h @@ -2244,7 +2244,7 @@ svn_ra_has_capability(svn_ra_session_t *session, /** * The capability of a server to automatically remove transaction - * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX. + * properties prefixed with #SVN_PROP_TXN_PREFIX. * * @since New in 1.8. */ diff --git a/contrib/subversion/subversion/include/svn_types.h b/contrib/subversion/subversion/include/svn_types.h index 418d6ac9cc84..d9f98f23150a 100644 --- a/contrib/subversion/subversion/include/svn_types.h +++ b/contrib/subversion/subversion/include/svn_types.h @@ -248,6 +248,35 @@ typedef struct svn_version_t svn_version_t; /** @} */ + +/** @defgroup apr_hash_utilities APR Hash Table Helpers + * These functions enable the caller to dereference an APR hash table index + * without type casts or temporary variables. + * + * These functions are provided by APR itself from version 1.5. + * Definitions are provided here for when using older versions of APR. + * @{ + */ + +#if !APR_VERSION_AT_LEAST(1, 5, 0) + +/** Return the key of the hash table entry indexed by @a hi. */ +const void * +apr_hash_this_key(apr_hash_index_t *hi); + +/** Return the key length of the hash table entry indexed by @a hi. */ +apr_ssize_t +apr_hash_this_key_len(apr_hash_index_t *hi); + +/** Return the value of the hash table entry indexed by @a hi. */ +void * +apr_hash_this_val(apr_hash_index_t *hi); + +#endif + +/** @} */ + + /** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of * invalid-pathname error but not ERROR_INVALID_NAME, so we include it. diff --git a/contrib/subversion/subversion/include/svn_version.h b/contrib/subversion/subversion/include/svn_version.h index 25bbe542df5b..69e886cc5437 100644 --- a/contrib/subversion/subversion/include/svn_version.h +++ b/contrib/subversion/subversion/include/svn_version.h @@ -70,7 +70,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 1 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -93,7 +93,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1876290)" +#define SVN_VER_TAG " (r1886195)" /** Number tag: a string describing the version. @@ -117,7 +117,7 @@ extern "C" { * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1876290 +#define SVN_VER_REVISION 1886195 /* Version strings composed from the above definitions. */ diff --git a/contrib/subversion/subversion/libsvn_client/merge.c b/contrib/subversion/subversion/libsvn_client/merge.c index 9d9a1c300a10..e535647d8649 100644 --- a/contrib/subversion/subversion/libsvn_client/merge.c +++ b/contrib/subversion/subversion/libsvn_client/merge.c @@ -264,7 +264,7 @@ typedef struct merge_cmd_baton_t { /* Reference to the one-and-only CHILDREN_WITH_MERGEINFO (see global comment) or a similar list for single-file-merges */ - const apr_array_header_t *children_with_mergeinfo; *** 828 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:06:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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 11BBC54C90D; Thu, 18 Feb 2021 20:06: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 4DhQh66vVbz3Qkj; Thu, 18 Feb 2021 20:06: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 DF3DB1E7B2; Thu, 18 Feb 2021 20:06: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 11IK6Exa006210; Thu, 18 Feb 2021 20:06:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IK6E64006209; Thu, 18 Feb 2021 20:06:14 GMT (envelope-from git) Date: Thu, 18 Feb 2021 20:06:14 GMT Message-Id: <202102182006.11IK6E64006209@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: 7799e59719e4 - stable/11 - Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: 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: 7799e59719e4c690e1f4f1d828443cd713181419 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:06:15 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=7799e59719e4c690e1f4f1d828443cd713181419 commit 7799e59719e4c690e1f4f1d828443cd713181419 Author: Dimitry Andric AuthorDate: 2021-02-13 13:38:51 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 18:18:50 +0000 Update Subversion to 1.14.1 LTS. See contrib/subversion/CHANGES for a summary of changes, or for a more thorough overview: https://subversion.apache.org/docs/release-notes/1.14 NOTE 1: There is no need to dump and reload repositories, and the working copy format is still the same as Subversion 1.8 through 1.13. NOTE 2: The upstream release also contains a fix for a security issue in mod_dav_svn (CVE-2020-17525), but since we do not build or use any Apache modules, it is not an issue for the FreeBSD base system. Relnotes: yes (cherry-picked from 0ff1014944897f4f3ffa4462406cdee920b53400) --- contrib/subversion/.editorconfig | 1 + contrib/subversion/.swig_pl_checked | 0 contrib/subversion/.swig_py_checked | 0 contrib/subversion/.swig_rb_checked | 0 contrib/subversion/CHANGES | 68 +++++- contrib/subversion/INSTALL | 12 +- contrib/subversion/NOTICE | 2 +- contrib/subversion/autogen.sh | 4 +- contrib/subversion/build-outputs.mk | 29 ++- contrib/subversion/build.conf | 15 +- contrib/subversion/configure | 240 +++++++++++---------- contrib/subversion/configure.ac | 2 +- contrib/subversion/gen-make.py | 2 +- .../subversion/include/private/svn_dep_compat.h | 11 + .../subversion/include/private/svn_sorts_private.h | 10 +- contrib/subversion/subversion/include/svn_ra.h | 2 +- contrib/subversion/subversion/include/svn_types.h | 29 +++ .../subversion/subversion/include/svn_version.h | 6 +- .../subversion/subversion/libsvn_client/merge.c | 40 +++- .../subversion/libsvn_client/mergeinfo.h | 2 - contrib/subversion/subversion/libsvn_client/mtcc.c | 3 +- contrib/subversion/subversion/libsvn_fs_fs/index.c | 2 +- contrib/subversion/subversion/libsvn_repos/authz.c | 31 ++- .../subversion/libsvn_repos/config_file.c | 4 + .../subversion/subversion/libsvn_subr/apr_escape.c | 135 ++++++++++++ .../subversion/subversion/libsvn_subr/cmdline.c | 101 +++++++-- contrib/subversion/subversion/libsvn_subr/iter.c | 26 +++ contrib/subversion/subversion/libsvn_subr/opt.c | 2 +- .../subversion/subversion/libsvn_subr/version.c | 2 +- .../subversion/subversion/libsvn_wc/wc-metadata.h | 2 +- .../subversion/libsvn_wc/wc-metadata.sql | 2 +- .../subversion/subversion/libsvn_wc/wc-queries.h | 2 +- contrib/subversion/subversion/svn/cl-conflicts.c | 6 +- contrib/subversion/subversion/svn/filesize.c | 57 +++-- contrib/subversion/win-tests.py | 11 +- usr.bin/svn/lib/libsvn_subr/Makefile | 1 + usr.bin/svn/svn_private_config.h | 4 +- 37 files changed, 668 insertions(+), 198 deletions(-) diff --git a/contrib/subversion/.editorconfig b/contrib/subversion/.editorconfig index 13868c63e3f8..b000de12aff1 100644 --- a/contrib/subversion/.editorconfig +++ b/contrib/subversion/.editorconfig @@ -10,6 +10,7 @@ trim_trailing_whitespace = false [**/Makefile*] indent_style = tab +indent_size = 8 [build-outputs.mk] indent_style = tab diff --git a/contrib/subversion/.swig_pl_checked b/contrib/subversion/.swig_pl_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_py_checked b/contrib/subversion/.swig_py_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/.swig_rb_checked b/contrib/subversion/.swig_rb_checked deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/contrib/subversion/CHANGES b/contrib/subversion/CHANGES index 08398a98ac8b..656b1898d7d0 100644 --- a/contrib/subversion/CHANGES +++ b/contrib/subversion/CHANGES @@ -4,8 +4,51 @@ # To view an issue listed as (issue #XXXX), visit: # https://subversion.apache.org/issue-XXXX +Version 1.14.1 +(10 Feb 2021, from /branches/1.14.x) + User-visible changes: + - Client-side improvements and bugfixes: + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Do not suggest --help -v for commands which do not support -v (r1882157) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix problems in human-readable file size formatting (r1878909, -18, -50) + * Improve an error message from svnmucc (r1877072) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + * Fix filename encoding/quoting when invoking editor on Windows (r1885953) + * Convert filename for editor from UTF-8 to the locale's encoding (r1882234) + + - Server-side improvements and bugfixes: + * Fix authz doesn't combine global and repository rules (issue #4762) + * Make the hot-backup.py script work with Python 3 (r1878855, r1878859) + * Fix an uninitialized read in FSFS (r1880374) + * Make mailer.py work properly with Python 3 (r1884427 et al) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + - General: + * Restore support for building with APR 1.4 (r1881958, r1882128) + * Rewrite internal test data to avoid literal trailing spaces (r1875675) + * Remove use of os.dup2() from tests for Python 3.6 on Windows (r1883337) + * Note in INSTALL that non-release mode is required for Python 2 (r1877960) + * Make gen-make.py --debug work with Python 3 (r1876906) + * Make test suite run correctly with Python 3 on Windows (r1876707 et al) + * Fix compilation errors with Visual Studio 2008 (r1877259) + * Use Doxygen comment leader for comments with doxygen syntax (r1877794) + - Bindings: + * Fix win-tests.py to load Python 3 bindings with debug config (r1884642) + * Fix C4204 errors building swig-py with Python 3.9 on Windows (r1883570) + * Fix unable to load *.pyd files with Python 3.8.x on Windows (r1883335) + * Add SWIG4 support for SWIG Python binding on Windows (r1877338) + * Fix incorrect cache in JavaHL SVNBase::createCppBoundObject (r1882115) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * autogen.sh: Remove .swig_*_checked files from release tarballs (r1878413) + * Avoid version check for Python if --without-swig is used (r1876662) + * siwg-py: Fix a syntax error for Python 3.6 and later (r1885112) + * Fix several crashes and JNI warnings in javahl TunnelAgent (r1886029) + Version 1.14.0 -(6 May 2020, from /branches/1.14.x) +(27 May 2020, from /branches/1.14.x) https://svn.apache.org/repos/asf/subversion/tags/1.14.0 User-visible changes: @@ -222,6 +265,29 @@ http://svn.apache.org/repos/asf/subversion/tags/1.11.0 * Fix a potential crash in JavaHL (issue #4764) +Version 1.10.7 +(10 Feb 2021, from /branches/1.10.x) + User-visible changes: + - Client-side bugfixes: + * Fix 'svn patch' setting mode 0600 on patched files with props (r1864440) + * Fix invalid SQL quoting in working copy upgrade system (r1879198) + * Fix non-deterministic generation of mergeinfo (issue #4862) + * Fix a crash seen when using git-svn with kwallet (r1875680) + * Fix merge removing a folder with non-inheritable mergeinfo (issue #4859) + * Fix 'svn info --xml' gives wrong 'source-right' of conflict (issue #4869) + + - Server-side bugfixes: + * mod_dav_svn: install cleanup handler for FS warning logging (r1865266) + * mod_dav_svn: Fix missing Last-Modified header on 'external' GET requests (r1866425) + * Fix formatting type size mismatches in FSFS (r1865987, -8) + * Fix an undefined behavior problem in FSFS caching code (r1876054) + * Fix a potential NULL dereference in the config file parser (r1886019) + + Developer-visible changes: + * Fix Requires(.private) fields in pkg-config files (r1863987, -90) + * Fix crash in JavaHL JNI wrapper caused by object lifetimes (r1880886) + * Fix an EOL issue in tests on Windows (r1881985 et al) + Version 1.10.6 (24 Jul 2019, from /branches/1.10.x) https://svn.apache.org/repos/asf/subversion/tags/1.10.6 diff --git a/contrib/subversion/INSTALL b/contrib/subversion/INSTALL index 64f821a31057..44a916b4ac49 100644 --- a/contrib/subversion/INSTALL +++ b/contrib/subversion/INSTALL @@ -3,7 +3,7 @@ A Quick Guide ====================================== -$LastChangedDate: 2020-02-17 03:49:42 +0000 (Mon, 17 Feb 2020) $ +$LastChangedDate: 2020-12-18 04:00:24 +0000 (Fri, 18 Dec 2020) $ Contents: @@ -206,7 +206,7 @@ I. INTRODUCTION commands described in section II.B before installing the following. - 1. Apache Portable Runtime 1.5 or newer (REQUIRED) + 1. Apache Portable Runtime 1.4 or newer (REQUIRED) Whenever you want to build any part of Subversion, you need the Apache Portable Runtime (APR) and the APR Utility (APR-util) @@ -506,6 +506,12 @@ I. INTRODUCTION reached end of life. All users are strongly encouraged to move to Python 3. + Note: If you are using a Subversion distribution tarball and want + to build the Python bindings for Python 2, you should rebuild + the build environment in non-release mode by running + 'sh autogen.sh' before running the ./configure script; see + section II.B for more about autogen.sh. + 13. Perl 5.8 or newer (Windows only) (OPTIONAL) @@ -832,7 +838,7 @@ II. INSTALLATION needed to compile Apache. Note that this is the actual awk program, not an installer - just rename it to awk.exe and it is ready to use. * Apache apr, apr-util, and optionally apr-iconv libraries, version - 1.5 or later (1.2 for apr-iconv). If you are building from a Subversion + 1.4 or later (1.2 for apr-iconv). If you are building from a Subversion checkout and have not downloaded Apache 2, then get these 3 libraries from https://www.apache.org/dist/apr/. * SQLite 3.8.2 or higher from https://www.sqlite.org/download.html diff --git a/contrib/subversion/NOTICE b/contrib/subversion/NOTICE index a3e794d536e7..84d77667c40d 100644 --- a/contrib/subversion/NOTICE +++ b/contrib/subversion/NOTICE @@ -1,5 +1,5 @@ Apache Subversion -Copyright 2020 The Apache Software Foundation +Copyright 2021 The Apache Software Foundation This product includes software developed by many people, and distributed under Contributor License Agreements to The Apache Software Foundation diff --git a/contrib/subversion/autogen.sh b/contrib/subversion/autogen.sh index 84a6e2ca33cc..6579daa9e415 100755 --- a/contrib/subversion/autogen.sh +++ b/contrib/subversion/autogen.sh @@ -178,8 +178,8 @@ if test -n "$RELEASE_MODE"; then # Build the SWIG-related files make -f autogen-standalone.mk autogen-swig || gen_failed=1 - # Remove the .swig_checked file - rm -f .swig_checked + # Remove the .swig_*checked files + rm -f .swig_checked .swig_pl_checked .swig_py_checked .swig_rb_checked fi if test -n "$SKIP_DEPS"; then diff --git a/contrib/subversion/build-outputs.mk b/contrib/subversion/build-outputs.mk index aee265351a80..3f7ac1a100f8 100644 --- a/contrib/subversion/build-outputs.mk +++ b/contrib/subversion/build-outputs.mk @@ -23,21 +23,21 @@ RA_SERF_LINK = ../../subversion/libsvn_ra_serf/libsvn_ra_serf-1.la ../../subvers RA_SVN_DEPS = subversion/libsvn_ra_svn/libsvn_ra_svn-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_subr/libsvn_subr-1.la RA_SVN_LINK = ../../subversion/libsvn_ra_svn/libsvn_ra_svn-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la -BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subversion/libsvn_auth_gnome _keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subversion/tests/libsvn_ra_loc al subversion/tests/libsvn_ra subversion/tes! ts/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy +BUILD_DIRS = subversion/tests/afl subversion/tests/cmdline subversion/tests/libsvn_subr subversion/tests/libsvn_repos subversion/tests/libsvn_fs_base subversion/tests/libsvn_client subversion/tests/libsvn_wc subversion/tests/libsvn_client/../libsvn_wc tools/diff subversion/tests/libsvn_diff subversion/tests/client subversion/tests/libsvn_fs_fs subversion/tests/libsvn_fs subversion/tests/libsvn_fs_x tools/dev subversion/bindings/javahl/src/org/apache/subversion/javahl/callback subversion/bindings/javahl/classes subversion/bindings/javahl/include subversion/bindings/javahl/src/org/tigris/subversion/javahl subversion/bindings/javahl/tests/org/tigris/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/remote subversion/bindings/javahl/tests/org/apache/subversion/javahl subversion/bindings/javahl/src/org/apache/subversion/javahl/types subversion/bindings/javahl/src/org/apache/subversion/javahl/util subv ersion/libsvn_auth_gnome_keyring subversion/libsvn_auth_kwallet subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_diff subversion/libsvn_fs subversion/libsvn_fs_base subversion/libsvn_fs_base/bdb subversion/libsvn_fs_base/util subversion/libsvn_fs_fs subversion/libsvn_fs_util subversion/libsvn_fs_x subversion/libsvn_ra subversion/libsvn_ra_local subversion/libsvn_ra_serf subversion/libsvn_ra_svn subversion/libsvn_repos subversion/libsvn_subr subversion/libsvn_subr/lz4 subversion/bindings/swig/perl/libsvn_swig_perl subversion/bindings/swig/python/libsvn_swig_py subversion/bindings/swig/ruby/libsvn_swig_ruby subversion/tests subversion/libsvn_wc subversion/bindings/javahl/native subversion/bindings/javahl/native/jniwrapper subversion/bindings/cxx subversion/bindings/cxx/src subversion/bindings/cxx/src/aprwrap subversion/po subversion/mod_authz_svn subversion/mod_dav_svn subversion/mod_dav_svn/reports subversion/mod_dav_svn/posts tools/server-side/mod_dontdothat subver sion/tests/libsvn_ra_local subversion/tests/! libsvn_ra subversion/tests/libsvn_delta subversion/svn tools/client-side/svn-mergeinfo-normalizer tools/server-side tools/dev/wc-ng subversion/svnadmin subversion/svnbench tools/client-side/svnconflict subversion/svndumpfilter subversion/svnfsfs subversion/svnlook tools/dev/svnmover subversion/svnmucc tools/dev/svnraisetreeconflict subversion/svnrdump subversion/svnserve subversion/svnsync subversion/svnversion subversion/bindings/cxx/tests subversion/bindings/swig subversion/tests/libsvn_wc/../../libsvn_subr subversion/bindings/swig/python subversion/bindings/swig/perl subversion/bindings/swig/ruby subversion/bindings/swig/proxy BDB_TEST_DEPS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) BDB_TEST_PROGRAMS = subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) -TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) s ubversion/tests/libsvn_subr/prefix-string-te! st$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/ libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subvers ion/tests/cmdline/dav_tests.py subversion/te! sts/cmdli! ne/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/ cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_t ests.py subversion/tests/cmdline/trans_tests! .py subve! rsion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_DEPS = subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn _wc/entries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) su bversion/tests/libsvn_subr/path-test$(EXEEXT! ) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta /svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subv! ersion/te! sts/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline/log_tests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversio n/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnver sion_tests.py subversion/tests/cmdline/switc! h_tests.p! y subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py -TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) sub version/tests/libsvn_ra/ra-test$(EXEEXT) sub! version/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_su br/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests/cmdline/lock_tests.py subversion/tests/cmdline /log_tests.py subversion/tests/cmdline/merge! _authz_te! sts.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/svnauthz_tests.py subversion/tests/cmdline/svndum pfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py +TEST_PROGRAMS = subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/t ests/libsvn_ra_local/ra-local-test$(EXEEXT) ! subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_sub r/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/cmdline/authz_tests.py subversion/tests/cmdline/autoprop_tests.py subversion/tests/cmdline/basic_tests.py subversion/tests/cmdline/blame_tests.py subversion/tests/cmdline/cat_tests.py subversion/tests/cmdline/changelist_tests.py subversion/tests/cmdline/checkout_tests.py subversion/tests/cmdline/commit_tests.py subversion/tests/cmdline/copy_tests.py subversion/tests/cmdline/dav_tests.py subversion/tests/cmdline/depth_tests.py subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/entries_tests.py subversion/tests/cmdline/export_tests.py subversion/tests/cmdline/externals_tests.py subversion/tests/cmdline/getopt_tests.py subversion/tests/cmdline/history_tests.py subversion/tests/cmdline/import_tests.py subversion/tests/cmdline/info_tests.py subversion/tests/cmdline/input_validation_tests.py subversion/tests/cmdline/iprop_authz_tests.py subversion/tests/cmdline/iprop_tests.py subversion/tests /cmdline/lock_tests.py subversion/tests/cmdl! ine/log_t! ests.py subversion/tests/cmdline/merge_authz_tests.py subversion/tests/cmdline/merge_automatic_tests.py subversion/tests/cmdline/merge_reintegrate_tests.py subversion/tests/cmdline/merge_tests.py subversion/tests/cmdline/merge_tree_conflict_tests.py subversion/tests/cmdline/mergeinfo_tests.py subversion/tests/cmdline/mod_authz_svn_tests.py subversion/tests/cmdline/mod_dav_svn_tests.py subversion/tests/cmdline/move_tests.py subversion/tests/cmdline/patch_tests.py subversion/tests/cmdline/pegrev_parse_tests.py subversion/tests/cmdline/prop_tests.py subversion/tests/cmdline/redirect_tests.py subversion/tests/cmdline/relocate_tests.py subversion/tests/cmdline/resolve_tests.py subversion/tests/cmdline/revert_tests.py subversion/tests/cmdline/schedule_tests.py subversion/tests/cmdline/shelf2_tests.py subversion/tests/cmdline/shelf_tests.py subversion/tests/cmdline/special_tests.py subversion/tests/cmdline/stat_tests.py subversion/tests/cmdline/svnadmin_tests.py subversion/tests/cmdline/sv nauthz_tests.py subversion/tests/cmdline/svndumpfilter_tests.py subversion/tests/cmdline/svnfsfs_tests.py subversion/tests/cmdline/svnlook_tests.py subversion/tests/cmdline/svnmover_tests.py subversion/tests/cmdline/svnmucc_tests.py subversion/tests/cmdline/svnrdump_tests.py subversion/tests/cmdline/svnsync_authz_tests.py subversion/tests/cmdline/svnsync_tests.py subversion/tests/cmdline/svnversion_tests.py subversion/tests/cmdline/switch_tests.py subversion/tests/cmdline/trans_tests.py subversion/tests/cmdline/tree_conflict_tests.py subversion/tests/cmdline/update_tests.py subversion/tests/cmdline/upgrade_tests.py subversion/tests/cmdline/wc_tests.py check-deps test-deps: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/lock-helper$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) MANPAGES = subversion/svn/svn.1 subversion/svnadmin/svnadmin.1 subversion/svndumpfilter/svndumpfilter.1 subversion/svnlook/svnlook.1 subversion/svnmucc/svnmucc.1 subversion/svnrdump/svnrdump.1 subversion/svnserve/svnserve.8 subversion/svnserve/svnserve.conf.5 subversion/svnsync/svnsync.1 subversion/svnversion/svnversion.1 -CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subver sion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree_conflict_tests.pyc subversion/tests/cmdline/me rgeinfo_tests.pyc subversion/tests/cmdline/m! od_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/cmdline/svnrdump_tests.pyc subversion/tests/cmdl ine/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEX T) subversion/tests/libsvn_fs/locks-test$(EX! EEXT) sub! version/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEX T) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/test s/libsvn_subr/string-test$(EXEEXT) subversio! n/tests/l! ibsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconfl ict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) +CLEAN_FILES = subversion/bindings/cxx/svnxx-tests$(EXEEXT) subversion/svn/svn$(EXEEXT) subversion/svnadmin/svnadmin$(EXEEXT) subversion/svnbench/svnbench$(EXEEXT) subversion/svndumpfilter/svndumpfilter$(EXEEXT) subversion/svnfsfs/svnfsfs$(EXEEXT) subversion/svnlook/svnlook$(EXEEXT) subversion/svnmucc/svnmucc$(EXEEXT) subversion/svnrdump/svnrdump$(EXEEXT) subversion/svnserve/svnserve$(EXEEXT) subversion/svnsync/svnsync$(EXEEXT) subversion/svnversion/svnversion$(EXEEXT) subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/cmdline/authz_tests.pyc subversion/tests/cmdline/autoprop_tests.pyc subversion/tests/cmdline/basic_tests.pyc subversion/tests/cmdline/blame_tests.pyc subversion/tests/cmdline/cat_tests.pyc subversion/tests/cmdline/changelist_tests.pyc subversion/tests/cmdline/checkout_tests.pyc subversion/tests/cmdline/commit_tests.pyc subversion/tests/cmdline/copy_tests.pyc subversion/tests/cmdline/dav_tests.pyc subversion/tests/cmdline/depth_tests.pyc subversion/tests/cmdline/diff_tests.pyc subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/cmdline/entries_tests.pyc subversion/tests/cmdline/export_tests.pyc subversion/tests/cmdline/externals_tests.pyc subversion/tests/cmdline/getopt_tests.pyc subversion/tests/cmdline/history_tests.pyc subversion/tests/cmdline/import_tests.pyc subversion/tests/cmdline/info_tests.pyc subversion/tests/cmdline/input_validation_tests.pyc subversion/tests/cmdline/iprop_authz_tests.pyc subversion/tests/cmdline/iprop_tests.pyc subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/cmdline/lock_tests.pyc subversion/tests/cmdline/log_tests.pyc subversion/tests/cmdline/merge_authz_tests.pyc subversion/tests/cmdline/merge_automatic_tests.pyc subversion/tests/cmdline/merge_reintegrate_tests.pyc subversion/tests/cmdline/merge_tests.pyc subversion/tests/cmdline/merge_tree _conflict_tests.pyc subversion/tests/cmdline! /mergeinfo_tests.pyc subversion/tests/cmdline/mod_authz_svn_tests.pyc subversion/tests/cmdline/mod_dav_svn_tests.pyc subversion/tests/cmdline/move_tests.pyc subversion/tests/cmdline/patch_tests.pyc subversion/tests/cmdline/pegrev_parse_tests.pyc subversion/tests/cmdline/prop_tests.pyc subversion/tests/cmdline/redirect_tests.pyc subversion/tests/cmdline/relocate_tests.pyc subversion/tests/cmdline/resolve_tests.pyc subversion/tests/cmdline/revert_tests.pyc subversion/tests/cmdline/schedule_tests.pyc subversion/tests/cmdline/shelf2_tests.pyc subversion/tests/cmdline/shelf_tests.pyc subversion/tests/cmdline/special_tests.pyc subversion/tests/cmdline/stat_tests.pyc subversion/tests/cmdline/svnadmin_tests.pyc subversion/tests/cmdline/svnauthz_tests.pyc subversion/tests/cmdline/svndumpfilter_tests.pyc subversion/tests/cmdline/svnfsfs_tests.pyc subversion/tests/cmdline/svnlook_tests.pyc subversion/tests/cmdline/svnmover_tests.pyc subversion/tests/cmdline/svnmucc_tests.pyc subversion/tests/c mdline/svnrdump_tests.pyc subversion/tests/cmdline/svnsync_authz_tests.pyc subversion/tests/cmdline/svnsync_tests.pyc subversion/tests/cmdline/svnversion_tests.pyc subversion/tests/cmdline/switch_tests.pyc subversion/tests/cmdline/trans_tests.pyc subversion/tests/cmdline/tree_conflict_tests.pyc subversion/tests/cmdline/update_tests.pyc subversion/tests/cmdline/upgrade_tests.pyc subversion/tests/cmdline/wc_tests.pyc subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EX EEXT) subversion/tests/libsvn_fs/fs-test$(EX! EEXT) sub! version/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_fs_base/changes-test$(EXEEXT) subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) subversion/tests/libsvn_fs_base/strings-reps-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) su bversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/l ibsvn_subr/stream-test$(EXEEXT) subversion/t! ests/libs! vn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) t ools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) tools/dev/x509-parser$(EXEEXT) tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) EXTRACLEAN_FILES = subversion/libsvn_fs_fs/rep-cache-db.h subversion/libsvn_fs_x/rep-cache-db.h subversion/libsvn_subr/internal_statements.h subversion/libsvn_wc/wc-queries.h subversion/tests/libsvn_wc/wc-test-queries.h \ $(abs_builddir)/subversion/libsvn_subr/errorcode.inc \ $(abs_builddir)/subversion/libsvn_subr/config_keys.inc \ @@ -285,6 +285,12 @@ error_test_OBJECTS = error-test.lo subversion/tests/libsvn_subr/error-test$(EXEEXT): $(error_test_DEPS) cd subversion/tests/libsvn_subr && $(LINK) $(error_test_LDFLAGS) -o error-test$(EXEEXT) $(error_test_OBJECTS) ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) +filesize_test_PATH = subversion/tests/client +filesize_test_DEPS = subversion/tests/client/filesize-test.lo subversion/libsvn_client/libsvn_client-1.la subversion/tests/libsvn_test-1.la subversion/libsvn_wc/libsvn_wc-1.la subversion/libsvn_subr/libsvn_subr-1.la +filesize_test_OBJECTS = filesize-test.lo +subversion/tests/client/filesize-test$(EXEEXT): $(filesize_test_DEPS) + cd subversion/tests/client && $(LINK) $(filesize_test_LDFLAGS) -o filesize-test$(EXEEXT) $(filesize_test_OBJECTS) ../../../subversion/libsvn_client/libsvn_client-1.la ../../../subversion/tests/libsvn_test-1.la ../../../subversion/libsvn_wc/libsvn_wc-1.la ../../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) + fs_base_test_PATH = subversion/tests/libsvn_fs_base fs_base_test_DEPS = subversion/tests/libsvn_fs_base/fs-base-test.lo subversion/tests/libsvn_test-1.la subversion/libsvn_fs/libsvn_fs-1.la subversion/libsvn_fs_base/libsvn_fs_base-1.la subversion/libsvn_delta/libsvn_delta-1.la subversion/libsvn_fs_util/libsvn_fs_util-1.la subversion/libsvn_subr/libsvn_subr-1.la fs_base_test_OBJECTS = fs-base-test.lo @@ -518,8 +524,8 @@ subversion/libsvn_repos/libsvn_repos-1.la: $(libsvn_repos_DEPS) cd subversion/libsvn_repos && $(LINK_LIB) $(libsvn_repos_LDFLAGS) -o libsvn_repos-1.la $(LT_NO_UNDEFINED) $(libsvn_repos_OBJECTS) ../../subversion/libsvn_fs/libsvn_fs-1.la ../../subversion/libsvn_delta/libsvn_delta-1.la ../../subversion/libsvn_subr/libsvn_subr-1.la $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(LIBS) libsvn_subr_PATH = subversion/libsvn_subr -libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/libsvn_subr/dso.lo subversion/libsvn_s ubr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subversion/libsvn_subr/sorts.lo subversion /libsvn_subr/spillbuf.lo subversion/libsvn_s! ubr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subversion/libsvn_subr/x509parse.lo subver sion/libsvn_subr/xml.lo -libsvn_subr_OBJECTS = adler32.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo validate.lo versi on.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo +libsvn_subr_DEPS = subversion/libsvn_subr/adler32.lo subversion/libsvn_subr/apr_escape.lo subversion/libsvn_subr/atomic.lo subversion/libsvn_subr/auth.lo subversion/libsvn_subr/base64.lo subversion/libsvn_subr/bit_array.lo subversion/libsvn_subr/cache-inprocess.lo subversion/libsvn_subr/cache-membuffer.lo subversion/libsvn_subr/cache-memcache.lo subversion/libsvn_subr/cache-null.lo subversion/libsvn_subr/cache.lo subversion/libsvn_subr/cache_config.lo subversion/libsvn_subr/checksum.lo subversion/libsvn_subr/cmdline.lo subversion/libsvn_subr/compat.lo subversion/libsvn_subr/compress_lz4.lo subversion/libsvn_subr/compress_zlib.lo subversion/libsvn_subr/config.lo subversion/libsvn_subr/config_auth.lo subversion/libsvn_subr/config_file.lo subversion/libsvn_subr/config_win.lo subversion/libsvn_subr/crypto.lo subversion/libsvn_subr/ctype.lo subversion/libsvn_subr/date.lo subversion/libsvn_subr/debug.lo subversion/libsvn_subr/deprecated.lo subversion/libsvn_subr/dirent_uri.lo subversion/l ibsvn_subr/dso.lo subversion/libsvn_subr/encode.lo subversion/libsvn_subr/eol.lo subversion/libsvn_subr/error.lo subversion/libsvn_subr/fnv1a.lo subversion/libsvn_subr/gpg_agent.lo subversion/libsvn_subr/hash.lo subversion/libsvn_subr/io.lo subversion/libsvn_subr/iter.lo subversion/libsvn_subr/lock.lo subversion/libsvn_subr/log.lo subversion/libsvn_subr/lz4/lz4.lo subversion/libsvn_subr/macos_keychain.lo subversion/libsvn_subr/magic.lo subversion/libsvn_subr/md5.lo subversion/libsvn_subr/mergeinfo.lo subversion/libsvn_subr/mutex.lo subversion/libsvn_subr/nls.lo subversion/libsvn_subr/object_pool.lo subversion/libsvn_subr/opt.lo subversion/libsvn_subr/packed_data.lo subversion/libsvn_subr/path.lo subversion/libsvn_subr/pool.lo subversion/libsvn_subr/prefix_string.lo subversion/libsvn_subr/prompt.lo subversion/libsvn_subr/properties.lo subversion/libsvn_subr/quoprint.lo subversion/libsvn_subr/root_pools.lo subversion/libsvn_subr/simple_providers.lo subversion/libsvn_subr/skel.lo subve rsion/libsvn_subr/sorts.lo subversion/libsvn! _subr/spillbuf.lo subversion/libsvn_subr/sqlite.lo subversion/libsvn_subr/sqlite3wrapper.lo subversion/libsvn_subr/ssl_client_cert_providers.lo subversion/libsvn_subr/ssl_client_cert_pw_providers.lo subversion/libsvn_subr/ssl_server_trust_providers.lo subversion/libsvn_subr/stream.lo subversion/libsvn_subr/string.lo subversion/libsvn_subr/subst.lo subversion/libsvn_subr/sysinfo.lo subversion/libsvn_subr/target.lo subversion/libsvn_subr/temp_serializer.lo subversion/libsvn_subr/time.lo subversion/libsvn_subr/token.lo subversion/libsvn_subr/types.lo subversion/libsvn_subr/user.lo subversion/libsvn_subr/username_providers.lo subversion/libsvn_subr/utf.lo subversion/libsvn_subr/utf8proc.lo subversion/libsvn_subr/utf_validate.lo subversion/libsvn_subr/utf_width.lo subversion/libsvn_subr/validate.lo subversion/libsvn_subr/version.lo subversion/libsvn_subr/win32_crashrpt.lo subversion/libsvn_subr/win32_crypto.lo subversion/libsvn_subr/win32_xlate.lo subversion/libsvn_subr/x509info.lo subve rsion/libsvn_subr/x509parse.lo subversion/libsvn_subr/xml.lo +libsvn_subr_OBJECTS = adler32.lo apr_escape.lo atomic.lo auth.lo base64.lo bit_array.lo cache-inprocess.lo cache-membuffer.lo cache-memcache.lo cache-null.lo cache.lo cache_config.lo checksum.lo cmdline.lo compat.lo compress_lz4.lo compress_zlib.lo config.lo config_auth.lo config_file.lo config_win.lo crypto.lo ctype.lo date.lo debug.lo deprecated.lo dirent_uri.lo dso.lo encode.lo eol.lo error.lo fnv1a.lo gpg_agent.lo hash.lo io.lo iter.lo lock.lo log.lo lz4/lz4.lo macos_keychain.lo magic.lo md5.lo mergeinfo.lo mutex.lo nls.lo object_pool.lo opt.lo packed_data.lo path.lo pool.lo prefix_string.lo prompt.lo properties.lo quoprint.lo root_pools.lo simple_providers.lo skel.lo sorts.lo spillbuf.lo sqlite.lo sqlite3wrapper.lo ssl_client_cert_providers.lo ssl_client_cert_pw_providers.lo ssl_server_trust_providers.lo stream.lo string.lo subst.lo sysinfo.lo target.lo temp_serializer.lo time.lo token.lo types.lo user.lo username_providers.lo utf.lo utf8proc.lo utf_validate.lo utf_width.lo val idate.lo version.lo win32_crashrpt.lo win32_crypto.lo win32_xlate.lo x509info.lo x509parse.lo xml.lo subversion/libsvn_subr/libsvn_subr-1.la: $(libsvn_subr_DEPS) cd subversion/libsvn_subr && $(LINK_LIB) $(libsvn_subr_LDFLAGS) -o libsvn_subr-1.la $(LT_NO_UNDEFINED) $(libsvn_subr_OBJECTS) $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS) $(SVN_XML_LIBS) $(SVN_ZLIB_LIBS) $(SVN_APR_MEMCACHE_LIBS) $(SVN_SQLITE_LIBS) $(SVN_MAGIC_LIBS) $(SVN_INTL_LIBS) $(SVN_LZ4_LIBS) $(SVN_UTF8PROC_LIBS) $(SVN_MACOS_PLIST_LIBS) $(SVN_MACOS_KEYCHAIN_LIBS) $(LIBS) @@ -1152,7 +1158,7 @@ swig-rb: subversion/bindings/swig/ruby/client.la subversion/bindings/swig/ruby/c swig-rb-lib: subversion/bindings/swig/ruby/libsvn_swig_ruby/libsvn_swig_ruby-1.la -test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff/parse-diff-test$(EXEEXT) subversion/tests/libs vn_subr/path-test$(EXEEXT) subversion/tests/! libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn_delta/svndiff-test$(EXEEXT) subversion/tests/l ibsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) +test: subversion/tests/afl/afl-svndiff$(EXEEXT) subversion/tests/afl/afl-x509$(EXEEXT) subversion/tests/cmdline/atomic-ra-revprop-change$(EXEEXT) subversion/tests/libsvn_subr/auth-test$(EXEEXT) subversion/tests/libsvn_repos/authz-test$(EXEEXT) subversion/tests/libsvn_subr/bit-array-test$(EXEEXT) subversion/tests/libsvn_subr/cache-test$(EXEEXT) subversion/tests/libsvn_subr/checksum-test$(EXEEXT) subversion/tests/libsvn_client/client-test$(EXEEXT) subversion/tests/libsvn_subr/compat-test$(EXEEXT) subversion/tests/libsvn_subr/compress-test$(EXEEXT) subversion/tests/libsvn_subr/config-test$(EXEEXT) subversion/tests/libsvn_wc/conflict-data-test$(EXEEXT) subversion/tests/libsvn_client/conflicts-test$(EXEEXT) subversion/tests/libsvn_subr/crypto-test$(EXEEXT) subversion/tests/libsvn_wc/db-test$(EXEEXT) subversion/tests/libsvn_diff/diff-diff3-test$(EXEEXT) subversion/tests/libsvn_subr/dirent_uri-test$(EXEEXT) subversion/tests/libsvn_repos/dump-load-test$(EXEEXT) subversion/tests/libsvn_wc/en tries-compat-test$(EXEEXT) subversion/tests/cmdline/entries-dump$(EXEEXT) subversion/tests/libsvn_subr/error-code-test$(EXEEXT) subversion/tests/libsvn_subr/error-test$(EXEEXT) subversion/tests/client/filesize-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) subversion/tests/libsvn_fs_fs/fs-fs-private-test$(EXEEXT) subversion/tests/libsvn_fs/fs-sequential-test$(EXEEXT) subversion/tests/libsvn_fs/fs-test$(EXEEXT) subversion/tests/libsvn_fs_x/fs-x-pack-test$(EXEEXT) subversion/tests/libsvn_subr/hashdump-test$(EXEEXT) subversion/tests/libsvn_subr/io-test$(EXEEXT) subversion/tests/libsvn_test-1.la subversion/tests/cmdline/lock-helper$(EXEEXT) subversion/tests/libsvn_fs/locks-test$(EXEEXT) subversion/tests/libsvn_subr/mergeinfo-test$(EXEEXT) subversion/tests/libsvn_client/mtcc-test$(EXEEXT) subversion/tests/libsvn_wc/op-depth-test$(EXEEXT) subversion/tests/libsvn_subr/opt-test$(EXEEXT) subversion/tests/libsvn_subr/packed-data-test$(EXEEXT) subversion/tests/libsvn_diff /parse-diff-test$(EXEEXT) subversion/tests/l! ibsvn_subr/path-test$(EXEEXT) subversion/tests/libsvn_subr/prefix-string-test$(EXEEXT) subversion/tests/libsvn_subr/priority-queue-test$(EXEEXT) subversion/tests/libsvn_wc/pristine-store-test$(EXEEXT) subversion/tests/libsvn_ra_local/ra-local-test$(EXEEXT) subversion/tests/libsvn_ra/ra-test$(EXEEXT) subversion/tests/libsvn_delta/random-test$(EXEEXT) subversion/tests/libsvn_repos/repos-test$(EXEEXT) subversion/tests/libsvn_subr/revision-test$(EXEEXT) subversion/tests/libsvn_subr/root-pools-test$(EXEEXT) subversion/tests/libsvn_subr/skel-test$(EXEEXT) subversion/tests/libsvn_subr/spillbuf-test$(EXEEXT) subversion/tests/libsvn_subr/sqlite-test$(EXEEXT) subversion/tests/libsvn_subr/stream-test$(EXEEXT) subversion/tests/libsvn_fs_x/string-table-test$(EXEEXT) subversion/tests/libsvn_subr/string-test$(EXEEXT) subversion/tests/libsvn_subr/subst_translate-test$(EXEEXT) tools/dev/wc-ng/svn-wc-db-tester$(EXEEXT) subversion/tests/libsvn_delta/svndiff-stream-test$(EXEEXT) subversion/tests/libsvn _delta/svndiff-test$(EXEEXT) subversion/tests/libsvn_subr/time-test$(EXEEXT) subversion/tests/libsvn_subr/translate-test$(EXEEXT) subversion/tests/libsvn_subr/utf-test$(EXEEXT) subversion/tests/libsvn_delta/vdelta-test$(EXEEXT) subversion/tests/libsvn_wc/wc-incomplete-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-lock-tester$(EXEEXT) subversion/tests/libsvn_wc/wc-queries-test$(EXEEXT) subversion/tests/libsvn_wc/wc-test$(EXEEXT) subversion/tests/libsvn_delta/window-test$(EXEEXT) subversion/tests/libsvn_subr/x509-test$(EXEEXT) subversion/tests/libsvn_subr/xml-test$(EXEEXT) tools: tools/diff/diff$(EXEEXT) tools/diff/diff3$(EXEEXT) tools/diff/diff4$(EXEEXT) tools/dev/fsfs-access-map$(EXEEXT) tools/server-side/mod_dontdothat/mod_dontdothat.la tools/client-side/svn-mergeinfo-normalizer/svn-mergeinfo-normalizer$(EXEEXT) tools/server-side/svn-populate-node-origins-index$(EXEEXT) tools/server-side/svnauthz$(EXEEXT) tools/server-side/svnauthz-validate$(EXEEXT) tools/client-side/svnconflict/svnconflict$(EXEEXT) tools/dev/svnmover/svnmover$(EXEEXT) tools/dev/svnraisetreeconflict/svnraisetreeconflict$(EXEEXT) tools/dev/x509-parser$(EXEEXT) @@ -1496,6 +1502,7 @@ entries-compat-test: subversion/tests/libsvn_wc/entries-compat-test$(EXEEXT) entries-dump: subversion/tests/cmdline/entries-dump$(EXEEXT) error-code-test: subversion/tests/libsvn_subr/error-code-test$(EXEEXT) error-test: subversion/tests/libsvn_subr/error-test$(EXEEXT) +filesize-test: subversion/tests/client/filesize-test$(EXEEXT) fs-base-test: subversion/tests/libsvn_fs_base/fs-base-test$(EXEEXT) fs-fs-fuzzy-test: subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test$(EXEEXT) fs-fs-pack-test: subversion/tests/libsvn_fs_fs/fs-fs-pack-test$(EXEEXT) @@ -2890,6 +2897,8 @@ subversion/libsvn_repos/rev_hunt.lo: subversion/libsvn_repos/rev_hunt.c subversi subversion/libsvn_subr/adler32.lo: subversion/libsvn_subr/adler32.c subversion/include/private/svn_adler32.h +subversion/libsvn_subr/apr_escape.lo: subversion/libsvn_subr/apr_escape.c subversion/include/private/svn_dep_compat.h + subversion/libsvn_subr/atomic.lo: subversion/libsvn_subr/atomic.c subversion/include/private/svn_atomic.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_mutex.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_pools.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/auth.lo: subversion/libsvn_subr/auth.c subversion/include/private/svn_auth_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_version.h subversion/libsvn_subr/auth.h subversion/svn_private_config.h @@ -2912,7 +2921,7 @@ subversion/libsvn_subr/cache_config.lo: subversion/libsvn_subr/cache_config.c su subversion/libsvn_subr/checksum.lo: subversion/libsvn_subr/checksum.c subversion/include/private/svn_debug.h subversion/include/private/svn_subr_private.h subversion/include/svn_checksum.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/libsvn_subr/checksum.h subversion/libsvn_subr/fnv1a.h subversion/svn_private_config.h -subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_utf.h subvers ion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h +subversion/libsvn_subr/cmdline.lo: subversion/libsvn_subr/cmdline.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_sorts_private.h subversion/include/private/svn_string_private.h subversion/include/private/svn_utf_private.h subversion/include/svn_auth.h subversion/include/svn_base64.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_dirent_uri.h subversion/include/svn_dso.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_nls.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_types _impl.h subversion/include/svn_utf.h subversion/include/svn_xml.h subversion/libsvn_subr/win32_crashrpt.h subversion/svn_private_config.h subversion/libsvn_subr/compat.lo: subversion/libsvn_subr/compat.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_compat.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_props.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h @@ -3402,9 +3411,11 @@ subversion/tests/afl/afl-svndiff.lo: subversion/tests/afl/afl-svndiff.c subversi subversion/tests/afl/afl-x509.lo: subversion/tests/afl/afl-x509.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_x509.h +subversion/tests/client/filesize-test.lo: subversion/tests/client/filesize-test.c subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_path.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/svn/cl.h subversion/svn/filesize.c subversion/tests/svn_test.h + subversion/tests/cmdline/atomic-ra-revprop-change.lo: subversion/tests/cmdline/atomic-ra-revprop-change.c subversion/include/private/svn_debug.h subversion/include/private/svn_skel.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/svn_private_config.h -subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/sv n_private_config.h +subversion/tests/cmdline/entries-dump.lo: subversion/tests/cmdline/entries-dump.c subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_opt_impl.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h subversion/include/svn_wc.h subversion/include/svn_xml.h subversion/libsvn_wc/lock.h subversion/libsvn_wc/wc.h subversion/li bsvn_wc/wc_db.h subversion/svn_private_config.h subversion/tests/cmdline/lock-helper.lo: subversion/tests/cmdline/lock-helper.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_types_impl.h diff --git a/contrib/subversion/build.conf b/contrib/subversion/build.conf index 1f0d2d8054a6..95875a7ebdb1 100644 --- a/contrib/subversion/build.conf +++ b/contrib/subversion/build.conf @@ -53,6 +53,7 @@ private-includes = subversion/libsvn_subr/utf8proc/utf8proc_internal.h subversion/libsvn_subr/utf8proc/utf8proc.c subversion/libsvn_subr/utf8proc/utf8proc_data.c + subversion/svn/filesize.c private-built-includes = subversion/svn_private_config.h subversion/libsvn_fs_fs/rep-cache-db.h @@ -1338,6 +1339,18 @@ install = test libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr msvc-force-static = yes +# ---------------------------------------------------------------------------- +# Tests for the client's internal functions + +[filesize-test] +description = Test conversion of file sizes to human-readable form +type = exe +path = subversion/tests/client +sources = filesize-test.c +install = test +libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr +msvc-force-static = yes + # ---------------------------------------------------------------------------- # These are not unit tests at all, they are small programs that exercise # parts of the libsvn_delta API from the command line. They are stuck here @@ -1565,7 +1578,7 @@ libs = __ALL__ checksum-test compat-test config-test hashdump-test mergeinfo-test opt-test packed-data-test path-test prefix-string-test priority-queue-test root-pools-test stream-test - string-test time-test utf-test bit-array-test + string-test time-test utf-test bit-array-test filesize-test error-test error-code-test cache-test spillbuf-test crypto-test revision-test subst_translate-test io-test diff --git a/contrib/subversion/configure b/contrib/subversion/configure index 4666c5d0c5fd..76cad5a00cd3 100755 --- a/contrib/subversion/configure +++ b/contrib/subversion/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.14.0. +# Generated by GNU Autoconf 2.69 for subversion 1.14.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.14.0' -PACKAGE_STRING='subversion 1.14.0' +PACKAGE_VERSION='1.14.1' +PACKAGE_STRING='subversion 1.14.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -1504,7 +1504,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.14.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.14.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1570,7 +1570,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.14.0:";; + short | recursive ) echo "Configuration of subversion 1.14.1:";; esac cat <<\_ACEOF @@ -1826,7 +1826,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.14.0 +subversion configure 1.14.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2370,7 +2370,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.14.0, which was +It was created by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2750,8 +2750,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.14.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.14.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.14.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -4773,7 +4773,7 @@ fi # ==== Libraries, for which we may have source to build ====================== -APR_VER_REGEXES="1\.[5-9]\. 2\." +APR_VER_REGEXES="1\.[4-9]\. 2\." APR_WANTED_REGEXES="$APR_VER_REGEXES" @@ -24462,46 +24462,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25093,46 +25099,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -25724,46 +25736,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -26358,46 +26376,52 @@ $as_echo "$ac_cv_python_libs" >&6; } fi `" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 + if test "$SWIG" = "none"; then + SWIG_PY_ERRMSG="" + else + # Look more closely at the SWIG and Python versions to + # determine SWIG_PY_OPTS. We can skip this if we already + # have the SWIG-generated files. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python >= 3" >&5 $as_echo_n "checking for Python >= 3... " >&6; } if ${ac_cv_python_is_py3+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_python_is_py3="no" - $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ - ac_cv_python_is_py3="yes" + ac_cv_python_is_py3="no" + $PYTHON -c 'import sys; sys.exit(0x3000000 > sys.hexversion)' && \ + ac_cv_python_is_py3="yes" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_python_is_py3" >&5 $as_echo "$ac_cv_python_is_py3" >&6; } - if test "$ac_cv_python_is_py3" = "yes"; then - if test "$SWIG_VERSION" -ge "300010"; then - SWIG_PY_ERRMSG="" - else - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 + if test "$ac_cv_python_is_py3" = "yes"; then + if test "$SWIG_VERSION" -ge "300010"; then + SWIG_PY_ERRMSG="" + else + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 3 require SWIG 3.0.10 or newer" >&2;} - fi - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" - else - SWIG_PY_OPTS="-python -py3 -nofastunpack" - fi - else - if test "$SWIG_VERSION" -lt "400000"; then - SWIG_PY_OPTS="-python -classic" - SWIG_PY_ERRMSG="" + fi + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3 -nofastunpack -modern" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + fi else - SWIG_PY_OPTS="-python -nofastunpack" - SWIG_PY_ERRMSG="SWIG version is not suitable" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&5 $as_echo "$as_me: WARNING: Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0" >&2;} + fi fi fi fi - fi fi @@ -28361,7 +28385,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.14.0, which was +This file was extended by subversion $as_me 1.14.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -28427,7 +28451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.14.0 +subversion config.status 1.14.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/contrib/subversion/configure.ac b/contrib/subversion/configure.ac index 07103e550a81..42a9f14e8fb5 100644 --- a/contrib/subversion/configure.ac +++ b/contrib/subversion/configure.ac @@ -91,7 +91,7 @@ AC_SUBST([MKDIR]) dnl verify apr version and set apr flags dnl These regular expressions should not contain "\(" and "\)". -APR_VER_REGEXES=["1\.[5-9]\. 2\."] +APR_VER_REGEXES=["1\.[4-9]\. 2\."] SVN_LIB_APR($APR_VER_REGEXES) diff --git a/contrib/subversion/gen-make.py b/contrib/subversion/gen-make.py index bdb359394e1c..5811705322cc 100755 --- a/contrib/subversion/gen-make.py +++ b/contrib/subversion/gen-make.py @@ -70,7 +70,7 @@ def main(fname, gentype, verfname=None, if ('--debug', '') in other_options: for dep_type, target_dict in generator.graph.deps.items(): - sorted_targets = list(target_dict.keys()); sorted_targets.sort() + sorted_targets = sorted(target_dict.keys(), key=str) for target in sorted_targets: print(dep_type + ": " + _objinfo(target)) for source in target_dict[target]: diff --git a/contrib/subversion/subversion/include/private/svn_dep_compat.h b/contrib/subversion/subversion/include/private/svn_dep_compat.h index 7e6603826135..9a2e49a19cba 100644 --- a/contrib/subversion/subversion/include/private/svn_dep_compat.h +++ b/contrib/subversion/subversion/include/private/svn_dep_compat.h @@ -29,6 +29,7 @@ #define SVN_DEP_COMPAT_H #include +#include #ifdef __cplusplus extern "C" { @@ -193,6 +194,16 @@ extern "C" { ((major*1000000 + minor*1000 + patch) <= SVN_SQLITE_MIN_VERSION_NUMBER) #endif /* SQLITE_VERSION_AT_LEAST */ +/** + * Support for 'apr_escape_shell() which was introduced in APR 1.5. + */ +#if !APR_VERSION_AT_LEAST(1,5,0) +/* from apr_escape.h */ +#define APR_ESCAPE_STRING (-1) +APR_DECLARE(apr_status_t) apr_escape_shell(char *escaped, const char *str, + apr_ssize_t slen, apr_size_t *len); +#endif + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/contrib/subversion/subversion/include/private/svn_sorts_private.h b/contrib/subversion/subversion/include/private/svn_sorts_private.h index d0fddc0c6488..d11ebbe1a992 100644 --- a/contrib/subversion/subversion/include/private/svn_sorts_private.h +++ b/contrib/subversion/subversion/include/private/svn_sorts_private.h @@ -80,7 +80,7 @@ svn_sort__array(apr_array_header_t *array, int (*comparison_func)(const void *, const void *)); -/* Return the lowest index at which the element @a *key should be inserted into +/** Return the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -93,7 +93,7 @@ svn_sort__bsearch_lower_bound(const apr_array_header_t *array, const void *key, int (*compare_func)(const void *, const void *)); -/* Find the lowest index at which the element @a *key should be inserted into +/** Find the lowest index at which the element @a *key should be inserted into * the array @a array, according to the ordering defined by @a compare_func. * The array must already be sorted in the ordering defined by @a compare_func. * @a compare_func is defined as for the C stdlib function bsearch(); the @@ -116,7 +116,7 @@ svn_sort__array_lookup(const apr_array_header_t *array, int (*compare_func)(const void *, const void *)); -/* Insert a shallow copy of @a *new_element into the array @a array at the index +/** Insert a shallow copy of @a *new_element into the array @a array at the index * @a insert_index, growing the array and shuffling existing elements along to * make room. * @@ -131,7 +131,7 @@ svn_sort__array_insert2(apr_array_header_t *array, int insert_index); -/* Remove @a elements_to_delete elements starting at @a delete_index from the +/** Remove @a elements_to_delete elements starting at @a delete_index from the * array @a arr. * * Raise an error if the indexes to delete extends outside the array bounds @@ -144,7 +144,7 @@ svn_sort__array_delete2(apr_array_header_t *arr, int delete_index, int elements_to_delete); -/* Reverse the order of elements in @a array, in place. +/** Reverse the order of elements in @a array, in place. * * @note Private. For use by Subversion's own code only. */ diff --git a/contrib/subversion/subversion/include/svn_ra.h b/contrib/subversion/subversion/include/svn_ra.h index 4c71520dd1ff..d534ab70caa1 100644 --- a/contrib/subversion/subversion/include/svn_ra.h +++ b/contrib/subversion/subversion/include/svn_ra.h @@ -2244,7 +2244,7 @@ svn_ra_has_capability(svn_ra_session_t *session, /** * The capability of a server to automatically remove transaction - * properties prefixed with SVN_PROP_EPHEMERAL_PREFIX. + * properties prefixed with #SVN_PROP_TXN_PREFIX. * * @since New in 1.8. */ diff --git a/contrib/subversion/subversion/include/svn_types.h b/contrib/subversion/subversion/include/svn_types.h index 418d6ac9cc84..d9f98f23150a 100644 --- a/contrib/subversion/subversion/include/svn_types.h +++ b/contrib/subversion/subversion/include/svn_types.h @@ -248,6 +248,35 @@ typedef struct svn_version_t svn_version_t; /** @} */ + +/** @defgroup apr_hash_utilities APR Hash Table Helpers + * These functions enable the caller to dereference an APR hash table index + * without type casts or temporary variables. + * + * These functions are provided by APR itself from version 1.5. + * Definitions are provided here for when using older versions of APR. + * @{ + */ + +#if !APR_VERSION_AT_LEAST(1, 5, 0) + +/** Return the key of the hash table entry indexed by @a hi. */ +const void * +apr_hash_this_key(apr_hash_index_t *hi); + +/** Return the key length of the hash table entry indexed by @a hi. */ +apr_ssize_t +apr_hash_this_key_len(apr_hash_index_t *hi); + +/** Return the value of the hash table entry indexed by @a hi. */ +void * +apr_hash_this_val(apr_hash_index_t *hi); + +#endif + +/** @} */ + + /** On Windows, APR_STATUS_IS_ENOTDIR includes several kinds of * invalid-pathname error but not ERROR_INVALID_NAME, so we include it. diff --git a/contrib/subversion/subversion/include/svn_version.h b/contrib/subversion/subversion/include/svn_version.h index 25bbe542df5b..69e886cc5437 100644 --- a/contrib/subversion/subversion/include/svn_version.h +++ b/contrib/subversion/subversion/include/svn_version.h @@ -70,7 +70,7 @@ extern "C" { * * @since New in 1.1. */ -#define SVN_VER_PATCH 0 +#define SVN_VER_PATCH 1 /** @deprecated Provided for backward compatibility with the 1.0 API. */ @@ -93,7 +93,7 @@ extern "C" { * * Always change this at the same time as SVN_VER_NUMTAG. */ -#define SVN_VER_TAG " (r1876290)" +#define SVN_VER_TAG " (r1886195)" /** Number tag: a string describing the version. @@ -117,7 +117,7 @@ extern "C" { * file version. Its value remains 0 in the repository except in release * tags where it is the revision from which the tag was created. */ -#define SVN_VER_REVISION 1876290 +#define SVN_VER_REVISION 1886195 /* Version strings composed from the above definitions. */ diff --git a/contrib/subversion/subversion/libsvn_client/merge.c b/contrib/subversion/subversion/libsvn_client/merge.c index 9d9a1c300a10..e535647d8649 100644 --- a/contrib/subversion/subversion/libsvn_client/merge.c +++ b/contrib/subversion/subversion/libsvn_client/merge.c @@ -264,7 +264,7 @@ typedef struct merge_cmd_baton_t { /* Reference to the one-and-only CHILDREN_WITH_MERGEINFO (see global comment) or a similar list for single-file-merges */ - const apr_array_header_t *children_with_mergeinfo; *** 828 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:11:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 59F0A54C94E; Thu, 18 Feb 2021 20:11:16 +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 4DhQnw28zcz3Qyx; Thu, 18 Feb 2021 20:11:16 +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 3D8921E7CA; Thu, 18 Feb 2021 20:11:16 +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 11IKBGUj014479; Thu, 18 Feb 2021 20:11:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IKBGRn014478; Thu, 18 Feb 2021 20:11:16 GMT (envelope-from git) Date: Thu, 18 Feb 2021 20:11:16 GMT Message-Id: <202102182011.11IKBGRn014478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jung-uk Kim Subject: git: 922c452bd871 - stable/11 - OpenSSL: Move static DH ciphersuites into the "weak-ssl-ciphers" list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jkim X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 922c452bd871a9c7cc6610abd500711313a2d387 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:11:16 -0000 The branch stable/11 has been updated by jkim: URL: https://cgit.FreeBSD.org/src/commit/?id=922c452bd871a9c7cc6610abd500711313a2d387 commit 922c452bd871a9c7cc6610abd500711313a2d387 Author: Jung-uk Kim AuthorDate: 2021-02-18 20:10:27 +0000 Commit: Jung-uk Kim CommitDate: 2021-02-18 20:10:27 +0000 OpenSSL: Move static DH ciphersuites into the "weak-ssl-ciphers" list This effectively disables the static DH ciphersuites because we do not enable weak SSL ciphers. Note it is exactly done as recommended in the OpenSSL Security Advisory for Raccoon Attack (CVE-2020-1968): https://www.openssl.org/news/secadv/20200909.txt --- crypto/openssl/ssl/s3_lib.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/crypto/openssl/ssl/s3_lib.c b/crypto/openssl/ssl/s3_lib.c index 10c6db683b6e..64e1b0a29e36 100644 --- a/crypto/openssl/ssl/s3_lib.c +++ b/crypto/openssl/ssl/s3_lib.c @@ -942,6 +942,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, }, /* Cipher 30 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_128_SHA, @@ -956,7 +957,9 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 31 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_128_SHA, @@ -971,6 +974,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 32 */ { 1, @@ -1033,6 +1037,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, }, /* Cipher 36 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_256_SHA, @@ -1047,8 +1052,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 37 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_256_SHA, @@ -1063,6 +1070,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 38 */ { @@ -1162,6 +1170,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher 3E */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_128_SHA256, @@ -1176,8 +1185,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 3F */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_128_SHA256, @@ -1192,6 +1203,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 40 */ { @@ -1229,6 +1241,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher 42 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA, @@ -1243,8 +1256,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 43 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA, @@ -1259,6 +1274,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 44 */ { @@ -1452,6 +1468,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher 68 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_256_SHA256, @@ -1466,8 +1483,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 69 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_256_SHA256, @@ -1482,6 +1501,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 6A */ { @@ -1621,6 +1641,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, }, /* Cipher 85 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA, @@ -1635,8 +1656,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 86 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA, @@ -1651,6 +1674,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher 87 */ { @@ -1787,6 +1811,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher 97 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_SEED_SHA, @@ -1801,8 +1826,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 98 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_SEED_SHA, @@ -1817,6 +1844,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher 99 */ { @@ -1935,6 +1963,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher A0 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256, @@ -1949,8 +1978,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher A1 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384, @@ -1965,6 +1996,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher A2 */ { @@ -1999,6 +2031,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { }, /* Cipher A4 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256, @@ -2013,8 +2046,10 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 128, 128, }, +#endif /* Cipher A5 */ +#ifndef OPENSSL_NO_WEAK_SSL_CIPHERS { 1, TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384, @@ -2029,6 +2064,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[] = { 256, 256, }, +#endif /* Cipher A6 */ { From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:42:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C603F54DB54 for ; Thu, 18 Feb 2021 20:42:23 +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 4DhRTq5J4rz3k5p; Thu, 18 Feb 2021 20:42: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 A8A361EED8; Thu, 18 Feb 2021 20:42: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 11IKgNUI058333; Thu, 18 Feb 2021 20:42:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IKgNjr058332; Thu, 18 Feb 2021 20:42:23 GMT (envelope-from git) Date: Thu, 18 Feb 2021 20:42:23 GMT Message-Id: <202102182042.11IKgNjr058332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 9e5eca2cffea - Create tag vendor/libcxxrt/2019-07-26-f96846efbfd508f66d91fcbbef5dd808947c7f6d 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/tags/vendor/libcxxrt/2019-07-26-f96846efbfd508f66d91fcbbef5dd808947c7f6d X-Git-Reftype: annotated tag X-Git-Commit: 9e5eca2cffeae8dcbf9fba65ccaa52d998af5fd6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:42:23 -0000 The annotated tag vendor/libcxxrt/2019-07-26-f96846efbfd508f66d91fcbbef5dd808947c7f6d has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/libcxxrt/2019-07-26-f96846efbfd508f66d91fcbbef5dd808947c7f6d tag vendor/libcxxrt/2019-07-26-f96846efbfd508f66d91fcbbef5dd808947c7f6d Tagger: Dimitry Andric TaggerDate: 2021-02-18 20:41:51 +0000 Tag libcxxrt master f96846efbfd508f66d91fcbbef5dd808947c7f6d. commit 0d08e8ebf50805e543626b4e87157578fbad5d2b Author: Dimitry Andric AuthorDate: 2019-07-26 05:59:04 +0000 Commit: Dimitry Andric CommitDate: 2019-07-26 05:59:04 +0000 Import libcxxrt master f96846efbfd508f66d91fcbbef5dd808947c7f6d. Interesting fixes: f96846e Fix std::size_t -> size_t to unbreak build against libc++ 6.0.0 6f4cfa2 Fix the uncaught exception count with rethrowing. db54f53 Added C++14-specific operator delete (#47) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 20:52:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AF06054E222; Thu, 18 Feb 2021 20:52:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DhRj52J8kz3krB; Thu, 18 Feb 2021 20:52:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 11IKq0qc008190 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 18 Feb 2021 22:52:03 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 11IKq0qc008190 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 11IKq0Sf008189; Thu, 18 Feb 2021 22:52:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 18 Feb 2021 22:52:00 +0200 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. Message-ID: References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DhRj52J8kz3krB X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 20:52:09 -0000 On Wed, Feb 17, 2021 at 04:48:22PM -0800, John Baldwin wrote: > On 2/17/21 4:35 PM, John Baldwin wrote: > > The branch main has been updated by jhb: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=24fd63e0970f91189dd2acde987bd2e4c8c04a50 > > > > commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50 > > Author: John Baldwin > > AuthorDate: 2021-02-18 00:34:23 +0000 > > Commit: John Baldwin > > CommitDate: 2021-02-18 00:34:23 +0000 > > > > mips: Don't set __NO_TLS to disable some uses of TLS. > > __NO_TLS was originally added to disable use of _Thread in the locale > > code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. At the time > > libc did not support TLS on MIPS (I believe), but TLS support was > > added to libc (at least _set_tp.c) for MIPS about a month after > > __NO_TLS was added, but __NO_TLS was still left around. > > Reviewed by: imp > > Sponsored by: DARPA > > Differential Revision: https://reviews.freebsd.org/D28713 > > --- > > sys/sys/cdefs.h | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h > > index 64f26480a2f5..ff18911f6acf 100644 > > --- a/sys/sys/cdefs.h > > +++ b/sys/sys/cdefs.h > > @@ -768,8 +768,7 @@ > > #endif > > #endif /* __STDC_WANT_LIB_EXT1__ */ > > -#if defined(__mips) || \ > > - (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1)) > > +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) > > #define __NO_TLS 1 > > #endif > > It would be really nice to kill __NO_TLS entirely. There is at least one > unconditional use of _Thread_local (sorry, should have used that instead > of _Thread above) in libc in stdlib/cxa_thread_atexit_impl.c, so it seems > highly unlikely that TLS is actually broken on any of our platforms as the > libc build would have been broken instead. There is a difference between compile and runtime. The mentioned libc use in cxa_thread_atexit_impl.c is to support some (I believe) rarely used C++ feature of thread-local storage with destructors, so it might be simply not observed often. OTOH, locale functions infect almost everything string-related in libc, so the breakage would be quite visible. But, I wonder, what does CALL_ELF mean? Is it for old 64bit PowerPC ABI, that was abandoned with the switch to ELFv2? From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:07:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 618DC54EE47 for ; Thu, 18 Feb 2021 21:07:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhS2y2544z3mZ6 for ; Thu, 18 Feb 2021 21:07:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f51.google.com with SMTP id a207so5167443wmd.1 for ; Thu, 18 Feb 2021 13:07:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/cQpwSFRES7pw4ocCiU8c2XxEb7+U4c7MExltcMsJPM=; b=SWjpZ0JgJ5z1Pa26udSQwJkNjpt+srzL76aJSXzDLkjU8YxfTySJci6k3QDIj/Fxon MXxVhdMO2EsJktRAPg8xZi0vwYJnGL9STzfExqod4WQC+lO8DxbyYIQf93urnUlTSZKT hbGfubzVAzA34iPG87SJ9OXoAKqrym2Jldt4j+gDwrHC4MVEhEhRbaxHT/4f7oJog0eB UO6m7O17uzhH+h6tut97jnmj+NdHkbvYU0dq5yV+KDbyOtmbVlUftkBZbR7spaSmZIYM adIH4YMIkx/iJt2yQOeEISVF+SXIWS3OMQIBawI+oL0lRWQexV4lCNMSVr+Cg/qBUX3H q0aQ== X-Gm-Message-State: AOAM532M/HM3zQVDlx31nN1upFhunJDCFGWSrG6nNEcuhlJSchO/19uM C9InnpL2Q9RTFaDTZs8LtQoaTQ== X-Google-Smtp-Source: ABdhPJybkW8l/6SA/De/yt9aqZ7JDnPORvphPOetQVjzb6Qn9JcrPgVJOUWp+N9zUREzTqG7p2d4dQ== X-Received: by 2002:a05:600c:430a:: with SMTP id p10mr5187991wme.142.1613682456611; Thu, 18 Feb 2021 13:07:36 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id y15sm10598778wrm.93.2021.02.18.13.07.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2021 13:07:36 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. From: Jessica Clarke In-Reply-To: Date: Thu, 18 Feb 2021 21:07:34 +0000 Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> To: Konstantin Belousov X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DhS2y2544z3mZ6 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:07:38 -0000 On 18 Feb 2021, at 20:52, Konstantin Belousov = wrote: > On Wed, Feb 17, 2021 at 04:48:22PM -0800, John Baldwin wrote: >> On 2/17/21 4:35 PM, John Baldwin wrote: >>> The branch main has been updated by jhb: >>>=20 >>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D24fd63e0970f91189dd2acde987bd2e4= c8c04a50 >>>=20 >>> commit 24fd63e0970f91189dd2acde987bd2e4c8c04a50 >>> Author: John Baldwin >>> AuthorDate: 2021-02-18 00:34:23 +0000 >>> Commit: John Baldwin >>> CommitDate: 2021-02-18 00:34:23 +0000 >>>=20 >>> mips: Don't set __NO_TLS to disable some uses of TLS. >>> __NO_TLS was originally added to disable use of _Thread in the = locale >>> code in libc in 82dd5016bd749d1d9e1531bd1703aebeecceab34. At = the time >>> libc did not support TLS on MIPS (I believe), but TLS support = was >>> added to libc (at least _set_tp.c) for MIPS about a month after >>> __NO_TLS was added, but __NO_TLS was still left around. >>> Reviewed by: imp >>> Sponsored by: DARPA >>> Differential Revision: https://reviews.freebsd.org/D28713 >>> --- >>> sys/sys/cdefs.h | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >>>=20 >>> diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h >>> index 64f26480a2f5..ff18911f6acf 100644 >>> --- a/sys/sys/cdefs.h >>> +++ b/sys/sys/cdefs.h >>> @@ -768,8 +768,7 @@ >>> #endif >>> #endif /* __STDC_WANT_LIB_EXT1__ */ >>> -#if defined(__mips) || \ >>> - (defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF =3D=3D= 1)) >>> +#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF =3D=3D= 1) >>> #define __NO_TLS 1 >>> #endif >>=20 >> It would be really nice to kill __NO_TLS entirely. There is at least = one >> unconditional use of _Thread_local (sorry, should have used that = instead >> of _Thread above) in libc in stdlib/cxa_thread_atexit_impl.c, so it = seems >> highly unlikely that TLS is actually broken on any of our platforms = as the >> libc build would have been broken instead. >=20 > There is a difference between compile and runtime. The mentioned libc > use in cxa_thread_atexit_impl.c is to support some (I believe) rarely > used C++ feature of thread-local storage with destructors, so it might > be simply not observed often. OTOH, locale functions infect almost > everything string-related in libc, so the breakage would be quite > visible. It's also used in jemalloc for tsd_initialized which is a rather key variable, so if TLS is broken you won't get very far in userspace (source: I had to debug implementing it for CHERI-MIPS), well before you even think about getting to locale functions. > But, I wonder, what does CALL_ELF mean? Is it for old 64bit PowerPC = ABI, > that was abandoned with the switch to ELFv2? Yes, _CALL_ELF =3D=3D 2 for ELFv2. I highly doubt the defines were = needed for the ELFv1 ABI, but they're especially redundant now. Presumably David's original fixed commit[1] added powerpc64 to that list because TLS wasn't yet supported in LLVM; that happened later in 2012 and our wiki changed it to being implemented in December 2012[2]. So I suspect it should have been deleted 8 years ago. Jess [1] b0968176b3a821598a31de6698e01931d1417584 [2] = https://wiki.freebsd.org/action/diff/BuildingFreeBSDWithClang?action=3Ddif= f&rev1=3D340&rev2=3D341 From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:08:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AA88C54ED7D for ; Thu, 18 Feb 2021 21:08: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 4DhS3r4P0zz3mk1; Thu, 18 Feb 2021 21:08: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 897C61F150; Thu, 18 Feb 2021 21:08: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 11IL8OtK085654; Thu, 18 Feb 2021 21:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IL8ODJ085652; Thu, 18 Feb 2021 21:08:24 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:08:24 GMT Message-Id: <202102182108.11IL8ODJ085652@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 3f8a54b20893 - vendor/libcxxrt - Import libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 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/vendor/libcxxrt X-Git-Reftype: branch X-Git-Commit: 3f8a54b20893fe39cf81775e18be6c4353bd2a48 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:08:24 -0000 The branch vendor/libcxxrt has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3f8a54b20893fe39cf81775e18be6c4353bd2a48 commit 3f8a54b20893fe39cf81775e18be6c4353bd2a48 Author: Dimitry Andric AuthorDate: 2021-02-18 21:07:28 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 21:07:28 +0000 Import libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 --- libelftc_dem_gnu3.c | 1189 +++++++++++++++++++++++++++++++++++---------------- unwind-arm.h | 6 +- unwind-itanium.h | 10 +- 3 files changed, 824 insertions(+), 381 deletions(-) diff --git a/libelftc_dem_gnu3.c b/libelftc_dem_gnu3.c index 14a9b7420095..6e88f7b4bb4c 100644 --- a/libelftc_dem_gnu3.c +++ b/libelftc_dem_gnu3.c @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2007, 2008 Hyogeol Lee + * Copyright (c) 2007 Hyogeol Lee + * Copyright (c) 2015-2017 Kai Wang * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -54,12 +55,17 @@ struct vector_str { }; #define BUFFER_GROWFACTOR 1.618 -#define VECTOR_DEF_CAPACITY 8 +#define BUFFER_GROW(x) (((x)+0.5)*BUFFER_GROWFACTOR) + +#define ELFTC_FAILURE 0 #define ELFTC_ISDIGIT(C) (isdigit((C) & 0xFF)) +#define ELFTC_SUCCESS 1 + +#define VECTOR_DEF_CAPACITY 8 enum type_qualifier { TYPE_PTR, TYPE_REF, TYPE_CMX, TYPE_IMG, TYPE_EXT, TYPE_RST, TYPE_VAT, - TYPE_CST, TYPE_VEC + TYPE_CST, TYPE_VEC, TYPE_RREF }; struct vector_type_qualifier { @@ -73,27 +79,47 @@ enum read_cmd { READ_TYPE, READ_FUNC, READ_PTRMEM }; +struct read_cmd_item { + enum read_cmd cmd; + void *data; +}; + struct vector_read_cmd { size_t size, capacity; - enum read_cmd *r_container; + struct read_cmd_item *r_container; +}; + +enum push_qualifier { + PUSH_ALL_QUALIFIER, + PUSH_CV_QUALIFIER, + PUSH_NON_CV_QUALIFIER, }; struct cpp_demangle_data { struct vector_str output; /* output string vector */ - struct vector_str output_tmp; struct vector_str subst; /* substitution string vector */ struct vector_str tmpl; struct vector_str class_type; + struct vector_str *cur_output; /* ptr to current output vec */ struct vector_read_cmd cmd; - bool paren; /* parenthesis opened */ - bool pfirst; /* first element of parameter */ bool mem_rst; /* restrict member function */ bool mem_vat; /* volatile member function */ bool mem_cst; /* const member function */ + bool mem_ref; /* lvalue-ref member func */ + bool mem_rref; /* rvalue-ref member func */ + bool is_tmpl; /* template args */ + bool is_functype; /* function type */ + bool ref_qualifier; /* ref qualifier */ + enum type_qualifier ref_qualifier_type; /* ref qualifier type */ + enum push_qualifier push_qualifier; /* which qualifiers to push */ int func_type; const char *cur; /* current mangled name ptr */ const char *last_sname; /* last source name */ - int push_head; +}; + +struct type_delimit { + bool paren; + bool firstp; }; #define CPP_DEMANGLE_TRY_LIMIT 128 @@ -102,6 +128,8 @@ struct cpp_demangle_data { #define FLOAT_EXTENED_BYTES 10 #define SIMPLE_HASH(x,y) (64 * x + y) +#define DEM_PUSH_STR(d,s) cpp_demangle_push_str((d), (s), strlen((s))) +#define VEC_PUSH_STR(d,s) vector_str_push((d), (s), strlen((s))) static size_t get_strlen_sum(const struct vector_str *v); static bool vector_str_grow(struct vector_str *v); @@ -213,7 +241,7 @@ vector_str_grow(struct vector_str *v) assert(v->capacity > 0); - tmp_cap = v->capacity * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(v->capacity); assert(tmp_cap > v->capacity); @@ -314,7 +342,7 @@ vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org) if (dst == NULL || org == NULL) return (false); - tmp_cap = (dst->size + org->size) * BUFFER_GROWFACTOR; + tmp_cap = BUFFER_GROW(dst->size + org->size); if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) return (false); @@ -341,6 +369,47 @@ vector_str_push_vector_head(struct vector_str *dst, struct vector_str *org) return (true); } +/** + * @brief Push org vector to the tail of det vector. + * @return false at failed, true at success. + */ +static bool +vector_str_push_vector(struct vector_str *dst, struct vector_str *org) +{ + size_t i, j, tmp_cap; + char **tmp_ctn; + + if (dst == NULL || org == NULL) + return (false); + + tmp_cap = BUFFER_GROW(dst->size + org->size); + + if ((tmp_ctn = malloc(sizeof(char *) * tmp_cap)) == NULL) + return (false); + + for (i = 0; i < dst->size; ++i) + tmp_ctn[i] = dst->container[i]; + + for (i = 0; i < org->size; ++i) + if ((tmp_ctn[i + dst->size] = strdup(org->container[i])) == + NULL) { + for (j = 0; j < i + dst->size; ++j) + free(tmp_ctn[j]); + + free(tmp_ctn); + + return (false); + } + + free(dst->container); + + dst->container = tmp_ctn; + dst->capacity = tmp_cap; + dst->size += org->size; + + return (true); +} + /** * @brief Get new allocated flat string from vector between begin and end. * @@ -387,6 +456,7 @@ static int cpp_demangle_push_fp(struct cpp_demangle_data *, char *(*)(const char *, size_t)); static int cpp_demangle_push_str(struct cpp_demangle_data *, const char *, size_t); +static int cpp_demangle_pop_str(struct cpp_demangle_data *); static int cpp_demangle_push_subst(struct cpp_demangle_data *, const char *, size_t); static int cpp_demangle_push_subst_v(struct cpp_demangle_data *, @@ -419,16 +489,18 @@ static int cpp_demangle_read_number_as_string(struct cpp_demangle_data *, static int cpp_demangle_read_nv_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset(struct cpp_demangle_data *); static int cpp_demangle_read_offset_number(struct cpp_demangle_data *); -static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *); +static int cpp_demangle_read_pointer_to_member(struct cpp_demangle_data *, + struct vector_type_qualifier *); static int cpp_demangle_read_sname(struct cpp_demangle_data *); static int cpp_demangle_read_subst(struct cpp_demangle_data *); static int cpp_demangle_read_subst_std(struct cpp_demangle_data *); static int cpp_demangle_read_subst_stdtmpl(struct cpp_demangle_data *, - const char *, size_t); + const char *); static int cpp_demangle_read_tmpl_arg(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_args(struct cpp_demangle_data *); static int cpp_demangle_read_tmpl_param(struct cpp_demangle_data *); -static int cpp_demangle_read_type(struct cpp_demangle_data *, int); +static int cpp_demangle_read_type(struct cpp_demangle_data *, + struct type_delimit *); static int cpp_demangle_read_type_flat(struct cpp_demangle_data *, char **); static int cpp_demangle_read_uqname(struct cpp_demangle_data *); @@ -440,10 +512,12 @@ static char *decode_fp_to_float80(const char *, size_t); static char *decode_fp_to_long_double(const char *, size_t); static int hex_to_dec(char); static void vector_read_cmd_dest(struct vector_read_cmd *); -static int vector_read_cmd_find(struct vector_read_cmd *, enum read_cmd); +static struct read_cmd_item *vector_read_cmd_find(struct vector_read_cmd *, + enum read_cmd); static int vector_read_cmd_init(struct vector_read_cmd *); static int vector_read_cmd_pop(struct vector_read_cmd *); -static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd); +static int vector_read_cmd_push(struct vector_read_cmd *, enum read_cmd, + void *); static void vector_type_qualifier_dest(struct vector_type_qualifier *); static int vector_type_qualifier_init(struct vector_type_qualifier *); static int vector_type_qualifier_push(struct vector_type_qualifier *, @@ -460,22 +534,17 @@ char * __cxa_demangle_gnu3(const char *org) { struct cpp_demangle_data ddata; + struct vector_str ret_type; + struct type_delimit td; ssize_t org_len; unsigned int limit; - char *rtn = NULL; + char *rtn; + bool has_ret, more_type; if (org == NULL) return (NULL); org_len = strlen(org); - if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { - if ((rtn = malloc(org_len + 19)) == NULL) - return (NULL); - snprintf(rtn, org_len + 19, - "global constructors keyed to %s", org + 11); - return (rtn); - } - // Try demangling as a type for short encodings if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { if (!cpp_demangle_data_init(&ddata, org)) @@ -485,43 +554,106 @@ __cxa_demangle_gnu3(const char *org) rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); goto clean; } + if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { + if ((rtn = malloc(org_len + 19)) == NULL) + return (NULL); + snprintf(rtn, org_len + 19, + "global constructors keyed to %s", org + 11); + return (rtn); + } if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); rtn = NULL; + has_ret = more_type = false; if (!cpp_demangle_read_encoding(&ddata)) goto clean; + /* + * Pop function name from substitution candidate list. + */ + if (*ddata.cur != 0 && ddata.subst.size >= 1) { + if (!vector_str_pop(&ddata.subst)) + goto clean; + } + + td.paren = false; + td.firstp = true; limit = 0; + + /* + * The first type is a return type if we just demangled template + * args. (the template args is right next to the function name, + * which means it's a template function) + */ + if (ddata.is_tmpl) { + ddata.is_tmpl = false; + if (!vector_str_init(&ret_type)) + goto clean; + ddata.cur_output = &ret_type; + has_ret = true; + } + while (*ddata.cur != '\0') { /* * Breaking at some gcc info at tail. e.g) @@GLIBCXX_3.4 */ if (*ddata.cur == '@' && *(ddata.cur + 1) == '@') break; - if (!cpp_demangle_read_type(&ddata, 1)) - goto clean; + + if (has_ret) { + /* Read return type */ + if (!cpp_demangle_read_type(&ddata, NULL)) + goto clean; + } else { + /* Read function arg type */ + if (!cpp_demangle_read_type(&ddata, &td)) + goto clean; + } + + if (has_ret) { + /* Push return type to the beginning */ + if (!VEC_PUSH_STR(&ret_type, " ")) + goto clean; + if (!vector_str_push_vector_head(&ddata.output, + &ret_type)) + goto clean; + ddata.cur_output = &ddata.output; + vector_str_dest(&ret_type); + has_ret = false; + more_type = true; + } else if (more_type) + more_type = false; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) goto clean; } + if (more_type) + goto clean; if (ddata.output.size == 0) goto clean; - if (ddata.paren && !vector_str_push(&ddata.output, ")", 1)) + if (td.paren && !VEC_PUSH_STR(&ddata.output, ")")) + goto clean; + if (ddata.mem_vat && !VEC_PUSH_STR(&ddata.output, " volatile")) + goto clean; + if (ddata.mem_cst && !VEC_PUSH_STR(&ddata.output, " const")) goto clean; - if (ddata.mem_vat && !vector_str_push(&ddata.output, " volatile", 9)) + if (ddata.mem_rst && !VEC_PUSH_STR(&ddata.output, " restrict")) goto clean; - if (ddata.mem_cst && !vector_str_push(&ddata.output, " const", 6)) + if (ddata.mem_ref && !VEC_PUSH_STR(&ddata.output, " &")) goto clean; - if (ddata.mem_rst && !vector_str_push(&ddata.output, " restrict", 9)) + if (ddata.mem_rref && !VEC_PUSH_STR(&ddata.output, " &&")) goto clean; rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); clean: + if (has_ret) + vector_str_dest(&ret_type); + cpp_demangle_data_dest(&ddata); return (rtn); @@ -538,7 +670,6 @@ cpp_demangle_data_dest(struct cpp_demangle_data *d) vector_str_dest(&d->class_type); vector_str_dest(&d->tmpl); vector_str_dest(&d->subst); - vector_str_dest(&d->output_tmp); vector_str_dest(&d->output); } @@ -551,43 +682,42 @@ cpp_demangle_data_init(struct cpp_demangle_data *d, const char *cur) if (!vector_str_init(&d->output)) return (0); - if (!vector_str_init(&d->output_tmp)) - goto clean1; if (!vector_str_init(&d->subst)) - goto clean2; + goto clean1; if (!vector_str_init(&d->tmpl)) - goto clean3; + goto clean2; if (!vector_str_init(&d->class_type)) - goto clean4; + goto clean3; if (!vector_read_cmd_init(&d->cmd)) - goto clean5; + goto clean4; assert(d->output.container != NULL); - assert(d->output_tmp.container != NULL); assert(d->subst.container != NULL); assert(d->tmpl.container != NULL); assert(d->class_type.container != NULL); - d->paren = false; - d->pfirst = false; d->mem_rst = false; d->mem_vat = false; d->mem_cst = false; + d->mem_ref = false; + d->mem_rref = false; + d->is_tmpl = false; + d->is_functype = false; + d->ref_qualifier = false; + d->push_qualifier = PUSH_ALL_QUALIFIER; d->func_type = 0; d->cur = cur; + d->cur_output = &d->output; d->last_sname = NULL; - d->push_head = 0; return (1); -clean5: - vector_str_dest(&d->class_type); clean4: - vector_str_dest(&d->tmpl); + vector_str_dest(&d->class_type); clean3: - vector_str_dest(&d->subst); + vector_str_dest(&d->tmpl); clean2: - vector_str_dest(&d->output_tmp); + vector_str_dest(&d->subst); clean1: vector_str_dest(&d->output); @@ -632,10 +762,24 @@ cpp_demangle_push_str(struct cpp_demangle_data *ddata, const char *str, if (ddata == NULL || str == NULL || len == 0) return (0); - if (ddata->push_head > 0) - return (vector_str_push(&ddata->output_tmp, str, len)); + /* + * is_tmpl is used to check if the type (function arg) is right next + * to template args, and should always be cleared whenever new string + * pushed. + */ + ddata->is_tmpl = false; - return (vector_str_push(&ddata->output, str, len)); + return (vector_str_push(ddata->cur_output, str, len)); +} + +static int +cpp_demangle_pop_str(struct cpp_demangle_data *ddata) +{ + + if (ddata == NULL) + return (0); + + return (vector_str_pop(ddata->cur_output)); } static int @@ -677,9 +821,11 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, struct vector_type_qualifier *v, const char *type_str) { struct vector_str subst_v; + enum type_qualifier t; size_t idx, e_idx, e_len; - int rtn; char *buf; + int rtn; + bool cv; if (ddata == NULL || v == NULL) return (0); @@ -691,18 +837,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, if (type_str != NULL) { if (!vector_str_init(&subst_v)) return (0); - if (!vector_str_push(&subst_v, type_str, strlen(type_str))) + if (!VEC_PUSH_STR(&subst_v, type_str)) goto clean; } + cv = true; e_idx = 0; while (idx > 0) { switch (v->q_container[idx - 1]) { case TYPE_PTR: - if (!cpp_demangle_push_str(ddata, "*", 1)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "*")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, "*", 1)) + if (!VEC_PUSH_STR(&subst_v, "*")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -711,10 +861,28 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_REF: - if (!cpp_demangle_push_str(ddata, "&", 1)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&")) + goto clean; + if (type_str != NULL) { + if (!VEC_PUSH_STR(&subst_v, "&")) + goto clean; + if (!cpp_demangle_push_subst_v(ddata, + &subst_v)) + goto clean; + } + break; + + case TYPE_RREF: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, "&&")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, "&", 1)) + if (!VEC_PUSH_STR(&subst_v, "&&")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -723,10 +891,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_CMX: - if (!cpp_demangle_push_str(ddata, " complex", 8)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, " complex")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " complex", 8)) + if (!VEC_PUSH_STR(&subst_v, " complex")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -735,11 +906,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_IMG: - if (!cpp_demangle_push_str(ddata, " imaginary", 10)) + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; + if (!DEM_PUSH_STR(ddata, " imaginary")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " imaginary", - 10)) + if (!VEC_PUSH_STR(&subst_v, " imaginary")) goto clean; if (!cpp_demangle_push_subst_v(ddata, &subst_v)) @@ -748,6 +921,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_EXT: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -759,14 +935,13 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, snprintf(buf, e_len + 2, " %s", v->ext_name.container[e_idx]); - if (!cpp_demangle_push_str(ddata, buf, e_len + 1)) { + if (!DEM_PUSH_STR(ddata, buf)) { free(buf); goto clean; } if (type_str != NULL) { - if (!vector_str_push(&subst_v, buf, - e_len + 1)) { + if (!VEC_PUSH_STR(&subst_v, buf)) { free(buf); goto clean; } @@ -781,11 +956,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_RST: - if (!cpp_demangle_push_str(ddata, " restrict", 9)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " restrict")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " restrict", 9)) + if (!VEC_PUSH_STR(&subst_v, " restrict")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -793,11 +979,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_VAT: - if (!cpp_demangle_push_str(ddata, " volatile", 9)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " volatile")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " volatile", 9)) + if (!VEC_PUSH_STR(&subst_v, " volatile")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -805,11 +1002,22 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_CST: - if (!cpp_demangle_push_str(ddata, " const", 6)) + if (ddata->push_qualifier == PUSH_NON_CV_QUALIFIER && + cv) + break; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER && !cv) + break; + if (!DEM_PUSH_STR(ddata, " const")) goto clean; if (type_str != NULL) { - if (!vector_str_push(&subst_v, " const", 6)) + if (!VEC_PUSH_STR(&subst_v, " const")) goto clean; + if (idx - 1 > 0) { + t = v->q_container[idx - 2]; + if (t == TYPE_RST || t == TYPE_VAT || + t == TYPE_CST) + break; + } if (!cpp_demangle_push_subst_v(ddata, &subst_v)) goto clean; @@ -817,6 +1025,9 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, break; case TYPE_VEC: + cv = false; + if (ddata->push_qualifier == PUSH_CV_QUALIFIER) + break; if (v->ext_name.size == 0 || e_idx > v->ext_name.size - 1) goto clean; @@ -827,13 +1038,12 @@ cpp_demangle_push_type_qualifier(struct cpp_demangle_data *ddata, goto clean; snprintf(buf, e_len + 12, " __vector(%s)", v->ext_name.container[e_idx]); - if (!cpp_demangle_push_str(ddata, buf, e_len + 11)) { + if (!DEM_PUSH_STR(ddata, buf)) { free(buf); goto clean; } if (type_str != NULL) { - if (!vector_str_push(&subst_v, buf, - e_len + 11)) { + if (!VEC_PUSH_STR(&subst_v, buf)) { free(buf); goto clean; } @@ -907,10 +1117,10 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddata) if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); - if (!cpp_demangle_push_str(ddata, "[]", 2)) + if (!DEM_PUSH_STR(ddata, "[]")) return (0); } else { if (ELFTC_ISDIGIT(*ddata->cur) != 0) { @@ -923,13 +1133,13 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddata) assert(num_len > 0); if (*(++ddata->cur) == '\0') return (0); - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); - if (!cpp_demangle_push_str(ddata, "[", 1)) + if (!DEM_PUSH_STR(ddata, "[")) return (0); if (!cpp_demangle_push_str(ddata, num, num_len)) return (0); - if (!cpp_demangle_push_str(ddata, "]", 1)) + if (!DEM_PUSH_STR(ddata, "]")) return (0); } else { p_idx = ddata->output.size; @@ -953,11 +1163,11 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddata) free(exp); return (0); } - if (!cpp_demangle_read_type(ddata, 0)) { + if (!cpp_demangle_read_type(ddata, NULL)) { free(exp); return (0); } - if (!cpp_demangle_push_str(ddata, "[", 1)) { + if (!DEM_PUSH_STR(ddata, "[")) { free(exp); return (0); } @@ -965,7 +1175,7 @@ cpp_demangle_read_array(struct cpp_demangle_data *ddata) free(exp); return (0); } - if (!cpp_demangle_push_str(ddata, "]", 1)) { + if (!DEM_PUSH_STR(ddata, "]")) { free(exp); return (0); } @@ -1001,10 +1211,10 @@ cpp_demangle_read_expr_primary(struct cpp_demangle_data *ddata) switch (*(++ddata->cur)) { case '0': ddata->cur += 2; - return (cpp_demangle_push_str(ddata, "false", 5)); + return (DEM_PUSH_STR(ddata, "false")); case '1': ddata->cur += 2; - return (cpp_demangle_push_str(ddata, "true", 4)); + return (DEM_PUSH_STR(ddata, "true")); default: return (0); } @@ -1041,7 +1251,7 @@ cpp_demangle_read_expr_primary(struct cpp_demangle_data *ddata) case 'x': case 'y': if (*(++ddata->cur) == 'n') { - if (!cpp_demangle_push_str(ddata, "-", 1)) + if (!DEM_PUSH_STR(ddata, "-")) return (0); ++ddata->cur; } @@ -1070,11 +1280,11 @@ cpp_demangle_read_expression(struct cpp_demangle_data *ddata) switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('s', 't'): ddata->cur += 2; - return (cpp_demangle_read_type(ddata, 0)); + return (cpp_demangle_read_type(ddata, NULL)); case SIMPLE_HASH('s', 'r'): ddata->cur += 2; - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, NULL)) return (0); if (!cpp_demangle_read_uqname(ddata)) return (0); @@ -1351,8 +1561,7 @@ cpp_demangle_read_expression_flat(struct cpp_demangle_data *ddata, char **str) size_t i, p_idx, idx, exp_len; char *exp; - output = ddata->push_head > 0 ? &ddata->output_tmp : - &ddata->output; + output = &ddata->output; p_idx = output->size; @@ -1429,8 +1638,12 @@ static int cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, struct vector_type_qualifier *v) { + struct type_delimit td; + struct read_cmd_item *rc; size_t class_type_size, class_type_len, limit; const char *class_type; + int i; + bool paren, non_cv_qualifier; if (ddata == NULL || *ddata->cur != 'F' || v == NULL) return (0); @@ -1441,12 +1654,43 @@ cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, *ext_c = 1; ++ddata->cur; } - if (!cpp_demangle_read_type(ddata, 0)) + + /* Return type */ + if (!cpp_demangle_read_type(ddata, NULL)) return (0); + if (*ddata->cur != 'E') { - if (!cpp_demangle_push_str(ddata, "(", 1)) + if (!DEM_PUSH_STR(ddata, " ")) return (0); - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM)) { + + non_cv_qualifier = false; + if (v->size > 0) { + for (i = 0; (size_t) i < v->size; i++) { + if (v->q_container[i] != TYPE_RST && + v->q_container[i] != TYPE_VAT && + v->q_container[i] != TYPE_CST) { + non_cv_qualifier = true; + break; + } + } + } + + paren = false; + rc = vector_read_cmd_find(&ddata->cmd, READ_PTRMEM); + if (non_cv_qualifier || rc != NULL) { + if (!DEM_PUSH_STR(ddata, "(")) + return (0); + paren = true; + } + + /* Push non-cv qualifiers. */ + ddata->push_qualifier = PUSH_NON_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) + return (0); + + if (rc) { + if (non_cv_qualifier && !DEM_PUSH_STR(ddata, " ")) + return (0); if ((class_type_size = ddata->class_type.size) == 0) return (0); class_type = @@ -1458,42 +1702,69 @@ cpp_demangle_read_function(struct cpp_demangle_data *ddata, int *ext_c, if (!cpp_demangle_push_str(ddata, class_type, class_type_len)) return (0); - if (!cpp_demangle_push_str(ddata, "::*", 3)) + if (!DEM_PUSH_STR(ddata, "::*")) return (0); - ++ddata->func_type; - } else { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) - return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) + /* Push pointer-to-member qualifiers. */ + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, rc->data, + NULL)) return (0); + ++ddata->func_type; } - if (!cpp_demangle_push_str(ddata, ")(", 2)) - return (0); + if (paren) { + if (!DEM_PUSH_STR(ddata, ")")) + return (0); + paren = false; + } + td.paren = false; + td.firstp = true; limit = 0; + ddata->is_functype = true; for (;;) { - if (!cpp_demangle_read_type(ddata, 0)) + if (!cpp_demangle_read_type(ddata, &td)) return (0); if (*ddata->cur == 'E') break; if (limit++ > CPP_DEMANGLE_TRY_LIMIT) return (0); } - - if (vector_read_cmd_find(&ddata->cmd, READ_PTRMEM) == 1) { - if (!cpp_demangle_push_type_qualifier(ddata, v, - (const char *) NULL)) - return (0); - vector_type_qualifier_dest(v); - if (!vector_type_qualifier_init(v)) + ddata->is_functype = false; + if (td.paren) { + if (!DEM_PUSH_STR(ddata, ")")) return (0); + td.paren = false; } - if (!cpp_demangle_push_str(ddata, ")", 1)) + /* Push CV qualifiers. */ + ddata->push_qualifier = PUSH_CV_QUALIFIER; + if (!cpp_demangle_push_type_qualifier(ddata, v, NULL)) return (0); + + ddata->push_qualifier = PUSH_ALL_QUALIFIER; + + /* Release type qualifier vector. */ + vector_type_qualifier_dest(v); + if (!vector_type_qualifier_init(v)) + return (0); + + /* Push ref-qualifiers. */ + if (ddata->ref_qualifier) { + switch (ddata->ref_qualifier_type) { + case TYPE_REF: + if (!DEM_PUSH_STR(ddata, " &")) + return (0); + break; + case TYPE_RREF: + if (!DEM_PUSH_STR(ddata, " &&")) + return (0); + break; + default: + return (0); + } + ddata->ref_qualifier = false; + } } ++ddata->cur; @@ -1515,7 +1786,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) /* special name */ switch (SIMPLE_HASH(*ddata->cur, *(ddata->cur + 1))) { case SIMPLE_HASH('G', 'A'): - if (!cpp_demangle_push_str(ddata, "hidden alias for ", 17)) + if (!DEM_PUSH_STR(ddata, "hidden alias for ")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1523,7 +1794,7 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) return (cpp_demangle_read_encoding(ddata)); case SIMPLE_HASH('G', 'R'): - if (!cpp_demangle_push_str(ddata, "reference temporary #", 21)) + if (!DEM_PUSH_STR(ddata, "reference temporary #")) return (0); ddata->cur += 2; if (*ddata->cur == '\0') @@ -1533,11 +1804,11 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) rtn = 0; if (!cpp_demangle_read_number_as_string(ddata, &num_str)) goto clean1; - if (!cpp_demangle_push_str(ddata, num_str, strlen(num_str))) + if (!DEM_PUSH_STR(ddata, num_str)) goto clean2; - if (!cpp_demangle_push_str(ddata, " for ", 5)) + if (!DEM_PUSH_STR(ddata, " for ")) goto clean2; - if (!cpp_demangle_push_str(ddata, name, strlen(name))) + if (!DEM_PUSH_STR(ddata, name)) goto clean2; rtn = 1; clean2: @@ -1552,14 +1823,12 @@ cpp_demangle_read_encoding(struct cpp_demangle_data *ddata) return (0); switch (*ddata->cur) { case 'n': - if (!cpp_demangle_push_str(ddata, - "non-transaction clone for ", 26)) + if (!DEM_PUSH_STR(ddata, "non-transaction clone for ")) return (0); break; case 't': default: - if (!cpp_demangle_push_str(ddata, - "transaction clone for ", 22)) + if (!DEM_PUSH_STR(ddata, "transaction clone for ")) return (0); *** 1846 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:08:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CB53954F026 for ; Thu, 18 Feb 2021 21:08: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 4DhS3s5NQ5z3mt2; Thu, 18 Feb 2021 21:08: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 AB6F71F2BA; Thu, 18 Feb 2021 21:08: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 11IL8PcE085679; Thu, 18 Feb 2021 21:08:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IL8PgW085678; Thu, 18 Feb 2021 21:08:25 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:08:25 GMT Message-Id: <202102182108.11IL8PgW085678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 0faa572c4fbf - Create tag vendor/libcxxrt/2021-02-18-8049924686b8414d8e652cbd2a52c763b48e8456 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/tags/vendor/libcxxrt/2021-02-18-8049924686b8414d8e652cbd2a52c763b48e8456 X-Git-Reftype: annotated tag X-Git-Commit: 0faa572c4fbf6846f095fc88d1c83a01c71bcfa9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:08:25 -0000 The annotated tag vendor/libcxxrt/2021-02-18-8049924686b8414d8e652cbd2a52c763b48e8456 has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/libcxxrt/2021-02-18-8049924686b8414d8e652cbd2a52c763b48e8456 tag vendor/libcxxrt/2021-02-18-8049924686b8414d8e652cbd2a52c763b48e8456 Tagger: Dimitry Andric TaggerDate: 2021-02-18 21:07:58 +0000 Tag libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456. commit 3f8a54b20893fe39cf81775e18be6c4353bd2a48 Author: Dimitry Andric AuthorDate: 2021-02-18 21:07:28 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 21:07:28 +0000 Import libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:19:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A9D9154F7A4; Thu, 18 Feb 2021 21:19: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 4DhSJm4RR3z3nwl; Thu, 18 Feb 2021 21:19: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 8B2D41F732; Thu, 18 Feb 2021 21:19: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 11ILJaJu098875; Thu, 18 Feb 2021 21:19:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ILJaaE098874; Thu, 18 Feb 2021 21:19:36 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:19:36 GMT Message-Id: <202102182119.11ILJaaE098874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 04d2d2d7fd22 - main - cgem: improve usage of busdma(9) KPI 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/main X-Git-Reftype: branch X-Git-Commit: 04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:19:36 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 commit 04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 Author: Mitchell Horne AuthorDate: 2021-01-20 15:07:53 +0000 Commit: Mitchell Horne CommitDate: 2021-02-18 21:17:41 +0000 cgem: improve usage of busdma(9) KPI BUS_DMA_NOCACHE should only be used when one needs to guarantee the created mapping has uncached memory attributes, usually as a result of buggy hardware. Normal use cases should pass BUS_DMA_COHERENT, to create an appropriate mapping based on the flags passed to bus_dma_tag_create(). This should have no functional change, since the DMA tags in this driver are created without the BUS_DMA_COHERENT flag. Reported by: mmel Reviewed by: mmel, Thomas Skibo MFC after: 3 days --- sys/dev/cadence/if_cgem.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c index 81fc39b831af..0583e846458a 100644 --- a/sys/dev/cadence/if_cgem.c +++ b/sys/dev/cadence/if_cgem.c @@ -443,17 +443,13 @@ cgem_setup_descs(struct cgem_softc *sc) return (err); /* - * Allocate DMA memory in non-cacheable space. We allocate transmit, - * receive and null descriptor queues all at once because the - * hardware only provides one register for the upper 32 bits of - * rx and tx descriptor queues hardware addresses. + * Allocate DMA memory. We allocate transmit, receive and null + * descriptor queues all at once because the hardware only provides + * one register for the upper 32 bits of rx and tx descriptor queues + * hardware addresses. */ err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->rxring, -#ifdef __arm__ BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, -#else - BUS_DMA_NOWAIT | BUS_DMA_NOCACHE | BUS_DMA_ZERO, -#endif &sc->rxring_dma_map); if (err) return (err); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:21:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 55C8B54F775; Thu, 18 Feb 2021 21:21:40 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhSM81zX2z3pKC; Thu, 18 Feb 2021 21:21:40 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: mhorne) by smtp.freebsd.org (Postfix) with ESMTPSA id 36E619A53; Thu, 18 Feb 2021 21:21:40 +0000 (UTC) (envelope-from mhorne@freebsd.org) Received: by mail-yb1-f173.google.com with SMTP id p186so3589469ybg.2; Thu, 18 Feb 2021 13:21:40 -0800 (PST) X-Gm-Message-State: AOAM533yZKIPGIXfmQO3ZesOmCpnyRNDZGLj5eWRkbgeiniAa2KoNxfR cvhJCkOaBAgxXDZ7B31c1SxFbf2DoHpVzCp+pTs= X-Google-Smtp-Source: ABdhPJxknUZhqO1EnqRePs4OJhU2FQ03xalH1urA/pk4ZQQOsDF++eHGX6SM5S+FSKprg0+pmz0ekP8nTPZsgqnCetc= X-Received: by 2002:a05:6902:4b2:: with SMTP id r18mr9622528ybs.226.1613683299756; Thu, 18 Feb 2021 13:21:39 -0800 (PST) MIME-Version: 1.0 References: <202102182119.11ILJaaE098874@gitrepo.freebsd.org> In-Reply-To: <202102182119.11ILJaaE098874@gitrepo.freebsd.org> From: Mitchell Horne Date: Thu, 18 Feb 2021 17:21:28 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 04d2d2d7fd22 - main - cgem: improve usage of busdma(9) KPI To: Mitchell Horne Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:21:40 -0000 On Thu, Feb 18, 2021 at 5:19 PM Mitchell Horne wrote: > > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 > > commit 04d2d2d7fd22bba638ccb5a0b2e0805087a70cd3 > Author: Mitchell Horne > AuthorDate: 2021-01-20 15:07:53 +0000 > Commit: Mitchell Horne > CommitDate: 2021-02-18 21:17:41 +0000 > > cgem: improve usage of busdma(9) KPI > > BUS_DMA_NOCACHE should only be used when one needs to guarantee the > created mapping has uncached memory attributes, usually as a result > of buggy hardware. Normal use cases should pass BUS_DMA_COHERENT, to > create an appropriate mapping based on the flags passed to > bus_dma_tag_create(). > > This should have no functional change, since the DMA tags in this driver > are created without the BUS_DMA_COHERENT flag. > > Reported by: mmel > Reviewed by: mmel, Thomas Skibo > MFC after: 3 days Whoops, forgot to include: Differential Revision: https://reviews.freebsd.org/D28775 > --- > sys/dev/cadence/if_cgem.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/sys/dev/cadence/if_cgem.c b/sys/dev/cadence/if_cgem.c > index 81fc39b831af..0583e846458a 100644 > --- a/sys/dev/cadence/if_cgem.c > +++ b/sys/dev/cadence/if_cgem.c > @@ -443,17 +443,13 @@ cgem_setup_descs(struct cgem_softc *sc) > return (err); > > /* > - * Allocate DMA memory in non-cacheable space. We allocate transmit, > - * receive and null descriptor queues all at once because the > - * hardware only provides one register for the upper 32 bits of > - * rx and tx descriptor queues hardware addresses. > + * Allocate DMA memory. We allocate transmit, receive and null > + * descriptor queues all at once because the hardware only provides > + * one register for the upper 32 bits of rx and tx descriptor queues > + * hardware addresses. > */ > err = bus_dmamem_alloc(sc->desc_dma_tag, (void **)&sc->rxring, > -#ifdef __arm__ > BUS_DMA_NOWAIT | BUS_DMA_COHERENT | BUS_DMA_ZERO, > -#else > - BUS_DMA_NOWAIT | BUS_DMA_NOCACHE | BUS_DMA_ZERO, > -#endif > &sc->rxring_dma_map); > if (err) > return (err); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:30:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 59C3854FED2; Thu, 18 Feb 2021 21:30:51 +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 4DhSYl288mz3qNl; Thu, 18 Feb 2021 21:30:51 +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 3C59B1FAF0; Thu, 18 Feb 2021 21:30:51 +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 11ILUp6p020064; Thu, 18 Feb 2021 21:30:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ILUpXB020063; Thu, 18 Feb 2021 21:30:51 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:30:51 GMT Message-Id: <202102182130.11ILUpXB020063@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 0ee0dbfb0d26 - main - Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 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/main X-Git-Reftype: branch X-Git-Commit: 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:30:51 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 Merge: 04d2d2d7fd22 3f8a54b20893 Author: Dimitry Andric AuthorDate: 2021-02-18 21:30:27 +0000 Commit: Dimitry Andric CommitDate: 2021-02-18 21:30:27 +0000 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 Reported by: arichardson PR: 253226 MFC after: 3 days contrib/libcxxrt/libelftc_dem_gnu3.c | 14 +++++++++++--- contrib/libcxxrt/unwind-arm.h | 3 ++- contrib/libcxxrt/unwind-itanium.h | 10 +++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --cc contrib/libcxxrt/unwind-arm.h index a4bf1bd058bc,000000000000..ec81237e573b mode 100644,000000..100644 --- a/contrib/libcxxrt/unwind-arm.h +++ b/contrib/libcxxrt/unwind-arm.h @@@ -1,230 -1,0 +1,231 @@@ +/* + * Copyright 2012 David Chisnall. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* For uint32_t and uint64_t */ +#include + +/** + * ARM-specific unwind definitions. These are taken from the ARM EHABI + * specification. + */ + typedef enum +{ ++ _URC_NO_REASON = 0, + _URC_OK = 0, /* operation completed successfully */ + _URC_FOREIGN_EXCEPTION_CAUGHT = 1, + _URC_END_OF_STACK = 5, + _URC_HANDLER_FOUND = 6, + _URC_INSTALL_CONTEXT = 7, + _URC_CONTINUE_UNWIND = 8, + _URC_FAILURE = 9, /* unspecified failure of some kind */ + _URC_FATAL_PHASE1_ERROR = _URC_FAILURE +} _Unwind_Reason_Code; + +typedef int _Unwind_Action; + +typedef uint32_t _Unwind_State; +#ifdef __clang__ +static const _Unwind_State _US_VIRTUAL_UNWIND_FRAME = 0; +static const _Unwind_State _US_UNWIND_FRAME_STARTING = 1; +static const _Unwind_State _US_UNWIND_FRAME_RESUME = 2; +static const _Unwind_State _US_ACTION_MASK = 3; +#else // GCC fails at knowing what a constant expression is +# define _US_VIRTUAL_UNWIND_FRAME 0 +# define _US_UNWIND_FRAME_STARTING 1 +# define _US_UNWIND_FRAME_RESUME 2 +# define _US_ACTION_MASK 3 +#endif + +typedef struct _Unwind_Context _Unwind_Context; + +typedef uint32_t _Unwind_EHT_Header; + +struct _Unwind_Exception +{ + uint64_t exception_class; + void (*exception_cleanup)(_Unwind_Reason_Code, struct _Unwind_Exception *); + /* Unwinder cache, private fields for the unwinder's use */ + struct + { + uint32_t reserved1; + uint32_t reserved2; + uint32_t reserved3; + uint32_t reserved4; + uint32_t reserved5; + /* init reserved1 to 0, then don't touch */ + } unwinder_cache; + /* Propagation barrier cache (valid after phase 1): */ + struct + { + uint32_t sp; + uint32_t bitpattern[5]; + } barrier_cache; + /* Cleanup cache (preserved over cleanup): */ + struct + { + uint32_t bitpattern[4]; + } cleanup_cache; + /* Pr cache (for pr's benefit): */ + struct + { + /** function start address */ + uint32_t fnstart; + /** pointer to EHT entry header word */ + _Unwind_EHT_Header *ehtp; + /** additional data */ + uint32_t additional; + uint32_t reserved1; + } pr_cache; + /** Force alignment of next item to 8-byte boundary */ + long long int :0; - }; ++} __attribute__((__aligned__(8))); + +/* Unwinding functions */ +_Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *ucbp); +void _Unwind_Resume(struct _Unwind_Exception *ucbp); +void _Unwind_Complete(struct _Unwind_Exception *ucbp); +void _Unwind_DeleteException(struct _Unwind_Exception *ucbp); +void *_Unwind_GetLanguageSpecificData(struct _Unwind_Context*); + +typedef enum +{ + _UVRSR_OK = 0, + _UVRSR_NOT_IMPLEMENTED = 1, + _UVRSR_FAILED = 2 +} _Unwind_VRS_Result; +typedef enum +{ + _UVRSC_CORE = 0, + _UVRSC_VFP = 1, + _UVRSC_WMMXD = 3, + _UVRSC_WMMXC = 4 +} _Unwind_VRS_RegClass; +typedef enum +{ + _UVRSD_UINT32 = 0, + _UVRSD_VFPX = 1, + _UVRSD_UINT64 = 3, + _UVRSD_FLOAT = 4, + _UVRSD_DOUBLE = 5 +} _Unwind_VRS_DataRepresentation; + +_Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context, + _Unwind_VRS_RegClass regclass, + uint32_t regno, + _Unwind_VRS_DataRepresentation representation, + void *valuep); +_Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *context, + _Unwind_VRS_RegClass regclass, + uint32_t regno, + _Unwind_VRS_DataRepresentation representation, + void *valuep); + +/* Return the base-address for data references. */ +extern unsigned long _Unwind_GetDataRelBase(struct _Unwind_Context *); + +/* Return the base-address for text references. */ +extern unsigned long _Unwind_GetTextRelBase(struct _Unwind_Context *); +extern unsigned long _Unwind_GetRegionStart(struct _Unwind_Context *); + +typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn) (struct _Unwind_Context *, + void *); +extern _Unwind_Reason_Code _Unwind_Backtrace (_Unwind_Trace_Fn, void *); +extern _Unwind_Reason_Code + _Unwind_Resume_or_Rethrow (struct _Unwind_Exception *); + +/** + * The next set of functions are compatibility extensions, implementing Itanium + * ABI functions on top of ARM ones. + */ + +#define _UA_SEARCH_PHASE 1 +#define _UA_CLEANUP_PHASE 2 +#define _UA_HANDLER_FRAME 4 +#define _UA_FORCE_UNWIND 8 + +static inline unsigned long _Unwind_GetGR(struct _Unwind_Context *context, int reg) +{ + unsigned long val; + _Unwind_VRS_Get(context, _UVRSC_CORE, reg, _UVRSD_UINT32, &val); + return val; +} +static inline void _Unwind_SetGR(struct _Unwind_Context *context, int reg, unsigned long val) +{ + _Unwind_VRS_Set(context, _UVRSC_CORE, reg, _UVRSD_UINT32, &val); +} +static inline unsigned long _Unwind_GetIP(_Unwind_Context *context) +{ + // Low bit store the thumb state - discard it + return _Unwind_GetGR(context, 15) & ~1; +} +static inline void _Unwind_SetIP(_Unwind_Context *context, unsigned long val) +{ + // The lowest bit of the instruction pointer indicates whether we're in + // thumb or ARM mode. This is assumed to be fixed throughout a function, + // so must be propagated when setting the program counter. + unsigned long thumbState = _Unwind_GetGR(context, 15) & 1; + _Unwind_SetGR(context, 15, (val | thumbState)); +} + +/** GNU API function that unwinds the frame */ +_Unwind_Reason_Code __gnu_unwind_frame(struct _Unwind_Exception*, struct _Unwind_Context*); + + +#define DECLARE_PERSONALITY_FUNCTION(name) \ +_Unwind_Reason_Code name(_Unwind_State state,\ + struct _Unwind_Exception *exceptionObject,\ + struct _Unwind_Context *context); + +#define BEGIN_PERSONALITY_FUNCTION(name) \ +_Unwind_Reason_Code name(_Unwind_State state,\ + struct _Unwind_Exception *exceptionObject,\ + struct _Unwind_Context *context)\ +{\ + int version = 1;\ + uint64_t exceptionClass = exceptionObject->exception_class;\ + int actions;\ + switch (state)\ + {\ + default: return _URC_FAILURE;\ + case _US_VIRTUAL_UNWIND_FRAME:\ + {\ + actions = _UA_SEARCH_PHASE;\ + break;\ + }\ + case _US_UNWIND_FRAME_STARTING:\ + {\ + actions = _UA_CLEANUP_PHASE;\ + if (exceptionObject->barrier_cache.sp == _Unwind_GetGR(context, 13))\ + {\ + actions |= _UA_HANDLER_FRAME;\ + }\ + break;\ + }\ + case _US_UNWIND_FRAME_RESUME:\ + {\ + return continueUnwinding(exceptionObject, context);\ + break;\ + }\ + }\ + _Unwind_SetGR (context, 12, reinterpret_cast(exceptionObject));\ + +#define CALL_PERSONALITY_FUNCTION(name) name(state,exceptionObject,context) From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:33:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A3DC85284A1; Thu, 18 Feb 2021 21:33: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 4DhScV4Dfwz3qQr; Thu, 18 Feb 2021 21:33: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 83FB31FB9C; Thu, 18 Feb 2021 21:33: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 11ILXEm0024510; Thu, 18 Feb 2021 21:33:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ILXECI024509; Thu, 18 Feb 2021 21:33:14 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:33:14 GMT Message-Id: <202102182133.11ILXECI024509@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: c67a2909a629 - main - Move XPT_IMMEDIATE_NOTIFY handling out of periph lock. 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/main X-Git-Reftype: branch X-Git-Commit: c67a2909a629db138227993e1093e66bb6c00af5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:33:14 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=c67a2909a629db138227993e1093e66bb6c00af5 commit c67a2909a629db138227993e1093e66bb6c00af5 Author: Alexander Motin AuthorDate: 2021-02-18 21:22:01 +0000 Commit: Alexander Motin CommitDate: 2021-02-18 21:31:38 +0000 Move XPT_IMMEDIATE_NOTIFY handling out of periph lock. It is a rare, but still better to not have lock dependencies. MFC after: 1 month --- sys/cam/ctl/scsi_ctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 074ac4cd1894..34c3ce7ad923 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1491,6 +1491,7 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb) ctlfe_free_ccb(periph, done_ccb); goto out; } + mtx_unlock(mtx); if (send_ctl_io != 0) { ctl_queue(io); } else { @@ -1498,7 +1499,7 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb) done_ccb->ccb_h.func_code = XPT_NOTIFY_ACKNOWLEDGE; xpt_action(done_ccb); } - break; + return; } case XPT_NOTIFY_ACKNOWLEDGE: /* Queue this back down to the SIM as an immediate notify. */ From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:50:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2B0E65293D6; Thu, 18 Feb 2021 21:50: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 4DhT0c0gVWz3rtg; Thu, 18 Feb 2021 21:50: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 09F341FDB2; Thu, 18 Feb 2021 21:50: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 11ILod17046034; Thu, 18 Feb 2021 21:50:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ILodM0046033; Thu, 18 Feb 2021 21:50:39 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:50:39 GMT Message-Id: <202102182150.11ILodM0046033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: f49177221ace - releng/13.0 - mrsas: update man page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: f49177221ace86147cf1db00749ad74d4a0b1816 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:50:40 -0000 The branch releng/13.0 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=f49177221ace86147cf1db00749ad74d4a0b1816 commit f49177221ace86147cf1db00749ad74d4a0b1816 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-04 06:13:13 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-18 21:50:08 +0000 mrsas: update man page update mrsas(4) since big-endian is supported since e34a057ca6ebdf8e30ec8b0dc21d18eb450bf36a Approved by: re (gjb) Reviewed by: bdragon, gbe Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit 20e1817f9a68abd9a232367e04d2afeaf4a3c2f8) (cherry picked from commit 467f2b64dbc3da664bf1808fd6fc0f8a7f2c6842) --- share/man/man4/mrsas.4 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index fb2288d91f80..0528ee2fa1bd 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2019 +.Dd February 4, 2021 .Dt MRSAS 4 .Os .Sh NAME @@ -385,8 +385,6 @@ The driver and this manual page were written by .An Kashyap Desai Aq Mt Kashyap.Desai@lsi.com . .Sh TODO -The driver does not support big-endian architectures at this time. -.Pp The driver does not support alias for device name (it is required when the user switches between two drivers and does not want to edit .Pa /etc/fstab From owner-dev-commits-src-all@freebsd.org Thu Feb 18 21:50:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 70DA6529526; Thu, 18 Feb 2021 21:50: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 4DhT0d1bqrz3rwV; Thu, 18 Feb 2021 21:50: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 29CD81FCCF; Thu, 18 Feb 2021 21:50: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 11ILofBJ046057; Thu, 18 Feb 2021 21:50:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11ILofFi046056; Thu, 18 Feb 2021 21:50:41 GMT (envelope-from git) Date: Thu, 18 Feb 2021 21:50:41 GMT Message-Id: <202102182150.11ILofFi046056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: c3942b4284d1 - releng/13.0 - [POWERPC64LE] add mrsas to GENERIC64LE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: c3942b4284d10d5a811bdfffb99477772e6c7f76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 21:50:41 -0000 The branch releng/13.0 has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=c3942b4284d10d5a811bdfffb99477772e6c7f76 commit c3942b4284d10d5a811bdfffb99477772e6c7f76 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-04 06:12:38 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-18 21:50:19 +0000 [POWERPC64LE] add mrsas to GENERIC64LE Approved by: re (gjb) Reviewed by: bdragon Sponsored by: Eldorado Research Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28475 (cherry picked from commit eaffd270d8729c4d79f6ce268275ef4c0e6f7b04) (cherry picked from commit 928cbdbe39109cdc0075e4cc1a6aa144a8ef8146) --- sys/powerpc/conf/GENERIC64LE | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index d3b00a63c31f..b94eac412b1e 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -127,6 +127,7 @@ device ahc # AHA2940 and onboard AIC7xxx devices options AHC_ALLOW_MEMIO # Attempt to use memory mapped I/O device isp # Qlogic family device ispfw # Firmware module for Qlogic host adapters +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device mpt # LSI-Logic MPT-Fusion device mps # LSI-Logic MPT-Fusion 2 device sym # NCR/Symbios/LSI Logic 53C8XX/53C1010/53C1510D From owner-dev-commits-src-all@freebsd.org Thu Feb 18 22:01:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 78A4B529BC4; Thu, 18 Feb 2021 22:01: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 4DhTDn1Nzwz3sqP; Thu, 18 Feb 2021 22:01: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 19262202A1; Thu, 18 Feb 2021 22:01: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 11IM1CY1060312; Thu, 18 Feb 2021 22:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IM1CDI060311; Thu, 18 Feb 2021 22:01:12 GMT (envelope-from git) Date: Thu, 18 Feb 2021 22:01:12 GMT Message-Id: <202102182201.11IM1CDI060311@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: 03c31d3ca31a - releng/13.0 - vt: terminal size can grow too big with small font MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 03c31d3ca31ab211055e01aae6b8a81c27d1a29b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 22:01:15 -0000 The branch releng/13.0 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=03c31d3ca31ab211055e01aae6b8a81c27d1a29b commit 03c31d3ca31ab211055e01aae6b8a81c27d1a29b Author: Toomas Soome AuthorDate: 2021-01-21 22:18:56 +0000 Commit: Toomas Soome CommitDate: 2021-02-18 08:22:43 +0000 vt: terminal size can grow too big with small font vt is using static buffers for on screen data, the buffer size is calculated based on maximum supported screen size and 8x16 font. When using hi-res graphics and very smaller than 8x16 font, we need to be careful not to overflow static buffers in vt. Testing: I did test by building smaller buffers than vt currently is using, royger was testing on actual 4k capable hardware. Tested by: royger (cherry picked from commit 32bf05ad89aaa93f4dd27e3721f4cb52cf57fa03) Approved by: re(gjb) --- sys/dev/vt/vt_core.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 05c383829f49..e4a8288962c4 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -640,8 +640,10 @@ vt_termsize(struct vt_device *vd, struct vt_font *vf, term_pos_t *size) size->tp_row -= vt_logo_sprite_height; size->tp_col = vd->vd_width; if (vf != NULL) { - size->tp_row /= vf->vf_height; - size->tp_col /= vf->vf_width; + size->tp_row = MIN(size->tp_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + size->tp_col = MIN(size->tp_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } @@ -660,8 +662,10 @@ vt_termrect(struct vt_device *vd, struct vt_font *vf, term_rect_t *rect) rect->tr_begin.tp_row = howmany(rect->tr_begin.tp_row, vf->vf_height); - rect->tr_end.tp_row /= vf->vf_height; - rect->tr_end.tp_col /= vf->vf_width; + rect->tr_end.tp_row = MIN(rect->tr_end.tp_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + rect->tr_end.tp_col = MIN(rect->tr_end.tp_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } @@ -675,8 +679,10 @@ vt_winsize(struct vt_device *vd, struct vt_font *vf, struct winsize *size) size->ws_row = size->ws_ypixel; size->ws_col = size->ws_xpixel = vd->vd_width; if (vf != NULL) { - size->ws_row /= vf->vf_height; - size->ws_col /= vf->vf_width; + size->ws_row = MIN(size->ws_row / vf->vf_height, + PIXEL_HEIGHT(VT_FB_MAX_HEIGHT)); + size->ws_col = MIN(size->ws_col / vf->vf_width, + PIXEL_WIDTH(VT_FB_MAX_WIDTH)); } } From owner-dev-commits-src-all@freebsd.org Thu Feb 18 22:02:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C8E6152A086; Thu, 18 Feb 2021 22:02: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 4DhTGS5Ltsz3tMP; Thu, 18 Feb 2021 22:02: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 AA913202B9; Thu, 18 Feb 2021 22:02: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 11IM2ePe064525; Thu, 18 Feb 2021 22:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IM2eiW064524; Thu, 18 Feb 2021 22:02:40 GMT (envelope-from git) Date: Thu, 18 Feb 2021 22:02:40 GMT Message-Id: <202102182202.11IM2eiW064524@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: d560d01b02a1 - releng/13.0 - loader: remove BORDER_PIXELS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: d560d01b02a17cb917d887a64aaf74a046b29efe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 22:02:40 -0000 The branch releng/13.0 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=d560d01b02a17cb917d887a64aaf74a046b29efe commit d560d01b02a17cb917d887a64aaf74a046b29efe Author: Toomas Soome AuthorDate: 2021-02-08 18:49:09 +0000 Commit: Toomas Soome CommitDate: 2021-02-18 08:23:57 +0000 loader: remove BORDER_PIXELS BORDER_PIXELS is left over from picking up the source from illumos port. Since FreeBSD VT does not use border in terminal size calculation, there is no reason why should loader use it. (cherry picked from commit 96bef2053a87c8d01ce08ea88857e4657489c8e7) Approved by: re (gjb) --- stand/common/gfx_fb.c | 23 ++++++++--------------- stand/i386/libi386/vidconsole.c | 4 ++-- stand/lua/drawer.lua | 2 +- sys/sys/font.h | 1 - 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 08c0f59505f2..2aed8775a540 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1888,25 +1888,18 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } if (font != NULL) { - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; return (font); } /* * Find best font for these dimensions, or use default - * - * A 1 pixel border is the absolute minimum we could have - * as a border around the text window (BORDER_PIXELS = 2), - * however a slightly larger border not only looks better - * but for the fonts currently statically built into the - * emulator causes much better font selection for the - * normal range of screen resolutions. */ STAILQ_FOREACH(fl, &fonts, font_next) { font = fl->font_data; - if ((((*rows * font->vfbd_height) + BORDER_PIXELS) <= height) && - (((*cols * font->vfbd_width) + BORDER_PIXELS) <= width)) { + if ((*rows * font->vfbd_height <= height) && + (*cols * font->vfbd_width <= width)) { if (font->vfbd_font == NULL || fl->font_flags == FONT_RELOAD) { if (fl->font_load != NULL && @@ -1916,8 +1909,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) if (font == NULL) continue; } - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; break; } font = NULL; @@ -1936,8 +1929,8 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) if (font == NULL) font = &DEFAULT_FONT_DATA; - *rows = (height - BORDER_PIXELS) / font->vfbd_height; - *cols = (width - BORDER_PIXELS) / font->vfbd_width; + *rows = height / font->vfbd_height; + *cols = width / font->vfbd_width; } return (font); diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index e17885cb7b0c..f94ed2d26712 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -908,8 +908,8 @@ cons_update_mode(bool use_gfx_mode) } else { /* Trigger loading of 8x16 font. */ setup_font(&gfx_state, - 16 * gfx_state.tg_fb.fb_height + BORDER_PIXELS, - 8 * gfx_state.tg_fb.fb_width + BORDER_PIXELS); + 16 * gfx_state.tg_fb.fb_height, + 8 * gfx_state.tg_fb.fb_width); gfx_state.tg_functions = &tf; /* ensure the following are not set for text mode */ unsetenv("screen.height"); diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 6062d7e87a03..eb9b18117cd3 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -308,7 +308,7 @@ local function drawbrand() if core.isFramebufferConsole() and loader.term_putimage ~= nil and branddef.image ~= nil then - if loader.term_putimage(branddef.image, 0, 0, 0, 7, 0) + if loader.term_putimage(branddef.image, 1, 1, 0, 7, 0) then return true end diff --git a/sys/sys/font.h b/sys/sys/font.h index e09b2112959d..969a9bce4e6d 100644 --- a/sys/sys/font.h +++ b/sys/sys/font.h @@ -107,7 +107,6 @@ struct fontlist { STAILQ_ENTRY(fontlist) font_next; }; -#define BORDER_PIXELS 10 /* space from screen border */ typedef STAILQ_HEAD(font_list, fontlist) font_list_t; #define FONT_HEADER_MAGIC "VFNT0002" From owner-dev-commits-src-all@freebsd.org Thu Feb 18 22:03:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 12CA052A12B; Thu, 18 Feb 2021 22:03: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 4DhTHJ03VLz3tQ9; Thu, 18 Feb 2021 22:03: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 E93BD20236; Thu, 18 Feb 2021 22:03: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 11IM3NAA064737; Thu, 18 Feb 2021 22:03:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IM3Nv1064736; Thu, 18 Feb 2021 22:03:23 GMT (envelope-from git) Date: Thu, 18 Feb 2021 22:03:23 GMT Message-Id: <202102182203.11IM3Nv1064736@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: eb7d18ff0ab5 - releng/13.0 - loader: do not autoselect smaller font than 8x16 with high res display MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: eb7d18ff0ab5cbb0c173a6f69e2bb3d2c9c97aab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 22:03:24 -0000 The branch releng/13.0 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=eb7d18ff0ab5cbb0c173a6f69e2bb3d2c9c97aab commit eb7d18ff0ab5cbb0c173a6f69e2bb3d2c9c97aab Author: Toomas Soome AuthorDate: 2021-02-08 22:34:47 +0000 Commit: Toomas Soome CommitDate: 2021-02-18 08:25:16 +0000 loader: do not autoselect smaller font than 8x16 with high res display The VT screen buffer size is calculated based on our default built in (8x16) font. With high-resolution display, we want to use at least 8x16 font, or we will have large unused areas on screen. (cherry picked from commit a26f7358583174f2fe0df3e979f7b8b02069278c) Approved by: re (gjb) --- stand/common/gfx_fb.c | 12 +++++++++--- stand/common/gfx_fb.h | 12 ++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 2aed8775a540..02a0a3d2be22 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -1894,12 +1894,18 @@ set_font(teken_unit_t *rows, teken_unit_t *cols, teken_unit_t h, teken_unit_t w) } /* - * Find best font for these dimensions, or use default + * Find best font for these dimensions, or use default. + * If height >= VT_FB_MAX_HEIGHT and width >= VT_FB_MAX_WIDTH, + * do not use smaller font than our DEFAULT_FONT_DATA. */ STAILQ_FOREACH(fl, &fonts, font_next) { font = fl->font_data; - if ((*rows * font->vfbd_height <= height) && - (*cols * font->vfbd_width <= width)) { + if ((*rows * font->vfbd_height <= height && + *cols * font->vfbd_width <= width) || + (height >= VT_FB_MAX_HEIGHT && + width >= VT_FB_MAX_WIDTH && + font->vfbd_height == DEFAULT_FONT_DATA.vfbd_height && + font->vfbd_width == DEFAULT_FONT_DATA.vfbd_width)) { if (font->vfbd_font == NULL || fl->font_flags == FONT_RELOAD) { if (fl->font_load != NULL && diff --git a/stand/common/gfx_fb.h b/stand/common/gfx_fb.h index 1424b8223136..c62c6441f8ad 100644 --- a/stand/common/gfx_fb.h +++ b/stand/common/gfx_fb.h @@ -164,6 +164,18 @@ struct vesa_flat_panel_info { #define NCMAP 256 extern uint32_t cmap[NCMAP]; +/* + * VT_FB_MAX_WIDTH and VT_FB_MAX_HEIGHT are dimensions from where + * we will not auto select smaller font than 8x16. + * See also sys/dev/vt/vt.h + */ +#ifndef VT_FB_MAX_WIDTH +#define VT_FB_MAX_WIDTH 4096 +#endif +#ifndef VT_FB_MAX_HEIGHT +#define VT_FB_MAX_HEIGHT 2400 +#endif + enum FB_TYPE { FB_TEXT = -1, FB_GOP, From owner-dev-commits-src-all@freebsd.org Thu Feb 18 22:17:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AC82452A72C; Thu, 18 Feb 2021 22:17: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 4DhTbr4X7lz3vjd; Thu, 18 Feb 2021 22:17: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 8E99220703; Thu, 18 Feb 2021 22:17: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 11IMHiTW078305; Thu, 18 Feb 2021 22:17:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IMHiwm078304; Thu, 18 Feb 2021 22:17:44 GMT (envelope-from git) Date: Thu, 18 Feb 2021 22:17:44 GMT Message-Id: <202102182217.11IMHiwm078304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: b9cbc85d7272 - main - nfs-over-tls: add user space daemons rpc.tlsclntd and rpc.tlsservd 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/main X-Git-Reftype: branch X-Git-Commit: b9cbc85d727214cf3e13196ab7e7564e53037f77 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 22:17:44 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=b9cbc85d727214cf3e13196ab7e7564e53037f77 commit b9cbc85d727214cf3e13196ab7e7564e53037f77 Author: Rick Macklem AuthorDate: 2021-02-18 22:08:19 +0000 Commit: Rick Macklem CommitDate: 2021-02-18 22:15:03 +0000 nfs-over-tls: add user space daemons rpc.tlsclntd and rpc.tlsservd The kernel changes needed for nfs-over-tls have been committed to main. However, nfs-over-tls requires user space daemons to handle the TLS handshake and other non-application data TLS records. There is one daemon (rpc.tlsclntd) for the client side and one daemon (rpc.tlsservd) for the server side, although they share a fair amount of code found in rpc.tlscommon.c and rpc.tlscommon.h. They use a KTLS enabled OpenSSL to perform the actual work and, as such, are only built when MK_OPENSSL_KTLS is set. Communication with the kernel is done via upcall RPCs done on AF_LOCAL sockets and the custom system call rpctls_syscall. Reviewed by: gbe (man pages only), jhb (usr.sbin/Makefile only) Comments by: jhb MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28430 Relnotes: yes --- usr.sbin/Makefile | 2 + usr.sbin/rpc.tlsclntd/Makefile | 29 ++ usr.sbin/rpc.tlsclntd/rpc.tlsclntd.8 | 201 ++++++++ usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c | 730 ++++++++++++++++++++++++++++ usr.sbin/rpc.tlsservd/Makefile | 29 ++ usr.sbin/rpc.tlsservd/rpc.tlscommon.c | 295 +++++++++++ usr.sbin/rpc.tlsservd/rpc.tlscommon.h | 68 +++ usr.sbin/rpc.tlsservd/rpc.tlsservd.8 | 348 +++++++++++++ usr.sbin/rpc.tlsservd/rpc.tlsservd.c | 886 ++++++++++++++++++++++++++++++++++ 9 files changed, 2588 insertions(+) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 39913a327b87..259ab72f2281 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -182,6 +182,8 @@ SUBDIR.${MK_NIS}+= ypserv SUBDIR.${MK_NIS}+= ypset SUBDIR.${MK_NTP}+= ntp SUBDIR.${MK_OPENSSL}+= keyserv +SUBDIR.${MK_OPENSSL_KTLS}+= rpc.tlsclntd +SUBDIR.${MK_OPENSSL_KTLS}+= rpc.tlsservd SUBDIR.${MK_PF}+= ftp-proxy SUBDIR.${MK_PKGBOOTSTRAP}+= pkg SUBDIR.${MK_PMC}+= pmc pmcannotate pmccontrol pmcstat pmcstudy diff --git a/usr.sbin/rpc.tlsclntd/Makefile b/usr.sbin/rpc.tlsclntd/Makefile new file mode 100644 index 000000000000..1c8481a7889c --- /dev/null +++ b/usr.sbin/rpc.tlsclntd/Makefile @@ -0,0 +1,29 @@ +# $FreeBSD$ + +.include + +PROG= rpc.tlsclntd +MAN= rpc.tlsclntd.8 +SRCS= rpc.tlsclntd.c rpc.tlscommon.c rpctlscd.h rpctlscd_svc.c rpctlscd_xdr.c + +CFLAGS+= -I. -I${SRCTOP}/usr.sbin/rpc.tlsservd + +LIBADD= ssl crypto util + +CLEANFILES= rpctlscd_svc.c rpctlscd_xdr.c rpctlscd.h + +RPCSRC= ${SRCTOP}/sys/rpc/rpcsec_tls/rpctlscd.x +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M + +rpctlscd_svc.c: ${RPCSRC} rpctlscd.h + ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} + +rpctlscd_xdr.c: ${RPCSRC} rpctlscd.h + ${RPCGEN} -c -o ${.TARGET} ${RPCSRC} + +rpctlscd.h: ${RPCSRC} + ${RPCGEN} -h -o ${.TARGET} ${RPCSRC} + +.PATH: ${SRCTOP}/sys/rpc/rpcsec_tls ${SRCTOP}/usr.sbin/rpc.tlsservd + +.include diff --git a/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.8 b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.8 new file mode 100644 index 000000000000..23a9d05495c1 --- /dev/null +++ b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.8 @@ -0,0 +1,201 @@ +.\" Copyright (c) 2008 Isilon Inc http://www.isilon.com/ +.\" Authors: Doug Rabson +.\" Developed with Red Inc: Alfred Perlstein +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.\" Modified from gssd.8 for rpc.tlsclntd.8 by Rick Macklem. +.Dd February 17, 2021 +.Dt RPC.TLSCLNTD 8 +.Os +.Sh NAME +.Nm rpc.tlsclntd +.Nd "Sun RPC over TLS Client Daemon" +.Sh SYNOPSIS +.Nm +.Op Fl C Ar preferred_ciphers +.Op Fl D Ar certdir +.Op Fl d +.Op Fl l Ar CAfile +.Op Fl m +.Op Fl p Ar CApath +.Op Fl r Ar CRLfile +.Op Fl v +.Sh DESCRIPTION +The +.Nm +program provides support for the client side of the kernel Sun RPC over TLS +implementation. +This daemon must be running for the kernel RPC to be able to do a TLS +connection to a server for an NFS over TLS mount. +This daemon requires that the kernel be built with +.Dq options KERNEL_TLS +and be running on an architecture such as +.Dq amd64 +that supports a direct map (not i386) with +.Xr ktls 4 +enabled. +.Pp +If either of the +.Fl l +or +.Fl p +options have been specified, the daemon will require the server's +certificate to verify +and have a Fully Qualified Domain Name (FQDN) in it. +This FQDN must match +the reverse DNS name for the IP address that +the server is using for the TCP connection. +The FQDN may be +in either the DNS field of the subjectAltName or the CN field of the +subjectName in the certificate and +cannot have a wildcard +.Dq * +in it. +.Pp +If a SIGHUP signal is sent to the daemon it will reload the +.Dq CRLfile +and will shut down any extant connections that presented certificates +during TLS handshake that have been revoked. +If the +.Fl r +option was not specified, the SIGHUP signal will be ignored. +.Pp +The daemon will log failed certificate verifications via +.Xr syslogd 8 +using LOG_INFO | LOG_DAEMON when the +.Fl l +or +.Fl p +option has been specified. +.Pp +The options are as follows: +.Bl -tag -width indent +.It Fl C Ar preferred_ciphers , Fl Fl ciphers= Ns Ar preferred_ciphers +Specify what preferred ciphers are to be used. +If this option is specified, +.Dq SSL_CTX_set_cipher_list() +will be called with +.Dq preferred_ciphers +as the argument. +If this option is not specified, the cipher will be chosen by +.Xr ssl 7 . +.It Fl D Ar certdir , Fl Fl certdir= Ns Ar certdir +Use +.Dq certdir +instead of /etc/rpc.tlsclntd for the +.Fl m +option. +.It Fl d , Fl Fl debuglevel +Run in debug mode. +In this mode, +.Nm +will not fork when it starts. +.It Fl l Ar CAfile , Fl Fl verifylocs= Ns Ar CAfile +This specifies the path name of a CAfile which holds the information +for server certificate verification. +This path name is used in +.Dq SSL_CTX_load_verify_locations(ctx,CAfile,NULL) +and +.Dq SSL_CTX_set0_CA_list(ctx,SSL_load_client_CA_file(CAfile)) +openssl library calls. +Note that this is a path name for the file and is not assumed to be +in +.Dq certdir . +.It Fl m , Fl Fl mutualverf +Enable support for mutual authentication. +A certificate and associated key must be found in /etc/rpc.tlsclntd +(or the directory specified by the +.Fl D +option) +in case a server requests a peer certificate. +The first certificate needs to be in a file named +.Dq cert.pem +and the associated key in a file named +.Dq certkey.pem . +The +.Xr mount_nfs 8 +option +.Fl tlscertname +can be used to override the default certificate for a given +NFS mount, where the files use the alternate naming specified by the option. +If there is a passphrase on the +.Dq certkey.pem +file, this daemon will prompt for the passphrase during startup. +The keys for alternate certificates cannot have passphrases. +.It Fl p Ar CApath , Fl Fl verifydir= Ns Ar CApath +This option is similar to the +.Fl l +option, but specifies the path of a directory with CA +certificates in it. +When this option is used, +.Dq SSL_CTX_set0_CA_list(ctx,SSL_load_client_CA_file()) +is not called, so a list of CA names is not be passed +to the server during the TLS handshake. +The openssl documentation indicates this call is rarely needed. +.It Fl r Ar CRLfile , Fl Fl crl= Ns Ar CRLfile +This option specifies a Certificate Revocation List (CRL) file +that is to be loaded into the verify certificate store and +checked during verification of the server's certificate. +This option is meaningless unless either the +.Fl l +or +.Fl p +have been specified. +.It Fl v , Fl Fl verbose +Run in verbose mode. +In this mode, +.Nm +will log activity messages to syslog using LOG_INFO | LOG_DAEMON or to +stderr, if the +.Fl d +option has also been specified. +.El +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr openssl 1 , +.Xr ktls 4 , +.Xr mount_nfs 8 , +.Xr rpc.tlsservd 8 , +.Xr ssl 7 , +.Xr syslogd 8 +.Sh STANDARDS +The implementation is based on the specification in +.Rs +.%B "RFC NNNN" +.%T "Towards Remote Procedure Call Encryption By Default" +.Re +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 13.0 . +.Sh BUGS +This daemon cannot be safely shut down and restarted if there are +any active RPC-over-TLS connections. +Doing so will orphan the KERNEL_TLS connections, so that they +can no longer do upcalls successfully, since the +.Dq SSL * +structures in userspace have been lost. diff --git a/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c new file mode 100644 index 000000000000..af803f203ffd --- /dev/null +++ b/usr.sbin/rpc.tlsclntd/rpc.tlsclntd.c @@ -0,0 +1,730 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2008 Isilon Inc http://www.isilon.com/ + * Authors: Doug Rabson + * Developed with Red Inc: Alfred Perlstein + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Extensively modified from /usr/src/usr.sbin/gssd.c r344402 for + * the client side of kernel RPC-over-TLS by Rick Macklem. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "rpctlscd.h" +#include "rpc.tlscommon.h" + +#ifndef _PATH_RPCTLSCDSOCK +#define _PATH_RPCTLSCDSOCK "/var/run/rpc.tlsclntd.sock" +#endif +#ifndef _PATH_CERTANDKEY +#define _PATH_CERTANDKEY "/etc/rpc.tlsclntd/" +#endif +#ifndef _PATH_RPCTLSCDPID +#define _PATH_RPCTLSCDPID "/var/run/rpc.tlsclntd.pid" +#endif + +/* Global variables also used by rpc.tlscommon.c. */ +int rpctls_debug_level; +bool rpctls_verbose; +SSL_CTX *rpctls_ctx = NULL; +const char *rpctls_verify_cafile = NULL; +const char *rpctls_verify_capath = NULL; +char *rpctls_crlfile = NULL; +bool rpctls_cert = false; +bool rpctls_gothup = false; +struct ssl_list rpctls_ssllist; + +static struct pidfh *rpctls_pfh = NULL; +static const char *rpctls_certdir = _PATH_CERTANDKEY; +static const char *rpctls_ciphers = NULL; +static uint64_t rpctls_ssl_refno = 0; +static uint64_t rpctls_ssl_sec = 0; +static uint64_t rpctls_ssl_usec = 0; + +static void rpctlscd_terminate(int); +static SSL_CTX *rpctls_setupcl_ssl(void); +static SSL *rpctls_connect(SSL_CTX *ctx, int s, char *certname, + u_int certlen, X509 **certp); +static void rpctls_huphandler(int sig __unused); + +extern void rpctlscd_1(struct svc_req *rqstp, SVCXPRT *transp); + +static struct option longopts[] = { + { "certdir", required_argument, NULL, 'D' }, + { "ciphers", required_argument, NULL, 'C' }, + { "debuglevel", no_argument, NULL, 'd' }, + { "verifylocs", required_argument, NULL, 'l' }, + { "mutualverf", no_argument, NULL, 'm' }, + { "verifydir", required_argument, NULL, 'p' }, + { "crl", required_argument, NULL, 'r' }, + { "verbose", no_argument, NULL, 'v' }, + { NULL, 0, NULL, 0 } +}; + +int +main(int argc, char **argv) +{ + /* + * We provide an RPC service on a local-domain socket. The + * kernel rpctls code will upcall to this daemon to do the initial + * TLS handshake. + */ + struct sockaddr_un sun; + int ch, fd, oldmask; + SVCXPRT *xprt; + bool tls_enable; + struct timeval tm; + struct timezone tz; + pid_t otherpid; + size_t tls_enable_len; + + /* Check that another rpctlscd isn't already running. */ + rpctls_pfh = pidfile_open(_PATH_RPCTLSCDPID, 0600, &otherpid); + if (rpctls_pfh == NULL) { + if (errno == EEXIST) + errx(1, "rpctlscd already running, pid: %d.", otherpid); + warn("cannot open or create pidfile"); + } + + /* Check to see that the ktls is enabled. */ + tls_enable_len = sizeof(tls_enable); + if (sysctlbyname("kern.ipc.tls.enable", &tls_enable, &tls_enable_len, + NULL, 0) != 0 || !tls_enable) + errx(1, "Kernel TLS not enabled"); + + /* Get the time when this daemon is started. */ + gettimeofday(&tm, &tz); + rpctls_ssl_sec = tm.tv_sec; + rpctls_ssl_usec = tm.tv_usec; + + rpctls_verbose = false; + while ((ch = getopt_long(argc, argv, "CD:dl:mp:r:v", longopts, NULL)) != + -1) { + switch (ch) { + case 'C': + rpctls_ciphers = optarg; + break; + case 'D': + rpctls_certdir = optarg; + break; + case 'd': + rpctls_debug_level++; + break; + case 'l': + rpctls_verify_cafile = optarg; + break; + case 'm': + rpctls_cert = true; + break; + case 'p': + rpctls_verify_capath = optarg; + break; + case 'r': + rpctls_crlfile = optarg; + break; + case 'v': + rpctls_verbose = true; + break; + default: + fprintf(stderr, "usage: %s " + "[-C/--ciphers preferred_ciphers] " + "[-D/--certdir certdir] [-d/--debuglevel] " + "[-l/--verifylocs CAfile] [-m/--mutualverf] " + "[-p/--verifydir CApath] [-r/--crl CRLfile] " + "[-v/--verbose]\n", argv[0]); + exit(1); + break; + } + } + if (rpctls_crlfile != NULL && rpctls_verify_cafile == NULL && + rpctls_verify_capath == NULL) + errx(1, "-r requires the -l and/or " + "-p options"); + + if (modfind("krpc") < 0) { + /* Not present in kernel, try loading it */ + if (kldload("krpc") < 0 || modfind("krpc") < 0) + errx(1, "Kernel RPC is not available"); + } + + /* + * Set up the SSL_CTX *. + * Do it now, before daemonizing, in case the private key + * is encrypted and requires a passphrase to be entered. + */ + rpctls_ctx = rpctls_setupcl_ssl(); + if (rpctls_ctx == NULL) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, "Can't set up TLS context"); + exit(1); + } + err(1, "Can't set up TLS context"); + } + LIST_INIT(&rpctls_ssllist); + + if (!rpctls_debug_level) { + if (daemon(0, 0) != 0) + err(1, "Can't daemonize"); + signal(SIGINT, SIG_IGN); + signal(SIGQUIT, SIG_IGN); + signal(SIGHUP, SIG_IGN); + } + signal(SIGTERM, rpctlscd_terminate); + signal(SIGPIPE, SIG_IGN); + signal(SIGHUP, rpctls_huphandler); + + pidfile_write(rpctls_pfh); + + memset(&sun, 0, sizeof sun); + sun.sun_family = AF_LOCAL; + unlink(_PATH_RPCTLSCDSOCK); + strcpy(sun.sun_path, _PATH_RPCTLSCDSOCK); + sun.sun_len = SUN_LEN(&sun); + fd = socket(AF_LOCAL, SOCK_STREAM, 0); + if (fd < 0) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, "Can't create local rpctlscd socket"); + exit(1); + } + err(1, "Can't create local rpctlscd socket"); + } + oldmask = umask(S_IXUSR|S_IRWXG|S_IRWXO); + if (bind(fd, (struct sockaddr *)&sun, sun.sun_len) < 0) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, "Can't bind local rpctlscd socket"); + exit(1); + } + err(1, "Can't bind local rpctlscd socket"); + } + umask(oldmask); + if (listen(fd, SOMAXCONN) < 0) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, + "Can't listen on local rpctlscd socket"); + exit(1); + } + err(1, "Can't listen on local rpctlscd socket"); + } + xprt = svc_vc_create(fd, RPC_MAXDATASIZE, RPC_MAXDATASIZE); + if (!xprt) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, + "Can't create transport for local rpctlscd socket"); + exit(1); + } + err(1, "Can't create transport for local rpctlscd socket"); + } + if (!svc_reg(xprt, RPCTLSCD, RPCTLSCDVERS, rpctlscd_1, NULL)) { + if (rpctls_debug_level == 0) { + syslog(LOG_ERR, + "Can't register service for local rpctlscd socket"); + exit(1); + } + err(1, "Can't register service for local rpctlscd socket"); + } + + rpctls_syscall(RPCTLS_SYSC_CLSETPATH, _PATH_RPCTLSCDSOCK); + + rpctls_svc_run(); + + rpctls_syscall(RPCTLS_SYSC_CLSHUTDOWN, ""); + + SSL_CTX_free(rpctls_ctx); + EVP_cleanup(); + return (0); +} + +bool_t +rpctlscd_null_1_svc(__unused void *argp, __unused void *result, + __unused struct svc_req *rqstp) +{ + + rpctls_verbose_out("rpctlscd_null: done\n"); + return (TRUE); +} + +bool_t +rpctlscd_connect_1_svc(struct rpctlscd_connect_arg *argp, + struct rpctlscd_connect_res *result, __unused struct svc_req *rqstp) +{ + int s; + SSL *ssl; + struct ssl_entry *newslp; + X509 *cert; + + rpctls_verbose_out("rpctlsd_connect: started\n"); + /* Get the socket fd from the kernel. */ + s = rpctls_syscall(RPCTLS_SYSC_CLSOCKET, ""); + if (s < 0) { + result->reterr = RPCTLSERR_NOSOCKET; + return (TRUE); + } + + /* Do a TLS connect handshake. */ + ssl = rpctls_connect(rpctls_ctx, s, argp->certname.certname_val, + argp->certname.certname_len, &cert); + if (ssl == NULL) { + rpctls_verbose_out("rpctlsd_connect: can't do TLS " + "handshake\n"); + result->reterr = RPCTLSERR_NOSSL; + } else { + result->reterr = RPCTLSERR_OK; + result->sec = rpctls_ssl_sec; + result->usec = rpctls_ssl_usec; + result->ssl = ++rpctls_ssl_refno; + /* Hard to believe this will ever wrap around.. */ + if (rpctls_ssl_refno == 0) + result->ssl = ++rpctls_ssl_refno; + } + + if (ssl == NULL) { + /* + * For RPC-over-TLS, this upcall is expected + * to close off the socket. + */ + close(s); + return (TRUE); + } + + /* Maintain list of all current SSL *'s */ + newslp = malloc(sizeof(*newslp)); + newslp->refno = rpctls_ssl_refno; + newslp->s = s; + newslp->shutoff = false; + newslp->ssl = ssl; + newslp->cert = cert; + LIST_INSERT_HEAD(&rpctls_ssllist, newslp, next); + return (TRUE); +} + +bool_t +rpctlscd_handlerecord_1_svc(struct rpctlscd_handlerecord_arg *argp, + struct rpctlscd_handlerecord_res *result, __unused struct svc_req *rqstp) +{ + struct ssl_entry *slp; + int ret; + char junk; + + slp = NULL; + if (argp->sec == rpctls_ssl_sec && argp->usec == + rpctls_ssl_usec) { + LIST_FOREACH(slp, &rpctls_ssllist, next) { + if (slp->refno == argp->ssl) + break; + } + } + + if (slp != NULL) { + rpctls_verbose_out("rpctlscd_handlerecord fd=%d\n", + slp->s); + /* + * An SSL_read() of 0 bytes should fail, but it should + * handle the non-application data record before doing so. + */ + ret = SSL_read(slp->ssl, &junk, 0); + if (ret <= 0) { + /* Check to see if this was a close alert. */ + ret = SSL_get_shutdown(slp->ssl); + if ((ret & (SSL_SENT_SHUTDOWN | + SSL_RECEIVED_SHUTDOWN)) == SSL_RECEIVED_SHUTDOWN) + SSL_shutdown(slp->ssl); + } else { + if (rpctls_debug_level == 0) + syslog(LOG_ERR, "SSL_read returned %d", ret); + else + fprintf(stderr, "SSL_read returned %d\n", ret); + } + result->reterr = RPCTLSERR_OK; + } else + result->reterr = RPCTLSERR_NOSSL; + return (TRUE); +} + +bool_t +rpctlscd_disconnect_1_svc(struct rpctlscd_disconnect_arg *argp, + struct rpctlscd_disconnect_res *result, __unused struct svc_req *rqstp) +{ + struct ssl_entry *slp; + int ret; + + slp = NULL; + if (argp->sec == rpctls_ssl_sec && argp->usec == + rpctls_ssl_usec) { + LIST_FOREACH(slp, &rpctls_ssllist, next) { + if (slp->refno == argp->ssl) + break; + } + } + + if (slp != NULL) { + rpctls_verbose_out("rpctlscd_disconnect: fd=%d closed\n", + slp->s); + LIST_REMOVE(slp, next); + if (!slp->shutoff) { + ret = SSL_get_shutdown(slp->ssl); + /* + * Do an SSL_shutdown() unless a close alert has + * already been sent. + */ + if ((ret & SSL_SENT_SHUTDOWN) == 0) + SSL_shutdown(slp->ssl); + } + SSL_free(slp->ssl); + if (slp->cert != NULL) + X509_free(slp->cert); + /* + * For RPC-over-TLS, this upcall is expected + * to close off the socket. + */ + if (!slp->shutoff) + shutdown(slp->s, SHUT_WR); + close(slp->s); + free(slp); + result->reterr = RPCTLSERR_OK; + } else + result->reterr = RPCTLSERR_NOCLOSE; + return (TRUE); +} + +int +rpctlscd_1_freeresult(__unused SVCXPRT *transp, __unused xdrproc_t xdr_result, + __unused caddr_t result) +{ + + return (TRUE); +} + +static void +rpctlscd_terminate(int sig __unused) +{ + + rpctls_syscall(RPCTLS_SYSC_CLSHUTDOWN, ""); + pidfile_remove(rpctls_pfh); + exit(0); +} + +static SSL_CTX * +rpctls_setupcl_ssl(void) +{ + SSL_CTX *ctx; + long flags; + char path[PATH_MAX]; + size_t len, rlen; + int ret; + + SSL_library_init(); + SSL_load_error_strings(); + OpenSSL_add_all_algorithms(); + + ctx = SSL_CTX_new(TLS_client_method()); + if (ctx == NULL) { + rpctls_verbose_out("rpctls_setupcl_ssl: SSL_CTX_new " + "failed\n"); + return (NULL); + } + SSL_CTX_set_ecdh_auto(ctx, 1); + + if (rpctls_ciphers != NULL) { + /* + * Set preferred ciphers, since KERN_TLS only supports a + * few of them. + */ + ret = SSL_CTX_set_cipher_list(ctx, rpctls_ciphers); + if (ret == 0) { + rpctls_verbose_out("rpctls_setupcl_ssl: " + "SSL_CTX_set_cipher_list failed: %s\n", + rpctls_ciphers); + SSL_CTX_free(ctx); + return (NULL); + } + } + + /* + * If rpctls_cert is true, a certificate and key exists in + * rpctls_certdir, so that it can do mutual authentication. + */ + if (rpctls_cert) { + /* Get the cert.pem and certkey.pem files. */ + len = strlcpy(path, rpctls_certdir, sizeof(path)); + rlen = sizeof(path) - len; + if (strlcpy(&path[len], "cert.pem", rlen) != 8) { + SSL_CTX_free(ctx); + return (NULL); + } + ret = SSL_CTX_use_certificate_file(ctx, path, + SSL_FILETYPE_PEM); + if (ret != 1) { + rpctls_verbose_out("rpctls_setupcl_ssl: can't use " + "certificate file path=%s ret=%d\n", path, ret); + SSL_CTX_free(ctx); + return (NULL); + } + if (strlcpy(&path[len], "certkey.pem", rlen) != 11) { + SSL_CTX_free(ctx); + return (NULL); + } + ret = SSL_CTX_use_PrivateKey_file(ctx, path, + SSL_FILETYPE_PEM); + if (ret != 1) { + rpctls_verbose_out("rpctls_setupcl_ssl: Can't use " + "private key path=%s ret=%d\n", path, ret); + SSL_CTX_free(ctx); + return (NULL); + } + } + + if (rpctls_verify_cafile != NULL || rpctls_verify_capath != NULL) { + if (rpctls_crlfile != NULL) { + ret = rpctls_loadcrlfile(ctx); + if (ret == 0) { + rpctls_verbose_out("rpctls_setupcl_ssl: " + "Load CRLfile failed\n"); + SSL_CTX_free(ctx); + return (NULL); + } + } +#if OPENSSL_VERSION_NUMBER >= 0x30000000 + ret = 1; + if (rpctls_verify_cafile != NULL) + ret = SSL_CTX_load_verify_file(ctx, + rpctls_verify_cafile); + if (ret != 0 && rpctls_verify_capath != NULL) + ret = SSL_CTX_load_verify_dir(ctx, + rpctls_verify_capath); +#else + ret = SSL_CTX_load_verify_locations(ctx, + rpctls_verify_cafile, rpctls_verify_capath); +#endif + if (ret == 0) { + rpctls_verbose_out("rpctls_setupcl_ssl: " + "Can't load verify locations\n"); + SSL_CTX_free(ctx); + return (NULL); + } + /* + * The man page says that the + * SSL_CTX_set0_CA_list() call is not normally + * needed, but I believe it is harmless. + */ + if (rpctls_verify_cafile != NULL) + SSL_CTX_set0_CA_list(ctx, + SSL_load_client_CA_file(rpctls_verify_cafile)); + } + + /* RPC-over-TLS must use TLSv1.3, according to the IETF draft.*/ +#ifdef notyet + flags = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1 | + SSL_OP_NO_TLSv1_1 | SSL_OP_NO_TLSv1_2; +#else + flags = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_TLSv1_3; +#endif + SSL_CTX_set_options(ctx, flags); + SSL_CTX_clear_mode(ctx, SSL_MODE_NO_KTLS_TX | SSL_MODE_NO_KTLS_RX); + return (ctx); +} + +static SSL * +rpctls_connect(SSL_CTX *ctx, int s, char *certname, u_int certlen, X509 **certp) +{ + SSL *ssl; + X509 *cert; + struct sockaddr_storage ad; + struct sockaddr *sad; + char hostnam[NI_MAXHOST], path[PATH_MAX]; + int gethostret, ret; + char *cp, *cp2; + size_t len, rlen; + long verfret; + + *certp = NULL; + sad = (struct sockaddr *)&ad; + ssl = SSL_new(ctx); + if (ssl == NULL) { + rpctls_verbose_out("rpctls_connect: " + "SSL_new failed\n"); + return (NULL); + } + if (SSL_set_fd(ssl, s) != 1) { + rpctls_verbose_out("rpctls_connect: " + "SSL_set_fd failed\n"); + SSL_free(ssl); + return (NULL); + } + + /* + * If rpctls_cert is true and certname is set, a alternate certificate + * and key exists in files named .pem and key.pem + * in rpctls_certdir that is to be used for mutual authentication. + */ + if (rpctls_cert && certlen > 0) { + len = strlcpy(path, rpctls_certdir, sizeof(path)); + rlen = sizeof(path) - len; + if (rlen <= certlen) { + SSL_free(ssl); + return (NULL); + } + memcpy(&path[len], certname, certlen); + rlen -= certlen; + len += certlen; + path[len] = '\0'; + if (strlcpy(&path[len], ".pem", rlen) != 4) { + SSL_free(ssl); + return (NULL); + } + ret = SSL_use_certificate_file(ssl, path, SSL_FILETYPE_PEM); + if (ret != 1) { + rpctls_verbose_out("rpctls_connect: can't use " + "certificate file path=%s ret=%d\n", path, ret); + SSL_free(ssl); + return (NULL); + } + if (strlcpy(&path[len], "key.pem", rlen) != 7) { + SSL_free(ssl); + return (NULL); + } + ret = SSL_use_PrivateKey_file(ssl, path, SSL_FILETYPE_PEM); + if (ret != 1) { + rpctls_verbose_out("rpctls_connect: Can't use " + "private key path=%s ret=%d\n", path, ret); + SSL_free(ssl); + return (NULL); + } + } + + ret = SSL_connect(ssl); + if (ret != 1) { + rpctls_verbose_out("rpctls_connect: " + "SSL_connect failed %d\n", + ret); + SSL_free(ssl); + return (NULL); + } + + cert = SSL_get_peer_certificate(ssl); + if (cert == NULL) { + rpctls_verbose_out("rpctls_connect: get peer" + " certificate failed\n"); + SSL_free(ssl); + return (NULL); + } + gethostret = rpctls_gethost(s, sad, hostnam, sizeof(hostnam)); + if (gethostret == 0) + hostnam[0] = '\0'; + verfret = SSL_get_verify_result(ssl); + if (verfret == X509_V_OK && (rpctls_verify_cafile != NULL || + rpctls_verify_capath != NULL) && (gethostret == 0 || + rpctls_checkhost(sad, cert, X509_CHECK_FLAG_NO_WILDCARDS) != 1)) + verfret = X509_V_ERR_HOSTNAME_MISMATCH; + if (verfret != X509_V_OK && (rpctls_verify_cafile != NULL || + rpctls_verify_capath != NULL)) { + if (verfret != X509_V_OK) { + cp = X509_NAME_oneline(X509_get_issuer_name(cert), + NULL, 0); + cp2 = X509_NAME_oneline(X509_get_subject_name(cert), + NULL, 0); + if (rpctls_debug_level == 0) + syslog(LOG_INFO | LOG_DAEMON, + "rpctls_connect: client IP %s " + "issuerName=%s subjectName=%s verify " + "failed %s\n", hostnam, cp, cp2, + X509_verify_cert_error_string(verfret)); *** 1700 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Feb 18 22:41:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5D3FC52B5EA; Thu, 18 Feb 2021 22:41: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 4DhV7H2GxXz4RSj; Thu, 18 Feb 2021 22:41: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 3657720D88; Thu, 18 Feb 2021 22:41: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 11IMfVLm013488; Thu, 18 Feb 2021 22:41:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11IMfVnd013487; Thu, 18 Feb 2021 22:41:31 GMT (envelope-from git) Date: Thu, 18 Feb 2021 22:41:31 GMT Message-Id: <202102182241.11IMfVnd013487@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 2f48313ab26e - main - nfs-over-tls: add rc scripts for rpc.tlsclntd and rpc.tlsservd 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/main X-Git-Reftype: branch X-Git-Commit: 2f48313ab26ef257ca8d46052a33fb6ad6abdb4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 22:41:31 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=2f48313ab26ef257ca8d46052a33fb6ad6abdb4f commit 2f48313ab26ef257ca8d46052a33fb6ad6abdb4f Author: Rick Macklem AuthorDate: 2021-02-18 22:38:01 +0000 Commit: Rick Macklem CommitDate: 2021-02-18 22:38:01 +0000 nfs-over-tls: add rc scripts for rpc.tlsclntd and rpc.tlsservd Add rc.d scripts that control the recently committed rpc.tlsclntd(8) and rpc.tlsservd(8) daemons. Reviewed by: gbe MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D28432 --- libexec/rc/rc.conf | 4 ++++ libexec/rc/rc.d/Makefile | 4 ++++ libexec/rc/rc.d/tlsclntd | 21 +++++++++++++++++++++ libexec/rc/rc.d/tlsservd | 25 +++++++++++++++++++++++++ 4 files changed, 54 insertions(+) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index d8c24853225f..55a7112b15ea 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -385,6 +385,10 @@ nfscbd_enable="NO" # NFSv4 client side callback daemon nfscbd_flags="" # Flags for nfscbd nfsuserd_enable="NO" # NFSv4 user/group name mapping daemon nfsuserd_flags="" # Flags for nfsuserd +tlsclntd_enable="NO" # Run rpc.tlsclntd needed for NFS-over-TLS mount +tlsclntd_flags="" # Flags for rpc.tlsclntd +tlsservd_enable="NO" # Run rpc.tlsservd needed for NFS-over-TLS nfsd +tlsservd_flags="" # Flags for rpc.tlsservd ### Network Time Services options: ### timed_enable="NO" # Run the time daemon (or NO). diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index a8277e08932c..1a61e89aa215 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -271,6 +271,10 @@ _opensm= opensm .if ${MK_OPENSSL} != "no" CONFS+= keyserv +.if ${MK_OPENSSL_KTLS} != "no" +CONFS+= tlsclntd \ + tlsservd +.endif .endif .if ${MK_OPENSSH} != "no" diff --git a/libexec/rc/rc.d/tlsclntd b/libexec/rc/rc.d/tlsclntd new file mode 100755 index 000000000000..4566ceb67abd --- /dev/null +++ b/libexec/rc/rc.d/tlsclntd @@ -0,0 +1,21 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: tlsclntd +# REQUIRE: NETWORKING root mountcritlocal sysctl +# BEFORE: nfscbd +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="tlsclntd" +desc="NFS over TLS client side daemon" +rcvar="tlsclntd_enable" +command="/usr/sbin/rpc.${name}" +pidfile="/var/run/rpc.${name}.pid" + +load_rc_config $name + +run_rc_command "$1" diff --git a/libexec/rc/rc.d/tlsservd b/libexec/rc/rc.d/tlsservd new file mode 100755 index 000000000000..cca28ed60ffe --- /dev/null +++ b/libexec/rc/rc.d/tlsservd @@ -0,0 +1,25 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: tlsservd +# REQUIRE: NETWORKING root mountcritlocal sysctl +# BEFORE: nfsd +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="tlsservd" +desc="NFS over TLS server side daemon" +rcvar="tlsservd_enable" +command="/usr/sbin/rpc.${name}" + +pidfile="/var/run/rpc.${name}.pid" +required_files="/etc/rpc.tlsservd/cert.pem /etc/rpc.tlsservd/certkey.pem" +extra_commands="reload" + + +load_rc_config $name + +run_rc_command "$1" From owner-dev-commits-src-all@freebsd.org Thu Feb 18 23:27:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4F8DE52CE10; Thu, 18 Feb 2021 23:27: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 4DhW8k1sKsz4VGc; Thu, 18 Feb 2021 23:27: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 2811621468; Thu, 18 Feb 2021 23:27: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 11INRoEw070381; Thu, 18 Feb 2021 23:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11INRoXF070380; Thu, 18 Feb 2021 23:27:50 GMT (envelope-from git) Date: Thu, 18 Feb 2021 23:27:50 GMT Message-Id: <202102182327.11INRoXF070380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ravi Pokala Subject: git: bdde49b7c723 - main - nvdimm(4): Export NVDIMM health flags via sysctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bdde49b7c7232c6936525f84ffb90856a7cd8e74 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 23:27:50 -0000 The branch main has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=bdde49b7c7232c6936525f84ffb90856a7cd8e74 commit bdde49b7c7232c6936525f84ffb90856a7cd8e74 Author: Ravi Pokala AuthorDate: 2021-02-16 08:03:32 +0000 Commit: Ravi Pokala CommitDate: 2021-02-18 23:08:33 +0000 nvdimm(4): Export NVDIMM health flags via sysctl The ACPI NFIT specification defines a set of "NVDIMM State Flags". These flags are already reported by `acpidump -t', but this change makes them available on a per-device basis, in a format that is more easily parsed. To simplify this, introduce acpi_nfit_get_memory_maps_by_dimm(), which locates the (ACPI_NFIT_MEMORY_MAP)s associated with a given (nfit_handle_t). Reviewed by: mav, cem Tested by: mav, rpokala (version for stable/12) MFC after: 3 days Sponsored by: Panasas --- sys/dev/nvdimm/nvdimm.c | 65 +++++++++++++++++++++++++++++++++++++++++++- sys/dev/nvdimm/nvdimm_nfit.c | 10 +++++++ sys/dev/nvdimm/nvdimm_var.h | 3 ++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvdimm/nvdimm.c b/sys/dev/nvdimm/nvdimm.c index 66638636ef0e..0df894e4d9b6 100644 --- a/sys/dev/nvdimm/nvdimm.c +++ b/sys/dev/nvdimm/nvdimm.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -332,12 +334,21 @@ static int nvdimm_attach(device_t dev) { struct nvdimm_dev *nv; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *oid; + struct sysctl_oid_list *children; + struct sbuf *sb; ACPI_TABLE_NFIT *nfitbl; ACPI_HANDLE handle; ACPI_STATUS status; - int error; + ACPI_NFIT_MEMORY_MAP **maps; + int error, i, num_maps; + uint16_t flags; nv = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + oid = device_get_sysctl_tree(dev); + children = SYSCTL_CHILDREN(oid); handle = nvdimm_root_get_acpi_handle(dev); MPASS(handle != NULL); nv->nv_dev = dev; @@ -351,6 +362,57 @@ nvdimm_attach(device_t dev) } acpi_nfit_get_flush_addrs(nfitbl, nv->nv_handle, &nv->nv_flush_addr, &nv->nv_flush_addr_cnt); + + /* + * Each NVDIMM should have at least one memory map associated with it. + * If any of the maps have one of the error flags set, reflect that in + * the overall status. + */ + acpi_nfit_get_memory_maps_by_dimm(nfitbl, nv->nv_handle, &maps, + &num_maps); + if (num_maps == 0) { + free(nv->nv_flush_addr, M_NVDIMM); + free(maps, M_NVDIMM); + device_printf(dev, "cannot find memory map\n"); + return (ENXIO); + } + flags = 0; + for (i = 0; i < num_maps; i++) { + flags |= maps[i]->Flags; + } + free(maps, M_NVDIMM); + + /* sbuf_new_auto(9) is M_WAITOK; no need to check for NULL. */ + sb = sbuf_new_auto(); + (void) sbuf_printf(sb, "0x%b", flags, + "\20" + "\001SAVE_FAILED" + "\002RESTORE_FAILED" + "\003FLUSH_FAILED" + "\004NOT_ARMED" + "\005HEALTH_OBSERVED" + "\006HEALTH_ENABLED" + "\007MAP_FAILED"); + error = sbuf_finish(sb); + if (error != 0) { + sbuf_delete(sb); + free(nv->nv_flush_addr, M_NVDIMM); + device_printf(dev, "cannot convert flags to string\n"); + return (error); + } + /* strdup(9) is M_WAITOK; no need to check for NULL. */ + nv->nv_flags_str = strdup(sbuf_data(sb), M_NVDIMM); + sbuf_delete(sb); + SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "flags", + CTLFLAG_RD | CTLFLAG_MPSAFE, nv->nv_flags_str, 0, + "NVDIMM State Flags"); + /* + * Anything other than HEALTH_ENABLED indicates a fault condition of + * some kind, so log if that's seen. + */ + if ((flags & ~ACPI_NFIT_MEM_HEALTH_ENABLED) != 0) + device_printf(dev, "flags: %s\n", nv->nv_flags_str); + AcpiPutTable(&nfitbl->Header); error = read_label_area_size(nv); if (error == 0) { @@ -370,6 +432,7 @@ nvdimm_detach(device_t dev) struct nvdimm_label_entry *label, *next; nv = device_get_softc(dev); + free(nv->nv_flags_str, M_NVDIMM); free(nv->nv_flush_addr, M_NVDIMM); free(nv->label_index, M_NVDIMM); SLIST_FOREACH_SAFE(label, &nv->labels, link, next) { diff --git a/sys/dev/nvdimm/nvdimm_nfit.c b/sys/dev/nvdimm/nvdimm_nfit.c index ae00b88f8018..7396393a3a2c 100644 --- a/sys/dev/nvdimm/nvdimm_nfit.c +++ b/sys/dev/nvdimm/nvdimm_nfit.c @@ -201,3 +201,13 @@ acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, for (i = 0; i < subtable->HintCount; i++) (*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; } + +void +acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, + ACPI_NFIT_MEMORY_MAP ***listp, int *countp) +{ + + malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_MEMORY_MAP, + offsetof(ACPI_NFIT_MEMORY_MAP, DeviceHandle), UINT32_MAX, dimm, + (void ***)listp, countp); +} diff --git a/sys/dev/nvdimm/nvdimm_var.h b/sys/dev/nvdimm/nvdimm_var.h index d69b1a70d8df..d163698e0660 100644 --- a/sys/dev/nvdimm/nvdimm_var.h +++ b/sys/dev/nvdimm/nvdimm_var.h @@ -93,6 +93,7 @@ struct nvdimm_dev { device_t nv_dev; nfit_handle_t nv_handle; uint64_t **nv_flush_addr; + char *nv_flags_str; int nv_flush_addr_cnt; uint32_t label_area_size; uint32_t max_label_xfer; @@ -163,6 +164,8 @@ void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, uint64_t ***listp, int *countp); +void acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, + nfit_handle_t dimm, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); enum SPA_mapping_type nvdimm_spa_type_from_name(const char *); enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); bool nvdimm_spa_type_user_accessible(enum SPA_mapping_type); From owner-dev-commits-src-all@freebsd.org Thu Feb 18 23:53:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DFE4F52EC49; Thu, 18 Feb 2021 23:53: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 4DhWkH5yPVz4Wnn; Thu, 18 Feb 2021 23:53: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 BF43521C87; Thu, 18 Feb 2021 23:53: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 11INrROQ008866; Thu, 18 Feb 2021 23:53:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11INrRxT008865; Thu, 18 Feb 2021 23:53:27 GMT (envelope-from git) Date: Thu, 18 Feb 2021 23:53:27 GMT Message-Id: <202102182353.11INrRxT008865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Glen Barber Subject: git: 80ab50e1de19 - main - pass UNAME_r to fix building 14.x ports on 13.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80ab50e1de19ca125f05a13937c796d48c4edd4a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 23:53:27 -0000 The branch main has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=80ab50e1de19ca125f05a13937c796d48c4edd4a commit 80ab50e1de19ca125f05a13937c796d48c4edd4a Author: Glen Barber AuthorDate: 2021-02-18 23:52:39 +0000 Commit: Glen Barber CommitDate: 2021-02-18 23:53:20 +0000 pass UNAME_r to fix building 14.x ports on 13.x MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- release/Makefile.vm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.vm b/release/Makefile.vm index d201e11e19b2..b0bd47521dc5 100644 --- a/release/Makefile.vm +++ b/release/Makefile.vm @@ -54,7 +54,7 @@ emulator-portinstall: .if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) .if !exists(/usr/local/bin/qemu-${TARGET_ARCH}-static) .if exists(${PORTSDIR}/emulators/qemu-user-static/Makefile) - env - PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean + env - UNAME_r="${REVISION}-${BRANCH}" PATH=$$PATH make -C ${PORTSDIR}/emulators/qemu-user-static BATCH=1 all install clean .else .if !exists(/usr/local/sbin/pkg-static) env ASSUME_ALWAYS_YES=yes pkg bootstrap -y From owner-dev-commits-src-all@freebsd.org Thu Feb 18 23:57:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1B22B52F2A3; Thu, 18 Feb 2021 23:57:22 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhWpp02yvz4XMP; Thu, 18 Feb 2021 23:57:22 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E25B8A7E4; Thu, 18 Feb 2021 23:57:21 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 781FA27C0054; Thu, 18 Feb 2021 18:57:21 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Thu, 18 Feb 2021 18:57:21 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeehgdduiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepofgfgg fkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghr ghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtth gvrhhnpeejhfeftddutdelgeekgedtgeejkeffvdejtddthefggfevuefggfefledvgefh gfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsug hrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefheek ieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrg hprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id F2C93CA005D; Thu, 18 Feb 2021 18:57:20 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: In-Reply-To: References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> Date: Thu, 18 Feb 2021 17:57:00 -0600 From: "Brandon Bergren" To: "Jessica Clarke" , "Konstantin Belousov" Cc: "John Baldwin" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_24fd63e0970f_-_main_-_mips:_Don't_set_=5F=5FNO=5FTLS_?= =?UTF-8?Q?to_disable_some_uses_of_TLS.?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2021 23:57:22 -0000 On Thu, Feb 18, 2021, at 3:07 PM, Jessica Clarke wrote: > > But, I wonder, what does CALL_ELF mean? Is it for old 64bit PowerPC ABI, > > that was abandoned with the switch to ELFv2? > > Yes, _CALL_ELF == 2 for ELFv2. I highly doubt the defines were needed > for the ELFv1 ABI, but they're especially redundant now. Presumably > David's original fixed commit[1] added powerpc64 to that list because > TLS wasn't yet supported in LLVM; that happened later in 2012 and our > wiki changed it to being implemented in December 2012[2]. So I suspect > it should have been deleted 8 years ago. FreeBSD 13 will be the first ELFv2 release. FreeBSD 12 and below are ELFv1. The reason for the line was to avoid breaking things during the development period for ELFv2. Switching TLS on was one of the things I did at the same time as the official ELFv2 transition. See 2db975b0eb0f3378a39d63eeabe4e3617f4557f0. This is NOT an 8 year old change, but I believe it can go away in HEAD as long as the change isn't MFC'd to 12 or earlier. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Fri Feb 19 00:00:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0CE9652F658 for ; Fri, 19 Feb 2021 00:00:33 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhWtS6fzcz4XTd for ; Fri, 19 Feb 2021 00:00:32 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f47.google.com with SMTP id o24so5389428wmh.5 for ; Thu, 18 Feb 2021 16:00:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=I7anpkyQpMVIEdOjiatkXB1W4lymEII/ZwjO5jc7Z1Q=; b=U8odp/lCEnwLcV+OagDNypU9f6Uv3I6eW7+4WvICou1kvlCC6Exm60wKHwDhSqaOXD htEQ/Q/jccT2M7FgVcH8yn1XR4A/PQCiikRi47QLpZnwLntIQFyxjB7zRGBn/VBMQ6C8 rjVcwbTNZEewquKAdASh74NthCh08WR+vaBoeLpLLiGMT9KhnwxVmaLr1X50nUkD0jhO vJz1ljiwaWtQFlBC7tqnYGsf3Or4NcL89YddeGfcix8CGUwQrm6ddvWxQA/WlXYpkEwo MbyBe1BQbWtZXerTRn0SCY3Lo4QS+9+k6nuk/b9ESVrF9lRVldACZjQF4Byq5l9ExER8 0LLg== X-Gm-Message-State: AOAM530CaG+qFOhhQMzl69pe9Nzg6Dif8cyDErnWSD0O+sfk6mPEzG4C rR1WlZ12e+J1NooVcc7vj8d5Rw== X-Google-Smtp-Source: ABdhPJx8lLHo0pXKNKocaL58ks3bxQasPWvnPwm3aWEIPoL6Xuz4eCESrcJPFMMg2LcyZBoL76M34Q== X-Received: by 2002:a1c:730a:: with SMTP id d10mr5494381wmb.53.1613692830391; Thu, 18 Feb 2021 16:00:30 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id b2sm11645770wrn.2.2021.02.18.16.00.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2021 16:00:30 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. From: Jessica Clarke In-Reply-To: Date: Fri, 19 Feb 2021 00:00:27 +0000 Cc: Konstantin Belousov , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> To: Brandon Bergren X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DhWtS6fzcz4XTd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 00:00:33 -0000 On 18 Feb 2021, at 23:57, Brandon Bergren wrote: > On Thu, Feb 18, 2021, at 3:07 PM, Jessica Clarke wrote: >>> But, I wonder, what does CALL_ELF mean? Is it for old 64bit PowerPC = ABI, >>> that was abandoned with the switch to ELFv2? >>=20 >> Yes, _CALL_ELF =3D=3D 2 for ELFv2. I highly doubt the defines were = needed >> for the ELFv1 ABI, but they're especially redundant now. Presumably >> David's original fixed commit[1] added powerpc64 to that list because >> TLS wasn't yet supported in LLVM; that happened later in 2012 and our >> wiki changed it to being implemented in December 2012[2]. So I = suspect >> it should have been deleted 8 years ago. >=20 > FreeBSD 13 will be the first ELFv2 release. FreeBSD 12 and below are = ELFv1. >=20 > The reason for the line was to avoid breaking things during the = development period for ELFv2. Switching TLS on was one of the things I = did at the same time as the official ELFv2 transition. See = 2db975b0eb0f3378a39d63eeabe4e3617f4557f0. >=20 > This is NOT an 8 year old change, but I believe it can go away in HEAD = as long as the change isn't MFC'd to 12 or earlier. But TLS isn't broken for ELFv1? Otherwise jemalloc would die in a fire and nothing would ever work. TLS should have been working for ELFv1 for many years by this point. Jess From owner-dev-commits-src-all@freebsd.org Fri Feb 19 00:00:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4A28E52F912; Fri, 19 Feb 2021 00:00: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 4DhWty1NfJz4XgS; Fri, 19 Feb 2021 00:00: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 2224D214E3; Fri, 19 Feb 2021 00:00: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 11J00wBF018204; Fri, 19 Feb 2021 00:00:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J00w9g018203; Fri, 19 Feb 2021 00:00:58 GMT (envelope-from git) Date: Fri, 19 Feb 2021 00:00:58 GMT Message-Id: <202102190000.11J00w9g018203@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 150b4388d3b5 - releng/13.0 - update to 13.0-BETA3 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 150b4388d3b5654d02071618dcdae48d6f11161f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 00:00:58 -0000 The branch releng/13.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=150b4388d3b5654d02071618dcdae48d6f11161f commit 150b4388d3b5654d02071618dcdae48d6f11161f Author: Glen Barber AuthorDate: 2021-02-18 23:57:03 +0000 Commit: Glen Barber CommitDate: 2021-02-19 00:00:40 +0000 update to 13.0-BETA3 Approved by: re (implicit) Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index abb9ecd1c69d..b0887168026a 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -54,7 +54,7 @@ TYPE="FreeBSD" REVISION="13.0" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-dev-commits-src-all@freebsd.org Fri Feb 19 00:03:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EE2C952F95C; Fri, 19 Feb 2021 00:03:54 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhWyL50XHz4YMY; Fri, 19 Feb 2021 00:03:54 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id F1427B437; Fri, 19 Feb 2021 00:03:53 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id C3AA927C005A; Thu, 18 Feb 2021 19:03:53 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Thu, 18 Feb 2021 19:03:53 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeehgddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepofgfgg fkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghr ghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtth gvrhhnpeejhfeftddutdelgeekgedtgeejkeffvdejtddthefggfevuefggfefledvgefh gfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsug hrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefheek ieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrg hprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 91A3FCA005D; Thu, 18 Feb 2021 19:03:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: In-Reply-To: <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> Date: Thu, 18 Feb 2021 18:03:33 -0600 From: "Brandon Bergren" To: "Jessica Clarke" Cc: "Konstantin Belousov" , "John Baldwin" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_24fd63e0970f_-_main_-_mips:_Don't_set_=5F=5FNO=5FTLS_?= =?UTF-8?Q?to_disable_some_uses_of_TLS.?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 00:03:55 -0000 On Thu, Feb 18, 2021, at 6:00 PM, Jessica Clarke wrote: > > But TLS isn't broken for ELFv1? Otherwise jemalloc would die in a fire > and nothing would ever work. TLS should have been working for ELFv1 for > many years by this point. > > Jess It's not broken, but it's an ABI change to flip it back and forth. You get RuneLocale errors in the middle of installworld if you try and install a build with TLS enabled and have to do a double installworld to compensate for the crashes. For ABI stability reasons, it needs to stay on in 12 and below. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Fri Feb 19 00:12:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 71F37531008; Fri, 19 Feb 2021 00:12:34 +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 4DhX8L2ps9z4ZFc; Fri, 19 Feb 2021 00:12: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 538AF21CDA; Fri, 19 Feb 2021 00:12: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 11J0CYro036062; Fri, 19 Feb 2021 00:12:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J0CYlC036061; Fri, 19 Feb 2021 00:12:34 GMT (envelope-from git) Date: Fri, 19 Feb 2021 00:12:34 GMT Message-Id: <202102190012.11J0CYlC036061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: 0adeb3b23e04 - stable/12 - Ignore generated LINT files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0adeb3b23e04878547d69ba232f9ce6823b0efe7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 00:12:34 -0000 The branch stable/12 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=0adeb3b23e04878547d69ba232f9ce6823b0efe7 commit 0adeb3b23e04878547d69ba232f9ce6823b0efe7 Author: Ravi Pokala AuthorDate: 2021-02-19 00:12:22 +0000 Commit: Ravi Pokala CommitDate: 2021-02-19 00:12:22 +0000 Ignore generated LINT files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 5a022fb8f837..070165d8946b 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ GTAGS ID cscope.out ?cscope.out +sys/*/conf/LINT* From owner-dev-commits-src-all@freebsd.org Fri Feb 19 00:13:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F05A6531096; Fri, 19 Feb 2021 00:13: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 4DhX9W6SG5z4ZGf; Fri, 19 Feb 2021 00:13: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 D053B2208A; Fri, 19 Feb 2021 00:13: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 11J0DZ3T036296; Fri, 19 Feb 2021 00:13:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J0DZFB036295; Fri, 19 Feb 2021 00:13:35 GMT (envelope-from git) Date: Fri, 19 Feb 2021 00:13:35 GMT Message-Id: <202102190013.11J0DZFB036295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: a069809d907d - stable/11 - Ignore generated LINT files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: a069809d907d769236c9f663362923296ac68e0d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 00:13:36 -0000 The branch stable/11 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=a069809d907d769236c9f663362923296ac68e0d commit a069809d907d769236c9f663362923296ac68e0d Author: Ravi Pokala AuthorDate: 2021-02-19 00:13:31 +0000 Commit: Ravi Pokala CommitDate: 2021-02-19 00:13:31 +0000 Ignore generated LINT files --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 26a1bb9d1934..a63fd29ccc01 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ GTAGS ID cscope.out ?cscope.out +sys/*/conf/LINT* From owner-dev-commits-src-all@freebsd.org Fri Feb 19 01:07:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2701D53335D for ; Fri, 19 Feb 2021 01:07:58 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhYNG0GWWz4dcG for ; Fri, 19 Feb 2021 01:07:57 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f43.google.com with SMTP id o15so5282549wmq.5 for ; Thu, 18 Feb 2021 17:07:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gWa3qVEoMESpHZpaw7ZkZE+tWCfG52zEJ+BB4kBIb5I=; b=cY9+64X6ODsk9EjlEH/G6L66lD2bzDxD1+5fwT3NaQrYN9T8wB6WKYGRyHDzYP8SoV HJFPQFsWkCUwQwEa4m3U2GO+KEYlDW6MUusG4z0a0G5fdvia9YtDSwRMXNLiEyQd1tyb pubK5618pnTSyL+WTBtAYSE1dhJs9tQexBnzTYTUmb5JajBe8ewhCshzRJ72Mr2hoEaV a+TIpkmnD6SylvVUT+dwCb7utscPx21YWNSm1rGTB0EqBhhGh2inxUOICmOodtCCGPAO nSEwwYXVeR4MI6hX1CVM4OFx1hq+u64YxeS6CiAxSV0glFLTxrpIL6Yi8kMkT4qBXxj7 d32g== X-Gm-Message-State: AOAM531qzCdnkhAZmIXQWfv169V1y29SfhXm1yDievWOPfwNkC5LgYkT FeHkyxPGo1BTM6eHroONw5QCJQ== X-Google-Smtp-Source: ABdhPJxs6OxEUEeO2OPJHjg+GdePnr0KBNXBgT97h3I12HHzYtUy3xYu4luHqaHoIe7cvDUxw4pYKg== X-Received: by 2002:a1c:cc14:: with SMTP id h20mr5790826wmb.180.1613696876114; Thu, 18 Feb 2021 17:07:56 -0800 (PST) Received: from [192.168.149.251] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id y15sm11286996wrm.93.2021.02.18.17.07.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2021 17:07:55 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. From: Jessica Clarke In-Reply-To: Date: Fri, 19 Feb 2021 01:07:54 +0000 Cc: Konstantin Belousov , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> To: Brandon Bergren X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DhYNG0GWWz4dcG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 01:07:58 -0000 On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > On Thu, Feb 18, 2021, at 6:00 PM, Jessica Clarke wrote: >>=20 >> But TLS isn't broken for ELFv1? Otherwise jemalloc would die in a = fire >> and nothing would ever work. TLS should have been working for ELFv1 = for >> many years by this point. >>=20 >> Jess >=20 > It's not broken, but it's an ABI change to flip it back and forth. You = get RuneLocale errors in the middle of installworld if you try and = install a build with TLS enabled and have to do a double installworld to = compensate for the crashes. >=20 > For ABI stability reasons, it needs to stay on in 12 and below. Ok, so the mistake was not deleting it 8 years ago and instead leaving it around to become part of the ABI. The issue you're referring to specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the latter doesn't exist for __NO_TLS, and the former changes between static inline and extern)? __NO_TLS should have blocked powerpc64 (and mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's a major ABI break (frustratingly tiny but breaks the core system libraries) and thus can't be MFC'ed. Jess From owner-dev-commits-src-all@freebsd.org Fri Feb 19 01:23:39 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3BC065345B5; Fri, 19 Feb 2021 01:23: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 4DhYkM1BSLz4g40; Fri, 19 Feb 2021 01:23: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 1BA2122EC7; Fri, 19 Feb 2021 01:23: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 11J1NddO028234; Fri, 19 Feb 2021 01:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J1Ndvm028233; Fri, 19 Feb 2021 01:23:39 GMT (envelope-from git) Date: Fri, 19 Feb 2021 01:23:39 GMT Message-Id: <202102190123.11J1Ndvm028233@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 894360bacd42 - stable/13 - MFC jail: Handle a possible race between jail_remove(2) and fork(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 894360bacd42f021551f76518edd445f6d299f2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 01:23:39 -0000 The branch stable/13 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=894360bacd42f021551f76518edd445f6d299f2e commit 894360bacd42f021551f76518edd445f6d299f2e Author: Jamie Gritton AuthorDate: 2021-02-16 19:19:13 +0000 Commit: Jamie Gritton CommitDate: 2021-02-19 01:22:08 +0000 MFC jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Reported by: trasz Approved by: kib (cherry picked from commit cc7b73065302005ebc4a19503188c8d6d5eb923d) --- sys/kern/kern_fork.c | 6 ++++++ sys/kern/kern_jail.c | 24 +++++++++++++++++++++--- sys/sys/jail.h | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 5bdf5054863d..870ae494de5d 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1126,6 +1126,12 @@ fork_return(struct thread *td, struct trapframe *frame) PROC_UNLOCK(p); } + /* + * If the prison was killed mid-fork, die along with it. + */ + if (!prison_isalive(td->td_ucred->cr_prison)) + exit1(td, 0, SIGKILL); + userret(td, frame); #ifdef KTRACE diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index ece0aa33e642..b56c889eeb7e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1764,6 +1764,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; + pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; @@ -2368,6 +2369,12 @@ prison_remove_one(struct prison *pr) drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + pr->pr_flags |= PR_REMOVE; + /* If the prison was persistent, it is not anymore. */ if (pr->pr_flags & PR_PERSIST) { refcount_release(&pr->pr_ref); @@ -2508,6 +2515,17 @@ do_jail_attach(struct thread *td, struct prison *pr) #endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); + + /* + * If the prison was killed while changing credentials, die along + * with it. + */ + if (!prison_isalive(pr)) { + PROC_LOCK(p); + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + return (0); e_unlock: @@ -3038,17 +3056,18 @@ prison_ischild(struct prison *pr1, struct prison *pr2) /* * Return true if the prison is currently alive. A prison is alive if it is - * valid and it holds user references. + * valid and holds user references, and it isn't being removed. */ bool prison_isalive(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); if (__predict_false(refcount_load(&pr->pr_uref) == 0)) return (false); + if (__predict_false(pr->pr_flags & PR_REMOVE)) + return (false); return (true); } @@ -3061,7 +3080,6 @@ bool prison_isvalid(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); return (true); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 2d1a26787b99..2ac6aabdbd43 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -216,6 +216,7 @@ struct prison_racct { /* primary jail address. */ /* Internal flag bits */ +#define PR_REMOVE 0x01000000 /* In process of being removed */ #define PR_IP4 0x02000000 /* IPv4 restricted or disabled */ /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 01:45:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DAE7B534C59; Fri, 19 Feb 2021 01:45:54 +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 4DhZD25q8Fz4h5T; Fri, 19 Feb 2021 01:45:54 +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 B673C232E8; Fri, 19 Feb 2021 01:45:54 +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 11J1jssm054215; Fri, 19 Feb 2021 01:45:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J1jsw7054214; Fri, 19 Feb 2021 01:45:54 GMT (envelope-from git) Date: Fri, 19 Feb 2021 01:45:54 GMT Message-Id: <202102190145.11J1jsw7054214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4621c4f2fd17 - main - tests/sys/audit: force PIE off 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/main X-Git-Reftype: branch X-Git-Commit: 4621c4f2fd179eff0923140da9af122c42dbe78b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 01:45:54 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4621c4f2fd179eff0923140da9af122c42dbe78b commit 4621c4f2fd179eff0923140da9af122c42dbe78b Author: Ed Maste AuthorDate: 2021-02-19 01:41:33 +0000 Commit: Ed Maste CommitDate: 2021-02-19 01:45:36 +0000 tests/sys/audit: force PIE off df093aa9463b linked against libprivateauditd.a, but that is currently (and incorrectly) built as position-dependent. For now just force PIE off for this test to fix the WITH_PIE build. Sponsored by: The FreeBSD Foundation --- tests/sys/audit/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/audit/Makefile b/tests/sys/audit/Makefile index d074bcc1f28d..4cacd86d009a 100644 --- a/tests/sys/audit/Makefile +++ b/tests/sys/audit/Makefile @@ -57,6 +57,7 @@ TEST_METADATA+= required_user="root" TEST_METADATA+= is_exclusive="true" TEST_METADATA+= required_files="/etc/rc.d/auditd /dev/auditpipe" +MK_PIE:= no # XXX libprivateauditd.a is not PIE LDFLAGS+= -lbsm -lutil OPENBSMDIR=${SRCTOP}/contrib/openbsm CFLAGS+= -I${OPENBSMDIR} From owner-dev-commits-src-all@freebsd.org Fri Feb 19 01:54:44 2021 Return-Path: Delivered-To: dev-commits-src-all@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 24985535172; Fri, 19 Feb 2021 01:54:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhZQD04csz4hM2; Fri, 19 Feb 2021 01:54:44 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E3F52B8E3; Fri, 19 Feb 2021 01:54:43 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 1FB9D27C0054; Thu, 18 Feb 2021 20:54:43 -0500 (EST) Received: from imap38 ([10.202.2.88]) by compute3.internal (MEProxy); Thu, 18 Feb 2021 20:54:43 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeehgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecufghrlhcuvffnffculddutddmnecujfgurhepofgfgg fkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdeurhgrnhguohhnuceuvghr ghhrvghnfdcuoegsughrrghgohhnsefhrhgvvgeuufffrdhorhhgqeenucggtffrrghtth gvrhhnpeejhfeftddutdelgeekgedtgeejkeffvdejtddthefggfevuefggfefledvgefh gfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegsug hrrghgohhnodhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqddutdegvdefheek ieegqddukedutdekheduqdgsughrrghgohhnpeephfhrvggvuefuffdrohhrghesihhmrg hprdgttg X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id CCF7ACA005D; Thu, 18 Feb 2021 20:54:42 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: In-Reply-To: <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> Date: Thu, 18 Feb 2021 19:54:22 -0600 From: "Brandon Bergren" To: "Jessica Clarke" Cc: "Konstantin Belousov" , "John Baldwin" , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: =?UTF-8?Q?Re:_git:_24fd63e0970f_-_main_-_mips:_Don't_set_=5F=5FNO=5FTLS_?= =?UTF-8?Q?to_disable_some_uses_of_TLS.?= Content-Type: text/plain X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 01:54:44 -0000 On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > > Ok, so the mistake was not deleting it 8 years ago and instead leaving > it around to become part of the ABI. The issue you're referring to > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > latter doesn't exist for __NO_TLS, and the former changes between > static inline and extern)? __NO_TLS should have blocked powerpc64 (and > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's > a major ABI break (frustratingly tiny but breaks the core system > libraries) and thus can't be MFC'ed. > > Jess Right. And I fixed it for powerpc64 for 13 finally becuase I had the excuse of "Well, we're switching to an entirely incompatible ABI due to lld not supporting ELFv1, so I might as well fix this one at the same time since we're forcing people to reinstall from scratch anyway." So yeah, in HEAD, all references to __NO_TLS can go away fully, in stable/13 the mips part probably has to stay (riscv can play the tier 3 card though), and in 12 it's baked in for life. The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transition is over and done with as of the end of 2019. I probably should have taken that part out last year, since it was meant to just be a temporary compatibility shim so that people could compile both the gcc4.2 ELFv1 and llvm ELFv2 versions of 13-CURRENT out of the same tree back when we were in the middle of switching over. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-all@freebsd.org Fri Feb 19 03:29:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 579DC539A6D; Fri, 19 Feb 2021 03:29: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 4DhcWp1xrHz4nrd; Fri, 19 Feb 2021 03:29: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 3642E2482E; Fri, 19 Feb 2021 03:29: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 11J3TgQP088195; Fri, 19 Feb 2021 03:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J3TgmF088194; Fri, 19 Feb 2021 03:29:42 GMT (envelope-from git) Date: Fri, 19 Feb 2021 03:29:42 GMT Message-Id: <202102190329.11J3TgmF088194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 812c9f48a2b7 - main - Save context switch per I/O for iSCSI and IOCTL frontends. 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/main X-Git-Reftype: branch X-Git-Commit: 812c9f48a2b7bccc31b2a6077b299822357832e4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 03:29:42 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=812c9f48a2b7bccc31b2a6077b299822357832e4 commit 812c9f48a2b7bccc31b2a6077b299822357832e4 Author: Alexander Motin AuthorDate: 2021-02-19 03:07:32 +0000 Commit: Alexander Motin CommitDate: 2021-02-19 03:29:38 +0000 Save context switch per I/O for iSCSI and IOCTL frontends. Introduce new CTL core KPI ctl_run(), preprocessing I/Os in the caller context instead of scheduling another thread just for that. This call may sleep, that is not acceptable for some frontends like the original CAM/FC one, but iSCSI already has separate sleepable per-connection RX threads, and another thread scheduling is mostly just a waste of time. IOCTL frontend actually waits for the I/O completion in the caller thread, so the use of another thread for this has even less sense. With this change I can measure ~5% IOPS improvement on 4KB iSCSI I/Os to ZFS. MFC after: 1 month --- sys/cam/ctl/README.ctl.txt | 2 +- sys/cam/ctl/ctl.c | 65 ++++++++++++++++++++++++++++++---------- sys/cam/ctl/ctl_frontend.h | 7 +++++ sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- sys/cam/ctl/ctl_frontend_iscsi.c | 12 ++++---- sys/cam/ctl/ctl_tpc.c | 2 +- 6 files changed, 65 insertions(+), 25 deletions(-) diff --git a/sys/cam/ctl/README.ctl.txt b/sys/cam/ctl/README.ctl.txt index 27ebe49aec56..db8666ea99db 100644 --- a/sys/cam/ctl/README.ctl.txt +++ b/sys/cam/ctl/README.ctl.txt @@ -258,7 +258,7 @@ point. Here is a roadmap of some of the primary functions in ctl.c. Starting here and following the various leaf functions will show the command flow. -ctl_queue() This is where commands from the frontend ports come +ctl_queue() / ctl_run() This is where commands from the frontend ports come in. ctl_queue_sense() This is only used for non-packetized SCSI. i.e. diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 37962eb3522c..d7769e270016 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -513,8 +513,7 @@ static int ctl_scsiio_lun_check(struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio); static void ctl_failover_lun(union ctl_io *io); -static int ctl_scsiio_precheck(struct ctl_softc *ctl_softc, - struct ctl_scsiio *ctsio); +static void ctl_scsiio_precheck(struct ctl_scsiio *ctsio); static int ctl_scsiio(struct ctl_scsiio *ctsio); static int ctl_target_reset(union ctl_io *io); @@ -11437,14 +11436,14 @@ ctl_failover_lun(union ctl_io *rio) mtx_unlock(&lun->lun_lock); } -static int -ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) +static void +ctl_scsiio_precheck(struct ctl_scsiio *ctsio) { + struct ctl_softc *softc = CTL_SOFTC(ctsio); struct ctl_lun *lun; const struct ctl_cmd_entry *entry; union ctl_io *bio; uint32_t initidx, targ_lun; - int retval = 0; lun = NULL; targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; @@ -11482,7 +11481,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) if (entry == NULL) { if (lun) mtx_unlock(&lun->lun_lock); - return (retval); + return; } ctsio->io_hdr.flags &= ~CTL_FLAG_DATA_MASK; @@ -11499,13 +11498,13 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) if (entry->flags & CTL_CMD_FLAG_OK_ON_NO_LUN) { ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; ctl_enqueue_rtr((union ctl_io *)ctsio); - return (retval); + return; } ctl_set_unsupported_lun(ctsio); ctl_done((union ctl_io *)ctsio); CTL_DEBUG_PRINT(("ctl_scsiio_precheck: bailing out due to invalid LUN\n")); - return (retval); + return; } else { /* * Make sure we support this particular command on this LUN. @@ -11515,7 +11514,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) mtx_unlock(&lun->lun_lock); ctl_set_invalid_opcode(ctsio); ctl_done((union ctl_io *)ctsio); - return (retval); + return; } } @@ -11569,14 +11568,14 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) ctsio->io_hdr.status = CTL_SCSI_ERROR | CTL_AUTOSENSE; ctsio->sense_len = sense_len; ctl_done((union ctl_io *)ctsio); - return (retval); + return; } } if (ctl_scsiio_lun_check(lun, entry, ctsio) != 0) { mtx_unlock(&lun->lun_lock); ctl_done((union ctl_io *)ctsio); - return (retval); + return; } /* @@ -11613,9 +11612,9 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) M_WAITOK)) > CTL_HA_STATUS_SUCCESS) { ctl_set_busy(ctsio); ctl_done((union ctl_io *)ctsio); - return (retval); + return; } - return (retval); + return; } bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); @@ -11625,7 +11624,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) TAILQ_INSERT_TAIL(&bio->io_hdr.blocked_queue, &ctsio->io_hdr, blocked_links); mtx_unlock(&lun->lun_lock); - return (retval); + break; case CTL_ACTION_PASS: case CTL_ACTION_SKIP: ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR; @@ -11651,7 +11650,6 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio) ctl_done((union ctl_io *)ctsio); break; } - return (retval); } const struct ctl_cmd_entry * @@ -13253,6 +13251,41 @@ ctl_queue(union ctl_io *io) return (CTL_RETVAL_COMPLETE); } +int +ctl_run(union ctl_io *io) +{ + struct ctl_port *port = CTL_PORT(io); + + CTL_DEBUG_PRINT(("ctl_run cdb[0]=%02X\n", io->scsiio.cdb[0])); + +#ifdef CTL_TIME_IO + io->io_hdr.start_time = time_uptime; + getbinuptime(&io->io_hdr.start_bt); +#endif /* CTL_TIME_IO */ + + /* Map FE-specific LUN ID into global one. */ + io->io_hdr.nexus.targ_mapped_lun = + ctl_lun_map_from_port(port, io->io_hdr.nexus.targ_lun); + + switch (io->io_hdr.io_type) { + case CTL_IO_SCSI: + if (ctl_debug & CTL_DEBUG_CDB) + ctl_io_print(io); + ctl_scsiio_precheck(&io->scsiio); + break; + case CTL_IO_TASK: + if (ctl_debug & CTL_DEBUG_CDB) + ctl_io_print(io); + ctl_run_task(io); + break; + default: + printf("ctl_run: unknown I/O type %d\n", io->io_hdr.io_type); + return (EINVAL); + } + + return (CTL_RETVAL_COMPLETE); +} + #ifdef CTL_IO_DELAY static void ctl_done_timer_wakeup(void *arg) @@ -13384,7 +13417,7 @@ ctl_work_thread(void *arg) if (io->io_hdr.io_type == CTL_IO_TASK) ctl_run_task(io); else - ctl_scsiio_precheck(softc, &io->scsiio); + ctl_scsiio_precheck(&io->scsiio); continue; } io = (union ctl_io *)STAILQ_FIRST(&thr->rtr_queue); diff --git a/sys/cam/ctl/ctl_frontend.h b/sys/cam/ctl/ctl_frontend.h index bdcb7a2e1abd..c9ab255cdde4 100644 --- a/sys/cam/ctl/ctl_frontend.h +++ b/sys/cam/ctl/ctl_frontend.h @@ -310,6 +310,13 @@ void ctl_port_offline(struct ctl_port *fe); */ int ctl_queue(union ctl_io *io); +/* + * This routine starts execution of I/O and task management requests from + * the FETD to the CTL layer. May sleep. Returns 0 for success, non-zero + * for failure. + */ +int ctl_run(union ctl_io *io); + /* * This routine is used if the front end interface doesn't support * autosense (e.g. non-packetized parallel SCSI). This will queue the diff --git a/sys/cam/ctl/ctl_frontend_ioctl.c b/sys/cam/ctl/ctl_frontend_ioctl.c index 370e553042c5..ef5e2bd22a86 100644 --- a/sys/cam/ctl/ctl_frontend_ioctl.c +++ b/sys/cam/ctl/ctl_frontend_ioctl.c @@ -524,7 +524,7 @@ cfi_submit_wait(union ctl_io *io) CTL_DEBUG_PRINT(("cfi_submit_wait\n")); /* This shouldn't happen */ - if ((retval = ctl_queue(io)) != CTL_RETVAL_COMPLETE) + if ((retval = ctl_run(io)) != CTL_RETVAL_COMPLETE) return (retval); done = 0; diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 8b0effcaf393..73483fb155cc 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -557,9 +557,9 @@ cfiscsi_pdu_handle_scsi_command(struct icl_pdu *request) io->scsiio.cdb_len = sizeof(bhssc->bhssc_cdb); /* Which is 16. */ memcpy(io->scsiio.cdb, bhssc->bhssc_cdb, sizeof(bhssc->bhssc_cdb)); refcount_acquire(&cs->cs_outstanding_ctl_pdus); - error = ctl_queue(io); + error = ctl_run(io); if (error != CTL_RETVAL_COMPLETE) { - CFISCSI_SESSION_WARN(cs, "ctl_queue() failed; error %d; " + CFISCSI_SESSION_WARN(cs, "ctl_run() failed; error %d; " "dropping connection", error); ctl_free_io(io); refcount_release(&cs->cs_outstanding_ctl_pdus); @@ -679,9 +679,9 @@ cfiscsi_pdu_handle_task_request(struct icl_pdu *request) } refcount_acquire(&cs->cs_outstanding_ctl_pdus); - error = ctl_queue(io); + error = ctl_run(io); if (error != CTL_RETVAL_COMPLETE) { - CFISCSI_SESSION_WARN(cs, "ctl_queue() failed; error %d; " + CFISCSI_SESSION_WARN(cs, "ctl_run() failed; error %d; " "dropping connection", error); ctl_free_io(io); refcount_release(&cs->cs_outstanding_ctl_pdus); @@ -1128,9 +1128,9 @@ cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs) io->taskio.task_action = CTL_TASK_I_T_NEXUS_RESET; wait = cs->cs_outstanding_ctl_pdus; refcount_acquire(&cs->cs_outstanding_ctl_pdus); - error = ctl_queue(io); + error = ctl_run(io); if (error != CTL_RETVAL_COMPLETE) { - CFISCSI_SESSION_WARN(cs, "ctl_queue() failed; error %d", error); + CFISCSI_SESSION_WARN(cs, "ctl_run() failed; error %d", error); refcount_release(&cs->cs_outstanding_ctl_pdus); ctl_free_io(io); } diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c index 456157749c89..5e6cb09760a7 100644 --- a/sys/cam/ctl/ctl_tpc.c +++ b/sys/cam/ctl/ctl_tpc.c @@ -1628,7 +1628,7 @@ tpc_done(union ctl_io *io) io->io_hdr.flags &= ~CTL_FLAG_ABORT; io->io_hdr.flags &= ~CTL_FLAG_SENT_2OTHER_SC; if (tpcl_queue(io, tio->lun) != CTL_RETVAL_COMPLETE) { - printf("%s: error returned from ctl_queue()!\n", + printf("%s: error returned from tpcl_queue()!\n", __func__); io->io_hdr.status = old_status; } else From owner-dev-commits-src-all@freebsd.org Fri Feb 19 03:38:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CD05053A32C; Fri, 19 Feb 2021 03:38:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhcjS47SQz4p5M; Fri, 19 Feb 2021 03:38:04 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f53.google.com with SMTP id s107so3945097otb.8; Thu, 18 Feb 2021 19:38:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=191z9Cc+7QNPXruC9nYKiOctTgTxqPgO/reL6DRJzdY=; b=Rmvk/C8DScUfkpy165u/enRzFRtyZ1KECDoM9hOzMa5D2/oltgM+Uc3rGPO5B4RsP8 nGSyQ3WJOxMvCK7+2mm8uechC3rR5TSUfiyH4XrAJplAXBp0swsWufR/K7sFTvARcB69 KLswu4tNEepsV1Y3/fHv/WVbiXMw+4F0YfA8WPP5GrLsx57vOLni1NZx4dSpPQ8Llbwj 4oWIHcRRlbht1tTh4MHmm8JAbF3KOBl96Hx0ToyQSHW0mvk/8+WLvxc7Lm8D04uQnAGQ c3pniUOF3elDMVxwki+6uCZRKOd5MFYtnQXPCXN//vqiJpvx1CAXGFK0IzTAv17b5lAx Lhrw== X-Gm-Message-State: AOAM531c5zm3VTn72V7e5cIKuPgd9Lz2KqIfUPrhnGwfJShxNqiqgXdr TbPAk32l2ZMYaFRzZrtmtWir28aXU6LEpHcJg05pY/rRnwc= X-Google-Smtp-Source: ABdhPJx+hGXpLdTEo7hBc8pqTx89eyNVrV3a9kmcZOyNvTns5OJkWq6Pw3zJXkXh4/qMLAKFElUM555kdL8c9aEHNM4= X-Received: by 2002:a05:6830:18e6:: with SMTP id d6mr5547310otf.251.1613705882950; Thu, 18 Feb 2021 19:38:02 -0800 (PST) MIME-Version: 1.0 References: <202102190329.11J3TgmF088194@gitrepo.freebsd.org> In-Reply-To: <202102190329.11J3TgmF088194@gitrepo.freebsd.org> From: Alan Somers Date: Thu, 18 Feb 2021 20:37:51 -0700 Message-ID: Subject: Re: git: 812c9f48a2b7 - main - Save context switch per I/O for iSCSI and IOCTL frontends. To: Alexander Motin Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DhcjS47SQz4p5M X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 03:38:04 -0000 On Thu, Feb 18, 2021 at 8:29 PM Alexander Motin wrote: > The branch main has been updated by mav: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=812c9f48a2b7bccc31b2a6077b299822357832e4 > > commit 812c9f48a2b7bccc31b2a6077b299822357832e4 > Author: Alexander Motin > AuthorDate: 2021-02-19 03:07:32 +0000 > Commit: Alexander Motin > CommitDate: 2021-02-19 03:29:38 +0000 > > Save context switch per I/O for iSCSI and IOCTL frontends. > > Introduce new CTL core KPI ctl_run(), preprocessing I/Os in the caller > context instead of scheduling another thread just for that. This call > may sleep, that is not acceptable for some frontends like the original > CAM/FC one, but iSCSI already has separate sleepable per-connection RX > threads, and another thread scheduling is mostly just a waste of time. > IOCTL frontend actually waits for the I/O completion in the caller > thread, so the use of another thread for this has even less sense. > > With this change I can measure ~5% IOPS improvement on 4KB iSCSI I/Os > to ZFS. > Cool! That sounds very useful. From owner-dev-commits-src-all@freebsd.org Fri Feb 19 04:02:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 701C253ACC8; Fri, 19 Feb 2021 04:02:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhdFy1yGxz4qW9; Fri, 19 Feb 2021 04:02:46 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg1-x531.google.com with SMTP id z21so2750533pgj.4; Thu, 18 Feb 2021 20:02:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=aM7Myc3gP7WTIvAT08E4taREbyt/qEwrHu+uLzy0V9Q=; b=iui4GTmKtda5m4HBcvZQXttmTkhjHLAjuJSfKD8q6mDFdos0J8NGhBNt7tgnMgiV2k lw9nF5fzDtjlVkEguFxQ2QS3enc5DcjF9BZi1Bf9X1nyJIbpHN+9gWMORhh2pttjo0BZ 22/zht99Stsquor3k1wgukNle2z8NpZyEU5BZFBGVhm+cCvnbjs7dbDHJG4FLgsF72rf sPeyREg174I7h6zy2hfZGkXY4fParXUZUdqnFvQwCtiI2NSYxaxQQLzEppe5+ohJ21md 7sPmlqvGe1RvlkXcyllmRf1olVhaVc4KTY1yzfZXkdQY8wHVk45WGm+9zKQeLtvBY5Ul hSzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=aM7Myc3gP7WTIvAT08E4taREbyt/qEwrHu+uLzy0V9Q=; b=UI9ZjtfKF3gXjq+tJd2mhT6prukjERAgffWFw2bTeYayUkpJU6GwNueTImwifPyhyd beX203bdhH7FiDng8zWPr+6tvJNuyUlVPUnLY6c9pD9FwVvgZewHZ18Cg5ie03XoZFIA iD7bpm4guGJUddtnoaZP8CRL8dFzSGXAIj8ZIgT9Sc1hLYHAeTmo/wIRGGVvYWfj6S07 QQHJAcICtX33Hcx6RgsHaDgusJazkk7puzofA+2ha+9tYeRrc0meuVsPeC/Bie/kcgp/ K8yfw5o8Vc7Tg+iKDdH/8PncqArkg9Zcfq7cuoEZIuALPwsZ/zzpdvdE1VJM72DRX9En pMzw== X-Gm-Message-State: AOAM532dhP2pwAJK7IzL6nQuX1gbLV2KhALgQ/815Q+//+ChLAh/MdmV MZUmHWiQL8D012exaDT1sRNg5X5Wpr1iKQ== X-Google-Smtp-Source: ABdhPJwYR8dCdLaLfpE+EvAh+kNoU6FAllEmLXwE4fA4jjG52rV4e5JgnyTlyeylBC2BqSKCykW9/g== X-Received: by 2002:a63:1c12:: with SMTP id c18mr6926095pgc.356.1613707364188; Thu, 18 Feb 2021 20:02:44 -0800 (PST) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id l2sm6948494pjg.50.2021.02.18.20.02.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2021 20:02:43 -0800 (PST) From: Enji Cooper Message-Id: <6EF9FDEA-6CE6-4212-B489-B1170EC153EF@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: git: e13e4fa6c4eb - main - fix Navdeeps LINT_NOINET error. Date: Thu, 18 Feb 2021 20:02:42 -0800 In-Reply-To: <202102181251.11ICpheY033790@gitrepo.freebsd.org> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Randall Stewart References: <202102181251.11ICpheY033790@gitrepo.freebsd.org> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4DhdFy1yGxz4qW9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 04:02:46 -0000 > On Feb 18, 2021, at 4:51 AM, Randall Stewart wrote: >=20 > The branch main has been updated by rrs: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3De13e4fa6c4eba72de5c4685942de5dbe= 8f43db73 >=20 > commit e13e4fa6c4eba72de5c4685942de5dbe8f43db73 > Author: Randall Stewart > AuthorDate: 2021-02-18 12:29:12 +0000 > Commit: Randall Stewart > CommitDate: 2021-02-18 12:29:12 +0000 >=20 > fix Navdeeps LINT_NOINET error. Hi Randall, Could you please reference the commit which caused the breakage, = i.e., 0a4f851074a3, next time? It=E2=80=99s really hard to determine = what the cause of the breakage is without first understanding that = np@FreeBSD.org is the =E2=80=9CNavdeep=E2=80=9D = being referred to in the commit; having the commit(s) referenced would = allow me to figure out what caused the issue. Thank you so very much for helping break the build! -Enji= From owner-dev-commits-src-all@freebsd.org Fri Feb 19 04:29:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 15B2A53AFF4 for ; Fri, 19 Feb 2021 04:29:52 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72b.google.com (mail-qk1-x72b.google.com [IPv6:2607:f8b0:4864:20::72b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhdsC6r3Zz4rmh for ; Fri, 19 Feb 2021 04:29:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72b.google.com with SMTP id b14so4524554qkk.0 for ; Thu, 18 Feb 2021 20:29:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=z6cS+ICy5XYIfus1j2z8FyqIYS7e13RM5M2hAqotOAA=; b=h8Nk9ob/KnTfzfHTSVgukFAtCCu1JNQFDvF/QvJZXt5UkcOGb4gxuuLtlxeYJetmSj si1UugfadiGctc/Gfj4FsX6ebbz5QeFQGZKWCm4VsoTiPB2+1r6YLODx6BcsdH+GXYjq gANH3KTwmJr1FpsnsP1TpK6xKYPvyt26R+pBQRN41Tn39hsIfb+IMrWvw3blUNlWQ8KZ On6r+7YC3y9oBYtIthbZ/sTXr1BPrld+/U+Lc+VJ+s+gvwJxDsxqfVA6GQgqft52UX77 AE7eXMg8zOBNVspIuvxJviqmqW075Yrufv635qs+e2GZFIVanAtW59omxSiZV5Lc0vfd YUIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=z6cS+ICy5XYIfus1j2z8FyqIYS7e13RM5M2hAqotOAA=; b=mBiNLHDEdJ1UQt4zJgvYItR4CcfadJFTzqU7HTrXoGb6QEe5ysvxh+7C2bmtrBmTCr U6Zh0h1i3Ieid9PtUPXSiTY3TbqvOsp6TeVNzTuOxwTJSU7zcvs5QUa9agmGkBYnKUwW 5tzMI6yz4sP8qaDmTvPy6jEA/EEiJeqBgiAcgdUvhQVuYT9ovYy72hrnO6RO7POP36en 4rTpmTpSu85rHoOPFyXG+nhoN1/Wh2/CI5LrCTpeVICJYyqG8R0UdU1PTpiqZC8nggl9 Su24AAgU/IEBPzM64vMgwjxA/aHx3HUGo8zWZHnrx+I+hJh/KqjhdjcYea8h3iYt2IKm VEzg== X-Gm-Message-State: AOAM533ue5VZssRiw6i2g0hANBRaRqSfIKyy5Xn9yjyKK38rEahWoF1h ss++EcJglZwewvikhhyQznD7SXDe0/FvEneERBAuaQ== X-Google-Smtp-Source: ABdhPJxIGRn2ago6ap68BGMJZx85S1zrokJ4ZOEljZeGpEfeg6YQCy6zUAVtvHjLBvlZVx8SKaI0EhNN3eAACETuZ5w= X-Received: by 2002:a37:a151:: with SMTP id k78mr7577135qke.359.1613708990904; Thu, 18 Feb 2021 20:29:50 -0800 (PST) MIME-Version: 1.0 References: <202102181251.11ICpheY033790@gitrepo.freebsd.org> <6EF9FDEA-6CE6-4212-B489-B1170EC153EF@gmail.com> In-Reply-To: <6EF9FDEA-6CE6-4212-B489-B1170EC153EF@gmail.com> From: Warner Losh Date: Thu, 18 Feb 2021 21:29:40 -0700 Message-ID: Subject: Re: git: e13e4fa6c4eb - main - fix Navdeeps LINT_NOINET error. To: Enji Cooper Cc: Randall Stewart , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" X-Rspamd-Queue-Id: 4DhdsC6r3Zz4rmh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 04:29:52 -0000 On Thu, Feb 18, 2021 at 9:02 PM Enji Cooper wrote: > > On Feb 18, 2021, at 4:51 AM, Randall Stewart wrote: > > The branch main has been updated by rrs: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3De13e4fa6c4eba72de5c4685942de5db= e8f43db73 > > commit e13e4fa6c4eba72de5c4685942de5dbe8f43db73 > Author: Randall Stewart > AuthorDate: 2021-02-18 12:29:12 +0000 > Commit: Randall Stewart > CommitDate: 2021-02-18 12:29:12 +0000 > > fix Navdeeps LINT_NOINET error. > > > Hi Randall, > Could you please reference the commit which caused the breakage, i.e., 0a= 4f851074a3, > next time? It=E2=80=99s really hard to determine what the cause of the br= eakage > is without first understanding that np@FreeBSD.org is the =E2=80=9CNavdee= p=E2=80=9D being > referred to in the commit; having the commit(s) referenced would allow me > to figure out what caused the issue. > Thank you so very much for helping break the build! > Emaste@ has proposed adopting the fairly common 'Fixes: ' metadata item that could be used for this as well as grouping commits for MFC. https://reviews.freebsd.org/D28693 Warner From owner-dev-commits-src-all@freebsd.org Fri Feb 19 04:31:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 549B653B69D; Fri, 19 Feb 2021 04:31: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 4DhdvF21Jqz4sFh; Fri, 19 Feb 2021 04:31: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 38018256B2; Fri, 19 Feb 2021 04:31: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 11J4Vblh074969; Fri, 19 Feb 2021 04:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J4Vb6W074968; Fri, 19 Feb 2021 04:31:37 GMT (envelope-from git) Date: Fri, 19 Feb 2021 04:31:37 GMT Message-Id: <202102190431.11J4Vb6W074968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Guangyuan Yang Subject: git: bef16fad3bd2 - stable/13 - VOP_ADVLOCK(9): fix a typo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bef16fad3bd2f3291f36c9a745b2a70a40ebc9b6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 04:31:37 -0000 The branch stable/13 has been updated by ygy (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bef16fad3bd2f3291f36c9a745b2a70a40ebc9b6 commit bef16fad3bd2f3291f36c9a745b2a70a40ebc9b6 Author: Guangyuan Yang AuthorDate: 2021-02-11 00:25:58 +0000 Commit: Guangyuan Yang CommitDate: 2021-02-19 04:31:08 +0000 VOP_ADVLOCK(9): fix a typo Submitted by: Ka Ho Ng Differential Revision: https://reviews.freebsd.org/D28575 (cherry picked from commit c03ccb991d0e399435c9bbdb6b266ecee93f5b46) --- share/man/man9/VOP_ADVLOCK.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/VOP_ADVLOCK.9 b/share/man/man9/VOP_ADVLOCK.9 index e850f32e12b4..fab1e30484d2 100644 --- a/share/man/man9/VOP_ADVLOCK.9 +++ b/share/man/man9/VOP_ADVLOCK.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 27, 2019 +.Dd February 10, 2021 .Dt VOP_ADVLOCK 9 .Os .Sh NAME @@ -54,7 +54,7 @@ The operation to perform (see .It Fa fl Description of the lock. .It Fa flags -One of more of the following: +One or more of the following: .Pp .Bl -tag -width ".Dv F_REMOTE" -offset indent -compact .It Dv F_WAIT From owner-dev-commits-src-all@freebsd.org Fri Feb 19 04:37:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2121D53BA92; Fri, 19 Feb 2021 04:37:23 +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 4Dhf1v0VdPz4sb5; Fri, 19 Feb 2021 04:37: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 04221253DA; Fri, 19 Feb 2021 04:37: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 11J4bM1b079768; Fri, 19 Feb 2021 04:37:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11J4bMY8079767; Fri, 19 Feb 2021 04:37:22 GMT (envelope-from git) Date: Fri, 19 Feb 2021 04:37:22 GMT Message-Id: <202102190437.11J4bMY8079767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 4c0bef07be07 - main - kern: net: remove TCP_LINGERTIME MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c0bef07be071a1633ebc86a653f9bd59d40796e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 04:37:23 -0000 The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4c0bef07be071a1633ebc86a653f9bd59d40796e commit 4c0bef07be071a1633ebc86a653f9bd59d40796e Author: Kyle Evans AuthorDate: 2021-01-21 04:02:04 +0000 Commit: Kyle Evans CommitDate: 2021-02-19 04:36:01 +0000 kern: net: remove TCP_LINGERTIME TCP_LINGERTIME can be traced back to BSD 4.4 Lite and perhaps beyond, in exactly the same form that it appears here modulo slightly different context. It used to be the case that there was a single pr_usrreq method with requests dispatched to it; these exact two lines appeared in tcp_usrreq's PRU_ATTACH handling. The only purpose of this that I can find is to cause surprising behavior on accepted connections. Newly-created sockets will never hit these paths as one cannot set SO_LINGER prior to socket(2). If SO_LINGER is set on a listening socket and inherited, one would expect the timeout to be inherited rather than changed arbitrarily like this -- noting that SO_LINGER is nonsense on a listening socket beyond inheritance, since they cannot be 'connected' by definition. Neither Illumos nor Linux reset the timer like this based on testing and inspection of Illumos, and testing of Linux. Reviewed by: rscheff, tuexen Differential Revision: https://reviews.freebsd.org/D28265 --- sys/netinet/tcp_timer.h | 2 -- sys/netinet/tcp_usrreq.c | 2 -- sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c | 2 -- 3 files changed, 6 deletions(-) diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index 6f0c3a46605a..9a711d173386 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -115,8 +115,6 @@ #define TCPTV_TWTRUNC 8 /* RTO factor to truncate TW */ -#define TCP_LINGERTIME 120 /* linger at most 2 minutes */ - #define TCP_MAXRXTSHIFT 12 /* maximum retransmits */ #define TCPTV_DELACK ( hz/25 ) /* 40ms timeout */ diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index bfa96ce093b5..31b580bfafcc 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -204,8 +204,6 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) tp->t_state = TCPS_CLOSED; INP_WUNLOCK(inp); TCPSTATES_INC(TCPS_CLOSED); - if ((so->so_options & SO_LINGER) && so->so_linger == 0) - so->so_linger = TCP_LINGERTIME; out: TCPDEBUG2(PRU_ATTACH); TCP_PROBE2(debug__user, tp, PRU_ATTACH); diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c index 46a43e1b8e3b..e7ae4e03365e 100644 --- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c @@ -482,8 +482,6 @@ sdp_attach(struct socket *so, int proto, struct thread *td) LIST_INSERT_HEAD(&sdp_list, ssk, list); sdp_count++; SDP_LIST_WUNLOCK(); - if ((so->so_options & SO_LINGER) && so->so_linger == 0) - so->so_linger = TCP_LINGERTIME; return (0); } From owner-dev-commits-src-all@freebsd.org Fri Feb 19 09:43:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 75699542776; Fri, 19 Feb 2021 09:43:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DhmpZ1Yv7z3hG3; Fri, 19 Feb 2021 09:43:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 11J9gs7t090940 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 19 Feb 2021 11:42:57 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 11J9gs7t090940 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 11J9gsYs090939; Fri, 19 Feb 2021 11:42:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Feb 2021 11:42:54 +0200 From: Konstantin Belousov To: Brandon Bergren Cc: Jessica Clarke , John Baldwin , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. Message-ID: References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DhmpZ1Yv7z3hG3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 09:43:02 -0000 On Thu, Feb 18, 2021 at 07:54:22PM -0600, Brandon Bergren wrote: > > > On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > > On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > > > > Ok, so the mistake was not deleting it 8 years ago and instead leaving > > it around to become part of the ABI. The issue you're referring to > > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > > latter doesn't exist for __NO_TLS, and the former changes between > > static inline and extern)? __NO_TLS should have blocked powerpc64 (and > > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's > > a major ABI break (frustratingly tiny but breaks the core system > > libraries) and thus can't be MFC'ed. > > > > Jess > > Right. > > And I fixed it for powerpc64 for 13 finally becuase I had the excuse of "Well, we're switching to an entirely incompatible ABI due to lld not supporting ELFv1, so I might as well fix this one at the same time since we're forcing people to reinstall from scratch anyway." > > So yeah, in HEAD, all references to __NO_TLS can go away fully, in stable/13 the mips part probably has to stay (riscv can play the tier 3 card though), and in 12 it's baked in for life. > > The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transition is over and done with as of the end of 2019. I probably should have taken that part out last year, since it was meant to just be a temporary compatibility shim so that people could compile both the gcc4.2 ELFv1 and llvm ELFv2 versions of 13-CURRENT out of the same tree back when we were in the middle of switching over. So why didn't you go ahead and removed at least the remaining block that defines __NO_TLS for PowerPC? I promise to clean the tree out of its uses after that. From owner-dev-commits-src-all@freebsd.org Fri Feb 19 12:45:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 19ACD529CF0; Fri, 19 Feb 2021 12:45:23 +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 4Dhrrz0H4Cz4QlR; Fri, 19 Feb 2021 12:45: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 EFE69428A; Fri, 19 Feb 2021 12:45:22 +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 11JCjM2C026544; Fri, 19 Feb 2021 12:45:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JCjM7i026543; Fri, 19 Feb 2021 12:45:22 GMT (envelope-from git) Date: Fri, 19 Feb 2021 12:45:22 GMT Message-Id: <202102191245.11JCjM7i026543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Daniel Ebdrup Jensen Subject: git: 248a47a4c2fb - main - ports(7): Update instructions for package target MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: debdrup X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 248a47a4c2fb229ae815fa61875b3f62a2d6856c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 12:45:23 -0000 The branch main has been updated by debdrup (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=248a47a4c2fb229ae815fa61875b3f62a2d6856c commit 248a47a4c2fb229ae815fa61875b3f62a2d6856c Author: Daniel Ebdrup Jensen AuthorDate: 2021-02-18 21:50:54 +0000 Commit: Daniel Ebdrup Jensen CommitDate: 2021-02-19 12:42:16 +0000 ports(7): Update instructions for package target Packages default to ending up in a different location compared to the documentation, so catch up to the implementation by referring to the location where packages can usually be found if no environment variables have been set. While here, also update the mention of the file extension to match the txz format that packages use. PR: 253179, 224370 Reported by: rwatson, jeromer at fastmail dotnet --- share/man/man7/ports.7 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 0ee6ae7ee714..d428770f921c 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2020 +.Dd February 18, 2021 .Dt PORTS 7 .Os .Sh NAME @@ -284,17 +284,19 @@ from the system. Make a binary package for the port. The port will be installed if it has not already been. The package is a -.Pa .tbz +.Pa .txz file that you can use to install the port on other machines with .Xr pkg-add 8 . If the directory specified by .Va PACKAGES -does not exist, the package will be put into the current directory. +does not exist, the package will be put in +.Pa /usr/ports/category/port/work/pkg . See .Va PKGREPOSITORY and -.Va PKGFILE . +.Va PKGFILE +for more information. .It Cm package-recursive Like .Cm package , From owner-dev-commits-src-all@freebsd.org Fri Feb 19 12:56:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6848A52A5B6; Fri, 19 Feb 2021 12:56: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 4Dhs6K2Vvmz4Rbr; Fri, 19 Feb 2021 12:56: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 48B9640C5; Fri, 19 Feb 2021 12:56: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 11JCuvi4039664; Fri, 19 Feb 2021 12:56:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JCuvNa039663; Fri, 19 Feb 2021 12:56:57 GMT (envelope-from git) Date: Fri, 19 Feb 2021 12:56:57 GMT Message-Id: <202102191256.11JCuvNa039663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4b2a20dfde9c - stable/13 - ffs_vnops.c: Move opt_*.h includes to the top. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4b2a20dfde9cff7c65b4620f948fb81521dcf264 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 12:56:57 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2a20dfde9cff7c65b4620f948fb81521dcf264 commit 4b2a20dfde9cff7c65b4620f948fb81521dcf264 Author: Konstantin Belousov AuthorDate: 2021-01-28 18:30:35 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-19 12:45:52 +0000 ffs_vnops.c: Move opt_*.h includes to the top. (cherry picked from commit 0281f88e5dbc8d6f819bf3f22dd11239ff5374ea) --- sys/ufs/ffs/ffs_vnops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 6ca98a84869d..68985d8715f3 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -66,6 +66,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_directio.h" +#include "opt_ffs.h" + #include #include #include @@ -99,8 +102,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_directio.h" -#include "opt_ffs.h" #define ALIGNED_TO(ptr, s) \ (((uintptr_t)(ptr) & (_Alignof(s) - 1)) == 0) From owner-dev-commits-src-all@freebsd.org Fri Feb 19 13:04:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B5E9752ABE6; Fri, 19 Feb 2021 13:04: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 4DhsH04mvKz4SWW; Fri, 19 Feb 2021 13:04: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 924964722; Fri, 19 Feb 2021 13:04: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 11JD4SkB053013; Fri, 19 Feb 2021 13:04:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JD4SsO053012; Fri, 19 Feb 2021 13:04:28 GMT (envelope-from git) Date: Fri, 19 Feb 2021 13:04:28 GMT Message-Id: <202102191304.11JD4SsO053012@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2b1f87a83c1c - stable/12 - ffs_vnops.c: Move opt_*.h includes to the top. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2b1f87a83c1cc338fddbb144fc58a17306e3af64 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 13:04:28 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2b1f87a83c1cc338fddbb144fc58a17306e3af64 commit 2b1f87a83c1cc338fddbb144fc58a17306e3af64 Author: Konstantin Belousov AuthorDate: 2021-01-28 18:30:35 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-19 12:47:36 +0000 ffs_vnops.c: Move opt_*.h includes to the top. (cherry picked from commit 0281f88e5dbc8d6f819bf3f22dd11239ff5374ea) --- sys/ufs/ffs/ffs_vnops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 33f0bb7afedd..17dfb1ff3883 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -66,6 +66,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_directio.h" +#include "opt_ffs.h" + #include #include #include @@ -99,8 +102,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_directio.h" -#include "opt_ffs.h" #define ALIGNED_TO(ptr, s) \ (((uintptr_t)(ptr) & (_Alignof(s) - 1)) == 0) From owner-dev-commits-src-all@freebsd.org Fri Feb 19 13:40:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1E98E52C526; Fri, 19 Feb 2021 13:40: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 4Dht4t0RBXz4VQT; Fri, 19 Feb 2021 13:40: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 020814678; Fri, 19 Feb 2021 13:40: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 11JDejA9003062; Fri, 19 Feb 2021 13:40:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JDejbO003061; Fri, 19 Feb 2021 13:40:45 GMT (envelope-from git) Date: Fri, 19 Feb 2021 13:40:45 GMT Message-Id: <202102191340.11JDejbO003061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 853fd7a2e398 - main - Ensure cwnd doesn't shrink to zero with PRR 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/main X-Git-Reftype: branch X-Git-Commit: 853fd7a2e39802e46bd3d6476529796ac22412d9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 13:40:46 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=853fd7a2e39802e46bd3d6476529796ac22412d9 commit 853fd7a2e39802e46bd3d6476529796ac22412d9 Author: Richard Scheffenegger AuthorDate: 2021-02-19 12:52:06 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-19 12:55:32 +0000 Ensure cwnd doesn't shrink to zero with PRR Under some circumstances, PRR may end up with a fully collapsed cwnd when finalizing the loss recovery. Reviewed By: #transport, kbowling Reported by: Liang Tian MFC after: 1 week Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28780 --- sys/netinet/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index dbe86e4e65c0..39039fe5b9a3 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -3990,8 +3990,8 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) * If there is going to be a SACK retransmission, adjust snd_cwnd * accordingly. */ - tp->snd_cwnd = tp->snd_nxt - tp->snd_recover + - tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg); + tp->snd_cwnd = max(maxseg, (int64_t)tp->snd_nxt - tp->snd_recover + + tp->sackhint.sack_bytes_rexmit + (snd_cnt * maxseg)); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); } From owner-dev-commits-src-all@freebsd.org Fri Feb 19 15:24:12 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DFC43530CB9; Fri, 19 Feb 2021 15:24:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhwND63b9z4clG; Fri, 19 Feb 2021 15:24:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 7EAA0226B2; Fri, 19 Feb 2021 15:24:12 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 311C44E464; Fri, 19 Feb 2021 16:24:10 +0100 (CET) From: "Kristof Provost" To: "Alexander V. Chernikov" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. Date: Fri, 19 Feb 2021 16:24:09 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: <26E2BA35-291E-4DC5-BDCB-D98347D7E24C@FreeBSD.org> In-Reply-To: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 15:24:12 -0000 On 16 Feb 2021, at 21:31, Alexander V. Chernikov wrote: > The branch main has been updated by melifaro: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D2fe5a79425c79f7b828acd91da66d= 97230925fc8 > > commit 2fe5a79425c79f7b828acd91da66d97230925fc8 > Author: Alexander V. Chernikov > AuthorDate: 2021-02-16 20:30:04 +0000 > Commit: Alexander V. Chernikov > CommitDate: 2021-02-16 20:30:04 +0000 > > Fix dst/netmask handling in routing socket code. > > Traditionally routing socket code did almost zero checks on > the input message except for the most basic size checks. > > This resulted in the unclear KPI boundary for the routing system = > code > (`rtrequest*` and now `rib_action()`) w.r.t message validness. > > Multiple potential problems and nuances exists: > * Host bits in RTAX_DST sockaddr. Existing applications do send = > prefixes > with hostbits uncleared. Even `route(8)` does this, as they hope = > the kernel > would do the job of fixing it. Code inside `rib_action()` needs = > to handle > it on its own (see `rt_maskedcopy()` ugly hack). > * There are multiple way of adding the host route: it can be DST = > without > netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be = > set correspondingly. > Currently, these 2 options create 2 DIFFERENT routes in the = > kernel. > * no sockaddr length/content checking for the "secondary" fields = > exists: nothing > stops rtsock application to send sockaddr_in with length of 25 = > (instead of 16). > Kernel will accept it, install to RIB as is and propagate to all = > rtsock consumers, > potentially triggering bugs in their code. Same goes for = > sin_port, sin_zero, etc. > > The goal of this change is to make rtsock verify all sockaddr and = > prefix consistency. > Said differently, `rib_action()` or internals should NOT require = > to change any of the > sockaddrs supplied by `rt_addrinfo` structure due to = > incorrectness. > > To be more specific, this change implements the following: > * sockaddr cleanup/validation check is added immediately after = > getting sockaddrs from rtm. > * Per-family dst/netmask checks clears host bits in dst and zeros = > all dst/netmask "secondary" fields. > * The same netmask checking code converts /32(/128) netmasks to = > "host" route case > (NULL netmask, RTF_HOST), removing the dualism. > * Instead of allowing ANY "known" sockaddr families (0<.. allow only actually > supported ones (inet, inet6, link). > * Automatically convert `sockaddr_sdl` (AF_LINK) gateways to > `sockaddr_sdl_short`. > > Reported by: Guy Yur > Reviewed By: donner > Differential Revision: https://reviews.freebsd.org/D28668 > MFC after: 3 days > --- > sys/net/rtsock.c | 201 = > +++++++++++++++++++++++++++++++++- > tests/sys/net/routing/rtsock_common.h | 4 - > 2 files changed, 195 insertions(+), 10 deletions(-) > > +static int > +cleanup_xaddrs_inet(struct rt_addrinfo *info) > +{ > + struct sockaddr_in *dst_sa, *mask_sa; > + > + /* Check & fixup dst/netmask combination first */ > + dst_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_DST]; > + mask_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; > + > + struct in_addr mask =3D { > + .s_addr =3D mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, > + }; > + struct in_addr dst =3D { > + .s_addr =3D htonl(ntohl(dst_sa->sin_addr.s_addr) & = > ntohl(mask.s_addr)) > + }; > + This breaks things like `arp -d 10.0.2.1`. It always masks off the = network address, which is the right thing to do in the routing table, = but not in the arp table. I=E2=80=99ve worked around it for now with this hack: diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3c1fea497af6..533076db99a5 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -638,9 +638,12 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, = u_int fibnum, struct rt_addrinfo * return (EINVAL); info->rti_flags =3D rtm->rtm_flags; - error =3D cleanup_xaddrs(info); - if (error !=3D 0) - return (error); + /* XXX HACK */ + if (! (rtm->rtm_flags & RTF_LLDATA)) { + error =3D cleanup_xaddrs(info); + if (error !=3D 0) + return (error); + } saf =3D info->rti_info[RTAX_DST]->sa_family; /* * Verify that the caller has the appropriate privilege; = RTM_GET But I=E2=80=99m not totally happy with this, obviously. Best regards, Kristof From owner-dev-commits-src-all@freebsd.org Fri Feb 19 15:42:13 2021 Return-Path: Delivered-To: dev-commits-src-all@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 70E645312F4; Fri, 19 Feb 2021 15:42: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 4Dhwn12qGRz4dgG; Fri, 19 Feb 2021 15:42: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 537976479; Fri, 19 Feb 2021 15:42: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 11JFgDnZ062367; Fri, 19 Feb 2021 15:42:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JFgDlp062366; Fri, 19 Feb 2021 15:42:13 GMT (envelope-from git) Date: Fri, 19 Feb 2021 15:42:13 GMT Message-Id: <202102191542.11JFgDlp062366@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d765b211387c - main - Remove __XSCALE__ checks from the arm code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d765b211387c4c8a463086caeea8eb8836a50e57 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 15:42:13 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d765b211387c4c8a463086caeea8eb8836a50e57 commit d765b211387c4c8a463086caeea8eb8836a50e57 Author: Andrew Turner AuthorDate: 2021-02-19 15:22:13 +0000 Commit: Andrew Turner CommitDate: 2021-02-19 15:31:26 +0000 Remove __XSCALE__ checks from the arm code XScale support was removed over 2 years ago, remove the last __XSCALE__ checks from the arm MD code. Sponsored by: Innovate UK --- sys/arm/arm/dump_machdep.c | 3 --- sys/arm/arm/exception.S | 8 -------- 2 files changed, 11 deletions(-) diff --git a/sys/arm/arm/dump_machdep.c b/sys/arm/arm/dump_machdep.c index ead54ca7b225..c89a356d6228 100644 --- a/sys/arm/arm/dump_machdep.c +++ b/sys/arm/arm/dump_machdep.c @@ -63,9 +63,6 @@ dumpsys_wbinv_all(void) * part of stopping. */ dcache_wbinv_poc_all(); -#ifdef __XSCALE__ - xscale_cache_clean_minidata(); -#endif } void diff --git a/sys/arm/arm/exception.S b/sys/arm/arm/exception.S index 92e815b068fa..0416939cb199 100644 --- a/sys/arm/arm/exception.S +++ b/sys/arm/arm/exception.S @@ -236,10 +236,6 @@ END(exception_exit) * on exit (without transitioning back through the abort mode stack). */ ASENTRY_NP(prefetch_abort_entry) -#ifdef __XSCALE__ - nop /* Make absolutely sure any pending */ - nop /* imprecise aborts have occurred. */ -#endif sub lr, lr, #4 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Return from handler via standard */ @@ -256,10 +252,6 @@ END(prefetch_abort_entry) * on exit (without transitioning back through the abort mode stack). */ ASENTRY_NP(data_abort_entry) -#ifdef __XSCALE__ - nop /* Make absolutely sure any pending */ - nop /* imprecise aborts have occurred. */ -#endif sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Exception exit routine */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 16:11:34 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6CD6C531D1D; Fri, 19 Feb 2021 16:11:34 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhxQt2jkpz4ftC; Fri, 19 Feb 2021 16:11:34 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 0633E22EBB; Fri, 19 Feb 2021 16:11:34 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 858344E611; Fri, 19 Feb 2021 17:11:32 +0100 (CET) From: "Kristof Provost" To: "Alexander V. Chernikov" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. Date: Fri, 19 Feb 2021 17:11:31 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: <471C6715-4F53-4DE7-9233-FC1EDEE49E2D@FreeBSD.org> In-Reply-To: <26E2BA35-291E-4DC5-BDCB-D98347D7E24C@FreeBSD.org> References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> <26E2BA35-291E-4DC5-BDCB-D98347D7E24C@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 16:11:34 -0000 On 19 Feb 2021, at 16:24, Kristof Provost wrote: > On 16 Feb 2021, at 21:31, Alexander V. Chernikov wrote: >> The branch main has been updated by melifaro: >> >> URL: = >> https://cgit.FreeBSD.org/src/commit/?id=3D2fe5a79425c79f7b828acd91da66= d97230925fc8 >> >> commit 2fe5a79425c79f7b828acd91da66d97230925fc8 >> Author: Alexander V. Chernikov >> AuthorDate: 2021-02-16 20:30:04 +0000 >> Commit: Alexander V. Chernikov >> CommitDate: 2021-02-16 20:30:04 +0000 >> >> Fix dst/netmask handling in routing socket code. >> >> Traditionally routing socket code did almost zero checks on >> the input message except for the most basic size checks. >> >> This resulted in the unclear KPI boundary for the routing system = >> code >> (`rtrequest*` and now `rib_action()`) w.r.t message validness. >> >> Multiple potential problems and nuances exists: >> * Host bits in RTAX_DST sockaddr. Existing applications do send = >> prefixes >> with hostbits uncleared. Even `route(8)` does this, as they hope = >> the kernel >> would do the job of fixing it. Code inside `rib_action()` needs = >> to handle >> it on its own (see `rt_maskedcopy()` ugly hack). >> * There are multiple way of adding the host route: it can be DST = >> without >> netmask or DST with /32(/128) netmask. Also, RTF_HOST has to be = >> set correspondingly. >> Currently, these 2 options create 2 DIFFERENT routes in the = >> kernel. >> * no sockaddr length/content checking for the "secondary" fields = >> exists: nothing >> stops rtsock application to send sockaddr_in with length of 25 = >> (instead of 16). >> Kernel will accept it, install to RIB as is and propagate to all = >> rtsock consumers, >> potentially triggering bugs in their code. Same goes for = >> sin_port, sin_zero, etc. >> >> The goal of this change is to make rtsock verify all sockaddr and = >> prefix consistency. >> Said differently, `rib_action()` or internals should NOT require = >> to change any of the >> sockaddrs supplied by `rt_addrinfo` structure due to = >> incorrectness. >> >> To be more specific, this change implements the following: >> * sockaddr cleanup/validation check is added immediately after = >> getting sockaddrs from rtm. >> * Per-family dst/netmask checks clears host bits in dst and zeros = >> all dst/netmask "secondary" fields. >> * The same netmask checking code converts /32(/128) netmasks to = >> "host" route case >> (NULL netmask, RTF_HOST), removing the dualism. >> * Instead of allowing ANY "known" sockaddr families = >> (0<..> supported ones (inet, inet6, link). >> * Automatically convert `sockaddr_sdl` (AF_LINK) gateways to >> `sockaddr_sdl_short`. >> >> Reported by: Guy Yur >> Reviewed By: donner >> Differential Revision: https://reviews.freebsd.org/D28668 >> MFC after: 3 days >> --- >> sys/net/rtsock.c | 201 = >> +++++++++++++++++++++++++++++++++- >> tests/sys/net/routing/rtsock_common.h | 4 - >> 2 files changed, 195 insertions(+), 10 deletions(-) >> > >> +static int >> +cleanup_xaddrs_inet(struct rt_addrinfo *info) >> +{ >> + struct sockaddr_in *dst_sa, *mask_sa; >> + >> + /* Check & fixup dst/netmask combination first */ >> + dst_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_DST]; >> + mask_sa =3D (struct sockaddr_in *)info->rti_info[RTAX_NETMASK]; >> + >> + struct in_addr mask =3D { >> + .s_addr =3D mask_sa ? mask_sa->sin_addr.s_addr : INADDR_BROADCAST, >> + }; >> + struct in_addr dst =3D { >> + .s_addr =3D htonl(ntohl(dst_sa->sin_addr.s_addr) & = >> ntohl(mask.s_addr)) >> + }; >> + > This breaks things like `arp -d 10.0.2.1`. It always masks off the = > network address, which is the right thing to do in the routing table, = > but not in the arp table. > > I=E2=80=99ve worked around it for now with this hack: > > diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c > index 3c1fea497af6..533076db99a5 100644 > --- a/sys/net/rtsock.c > +++ b/sys/net/rtsock.c > @@ -638,9 +638,12 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, = > u_int fibnum, struct rt_addrinfo * > return (EINVAL); > > info->rti_flags =3D rtm->rtm_flags; > - error =3D cleanup_xaddrs(info); > - if (error !=3D 0) > - return (error); > + /* XXX HACK */ > + if (! (rtm->rtm_flags & RTF_LLDATA)) { > + error =3D cleanup_xaddrs(info); > + if (error !=3D 0) > + return (error); > + } > saf =3D info->rti_info[RTAX_DST]->sa_family; > /* > * Verify that the caller has the appropriate privilege; = > RTM_GET > > But I=E2=80=99m not totally happy with this, obviously. This may be a bit more reasonable: diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3c1fea497af6..5147b92e95d5 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1393,6 +1393,10 @@ cleanup_xaddrs_inet(struct rt_addrinfo *info) .s_addr =3D htonl(ntohl(dst_sa->sin_addr.s_addr) & = ntohl(mask.s_addr)) }; + /* Keep the address if we're LL */ + if (info->rti_flags & RTF_LLDATA) + dst.s_addr =3D dst_sa->sin_addr.s_addr; + if (dst_sa->sin_len < sizeof(struct sockaddr_in)) { printf("dst sin_len too small\n"); return (EINVAL); @@ -1431,7 +1435,10 @@ cleanup_xaddrs_inet6(struct rt_addrinfo *info) mask_sa =3D (struct sockaddr_in6 *)info->rti_info[RTAX_NETMASK];= mask =3D mask_sa ? mask_sa->sin6_addr : in6mask128; - IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); + + /* Keep the address if we're LL */ + if (! (info->rti_flags & RTF_LLDATA)) + IN6_MASK_ADDR(&dst_sa->sin6_addr, &mask); if (dst_sa->sin6_len < sizeof(struct sockaddr_in6)) { printf("dst sin6_len too small\n"); Best regards, Kristof From owner-dev-commits-src-all@freebsd.org Fri Feb 19 16:14:18 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B9EA1531CF9 for ; Fri, 19 Feb 2021 16:14:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DhxV24dNrz4gW9 for ; Fri, 19 Feb 2021 16:14:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id z128so1466301qkc.12 for ; Fri, 19 Feb 2021 08:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QGQR11q7noqIrb7K1UZSj/pZQ32BnK6Eqtp/Z078WMU=; b=CcKZT14T3AbCJLEsvHeUJp3eD7xvJBGQKbwfpa8o1vOg4DVdG9BxykMHXHJKJIAplA avpCUIkALEKIfx1e5dYTLmdRYvOAHKiRJu7LfN0gec3v7Uv5d4HHBO1AwQeBRO65uErO mS+avUaTqSQlq5YnkoHvpzJAOA/pBtb6lHTIW/X4aTL45XeHyoXwXxYsnroF14ajMXxQ IXwUXa+2mWFIDV1TWA8Lj4ETADTV5l8SiPc7uUZtRTafjOq8xBktgUZmRywi1oHnTRL6 iXNOvurQy3H/skpVg80HrRfoZDKosxzTFummllrBLYenQNOu6l3QFDRLrwpDyDGJ2W9F Lftg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QGQR11q7noqIrb7K1UZSj/pZQ32BnK6Eqtp/Z078WMU=; b=t1Qu3NALzoB7tTHm/wH69WOZgcnLp2Dly7/M0F5EkaM+RML/ES3ZRauOOA4dQfoUWn PInj34mwSsf+TU5DS4drjqrPqTNLcuCbt5pZsIqcz7RDv/RNLUk8+BCkBCnmRFqCupXb ephuvsAujN8Z5LlRU7LZY4JQ+HWAqitHK7i+gNyXm/Ko4No7gtT+8Bh3/LLgZcQA5+hr xKhF5LjsdANZnI4diwIKy4bJ77HTJxXa7vZTGEVBgCE97RZvfpxPCEL96Lm61T3NcZ1x Io3mt8jkQJEPur3h0n9SQww+zhl5O7cKuQohVnffvrHQ6tMMux/qR0ZkumC1dDSd3nVG aMIw== X-Gm-Message-State: AOAM532UKFjtWp4mU/b0GEEBUm9bq2MdIAZ4L74apsmK2npFLu3h+uV0 ZLGBPXFx+G0JCt5YNbnXpiPUgDPHqkHt2fY2UVe4Sw== X-Google-Smtp-Source: ABdhPJyA1VzAOzFghnbK3gdXfc3AgpRhvAdQuXrpfLJzAj0acidm3YprJxlMElLZV+OlBbEzIRMiuFZ+DxqFKxEP3oM= X-Received: by 2002:a05:620a:1d:: with SMTP id j29mr9838219qki.44.1613751257769; Fri, 19 Feb 2021 08:14:17 -0800 (PST) MIME-Version: 1.0 References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 19 Feb 2021 09:14:07 -0700 Message-ID: Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. To: Konstantin Belousov Cc: Brandon Bergren , Jessica Clarke , John Baldwin , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4DhxV24dNrz4gW9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 16:14:18 -0000 On Fri, Feb 19, 2021 at 2:43 AM Konstantin Belousov wrote: > On Thu, Feb 18, 2021 at 07:54:22PM -0600, Brandon Bergren wrote: > > > > > > On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > > > On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > > > > > > Ok, so the mistake was not deleting it 8 years ago and instead leaving > > > it around to become part of the ABI. The issue you're referring to > > > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > > > latter doesn't exist for __NO_TLS, and the former changes between > > > static inline and extern)? __NO_TLS should have blocked powerpc64 (and > > > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's > > > a major ABI break (frustratingly tiny but breaks the core system > > > libraries) and thus can't be MFC'ed. > > > > > > Jess > > > > Right. > > > > And I fixed it for powerpc64 for 13 finally becuase I had the excuse of > "Well, we're switching to an entirely incompatible ABI due to lld not > supporting ELFv1, so I might as well fix this one at the same time since > we're forcing people to reinstall from scratch anyway." > > > > So yeah, in HEAD, all references to __NO_TLS can go away fully, in > stable/13 the mips part probably has to stay (riscv can play the tier 3 > card though), and in 12 it's baked in for life. > > > > The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == > 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transition > is over and done with as of the end of 2019. I probably should have taken > that part out last year, since it was meant to just be a temporary > compatibility shim so that people could compile both the gcc4.2 ELFv1 and > llvm ELFv2 versions of 13-CURRENT out of the same tree back when we were in > the middle of switching over. > > So why didn't you go ahead and removed at least the remaining block that > defines __NO_TLS for PowerPC? I promise to clean the tree out of its > uses after that. > FWIW: Mips likely can play the 'not very popular tier 2 card trending towards tier 3' card, at least for 13 since (a) 13.0 isn't out yet and (b) the project doesn't produce mips binaries. It could likely even play it for 12, but that might be a wee bit disruptive to the few users of it we have. Warner From owner-dev-commits-src-all@freebsd.org Fri Feb 19 16:40:10 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E3B93532D99; Fri, 19 Feb 2021 16:40:10 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dhy3t5s0Hz4hnG; Fri, 19 Feb 2021 16:40:10 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id E5C6F3C0199; Fri, 19 Feb 2021 16:40:03 +0000 (UTC) Date: Fri, 19 Feb 2021 16:40:03 +0000 From: Brooks Davis To: Warner Losh Cc: Konstantin Belousov , Brandon Bergren , Jessica Clarke , John Baldwin , src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. Message-ID: <20210219164003.GB50170@spindle.one-eyed-alien.net> References: <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EuxKj2iCbKjpUGkD" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-Rspamd-Queue-Id: 4Dhy3t5s0Hz4hnG X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 16:40:10 -0000 --EuxKj2iCbKjpUGkD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 19, 2021 at 09:14:07AM -0700, Warner Losh wrote: > On Fri, Feb 19, 2021 at 2:43 AM Konstantin Belousov > wrote: >=20 > > On Thu, Feb 18, 2021 at 07:54:22PM -0600, Brandon Bergren wrote: > > > > > > > > > On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > > > > On 19 Feb 2021, at 00:03, Brandon Bergren wro= te: > > > > > > > > Ok, so the mistake was not deleting it 8 years ago and instead leav= ing > > > > it around to become part of the ABI. The issue you're referring to > > > > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > > > > latter doesn't exist for __NO_TLS, and the former changes between > > > > static inline and extern)? __NO_TLS should have blocked powerpc64 (= and > > > > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, i= t's > > > > a major ABI break (frustratingly tiny but breaks the core system > > > > libraries) and thus can't be MFC'ed. > > > > > > > > Jess > > > > > > Right. > > > > > > And I fixed it for powerpc64 for 13 finally becuase I had the excuse = of > > "Well, we're switching to an entirely incompatible ABI due to lld not > > supporting ELFv1, so I might as well fix this one at the same time since > > we're forcing people to reinstall from scratch anyway." > > > > > > So yeah, in HEAD, all references to __NO_TLS can go away fully, in > > stable/13 the mips part probably has to stay (riscv can play the tier 3 > > card though), and in 12 it's baked in for life. > > > > > > The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF =3D= =3D > > 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transit= ion > > is over and done with as of the end of 2019. I probably should have tak= en > > that part out last year, since it was meant to just be a temporary > > compatibility shim so that people could compile both the gcc4.2 ELFv1 a= nd > > llvm ELFv2 versions of 13-CURRENT out of the same tree back when we wer= e in > > the middle of switching over. > > > > So why didn't you go ahead and removed at least the remaining block that > > defines __NO_TLS for PowerPC? I promise to clean the tree out of its > > uses after that. >=20 > FWIW: Mips likely can play the 'not very popular tier 2 card trending > towards tier 3' card, at least for 13 since (a) 13.0 isn't out yet and (b) > the project doesn't produce mips binaries. It could likely even play it f= or > 12, but that might be a wee bit disruptive to the few users of it we have. IMO it's worth MFCing for 13. My inclination would be to leave 12 alone. Very few people will be using in an environment where they do installworld-based updates, but given what a pain it is we might as well not make their life more difficult. -- Brooks --EuxKj2iCbKjpUGkD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJgL+njAAoJEKzQXbSebgfAN1wH/07ion0hWvDctozRjwM4FB0r Nd3YD5V0kzrlIodX61fVbrj/KkgUgitDJcfIjnAUYboAoUXuvmApXpSnaL6GUh5v s0NP12QVeCAW5p2CvC/XgY9/kjctkhjgjIPrL0nDI0Bd119Zsw5MgcYqwuuHWcAa FGCE2GWsP3l5csUaJdKV3G4JC/7HKr55Wjn/oWCJfYwJ7WDPtEZU+pS64b89T/4G koL+hvqRA0twFYA8vMsS7JADMvbDlWN/jQHvmg/F8FOahLjIt+dgA6RLfMgkAEc1 6/rwR/ioEfoncxjH4aaQq2BWoWveGNGP/EaziJSj1fe8T/AoOhV4/9lwRIlNnZk= =xwF/ -----END PGP SIGNATURE----- --EuxKj2iCbKjpUGkD-- From owner-dev-commits-src-all@freebsd.org Fri Feb 19 16:58:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A78945332D0; Fri, 19 Feb 2021 16:58:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DhySg2fQYz4jPb; Fri, 19 Feb 2021 16:58:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 11JGw1M0095666 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 19 Feb 2021 18:58:04 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 11JGw1M0095666 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 11JGw1MF095665; Fri, 19 Feb 2021 18:58:01 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Feb 2021 18:58:01 +0200 From: Konstantin Belousov To: Brooks Davis Cc: Warner Losh , Brandon Bergren , Jessica Clarke , John Baldwin , src-committers , "" , dev-commits-src-main@freebsd.org Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. Message-ID: References: <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> <20210219164003.GB50170@spindle.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219164003.GB50170@spindle.one-eyed-alien.net> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4DhySg2fQYz4jPb X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 16:58:11 -0000 On Fri, Feb 19, 2021 at 04:40:03PM +0000, Brooks Davis wrote: > On Fri, Feb 19, 2021 at 09:14:07AM -0700, Warner Losh wrote: > > On Fri, Feb 19, 2021 at 2:43 AM Konstantin Belousov > > wrote: > > > > > On Thu, Feb 18, 2021 at 07:54:22PM -0600, Brandon Bergren wrote: > > > > > > > > > > > > On Thu, Feb 18, 2021, at 7:07 PM, Jessica Clarke wrote: > > > > > On 19 Feb 2021, at 00:03, Brandon Bergren wrote: > > > > > > > > > > Ok, so the mistake was not deleting it 8 years ago and instead leaving > > > > > it around to become part of the ABI. The issue you're referring to > > > > > specifically is __getCurrentRuneLocale and _ThreadRuneLocale (the > > > > > latter doesn't exist for __NO_TLS, and the former changes between > > > > > static inline and extern)? __NO_TLS should have blocked powerpc64 (and > > > > > mips) from becoming tier 2 IMO, but we're stuck with it, so yeah, it's > > > > > a major ABI break (frustratingly tiny but breaks the core system > > > > > libraries) and thus can't be MFC'ed. > > > > > > > > > > Jess > > > > > > > > Right. > > > > > > > > And I fixed it for powerpc64 for 13 finally becuase I had the excuse of > > > "Well, we're switching to an entirely incompatible ABI due to lld not > > > supporting ELFv1, so I might as well fix this one at the same time since > > > we're forcing people to reinstall from scratch anyway." > > > > > > > > So yeah, in HEAD, all references to __NO_TLS can go away fully, in > > > stable/13 the mips part probably has to stay (riscv can play the tier 3 > > > card though), and in 12 it's baked in for life. > > > > > > > > The "(defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == > > > 1))" part is no longer relevant for 13 or HEAD, since the ELFv2 transition > > > is over and done with as of the end of 2019. I probably should have taken > > > that part out last year, since it was meant to just be a temporary > > > compatibility shim so that people could compile both the gcc4.2 ELFv1 and > > > llvm ELFv2 versions of 13-CURRENT out of the same tree back when we were in > > > the middle of switching over. > > > > > > So why didn't you go ahead and removed at least the remaining block that > > > defines __NO_TLS for PowerPC? I promise to clean the tree out of its > > > uses after that. > > > > FWIW: Mips likely can play the 'not very popular tier 2 card trending > > towards tier 3' card, at least for 13 since (a) 13.0 isn't out yet and (b) > > the project doesn't produce mips binaries. It could likely even play it for > > 12, but that might be a wee bit disruptive to the few users of it we have. > > IMO it's worth MFCing for 13. My inclination would be to leave 12 > alone. Very few people will be using in an environment where they do > installworld-based updates, but given what a pain it is we might as well > not make their life more difficult. Ok, answering the latest mail in the thread. I put the review to remove __NO_TLS at https://reviews.freebsd.org/D28796 Feel free to comment and accept. From owner-dev-commits-src-all@freebsd.org Fri Feb 19 17:14:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 02FA5533C19; Fri, 19 Feb 2021 17:14:00 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dhypv6nZfz4kZp; Fri, 19 Feb 2021 17:13:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id C1DF623469; Fri, 19 Feb 2021 17:13:59 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id E78D14E6AB; Fri, 19 Feb 2021 18:13:57 +0100 (CET) From: "Kristof Provost" To: "Dimitry Andric" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0ee0dbfb0d26 - main - Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Date: Fri, 19 Feb 2021 18:13:56 +0100 X-Mailer: MailMate (1.13.2r5673) Message-ID: <8D9C1169-24C3-4CF8-A074-59F3B7F5EF74@FreeBSD.org> In-Reply-To: <202102182130.11ILUpXB020063@gitrepo.freebsd.org> References: <202102182130.11ILUpXB020063@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 17:14:00 -0000 On 18 Feb 2021, at 22:30, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D0ee0dbfb0d26cf4bc37f24f12e76c= 7f532b0f368 > > commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 > Merge: 04d2d2d7fd22 3f8a54b20893 > Author: Dimitry Andric > AuthorDate: 2021-02-18 21:30:27 +0000 > Commit: Dimitry Andric > CommitDate: 2021-02-18 21:30:27 +0000 > > Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 > > Interesting fixes: > b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 > 7b2335c Mostly fix __cxa_demangle after #3 > > Reported by: arichardson > PR: 253226 > MFC after: 3 days > With this commit I see kyua crashing with a bus error on amd64. Best regards, Kristof From owner-dev-commits-src-all@freebsd.org Fri Feb 19 18:14:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A4877535916; Fri, 19 Feb 2021 18:14: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 4Dj08T4DJMz4pF4; Fri, 19 Feb 2021 18:14: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 8432D10A96; Fri, 19 Feb 2021 18:14: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 11JIEHJo061162; Fri, 19 Feb 2021 18:14:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JIEHIc061161; Fri, 19 Feb 2021 18:14:17 GMT (envelope-from git) Date: Fri, 19 Feb 2021 18:14:17 GMT Message-Id: <202102191814.11JIEHIc061161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 2142926f63d8 - stable/13 - lastcomm(1): Only install if MK_ACCT is on MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2142926f63d8d64924b6e7f7ed886de276fa9337 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 18:14:17 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2142926f63d8d64924b6e7f7ed886de276fa9337 commit 2142926f63d8d64924b6e7f7ed886de276fa9337 Author: Emmanuel Vadot AuthorDate: 2021-02-06 19:41:39 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-19 18:01:48 +0000 lastcomm(1): Only install if MK_ACCT is on MFC after: 3 days (cherry picked from commit 8af54bdfcaecf922f936a14d1d9efcf84076029f) --- usr.bin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index c557d85b535c..fcc406d2efc5 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -67,7 +67,6 @@ SUBDIR= alias \ ktrace \ ktrdump \ lam \ - lastcomm \ ldd \ leave \ less \ @@ -192,6 +191,7 @@ SUBDIR= alias \ # NB: keep these sorted by MK_* knobs +SUBDIR.${MK_ACCT}+= lastcomm SUBDIR.${MK_AT}+= at SUBDIR.${MK_ATM}+= atm SUBDIR.${MK_BLUETOOTH}+= bluetooth From owner-dev-commits-src-all@freebsd.org Fri Feb 19 18:14:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 30CAD535640; Fri, 19 Feb 2021 18:14: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 4Dj08V6LG3z4nwH; Fri, 19 Feb 2021 18:14: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 B76C510730; Fri, 19 Feb 2021 18:14: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 11JIEIQD061180; Fri, 19 Feb 2021 18:14:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JIEIYB061179; Fri, 19 Feb 2021 18:14:18 GMT (envelope-from git) Date: Fri, 19 Feb 2021 18:14:18 GMT Message-Id: <202102191814.11JIEIYB061179@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 8963d65853af - stable/13 - arm64: Order sys/conf/files.arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8963d65853af43a762b84d3b563e6f1d675a3df4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 18:14:19 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8963d65853af43a762b84d3b563e6f1d675a3df4 commit 8963d65853af43a762b84d3b563e6f1d675a3df4 Author: Emmanuel Vadot AuthorDate: 2021-02-04 13:54:22 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-19 18:03:39 +0000 arm64: Order sys/conf/files.arm64 This is now easier to read and see what's compiled-in No functional changes intended. MFC after: 3 days (cherry picked from commit ea3b6abf3f2fd7db11a95ea10cc4b6d136958f8d) --- sys/conf/files.arm64 | 893 +++++++++++++++++++++++++++------------------------ 1 file changed, 474 insertions(+), 419 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index f7003b1048c8..8abe5d194d90 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -1,212 +1,84 @@ # $FreeBSD$ -cloudabi32_vdso.o optional compat_cloudabi32 \ - dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6_on_64bit.S" \ - compile-with "${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6_on_64bit.S -o ${.TARGET}" \ - no-obj no-implicit-rule \ - clean "cloudabi32_vdso.o" -# -cloudabi32_vdso_blob.o optional compat_cloudabi32 \ - dependency "cloudabi32_vdso.o" \ - compile-with "${OBJCOPY} --input-target binary --output-target elf64-littleaarch64 --binary-architecture aarch64 cloudabi32_vdso.o ${.TARGET}" \ - no-implicit-rule \ - clean "cloudabi32_vdso_blob.o" -# -cloudabi64_vdso.o optional compat_cloudabi64 \ - dependency "$S/contrib/cloudabi/cloudabi_vdso_aarch64.S" \ - compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_aarch64.S -o ${.TARGET}" \ - no-obj no-implicit-rule \ - clean "cloudabi64_vdso.o" -# -cloudabi64_vdso_blob.o optional compat_cloudabi64 \ - dependency "cloudabi64_vdso.o" \ - compile-with "${OBJCOPY} --input-target binary --output-target elf64-littleaarch64 --binary-architecture aarch64 cloudabi64_vdso.o ${.TARGET}" \ - no-implicit-rule \ - clean "cloudabi64_vdso_blob.o" -# -# Allwinner common files -arm/allwinner/a10_timer.c optional a10_timer fdt -arm/allwinner/a10_codec.c optional sound a10_codec -arm/allwinner/a31_dmac.c optional a31_dmac -arm/allwinner/sunxi_dma_if.m optional a31_dmac -arm/allwinner/aw_cir.c optional evdev aw_cir fdt -arm/allwinner/aw_dwc3.c optional aw_dwc3 fdt -arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt -arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt -arm/allwinner/aw_nmi.c optional aw_nmi fdt \ - compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" -arm/allwinner/aw_pwm.c optional aw_pwm fdt -arm/allwinner/aw_rsb.c optional aw_rsb fdt -arm/allwinner/aw_rtc.c optional aw_rtc fdt -arm/allwinner/aw_sid.c optional aw_sid nvmem fdt -arm/allwinner/aw_spi.c optional aw_spi fdt -arm/allwinner/aw_syscon.c optional aw_syscon ext_resources syscon fdt -arm/allwinner/aw_thermal.c optional aw_thermal nvmem fdt -arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt -arm/allwinner/aw_usb3phy.c optional xhci aw_usbphy fdt -arm/allwinner/aw_wdog.c optional aw_wdog fdt -arm/allwinner/axp81x.c optional axp81x fdt -arm/allwinner/if_awg.c optional awg ext_resources syscon aw_sid nvmem fdt +## +## Kernel +## -# Allwinner clock driver -arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_frac.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_m.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_mipi.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_nmm.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_np.c optional aw_ccu fdt -arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt -arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt -arm/allwinner/clkng/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt -arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt -arm/allwinner/clkng/ccu_de2.c optional aw_ccu fdt +kern/msi_if.m optional intrng +kern/pic_if.m optional intrng +kern/subr_devmap.c standard +kern/subr_intr.c optional intrng +kern/subr_physmem.c standard +libkern/bcmp.c standard +libkern/memcmp.c standard \ + compile-with "${NORMAL_C:N-fsanitize*}" +libkern/memset.c standard \ + compile-with "${NORMAL_C:N-fsanitize*}" +libkern/strlen.c standard +libkern/arm64/crc32c_armv8.S standard + +arm/arm/generic_timer.c standard +arm/arm/gic.c standard +arm/arm/gic_acpi.c optional acpi +arm/arm/gic_fdt.c optional fdt +arm/arm/pmu.c standard +arm/arm/pmu_fdt.c optional fdt +arm64/acpica/acpi_iort.c optional acpi +arm64/acpica/acpi_machdep.c optional acpi +arm64/acpica/OsdEnvironment.c optional acpi +arm64/acpica/acpi_wakeup.c optional acpi +arm64/acpica/pci_cfgreg.c optional acpi pci +arm64/arm64/autoconf.c standard +arm64/arm64/bus_machdep.c standard +arm64/arm64/bus_space_asm.S standard +arm64/arm64/busdma_bounce.c standard +arm64/arm64/busdma_machdep.c standard +arm64/arm64/bzero.S standard +arm64/arm64/clock.c standard +arm64/arm64/copyinout.S standard +arm64/arm64/cpu_errata.c standard +arm64/arm64/cpufunc_asm.S standard +arm64/arm64/db_disasm.c optional ddb +arm64/arm64/db_interface.c optional ddb +arm64/arm64/db_trace.c optional ddb +arm64/arm64/debug_monitor.c standard +arm64/arm64/disassem.c optional ddb +arm64/arm64/dump_machdep.c standard +arm64/arm64/efirt_machdep.c optional efirt +arm64/arm64/elf32_machdep.c optional compat_freebsd32 +arm64/arm64/elf_machdep.c standard +arm64/arm64/exception.S standard +arm64/arm64/freebsd32_machdep.c optional compat_freebsd32 +arm64/arm64/gdb_machdep.c optional gdb +arm64/arm64/gicv3_its.c optional intrng fdt +arm64/arm64/gic_v3.c standard +arm64/arm64/gic_v3_acpi.c optional acpi +arm64/arm64/gic_v3_fdt.c optional fdt +arm64/arm64/identcpu.c standard +arm64/arm64/in_cksum.c optional inet | inet6 +arm64/arm64/locore.S standard no-obj +arm64/arm64/machdep.c standard +arm64/arm64/machdep_boot.c standard +arm64/arm64/mem.c standard +arm64/arm64/memcpy.S standard +arm64/arm64/memmove.S standard +arm64/arm64/minidump_machdep.c standard +arm64/arm64/mp_machdep.c optional smp +arm64/arm64/nexus.c standard +arm64/arm64/ofw_machdep.c optional fdt +arm64/arm64/pmap.c standard +arm64/arm64/stack_machdep.c optional ddb | stack +arm64/arm64/support.S standard +arm64/arm64/swtch.S standard +arm64/arm64/sys_machdep.c standard +arm64/arm64/trap.c standard +arm64/arm64/uio_machdep.c standard +arm64/arm64/uma_machdep.c standard +arm64/arm64/undefined.c standard +arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack +arm64/arm64/vfp.c standard +arm64/arm64/vm_machdep.c standard -# Allwinner padconf files -arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt -arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt -arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt -arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt -arm/allwinner/h6/h6_padconf.c optional soc_allwinner_h6 fdt -arm/allwinner/h6/h6_r_padconf.c optional soc_allwinner_h6 fdt - -arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt -arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt -arm/annapurna/alpine/alpine_pci.c optional al_pci fdt -arm/annapurna/alpine/alpine_pci_msix.c optional al_pci fdt -arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \ - no-depend \ - compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" -arm/arm/generic_timer.c standard -arm/arm/gic.c standard -arm/arm/gic_acpi.c optional acpi -arm/arm/gic_fdt.c optional fdt -arm/arm/pmu.c standard -arm/arm/pmu_fdt.c optional fdt -arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc fdt -arm/broadcom/bcm2835/bcm2835_clkman.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_cpufreq.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_dma.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_fbd.c optional vt soc_brcm_bcm2837 fdt | vt soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_firmware.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 fdt -arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio soc_brcm_bcm2837 fdt | gpio soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_intr.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_mbox.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_rng.c optional !random_loadable soc_brcm_bcm2837 fdt | !random_loadable soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci soc_brcm_bcm2837 fdt | sdhci soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_sdhost.c optional sdhci soc_brcm_bcm2837 fdt | sdhci soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi fdt -arm/broadcom/bcm2835/bcm2835_vcbus.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt -arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | dwcotg fdt soc_brcm_bcm2838 -arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci -arm/broadcom/bcm2835/bcm2838_xhci.c optional soc_brcm_bcm2838 fdt pci xhci -arm/broadcom/bcm2835/raspberrypi_gpio.c optional soc_brcm_bcm2837 gpio | soc_brcm_bcm2838 gpio -arm/freescale/vybrid/vf_i2c.c optional vf_i2c iicbus SOC_NXP_LS -arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt -arm/mv/a37x0_iic.c optional a37x0_iic iicbus fdt -arm/mv/a37x0_spi.c optional a37x0_spi spibus fdt -arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt -arm/mv/gpio.c optional mv_gpio fdt -arm/mv/mvebu_gpio.c optional mv_gpio fdt -arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt -arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt -arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp fdt -arm/mv/mv_ap806_sei.c optional mv_ap806_sei fdt -arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt -arm/mv/mv_cp110_icu.c optional mv_cp110_icu fdt -arm/mv/mv_cp110_icu_bus.c optional mv_cp110_icu fdt -arm/mv/mv_thermal.c optional SOC_MARVELL_8K mv_thermal fdt -arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt -arm/nvidia/tegra_abpmisc.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_ahci.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_efuse.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_ehci.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_gpio.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_i2c.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_lic.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_mc.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_pcie.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_sdhci.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_soctherm_if.m optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_soctherm.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_uart.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_usbphy.c optional fdt soc_nvidia_tegra210 -arm/nvidia/tegra_xhci.c optional fdt soc_nvidia_tegra210 -arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq -arm64/acpica/acpi_iort.c optional acpi -arm64/acpica/acpi_machdep.c optional acpi -arm64/acpica/OsdEnvironment.c optional acpi -arm64/acpica/acpi_wakeup.c optional acpi -arm64/acpica/pci_cfgreg.c optional acpi pci -arm64/arm64/autoconf.c standard -arm64/arm64/bus_machdep.c standard -arm64/arm64/bus_space_asm.S standard -arm64/arm64/busdma_bounce.c standard -arm64/arm64/busdma_machdep.c standard -arm64/arm64/bzero.S standard -arm64/arm64/clock.c standard -arm64/arm64/copyinout.S standard -arm64/arm64/cpu_errata.c standard -arm64/arm64/cpufunc_asm.S standard -arm64/arm64/db_disasm.c optional ddb -arm64/arm64/db_interface.c optional ddb -arm64/arm64/db_trace.c optional ddb -arm64/arm64/debug_monitor.c standard -arm64/arm64/disassem.c optional ddb -arm64/arm64/dump_machdep.c standard -arm64/arm64/efirt_machdep.c optional efirt -arm64/arm64/elf32_machdep.c optional compat_freebsd32 -arm64/arm64/elf_machdep.c standard -arm64/arm64/exception.S standard -arm64/arm64/freebsd32_machdep.c optional compat_freebsd32 -arm64/arm64/gdb_machdep.c optional gdb -arm64/arm64/gicv3_its.c optional intrng fdt -arm64/arm64/gic_v3.c standard -arm64/arm64/gic_v3_acpi.c optional acpi -arm64/arm64/gic_v3_fdt.c optional fdt -arm64/arm64/identcpu.c standard -arm64/arm64/in_cksum.c optional inet | inet6 -arm64/arm64/locore.S standard no-obj -arm64/arm64/machdep.c standard -arm64/arm64/machdep_boot.c standard -arm64/arm64/mem.c standard -arm64/arm64/memcpy.S standard -arm64/arm64/memmove.S standard -arm64/arm64/minidump_machdep.c standard -arm64/arm64/mp_machdep.c optional smp -arm64/arm64/nexus.c standard -arm64/arm64/ofw_machdep.c optional fdt -arm64/arm64/pmap.c standard -arm64/arm64/stack_machdep.c optional ddb | stack -arm64/arm64/support.S standard -arm64/arm64/swtch.S standard -arm64/arm64/sys_machdep.c standard -arm64/arm64/trap.c standard -arm64/arm64/uio_machdep.c standard -arm64/arm64/uma_machdep.c standard -arm64/arm64/undefined.c standard -arm64/arm64/unwind.c optional ddb | kdtrace_hooks | stack -arm64/arm64/vfp.c standard -arm64/arm64/vm_machdep.c standard -arm64/broadcom/brcmmdio/mdio_mux_iproc.c optional fdt -arm64/broadcom/brcmmdio/mdio_nexus_iproc.c optional fdt -arm64/broadcom/brcmmdio/mdio_ns2_pcie_phy.c optional fdt pci -arm64/broadcom/genet/if_genet.c optional SOC_BRCM_BCM2838 fdt genet -arm64/cavium/thunder_pcie_fdt.c optional soc_cavm_thunderx pci fdt -arm64/cavium/thunder_pcie_pem.c optional soc_cavm_thunderx pci -arm64/cavium/thunder_pcie_pem_fdt.c optional soc_cavm_thunderx pci fdt -arm64/cavium/thunder_pcie_common.c optional soc_cavm_thunderx pci -arm64/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32 -arm64/cloudabi64/cloudabi64_sysvec.c optional compat_cloudabi64 arm64/coresight/coresight.c standard arm64/coresight/coresight_acpi.c optional acpi arm64/coresight/coresight_fdt.c optional fdt @@ -225,285 +97,468 @@ arm64/coresight/coresight_replicator_fdt.c optional fdt arm64/coresight/coresight_tmc.c standard arm64/coresight/coresight_tmc_acpi.c optional acpi arm64/coresight/coresight_tmc_fdt.c optional fdt -arm64/intel/firmware.c optional soc_intel_stratix10 -arm64/intel/stratix10-soc-fpga-mgr.c optional soc_intel_stratix10 -arm64/intel/stratix10-svc.c optional soc_intel_stratix10 + arm64/iommu/iommu.c optional iommu arm64/iommu/iommu_if.m optional iommu arm64/iommu/smmu.c optional iommu arm64/iommu/smmu_acpi.c optional acpi iommu arm64/iommu/smmu_quirks.c optional iommu -arm64/nvidia/tegra210/max77620.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/max77620_gpio.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/max77620_regulators.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/max77620_rtc.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_car.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_clk_per.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_clk_pll.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_clk_super.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_coretemp.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_cpufreq.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_pinmux.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_pmc.c optional fdt soc_nvidia_tegra210 -arm64/nvidia/tegra210/tegra210_xusbpadctl.c optional fdt soc_nvidia_tegra210 -arm64/qoriq/ls1046_gpio.c optional ls1046_gpio gpio fdt SOC_NXP_LS -arm64/qoriq/qoriq_dw_pci.c optional pci fdt SOC_NXP_LS -arm64/qoriq/qoriq_therm.c optional pci fdt SOC_NXP_LS -arm64/qoriq/qoriq_therm_if.m optional pci fdt SOC_NXP_LS -arm64/qoriq/clk/ls1046a_clkgen.c optional clk SOC_NXP_LS -arm64/qoriq/clk/lx2160a_clkgen.c optional clk SOC_NXP_LS -arm64/qoriq/clk/qoriq_clk_pll.c optional clk SOC_NXP_LS -arm64/qoriq/clk/qoriq_clkgen.c optional clk SOC_NXP_LS -arm64/qualcomm/qcom_gcc.c optional qcom_gcc fdt -contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_arm.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_connected.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_core.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_shim.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -contrib/vchiq/interface/vchiq_arm/vchiq_util.c optional vchiq soc_brcm_bcm2837 \ - compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" -crypto/armv8/armv8_crypto.c optional armv8crypto -armv8_crypto_wrap.o optional armv8crypto \ +dev/iommu/busdma_iommu.c optional iommu +dev/iommu/iommu_gas.c optional iommu + +crypto/armv8/armv8_crypto.c optional armv8crypto +armv8_crypto_wrap.o optional armv8crypto \ dependency "$S/crypto/armv8/armv8_crypto_wrap.c" \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "armv8_crypto_wrap.o" -aesv8-armx.o optional armv8crypto \ +aesv8-armx.o optional armv8crypto \ dependency "$S/crypto/openssl/aarch64/aesv8-armx.S" \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ -I$S/crypto/openssl/crypto ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "aesv8-armx.o" -ghashv8-armx.o optional armv8crypto \ +ghashv8-armx.o optional armv8crypto \ dependency "$S/crypto/openssl/aarch64/ghashv8-armx.S" \ compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} -I$S/crypto/armv8/ -I$S/crypto/openssl/crypto ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8-a+crypto ${.IMPSRC}" \ no-implicit-rule \ clean "ghashv8-armx.o" -crypto/des/des_enc.c optional netsmb -crypto/openssl/ossl_aarch64.c optional ossl -crypto/openssl/aarch64/sha1-armv8.S optional ossl \ + +crypto/des/des_enc.c optional netsmb +crypto/openssl/ossl_aarch64.c optional ossl +crypto/openssl/aarch64/sha1-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" -crypto/openssl/aarch64/sha256-armv8.S optional ossl \ +crypto/openssl/aarch64/sha256-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" -crypto/openssl/aarch64/sha512-armv8.S optional ossl \ +crypto/openssl/aarch64/sha512-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} ${WERROR} ${PROF} ${.IMPSRC}" -dev/acpica/acpi_bus_if.m optional acpi -dev/acpica/acpi_if.m optional acpi -dev/acpica/acpi_pci_link.c optional acpi pci -dev/acpica/acpi_pcib.c optional acpi pci -dev/acpica/acpi_pxm.c optional acpi -dev/ahci/ahci_fsl_fdt.c optional SOC_NXP_LS ahci fdt -dev/ahci/ahci_generic.c optional ahci -dev/altera/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga -dev/axgbe/if_axgbe.c optional axa -dev/axgbe/xgbe-desc.c optional axa -dev/axgbe/xgbe-dev.c optional axa -dev/axgbe/xgbe-drv.c optional axa -dev/axgbe/xgbe-mdio.c optional axa -dev/axgbe/xgbe-sysctl.c optional axa -dev/axgbe/xgbe-txrx.c optional axa -dev/axgbe/xgbe_osdep.c optional axa -dev/axgbe/xgbe-phy-v1.c optional axa -dev/cpufreq/cpufreq_dt.c optional cpufreq fdt -dev/gpio/pl061.c optional pl061 gpio -dev/gpio/pl061_acpi.c optional pl061 gpio acpi -dev/gpio/pl061_fdt.c optional pl061 gpio fdt -dev/hwpmc/hwpmc_arm64.c optional hwpmc -dev/hwpmc/hwpmc_arm64_md.c optional hwpmc -dev/ice/if_ice_iflib.c optional ice pci \ + +dev/acpica/acpi_bus_if.m optional acpi +dev/acpica/acpi_if.m optional acpi +dev/acpica/acpi_pci_link.c optional acpi pci +dev/acpica/acpi_pcib.c optional acpi pci +dev/acpica/acpi_pxm.c optional acpi +dev/ahci/ahci_generic.c optional ahci + +cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" + +## +## Device drivers +## + +dev/axgbe/if_axgbe.c optional axa +dev/axgbe/xgbe-desc.c optional axa +dev/axgbe/xgbe-dev.c optional axa +dev/axgbe/xgbe-drv.c optional axa +dev/axgbe/xgbe-mdio.c optional axa +dev/axgbe/xgbe-sysctl.c optional axa +dev/axgbe/xgbe-txrx.c optional axa +dev/axgbe/xgbe_osdep.c optional axa +dev/axgbe/xgbe-phy-v1.c optional axa + +dev/cpufreq/cpufreq_dt.c optional cpufreq fdt + +dev/gpio/pl061.c optional pl061 gpio +dev/gpio/pl061_acpi.c optional pl061 gpio acpi +dev/gpio/pl061_fdt.c optional pl061 gpio fdt + +dev/hwpmc/hwpmc_arm64.c optional hwpmc +dev/hwpmc/hwpmc_arm64_md.c optional hwpmc + +dev/ice/if_ice_iflib.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_lib.c optional ice pci \ +dev/ice/ice_lib.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_osdep.c optional ice pci \ +dev/ice/ice_osdep.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_resmgr.c optional ice pci \ +dev/ice/ice_resmgr.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_strings.c optional ice pci \ +dev/ice/ice_strings.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_iflib_recovery_txrx.c optional ice pci \ +dev/ice/ice_iflib_recovery_txrx.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_iflib_txrx.c optional ice pci \ +dev/ice/ice_iflib_txrx.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_common.c optional ice pci \ +dev/ice/ice_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_controlq.c optional ice pci \ +dev/ice/ice_controlq.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_dcb.c optional ice pci \ +dev/ice/ice_dcb.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_flex_pipe.c optional ice pci \ +dev/ice/ice_flex_pipe.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_flow.c optional ice pci \ +dev/ice/ice_flow.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_nvm.c optional ice pci \ +dev/ice/ice_nvm.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_sched.c optional ice pci \ +dev/ice/ice_sched.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_sriov.c optional ice pci \ +dev/ice/ice_sriov.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -dev/ice/ice_switch.c optional ice pci \ +dev/ice/ice_switch.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" -ice_ddp.c optional ice_ddp \ +ice_ddp.c optional ice_ddp \ compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01031000 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" -ice_ddp.fwo optional ice_ddp \ +ice_ddp.fwo optional ice_ddp \ dependency "ice_ddp.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ice_ddp.fwo" -ice_ddp.fw optional ice_ddp \ +ice_ddp.fw optional ice_ddp \ dependency "$S/contrib/dev/ice/ice-1.3.16.0.pkg" \ compile-with "${CP} $S/contrib/dev/ice/ice-1.3.16.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" -dev/iicbus/sy8106a.c optional sy8106a fdt -dev/iicbus/twsi/mv_twsi.c optional twsi fdt -dev/iicbus/twsi/a10_twsi.c optional twsi fdt -dev/iicbus/twsi/twsi.c optional twsi fdt -dev/iommu/busdma_iommu.c optional iommu -dev/iommu/iommu_gas.c optional iommu -dev/ipmi/ipmi.c optional ipmi -dev/ipmi/ipmi_acpi.c optional ipmi acpi -dev/ipmi/ipmi_kcs.c optional ipmi -dev/ipmi/ipmi_smic.c optional ipmi -dev/mbox/mbox_if.m optional soc_brcm_bcm2837 -dev/mmc/host/dwmmc.c optional dwmmc fdt -dev/mmc/host/dwmmc_altera.c optional dwmmc dwmmc_altera fdt -dev/mmc/host/dwmmc_hisi.c optional dwmmc dwmmc_hisi fdt -dev/mmc/host/dwmmc_rockchip.c optional dwmmc rk_dwmmc fdt -dev/neta/if_mvneta_fdt.c optional neta fdt -dev/neta/if_mvneta.c optional neta mdio mii -dev/ofw/ofw_cpu.c optional fdt -dev/ofw/ofwpci.c optional fdt pci -dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi -dev/pci/pci_host_generic.c optional pci -dev/pci/pci_host_generic_acpi.c optional pci acpi -dev/pci/pci_host_generic_fdt.c optional pci fdt -dev/pci/pci_dw_mv.c optional pci fdt -dev/pci/pci_dw.c optional pci fdt -dev/pci/pci_dw_if.m optional pci fdt -dev/psci/psci.c standard -dev/psci/smccc_arm64.S standard -dev/psci/smccc.c standard -dev/safexcel/safexcel.c optional safexcel fdt -dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci fdt -dev/uart/uart_cpu_arm64.c optional uart -dev/uart/uart_dev_mu.c optional uart uart_mu -dev/uart/uart_dev_pl011.c optional uart pl011 -dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 -dev/usb/controller/dwc3.c optional fdt dwc3 -dev/usb/controller/ehci_mv.c optional ehci_mv fdt -dev/usb/controller/generic_ehci.c optional ehci -dev/usb/controller/generic_ehci_acpi.c optional ehci acpi -dev/usb/controller/generic_ehci_fdt.c optional ehci fdt -dev/usb/controller/generic_ohci.c optional ohci fdt -dev/usb/controller/generic_usb_if.m optional ohci fdt -dev/usb/controller/musb_otg_allwinner.c optional musb fdt soc_allwinner_a64 -dev/usb/controller/usb_nop_xceiv.c optional fdt ext_resources -dev/usb/controller/generic_xhci.c optional xhci -dev/usb/controller/generic_xhci_acpi.c optional xhci acpi -dev/usb/controller/generic_xhci_fdt.c optional xhci fdt -dev/vnic/mrml_bridge.c optional vnic fdt -dev/vnic/nic_main.c optional vnic pci -dev/vnic/nicvf_main.c optional vnic pci pci_iov -dev/vnic/nicvf_queues.c optional vnic pci pci_iov -dev/vnic/thunder_bgx_fdt.c optional vnic fdt -dev/vnic/thunder_bgx.c optional vnic pci -dev/vnic/thunder_mdio_fdt.c optional vnic fdt -dev/vnic/thunder_mdio.c optional vnic -dev/vnic/lmac_if.m optional inet | inet6 | vnic -kern/msi_if.m optional intrng -kern/pic_if.m optional intrng -kern/subr_devmap.c standard -kern/subr_intr.c optional intrng -kern/subr_physmem.c standard -libkern/bcmp.c standard -libkern/memcmp.c standard \ - compile-with "${NORMAL_C:N-fsanitize*}" -libkern/memset.c standard \ - compile-with "${NORMAL_C:N-fsanitize*}" -libkern/arm64/crc32c_armv8.S standard -cddl/dev/dtrace/aarch64/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" -cddl/dev/dtrace/aarch64/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" -cddl/dev/fbt/aarch64/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" -# RockChip Drivers -arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 -arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 -arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 -arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 -arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 -arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 -arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain -arm64/rockchip/rk_spi.c optional fdt rk_spi -arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 -arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 -arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 -arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 -arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/rk_pwm.c optional fdt rk_pwm -arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 -arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 -dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 -dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +dev/iicbus/sy8106a.c optional sy8106a fdt +dev/iicbus/twsi/mv_twsi.c optional twsi fdt +dev/iicbus/twsi/a10_twsi.c optional twsi fdt +dev/iicbus/twsi/twsi.c optional twsi fdt -# RockChip Clock support -arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3328_cru.c optional fdt soc_rockchip_rk3328 -arm64/rockchip/clk/rk3399_cru.c optional fdt soc_rockchip_rk3399 -arm64/rockchip/clk/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 +dev/ipmi/ipmi.c optional ipmi +dev/ipmi/ipmi_acpi.c optional ipmi acpi +dev/ipmi/ipmi_kcs.c optional ipmi +dev/ipmi/ipmi_smic.c optional ipmi + +dev/mbox/mbox_if.m optional soc_brcm_bcm2837 + +dev/mmc/host/dwmmc.c optional dwmmc fdt +dev/mmc/host/dwmmc_altera.c optional dwmmc dwmmc_altera fdt +dev/mmc/host/dwmmc_hisi.c optional dwmmc dwmmc_hisi fdt +dev/mmc/host/dwmmc_rockchip.c optional dwmmc rk_dwmmc fdt + +dev/neta/if_mvneta_fdt.c optional neta fdt +dev/neta/if_mvneta.c optional neta mdio mii + +dev/ofw/ofw_cpu.c optional fdt +dev/ofw/ofwpci.c optional fdt pci + +dev/pci/controller/pci_n1sdp.c optional pci_n1sdp acpi +dev/pci/pci_host_generic.c optional pci +dev/pci/pci_host_generic_acpi.c optional pci acpi +dev/pci/pci_host_generic_fdt.c optional pci fdt +dev/pci/pci_dw_mv.c optional pci fdt +dev/pci/pci_dw.c optional pci fdt +dev/pci/pci_dw_if.m optional pci fdt + +dev/psci/psci.c standard +dev/psci/smccc_arm64.S standard +dev/psci/smccc.c standard + +dev/safexcel/safexcel.c optional safexcel fdt +dev/sdhci/sdhci_xenon.c optional sdhci_xenon sdhci fdt + +dev/uart/uart_cpu_arm64.c optional uart +dev/uart/uart_dev_mu.c optional uart uart_mu +dev/uart/uart_dev_pl011.c optional uart pl011 + +dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 +dev/usb/controller/dwc3.c optional fdt dwc3 +dev/usb/controller/ehci_mv.c optional ehci_mv fdt +dev/usb/controller/generic_ehci.c optional ehci +dev/usb/controller/generic_ehci_acpi.c optional ehci acpi +dev/usb/controller/generic_ehci_fdt.c optional ehci fdt +dev/usb/controller/generic_ohci.c optional ohci fdt +dev/usb/controller/generic_usb_if.m optional ohci fdt +dev/usb/controller/musb_otg_allwinner.c optional musb fdt soc_allwinner_a64 +dev/usb/controller/usb_nop_xceiv.c optional fdt ext_resources +dev/usb/controller/generic_xhci.c optional xhci +dev/usb/controller/generic_xhci_acpi.c optional xhci acpi +dev/usb/controller/generic_xhci_fdt.c optional xhci fdt + +dev/vnic/mrml_bridge.c optional vnic fdt +dev/vnic/nic_main.c optional vnic pci +dev/vnic/nicvf_main.c optional vnic pci pci_iov +dev/vnic/nicvf_queues.c optional vnic pci pci_iov +dev/vnic/thunder_bgx_fdt.c optional vnic fdt +dev/vnic/thunder_bgx.c optional vnic pci +dev/vnic/thunder_mdio_fdt.c optional vnic fdt +dev/vnic/thunder_mdio.c optional vnic +dev/vnic/lmac_if.m optional inet | inet6 | vnic + +## +## SoC Support +## + +# Allwinner common files +arm/allwinner/a10_timer.c optional a10_timer fdt +arm/allwinner/a10_codec.c optional sound a10_codec +arm/allwinner/a31_dmac.c optional a31_dmac +arm/allwinner/sunxi_dma_if.m optional a31_dmac +arm/allwinner/aw_cir.c optional evdev aw_cir fdt +arm/allwinner/aw_dwc3.c optional aw_dwc3 fdt +arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt +arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt +arm/allwinner/aw_nmi.c optional aw_nmi fdt \ + compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" +arm/allwinner/aw_pwm.c optional aw_pwm fdt +arm/allwinner/aw_rsb.c optional aw_rsb fdt +arm/allwinner/aw_rtc.c optional aw_rtc fdt +arm/allwinner/aw_sid.c optional aw_sid nvmem fdt +arm/allwinner/aw_spi.c optional aw_spi fdt +arm/allwinner/aw_syscon.c optional aw_syscon ext_resources syscon fdt +arm/allwinner/aw_thermal.c optional aw_thermal nvmem fdt +arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt +arm/allwinner/aw_usb3phy.c optional xhci aw_usbphy fdt +arm/allwinner/aw_wdog.c optional aw_wdog fdt +arm/allwinner/axp81x.c optional axp81x fdt +arm/allwinner/if_awg.c optional awg ext_resources syscon aw_sid nvmem fdt + +# Allwinner clock driver +arm/allwinner/clkng/aw_ccung.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_frac.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_m.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_mipi.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_nkmp.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_nm.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_nmm.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_np.c optional aw_ccu fdt +arm/allwinner/clkng/aw_clk_prediv_mux.c optional aw_ccu fdt +arm/allwinner/clkng/ccu_a64.c optional soc_allwinner_a64 aw_ccu fdt +arm/allwinner/clkng/ccu_h3.c optional soc_allwinner_h5 aw_ccu fdt +arm/allwinner/clkng/ccu_h6.c optional soc_allwinner_h6 aw_ccu fdt +arm/allwinner/clkng/ccu_h6_r.c optional soc_allwinner_h6 aw_ccu fdt +arm/allwinner/clkng/ccu_sun8i_r.c optional aw_ccu fdt +arm/allwinner/clkng/ccu_de2.c optional aw_ccu fdt + +# Allwinner padconf files +arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/h3/h3_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h3/h3_r_padconf.c optional soc_allwinner_h5 fdt +arm/allwinner/h6/h6_padconf.c optional soc_allwinner_h6 fdt +arm/allwinner/h6/h6_r_padconf.c optional soc_allwinner_h6 fdt + +# Altera/Intel +dev/altera/dwc/if_dwc_socfpga.c optional fdt dwc_socfpga +arm64/intel/firmware.c optional soc_intel_stratix10 +arm64/intel/stratix10-soc-fpga-mgr.c optional soc_intel_stratix10 +arm64/intel/stratix10-svc.c optional soc_intel_stratix10 + +# Annapurna +arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt +arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt +arm/annapurna/alpine/alpine_pci.c optional al_pci fdt +arm/annapurna/alpine/alpine_pci_msix.c optional al_pci fdt +arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \ + no-depend \ + compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" + +# Broadcom +arm64/broadcom/brcmmdio/mdio_mux_iproc.c optional fdt +arm64/broadcom/brcmmdio/mdio_nexus_iproc.c optional fdt +arm64/broadcom/brcmmdio/mdio_ns2_pcie_phy.c optional fdt pci +arm64/broadcom/genet/if_genet.c optional SOC_BRCM_BCM2838 fdt genet +arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +arm/broadcom/bcm2835/bcm2835_bsc.c optional bcm2835_bsc fdt +arm/broadcom/bcm2835/bcm2835_clkman.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_cpufreq.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_dma.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_fbd.c optional vt soc_brcm_bcm2837 fdt | vt soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_firmware.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_ft5406.c optional evdev bcm2835_ft5406 fdt +arm/broadcom/bcm2835/bcm2835_gpio.c optional gpio soc_brcm_bcm2837 fdt | gpio soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_intr.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_mbox.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_rng.c optional !random_loadable soc_brcm_bcm2837 fdt | !random_loadable soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_sdhci.c optional sdhci soc_brcm_bcm2837 fdt | sdhci soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_sdhost.c optional sdhci soc_brcm_bcm2837 fdt | sdhci soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_spi.c optional bcm2835_spi fdt +arm/broadcom/bcm2835/bcm2835_vcbus.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_vcio.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2835_wdog.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm2836.c optional soc_brcm_bcm2837 fdt | soc_brcm_bcm2838 fdt +arm/broadcom/bcm2835/bcm283x_dwc_fdt.c optional dwcotg fdt soc_brcm_bcm2837 | dwcotg fdt soc_brcm_bcm2838 +arm/broadcom/bcm2835/bcm2838_pci.c optional soc_brcm_bcm2838 fdt pci +arm/broadcom/bcm2835/bcm2838_xhci.c optional soc_brcm_bcm2838 fdt pci xhci +arm/broadcom/bcm2835/raspberrypi_gpio.c optional soc_brcm_bcm2837 gpio | soc_brcm_bcm2838 gpio +contrib/vchiq/interface/compat/vchi_bsd.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_arm.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -Wno-unused -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_connected.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_core.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_kern_lib.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_kmod.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_shim.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +contrib/vchiq/interface/vchiq_arm/vchiq_util.c optional vchiq soc_brcm_bcm2837 \ + compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" + +# Cavium +arm64/cavium/thunder_pcie_fdt.c optional soc_cavm_thunderx pci fdt +arm64/cavium/thunder_pcie_pem.c optional soc_cavm_thunderx pci +arm64/cavium/thunder_pcie_pem_fdt.c optional soc_cavm_thunderx pci fdt +arm64/cavium/thunder_pcie_common.c optional soc_cavm_thunderx pci # i.MX8 Clock support -arm64/freescale/imx/imx8mq_ccm.c optional fdt soc_freescale_imx8 -arm64/freescale/imx/clk/imx_clk_gate.c optional fdt soc_freescale_imx8 -arm64/freescale/imx/clk/imx_clk_mux.c optional fdt soc_freescale_imx8 +arm64/freescale/imx/imx8mq_ccm.c optional fdt soc_freescale_imx8 +arm64/freescale/imx/clk/imx_clk_gate.c optional fdt soc_freescale_imx8 +arm64/freescale/imx/clk/imx_clk_mux.c optional fdt soc_freescale_imx8 arm64/freescale/imx/clk/imx_clk_composite.c optional fdt soc_freescale_imx8 arm64/freescale/imx/clk/imx_clk_sscg_pll.c optional fdt soc_freescale_imx8 arm64/freescale/imx/clk/imx_clk_frac_pll.c optional fdt soc_freescale_imx8 # iMX drivers -arm/freescale/imx/imx_gpio.c optional gpio soc_freescale_imx8 -arm/freescale/imx/imx_i2c.c optional fsliic -arm/freescale/imx/imx_machdep.c optional fdt soc_freescale_imx8 -arm64/freescale/imx/imx7gpc.c optional fdt soc_freescale_imx8 -dev/ffec/if_ffec.c optional ffec +arm/freescale/imx/imx_gpio.c optional gpio soc_freescale_imx8 +arm/freescale/imx/imx_i2c.c optional fsliic +arm/freescale/imx/imx_machdep.c optional fdt soc_freescale_imx8 +arm64/freescale/imx/imx7gpc.c optional fdt soc_freescale_imx8 +dev/ffec/if_ffec.c optional ffec + +# Marvell +arm/mv/a37x0_gpio.c optional a37x0_gpio gpio fdt +arm/mv/a37x0_iic.c optional a37x0_iic iicbus fdt +arm/mv/a37x0_spi.c optional a37x0_spi spibus fdt +arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt +arm/mv/gpio.c optional mv_gpio fdt +arm/mv/mvebu_gpio.c optional mv_gpio fdt +arm/mv/mvebu_pinctrl.c optional mvebu_pinctrl fdt +arm/mv/mv_ap806_clock.c optional SOC_MARVELL_8K fdt +arm/mv/mv_ap806_gicp.c optional mv_ap806_gicp fdt +arm/mv/mv_ap806_sei.c optional mv_ap806_sei fdt +arm/mv/mv_cp110_clock.c optional SOC_MARVELL_8K fdt +arm/mv/mv_cp110_icu.c optional mv_cp110_icu fdt +arm/mv/mv_cp110_icu_bus.c optional mv_cp110_icu fdt +arm/mv/mv_thermal.c optional SOC_MARVELL_8K mv_thermal fdt +arm/mv/armada38x/armada38x_rtc.c optional mv_rtc fdt + +# NVidia +arm/nvidia/tegra_abpmisc.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_ahci.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_efuse.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_ehci.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_gpio.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_i2c.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_lic.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_mc.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_pcie.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_sdhci.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_soctherm_if.m optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_soctherm.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_uart.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_usbphy.c optional fdt soc_nvidia_tegra210 +arm/nvidia/tegra_xhci.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/max77620.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/max77620_gpio.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/max77620_regulators.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/max77620_rtc.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_car.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_clk_per.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_clk_pll.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_clk_super.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_coretemp.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_cpufreq.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_pinmux.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_pmc.c optional fdt soc_nvidia_tegra210 +arm64/nvidia/tegra210/tegra210_xusbpadctl.c optional fdt soc_nvidia_tegra210 # Nvidia firmware for Tegra -tegra210_xusb_fw.c optional tegra210_xusb_fw \ - dependency "$S/conf/files.arm64" \ +tegra210_xusb_fw.c optional tegra210_xusb_fw \ + dependency "$S/conf/files.arm64" \ compile-with "${AWK} -f $S/tools/fw_stub.awk tegra210_xusb.fw:tegra210_xusb_fw -mtegra210_xusb_fw -c${.TARGET}" \ - no-ctfconvert no-implicit-rule before-depend local \ + no-ctfconvert no-implicit-rule before-depend local \ clean "tegra210_xusb_fw.c" -tegra210_xusb.fwo optional tegra210_xusb_fw \ - dependency "tegra210_xusb.fw" \ - compile-with "${NORMAL_FWO}" \ - no-implicit-rule \ +tegra210_xusb.fwo optional tegra210_xusb_fw \ + dependency "tegra210_xusb.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ clean "tegra210_xusb.fwo" -tegra210_xusb.fw optional tegra210_xusb_fw \ - dependency "$S/contrib/dev/nvidia/tegra210_xusb.bin.uu" \ - compile-with "${NORMAL_FW}" \ - no-obj no-implicit-rule \ +tegra210_xusb.fw optional tegra210_xusb_fw \ + dependency "$S/contrib/dev/nvidia/tegra210_xusb.bin.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ clean "tegra210_xusb.fw" +# NXP +arm/freescale/vybrid/vf_i2c.c optional vf_i2c iicbus SOC_NXP_LS +arm64/qoriq/ls1046_gpio.c optional ls1046_gpio gpio fdt SOC_NXP_LS +arm64/qoriq/qoriq_dw_pci.c optional pci fdt SOC_NXP_LS +arm64/qoriq/qoriq_therm.c optional pci fdt SOC_NXP_LS +arm64/qoriq/qoriq_therm_if.m optional pci fdt SOC_NXP_LS +arm64/qoriq/clk/ls1046a_clkgen.c optional clk SOC_NXP_LS +arm64/qoriq/clk/lx2160a_clkgen.c optional clk SOC_NXP_LS +arm64/qoriq/clk/qoriq_clk_pll.c optional clk SOC_NXP_LS +arm64/qoriq/clk/qoriq_clkgen.c optional clk SOC_NXP_LS +dev/ahci/ahci_fsl_fdt.c optional SOC_NXP_LS ahci fdt + +# Qualcomm +arm64/qualcomm/qcom_gcc.c optional qcom_gcc fdt + +# RockChip Drivers +arm64/rockchip/rk3399_emmcphy.c optional fdt rk_emmcphy soc_rockchip_rk3399 +arm64/rockchip/rk_dwc3.c optional fdt rk_dwc3 soc_rockchip_rk3399 +arm64/rockchip/rk_i2c.c optional fdt rk_i2c soc_rockchip_rk3328 | fdt rk_i2c soc_rockchip_rk3399 +arm64/rockchip/rk805.c optional fdt rk805 soc_rockchip_rk3328 | fdt rk805 soc_rockchip_rk3399 +arm64/rockchip/rk_grf.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/rk_pinctrl.c optional fdt rk_pinctrl soc_rockchip_rk3328 | fdt rk_pinctrl soc_rockchip_rk3399 +arm64/rockchip/rk_gpio.c optional fdt rk_gpio soc_rockchip_rk3328 | fdt rk_gpio soc_rockchip_rk3399 +arm64/rockchip/rk_iodomain.c optional fdt rk_iodomain +arm64/rockchip/rk_spi.c optional fdt rk_spi +arm64/rockchip/rk_usb2phy.c optional fdt rk_usb2phy soc_rockchip_rk3328 | soc_rockchip_rk3399 +arm64/rockchip/rk_typec_phy.c optional fdt rk_typec_phy soc_rockchip_rk3399 +arm64/rockchip/if_dwc_rk.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc_if.m optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 +arm64/rockchip/rk_pwm.c optional fdt rk_pwm +arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 +arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 +dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 +dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 + +# RockChip Clock support +arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_armclk.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_composite.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_fract.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_gate.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_mux.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk_clk_pll.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk3328_cru.c optional fdt soc_rockchip_rk3328 +arm64/rockchip/clk/rk3399_cru.c optional fdt soc_rockchip_rk3399 +arm64/rockchip/clk/rk3399_pmucru.c optional fdt soc_rockchip_rk3399 + +# Xilinx +arm/xilinx/uart_dev_cdnc.c optional uart soc_xilinx_zynq + +# Linuxkpi compat/linuxkpi/common/src/linux_fpu.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" + +# Cloudabi +arm64/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32 +arm64/cloudabi64/cloudabi64_sysvec.c optional compat_cloudabi64 + +cloudabi32_vdso.o optional compat_cloudabi32 \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6_on_64bit.S" \ + compile-with "${CC} -x assembler-with-cpp -m32 -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6_on_64bit.S -o ${.TARGET}" \ + no-obj no-implicit-rule \ + clean "cloudabi32_vdso.o" +cloudabi32_vdso_blob.o optional compat_cloudabi32 \ + dependency "cloudabi32_vdso.o" \ *** 13 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Fri Feb 19 18:14:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 06CE053587B; Fri, 19 Feb 2021 18:14: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 4Dj08W6h7kz4nwN; Fri, 19 Feb 2021 18:14: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 CEBD010C83; Fri, 19 Feb 2021 18:14: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 11JIEJ0E061203; Fri, 19 Feb 2021 18:14:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JIEJTu061202; Fri, 19 Feb 2021 18:14:19 GMT (envelope-from git) Date: Fri, 19 Feb 2021 18:14:19 GMT Message-Id: <202102191814.11JIEJTu061202@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 945dc4047dfa - stable/13 - arm64: Make thunderx vnic file depend on soc_cavm_thunderx MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 945dc4047dfab1603eda0cf06478078bd0d77911 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 18:14:20 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=945dc4047dfab1603eda0cf06478078bd0d77911 commit 945dc4047dfab1603eda0cf06478078bd0d77911 Author: Emmanuel Vadot AuthorDate: 2021-02-04 14:31:23 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-19 18:03:51 +0000 arm64: Make thunderx vnic file depend on soc_cavm_thunderx MFC after: 3 days --- sys/conf/files.arm64 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 8abe5d194d90..5c9cc1ca7b76 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -274,10 +274,10 @@ dev/vnic/mrml_bridge.c optional vnic fdt dev/vnic/nic_main.c optional vnic pci dev/vnic/nicvf_main.c optional vnic pci pci_iov dev/vnic/nicvf_queues.c optional vnic pci pci_iov -dev/vnic/thunder_bgx_fdt.c optional vnic fdt -dev/vnic/thunder_bgx.c optional vnic pci -dev/vnic/thunder_mdio_fdt.c optional vnic fdt -dev/vnic/thunder_mdio.c optional vnic +dev/vnic/thunder_bgx_fdt.c optional soc_cavm_thunderx pci vnic fdt +dev/vnic/thunder_bgx.c optional soc_cavm_thunderx pci vnic pci +dev/vnic/thunder_mdio_fdt.c optional soc_cavm_thunderx pci vnic fdt +dev/vnic/thunder_mdio.c optional soc_cavm_thunderx pci vnic dev/vnic/lmac_if.m optional inet | inet6 | vnic ## From owner-dev-commits-src-all@freebsd.org Fri Feb 19 18:14:22 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F3F82535980; Fri, 19 Feb 2021 18:14: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 4Dj08Y10T9z4pFL; Fri, 19 Feb 2021 18:14: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 EDD6F1092E; Fri, 19 Feb 2021 18:14: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 11JIEKFd061221; Fri, 19 Feb 2021 18:14:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JIEK4m061220; Fri, 19 Feb 2021 18:14:20 GMT (envelope-from git) Date: Fri, 19 Feb 2021 18:14:20 GMT Message-Id: <202102191814.11JIEK4m061220@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 7b6068eec1e0 - stable/13 - arm64: Add a SOC_BRCM_NS2 option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7b6068eec1e01286b63f8c95d193e7c998f275a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 18:14:22 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=7b6068eec1e01286b63f8c95d193e7c998f275a7 commit 7b6068eec1e01286b63f8c95d193e7c998f275a7 Author: Emmanuel Vadot AuthorDate: 2021-02-04 14:40:54 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-19 18:03:56 +0000 arm64: Add a SOC_BRCM_NS2 option Only compile files needed for this platform if the option is enabled in the kernel config file. Add the option to GENERIC. MFC after: 3 days --- sys/arm64/conf/GENERIC | 1 + sys/conf/files.arm64 | 6 +++--- sys/conf/options.arm64 | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 43d891eb4ccd..7f0b6b84ad41 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -113,6 +113,7 @@ options SOC_HISI_HI6220 options SOC_INTEL_STRATIX10 options SOC_BRCM_BCM2837 options SOC_BRCM_BCM2838 +options SOC_BRCM_NS2 options SOC_MARVELL_8K options SOC_NVIDIA_TEGRA210 options SOC_NXP_LS diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 5c9cc1ca7b76..c01fa64133d2 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -349,9 +349,9 @@ arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" # Broadcom -arm64/broadcom/brcmmdio/mdio_mux_iproc.c optional fdt -arm64/broadcom/brcmmdio/mdio_nexus_iproc.c optional fdt -arm64/broadcom/brcmmdio/mdio_ns2_pcie_phy.c optional fdt pci +arm64/broadcom/brcmmdio/mdio_mux_iproc.c optional soc_brcm_ns2 fdt +arm64/broadcom/brcmmdio/mdio_nexus_iproc.c optional soc_brcm_ns2 fdt +arm64/broadcom/brcmmdio/mdio_ns2_pcie_phy.c optional soc_brcm_ns2 fdt pci arm64/broadcom/genet/if_genet.c optional SOC_BRCM_BCM2838 fdt genet arm/broadcom/bcm2835/bcm2835_audio.c optional sound vchiq fdt \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" diff --git a/sys/conf/options.arm64 b/sys/conf/options.arm64 index 24e34c1e3b6a..5a97fd6b3ef6 100644 --- a/sys/conf/options.arm64 +++ b/sys/conf/options.arm64 @@ -21,6 +21,7 @@ SOC_ALLWINNER_H5 opt_soc.h SOC_ALLWINNER_H6 opt_soc.h SOC_BRCM_BCM2837 opt_soc.h SOC_BRCM_BCM2838 opt_soc.h +SOC_BRCM_NS2 opt_soc.h SOC_CAVM_THUNDERX opt_soc.h SOC_FREESCALE_IMX8 opt_soc.h SOC_HISI_HI6220 opt_soc.h From owner-dev-commits-src-all@freebsd.org Fri Feb 19 18:14:24 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ACBB453589B; Fri, 19 Feb 2021 18:14: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 4Dj08Z6GBtz4pFV; Fri, 19 Feb 2021 18:14:22 +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 1F4E710C84; Fri, 19 Feb 2021 18:14:22 +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 11JIEL6L061243; Fri, 19 Feb 2021 18:14:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JIEL1L061242; Fri, 19 Feb 2021 18:14:21 GMT (envelope-from git) Date: Fri, 19 Feb 2021 18:14:21 GMT Message-Id: <202102191814.11JIEL1L061242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ac845558f7b6 - stable/13 - arm64: if_dwc is also needed by intel stratix10 platform MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac845558f7b626d9a31b8f6dab686c45d39dc5a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 18:14:25 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ac845558f7b626d9a31b8f6dab686c45d39dc5a0 commit ac845558f7b626d9a31b8f6dab686c45d39dc5a0 Author: Emmanuel Vadot AuthorDate: 2021-02-04 16:07:17 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-19 18:04:01 +0000 arm64: if_dwc is also needed by intel stratix10 platform MFC after: 3 days --- sys/conf/files.arm64 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index c01fa64133d2..c1e5b40db3f9 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -159,6 +159,9 @@ dev/axgbe/xgbe-phy-v1.c optional axa dev/cpufreq/cpufreq_dt.c optional cpufreq fdt +dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 +dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 | fdt dwc_socfpga soc_intel_stratix10 + dev/gpio/pl061.c optional pl061 gpio dev/gpio/pl061_acpi.c optional pl061 gpio acpi dev/gpio/pl061_fdt.c optional pl061 gpio fdt @@ -516,8 +519,6 @@ arm64/rockchip/rk_tsadc.c optional fdt soc_rockchip_rk3399 arm64/rockchip/rk_pwm.c optional fdt rk_pwm arm64/rockchip/rk_pcie.c optional fdt pci soc_rockchip_rk3399 arm64/rockchip/rk_pcie_phy.c optional fdt pci soc_rockchip_rk3399 -dev/dwc/if_dwc.c optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 -dev/dwc/if_dwc_if.m optional fdt dwc_rk soc_rockchip_rk3328 | fdt dwc_rk soc_rockchip_rk3399 # RockChip Clock support arm64/rockchip/clk/rk_cru.c optional fdt soc_rockchip_rk3328 | fdt soc_rockchip_rk3399 From owner-dev-commits-src-all@freebsd.org Fri Feb 19 19:44:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DA563539778; Fri, 19 Feb 2021 19:44:28 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dj28X5hnFz4v91; Fri, 19 Feb 2021 19:44:28 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id 38EC72229B; Fri, 19 Feb 2021 19:44:28 +0000 (UTC) Date: Fri, 19 Feb 2021 19:44:27 +0000 From: Mark Linimon To: Warner Losh Cc: Konstantin Belousov , Brandon Bergren , Jessica Clarke , John Baldwin , src-committers , "" , dev-commits-src-main@freebsd.org Subject: mips binaries (was: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS.) Message-ID: <20210219194427.GB29668@lonesome.com> References: <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 4Dj28X5hnFz4v91 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 19:44:28 -0000 On Fri, Feb 19, 2021 at 09:14:07AM -0700, Warner Losh wrote: > FWIW: Mips likely can play the 'not very popular tier 2 card trending > towards tier 3' card, at least for 13 since (a) 13.0 isn't out yet and > (b) the project doesn't produce mips binaries. (Before I go too far, I am presuming the above means "mips32 binaries from the src tree".) So here is a relevant question about mips. In a discussion about building packages for more varieties of powerpc, Philip Paeps has advised both myself and Piotr Kubaj that we are banging up against the limits of what our mirrors can handle. It looks as though we are still publishing the following: FreeBSD:11:mips (only quarterly is updated) FreeBSD:12:mips (only quarterly is updated) FreeBSD:13:mips (source: https://pkg.freebsd.org/) Given the lack of src binaries, and the poor state of mips* binaries on both 32 and 64, I speculate that all of our mips32 users are building their own bits. If this is the case, I would like to make the motion that we remove mips32 package bits from the mirrors, so that we can instead start publishing binaries for: FreeBSD:13:powerpc64le FreeBSD:14:riscv64 which IMVVHO are "tier-1 aspirational". Discussion? mcl From owner-dev-commits-src-all@freebsd.org Fri Feb 19 19:53:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B4DFA53A02D; Fri, 19 Feb 2021 19:53: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 4Dj2M44lwsz3Brj; Fri, 19 Feb 2021 19:53: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 9600F11E28; Fri, 19 Feb 2021 19:53: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 11JJra81092289; Fri, 19 Feb 2021 19:53:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JJraCs092288; Fri, 19 Feb 2021 19:53:36 GMT (envelope-from git) Date: Fri, 19 Feb 2021 19:53:36 GMT Message-Id: <202102191953.11JJraCs092288@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: 50b7c1f530f1 - main - ofwfb: fix incorrect colors on powerpc* and add new tunable parameters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50b7c1f530f174be720b83f7e1d13e0fd42c5974 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 19:53:36 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=50b7c1f530f174be720b83f7e1d13e0fd42c5974 commit 50b7c1f530f174be720b83f7e1d13e0fd42c5974 Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-19 06:22:25 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-19 22:50:36 +0000 ofwfb: fix incorrect colors on powerpc* and add new tunable parameters - Implements little-endian support (powerpc64le) - Adds 'hw.ofwfb.physaddr' kernel parameter so user can manually provide correct address if it's not detected correctly - Adds 'hw.ofwfb.argb32_pixel' so user can set it manually if colors are inverted due to incorrect pixel format (default = 1) - Automatically selects RGBA32 pixel format if NVidia graphic adapter is detected (sets hw.ofwfb.argb32_pixel=0) Machines equipped with NVidia graphic adapters tend to use RGBA32 pixel format. By default ARGB32 pixel format is used, proved to work on machines equipped with ATI graphic adapter and the onboard adapter used on Talos II and Blackbird machines from Raptor Computing Systems. Original patch developed by bdragon Reviewed by: bdragon, luporl MFC after: 3 days Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28604 --- sys/dev/vt/hw/ofwfb/ofwfb.c | 165 +++++++++++++++++++++++++++++++++----------- 1 file changed, 123 insertions(+), 42 deletions(-) diff --git a/sys/dev/vt/hw/ofwfb/ofwfb.c b/sys/dev/vt/hw/ofwfb/ofwfb.c index 833b98b39f78..8a1b7b3688a7 100644 --- a/sys/dev/vt/hw/ofwfb/ofwfb.c +++ b/sys/dev/vt/hw/ofwfb/ofwfb.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include struct ofwfb_softc { struct fb_info fb; @@ -55,8 +56,13 @@ struct ofwfb_softc { ihandle_t sc_handle; bus_space_tag_t sc_memt; int iso_palette; + int argb; + int endian_flip; + uint32_t vendor_id; }; +#define PCI_VENDOR_ID_NVIDIA 0x10de + static void ofwfb_initialize(struct vt_device *vd); static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; @@ -297,7 +303,6 @@ ofwfb_initialize(struct vt_device *vd) struct ofwfb_softc *sc = vd->vd_softc; int i, err; cell_t retval; - uint32_t oldpix; sc->fb.fb_cmsize = 16; @@ -311,6 +316,10 @@ ofwfb_initialize(struct vt_device *vd) sc->iso_palette = 0; switch (sc->fb.fb_bpp) { case 8: + /* + * No color format issues here, since we are passing the RGB + * components separately to Open Firmware. + */ vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); @@ -330,21 +339,38 @@ ofwfb_initialize(struct vt_device *vd) case 32: /* - * We bypass the usual bus_space_() accessors here, mostly - * for performance reasons. In particular, we don't want - * any barrier operations that may be performed and handle - * endianness slightly different. Figure out the host-view - * endianness of the frame buffer. + * There are two main color formats in use. + * ARGB32 is used mainly on hardware that was designed for + * LE systems, and RGBA32 is used mainly on hardware designed + * for BE systems. + * + * PowerMacs use either, depending on the video card option. + * NVidia cards tend to be RGBA32, and ATI cards tend to be ARGB32. + * + * There is no good way to determine the correct option, as this + * is independent of endian swapping. */ - oldpix = bus_space_read_4(sc->sc_memt, sc->fb.fb_vbase, 0); - bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, 0xff000000); - if (*(uint8_t *)(sc->fb.fb_vbase) == 0xff) - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + if (sc->vendor_id == PCI_VENDOR_ID_NVIDIA) + sc->argb = 0; else - vt_generate_cons_palette(sc->fb.fb_cmap, - COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, oldpix); + sc->argb = 1; + + TUNABLE_INT_FETCH("hw.ofwfb.argb32_pixel", &sc->argb); + if (sc->endian_flip) { + if (sc->argb) + vt_generate_cons_palette(sc->fb.fb_cmap, + COLOR_FORMAT_RGB, 255, 8, 255, 16, 255, 24); + else + vt_generate_cons_palette(sc->fb.fb_cmap, + COLOR_FORMAT_RGB, 255, 24, 255, 16, 255, 8); + } else { + if (sc->argb) + vt_generate_cons_palette(sc->fb.fb_cmap, + COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); + else + vt_generate_cons_palette(sc->fb.fb_cmap, + COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); + } break; default: @@ -361,8 +387,12 @@ ofwfb_init(struct vt_device *vd) phandle_t chosen; phandle_t node; uint32_t depth, height, width, stride; - uint32_t fb_phys; - int i, len; + uint32_t vendor_id = 0; + cell_t adr[2]; + uint64_t user_phys; + bus_addr_t fb_phys; + bus_size_t fb_phys_size; + int i, j, len; /* Initialize softc */ vd->vd_softc = sc = &ofwfb_conssoftc; @@ -391,6 +421,16 @@ ofwfb_init(struct vt_device *vd) if (strcmp(buf, "display") != 0) return (CN_DEAD); + /* + * Retrieve vendor-id from /chosen parent node, usually pointing to + * video card device. This is used to select pixel format later on + * ofwfb_initialize() + */ + if (OF_getencprop(OF_parent(node), "vendor-id", &vendor_id, + sizeof(vendor_id)) == sizeof(vendor_id)) + sc->vendor_id = vendor_id; + + /* Keep track of the OF node */ sc->sc_node = node; @@ -419,35 +459,69 @@ ofwfb_init(struct vt_device *vd) sizeof(stride)) stride = width*depth/8; + sc->fb.fb_height = height; sc->fb.fb_width = width; sc->fb.fb_stride = stride; sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; + sc->endian_flip = 0; + +#if defined(__powerpc__) + if (OF_hasprop(node, "little-endian")) { + sc->sc_memt = &bs_le_tag; +#if BYTE_ORDER == BIG_ENDIAN + sc->endian_flip = 1; +#endif + } else if (OF_hasprop(node, "big-endian")) { + sc->sc_memt = &bs_be_tag; +#if BYTE_ORDER == LITTLE_ENDIAN + sc->endian_flip = 1; +#endif + } + else { + /* Assume the framebuffer is in native endian. */ +#if BYTE_ORDER == BIG_ENDIAN + sc->sc_memt = &bs_be_tag; +#else + sc->sc_memt = &bs_le_tag; +#endif + } +#elif defined(__arm__) + sc->sc_memt = fdtbus_bs_tag; +#else + #error Unsupported platform! +#endif + /* * Grab the physical address of the framebuffer, and then map it * into our memory space. If the MMU is not yet up, it will be * remapped for us when relocation turns on. */ - if (OF_getproplen(node, "address") == sizeof(fb_phys)) { - /* XXX We assume #address-cells is 1 at this point. */ - OF_getprop(node, "address", &fb_phys, sizeof(fb_phys)); - - #if defined(__powerpc__) - sc->sc_memt = &bs_be_tag; - bus_space_map(sc->sc_memt, fb_phys, sc->fb.fb_size, - BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); - #elif defined(__arm__) - sc->sc_memt = fdtbus_bs_tag; - bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, - BUS_SPACE_MAP_PREFETCHABLE, - (bus_space_handle_t *)&sc->fb.fb_vbase); - #else - #error Unsupported platform! - #endif + user_phys = 0; + TUNABLE_UINT64_FETCH("hw.ofwfb.physaddr", &user_phys); + fb_phys = (bus_addr_t)user_phys; + if (fb_phys) + sc->fb.fb_pbase = (vm_paddr_t)fb_phys; + else if (OF_hasprop(node, "address")) { + + switch (OF_getproplen(node, "address")) { + case 4: + OF_getencprop(node, "address", adr, 4); + fb_phys = adr[0]; + break; + case 8: + OF_getencprop(node, "address", adr, 8); + fb_phys = ((uint64_t)adr[0] << 32) | adr[1]; + break; + default: + /* Bad property? */ + return (CN_DEAD); + } - sc->fb.fb_pbase = fb_phys; + sc->fb.fb_pbase = (vm_paddr_t)fb_phys; } else { +#if defined(__powerpc__) /* * Some IBM systems don't have an address property. Try to * guess the framebuffer region from the assigned addresses. @@ -473,7 +547,7 @@ ofwfb_init(struct vt_device *vd) len = 0; num_pciaddrs = len / sizeof(struct ofw_pci_register); - fb_phys = num_pciaddrs; + j = num_pciaddrs; for (i = 0; i < num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ if (pciaddrs[i].size_lo < sc->fb.fb_stride * height) @@ -484,26 +558,33 @@ ofwfb_init(struct vt_device *vd) continue; /* This could be the framebuffer */ - fb_phys = i; + j = i; /* If it is prefetchable, it certainly is */ if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) break; } - if (fb_phys == num_pciaddrs) /* No candidates found */ + if (j == num_pciaddrs) /* No candidates found */ return (CN_DEAD); - #if defined(__powerpc__) - OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase, - NULL); - sc->fb.fb_pbase = sc->fb.fb_vbase & ~DMAP_BASE_ADDRESS; - #else + if (ofw_reg_to_paddr(node, j, &fb_phys, &fb_phys_size, NULL) < 0) + return (CN_DEAD); + + sc->fb.fb_pbase = (vm_paddr_t)fb_phys; +#else /* No ability to interpret assigned-addresses otherwise */ return (CN_DEAD); - #endif +#endif } + if (!sc->fb.fb_pbase) + return (CN_DEAD); + + bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, + BUS_SPACE_MAP_PREFETCHABLE, + (bus_space_handle_t *)&sc->fb.fb_vbase); + #if defined(__powerpc__) /* * If we are running on PowerPC in real mode (supported only on AIM From owner-dev-commits-src-all@freebsd.org Fri Feb 19 19:54:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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 97C5753A03F; Fri, 19 Feb 2021 19:54: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 4Dj2N13tgyz3Bw0; Fri, 19 Feb 2021 19:54: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 7846C11C37; Fri, 19 Feb 2021 19:54: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 11JJsPfB092524; Fri, 19 Feb 2021 19:54:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JJsPk8092523; Fri, 19 Feb 2021 19:54:25 GMT (envelope-from git) Date: Fri, 19 Feb 2021 19:54:25 GMT Message-Id: <202102191954.11JJsPk8092523@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: d889bc57622c - stable/13 - truss: Decode sendfile(2) arguments 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: d889bc57622cb1f63e0070fc32a5d5736ff0f71d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 19:54:25 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d889bc57622cb1f63e0070fc32a5d5736ff0f71d commit d889bc57622cb1f63e0070fc32a5d5736ff0f71d Author: Mark Johnston AuthorDate: 2021-02-05 16:28:09 +0000 Commit: Mark Johnston CommitDate: 2021-02-19 19:54:18 +0000 truss: Decode sendfile(2) arguments (cherry picked from commit 90da2c797bfa7639005ed46ab9173feb8bd85ecd) --- usr.bin/truss/syscall.h | 2 ++ usr.bin/truss/syscalls.c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/usr.bin/truss/syscall.h b/usr.bin/truss/syscall.h index 5f8babf4c407..af918fed4f1b 100644 --- a/usr.bin/truss/syscall.h +++ b/usr.bin/truss/syscall.h @@ -117,6 +117,8 @@ enum Argtype { Procctl, Priowhich, Ptraceop, + Sendfileflags, + Sendfilehdtr, Quotactlcmd, Reboothowto, Resource, diff --git a/usr.bin/truss/syscalls.c b/usr.bin/truss/syscalls.c index 319f3d8b0793..f52a82ed97c0 100644 --- a/usr.bin/truss/syscalls.c +++ b/usr.bin/truss/syscalls.c @@ -478,6 +478,10 @@ static struct syscall decoded_syscalls[] = { .args = { { Int, 0 }, { Iovec | IN, 1 }, { Int, 2 }, { Sockaddr | IN, 3 }, { Socklent, 4 }, { Sctpsndrcvinfo | IN, 5 }, { Msgflags, 6 } } }, + { .name = "sendfile", .ret_type = 1, .nargs = 7, + .args = { { Int, 0 }, { Int, 1 }, { QuadHex, 2 }, { Sizet, 3 }, + { Sendfilehdtr, 4 }, { QuadHex | OUT, 5 }, + { Sendfileflags, 6 } } }, { .name = "select", .ret_type = 1, .nargs = 5, .args = { { Int, 0 }, { Fd_set, 1 }, { Fd_set, 2 }, { Fd_set, 3 }, { Timeval, 4 } } }, @@ -2670,6 +2674,24 @@ print_arg(struct syscall_args *sc, unsigned long *args, register_t *retval, print_integer_arg(sysdecode_ptrace_request, fp, args[sc->offset]); break; + case Sendfileflags: + print_mask_arg(sysdecode_sendfile_flags, fp, args[sc->offset]); + break; + case Sendfilehdtr: { + struct sf_hdtr hdtr; + + if (get_struct(pid, args[sc->offset], &hdtr, sizeof(hdtr)) != + -1) { + fprintf(fp, "{"); + print_iovec(fp, trussinfo, (uintptr_t)hdtr.headers, + hdtr.hdr_cnt); + print_iovec(fp, trussinfo, (uintptr_t)hdtr.trailers, + hdtr.trl_cnt); + fprintf(fp, "}"); + } else + print_pointer(fp, args[sc->offset]); + break; + } case Quotactlcmd: if (!sysdecode_quotactl_cmd(fp, args[sc->offset])) fprintf(fp, "%#x", (int)args[sc->offset]); From owner-dev-commits-src-all@freebsd.org Fri Feb 19 19:54:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 06C0F53A112; Fri, 19 Feb 2021 19:54: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 4Dj2NZ5K5Jz3BrY; Fri, 19 Feb 2021 19:54:54 +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 A912C11A73; Fri, 19 Feb 2021 19:54:54 +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 11JJssIX092700; Fri, 19 Feb 2021 19:54:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JJssp1092699; Fri, 19 Feb 2021 19:54:54 GMT (envelope-from git) Date: Fri, 19 Feb 2021 19:54:54 GMT Message-Id: <202102191954.11JJssp1092699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Watson Subject: git: c3feaeaa32c9 - main - Reimplement the arm64 dtrace_gethrtime(), which provides the high-resolution nanosecond timestamp used for the DTrace 'timestamp' built-in variable. The new implementation uses the EL0 cycle counter and frequency registers in ARMv8-A. This replaces a previous implementation that relied on an instrumentation-safe implementation of getnanotime(), which provided only timer resolution. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rwatson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c3feaeaa32c9029ea98f2bb95c665390ca53728a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 19:54:55 -0000 The branch main has been updated by rwatson: URL: https://cgit.FreeBSD.org/src/commit/?id=c3feaeaa32c9029ea98f2bb95c665390ca53728a commit c3feaeaa32c9029ea98f2bb95c665390ca53728a Author: Robert Watson AuthorDate: 2021-02-16 15:19:05 +0000 Commit: Robert Watson CommitDate: 2021-02-19 09:00:39 +0000 Reimplement the arm64 dtrace_gethrtime(), which provides the high-resolution nanosecond timestamp used for the DTrace 'timestamp' built-in variable. The new implementation uses the EL0 cycle counter and frequency registers in ARMv8-A. This replaces a previous implementation that relied on an instrumentation-safe implementation of getnanotime(), which provided only timer resolution. MFC after: 3 days Reviewed by: andrew, bsdimp (older version) Useful comments appreciated: jrtc27, emaste --- sys/cddl/dev/dtrace/aarch64/dtrace_subr.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c index 6646e51fc191..9bf9f0798bb5 100644 --- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c +++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c @@ -153,23 +153,26 @@ dtrace_sync(void) } /* - * DTrace needs a high resolution time function which can - * be called from a probe context and guaranteed not to have - * instrumented with probes itself. + * DTrace needs a high resolution time function which can be called from a + * probe context and guaranteed not to have instrumented with probes itself. * - * Returns nanoseconds since boot. + * Returns nanoseconds since some arbitrary point in time (likely SoC reset?). */ uint64_t -dtrace_gethrtime() +dtrace_gethrtime(void) { - struct timespec curtime; - - dtrace_getnanouptime(&curtime); - - return (curtime.tv_sec * 1000000000UL + curtime.tv_nsec); + uint64_t count, freq; + count = READ_SPECIALREG(cntvct_el0); + freq = READ_SPECIALREG(cntfrq_el0); + return ((1000000000UL * count) / freq); } +/* + * Return a much lower resolution wallclock time based on the system clock + * updated by the timer. If needed, we could add a version interpolated from + * the system clock as is the case with dtrace_gethrtime(). + */ uint64_t dtrace_gethrestime(void) { From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:09:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6301F53A837; Fri, 19 Feb 2021 20:09:47 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward501j.mail.yandex.net (forward501j.mail.yandex.net [IPv6:2a02:6b8:0:801:2::111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dj2jl0flxz3CmK; Fri, 19 Feb 2021 20:09:46 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from sas1-37a648709e20.qloud-c.yandex.net (sas1-37a648709e20.qloud-c.yandex.net [IPv6:2a02:6b8:c08:fe03:0:640:37a6:4870]) by forward501j.mail.yandex.net (Yandex) with ESMTP id 0E7D533804A2; Fri, 19 Feb 2021 23:09:43 +0300 (MSK) Received: from localhost (localhost [::1]) by sas1-37a648709e20.qloud-c.yandex.net (mxback/Yandex) with ESMTP id RwGefhulLm-9fJ8s3dC; Fri, 19 Feb 2021 23:09:42 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1613765382; bh=xehcP86+/CcMzby3lTBayNgQ4U2LAiRoJoLkgbrMAkk=; h=Message-Id:Cc:Subject:In-Reply-To:Date:References:To:From; b=CAVZfqHogDMIG4ifQGwDz3TX0raVk22JQ+b6ORK7p2OFczJ3TQCxGVG/bccKqTqjJ Fsmh8cAAsHy6FBN1iBkJRhGZ1IgW0QPJu4i5592P1MRFDWAUfRuw69Zsh+uZOpEX07 /rxXOi8SCfbntxvc27VJq0vAcaMaMGFZGlHhJmjQ= Received: by sas2-a098efd00d24.qloud-c.yandex.net with HTTP; Fri, 19 Feb 2021 23:09:41 +0300 From: Alexander V. Chernikov Envelope-From: melifaro@ipfw.ru To: Kristof Provost Cc: "src-committers@FreeBSD.org" , "dev-commits-src-all@FreeBSD.org" , "dev-commits-src-main@FreeBSD.org" In-Reply-To: <471C6715-4F53-4DE7-9233-FC1EDEE49E2D@FreeBSD.org> References: <202102162031.11GKV0T6060307@gitrepo.freebsd.org> <26E2BA35-291E-4DC5-BDCB-D98347D7E24C@FreeBSD.org> <471C6715-4F53-4DE7-9233-FC1EDEE49E2D@FreeBSD.org> Subject: Re: git: 2fe5a79425c7 - main - Fix dst/netmask handling in routing socket code. MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 19 Feb 2021 20:09:41 +0000 Message-Id: <144881613765282@mail.yandex.ru> Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 4Dj2jl0flxz3CmK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:09:47 -0000 MTkuMDIuMjAyMSwgMTY6MTEsICJLcmlzdG9mIFByb3Zvc3QiIDxrcEBmcmVlYnNkLm9yZz46Cj4g T24gMTkgRmViIDIwMjEsIGF0IDE2OjI0LCBLcmlzdG9mIFByb3Zvc3Qgd3JvdGU6Cj4+IE9uIDE2 IEZlYiAyMDIxLCBhdCAyMTozMSwgQWxleGFuZGVyIFYuIENoZXJuaWtvdiB3cm90ZToKPj4+IFRo ZSBicmFuY2ggbWFpbiBoYXMgYmVlbiB1cGRhdGVkIGJ5IG1lbGlmYXJvOgo+Pj4KPj4+IFVSTDog aHR0cHM6Ly9jZ2l0LkZyZWVCU0Qub3JnL3NyYy9jb21taXQvP2lkPTJmZTVhNzk0MjVjNzlmN2I4 MjhhY2Q5MWRhNjZkOTcyMzA5MjVmYzgKPj4+Cj4+PiBjb21taXQgMmZlNWE3OTQyNWM3OWY3Yjgy OGFjZDkxZGE2NmQ5NzIzMDkyNWZjOAo+Pj4gQXV0aG9yOiBBbGV4YW5kZXIgVi4gQ2hlcm5pa292 IDxtZWxpZmFyb0BGcmVlQlNELm9yZz4KPj4+IEF1dGhvckRhdGU6IDIwMjEtMDItMTYgMjA6MzA6 MDQgKzAwMDAKPj4+IENvbW1pdDogQWxleGFuZGVyIFYuIENoZXJuaWtvdiA8bWVsaWZhcm9ARnJl ZUJTRC5vcmc+Cj4+PiBDb21taXREYXRlOiAyMDIxLTAyLTE2IDIwOjMwOjA0ICswMDAwCj4+Pgo+ Pj4gRml4IGRzdC9uZXRtYXNrIGhhbmRsaW5nIGluIHJvdXRpbmcgc29ja2V0IGNvZGUuCj4+Pgo+ Pj4gVHJhZGl0aW9uYWxseSByb3V0aW5nIHNvY2tldCBjb2RlIGRpZCBhbG1vc3QgemVybyBjaGVj a3Mgb24KPj4+IHRoZSBpbnB1dCBtZXNzYWdlIGV4Y2VwdCBmb3IgdGhlIG1vc3QgYmFzaWMgc2l6 ZSBjaGVja3MuCj4+Pgo+Pj4gVGhpcyByZXN1bHRlZCBpbiB0aGUgdW5jbGVhciBLUEkgYm91bmRh cnkgZm9yIHRoZSByb3V0aW5nIHN5c3RlbSBjb2RlCj4+PiAoYHJ0cmVxdWVzdCpgIGFuZCBub3cg YHJpYl9hY3Rpb24oKWApIHcuci50IG1lc3NhZ2UgdmFsaWRuZXNzLgo+Pj4KPj4+IE11bHRpcGxl IHBvdGVudGlhbCBwcm9ibGVtcyBhbmQgbnVhbmNlcyBleGlzdHM6Cj4+PiAqIEhvc3QgYml0cyBp biBSVEFYX0RTVCBzb2NrYWRkci4gRXhpc3RpbmcgYXBwbGljYXRpb25zIGRvIHNlbmQgcHJlZml4 ZXMKPj4+IHdpdGggaG9zdGJpdHMgdW5jbGVhcmVkLiBFdmVuIGByb3V0ZSg4KWAgZG9lcyB0aGlz LCBhcyB0aGV5IGhvcGUgdGhlIGtlcm5lbAo+Pj4gd291bGQgZG8gdGhlIGpvYiBvZiBmaXhpbmcg aXQuIENvZGUgaW5zaWRlIGByaWJfYWN0aW9uKClgIG5lZWRzIHRvIGhhbmRsZQo+Pj4gaXQgb24g aXRzIG93biAoc2VlIGBydF9tYXNrZWRjb3B5KClgIHVnbHkgaGFjaykuCj4+PiAqIFRoZXJlIGFy ZSBtdWx0aXBsZSB3YXkgb2YgYWRkaW5nIHRoZSBob3N0IHJvdXRlOiBpdCBjYW4gYmUgRFNUIHdp dGhvdXQKPj4+IG5ldG1hc2sgb3IgRFNUIHdpdGggLzMyKC8xMjgpIG5ldG1hc2suIEFsc28sIFJU Rl9IT1NUIGhhcyB0byBiZSBzZXQgY29ycmVzcG9uZGluZ2x5Lgo+Pj4gQ3VycmVudGx5LCB0aGVz ZSAyIG9wdGlvbnMgY3JlYXRlIDIgRElGRkVSRU5UIHJvdXRlcyBpbiB0aGUga2VybmVsLgo+Pj4g KiBubyBzb2NrYWRkciBsZW5ndGgvY29udGVudCBjaGVja2luZyBmb3IgdGhlICJzZWNvbmRhcnki IGZpZWxkcyBleGlzdHM6IG5vdGhpbmcKPj4+IHN0b3BzIHJ0c29jayBhcHBsaWNhdGlvbiB0byBz ZW5kIHNvY2thZGRyX2luIHdpdGggbGVuZ3RoIG9mIDI1IChpbnN0ZWFkIG9mIDE2KS4KPj4+IEtl cm5lbCB3aWxsIGFjY2VwdCBpdCwgaW5zdGFsbCB0byBSSUIgYXMgaXMgYW5kIHByb3BhZ2F0ZSB0 byBhbGwgcnRzb2NrIGNvbnN1bWVycywKPj4+IHBvdGVudGlhbGx5IHRyaWdnZXJpbmcgYnVncyBp biB0aGVpciBjb2RlLiBTYW1lIGdvZXMgZm9yIHNpbl9wb3J0LCBzaW5femVybywgZXRjLgo+Pj4K Pj4+IFRoZSBnb2FsIG9mIHRoaXMgY2hhbmdlIGlzIHRvIG1ha2UgcnRzb2NrIHZlcmlmeSBhbGwg c29ja2FkZHIgYW5kIHByZWZpeCBjb25zaXN0ZW5jeS4KPj4+IFNhaWQgZGlmZmVyZW50bHksIGBy aWJfYWN0aW9uKClgIG9yIGludGVybmFscyBzaG91bGQgTk9UIHJlcXVpcmUgdG8gY2hhbmdlIGFu eSBvZiB0aGUKPj4+IHNvY2thZGRycyBzdXBwbGllZCBieSBgcnRfYWRkcmluZm9gIHN0cnVjdHVy ZSBkdWUgdG8gaW5jb3JyZWN0bmVzcy4KPj4+Cj4+PiBUbyBiZSBtb3JlIHNwZWNpZmljLCB0aGlz IGNoYW5nZSBpbXBsZW1lbnRzIHRoZSBmb2xsb3dpbmc6Cj4+PiAqIHNvY2thZGRyIGNsZWFudXAv dmFsaWRhdGlvbiBjaGVjayBpcyBhZGRlZCBpbW1lZGlhdGVseSBhZnRlciBnZXR0aW5nIHNvY2th ZGRycyBmcm9tIHJ0bS4KPj4+ICogUGVyLWZhbWlseSBkc3QvbmV0bWFzayBjaGVja3MgY2xlYXJz IGhvc3QgYml0cyBpbiBkc3QgYW5kIHplcm9zIGFsbCBkc3QvbmV0bWFzayAic2Vjb25kYXJ5IiBm aWVsZHMuCj4+PiAqIFRoZSBzYW1lIG5ldG1hc2sgY2hlY2tpbmcgY29kZSBjb252ZXJ0cyAvMzIo LzEyOCkgbmV0bWFza3MgdG8gImhvc3QiIHJvdXRlIGNhc2UKPj4+IChOVUxMIG5ldG1hc2ssIFJU Rl9IT1NUKSwgcmVtb3ZpbmcgdGhlIGR1YWxpc20uCj4+PiAqIEluc3RlYWQgb2YgYWxsb3dpbmcg QU5ZICJrbm93biIgc29ja2FkZHIgZmFtaWxpZXMgKDA8Li48QUZfTUFYKSwgYWxsb3cgb25seSBh Y3R1YWxseQo+Pj4gc3VwcG9ydGVkIG9uZXMgKGluZXQsIGluZXQ2LCBsaW5rKS4KPj4+ICogQXV0 b21hdGljYWxseSBjb252ZXJ0IGBzb2NrYWRkcl9zZGxgIChBRl9MSU5LKSBnYXRld2F5cyB0bwo+ Pj4gYHNvY2thZGRyX3NkbF9zaG9ydGAuCj4+Pgo+Pj4gUmVwb3J0ZWQgYnk6IEd1eSBZdXIgPGd1 eXl1ciBhdCBnbWFpbC5jb20+Cj4+PiBSZXZpZXdlZCBCeTogZG9ubmVyCj4+PiBEaWZmZXJlbnRp YWwgUmV2aXNpb246IGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9EMjg2NjgKPj4+IE1GQyBh ZnRlcjogMyBkYXlzCj4+PiAtLS0KPj4+IHN5cy9uZXQvcnRzb2NrLmMgfCAyMDEgKysrKysrKysr KysrKysrKysrKysrKysrKysrKysrKysrLQo+Pj4gdGVzdHMvc3lzL25ldC9yb3V0aW5nL3J0c29j a19jb21tb24uaCB8IDQgLQo+Pj4gMiBmaWxlcyBjaGFuZ2VkLCAxOTUgaW5zZXJ0aW9ucygrKSwg MTAgZGVsZXRpb25zKC0pCj4+PiArc3RhdGljIGludAo+Pj4gK2NsZWFudXBfeGFkZHJzX2luZXQo c3RydWN0IHJ0X2FkZHJpbmZvICppbmZvKQo+Pj4gK3sKPj4+ICsgc3RydWN0IHNvY2thZGRyX2lu ICpkc3Rfc2EsICptYXNrX3NhOwo+Pj4gKwo+Pj4gKyAvKiBDaGVjayAmIGZpeHVwIGRzdC9uZXRt YXNrIGNvbWJpbmF0aW9uIGZpcnN0ICovCj4+PiArIGRzdF9zYSA9IChzdHJ1Y3Qgc29ja2FkZHJf aW4gKilpbmZvLT5ydGlfaW5mb1tSVEFYX0RTVF07Cj4+PiArIG1hc2tfc2EgPSAoc3RydWN0IHNv Y2thZGRyX2luICopaW5mby0+cnRpX2luZm9bUlRBWF9ORVRNQVNLXTsKPj4+ICsKPj4+ICsgc3Ry dWN0IGluX2FkZHIgbWFzayA9IHsKPj4+ICsgLnNfYWRkciA9IG1hc2tfc2EgPyBtYXNrX3NhLT5z aW5fYWRkci5zX2FkZHIgOiBJTkFERFJfQlJPQURDQVNULAo+Pj4gKyB9Owo+Pj4gKyBzdHJ1Y3Qg aW5fYWRkciBkc3QgPSB7Cj4+PiArIC5zX2FkZHIgPSBodG9ubChudG9obChkc3Rfc2EtPnNpbl9h ZGRyLnNfYWRkcikgJiBudG9obChtYXNrLnNfYWRkcikpCj4+PiArIH07Cj4+PiArCj4+Cj4+IFRo aXMgYnJlYWtzIHRoaW5ncyBsaWtlIGBhcnAgLWQgMTAuMC4yLjFgLiBJdCBhbHdheXMgbWFza3Mg b2ZmIHRoZSBuZXR3b3JrIGFkZHJlc3MsIHdoaWNoIGlzIHRoZSByaWdodCB0aGluZyB0byBkbyBp biB0aGUgcm91dGluZyB0YWJsZSwgYnV0IG5vdCBpbiB0aGUgYXJwIHRhYmxlLgpUaGFua3MgZm9y IGNhdGNoaW5nIGl0IQpJJ3ZlIHJhaXNlZCBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvRDI4 ODA0IHRvIGZpeCBpdC4KKEFsc286IHllcywgdGhpcyBzaG91bGQgYmUgY292ZXJlZCBieSB0ZXN0 cykuCgo+Pgo+PiBJ4oCZdmUgd29ya2VkIGFyb3VuZCBpdCBmb3Igbm93IHdpdGggdGhpcyBoYWNr Ogo+Pgo+PiBkaWZmIC0tZ2l0IGEvc3lzL25ldC9ydHNvY2suYyBiL3N5cy9uZXQvcnRzb2NrLmMK Pj4gaW5kZXggM2MxZmVhNDk3YWY2Li41MzMwNzZkYjk5YTUgMTAwNjQ0Cj4+IC0tLSBhL3N5cy9u ZXQvcnRzb2NrLmMKPj4gKysrIGIvc3lzL25ldC9ydHNvY2suYwo+PiBAQCAtNjM4LDkgKzYzOCwx MiBAQCBmaWxsX2FkZHJpbmZvKHN0cnVjdCBydF9tc2doZHIgKnJ0bSwgaW50IGxlbiwgdV9pbnQg ZmlibnVtLCBzdHJ1Y3QgcnRfYWRkcmluZm8gKgo+PiByZXR1cm4gKEVJTlZBTCk7Cj4+Cj4+IGlu Zm8tPnJ0aV9mbGFncyA9IHJ0bS0+cnRtX2ZsYWdzOwo+PiAtIGVycm9yID0gY2xlYW51cF94YWRk cnMoaW5mbyk7Cj4+IC0gaWYgKGVycm9yICE9IDApCj4+IC0gcmV0dXJuIChlcnJvcik7Cj4+ICsg LyogWFhYIEhBQ0sgKi8KPj4gKyBpZiAoISAocnRtLT5ydG1fZmxhZ3MgJiBSVEZfTExEQVRBKSkg ewo+PiArIGVycm9yID0gY2xlYW51cF94YWRkcnMoaW5mbyk7Cj4+ICsgaWYgKGVycm9yICE9IDAp Cj4+ICsgcmV0dXJuIChlcnJvcik7Cj4+ICsgfQo+PiBzYWYgPSBpbmZvLT5ydGlfaW5mb1tSVEFY X0RTVF0tPnNhX2ZhbWlseTsKPj4gLyoKPj4gKiBWZXJpZnkgdGhhdCB0aGUgY2FsbGVyIGhhcyB0 aGUgYXBwcm9wcmlhdGUgcHJpdmlsZWdlOyBSVE1fR0VUCj4+Cj4+IEJ1dCBJ4oCZbSBub3QgdG90 YWxseSBoYXBweSB3aXRoIHRoaXMsIG9idmlvdXNseS4KPgo+IFRoaXMgbWF5IGJlIGEgYml0IG1v cmUgcmVhc29uYWJsZToKPgo+IGRpZmYgLS1naXQgYS9zeXMvbmV0L3J0c29jay5jIGIvc3lzL25l dC9ydHNvY2suYyBpbmRleCAzYzFmZWE0OTdhZjYuLjUxNDdiOTJlOTVkNSAxMDA2NDQgLS0tIGEv c3lzL25ldC9ydHNvY2suYyArKysgYi9zeXMvbmV0L3J0c29jay5jIEBAIC0xMzkzLDYgKzEzOTMs MTAgQEAgY2xlYW51cF94YWRkcnNfaW5ldChzdHJ1Y3QgcnRfYWRkcmluZm8gKmluZm8pIMKgIMKg IMKgIMKgIMKgIMKgIMKgIMKgLnNfYWRkciA9IGh0b25sKG50b2hsKGRzdF9zYS0+c2luX2FkZHIu c19hZGRyKSAmIG50b2hsKG1hc2suc19hZGRyKSkgwqAgwqAgwqAgwqB9OyArIMKgIMKgIMKgIC8q IEtlZXAgdGhlIGFkZHJlc3MgaWYgd2UncmUgTEwgKi8gKyDCoCDCoCDCoCBpZiAoaW5mby0+cnRp X2ZsYWdzICYgUlRGX0xMREFUQSkgKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBkc3Quc19hZGRyID0g ZHN0X3NhLT5zaW5fYWRkci5zX2FkZHI7ICsgwqAgwqAgwqAgwqBpZiAoZHN0X3NhLT5zaW5fbGVu IDwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcl9pbikpIHsgwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqBw cmludGYoImRzdCBzaW5fbGVuIHRvbyBzbWFsbFxuIik7IMKgIMKgIMKgIMKgIMKgIMKgIMKgIMKg cmV0dXJuIChFSU5WQUwpOyBAQCAtMTQzMSw3ICsxNDM1LDEwIEBAIGNsZWFudXBfeGFkZHJzX2lu ZXQ2KHN0cnVjdCBydF9hZGRyaW5mbyAqaW5mbykgwqAgwqAgwqAgwqBtYXNrX3NhID0gKHN0cnVj dCBzb2NrYWRkcl9pbjYgKilpbmZvLT5ydGlfaW5mb1tSVEFYX05FVE1BU0tdOyDCoCDCoCDCoCDC oG1hc2sgPSBtYXNrX3NhID8gbWFza19zYS0+c2luNl9hZGRyIDogaW42bWFzazEyODsgLSDCoCDC oCDCoCBJTjZfTUFTS19BRERSKCZkc3Rfc2EtPnNpbjZfYWRkciwgJm1hc2spOyArICsgwqAgwqAg wqAgLyogS2VlcCB0aGUgYWRkcmVzcyBpZiB3ZSdyZSBMTCAqLyArIMKgIMKgIMKgIGlmICghIChp bmZvLT5ydGlfZmxhZ3MgJiBSVEZfTExEQVRBKSkgKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCBJTjZf TUFTS19BRERSKCZkc3Rfc2EtPnNpbjZfYWRkciwgJm1hc2spOyDCoCDCoCDCoCDCoGlmIChkc3Rf c2EtPnNpbjZfbGVuIDwgc2l6ZW9mKHN0cnVjdCBzb2NrYWRkcl9pbjYpKSB7IMKgIMKgIMKgIMKg IMKgIMKgIMKgIMKgcHJpbnRmKCJkc3Qgc2luNl9sZW4gdG9vIHNtYWxsXG4iKTsKPgo+IEJlc3Qg cmVnYXJkcywKPiBLcmlzdG9m From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:44:01 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4F26853B0D9; Fri, 19 Feb 2021 20:44: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 4Dj3TF1msTz3G50; Fri, 19 Feb 2021 20:44: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 2F75C12A28; Fri, 19 Feb 2021 20:44: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 11JKi11R058199; Fri, 19 Feb 2021 20:44:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKi1cA058198; Fri, 19 Feb 2021 20:44:01 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:44:01 GMT Message-Id: <202102192044.11JKi1cA058198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: 18f552e647f5 - stable/13 - Use iflib_if_init_locked() during media change instead of iflib_init_locked(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 18f552e647f556dcbbebc627f534d15172e7b6a3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:44:01 -0000 The branch stable/13 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=18f552e647f556dcbbebc627f534d15172e7b6a3 commit 18f552e647f556dcbbebc627f534d15172e7b6a3 Author: Allan Jude AuthorDate: 2021-02-14 18:39:09 +0000 Commit: Allan Jude CommitDate: 2021-02-19 20:39:16 +0000 Use iflib_if_init_locked() during media change instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for media changes. iflib_if_init_locked() calls stop then init, so fixes the problem. PR: 253473 Sponsored by: Juniper Networks, Inc., Klara, Inc. (cherry picked from commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483) --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index cce56d0e7335..a33ddbe5b8ae 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2503,7 +2503,7 @@ iflib_media_change(if_t ifp) CTX_LOCK(ctx); if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0) - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); return (err); } From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:49:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E8D5B53B98E; Fri, 19 Feb 2021 20:49: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 4Dj3bk5Lldz3G1B; Fri, 19 Feb 2021 20:49: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 7F7EB129BD; Fri, 19 Feb 2021 20:49: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 11JKncwS059148; Fri, 19 Feb 2021 20:49:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKncV2059147; Fri, 19 Feb 2021 20:49:38 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:49:38 GMT Message-Id: <202102192049.11JKncV2059147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 05d882b780f5 - main - Microoptimize CTL I/O queues. 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/main X-Git-Reftype: branch X-Git-Commit: 05d882b780f5be2da6f3d3bfef9160aacc4888d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:49:39 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=05d882b780f5be2da6f3d3bfef9160aacc4888d6 commit 05d882b780f5be2da6f3d3bfef9160aacc4888d6 Author: Alexander Motin AuthorDate: 2021-02-19 20:42:57 +0000 Commit: Alexander Motin CommitDate: 2021-02-19 20:49:36 +0000 Microoptimize CTL I/O queues. Switch OOA queue from TAILQ to LIST and change its direction, so that we traverse it forward, not backward. There is only one place where we really need other direction, and it is not critical. Use STAILQ_REMOVE_HEAD() instead of STAILQ_REMOVE() in backends. Replace few impossible conditions with assertions. MFC after: 1 month --- sys/cam/ctl/ctl.c | 133 ++++++++++++++++++++------------------ sys/cam/ctl/ctl_backend_block.c | 19 ++---- sys/cam/ctl/ctl_backend_ramdisk.c | 3 +- sys/cam/ctl/ctl_io.h | 2 +- sys/cam/ctl/ctl_private.h | 2 +- sys/cam/ctl/scsi_ctl.c | 2 +- 6 files changed, 81 insertions(+), 80 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index d7769e270016..464fd8dfc25e 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -2326,12 +2326,12 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) * particular LUN, and stays there until completion. */ #ifdef CTL_TIME_IO - if (TAILQ_EMPTY(&lun->ooa_queue)) + if (LIST_EMPTY(&lun->ooa_queue)) lun->idle_time += getsbinuptime() - lun->last_busy; #endif - TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); + LIST_INSERT_HEAD(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); - bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + bio = (union ctl_io *)LIST_NEXT(&ctsio->io_hdr, ooa_links); switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: ctsio->io_hdr.blocker = bio; @@ -2358,18 +2358,18 @@ ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) } break; case CTL_ACTION_OVERLAP: - TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); + LIST_REMOVE(&ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); ctl_set_overlapped_cmd(ctsio); goto badjuju; case CTL_ACTION_OVERLAP_TAG: - TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); + LIST_REMOVE(&ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); ctl_set_overlapped_tag(ctsio, ctsio->tag_num); goto badjuju; case CTL_ACTION_ERROR: default: - TAILQ_REMOVE(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); + LIST_REMOVE(&ctsio->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); ctl_set_internal_failure(ctsio, /*sks_valid*/ 0, @@ -2393,20 +2393,28 @@ static void ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) { - union ctl_io *io; + struct ctl_io_hdr *ioh; mtx_lock(&lun->lun_lock); - for (io = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); (io != NULL); - (*cur_fill_num)++, io = (union ctl_io *)TAILQ_NEXT(&io->io_hdr, - ooa_links)) { + ioh = LIST_FIRST(&lun->ooa_queue); + if (ioh == NULL) { + mtx_unlock(&lun->lun_lock); + return; + } + while (LIST_NEXT(ioh, ooa_links) != NULL) + ioh = LIST_NEXT(ioh, ooa_links); + for ( ; ioh; ioh = LIST_PREV(ioh, &lun->ooa_queue, ctl_io_hdr, ooa_links)) { + union ctl_io *io = (union ctl_io *)ioh; struct ctl_ooa_entry *entry; /* * If we've got more than we can fit, just count the * remaining entries. */ - if (*cur_fill_num >= ooa_hdr->alloc_num) + if (*cur_fill_num >= ooa_hdr->alloc_num) { + (*cur_fill_num)++; continue; + } entry = &kern_entries[*cur_fill_num]; @@ -2437,6 +2445,7 @@ ctl_ioctl_fill_ooa(struct ctl_lun *lun, uint32_t *cur_fill_num, if (io->io_hdr.flags & CTL_FLAG_STATUS_SENT) entry->cmd_flags |= CTL_OOACMD_FLAG_STATUS_SENT; + (*cur_fill_num)++; } mtx_unlock(&lun->lun_lock); } @@ -4670,7 +4679,7 @@ fail: #ifdef CTL_TIME_IO lun->last_busy = getsbinuptime(); #endif - TAILQ_INIT(&lun->ooa_queue); + LIST_INIT(&lun->ooa_queue); STAILQ_INIT(&lun->error_list); lun->ie_reported = 1; callout_init_mtx(&lun->ie_callout, &lun->lun_lock, 0); @@ -4733,7 +4742,7 @@ ctl_free_lun(struct ctl_lun *lun) struct ctl_lun *nlun; int i; - KASSERT(TAILQ_EMPTY(&lun->ooa_queue), + KASSERT(LIST_EMPTY(&lun->ooa_queue), ("Freeing a LUN %p with outstanding I/O!\n", lun)); mtx_lock(&softc->ctl_lock); @@ -4980,7 +4989,7 @@ ctl_remove_lun(struct ctl_be_lun *be_lun) * If we have something in the OOA queue, we'll free it when the * last I/O completes. */ - if (TAILQ_EMPTY(&lun->ooa_queue)) { + if (LIST_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); ctl_free_lun(lun); } else @@ -5025,7 +5034,7 @@ ctl_config_move_done(union ctl_io *io) CTL_DEBUG_PRINT(("ctl_config_move_done\n")); KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, - ("Config I/O type isn't CTL_IO_SCSI (%d)!", io->io_hdr.io_type)); + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); if ((io->io_hdr.port_status != 0) && ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || @@ -10671,8 +10680,9 @@ ctl_read_toc(struct ctl_scsiio *ctsio) static int ctl_get_lba_len(union ctl_io *io, uint64_t *lba, uint64_t *len) { - if (io->io_hdr.io_type != CTL_IO_SCSI) - return (1); + + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); switch (io->scsiio.cdb[0]) { case COMPARE_AND_WRITE: { @@ -10851,9 +10861,11 @@ ctl_extent_check_unmap(union ctl_io *io, uint64_t lba2, uint64_t len2) uint64_t lba; uint32_t len; + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); + /* If not UNMAP -- go other way. */ - if (io->io_hdr.io_type != CTL_IO_SCSI || - io->scsiio.cdb[0] != UNMAP) + if (io->scsiio.cdb[0] != UNMAP) return (CTL_ACTION_ERROR); /* If UNMAP without data -- block and wait for data. */ @@ -11074,8 +11086,7 @@ ctl_check_ooa(struct ctl_lun *lun, union ctl_io *pending_io, * CTL_ACTION_PASS. */ for (ooa_io = *starting_io; ooa_io != NULL; - ooa_io = (union ctl_io *)TAILQ_PREV(&ooa_io->io_hdr, ctl_ooaq, - ooa_links)){ + ooa_io = (union ctl_io *)LIST_NEXT(&ooa_io->io_hdr, ooa_links)) { action = ctl_check_for_blockage(lun, pending_io, ooa_io); if (action != CTL_ACTION_PASS) { *starting_io = ooa_io; @@ -11110,8 +11121,7 @@ ctl_try_unblock_io(struct ctl_lun *lun, union ctl_io *io, bool skip) obio = bio = io->io_hdr.blocker; if (skip) - bio = (union ctl_io *)TAILQ_PREV(&bio->io_hdr, ctl_ooaq, - ooa_links); + bio = (union ctl_io *)LIST_NEXT(&bio->io_hdr, ooa_links); action = ctl_check_ooa(lun, io, &bio); if (action == CTL_ACTION_BLOCK) { /* Still blocked, but may be by different I/O now. */ @@ -11177,7 +11187,7 @@ error: if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) && (softc->ha_mode != CTL_HA_MODE_XFER)) { ctl_try_unblock_others(lun, io, TRUE); - TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); + LIST_REMOVE(&io->io_hdr, ooa_links); ctl_copy_sense_data_back(io, &msg_info); msg_info.hdr.original_sc = io->io_hdr.remote_io; @@ -11380,7 +11390,7 @@ ctl_failover_lun(union ctl_io *rio) } if (softc->ha_mode == CTL_HA_MODE_XFER) { - TAILQ_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { + LIST_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { /* We are master */ if (io->flags & CTL_FLAG_FROM_OTHER_SC) { if (io->flags & CTL_FLAG_IO_ACTIVE) { @@ -11409,7 +11419,7 @@ ctl_failover_lun(union ctl_io *rio) } } } else { /* SERIALIZE modes */ - TAILQ_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { + LIST_FOREACH_SAFE(io, &lun->ooa_queue, ooa_links, next_io) { /* We are master */ if (io->flags & CTL_FLAG_FROM_OTHER_SC) { if (io->blocker != NULL) { @@ -11419,7 +11429,7 @@ ctl_failover_lun(union ctl_io *rio) } ctl_try_unblock_others(lun, (union ctl_io *)io, TRUE); - TAILQ_REMOVE(&lun->ooa_queue, io, ooa_links); + LIST_REMOVE(io, ooa_links); ctl_free_io((union ctl_io *)io); } else /* We are slave */ @@ -11470,10 +11480,10 @@ ctl_scsiio_precheck(struct ctl_scsiio *ctsio) * and stays there until completion. */ #ifdef CTL_TIME_IO - if (TAILQ_EMPTY(&lun->ooa_queue)) + if (LIST_EMPTY(&lun->ooa_queue)) lun->idle_time += getsbinuptime() - lun->last_busy; #endif - TAILQ_INSERT_TAIL(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); + LIST_INSERT_HEAD(&lun->ooa_queue, &ctsio->io_hdr, ooa_links); } /* Get command entry and return error if it is unsuppotyed. */ @@ -11617,7 +11627,7 @@ ctl_scsiio_precheck(struct ctl_scsiio *ctsio) return; } - bio = (union ctl_io *)TAILQ_PREV(&ctsio->io_hdr, ctl_ooaq, ooa_links); + bio = (union ctl_io *)LIST_NEXT(&ctsio->io_hdr, ooa_links); switch (ctl_check_ooa(lun, (union ctl_io *)ctsio, &bio)) { case CTL_ACTION_BLOCK: ctsio->io_hdr.blocker = bio; @@ -11825,15 +11835,14 @@ ctl_target_reset(union ctl_io *io) static void ctl_do_lun_reset(struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua_type) { - union ctl_io *xio; + struct ctl_io_hdr *xioh; int i; mtx_lock(&lun->lun_lock); /* Abort tasks. */ - for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; - xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { - xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; - ctl_try_unblock_io(lun, xio, FALSE); + LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) { + xioh->flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; + ctl_try_unblock_io(lun, (union ctl_io *)xioh, FALSE); } /* Clear CA. */ for (i = 0; i < ctl_max_ports; i++) { @@ -11897,7 +11906,7 @@ static void ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) { - union ctl_io *xio; + struct ctl_io_hdr *xioh; mtx_assert(&lun->lun_lock, MA_OWNED); @@ -11908,20 +11917,20 @@ ctl_abort_tasks_lun(struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, * untagged command to abort, simply abort the first untagged command * we come to. We only allow one untagged command at a time of course. */ - for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; - xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { + LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) { + union ctl_io *xio = (union ctl_io *)xioh; if ((targ_port == UINT32_MAX || - targ_port == xio->io_hdr.nexus.targ_port) && + targ_port == xioh->nexus.targ_port) && (init_id == UINT32_MAX || - init_id == xio->io_hdr.nexus.initid)) { - if (targ_port != xio->io_hdr.nexus.targ_port || - init_id != xio->io_hdr.nexus.initid) - xio->io_hdr.flags |= CTL_FLAG_ABORT_STATUS; - xio->io_hdr.flags |= CTL_FLAG_ABORT; + init_id == xioh->nexus.initid)) { + if (targ_port != xioh->nexus.targ_port || + init_id != xioh->nexus.initid) + xioh->flags |= CTL_FLAG_ABORT_STATUS; + xioh->flags |= CTL_FLAG_ABORT; if (!other_sc && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; - msg_info.hdr.nexus = xio->io_hdr.nexus; + msg_info.hdr.nexus = xioh->nexus; msg_info.task.task_action = CTL_TASK_ABORT_TASK; msg_info.task.tag_num = xio->scsiio.tag_num; msg_info.task.tag_type = xio->scsiio.tag_type; @@ -12034,7 +12043,7 @@ static int ctl_abort_task(union ctl_io *io) { struct ctl_softc *softc = CTL_SOFTC(io); - union ctl_io *xio; + struct ctl_io_hdr *xioh; struct ctl_lun *lun; uint32_t targ_lun; @@ -12059,11 +12068,11 @@ ctl_abort_task(union ctl_io *io) * untagged command to abort, simply abort the first untagged command * we come to. We only allow one untagged command at a time of course. */ - for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; - xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { - if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) - || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) - || (xio->io_hdr.flags & CTL_FLAG_ABORT)) + LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) { + union ctl_io *xio = (union ctl_io *)xioh; + if ((xioh->nexus.targ_port != io->io_hdr.nexus.targ_port) + || (xioh->nexus.initid != io->io_hdr.nexus.initid) + || (xioh->flags & CTL_FLAG_ABORT)) continue; /* @@ -12088,7 +12097,7 @@ ctl_abort_task(union ctl_io *io) */ if (xio->scsiio.tag_num == io->taskio.tag_num) { #endif - xio->io_hdr.flags |= CTL_FLAG_ABORT; + xioh->flags |= CTL_FLAG_ABORT; if ((io->io_hdr.flags & CTL_FLAG_FROM_OTHER_SC) == 0 && !(lun->flags & CTL_LUN_PRIMARY_SC)) { union ctl_ha_msg msg_info; @@ -12115,7 +12124,7 @@ static int ctl_query_task(union ctl_io *io, int task_set) { struct ctl_softc *softc = CTL_SOFTC(io); - union ctl_io *xio; + struct ctl_io_hdr *xioh; struct ctl_lun *lun; int found = 0; uint32_t targ_lun; @@ -12130,11 +12139,11 @@ ctl_query_task(union ctl_io *io, int task_set) } mtx_lock(&lun->lun_lock); mtx_unlock(&softc->ctl_lock); - for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; - xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { - if ((xio->io_hdr.nexus.targ_port != io->io_hdr.nexus.targ_port) - || (xio->io_hdr.nexus.initid != io->io_hdr.nexus.initid) - || (xio->io_hdr.flags & CTL_FLAG_ABORT)) + LIST_FOREACH(xioh, &lun->ooa_queue, ooa_links) { + union ctl_io *xio = (union ctl_io *)xioh; + if ((xioh->nexus.targ_port != io->io_hdr.nexus.targ_port) + || (xioh->nexus.initid != io->io_hdr.nexus.initid) + || (xioh->flags & CTL_FLAG_ABORT)) continue; if (task_set || xio->scsiio.tag_num == io->taskio.tag_num) { @@ -12279,7 +12288,7 @@ ctl_handle_isc(union ctl_io *io) } mtx_lock(&lun->lun_lock); ctl_try_unblock_others(lun, io, TRUE); - TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); + LIST_REMOVE(&io->io_hdr, ooa_links); mtx_unlock(&lun->lun_lock); ctl_free_io(io); break; @@ -13111,9 +13120,9 @@ ctl_process_done(union ctl_io *io) /* * Remove this from the OOA queue. */ - TAILQ_REMOVE(&lun->ooa_queue, &io->io_hdr, ooa_links); + LIST_REMOVE(&io->io_hdr, ooa_links); #ifdef CTL_TIME_IO - if (TAILQ_EMPTY(&lun->ooa_queue)) + if (LIST_EMPTY(&lun->ooa_queue)) lun->last_busy = getsbinuptime(); #endif @@ -13122,7 +13131,7 @@ ctl_process_done(union ctl_io *io) * left on its OOA queue. */ if ((lun->flags & CTL_LUN_INVALID) - && TAILQ_EMPTY(&lun->ooa_queue)) { + && LIST_EMPTY(&lun->ooa_queue)) { mtx_unlock(&lun->lun_lock); ctl_free_lun(lun); } else diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index cd4fab766844..5262c041bf62 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -1698,8 +1698,7 @@ ctl_be_block_worker(void *context, int pending) io = (union ctl_io *)STAILQ_FIRST(&be_lun->datamove_queue); if (io != NULL) { DPRINTF("datamove queue\n"); - STAILQ_REMOVE(&be_lun->datamove_queue, &io->io_hdr, - ctl_io_hdr, links); + STAILQ_REMOVE_HEAD(&be_lun->datamove_queue, links); mtx_unlock(&be_lun->queue_lock); beio = (struct ctl_be_block_io *)PRIV(io)->ptr; if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { @@ -1713,8 +1712,7 @@ ctl_be_block_worker(void *context, int pending) io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_write_queue); if (io != NULL) { DPRINTF("config write queue\n"); - STAILQ_REMOVE(&be_lun->config_write_queue, &io->io_hdr, - ctl_io_hdr, links); + STAILQ_REMOVE_HEAD(&be_lun->config_write_queue, links); mtx_unlock(&be_lun->queue_lock); if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); @@ -1727,8 +1725,7 @@ ctl_be_block_worker(void *context, int pending) io = (union ctl_io *)STAILQ_FIRST(&be_lun->config_read_queue); if (io != NULL) { DPRINTF("config read queue\n"); - STAILQ_REMOVE(&be_lun->config_read_queue, &io->io_hdr, - ctl_io_hdr, links); + STAILQ_REMOVE_HEAD(&be_lun->config_read_queue, links); mtx_unlock(&be_lun->queue_lock); if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); @@ -1741,8 +1738,7 @@ ctl_be_block_worker(void *context, int pending) io = (union ctl_io *)STAILQ_FIRST(&be_lun->input_queue); if (io != NULL) { DPRINTF("input queue\n"); - STAILQ_REMOVE(&be_lun->input_queue, &io->io_hdr, - ctl_io_hdr, links); + STAILQ_REMOVE_HEAD(&be_lun->input_queue, links); mtx_unlock(&be_lun->queue_lock); if (cbe_lun->flags & CTL_LUN_FLAG_NO_MEDIA) { ctl_set_busy(&io->scsiio); @@ -1776,11 +1772,8 @@ ctl_be_block_submit(union ctl_io *io) be_lun = (struct ctl_be_block_lun *)CTL_BACKEND_LUN(io); - /* - * Make sure we only get SCSI I/O. - */ - KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("Non-SCSI I/O (type " - "%#x) encountered", io->io_hdr.io_type)); + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); PRIV(io)->len = 0; diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c index 1f1ca00ff562..2595aa0be00e 100644 --- a/sys/cam/ctl/ctl_backend_ramdisk.c +++ b/sys/cam/ctl/ctl_backend_ramdisk.c @@ -569,8 +569,7 @@ ctl_backend_ramdisk_worker(void *context, int pending) for (;;) { io = (union ctl_io *)STAILQ_FIRST(&be_lun->cont_queue); if (io != NULL) { - STAILQ_REMOVE(&be_lun->cont_queue, &io->io_hdr, - ctl_io_hdr, links); + STAILQ_REMOVE_HEAD(&be_lun->cont_queue, links); mtx_unlock(&be_lun->queue_lock); if (ARGS(io)->flags & CTL_LLF_COMPARE) ctl_backend_ramdisk_compare(io); diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h index 2ad499f7f147..52ba98f3a9bd 100644 --- a/sys/cam/ctl/ctl_io.h +++ b/sys/cam/ctl/ctl_io.h @@ -242,7 +242,7 @@ struct ctl_io_hdr { union ctl_priv ctl_private[CTL_NUM_PRIV];/* CTL private area */ TAILQ_HEAD(, ctl_io_hdr) blocked_queue; /* I/Os blocked by this one */ STAILQ_ENTRY(ctl_io_hdr) links; /* linked list pointer */ - TAILQ_ENTRY(ctl_io_hdr) ooa_links; /* ooa_queue links */ + LIST_ENTRY(ctl_io_hdr) ooa_links; /* ooa_queue links */ TAILQ_ENTRY(ctl_io_hdr) blocked_links; /* blocked_queue links */ }; diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h index cf67deb13ef7..8940babd4904 100644 --- a/sys/cam/ctl/ctl_private.h +++ b/sys/cam/ctl/ctl_private.h @@ -391,7 +391,7 @@ struct ctl_lun { sbintime_t idle_time; sbintime_t last_busy; #endif - TAILQ_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; + LIST_HEAD(ctl_ooaq, ctl_io_hdr) ooa_queue; STAILQ_ENTRY(ctl_lun) links; struct scsi_sense_data **pending_sense; ctl_ua_type **pending_ua; diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 34c3ce7ad923..646b3fe07053 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1910,7 +1910,7 @@ ctlfe_datamove(union ctl_io *io) struct ctlfe_lun_softc *softc; KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, - ("Unexpected io_type (%d) in ctlfe_datamove", io->io_hdr.io_type)); + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); io->scsiio.ext_data_filled = 0; ccb = PRIV_CCB(io); From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:53:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1D55053BFF9; Fri, 19 Feb 2021 20:53: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 4Dj3hJ0KLmz3GgL; Fri, 19 Feb 2021 20:53: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 F1F01126E5; Fri, 19 Feb 2021 20:53: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 11JKrZe6071804; Fri, 19 Feb 2021 20:53:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKrZ4w071803; Fri, 19 Feb 2021 20:53:35 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:53:35 GMT Message-Id: <202102192053.11JKrZ4w071803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2ccf971ace0b - main - iflib: Cast the result of iflib_netmap_txq_init() to void. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ccf971ace0bf23a9b27ec886a7f013c47661052 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:53:36 -0000 The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2ccf971ace0bf23a9b27ec886a7f013c47661052 commit 2ccf971ace0bf23a9b27ec886a7f013c47661052 Author: John Baldwin AuthorDate: 2021-02-19 20:52:05 +0000 Commit: John Baldwin CommitDate: 2021-02-19 20:52:53 +0000 iflib: Cast the result of iflib_netmap_txq_init() to void. This fixes a warning from GCC for kernels without netmap since the return value is never used. Reviewed by: vmaffione, erj Differential Revision: https://reviews.freebsd.org/D28598 --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index a33ddbe5b8ae..6312499feac8 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2454,7 +2454,7 @@ iflib_init_locked(if_ctx_t ctx) callout_stop(&txq->ift_netmap_timer); #endif /* DEV_NETMAP */ CALLOUT_UNLOCK(txq); - iflib_netmap_txq_init(ctx, txq); + (void)iflib_netmap_txq_init(ctx, txq); } /* From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:56:11 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6C9C753CF25; Fri, 19 Feb 2021 20:56: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 4Dj3lH2hWlz3HR5; Fri, 19 Feb 2021 20:56: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 4F47A12857; Fri, 19 Feb 2021 20:56: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 11JKuBrf072357; Fri, 19 Feb 2021 20:56:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKuBlj072356; Fri, 19 Feb 2021 20:56:11 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:56:11 GMT Message-Id: <202102192056.11JKuBlj072356@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alfredo Dal'Ava Junior" Subject: git: a78bb831a17f - main - fbio: Use appropriate types for the physical and virtual framebuffer address MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alfredo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a78bb831a17f9ba4b3d833ae6a9c2ce4f5cb5d1e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:56:11 -0000 The branch main has been updated by alfredo: URL: https://cgit.FreeBSD.org/src/commit/?id=a78bb831a17f9ba4b3d833ae6a9c2ce4f5cb5d1e commit a78bb831a17f9ba4b3d833ae6a9c2ce4f5cb5d1e Author: Alfredo Dal'Ava Junior AuthorDate: 2021-02-19 23:50:50 +0000 Commit: Alfredo Dal'Ava Junior CommitDate: 2021-02-19 23:55:54 +0000 fbio: Use appropriate types for the physical and virtual framebuffer address Use appropriate types for the physical and virtual framebuffer address. Fixes framebuffers mapped above 4G physical on 32-bit systems that support physical address extensions like i386 and Book-E powerpc. Patch developed by bdragon Reviewed by: bdragon, luporl Relnotes: yes Differential Revision: https://reviews.freebsd.org/D28604 --- sys/sys/fbio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h index 4cc0cc6debba..3b47b11345cf 100644 --- a/sys/sys/fbio.h +++ b/sys/sys/fbio.h @@ -136,8 +136,8 @@ struct fb_info { fb_leave_t *leave; fb_setblankmode_t *setblankmode; - uintptr_t fb_pbase; /* For FB mmap. */ - uintptr_t fb_vbase; /* if NULL, use fb_write/fb_read. */ + vm_paddr_t fb_pbase; /* For FB mmap. */ + vm_offset_t fb_vbase; /* if NULL, use fb_write/fb_read. */ void *fb_priv; /* First argument for read/write. */ const char *fb_name; uint32_t fb_flags; From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:56:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 10E4453D699; Fri, 19 Feb 2021 20:56: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 4Dj3lf73Vjz3HTf; Fri, 19 Feb 2021 20:56: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 E3D3D12D11; Fri, 19 Feb 2021 20:56: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 11JKuUVR072509; Fri, 19 Feb 2021 20:56:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKuUMI072508; Fri, 19 Feb 2021 20:56:30 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:56:30 GMT Message-Id: <202102192056.11JKuUMI072508@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 889cf2bf73a0 - releng/13.0 - ffs_vnops.c: Move opt_*.h includes to the top. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 889cf2bf73a0cb52d0ff06fe9f307d13a8f87d44 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:56:31 -0000 The branch releng/13.0 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=889cf2bf73a0cb52d0ff06fe9f307d13a8f87d44 commit 889cf2bf73a0cb52d0ff06fe9f307d13a8f87d44 Author: Konstantin Belousov AuthorDate: 2021-01-28 18:30:35 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-19 20:56:13 +0000 ffs_vnops.c: Move opt_*.h includes to the top. Approved by: re (gjb) (cherry picked from commit 0281f88e5dbc8d6f819bf3f22dd11239ff5374ea) --- sys/ufs/ffs/ffs_vnops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 6ca98a84869d..68985d8715f3 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -66,6 +66,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_directio.h" +#include "opt_ffs.h" + #include #include #include @@ -99,8 +102,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_directio.h" -#include "opt_ffs.h" #define ALIGNED_TO(ptr, s) \ (((uintptr_t)(ptr) & (_Alignof(s) - 1)) == 0) From owner-dev-commits-src-all@freebsd.org Fri Feb 19 20:56:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 AC9D053D461; Fri, 19 Feb 2021 20:56: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 4Dj3m54V0pz3HhF; Fri, 19 Feb 2021 20:56: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 8D2FB12B74; Fri, 19 Feb 2021 20:56: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 11JKurxv072669; Fri, 19 Feb 2021 20:56:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JKurEr072668; Fri, 19 Feb 2021 20:56:53 GMT (envelope-from git) Date: Fri, 19 Feb 2021 20:56:53 GMT Message-Id: <202102192056.11JKurEr072668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 79bee465de34 - stable/12 - Free microcode memory later. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 79bee465de342b82fa300293d04f155f2d6a6183 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 20:56:53 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=79bee465de342b82fa300293d04f155f2d6a6183 commit 79bee465de342b82fa300293d04f155f2d6a6183 Author: Konstantin Belousov AuthorDate: 2019-05-17 17:11:01 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-19 12:47:36 +0000 Free microcode memory later. (cherry picked from commit 8f7f38457f940798c149ae40b73e0d20672812de) --- sys/x86/x86/ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/ucode.c b/sys/x86/x86/ucode.c index 93f82e37eb66..d8beeed68215 100644 --- a/sys/x86/x86/ucode.c +++ b/sys/x86/x86/ucode.c @@ -260,7 +260,7 @@ restart: goto restart; } } -SYSINIT(ucode_release, SI_SUB_KMEM + 1, SI_ORDER_ANY, ucode_release, NULL); +SYSINIT(ucode_release, SI_SUB_SMP + 1, SI_ORDER_ANY, ucode_release, NULL); void ucode_load_ap(int cpu) From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:06:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A40953E4FA; Fri, 19 Feb 2021 21:06:49 +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 4Dj3zX6vl5z3JZk; Fri, 19 Feb 2021 21:06:48 +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 DFD1912F18; Fri, 19 Feb 2021 21:06:48 +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 11JL6mVg086489; Fri, 19 Feb 2021 21:06:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JL6mlF086488; Fri, 19 Feb 2021 21:06:48 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:06:48 GMT Message-Id: <202102192106.11JL6mlF086488@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Allan Jude Subject: git: 57d2eb8896c2 - stable/12 - Use iflib_if_init_locked() during media change instead of iflib_init_locked(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 57d2eb8896c2dd9ece7d99415893e2e8a8bfce82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:06:49 -0000 The branch stable/12 has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=57d2eb8896c2dd9ece7d99415893e2e8a8bfce82 commit 57d2eb8896c2dd9ece7d99415893e2e8a8bfce82 Author: Allan Jude AuthorDate: 2021-02-14 18:39:09 +0000 Commit: Allan Jude CommitDate: 2021-02-19 21:06:15 +0000 Use iflib_if_init_locked() during media change instead of iflib_init_locked(). iflib_init_locked() assumes that iflib_stop() has been called, however, it is not called for media changes. iflib_if_init_locked() calls stop then init, so fixes the problem. PR: 253473 Sponsored by: Juniper Networks, Inc., Klara, Inc. (cherry picked from commit 922cf8ac43adc9983f9a9e05cfd838306c1ef483) --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index ae203d871a5c..f99b076cf0d3 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2577,7 +2577,7 @@ iflib_media_change(if_t ifp) CTX_LOCK(ctx); if ((err = IFDI_MEDIA_CHANGE(ctx)) == 0) - iflib_init_locked(ctx); + iflib_if_init_locked(ctx); CTX_UNLOCK(ctx); return (err); } From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:17:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7034553F60D; Fri, 19 Feb 2021 21:17: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 4Dj4D22p2Fz3KLs; Fri, 19 Feb 2021 21:17: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 5291012F64; Fri, 19 Feb 2021 21:17: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 11JLHcNj000467; Fri, 19 Feb 2021 21:17:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JLHcxg000466; Fri, 19 Feb 2021 21:17:38 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:17:38 GMT Message-Id: <202102192117.11JLHcxg000466@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f9e1cd6c9920 - main - Fix arp/ndp deletion broken by 2fe5a79425c7. 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/main X-Git-Reftype: branch X-Git-Commit: f9e1cd6c99200846b324a8b65f7f31ded74013bd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:17:38 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f9e1cd6c99200846b324a8b65f7f31ded74013bd commit f9e1cd6c99200846b324a8b65f7f31ded74013bd Author: Alexander V. Chernikov AuthorDate: 2021-02-19 21:09:17 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-19 21:17:17 +0000 Fix arp/ndp deletion broken by 2fe5a79425c7. Changes in the 2fe5a79425c7 moved dst sockaddr masking from the routing control plane to the rtsock code. It broke arp/ndp deletion. It turns out, arp/ndp perform RTM_GET request first to get an interface index necessary for the deletion. Then they simply stamp the reply with RTF_LLDATA and set the command to RTM_DELETE. As a result, kernel receives request with non-empty RTA_NETMASK and clears RTA_DST host bits before passing the message to the lla code. De facto, the only needed bits are RTA_DST, RTA_GATEWAY and the subset of rtm_flags. With that in mind, fix the interace by clearing RTA_NETMASK for every messages with RTF_LLDATA. While here, cleanup arp/ndp code a bit. MFC after: 1 day Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D28804 --- sys/net/rtsock.c | 31 +++++++++++++++++++++---------- usr.sbin/arp/arp.c | 9 --------- usr.sbin/ndp/ndp.c | 10 ---------- 3 files changed, 21 insertions(+), 29 deletions(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3c1fea497af6..221661585bbf 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1376,6 +1376,14 @@ cleanup_xaddrs_gateway(struct rt_addrinfo *info) return (0); } +static void +remove_netmask(struct rt_addrinfo *info) +{ + info->rti_info[RTAX_NETMASK] = NULL; + info->rti_flags |= RTF_HOST; + info->rti_addrs &= ~RTA_NETMASK; +} + #ifdef INET static int cleanup_xaddrs_inet(struct rt_addrinfo *info) @@ -1405,11 +1413,8 @@ cleanup_xaddrs_inet(struct rt_addrinfo *info) if (mask.s_addr != INADDR_BROADCAST) fill_sockaddr_inet(mask_sa, mask); - else { - info->rti_info[RTAX_NETMASK] = NULL; - info->rti_flags |= RTF_HOST; - info->rti_addrs &= ~RTA_NETMASK; - } + else + remove_netmask(info); /* Check gateway */ if (info->rti_info[RTAX_GATEWAY] != NULL) @@ -1445,11 +1450,8 @@ cleanup_xaddrs_inet6(struct rt_addrinfo *info) if (!IN6_ARE_ADDR_EQUAL(&mask, &in6mask128)) fill_sockaddr_inet6(mask_sa, &mask, 0); - else { - info->rti_info[RTAX_NETMASK] = NULL; - info->rti_flags |= RTF_HOST; - info->rti_addrs &= ~RTA_NETMASK; - } + else + remove_netmask(info); /* Check gateway */ if (info->rti_info[RTAX_GATEWAY] != NULL) @@ -1467,6 +1469,15 @@ cleanup_xaddrs(struct rt_addrinfo *info) if (info->rti_info[RTAX_DST] == NULL) return (EINVAL); + if (info->rti_flags & RTF_LLDATA) { + /* + * arp(8)/ndp(8) sends RTA_NETMASK for the associated + * prefix along with the actual address in RTA_DST. + * Remove netmask to avoid unnecessary address masking. + */ + remove_netmask(info); + } + switch (info->rti_info[RTAX_DST]->sa_family) { #ifdef INET case AF_INET: diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index 07e07f1f2da9..08698c7bc299 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -717,7 +717,6 @@ rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl) static int seq; int rlen; int l; - struct sockaddr_in so_mask, *som = &so_mask; static int s = -1; static pid_t pid; @@ -735,9 +734,6 @@ rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl) xo_err(1, "socket"); pid = getpid(); } - bzero(&so_mask, sizeof(so_mask)); - so_mask.sin_len = 8; - so_mask.sin_addr.s_addr = 0xffffffff; errno = 0; /* @@ -758,10 +754,6 @@ rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl) rtm->rtm_rmx.rmx_expire = expire_time; rtm->rtm_inits = RTV_EXPIRE; rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); - if (doing_proxy) { - rtm->rtm_addrs |= RTA_NETMASK; - rtm->rtm_flags &= ~RTF_HOST; - } /* FALLTHROUGH */ case RTM_GET: rtm->rtm_addrs |= RTA_DST; @@ -776,7 +768,6 @@ rtmsg(int cmd, struct sockaddr_in *dst, struct sockaddr_dl *sdl) NEXTADDR(RTA_DST, dst); NEXTADDR(RTA_GATEWAY, sdl); - NEXTADDR(RTA_NETMASK, som); rtm->rtm_msglen = cp - (char *)&m_rtmsg; doit: diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index aa40e2775a59..ce21e34417c3 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -860,12 +860,6 @@ rtmsg(int cmd) rtm->rtm_inits = RTV_EXPIRE; } rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); -#if 0 /* we don't support ipv6addr/128 type proxying */ - if (rtm->rtm_flags & RTF_ANNOUNCE) { - rtm->rtm_flags &= ~RTF_HOST; - rtm->rtm_addrs |= RTA_NETMASK; - } -#endif /* FALLTHROUGH */ case RTM_GET: rtm->rtm_addrs |= RTA_DST; @@ -873,10 +867,6 @@ rtmsg(int cmd) NEXTADDR(RTA_DST, sin_m); NEXTADDR(RTA_GATEWAY, sdl_m); -#if 0 /* we don't support ipv6addr/128 type proxying */ - memset(&so_mask.sin6_addr, 0xff, sizeof(so_mask.sin6_addr)); - NEXTADDR(RTA_NETMASK, so_mask); -#endif rtm->rtm_msglen = cp - (char *)&m_rtmsg; doit: From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:18:27 2021 Return-Path: Delivered-To: dev-commits-src-all@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 616A853F79E; Fri, 19 Feb 2021 21:18: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 4Dj4Dz2JG8z3Kms; Fri, 19 Feb 2021 21:18: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 41D3F13134; Fri, 19 Feb 2021 21:18: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 11JLIRnv000770; Fri, 19 Feb 2021 21:18:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JLIRnr000769; Fri, 19 Feb 2021 21:18:27 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:18:27 GMT Message-Id: <202102192118.11JLIRnr000769@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: d2b3fadf2db5 - main - Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way 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/main X-Git-Reftype: branch X-Git-Commit: d2b3fadf2db56131376a71b0597876b591a6aee4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:18:27 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d2b3fadf2db56131376a71b0597876b591a6aee4 commit d2b3fadf2db56131376a71b0597876b591a6aee4 Author: Dimitry Andric AuthorDate: 2021-02-19 18:18:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-19 21:18:02 +0000 Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28799 --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:45:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 00788540850; Fri, 19 Feb 2021 21:45:16 +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 4Dj4qv6d05z3MvT; Fri, 19 Feb 2021 21:45: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 D224613823; Fri, 19 Feb 2021 21:45: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 11JLjFPW040154; Fri, 19 Feb 2021 21:45:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JLjFw8040153; Fri, 19 Feb 2021 21:45:15 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:45:15 GMT Message-Id: <202102192145.11JLjFw8040153@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: f7007a7d0525 - stable/12 - MFC jail: Handle a possible race between jail_remove(2) and fork(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f7007a7d05255a6859dea0982b1f0a6d695e8881 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:45:16 -0000 The branch stable/12 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=f7007a7d05255a6859dea0982b1f0a6d695e8881 commit f7007a7d05255a6859dea0982b1f0a6d695e8881 Author: Jamie Gritton AuthorDate: 2021-02-16 19:19:13 +0000 Commit: Jamie Gritton CommitDate: 2021-02-19 21:44:19 +0000 MFC jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Reported by: trasz Approved by: kib (cherry picked from commit cc7b73065302005ebc4a19503188c8d6d5eb923d) --- sys/kern/kern_fork.c | 6 ++++++ sys/kern/kern_jail.c | 18 ++++++++++++++++++ sys/sys/jail.h | 1 + 3 files changed, 25 insertions(+) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index e427164cd150..f8e134c30948 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1138,6 +1138,12 @@ fork_return(struct thread *td, struct trapframe *frame) PROC_UNLOCK(p); } + /* + * If the prison was killed mid-fork, die along with it. + */ + if (td->td_ucred->cr_prison->pr_flags & PR_REMOVE) + exit1(td, 0, SIGKILL); + userret(td, frame); #ifdef KTRACE diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 60cbea3c9849..b4a20b4d29e9 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1768,6 +1768,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; + pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); #ifdef RACCT @@ -2306,6 +2307,12 @@ prison_remove_one(struct prison *pr) struct proc *p; int deuref; + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + pr->pr_flags |= PR_REMOVE; + /* If the prison was persistent, it is not anymore. */ deuref = 0; if (pr->pr_flags & PR_PERSIST) { @@ -2450,6 +2457,17 @@ do_jail_attach(struct thread *td, struct prison *pr) #endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); + + /* + * If the prison was killed while changing credentials, die along + * with it. + */ + if (pr->pr_flags & PR_REMOVE) { + PROC_LOCK(p); + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + return (0); e_unlock: diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 878b97a064a3..8baf784d6b6d 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -213,6 +213,7 @@ struct prison_racct { /* primary jail address. */ /* Internal flag bits */ +#define PR_REMOVE 0x01000000 /* In process of being removed */ #define PR_IP4 0x02000000 /* IPv4 restricted or disabled */ /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:49:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DA399540D5B; Fri, 19 Feb 2021 21:49: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 4Dj4xF5p0Fz3NMW; Fri, 19 Feb 2021 21:49: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 BA0A11365A; Fri, 19 Feb 2021 21:49: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 11JLnrqf040950; Fri, 19 Feb 2021 21:49:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JLnrxm040949; Fri, 19 Feb 2021 21:49:53 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:49:53 GMT Message-Id: <202102192149.11JLnrxm040949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: c837631bd47a - stable/11 - MFC jail: Handle a possible race between jail_remove(2) and fork(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c837631bd47af73d03e3d8907f1e58b88403007c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:49:53 -0000 The branch stable/11 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=c837631bd47af73d03e3d8907f1e58b88403007c commit c837631bd47af73d03e3d8907f1e58b88403007c Author: Jamie Gritton AuthorDate: 2021-02-16 19:19:13 +0000 Commit: Jamie Gritton CommitDate: 2021-02-19 21:49:34 +0000 MFC jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Reported by: trasz Approved by: kib (cherry picked from commit cc7b73065302005ebc4a19503188c8d6d5eb923d) --- sys/kern/kern_fork.c | 6 ++++++ sys/kern/kern_jail.c | 18 ++++++++++++++++++ sys/sys/jail.h | 1 + 3 files changed, 25 insertions(+) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 2aa5f405d3c2..ea35afb42f99 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1144,6 +1144,12 @@ fork_return(struct thread *td, struct trapframe *frame) PROC_UNLOCK(p); } + /* + * If the prison was killed mid-fork, die along with it. + */ + if (td->td_ucred->cr_prison->pr_flags & PR_REMOVE) + exit1(td, 0, SIGKILL); + userret(td, frame); #ifdef KTRACE diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 47cc3ddd3bce..0bb9c76a25c9 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1751,6 +1751,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; + pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); #ifdef RACCT @@ -2287,6 +2288,12 @@ prison_remove_one(struct prison *pr) struct proc *p; int deuref; + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + pr->pr_flags |= PR_REMOVE; + /* If the prison was persistent, it is not anymore. */ deuref = 0; if (pr->pr_flags & PR_PERSIST) { @@ -2431,6 +2438,17 @@ do_jail_attach(struct thread *td, struct prison *pr) #endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); + + /* + * If the prison was killed while changing credentials, die along + * with it. + */ + if (pr->pr_flags & PR_REMOVE) { + PROC_LOCK(p); + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + return (0); e_unlock: diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 7142d0d0d71a..90a3fbce821f 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -209,6 +209,7 @@ struct prison_racct { /* primary jail address. */ /* Internal flag bits */ +#define PR_REMOVE 0x01000000 /* In process of being removed */ #define PR_IP4 0x02000000 /* IPv4 restricted or disabled */ /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 21:53:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 623C9540FC0; Fri, 19 Feb 2021 21:53: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 4Dj51T2GTHz3NLQ; Fri, 19 Feb 2021 21:53: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 402A113B1A; Fri, 19 Feb 2021 21:53: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 11JLrXnk052986; Fri, 19 Feb 2021 21:53:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JLrXl9052985; Fri, 19 Feb 2021 21:53:33 GMT (envelope-from git) Date: Fri, 19 Feb 2021 21:53:33 GMT Message-Id: <202102192153.11JLrXl9052985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jamie Gritton Subject: git: 9f00cb5fa8a4 - releng/13.0 - MFS jail: Handle a possible race between jail_remove(2) and fork(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 9f00cb5fa8a438e7b9efb2158f2e2edc730badd1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 21:53:33 -0000 The branch releng/13.0 has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=9f00cb5fa8a438e7b9efb2158f2e2edc730badd1 commit 9f00cb5fa8a438e7b9efb2158f2e2edc730badd1 Author: Jamie Gritton AuthorDate: 2021-02-16 19:19:13 +0000 Commit: Jamie Gritton CommitDate: 2021-02-19 21:53:07 +0000 MFS jail: Handle a possible race between jail_remove(2) and fork(2) jail_remove(2) includes a loop that sends SIGKILL to all processes in a jail, but skips processes in PRS_NEW state. Thus it is possible the a process in mid-fork(2) during jail removal can survive the jail being removed. Add a prison flag PR_REMOVE, which is checked before the new process returns. If the jail is being removed, the process will then exit. Also check this flag in jail_attach(2) which has a similar issue. Approved by: re (gjb) Reported by: trasz Approved by: kib (cherry picked from commit cc7b73065302005ebc4a19503188c8d6d5eb923d) (cherry picked from commit 894360bacd42f021551f76518edd445f6d299f2e) --- sys/kern/kern_fork.c | 6 ++++++ sys/kern/kern_jail.c | 24 +++++++++++++++++++++--- sys/sys/jail.h | 1 + 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 5bdf5054863d..870ae494de5d 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1126,6 +1126,12 @@ fork_return(struct thread *td, struct trapframe *frame) PROC_UNLOCK(p); } + /* + * If the prison was killed mid-fork, die along with it. + */ + if (!prison_isalive(td->td_ucred->cr_prison)) + exit1(td, 0, SIGKILL); + userret(td, frame); #ifdef KTRACE diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index ece0aa33e642..b56c889eeb7e 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -1764,6 +1764,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; + pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; @@ -2368,6 +2369,12 @@ prison_remove_one(struct prison *pr) drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; + /* + * Mark the prison as doomed, so it doesn't accidentally come back + * to life. It may still be explicitly brought back by jail_set(2). + */ + pr->pr_flags |= PR_REMOVE; + /* If the prison was persistent, it is not anymore. */ if (pr->pr_flags & PR_PERSIST) { refcount_release(&pr->pr_ref); @@ -2508,6 +2515,17 @@ do_jail_attach(struct thread *td, struct prison *pr) #endif prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); crfree(oldcred); + + /* + * If the prison was killed while changing credentials, die along + * with it. + */ + if (!prison_isalive(pr)) { + PROC_LOCK(p); + kern_psignal(p, SIGKILL); + PROC_UNLOCK(p); + } + return (0); e_unlock: @@ -3038,17 +3056,18 @@ prison_ischild(struct prison *pr1, struct prison *pr2) /* * Return true if the prison is currently alive. A prison is alive if it is - * valid and it holds user references. + * valid and holds user references, and it isn't being removed. */ bool prison_isalive(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); if (__predict_false(refcount_load(&pr->pr_uref) == 0)) return (false); + if (__predict_false(pr->pr_flags & PR_REMOVE)) + return (false); return (true); } @@ -3061,7 +3080,6 @@ bool prison_isvalid(struct prison *pr) { - mtx_assert(&pr->pr_mtx, MA_OWNED); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); return (true); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 2d1a26787b99..2ac6aabdbd43 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -216,6 +216,7 @@ struct prison_racct { /* primary jail address. */ /* Internal flag bits */ +#define PR_REMOVE 0x01000000 /* In process of being removed */ #define PR_IP4 0x02000000 /* IPv4 restricted or disabled */ /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:11:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A9BC0541877; Fri, 19 Feb 2021 22:11: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 4Dj5QC4S3qz3PmX; Fri, 19 Feb 2021 22:11: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 8BEFC13BAC; Fri, 19 Feb 2021 22:11: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 11JMBVQ2076170; Fri, 19 Feb 2021 22:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMBVWh076169; Fri, 19 Feb 2021 22:11:31 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:11:31 GMT Message-Id: <202102192211.11JMBVWh076169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0f9544d03e89 - main - iflib: Fix detach of pseudo interfaces 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/main X-Git-Reftype: branch X-Git-Commit: 0f9544d03e89d180f94a7a84b110ec7d2b6c625a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:11:31 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0f9544d03e89d180f94a7a84b110ec7d2b6c625a commit 0f9544d03e89d180f94a7a84b110ec7d2b6c625a Author: Mark Johnston AuthorDate: 2021-02-19 22:08:34 +0000 Commit: Mark Johnston CommitDate: 2021-02-19 22:10:41 +0000 iflib: Fix detach of pseudo interfaces In commit 38bfc6dee33b we added an IFDI_DETACH() call to iflib_pseudo_deregister() since it looked like it was missing. One is present in the error-handling path of iflib_pseudo_register(). However, the detach actually comes from the DEVICE_DETACH() method for the above-mentioned device_t, so now we're calling IFDI_DETACH() twice when destroying a pseudo interface. Fix the problem by not calling IFDI_DETACH() from the device detach routine. This way we can ensure that iflib de-initialization always happens in a consistent order. It also ensures that you can't do silly things like "devctl detach ", which would previously detach the driver without tearing down the corresponding ifnet. PR: 253541 Reviewed by: erj MFC after: 1 week Fixes: 38bfc6dee33b Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28774 --- sys/net/iflib_clone.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/net/iflib_clone.c b/sys/net/iflib_clone.c index dc4ccbee659f..975873c4a19c 100644 --- a/sys/net/iflib_clone.c +++ b/sys/net/iflib_clone.c @@ -81,13 +81,11 @@ int iflib_pseudo_detach(device_t dev) { if_ctx_t ctx; - uint32_t ifc_flags; ctx = device_get_softc(dev); - ifc_flags = iflib_get_flags(ctx); - if ((ifc_flags & IFC_INIT_DONE) == 0) - return (0); - return (IFDI_DETACH(ctx)); + if ((iflib_get_flags(ctx) & IFC_IN_DETACH) == 0) + return (EBUSY); + return (0); } static device_t iflib_pseudodev; From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:13:50 2021 Return-Path: Delivered-To: dev-commits-src-all@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 80B93541D13; Fri, 19 Feb 2021 22:13: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 4Dj5St3CRDz3QWg; Fri, 19 Feb 2021 22:13: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 60D6813E2A; Fri, 19 Feb 2021 22:13: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 11JMDo1r080276; Fri, 19 Feb 2021 22:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMDoiL080275; Fri, 19 Feb 2021 22:13:50 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:13:50 GMT Message-Id: <202102192213.11JMDoiL080275@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: d4380c0cdd05 - main - jail: Change both root and working directories in jail_attach(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4380c0cdd0517dc038403dd5c99242ce78bdeb5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:13:50 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=d4380c0cdd0517dc038403dd5c99242ce78bdeb5 commit d4380c0cdd0517dc038403dd5c99242ce78bdeb5 Author: Jamie Gritton AuthorDate: 2021-02-19 22:13:35 +0000 Commit: Jamie Gritton CommitDate: 2021-02-19 22:13:35 +0000 jail: Change both root and working directories in jail_attach(2) jail_attach(2) performs an internal chroot operation, leaving it up to the calling process to assure the working directory is inside the jail. Add a matching internal chdir operation to the jail's root. Also ignore kern.chroot_allow_open_directories, and always disallow the operation if there are any directory descriptors open. Reported by: mjg Approved by: markj, kib MFC after: 3 days --- lib/libc/sys/jail.2 | 5 ++++- sys/kern/kern_descrip.c | 45 ++++++++++++++++++++++++++++++++++++++++++--- sys/kern/kern_jail.c | 2 +- sys/sys/filedesc.h | 1 + 4 files changed, 48 insertions(+), 5 deletions(-) diff --git a/lib/libc/sys/jail.2 b/lib/libc/sys/jail.2 index 2e13a6c3a381..82c2e97d4a7b 100644 --- a/lib/libc/sys/jail.2 +++ b/lib/libc/sys/jail.2 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd February 19, 2021 .Dt JAIL 2 .Os .Sh NAME @@ -228,6 +228,9 @@ The system call attaches the current process to an existing jail, identified by .Fa jid . +It changes the process's root and current directories to the jail's +.Va path +directory. .Pp The .Fn jail_remove diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 43cedfe2199b..0813b6c8f3b8 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -3795,9 +3795,8 @@ pwd_drop(struct pwd *pwd) } /* -* Common routine for kern_chroot() and jail_attach(). The caller is -* responsible for invoking priv_check() and mac_vnode_check_chroot() to -* authorize this operation. +* The caller is responsible for invoking priv_check() and +* mac_vnode_check_chroot() to authorize this operation. */ int pwd_chroot(struct thread *td, struct vnode *vp) @@ -3859,6 +3858,46 @@ pwd_chdir(struct thread *td, struct vnode *vp) pwd_drop(oldpwd); } +/* + * jail_attach(2) changes both root and working directories. + */ +int +pwd_chroot_chdir(struct thread *td, struct vnode *vp) +{ + struct pwddesc *pdp; + struct filedesc *fdp; + struct pwd *newpwd, *oldpwd; + int error; + + fdp = td->td_proc->p_fd; + pdp = td->td_proc->p_pd; + newpwd = pwd_alloc(); + FILEDESC_SLOCK(fdp); + PWDDESC_XLOCK(pdp); + oldpwd = PWDDESC_XLOCKED_LOAD_PWD(pdp); + error = chroot_refuse_vdir_fds(fdp); + FILEDESC_SUNLOCK(fdp); + if (error != 0) { + PWDDESC_XUNLOCK(pdp); + pwd_drop(newpwd); + return (error); + } + + vrefact(vp); + newpwd->pwd_rdir = vp; + vrefact(vp); + newpwd->pwd_cdir = vp; + if (oldpwd->pwd_jdir == NULL) { + vrefact(vp); + newpwd->pwd_jdir = vp; + } + pwd_fill(oldpwd, newpwd); + pwd_set(pdp, newpwd); + PWDDESC_XUNLOCK(pdp); + pwd_drop(oldpwd); + return (0); +} + void pwd_ensure_dirs(void) { diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index b56c889eeb7e..90ab69a372d2 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2495,7 +2495,7 @@ do_jail_attach(struct thread *td, struct prison *pr) goto e_unlock; #endif VOP_UNLOCK(pr->pr_root); - if ((error = pwd_chroot(td, pr->pr_root))) + if ((error = pwd_chroot_chdir(td, pr->pr_root))) goto e_revert_osd; newcred = crget(); diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h index 890232b7f160..8c5aa258ed28 100644 --- a/sys/sys/filedesc.h +++ b/sys/sys/filedesc.h @@ -333,6 +333,7 @@ void pdunshare(struct thread *td); void pwd_chdir(struct thread *td, struct vnode *vp); int pwd_chroot(struct thread *td, struct vnode *vp); +int pwd_chroot_chdir(struct thread *td, struct vnode *vp); void pwd_ensure_dirs(void); void pwd_set_rootvnode(void); From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:14:28 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EFE58541ED1; Fri, 19 Feb 2021 22:14:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dj5Tc2V5Lz3QD2; Fri, 19 Feb 2021 22:14:28 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt1-x82f.google.com with SMTP id b24so5081757qtp.13; Fri, 19 Feb 2021 14:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UnUcC1a6oZm6R9l1FWjwSZ+jo6dNIC77yCUvmzK3s0I=; b=TetuRI/n7PXPeeRRxI+beBHjTKTBHHy0FLK2XFadX0teWCI/lcqSl8lZaVlO6FvLcE Lt91gFgjwnKSJvOCgcZnvBt8Y7ZMhpkN3pWg6lGDqR4S5zgIiuviS1QGTnpHxKJ+yEQo 4wsu8aNqNuuCqp5ey8surbBK7x3HlB9nkqm16TDnaW9jfEJbQ9dMmxIP0h+rQDGCd/Sh upHc4XSSiSgQgI/Gxk9G9oneT/fUEySCxDLfC09Z4wihNIFpN/WKnh4HlvZU2UcuyWjr PEswn1w/KtDp+uVI/yObFYsaTKsVlY4mLkVLJ2WYEeon2vsKeuqD99H/k2rnqOBSSMir QJQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=UnUcC1a6oZm6R9l1FWjwSZ+jo6dNIC77yCUvmzK3s0I=; b=Ly7590nw3JXysvnI9nbRO6e2bokqQ7zKtAG9iBukqMra5jk/Kwdb5JWtNaUSgipLAt 3uqofnkLDoP9tzvvqT8fMokXxVIfsP0W/nZcxYrUyL8zX13yDmV8dJaQtKH329uY0Kz4 7cqYlnsq4KyOT/tP8+pPAqPMUVeU8sGLhv2p2rQNm5c0rMU0YFEaBZRVettF2tiilQ3N DmbTmb6+Qz5uszdgn5ZQkINL6VpkAMH7QnOlmM02tMcFQYYQeYsWqAAe82w3uG49nQzZ DZ5y+I6FcZYQCgavy7VChHLh9f3xG6Fxw3gNVufG5vIPEcy39Y8WEhpOa1GRas2Nw/R5 zrIQ== X-Gm-Message-State: AOAM530sLIJfDuv4wAutMgdDHRwARxsfKbJeSgwM2zHtInyoPvF8EkC8 JxTRspCrfHqaWkNdeq15E25++cgRe3g= X-Google-Smtp-Source: ABdhPJzwYW90q9KiA0ZkWcJsWlOILepfFbSMOusWEB8F/N4QC2tYAA+AoSTHB2qt5vE/+mbup9SldQ== X-Received: by 2002:a05:622a:2c4:: with SMTP id a4mr11143093qtx.201.1613772867025; Fri, 19 Feb 2021 14:14:27 -0800 (PST) Received: from nuc ([142.126.164.150]) by smtp.gmail.com with ESMTPSA id r190sm7419611qka.54.2021.02.19.14.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Feb 2021 14:14:26 -0800 (PST) Sender: Mark Johnston Date: Fri, 19 Feb 2021 17:14:27 -0500 From: Mark Johnston To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 0f9544d03e89 - main - iflib: Fix detach of pseudo interfaces Message-ID: References: <202102192211.11JMBVWh076169@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202102192211.11JMBVWh076169@gitrepo.freebsd.org> X-Rspamd-Queue-Id: 4Dj5Tc2V5Lz3QD2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=TetuRI/n; dmarc=none; spf=pass (mx1.freebsd.org: domain of markjdb@gmail.com designates 2607:f8b0:4864:20::82f as permitted sender) smtp.mailfrom=markjdb@gmail.com X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[markj@freebsd.org,markjdb@gmail.com]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::82f:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[markj@freebsd.org,markjdb@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::82f:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82f:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:14:29 -0000 On Fri, Feb 19, 2021 at 10:11:31PM +0000, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=0f9544d03e89d180f94a7a84b110ec7d2b6c625a > > commit 0f9544d03e89d180f94a7a84b110ec7d2b6c625a > Author: Mark Johnston > AuthorDate: 2021-02-19 22:08:34 +0000 > Commit: Mark Johnston > CommitDate: 2021-02-19 22:10:41 +0000 > > iflib: Fix detach of pseudo interfaces > > In commit 38bfc6dee33b we added an IFDI_DETACH() call to > iflib_pseudo_deregister() since it looked like it was missing. One is > present in the error-handling path of iflib_pseudo_register(). However, > the detach actually comes from the DEVICE_DETACH() method for the > above-mentioned device_t, Sorry, missing context. A device is instantiated for each pseudo interface, I believe just to satisfy iflib's internal interfaces. > so now we're calling IFDI_DETACH() twice when > destroying a pseudo interface. > > Fix the problem by not calling IFDI_DETACH() from the device detach > routine. This way we can ensure that iflib de-initialization always > happens in a consistent order. It also ensures that you can't do silly > things like "devctl detach ", which would previously > detach the driver without tearing down the corresponding ifnet. From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:20:03 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F03BC542121; Fri, 19 Feb 2021 22:20:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dj5c36JlFz3Qw4; Fri, 19 Feb 2021 22:20:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:d13f:2ab6:ef87:8212]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 2371D25F02; Fri, 19 Feb 2021 22:20:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 24fd63e0970f - main - mips: Don't set __NO_TLS to disable some uses of TLS. To: Warner Losh , Konstantin Belousov Cc: Brandon Bergren , Jessica Clarke , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202102180035.11I0ZnL3070354@gitrepo.freebsd.org> <9687575c-dd7c-1496-850b-2018f4bca3da@FreeBSD.org> <3045F222-DBAC-463C-B429-075B2CFB115A@freebsd.org> <012169A0-67EC-48B7-A1CB-2A9921EF63FA@freebsd.org> From: John Baldwin Message-ID: Date: Fri, 19 Feb 2021 14:20:01 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:20:04 -0000 On 2/19/21 8:14 AM, Warner Losh wrote: > FWIW: Mips likely can play the 'not very popular tier 2 card trending > towards tier 3' card, at least for 13 since (a) 13.0 isn't out yet and (b) > the project doesn't produce mips binaries. It could likely even play it for > 12, but that might be a wee bit disruptive to the few users of it we have. We also only really promise ABI stability for Tier 1. Not that we should gratuitously break the ABI for Tier 2, but we have done so in the past for things like time_t. I think we should MFC all the NO_TLS removals to 13 prior to 13.0 being actually released. We don't produce release images for either MIPS or RISC-V. -- John Baldwin From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:25:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0A4145424BF; Fri, 19 Feb 2021 22:25: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 4Dj5k76s4Wz3R94; Fri, 19 Feb 2021 22:25: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 DDFC814204; Fri, 19 Feb 2021 22:25: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 11JMPJOa093492; Fri, 19 Feb 2021 22:25:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMPJhQ093491; Fri, 19 Feb 2021 22:25:19 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:25:19 GMT Message-Id: <202102192225.11JMPJhQ093491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 7ac8040a9931 - main - cxgbe(4): Use firmware commands to get/set filter configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ac8040a99319456c3225cd5166390f5bd172fdf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:25:20 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=7ac8040a99319456c3225cd5166390f5bd172fdf commit 7ac8040a99319456c3225cd5166390f5bd172fdf Author: Navdeep Parhar AuthorDate: 2021-02-19 21:05:19 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-19 22:23:58 +0000 cxgbe(4): Use firmware commands to get/set filter configuration. 1. Query the firmware for filter mode, mask, and related ingress config instead of trying to figure them out from hardware registers. Read configuration from the registers only when the firmware does not support this query. 2. Use the firmware to set the filter mode. This is the correct way to do it and is more flexible as well. The filter mode (and associated ingress config) can now be changed any time it is safe to do so. The user can specify a subset of a valid mode and the driver will enable enough bits to make sure that the mode is maxed out -- that is, it is not possible to set another bit without exceeding the total width for optional filter fields. This is a hardware requirement that was not enforced by the driver previously. MFC after: 2 weeks Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/common.h | 9 +- sys/dev/cxgbe/common/t4_hw.c | 190 +++++++++++++++++++++++++------ sys/dev/cxgbe/firmware/t4fw_interface.h | 5 + sys/dev/cxgbe/t4_filter.c | 196 +++++++++++++++++++------------- sys/dev/cxgbe/t4_ioctl.h | 14 +-- sys/dev/cxgbe/tom/t4_tom.c | 2 +- 6 files changed, 287 insertions(+), 129 deletions(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 9cc923eaf2f6..53be2fa2588a 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -256,11 +256,11 @@ struct tp_params { unsigned int la_mask; /* what events are recorded by TP LA */ unsigned short tx_modq[MAX_NCHAN]; /* channel to modulation queue map */ - uint32_t vlan_pri_map; - uint32_t ingress_config; + uint16_t filter_mode; + uint16_t filter_mask; /* Used by TOE and hashfilters */ + int vnic_mode; uint32_t max_rx_pdu; uint32_t max_tx_pdu; - uint64_t hash_filter_mask; bool rx_pkt_encap; int8_t fcoe_shift; @@ -753,8 +753,7 @@ int t4_set_sched_ipg(struct adapter *adap, int sched, unsigned int ipg); int t4_set_pace_tbl(struct adapter *adap, const unsigned int *pace_vals, unsigned int start, unsigned int n); void t4_get_chan_txrate(struct adapter *adap, u64 *nic_rate, u64 *ofld_rate); -int t4_set_filter_mode(struct adapter *adap, unsigned int mode_map, - bool sleep_ok); +int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode); void t4_mk_filtdelwr(unsigned int ftid, struct fw_filter_wr *wr, int qid); void t4_wol_magic_enable(struct adapter *adap, unsigned int port, const u8 *addr); diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 36d8864de960..8b22f2e4f5ba 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9633,19 +9633,74 @@ int t4_init_sge_params(struct adapter *adapter) return 0; } +/* Convert the LE's hardware hash mask to a shorter filter mask. */ +static inline uint16_t +hashmask_to_filtermask(uint64_t hashmask, uint16_t filter_mode) +{ + static const uint8_t width[] = {1, 3, 17, 17, 8, 8, 16, 9, 3, 1}; + int i; + uint16_t filter_mask; + uint64_t mask; /* field mask */ + + filter_mask = 0; + for (i = S_FCOE; i <= S_FRAGMENTATION; i++) { + if ((filter_mode & (1 << i)) == 0) + continue; + mask = (1 << width[i]) - 1; + if ((hashmask & mask) == mask) + filter_mask |= 1 << i; + hashmask >>= width[i]; + } + + return (filter_mask); +} + /* * Read and cache the adapter's compressed filter mode and ingress config. */ -static void read_filter_mode_and_ingress_config(struct adapter *adap, - bool sleep_ok) +static void +read_filter_mode_and_ingress_config(struct adapter *adap) { - uint32_t v; + int rc; + uint32_t v, param[2], val[2]; struct tp_params *tpp = &adap->params.tp; + uint64_t hash_mask; + + param[0] = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FILTER) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_FILTER_MODE_MASK); + param[1] = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FILTER) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_FILTER_VNIC_MODE); + rc = -t4_query_params(adap, adap->mbox, adap->pf, 0, 2, param, val); + if (rc == 0) { + tpp->filter_mode = G_FW_PARAMS_PARAM_FILTER_MODE(val[0]); + tpp->filter_mask = G_FW_PARAMS_PARAM_FILTER_MASK(val[0]); + tpp->vnic_mode = val[1]; + } else { + /* + * Old firmware. Read filter mode/mask and ingress config + * straight from the hardware. + */ + t4_tp_pio_read(adap, &v, 1, A_TP_VLAN_PRI_MAP, true); + tpp->filter_mode = v & 0xffff; + + hash_mask = 0; + if (chip_id(adap) > CHELSIO_T4) { + v = t4_read_reg(adap, LE_HASH_MASK_GEN_IPV4T5(3)); + hash_mask = v; + v = t4_read_reg(adap, LE_HASH_MASK_GEN_IPV4T5(4)); + hash_mask |= (u64)v << 32; + } + tpp->filter_mask = hashmask_to_filtermask(hash_mask, + tpp->filter_mode); - t4_tp_pio_read(adap, &tpp->vlan_pri_map, 1, A_TP_VLAN_PRI_MAP, - sleep_ok); - t4_tp_pio_read(adap, &tpp->ingress_config, 1, A_TP_INGRESS_CONFIG, - sleep_ok); + t4_tp_pio_read(adap, &v, 1, A_TP_INGRESS_CONFIG, true); + if (v & F_VNIC) + tpp->vnic_mode = FW_VNIC_MODE_PF_VF; + else + tpp->vnic_mode = FW_VNIC_MODE_OUTER_VLAN; + } /* * Now that we have TP_VLAN_PRI_MAP cached, we can calculate the field @@ -9662,13 +9717,6 @@ static void read_filter_mode_and_ingress_config(struct adapter *adap, tpp->macmatch_shift = t4_filter_field_shift(adap, F_MACMATCH); tpp->matchtype_shift = t4_filter_field_shift(adap, F_MPSHITTYPE); tpp->frag_shift = t4_filter_field_shift(adap, F_FRAGMENTATION); - - if (chip_id(adap) > CHELSIO_T4) { - v = t4_read_reg(adap, LE_HASH_MASK_GEN_IPV4T5(3)); - adap->params.tp.hash_filter_mask = v; - v = t4_read_reg(adap, LE_HASH_MASK_GEN_IPV4T5(4)); - adap->params.tp.hash_filter_mask |= (u64)v << 32; - } } /** @@ -9691,7 +9739,7 @@ int t4_init_tp_params(struct adapter *adap) for (chan = 0; chan < MAX_NCHAN; chan++) tpp->tx_modq[chan] = chan; - read_filter_mode_and_ingress_config(adap, true); + read_filter_mode_and_ingress_config(adap); if (chip_id(adap) > CHELSIO_T5) { v = t4_read_reg(adap, A_TP_OUT_CONFIG); @@ -9728,7 +9776,7 @@ int t4_init_tp_params(struct adapter *adap) */ int t4_filter_field_shift(const struct adapter *adap, int filter_sel) { - unsigned int filter_mode = adap->params.tp.vlan_pri_map; + const unsigned int filter_mode = adap->params.tp.filter_mode; unsigned int sel; int field_shift; @@ -10798,30 +10846,98 @@ out: } /** - * t4_set_filter_mode - configure the optional components of filter tuples + * t4_set_filter_cfg - set up filter mode/mask and ingress config. * @adap: the adapter - * @mode_map: a bitmap selcting which optional filter components to enable - * @sleep_ok: if true we may sleep while awaiting command completion - * - * Sets the filter mode by selecting the optional components to enable - * in filter tuples. Returns 0 on success and a negative error if the - * requested mode needs more bits than are available for optional - * components. - */ -int t4_set_filter_mode(struct adapter *adap, unsigned int mode_map, - bool sleep_ok) -{ - static u8 width[] = { 1, 3, 17, 17, 8, 8, 16, 9, 3, 1 }; + * @mode: a bitmap selecting which optional filter components to enable + * @mask: a bitmap selecting which components to enable in filter mask + * @vnic_mode: the ingress config/vnic mode setting + * + * Sets the filter mode and mask by selecting the optional components to + * enable in filter tuples. Returns 0 on success and a negative error if + * the requested mode needs more bits than are available for optional + * components. The filter mask must be a subset of the filter mode. + */ +int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode) +{ + static const uint8_t width[] = {1, 3, 17, 17, 8, 8, 16, 9, 3, 1}; + int i, nbits, rc; + uint32_t param, val; + uint16_t fmode, fmask; + const int maxbits = FILTER_OPT_LEN; + + if (mode != -1 || mask != -1) { + if (mode != -1) { + fmode = mode; + nbits = 0; + for (i = S_FCOE; i <= S_FRAGMENTATION; i++) { + if (fmode & (1 << i)) + nbits += width[i]; + } + if (nbits > maxbits) { + CH_ERR(adap, "optional fields in the filter " + "mode (0x%x) add up to %d bits " + "(must be <= %db). Remove some fields and " + "try again.\n", fmode, nbits, maxbits); + return -E2BIG; + } - int i, nbits = 0; + /* + * Hardware wants the bits to be maxed out. Keep + * setting them until there's no room for more. + */ + for (i = S_FCOE; i <= S_FRAGMENTATION; i++) { + if (fmode & (1 << i)) + continue; + if (nbits + width[i] <= maxbits) { + fmode |= 1 << i; + nbits += width[i]; + if (nbits == maxbits) + break; + } + } - for (i = S_FCOE; i <= S_FRAGMENTATION; i++) - if (mode_map & (1 << i)) - nbits += width[i]; - if (nbits > FILTER_OPT_LEN) - return -EINVAL; - t4_tp_pio_write(adap, &mode_map, 1, A_TP_VLAN_PRI_MAP, sleep_ok); - read_filter_mode_and_ingress_config(adap, sleep_ok); + fmask = fmode & adap->params.tp.filter_mask; + if (fmask != adap->params.tp.filter_mask) { + CH_WARN(adap, + "filter mask will be changed from 0x%x to " + "0x%x to comply with the filter mode (0x%x).\n", + adap->params.tp.filter_mask, fmask, fmode); + } + } else { + fmode = adap->params.tp.filter_mode; + fmask = mask; + if ((fmode | fmask) != fmode) { + CH_ERR(adap, + "filter mask (0x%x) must be a subset of " + "the filter mode (0x%x).\n", fmask, fmode); + return -EINVAL; + } + } + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FILTER) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_FILTER_MODE_MASK); + val = V_FW_PARAMS_PARAM_FILTER_MODE(fmode) | + V_FW_PARAMS_PARAM_FILTER_MASK(fmask); + rc = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, + &val); + if (rc < 0) + return rc; + } + + if (vnic_mode != -1) { + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_FILTER) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_FILTER_VNIC_MODE); + val = vnic_mode; + rc = t4_set_params(adap, adap->mbox, adap->pf, 0, 1, ¶m, + &val); + if (rc < 0) + return rc; + } + + /* Refresh. */ + read_filter_mode_and_ingress_config(adap); return 0; } diff --git a/sys/dev/cxgbe/firmware/t4fw_interface.h b/sys/dev/cxgbe/firmware/t4fw_interface.h index dcec2cc122f2..30a2e1760052 100644 --- a/sys/dev/cxgbe/firmware/t4fw_interface.h +++ b/sys/dev/cxgbe/firmware/t4fw_interface.h @@ -4874,6 +4874,11 @@ enum fw_params_param_dev_diag { enum fw_params_param_dev_filter{ FW_PARAM_DEV_FILTER_VNIC_MODE = 0x00, FW_PARAM_DEV_FILTER_MODE_MASK = 0x01, + + /* VNIC modes */ + FW_VNIC_MODE_PF_VF = 0, + FW_VNIC_MODE_OUTER_VLAN = 1, + FW_VNIC_MODE_ENCAP_EN = 2, }; enum fw_params_param_dev_ktls_hw { diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c index 65a87f4c4163..1e0269fcd5c0 100644 --- a/sys/dev/cxgbe/t4_filter.c +++ b/sys/dev/cxgbe/t4_filter.c @@ -231,9 +231,8 @@ filter_eq(struct t4_filter_specification *fs1, return (false); /* - * We know the masks are the same because all hashfilter masks have to - * conform to the global tp->hash_filter_mask and the driver has - * verified that already. + * We know the masks are the same because all hashfilters conform to the + * global tp->filter_mask and the driver has verified that already. */ if ((fs1->mask.pfvf_vld || fs1->mask.ovlan_vld) && @@ -325,7 +324,11 @@ remove_hftid(struct adapter *sc, struct filter_entry *f) LIST_REMOVE(f, link_tid); } -static uint32_t +/* + * Input: driver's 32b filter mode. + * Returns: hardware filter mode (bits to set in vlan_pri_map) for the input. + */ +static uint16_t mode_to_fconf(uint32_t mode) { uint32_t fconf = 0; @@ -363,13 +366,22 @@ mode_to_fconf(uint32_t mode) return (fconf); } -static uint32_t +/* + * Input: driver's 32b filter mode. + * Returns: hardware vnic mode (ingress config) matching the input. + */ +static int mode_to_iconf(uint32_t mode) { + if ((mode & T4_FILTER_VNIC) == 0) + return (-1); /* ingress config doesn't matter. */ if (mode & T4_FILTER_IC_VNIC) - return (F_VNIC); - return (0); + return (FW_VNIC_MODE_PF_VF); + else if (mode & T4_FILTER_IC_ENCAP) + return (FW_VNIC_MODE_ENCAP_EN); + else + return (FW_VNIC_MODE_OUTER_VLAN); } static int @@ -401,16 +413,24 @@ check_fspec_against_fconf_iconf(struct adapter *sc, fconf |= F_VLAN; if (fs->val.ovlan_vld || fs->mask.ovlan_vld) { - fconf |= F_VNIC_ID; - if (tpp->ingress_config & F_VNIC) + if (tpp->vnic_mode != FW_VNIC_MODE_OUTER_VLAN) return (EINVAL); + fconf |= F_VNIC_ID; } if (fs->val.pfvf_vld || fs->mask.pfvf_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_PF_VF) + return (EINVAL); fconf |= F_VNIC_ID; - if ((tpp->ingress_config & F_VNIC) == 0) + } + +#ifdef notyet + if (fs->val.encap_vld || fs->mask.encap_vld) { + if (tpp->vnic_mode != FW_VNIC_MODE_ENCAP_EN); return (EINVAL); + fconf |= F_VNIC_ID; } +#endif if (fs->val.iport || fs->mask.iport) fconf |= F_PORT; @@ -418,46 +438,70 @@ check_fspec_against_fconf_iconf(struct adapter *sc, if (fs->val.fcoe || fs->mask.fcoe) fconf |= F_FCOE; - if ((tpp->vlan_pri_map | fconf) != tpp->vlan_pri_map) + if ((tpp->filter_mode | fconf) != tpp->filter_mode) return (E2BIG); return (0); } +/* + * Input: hardware filter configuration (filter mode/mask, ingress config). + * Input: driver's 32b filter mode matching the input. + */ +static uint32_t +fconf_to_mode(uint16_t hwmode, int vnic_mode) +{ + uint32_t mode = T4_FILTER_IPv4 | T4_FILTER_IPv6 | T4_FILTER_IP_SADDR | + T4_FILTER_IP_DADDR | T4_FILTER_IP_SPORT | T4_FILTER_IP_DPORT; + + if (hwmode & F_FRAGMENTATION) + mode |= T4_FILTER_IP_FRAGMENT; + if (hwmode & F_MPSHITTYPE) + mode |= T4_FILTER_MPS_HIT_TYPE; + if (hwmode & F_MACMATCH) + mode |= T4_FILTER_MAC_IDX; + if (hwmode & F_ETHERTYPE) + mode |= T4_FILTER_ETH_TYPE; + if (hwmode & F_PROTOCOL) + mode |= T4_FILTER_IP_PROTO; + if (hwmode & F_TOS) + mode |= T4_FILTER_IP_TOS; + if (hwmode & F_VLAN) + mode |= T4_FILTER_VLAN; + if (hwmode & F_VNIC_ID) + mode |= T4_FILTER_VNIC; /* real meaning depends on vnic_mode. */ + if (hwmode & F_PORT) + mode |= T4_FILTER_PORT; + if (hwmode & F_FCOE) + mode |= T4_FILTER_FCoE; + + switch (vnic_mode) { + case FW_VNIC_MODE_PF_VF: + mode |= T4_FILTER_IC_VNIC; + break; + case FW_VNIC_MODE_ENCAP_EN: + mode |= T4_FILTER_IC_ENCAP; + break; + case FW_VNIC_MODE_OUTER_VLAN: + default: + break; + } + + return (mode); +} + int get_filter_mode(struct adapter *sc, uint32_t *mode) { struct tp_params *tp = &sc->params.tp; - uint64_t mask; + uint16_t filter_mode; - /* Non-zero incoming value in mode means "hashfilter mode". */ - mask = *mode ? tp->hash_filter_mask : UINT64_MAX; + /* Filter mask must comply with the global filter mode. */ + MPASS((tp->filter_mode | tp->filter_mask) == tp->filter_mode); - /* Always */ - *mode = T4_FILTER_IPv4 | T4_FILTER_IPv6 | T4_FILTER_IP_SADDR | - T4_FILTER_IP_DADDR | T4_FILTER_IP_SPORT | T4_FILTER_IP_DPORT; - -#define CHECK_FIELD(fconf_bit, field_shift, field_mask, mode_bit) do { \ - if (tp->vlan_pri_map & (fconf_bit)) { \ - MPASS(tp->field_shift >= 0); \ - if ((mask >> tp->field_shift & field_mask) == field_mask) \ - *mode |= (mode_bit); \ - } \ -} while (0) - - CHECK_FIELD(F_FRAGMENTATION, frag_shift, M_FT_FRAGMENTATION, T4_FILTER_IP_FRAGMENT); - CHECK_FIELD(F_MPSHITTYPE, matchtype_shift, M_FT_MPSHITTYPE, T4_FILTER_MPS_HIT_TYPE); - CHECK_FIELD(F_MACMATCH, macmatch_shift, M_FT_MACMATCH, T4_FILTER_MAC_IDX); - CHECK_FIELD(F_ETHERTYPE, ethertype_shift, M_FT_ETHERTYPE, T4_FILTER_ETH_TYPE); - CHECK_FIELD(F_PROTOCOL, protocol_shift, M_FT_PROTOCOL, T4_FILTER_IP_PROTO); - CHECK_FIELD(F_TOS, tos_shift, M_FT_TOS, T4_FILTER_IP_TOS); - CHECK_FIELD(F_VLAN, vlan_shift, M_FT_VLAN, T4_FILTER_VLAN); - CHECK_FIELD(F_VNIC_ID, vnic_shift, M_FT_VNIC_ID , T4_FILTER_VNIC); - if (tp->ingress_config & F_VNIC) - *mode |= T4_FILTER_IC_VNIC; - CHECK_FIELD(F_PORT, port_shift, M_FT_PORT , T4_FILTER_PORT); - CHECK_FIELD(F_FCOE, fcoe_shift, M_FT_FCOE , T4_FILTER_FCoE); -#undef CHECK_FIELD + /* Non-zero incoming value in mode means "hashfilter mode". */ + filter_mode = *mode ? tp->filter_mask : tp->filter_mode; + *mode = fconf_to_mode(filter_mode, tp->vnic_mode); return (0); } @@ -465,33 +509,22 @@ get_filter_mode(struct adapter *sc, uint32_t *mode) int set_filter_mode(struct adapter *sc, uint32_t mode) { - struct tp_params *tpp = &sc->params.tp; - uint32_t fconf, iconf; - int rc; + struct tp_params *tp = &sc->params.tp; + int rc, iconf; + uint16_t fconf; iconf = mode_to_iconf(mode); - if ((iconf ^ tpp->ingress_config) & F_VNIC) { - /* - * For now we just complain if A_TP_INGRESS_CONFIG is not - * already set to the correct value for the requested filter - * mode. It's not clear if it's safe to write to this register - * on the fly. (And we trust the cached value of the register). - * - * check_fspec_against_fconf_iconf and other code that looks at - * tp->vlan_pri_map and tp->ingress_config needs to be reviewed - * thorougly before allowing dynamic filter mode changes. - */ - return (EBUSY); - } - fconf = mode_to_fconf(mode); + if ((iconf == -1 || iconf == tp->vnic_mode) && fconf == tp->filter_mode) + return (0); /* Nothing to do */ - rc = begin_synchronized_op(sc, NULL, HOLD_LOCK | SLEEP_OK | INTR_OK, - "t4setfm"); + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4setfm"); if (rc) return (rc); - if (sc->tids.ftids_in_use > 0 || sc->tids.hpftids_in_use > 0) { + if (sc->tids.ftids_in_use > 0 || /* TCAM filters active */ + sc->tids.hpftids_in_use > 0 || /* hi-pri TCAM filters active */ + sc->tids.tids_in_use > 0) { /* TOE or hashfilters active */ rc = EBUSY; goto done; } @@ -503,9 +536,10 @@ set_filter_mode(struct adapter *sc, uint32_t mode) } #endif - rc = -t4_set_filter_mode(sc, fconf, true); + /* Note that filter mask will get clipped to the new filter mode. */ + rc = -t4_set_filter_cfg(sc, fconf, -1, iconf); done: - end_synchronized_op(sc, LOCK_HELD); + end_synchronized_op(sc, 0); return (rc); } @@ -718,7 +752,7 @@ hashfilter_ntuple(struct adapter *sc, const struct t4_filter_specification *fs, uint64_t *ftuple) { struct tp_params *tp = &sc->params.tp; - uint64_t fmask; + uint16_t fmask; *ftuple = fmask = 0; @@ -727,63 +761,67 @@ hashfilter_ntuple(struct adapter *sc, const struct t4_filter_specification *fs, * in the Compressed Filter Tuple. */ if (tp->vlan_shift >= 0 && fs->mask.vlan) { - *ftuple |= (F_FT_VLAN_VLD | fs->val.vlan) << tp->vlan_shift; - fmask |= M_FT_VLAN << tp->vlan_shift; + *ftuple |= (uint64_t)(F_FT_VLAN_VLD | fs->val.vlan) << + tp->vlan_shift; + fmask |= F_VLAN; } if (tp->port_shift >= 0 && fs->mask.iport) { *ftuple |= (uint64_t)fs->val.iport << tp->port_shift; - fmask |= M_FT_PORT << tp->port_shift; + fmask |= F_PORT; } if (tp->protocol_shift >= 0 && fs->mask.proto) { *ftuple |= (uint64_t)fs->val.proto << tp->protocol_shift; - fmask |= M_FT_PROTOCOL << tp->protocol_shift; + fmask |= F_PROTOCOL; } if (tp->tos_shift >= 0 && fs->mask.tos) { *ftuple |= (uint64_t)(fs->val.tos) << tp->tos_shift; - fmask |= M_FT_TOS << tp->tos_shift; + fmask |= F_TOS; } if (tp->vnic_shift >= 0 && fs->mask.vnic) { - /* F_VNIC in ingress config was already validated. */ - if (tp->ingress_config & F_VNIC) + /* vnic_mode was already validated. */ + if (tp->vnic_mode == FW_VNIC_MODE_PF_VF) MPASS(fs->mask.pfvf_vld); - else + else if (tp->vnic_mode == FW_VNIC_MODE_OUTER_VLAN) MPASS(fs->mask.ovlan_vld); - +#ifdef notyet + else if (tp->vnic_mode == FW_VNIC_MODE_ENCAP_EN) + MPASS(fs->mask.encap_vld); +#endif *ftuple |= ((1ULL << 16) | fs->val.vnic) << tp->vnic_shift; - fmask |= M_FT_VNIC_ID << tp->vnic_shift; + fmask |= F_VNIC_ID; } if (tp->macmatch_shift >= 0 && fs->mask.macidx) { *ftuple |= (uint64_t)(fs->val.macidx) << tp->macmatch_shift; - fmask |= M_FT_MACMATCH << tp->macmatch_shift; + fmask |= F_MACMATCH; } if (tp->ethertype_shift >= 0 && fs->mask.ethtype) { *ftuple |= (uint64_t)(fs->val.ethtype) << tp->ethertype_shift; - fmask |= M_FT_ETHERTYPE << tp->ethertype_shift; + fmask |= F_ETHERTYPE; } if (tp->matchtype_shift >= 0 && fs->mask.matchtype) { *ftuple |= (uint64_t)(fs->val.matchtype) << tp->matchtype_shift; - fmask |= M_FT_MPSHITTYPE << tp->matchtype_shift; + fmask |= F_MPSHITTYPE; } if (tp->frag_shift >= 0 && fs->mask.frag) { *ftuple |= (uint64_t)(fs->val.frag) << tp->frag_shift; - fmask |= M_FT_FRAGMENTATION << tp->frag_shift; + fmask |= F_FRAGMENTATION; } if (tp->fcoe_shift >= 0 && fs->mask.fcoe) { *ftuple |= (uint64_t)(fs->val.fcoe) << tp->fcoe_shift; - fmask |= M_FT_FCOE << tp->fcoe_shift; + fmask |= F_FCOE; } - /* A hashfilter must conform to the filterMask. */ - if (fmask != tp->hash_filter_mask) + /* A hashfilter must conform to the hardware filter mask. */ + if (fmask != tp->filter_mask) return (EINVAL); return (0); diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h index 1daa4f5dfa27..4f0a71683ef0 100644 --- a/sys/dev/cxgbe/t4_ioctl.h +++ b/sys/dev/cxgbe/t4_ioctl.h @@ -110,7 +110,7 @@ struct t4_i2c_data { #define T4_FILTER_IP_DPORT 0x20 /* Destination IP port */ #define T4_FILTER_FCoE 0x40 /* Fibre Channel over Ethernet packet */ #define T4_FILTER_PORT 0x80 /* Physical ingress port */ -#define T4_FILTER_VNIC 0x100 /* VNIC id or outer VLAN */ +#define T4_FILTER_VNIC 0x100 /* See the IC_* bits towards the end */ #define T4_FILTER_VLAN 0x200 /* VLAN ID */ #define T4_FILTER_IP_TOS 0x400 /* IPv4 TOS/IPv6 Traffic Class */ #define T4_FILTER_IP_PROTO 0x800 /* IP protocol */ @@ -118,12 +118,12 @@ struct t4_i2c_data { #define T4_FILTER_MAC_IDX 0x2000 /* MPS MAC address match index */ #define T4_FILTER_MPS_HIT_TYPE 0x4000 /* MPS match type */ #define T4_FILTER_IP_FRAGMENT 0x8000 /* IP fragment */ - -#define T4_FILTER_IC_VNIC 0x80000000 /* TP Ingress Config's F_VNIC - bit. It indicates whether - T4_FILTER_VNIC bit means VNIC - id (PF/VF) or outer VLAN. - 0 = oVLAN, 1 = VNIC */ +/* + * T4_FILTER_VNIC's real meaning depends on the ingress config. + */ +#define T4_FILTER_IC_OVLAN 0 /* outer VLAN */ +#define T4_FILTER_IC_VNIC 0x80000000 /* VNIC id (PF/VF) */ +#define T4_FILTER_IC_ENCAP 0x40000000 /* Filter action */ enum { diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 0f0b4d7ee5b3..df837cc50454 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1066,7 +1066,7 @@ select_ntuple(struct vi_info *vi, struct l2t_entry *e) if (tp->protocol_shift >= 0) ntuple |= (uint64_t)IPPROTO_TCP << tp->protocol_shift; - if (tp->vnic_shift >= 0 && tp->ingress_config & F_VNIC) { + if (tp->vnic_shift >= 0 && tp->vnic_mode == FW_VNIC_MODE_PF_VF) { ntuple |= (uint64_t)(V_FT_VNID_ID_VF(vi->vin) | V_FT_VNID_ID_PF(sc->pf) | V_FT_VNID_ID_VLD(vi->vfvld)) << tp->vnic_shift; From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:25:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 3553C542458; Fri, 19 Feb 2021 22:25: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 4Dj5k913JJz3h6k; Fri, 19 Feb 2021 22:25: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 1767A1405E; Fri, 19 Feb 2021 22:25: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 11JMPKWa093512; Fri, 19 Feb 2021 22:25:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMPK6V093511; Fri, 19 Feb 2021 22:25:20 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:25:20 GMT Message-Id: <202102192225.11JMPK6V093511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: c91dda5ad923 - main - cxgbe(4): Add a driver ioctl to set the filter mask. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c91dda5ad923f24ef2e538b8dc180fa98598b4db Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:25:21 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=c91dda5ad923f24ef2e538b8dc180fa98598b4db commit c91dda5ad923f24ef2e538b8dc180fa98598b4db Author: Navdeep Parhar AuthorDate: 2021-02-19 21:47:18 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-19 22:23:58 +0000 cxgbe(4): Add a driver ioctl to set the filter mask. Allow the filter mask (aka the hashfilter mode when hashfilters are in use) to be set any time it is safe to do so. The requested mask must be a subset of the filter mode already. The driver will not change the mode or ingress config just to support a new mask. MFC after: 2 weeks Sponsored by: Chelsio Communications --- sys/dev/cxgbe/adapter.h | 1 + sys/dev/cxgbe/t4_filter.c | 42 ++++++++++++++++++++++++++++++++++++++++++ sys/dev/cxgbe/t4_ioctl.h | 2 ++ sys/dev/cxgbe/t4_main.c | 3 +++ 4 files changed, 48 insertions(+) diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h index 8b8e6bf339e8..5fe7b76ccb0d 100644 --- a/sys/dev/cxgbe/adapter.h +++ b/sys/dev/cxgbe/adapter.h @@ -1337,6 +1337,7 @@ void cxgbe_ratelimit_query(struct ifnet *, struct if_ratelimit_query_results *); /* t4_filter.c */ int get_filter_mode(struct adapter *, uint32_t *); int set_filter_mode(struct adapter *, uint32_t); +int set_filter_mask(struct adapter *, uint32_t); int get_filter(struct adapter *, struct t4_filter *); int set_filter(struct adapter *, struct t4_filter *); int del_filter(struct adapter *, struct t4_filter *); diff --git a/sys/dev/cxgbe/t4_filter.c b/sys/dev/cxgbe/t4_filter.c index 1e0269fcd5c0..3afab0d1d6b9 100644 --- a/sys/dev/cxgbe/t4_filter.c +++ b/sys/dev/cxgbe/t4_filter.c @@ -543,6 +543,48 @@ done: return (rc); } +int +set_filter_mask(struct adapter *sc, uint32_t mode) +{ + struct tp_params *tp = &sc->params.tp; + int rc, iconf; + uint16_t fmask; + + iconf = mode_to_iconf(mode); + fmask = mode_to_fconf(mode); + if ((iconf == -1 || iconf == tp->vnic_mode) && fmask == tp->filter_mask) + return (0); /* Nothing to do */ + + /* + * We aren't going to change the global filter mode or VNIC mode here. + * The given filter mask must conform to them. + */ + if ((fmask | tp->filter_mode) != tp->filter_mode) + return (EINVAL); + if (iconf != -1 && iconf != tp->vnic_mode) + return (EINVAL); + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4sethfm"); + if (rc) + return (rc); + + if (sc->tids.tids_in_use > 0) { /* TOE or hashfilters active */ + rc = EBUSY; + goto done; + } + +#ifdef TCP_OFFLOAD + if (uld_active(sc, ULD_TOM)) { + rc = EBUSY; + goto done; + } +#endif + rc = -t4_set_filter_cfg(sc, -1, fmask, -1); +done: + end_synchronized_op(sc, 0); + return (rc); +} + static inline uint64_t get_filter_hits(struct adapter *sc, uint32_t tid) { diff --git a/sys/dev/cxgbe/t4_ioctl.h b/sys/dev/cxgbe/t4_ioctl.h index 4f0a71683ef0..ff2c5ef80a14 100644 --- a/sys/dev/cxgbe/t4_ioctl.h +++ b/sys/dev/cxgbe/t4_ioctl.h @@ -63,6 +63,7 @@ enum { T4_LOAD_BOOT, /* flash boot rom */ T4_LOAD_BOOTCFG, /* flash bootcfg */ T4_CUDBG_DUMP, /* debug dump of chip state */ + T4_SET_FILTER_MASK, /* set filter mask (hashfilter mode) */ }; struct t4_reg { @@ -429,4 +430,5 @@ struct t4_offload_policy { #define CHELSIO_T4_LOAD_BOOTCFG _IOW('f', T4_LOAD_BOOTCFG, struct t4_data) #define CHELSIO_T4_CUDBG_DUMP _IOWR('f', T4_CUDBG_DUMP, struct t4_cudbg_dump) #define CHELSIO_T4_SET_OFLD_POLICY _IOW('f', T4_SET_OFLD_POLICY, struct t4_offload_policy) +#define CHELSIO_T4_SET_FILTER_MASK _IOW('f', T4_SET_FILTER_MASK, uint32_t) #endif diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c index f64d349b46ae..3594db2ea136 100644 --- a/sys/dev/cxgbe/t4_main.c +++ b/sys/dev/cxgbe/t4_main.c @@ -10970,6 +10970,9 @@ t4_ioctl(struct cdev *dev, unsigned long cmd, caddr_t data, int fflag, case CHELSIO_T4_SET_FILTER_MODE: rc = set_filter_mode(sc, *(uint32_t *)data); break; + case CHELSIO_T4_SET_FILTER_MASK: + rc = set_filter_mask(sc, *(uint32_t *)data); + break; case CHELSIO_T4_GET_FILTER: rc = get_filter(sc, (struct t4_filter *)data); break; From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:25:25 2021 Return-Path: Delivered-To: dev-commits-src-all@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 576055423D6; Fri, 19 Feb 2021 22:25: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 4Dj5kC4dlLz3h55; Fri, 19 Feb 2021 22:25: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 543DF14097; Fri, 19 Feb 2021 22:25: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 11JMPN5e093551; Fri, 19 Feb 2021 22:25:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMPNHS093550; Fri, 19 Feb 2021 22:25:23 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:25:23 GMT Message-Id: <202102192225.11JMPNHS093550@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 038148c108c4 - main - cxgbetool(8): Add support for setting the hashfilter mode (filter mask). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 038148c108c4e7251c52364616273eec72b0c061 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:25:25 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=038148c108c4e7251c52364616273eec72b0c061 commit 038148c108c4e7251c52364616273eec72b0c061 Author: Navdeep Parhar AuthorDate: 2021-02-19 22:22:08 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-19 22:23:58 +0000 cxgbetool(8): Add support for setting the hashfilter mode (filter mask). Tighten up the validation of filter modes while here. Unrecognized keywords will be now be flagged as errors instead of being ignored. --- usr.sbin/cxgbetool/cxgbetool.c | 78 +++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 32 deletions(-) diff --git a/usr.sbin/cxgbetool/cxgbetool.c b/usr.sbin/cxgbetool/cxgbetool.c index c852b4e9940d..139a0bd8e564 100644 --- a/usr.sbin/cxgbetool/cxgbetool.c +++ b/usr.sbin/cxgbetool/cxgbetool.c @@ -100,7 +100,7 @@ usage(FILE *fp) "\thashfilter [ ] ... set a hashfilter\n" "\thashfilter delete|clear delete a hashfilter\n" "\thashfilter list list all hashfilters\n" - "\thashfilter mode get global hashfilter mode\n" + "\thashfilter mode [] ... get/set global hashfilter mode\n" "\ti2c [] read from i2c device\n" "\tloadboot [pf|offset ] install boot image\n" "\tloadboot clear [pf|offset ] remove boot image\n" @@ -1046,6 +1046,8 @@ get_filter_mode(int hashfilter) if (mode & T4_FILTER_VNIC) { if (mode & T4_FILTER_IC_VNIC) printf("vnic_id "); + else if (mode & T4_FILTER_IC_ENCAP) + printf("encap "); else printf("ovlan "); } @@ -1062,57 +1064,69 @@ get_filter_mode(int hashfilter) } static int -set_filter_mode(int argc, const char *argv[]) +set_filter_mode(int argc, const char *argv[], int hashfilter) { uint32_t mode = 0; - int vnic = 0, ovlan = 0; + int vnic = 0, ovlan = 0, invalid = 0; for (; argc; argc--, argv++) { - if (!strcmp(argv[0], "frag")) + if (!strcmp(argv[0], "ipv4") || !strcmp(argv[0], "ipv6") || + !strcmp(argv[0], "sip") || !strcmp(argv[0], "dip") || + !strcmp(argv[0], "sport") || !strcmp(argv[0], "dport")) { + /* These are always available and enabled. */ + continue; + } else if (!strcmp(argv[0], "frag")) mode |= T4_FILTER_IP_FRAGMENT; - - if (!strcmp(argv[0], "matchtype")) + else if (!strcmp(argv[0], "matchtype")) mode |= T4_FILTER_MPS_HIT_TYPE; - - if (!strcmp(argv[0], "macidx")) + else if (!strcmp(argv[0], "macidx")) mode |= T4_FILTER_MAC_IDX; - - if (!strcmp(argv[0], "ethtype")) + else if (!strcmp(argv[0], "ethtype")) mode |= T4_FILTER_ETH_TYPE; - - if (!strcmp(argv[0], "proto")) + else if (!strcmp(argv[0], "proto")) mode |= T4_FILTER_IP_PROTO; - - if (!strcmp(argv[0], "tos")) + else if (!strcmp(argv[0], "tos")) mode |= T4_FILTER_IP_TOS; - - if (!strcmp(argv[0], "vlan")) + else if (!strcmp(argv[0], "vlan")) mode |= T4_FILTER_VLAN; - - if (!strcmp(argv[0], "ovlan")) { + else if (!strcmp(argv[0], "ovlan")) { mode |= T4_FILTER_VNIC; - ovlan++; - } - - if (!strcmp(argv[0], "vnic_id")) { + ovlan = 1; + } else if (!strcmp(argv[0], "vnic_id")) { mode |= T4_FILTER_VNIC; mode |= T4_FILTER_IC_VNIC; - vnic++; + vnic = 1; } - - if (!strcmp(argv[0], "iport")) +#ifdef notyet + else if (!strcmp(argv[0], "encap")) { + mode |= T4_FILTER_VNIC; + mode |= T4_FILTER_IC_ENCAP; + encap = 1; + } +#endif + else if (!strcmp(argv[0], "iport")) mode |= T4_FILTER_PORT; - - if (!strcmp(argv[0], "fcoe")) + else if (!strcmp(argv[0], "fcoe")) mode |= T4_FILTER_FCoE; + else { + warnx("\"%s\" is not valid while setting filter mode.", + argv[0]); + invalid++; + } } - if (vnic > 0 && ovlan > 0) { + if (vnic + ovlan > 1) { warnx("\"vnic_id\" and \"ovlan\" are mutually exclusive."); - return (EINVAL); + invalid++; } - return doit(CHELSIO_T4_SET_FILTER_MODE, &mode); + if (invalid > 0) + return (EINVAL); + + if (hashfilter) + return doit(CHELSIO_T4_SET_FILTER_MASK, &mode); + else + return doit(CHELSIO_T4_SET_FILTER_MODE, &mode); } static int @@ -1420,8 +1434,8 @@ filter_cmd(int argc, const char *argv[], int hashfilter) return get_filter_mode(hashfilter); /* mode */ - if (!hashfilter && strcmp(argv[0], "mode") == 0) - return set_filter_mode(argc - 1, argv + 1); + if (strcmp(argv[0], "mode") == 0) + return set_filter_mode(argc - 1, argv + 1, hashfilter); /* ... */ s = str_to_number(argv[0], NULL, &val); From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:25:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E881B5423D5; Fri, 19 Feb 2021 22:25:22 +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 4Dj5kB2lLJz3h4x; Fri, 19 Feb 2021 22:25:22 +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 4F8961405F; Fri, 19 Feb 2021 22:25:22 +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 11JMPMJb093533; Fri, 19 Feb 2021 22:25:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMPMcM093532; Fri, 19 Feb 2021 22:25:22 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:25:22 GMT Message-Id: <202102192225.11JMPMcM093532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: 0460a45062df - main - cxgbe(4): Use the correct filter width for T5+. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0460a45062dfeb98b1f1f7a3a7b9268662b61545 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:25:23 -0000 The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=0460a45062dfeb98b1f1f7a3a7b9268662b61545 commit 0460a45062dfeb98b1f1f7a3a7b9268662b61545 Author: Navdeep Parhar AuthorDate: 2021-02-19 22:18:08 +0000 Commit: Navdeep Parhar CommitDate: 2021-02-19 22:23:58 +0000 cxgbe(4): Use the correct filter width for T5+. T5 and above have extra bits for the optional filter fields. This is a correctness issue and not just a waste because a filter mode valid on a T4 (36b) may not be valid on a T5+ (40b). MFC after: 2 weeks Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/common.h | 1 + sys/dev/cxgbe/common/t4_hw.c | 5 ++++- sys/dev/cxgbe/common/t4_hw.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h index 53be2fa2588a..e04101c9adc5 100644 --- a/sys/dev/cxgbe/common/common.h +++ b/sys/dev/cxgbe/common/common.h @@ -309,6 +309,7 @@ struct chip_params { u8 cng_ch_bits_log; /* congestion channel map bits width */ u8 nsched_cls; u8 cim_num_obq; + u8 filter_opt_len; u16 mps_rplc_size; u16 vfcount; u32 sge_fl_db; diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 8b22f2e4f5ba..b3934381ba7a 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -9241,6 +9241,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .cng_ch_bits_log = 2, .nsched_cls = 15, .cim_num_obq = CIM_NUM_OBQ, + .filter_opt_len = FILTER_OPT_LEN, .mps_rplc_size = 128, .vfcount = 128, .sge_fl_db = F_DBPRIO, @@ -9254,6 +9255,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .cng_ch_bits_log = 2, .nsched_cls = 16, .cim_num_obq = CIM_NUM_OBQ_T5, + .filter_opt_len = T5_FILTER_OPT_LEN, .mps_rplc_size = 128, .vfcount = 128, .sge_fl_db = F_DBPRIO | F_DBTYPE, @@ -9267,6 +9269,7 @@ const struct chip_params *t4_get_chip_params(int chipid) .cng_ch_bits_log = 3, .nsched_cls = 16, .cim_num_obq = CIM_NUM_OBQ_T5, + .filter_opt_len = T5_FILTER_OPT_LEN, .mps_rplc_size = 256, .vfcount = 256, .sge_fl_db = 0, @@ -10863,7 +10866,7 @@ int t4_set_filter_cfg(struct adapter *adap, int mode, int mask, int vnic_mode) int i, nbits, rc; uint32_t param, val; uint16_t fmode, fmask; - const int maxbits = FILTER_OPT_LEN; + const int maxbits = adap->chip_params->filter_opt_len; if (mode != -1 || mask != -1) { if (mode != -1) { diff --git a/sys/dev/cxgbe/common/t4_hw.h b/sys/dev/cxgbe/common/t4_hw.h index 36ce6271dad6..c0625b752962 100644 --- a/sys/dev/cxgbe/common/t4_hw.h +++ b/sys/dev/cxgbe/common/t4_hw.h @@ -55,6 +55,7 @@ enum { NTRACE = 4, /* # of tracing filters */ TRACE_LEN = 112, /* length of trace data and mask */ FILTER_OPT_LEN = 36, /* filter tuple width of optional components */ + T5_FILTER_OPT_LEN = 40, NWOL_PAT = 8, /* # of WoL patterns */ WOL_PAT_LEN = 128, /* length of WoL patterns */ UDBS_SEG_SIZE = 128, /* Segment size of BAR2 doorbells */ From owner-dev-commits-src-all@freebsd.org Fri Feb 19 22:35:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 24931542DD1; Fri, 19 Feb 2021 22:35: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 4Dj5xd0Vrsz3j79; Fri, 19 Feb 2021 22:35: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 043731422D; Fri, 19 Feb 2021 22:35: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 11JMZG7K006569; Fri, 19 Feb 2021 22:35:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11JMZGeR006568; Fri, 19 Feb 2021 22:35:16 GMT (envelope-from git) Date: Fri, 19 Feb 2021 22:35:16 GMT Message-Id: <202102192235.11JMZGeR006568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8cd1b2b1a7ab - main - boot: remove gptboot.efifat, it never should have been MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cd1b2b1a7ab55e96aaf40a401d8792f2697b274 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Feb 2021 22:35:17 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8cd1b2b1a7ab55e96aaf40a401d8792f2697b274 commit 8cd1b2b1a7ab55e96aaf40a401d8792f2697b274 Author: Warner Losh AuthorDate: 2021-02-19 22:34:25 +0000 Commit: Warner Losh CommitDate: 2021-02-19 22:34:25 +0000 boot: remove gptboot.efifat, it never should have been conical hat reduction: Make sure we also remove gotboot.efifat. It was created, briefly, and shouldn't have existed in the first place. Kill it at the same place we kill boot1.efifat. Pointy Hat to: imp@ --- ObsoleteFiles.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 696243470b14..61c8d3dba2fe 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -2610,8 +2610,9 @@ OLD_FILES+=usr/bin/mklocale OLD_FILES+=usr/share/man/man1/mklocale.1.gz OLD_FILES+=usr/bin/colldef OLD_FILES+=usr/share/man/man1/colldef.1.gz -# 20190904: Remove boot1.efifat +# 20190904: Remove boot1.efifat and gptboot.efifat (which never should have been) OLD_FILES+=boot/boot1.efifat +OLD_FILES+=boot/gptboot.efifat # 20190903: pc-sysinstall(8) removed OLD_FILES+=usr/share/examples/pc-sysinstall/README OLD_FILES+=usr/share/examples/pc-sysinstall/pc-autoinstall.conf From owner-dev-commits-src-all@freebsd.org Sat Feb 20 00:37:46 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6DB3F547035; Sat, 20 Feb 2021 00:37: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 4Dj8fx6MyLz3rbR; Sat, 20 Feb 2021 00:37: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 63DED15D82; Sat, 20 Feb 2021 00:37: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 11K0bjo7064952; Sat, 20 Feb 2021 00:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11K0bjIf064951; Sat, 20 Feb 2021 00:37:45 GMT (envelope-from git) Date: Sat, 20 Feb 2021 00:37:45 GMT Message-Id: <202102200037.11K0bjIf064951@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: ced29ea4fb42 - stable/13 - libpmc: fix linking with C programs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ced29ea4fb42a70301ba0770ec23e350155289f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 00:37:46 -0000 The branch stable/13 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ced29ea4fb42a70301ba0770ec23e350155289f1 commit ced29ea4fb42a70301ba0770ec23e350155289f1 Author: Alan Somers AuthorDate: 2021-02-15 22:51:31 +0000 Commit: Alan Somers CommitDate: 2021-02-20 00:36:50 +0000 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Reported-by: Dom Dwyer Reviewed By: vangyzen Differential Revision: https://reviews.freebsd.org/D28550 (cherry picked from commit 04e34c0202ea50cea67d5779f54bc612c74e6532) --- lib/libpmc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 01554e9b1526..42aa14e58471 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -6,6 +6,7 @@ SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat +LDADD+= -lc++ .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" From owner-dev-commits-src-all@freebsd.org Sat Feb 20 00:45:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B0E06547FD0; Sat, 20 Feb 2021 00:45: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 4Dj8qJ4h05z3sy6; Sat, 20 Feb 2021 00:45: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 937CA15FBE; Sat, 20 Feb 2021 00:45: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 11K0j0cF077396; Sat, 20 Feb 2021 00:45:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11K0j0gc077395; Sat, 20 Feb 2021 00:45:00 GMT (envelope-from git) Date: Sat, 20 Feb 2021 00:45:00 GMT Message-Id: <202102200045.11K0j0gc077395@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 418d29545e0b - stable/12 - libpmc: fix linking with C programs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 418d29545e0b98b269c346adc6931359065ffbdb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 00:45:00 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=418d29545e0b98b269c346adc6931359065ffbdb commit 418d29545e0b98b269c346adc6931359065ffbdb Author: Alan Somers AuthorDate: 2021-02-15 22:51:31 +0000 Commit: Alan Somers CommitDate: 2021-02-20 00:43:14 +0000 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Reported-by: Dom Dwyer Reviewed By: vangyzen Differential Revision: https://reviews.freebsd.org/D28550 (cherry picked from commit 04e34c0202ea50cea67d5779f54bc612c74e6532) --- lib/libpmc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 35bacb26bd11..f4b5516274be 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -8,6 +8,7 @@ INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${.CURDIR} CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align +LDADD+= -lc++ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" From owner-dev-commits-src-all@freebsd.org Sat Feb 20 02:51:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 281AF54F27A; Sat, 20 Feb 2021 02:51: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 4DjCdK0cvGz4Xtg; Sat, 20 Feb 2021 02:51: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 080901745B; Sat, 20 Feb 2021 02:51: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 11K2pWEl046530; Sat, 20 Feb 2021 02:51:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11K2pWOW046529; Sat, 20 Feb 2021 02:51:32 GMT (envelope-from git) Date: Sat, 20 Feb 2021 02:51:32 GMT Message-Id: <202102200251.11K2pWOW046529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 150fc89a12a7 - main - libdtrace: Trivial style fixes to force dt_lex.c to be regenerated 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/main X-Git-Reftype: branch X-Git-Commit: 150fc89a12a7e41b8e7f5777d2ed762f7e40ea92 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 02:51:33 -0000 The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=150fc89a12a7e41b8e7f5777d2ed762f7e40ea92 commit 150fc89a12a7e41b8e7f5777d2ed762f7e40ea92 Author: Mark Johnston AuthorDate: 2021-02-20 02:44:20 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 02:51:18 +0000 libdtrace: Trivial style fixes to force dt_lex.c to be regenerated After commit 8ba333e02e ("libdtrace: Stop relying on lex compatibility"), there have been several reports of incremental buildworlds failing since make does not know that dt_lex.c needs to be regenerated, and I want to avoid this when merging to stable/13. MFC with: 8ba333e02e --- .../contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 192e1e20d82c..7dcf21652586 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -51,16 +51,17 @@ /* * Define YY_INPUT for flex since input() can't be re-defined. */ -#define YY_INPUT(buf,result,max_size) \ - if (yypcb->pcb_fileptr != NULL) { \ - if (((result = fread(buf, 1, max_size, yypcb->pcb_fileptr)) == 0) \ - && ferror(yypcb->pcb_fileptr)) \ +#define YY_INPUT(buf, result, max_size) \ + if (yypcb->pcb_fileptr != NULL) { \ + if (((result = fread(buf, 1, max_size, yypcb->pcb_fileptr)) == \ + 0) && ferror(yypcb->pcb_fileptr)) \ longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \ - } else { \ - int n; \ - for (n = 0; n < max_size && \ - yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; n++) \ - buf[n] = *yypcb->pcb_strptr++; \ + } else { \ + int n; \ + for (n = 0; n < max_size && \ + yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; \ + n++) \ + buf[n] = *yypcb->pcb_strptr++; \ result = n; \ } /* From owner-dev-commits-src-all@freebsd.org Sat Feb 20 03:26:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 597A75335E0; Sat, 20 Feb 2021 03:26:16 +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 4DjDPN24TJz4bgM; Sat, 20 Feb 2021 03:26:16 +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 39F761802E; Sat, 20 Feb 2021 03:26:16 +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 11K3QGZ6089198; Sat, 20 Feb 2021 03:26:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11K3QGDJ089197; Sat, 20 Feb 2021 03:26:16 GMT (envelope-from git) Date: Sat, 20 Feb 2021 03:26:16 GMT Message-Id: <202102200326.11K3QGDJ089197@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: de8d66b37823 - stable/12 - Revert "libpmc: fix linking with C programs" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: de8d66b378233b37590cac5b4fdf46e6606dcf22 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 03:26:16 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=de8d66b378233b37590cac5b4fdf46e6606dcf22 commit de8d66b378233b37590cac5b4fdf46e6606dcf22 Author: Alan Somers AuthorDate: 2021-02-20 03:25:15 +0000 Commit: Alan Somers CommitDate: 2021-02-20 03:25:15 +0000 Revert "libpmc: fix linking with C programs" This reverts commit 418d29545e0b98b269c346adc6931359065ffbdb. It causes build failures on GCC platforms in stable/12, even though it doesn't in 13 and later. --- lib/libpmc/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index f4b5516274be..35bacb26bd11 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -8,7 +8,6 @@ INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${.CURDIR} CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align -LDADD+= -lc++ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" From owner-dev-commits-src-all@freebsd.org Sat Feb 20 08:06:20 2021 Return-Path: Delivered-To: dev-commits-src-all@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 C5DA253D552; Sat, 20 Feb 2021 08:06: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 4DjLcX5HYkz4rlV; Sat, 20 Feb 2021 08:06: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 A44691BBE8; Sat, 20 Feb 2021 08:06: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 11K86Kqg058047; Sat, 20 Feb 2021 08:06:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11K86KED058046; Sat, 20 Feb 2021 08:06:20 GMT (envelope-from git) Date: Sat, 20 Feb 2021 08:06:20 GMT Message-Id: <202102200806.11K86KED058046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Guangyuan Yang Subject: git: 504e64af32ba - main - pwrite(2): add a BUGS section MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ygy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 504e64af32ba6c62fdcc894a3b1da76061c64796 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 08:06:20 -0000 The branch main has been updated by ygy (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=504e64af32ba6c62fdcc894a3b1da76061c64796 commit 504e64af32ba6c62fdcc894a3b1da76061c64796 Author: Guangyuan Yang AuthorDate: 2021-02-20 08:03:15 +0000 Commit: Guangyuan Yang CommitDate: 2021-02-20 08:05:43 +0000 pwrite(2): add a BUGS section Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd. MFC after: 3 days Submitted by: Ka Ho Ng Reviewed by: gbe, yuripv Differential Revision: https://reviews.freebsd.org/D28372 --- lib/libc/sys/write.2 | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/libc/sys/write.2 b/lib/libc/sys/write.2 index f05db0de81c4..937e95b53a14 100644 --- a/lib/libc/sys/write.2 +++ b/lib/libc/sys/write.2 @@ -28,7 +28,7 @@ .\" @(#)write.2 8.5 (Berkeley) 4/2/94 .\" $FreeBSD$ .\" -.Dd October 25, 2020 +.Dd February 11, 2021 .Dt WRITE 2 .Os .Sh NAME @@ -298,3 +298,17 @@ The .Fn write function appeared in .At v1 . +.Sh BUGS +The +.Fn pwrite +system call appends the file without changing the file offset if +.Dv O_APPEND +is set, contrary to +.St -p1003.1-2008 +where +.Fn pwrite +writes into +.Fa offset +regardless of whether +.Dv O_APPEND +is set. From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:35:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D633854D6A4; Sat, 20 Feb 2021 16:35: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 4DjYwS5jXdz3sfT; Sat, 20 Feb 2021 16:35: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 B69B0224A7; Sat, 20 Feb 2021 16:35: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 11KGZq36028791; Sat, 20 Feb 2021 16:35:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZqJh028790; Sat, 20 Feb 2021 16:35:52 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:52 GMT Message-Id: <202102201635.11KGZqJh028790@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: e1cbe25f5f36 - stable/12 - libc/nss tests: Style 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/12 X-Git-Reftype: branch X-Git-Commit: e1cbe25f5f36839b9ce042dfb0ce2a89b91f5d05 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:35:52 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1cbe25f5f36839b9ce042dfb0ce2a89b91f5d05 commit e1cbe25f5f36839b9ce042dfb0ce2a89b91f5d05 Author: Mark Johnston AuthorDate: 2021-01-21 19:30:18 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libc/nss tests: Style Sponsored by: The FreeBSD Foundation (cherry picked from commit ed14c69d5679b9a6b86722be698b3060d4b74946) --- lib/libc/tests/nss/getgr_test.c | 32 ++++++++++++++++---------------- lib/libc/tests/nss/getpw_test.c | 39 ++++++++++++++++++++------------------- lib/libc/tests/nss/testutil.h | 2 +- 3 files changed, 37 insertions(+), 36 deletions(-) diff --git a/lib/libc/tests/nss/getgr_test.c b/lib/libc/tests/nss/getgr_test.c index 757382b02f39..ec06d5cf2f6c 100644 --- a/lib/libc/tests/nss/getgr_test.c +++ b/lib/libc/tests/nss/getgr_test.c @@ -62,8 +62,7 @@ static void free_group(struct group *); static void sdump_group(struct group *, char *, size_t); static int group_read_snapshot_func(struct group *, char *); -static int group_check_ambiguity(struct group_test_data *, - struct group *); +static int group_check_ambiguity(struct group_test_data *, struct group *); static int group_fill_test_data(struct group_test_data *); static int group_test_correctness(struct group *, void *); static int group_test_getgrnam(struct group *, void *); @@ -175,7 +174,7 @@ sdump_group(struct group *grp, char *buffer, size_t buflen) int written; written = snprintf(buffer, buflen, "%s:%s:%d:", - grp->gr_name, grp->gr_passwd, grp->gr_gid); + grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; if (written > (int)buflen) return; @@ -340,8 +339,8 @@ static int group_check_ambiguity(struct group_test_data *td, struct group *pwd) { - return (TEST_DATA_FIND(group, td, pwd, compare_group, - NULL) != NULL ? 0 : -1); + return (TEST_DATA_FIND(group, td, pwd, compare_group, NULL) != + NULL ? 0 : -1); } static int @@ -377,18 +376,19 @@ group_test_getgrgid(struct group *grp_model, void *mdata) grp = getgrgid(grp_model->gr_gid); if (group_test_correctness(grp, NULL) != 0 || (compare_group(grp, grp_model, NULL) != 0 && - group_check_ambiguity((struct group_test_data *)mdata, grp) != 0)) { + group_check_ambiguity((struct group_test_data *)mdata, grp) != 0)) return (-1); - } else { + else return (0); - } } static int group_test_getgrent(struct group *grp, void *mdata __unused) { - /* Only correctness can be checked when doing 1-pass test for - * getgrent(). */ + /* + * Only correctness can be checked when doing 1-pass test for + * getgrent(). + */ return (group_test_correctness(grp, NULL)); } @@ -451,12 +451,12 @@ run_tests(const char *snapshot_file, enum test_methods method) compare_group, NULL); break; case TEST_GETGRENT_2PASS: - TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); - rv = group_fill_test_data(&td_2pass); - if (rv != -1) - rv = DO_2PASS_TEST(group, &td, &td_2pass, - compare_group, NULL); - TEST_DATA_DESTROY(group, &td_2pass); + TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); + rv = group_fill_test_data(&td_2pass); + if (rv != -1) + rv = DO_2PASS_TEST(group, &td, &td_2pass, + compare_group, NULL); + TEST_DATA_DESTROY(group, &td_2pass); break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) diff --git a/lib/libc/tests/nss/getpw_test.c b/lib/libc/tests/nss/getpw_test.c index c7ad2e5a4889..e7c5304005ec 100644 --- a/lib/libc/tests/nss/getpw_test.c +++ b/lib/libc/tests/nss/getpw_test.c @@ -302,8 +302,8 @@ static int passwd_check_ambiguity(struct passwd_test_data *td, struct passwd *pwd) { - return (TEST_DATA_FIND(passwd, td, pwd, compare_passwd, - NULL) != NULL ? 0 : -1); + return (TEST_DATA_FIND(passwd, td, pwd, compare_passwd, NULL) != + NULL ? 0 : -1); } static int @@ -320,10 +320,9 @@ passwd_test_getpwnam(struct passwd *pwd_model, void *mdata) if (passwd_test_correctness(pwd, NULL) != 0) goto errfin; - if ((compare_passwd(pwd, pwd_model, NULL) != 0) && - (passwd_check_ambiguity((struct passwd_test_data *)mdata, pwd) - !=0)) - goto errfin; + if (compare_passwd(pwd, pwd_model, NULL) != 0 && + passwd_check_ambiguity((struct passwd_test_data *)mdata, pwd) != 0) + goto errfin; #ifdef DEBUG printf("ok\n"); @@ -348,10 +347,10 @@ passwd_test_getpwuid(struct passwd *pwd_model, void *mdata) #endif pwd = getpwuid(pwd_model->pw_uid); - if ((passwd_test_correctness(pwd, NULL) != 0) || - ((compare_passwd(pwd, pwd_model, NULL) != 0) && - (passwd_check_ambiguity((struct passwd_test_data *)mdata, pwd) - != 0))) { + if (passwd_test_correctness(pwd, NULL) != 0 || + (compare_passwd(pwd, pwd_model, NULL) != 0 && + passwd_check_ambiguity((struct passwd_test_data *)mdata, + pwd) != 0)) { #ifdef DEBUG printf("not ok\n"); #endif @@ -367,8 +366,10 @@ passwd_test_getpwuid(struct passwd *pwd_model, void *mdata) static int passwd_test_getpwent(struct passwd *pwd, void *mdata __unused) { - /* Only correctness can be checked when doing 1-pass test for - * getpwent(). */ + /* + * Only correctness can be checked when doing 1-pass test for + * getpwent(). + */ return (passwd_test_correctness(pwd, NULL)); } @@ -397,7 +398,7 @@ run_tests(const char *snapshot_file, enum test_methods method) } TEST_SNAPSHOT_FILE_READ(passwd, snapshot_file, - &td_snap, passwd_read_snapshot_func); + &td_snap, passwd_read_snapshot_func); } } @@ -409,26 +410,26 @@ run_tests(const char *snapshot_file, enum test_methods method) case TEST_GETPWNAM: if (snapshot_file == NULL) rv = DO_1PASS_TEST(passwd, &td, - passwd_test_getpwnam, (void *)&td); + passwd_test_getpwnam, (void *)&td); else rv = DO_1PASS_TEST(passwd, &td_snap, - passwd_test_getpwnam, (void *)&td_snap); + passwd_test_getpwnam, (void *)&td_snap); break; case TEST_GETPWUID: if (snapshot_file == NULL) rv = DO_1PASS_TEST(passwd, &td, - passwd_test_getpwuid, (void *)&td); + passwd_test_getpwuid, (void *)&td); else rv = DO_1PASS_TEST(passwd, &td_snap, - passwd_test_getpwuid, (void *)&td_snap); + passwd_test_getpwuid, (void *)&td_snap); break; case TEST_GETPWENT: if (snapshot_file == NULL) rv = DO_1PASS_TEST(passwd, &td, passwd_test_getpwent, - (void *)&td); + (void *)&td); else rv = DO_2PASS_TEST(passwd, &td, &td_snap, - compare_passwd, NULL); + compare_passwd, NULL); break; case TEST_GETPWENT_2PASS: TEST_DATA_INIT(passwd, &td_2pass, clone_passwd, free_passwd); diff --git a/lib/libc/tests/nss/testutil.h b/lib/libc/tests/nss/testutil.h index ff9e8f0a9304..7b55e16580d1 100644 --- a/lib/libc/tests/nss/testutil.h +++ b/lib/libc/tests/nss/testutil.h @@ -325,6 +325,6 @@ __##ent##_2pass_test(struct ent##_test_data *td1, \ { \ int rv; \ \ - rv = __##ent##_test_data_compare(td1, td2, cmp_func, cmp_mdata); \ + rv = __##ent##_test_data_compare(td1, td2, cmp_func, cmp_mdata);\ return (rv); \ } From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:35:54 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0DB6754D591; Sat, 20 Feb 2021 16:35:54 +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 4DjYwT6y9mz3sLj; Sat, 20 Feb 2021 16:35: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 E1F0B22425; Sat, 20 Feb 2021 16:35: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 11KGZr4h028809; Sat, 20 Feb 2021 16:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZr6W028808; Sat, 20 Feb 2021 16:35:53 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:53 GMT Message-Id: <202102201635.11KGZr6W028808@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: c4573b48c6db - stable/12 - libc/nss tests: Fix getpw and getgr single-pass tests 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/12 X-Git-Reftype: branch X-Git-Commit: c4573b48c6db5963451edb92e98361305b78d6ab Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:35:54 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c4573b48c6db5963451edb92e98361305b78d6ab commit c4573b48c6db5963451edb92e98361305b78d6ab Author: Mark Johnston AuthorDate: 2021-01-21 19:30:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libc/nss tests: Fix getpw and getgr single-pass tests Some NSS regression tests for getgrent(3) and getpwent(3) were not testing anything because the test incorrectly requested creation of a database snapshot. Sponsored by: The FreeBSD Foundation (cherry picked from commit 7abc10098b3d9c23d611294714b3058e8048aec0) --- lib/libc/tests/nss/getgr_test.c | 16 ++++------------ lib/libc/tests/nss/getpw_test.c | 24 ++++-------------------- 2 files changed, 8 insertions(+), 32 deletions(-) diff --git a/lib/libc/tests/nss/getgr_test.c b/lib/libc/tests/nss/getgr_test.c index ec06d5cf2f6c..568b7daece9c 100644 --- a/lib/libc/tests/nss/getgr_test.c +++ b/lib/libc/tests/nss/getgr_test.c @@ -480,14 +480,12 @@ fin: ATF_TC_WITHOUT_HEAD(getgrent); ATF_TC_BODY(getgrent, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRENT) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETGRENT) == 0); } ATF_TC_WITHOUT_HEAD(getgrent_with_snapshot); ATF_TC_BODY(getgrent_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRENT) == 0); } @@ -495,21 +493,18 @@ ATF_TC_BODY(getgrent_with_snapshot, tc) ATF_TC_WITHOUT_HEAD(getgrent_with_two_pass); ATF_TC_BODY(getgrent_with_two_pass, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRENT_2PASS) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETGRENT_2PASS) == 0); } ATF_TC_WITHOUT_HEAD(getgrgid); ATF_TC_BODY(getgrgid, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRGID) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETGRGID) == 0); } ATF_TC_WITHOUT_HEAD(getgrgid_with_snapshot); ATF_TC_BODY(getgrgid_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRGID) == 0); } @@ -517,21 +512,18 @@ ATF_TC_BODY(getgrgid_with_snapshot, tc) ATF_TC_WITHOUT_HEAD(getgrnam); ATF_TC_BODY(getgrnam, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRNAM) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETGRNAM) == 0); } ATF_TC_WITHOUT_HEAD(getgrnam_with_snapshot); ATF_TC_BODY(getgrnam_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRNAM) == 0); } ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, getgrent); ATF_TP_ADD_TC(tp, getgrent_with_snapshot); ATF_TP_ADD_TC(tp, getgrent_with_two_pass); diff --git a/lib/libc/tests/nss/getpw_test.c b/lib/libc/tests/nss/getpw_test.c index e7c5304005ec..40b1820b95ed 100644 --- a/lib/libc/tests/nss/getpw_test.c +++ b/lib/libc/tests/nss/getpw_test.c @@ -458,24 +458,15 @@ fin: #define SNAPSHOT_FILE "snapshot_pwd" -ATF_TC_WITHOUT_HEAD(build_snapshot); -ATF_TC_BODY(build_snapshot, tc) -{ - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); -} - ATF_TC_WITHOUT_HEAD(getpwent); ATF_TC_BODY(getpwent, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWENT) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETPWENT) == 0); } ATF_TC_WITHOUT_HEAD(getpwent_with_snapshot); ATF_TC_BODY(getpwent_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWENT) == 0); } @@ -483,21 +474,18 @@ ATF_TC_BODY(getpwent_with_snapshot, tc) ATF_TC_WITHOUT_HEAD(getpwent_with_two_pass); ATF_TC_BODY(getpwent_with_two_pass, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWENT_2PASS) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETPWENT_2PASS) == 0); } ATF_TC_WITHOUT_HEAD(getpwnam); ATF_TC_BODY(getpwnam, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWNAM) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETPWNAM) == 0); } ATF_TC_WITHOUT_HEAD(getpwnam_with_snapshot); ATF_TC_BODY(getpwnam_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWNAM) == 0); } @@ -505,22 +493,18 @@ ATF_TC_BODY(getpwnam_with_snapshot, tc) ATF_TC_WITHOUT_HEAD(getpwuid); ATF_TC_BODY(getpwuid, tc) { - - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWUID) == 0); + ATF_REQUIRE(run_tests(NULL, TEST_GETPWUID) == 0); } ATF_TC_WITHOUT_HEAD(getpwuid_with_snapshot); ATF_TC_BODY(getpwuid_with_snapshot, tc) { - ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_BUILD_SNAPSHOT) == 0); ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWUID) == 0); } ATF_TP_ADD_TCS(tp) { - - ATF_TP_ADD_TC(tp, build_snapshot); ATF_TP_ADD_TC(tp, getpwent); ATF_TP_ADD_TC(tp, getpwent_with_snapshot); ATF_TP_ADD_TC(tp, getpwent_with_two_pass); From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:35:55 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A278E54D593; Sat, 20 Feb 2021 16:35: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 4DjYwW2FqDz3sT6; Sat, 20 Feb 2021 16:35: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 0908922171; Sat, 20 Feb 2021 16:35: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 11KGZsgW028831; Sat, 20 Feb 2021 16:35:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZsMN028830; Sat, 20 Feb 2021 16:35:54 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:54 GMT Message-Id: <202102201635.11KGZsMN028830@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: a8499077ab1b - stable/12 - libc/nss: Restore iterator state when doing passwd/group lookups 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/12 X-Git-Reftype: branch X-Git-Commit: a8499077ab1b23c432c251874cf931e1025d8636 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:35:55 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a8499077ab1b23c432c251874cf931e1025d8636 commit a8499077ab1b23c432c251874cf931e1025d8636 Author: Mark Johnston AuthorDate: 2021-01-21 19:30:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libc/nss: Restore iterator state when doing passwd/group lookups The getpwent(3) and getgrent(3) implementations maintain some internal iterator state. Interleaved calls to functions which do passwd/group lookups using a key, such as getpwnam(3), would in some cases clobber this state, causing a subsequent getpwent() or getgrent() call to restart iteration from the beginning of the database or to terminate early. This is particularly troublesome in programming environments where execution of green threads is interleaved within a single OS thread. Take care to restore any iterator state following a keyed lookup. The "files" provider for the passwd database was already handling this correctly, but "compat" was not, and both providers had this problem when accessing the group database. PR: 252094 Submitted by: Viktor Dukhovni (cherry picked from commit 5619d49e07d3942e438f3d06269f3c1c466cf5b7) --- lib/libc/gen/getgrent.c | 34 +++++++++++++++------------------- lib/libc/gen/getpwent.c | 18 +++++++++++------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index b3699cae3c45..6abccea30c6b 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -882,16 +882,12 @@ files_group(void *retval, void *mdata, va_list ap) } fresh = 1; } - if (how == nss_lt_all) - stayopen = 1; - else { - if (!fresh) - rewind(st->fp); - stayopen = st->stayopen; - } - rv = NS_NOTFOUND; + stayopen = (how == nss_lt_all || !fresh) ? 1 : st->stayopen; if (stayopen) pos = ftello(st->fp); + if (how != nss_lt_all && !fresh) + rewind(st->fp); + rv = NS_NOTFOUND; while ((line = fgetln(st->fp, &linesize)) != NULL) { if (line[linesize-1] == '\n') linesize--; @@ -913,13 +909,15 @@ files_group(void *retval, void *mdata, va_list ap) &buffer[linesize + 1], bufsize - linesize - 1, errnop); if (rv & NS_TERMINATE) break; - if (stayopen) + if (how == nss_lt_all) pos = ftello(st->fp); } if (st->fp != NULL && !stayopen) { fclose(st->fp); st->fp = NULL; } + if (st->fp != NULL && how != nss_lt_all) + fseeko(st->fp, pos, SEEK_SET); if (rv == NS_SUCCESS && retval != NULL) *(struct group **)retval = grp; else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL) @@ -1364,13 +1362,11 @@ compat_group(void *retval, void *mdata, va_list ap) } fresh = 1; } - if (how == nss_lt_all) - stayopen = 1; - else { - if (!fresh) - rewind(st->fp); - stayopen = st->stayopen; - } + stayopen = (how == nss_lt_all || !fresh) ? 1 : st->stayopen; + if (stayopen) + pos = ftello(st->fp); + if (how != nss_lt_all && !fresh) + rewind(st->fp); docompat: switch (st->compat) { case COMPAT_MODE_ALL: @@ -1431,8 +1427,6 @@ docompat: break; } rv = NS_NOTFOUND; - if (stayopen) - pos = ftello(st->fp); while ((line = fgetln(st->fp, &linesize)) != NULL) { if (line[linesize-1] == '\n') linesize--; @@ -1473,7 +1467,7 @@ docompat: &buffer[linesize + 1], bufsize - linesize - 1, errnop); if (rv & NS_TERMINATE) break; - if (stayopen) + if (how == nss_lt_all) pos = ftello(st->fp); } fin: @@ -1481,6 +1475,8 @@ fin: fclose(st->fp); st->fp = NULL; } + if (st->fp != NULL && how != nss_lt_all) + fseeko(st->fp, pos, SEEK_SET); if (rv == NS_SUCCESS && retval != NULL) *(struct group **)retval = grp; else if (rv == NS_RETURN && *errnop == ERANGE && st->fp != NULL) diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 09f84f9576ee..a07ee109e2df 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -1733,6 +1733,7 @@ compat_passwd(void *retval, void *mdata, va_list ap) { char keybuf[MAXLOGNAME + 1]; DBT key, entry; + pwkeynum keynum; struct compat_state *st; enum nss_lookup_type how; const char *name; @@ -1783,9 +1784,10 @@ compat_passwd(void *retval, void *mdata, va_list ap) rv = NS_NOTFOUND; goto fin; } + keynum = st->keynum; stayopen = 1; } else { - st->keynum = 0; + keynum = 0; stayopen = st->stayopen; } docompat: @@ -1829,13 +1831,13 @@ docompat: } key.data = keybuf; rv = NS_NOTFOUND; - while (st->keynum >= 0) { - st->keynum++; + while (keynum >= 0) { + keynum++; if (st->version < _PWD_CURRENT_VERSION) { - memcpy(&keybuf[1], &st->keynum, sizeof(st->keynum)); - key.size = sizeof(st->keynum) + 1; + memcpy(&keybuf[1], &keynum, sizeof(keynum)); + key.size = sizeof(keynum) + 1; } else { - store = htonl(st->keynum); + store = htonl(keynum); memcpy(&keybuf[1], &store, sizeof(store)); key.size = sizeof(store) + 1; } @@ -1846,7 +1848,7 @@ docompat: rv = NS_UNAVAIL; goto fin; } else if (rv == 1) { - st->keynum = -1; + keynum = -1; rv = NS_NOTFOUND; goto fin; } @@ -1931,6 +1933,8 @@ docompat: break; } fin: + if (how == nss_lt_all) + st->keynum = keynum; if (st->db != NULL && !stayopen) { (void)st->db->close(st->db); st->db = NULL; From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:35:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 22DDF54D594; Sat, 20 Feb 2021 16:35: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 4DjYwX5QJMz3sj0; Sat, 20 Feb 2021 16:35:56 +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 42BB5221CC; Sat, 20 Feb 2021 16:35:56 +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 11KGZus4028851; Sat, 20 Feb 2021 16:35:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZuVl028850; Sat, 20 Feb 2021 16:35:56 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:56 GMT Message-Id: <202102201635.11KGZuVl028850@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: 31f3fbbcd484 - stable/12 - libc/nss tests: Add regression tests for commit 55444c823e1f 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/12 X-Git-Reftype: branch X-Git-Commit: 31f3fbbcd48492e67323fcb54985129fb972801a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:35:57 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=31f3fbbcd48492e67323fcb54985129fb972801a commit 31f3fbbcd48492e67323fcb54985129fb972801a Author: Mark Johnston AuthorDate: 2021-01-21 19:30:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libc/nss tests: Add regression tests for commit 55444c823e1f PR: 252094 Sponsored by: The FreeBSD Foundation (cherry picked from commit 6e411d8b14ec5402b7551073e2f9edc4d680dd49) --- lib/libc/tests/nss/getgr_test.c | 61 +++++++++++++++++++++++++++++++++-------- lib/libc/tests/nss/getpw_test.c | 51 +++++++++++++++++++++++++++++----- 2 files changed, 93 insertions(+), 19 deletions(-) diff --git a/lib/libc/tests/nss/getgr_test.c b/lib/libc/tests/nss/getgr_test.c index 568b7daece9c..63dfea085095 100644 --- a/lib/libc/tests/nss/getgr_test.c +++ b/lib/libc/tests/nss/getgr_test.c @@ -42,11 +42,13 @@ __FBSDID("$FreeBSD$"); #include "testutil.h" enum test_methods { - TEST_GETGRENT = 1, - TEST_GETGRNAM = 2, - TEST_GETGRGID = 4, - TEST_GETGRENT_2PASS = 8, - TEST_BUILD_SNAPSHOT = 16, + TEST_GETGRENT, + TEST_GETGRNAM, + TEST_GETGRGID, + TEST_GETGRENT_2PASS, + TEST_GETGRENT_INTERLEAVED_GETGRNAM, + TEST_GETGRENT_INTERLEAVED_GETGRGID, + TEST_BUILD_SNAPSHOT, }; DECLARE_TEST_DATA(group) @@ -63,7 +65,8 @@ static void sdump_group(struct group *, char *, size_t); static int group_read_snapshot_func(struct group *, char *); static int group_check_ambiguity(struct group_test_data *, struct group *); -static int group_fill_test_data(struct group_test_data *); +static int group_fill_test_data(struct group_test_data *, + int (*cb)(struct group *, void *)); static int group_test_correctness(struct group *, void *); static int group_test_getgrnam(struct group *, void *); static int group_test_getgrgid(struct group *, void *); @@ -289,16 +292,20 @@ dump_group(struct group *result) } static int -group_fill_test_data(struct group_test_data *td) +group_fill_test_data(struct group_test_data *td, + int (*cb)(struct group *, void *)) { struct group *grp; setgroupent(1); while ((grp = getgrent()) != NULL) { - if (group_test_correctness(grp, NULL) == 0) + if (group_test_correctness(grp, NULL) == 0) { TEST_DATA_APPEND(group, td, grp); - else + if (cb != NULL && cb(grp, td) != 0) + return (-1); + } else { return (-1); + } } endgrent(); @@ -395,7 +402,7 @@ group_test_getgrent(struct group *grp, void *mdata __unused) static int run_tests(const char *snapshot_file, enum test_methods method) { - struct group_test_data td, td_snap, td_2pass; + struct group_test_data td, td_snap, td_2pass, td_interleaved; int rv; TEST_DATA_INIT(group, &td, clone_group, free_group); @@ -422,7 +429,7 @@ run_tests(const char *snapshot_file, enum test_methods method) } } - rv = group_fill_test_data(&td); + rv = group_fill_test_data(&td, NULL); if (rv == -1) return (-1); switch (method) { @@ -452,12 +459,28 @@ run_tests(const char *snapshot_file, enum test_methods method) break; case TEST_GETGRENT_2PASS: TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); - rv = group_fill_test_data(&td_2pass); + rv = group_fill_test_data(&td_2pass, NULL); if (rv != -1) rv = DO_2PASS_TEST(group, &td, &td_2pass, compare_group, NULL); TEST_DATA_DESTROY(group, &td_2pass); break; + case TEST_GETGRENT_INTERLEAVED_GETGRNAM: + TEST_DATA_INIT(group, &td_interleaved, clone_group, free_group); + rv = group_fill_test_data(&td_interleaved, group_test_getgrnam); + if (rv != -1) + rv = DO_2PASS_TEST(group, &td, &td_interleaved, + compare_group, NULL); + TEST_DATA_DESTROY(group, &td_interleaved); + break; + case TEST_GETGRENT_INTERLEAVED_GETGRGID: + TEST_DATA_INIT(group, &td_interleaved, clone_group, free_group); + rv = group_fill_test_data(&td_interleaved, group_test_getgrgid); + if (rv != -1) + rv = DO_2PASS_TEST(group, &td, &td_interleaved, + compare_group, NULL); + TEST_DATA_DESTROY(group, &td_interleaved); + break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, @@ -522,6 +545,18 @@ ATF_TC_BODY(getgrnam_with_snapshot, tc) ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETGRNAM) == 0); } +ATF_TC_WITHOUT_HEAD(getgrent_interleaved_getgrnam); +ATF_TC_BODY(getgrent_interleaved_getgrnam, tc) +{ + ATF_REQUIRE(run_tests(NULL, TEST_GETGRENT_INTERLEAVED_GETGRNAM) == 0); +} + +ATF_TC_WITHOUT_HEAD(getgrent_interleaved_getgrgid); +ATF_TC_BODY(getgrent_interleaved_getgrgid, tc) +{ + ATF_REQUIRE(run_tests(NULL, TEST_GETGRENT_INTERLEAVED_GETGRGID) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, getgrent); @@ -531,6 +566,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getgrgid_with_snapshot); ATF_TP_ADD_TC(tp, getgrnam); ATF_TP_ADD_TC(tp, getgrnam_with_snapshot); + ATF_TP_ADD_TC(tp, getgrent_interleaved_getgrnam); + ATF_TP_ADD_TC(tp, getgrent_interleaved_getgrgid); return (atf_no_error()); } diff --git a/lib/libc/tests/nss/getpw_test.c b/lib/libc/tests/nss/getpw_test.c index 40b1820b95ed..1d9ae6c1a5db 100644 --- a/lib/libc/tests/nss/getpw_test.c +++ b/lib/libc/tests/nss/getpw_test.c @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); enum test_methods { TEST_GETPWENT, + TEST_GETPWENT_INTERLEAVED_GETPWNAM, + TEST_GETPWENT_INTERLEAVED_GETPWUID, TEST_GETPWNAM, TEST_GETPWUID, TEST_GETPWENT_2PASS, @@ -64,7 +66,8 @@ static void dump_passwd(struct passwd *); static int passwd_read_snapshot_func(struct passwd *, char *); static int passwd_check_ambiguity(struct passwd_test_data *, struct passwd *); -static int passwd_fill_test_data(struct passwd_test_data *); +static int passwd_fill_test_data(struct passwd_test_data *, + int (*cb)(struct passwd *, void *)); static int passwd_test_correctness(struct passwd *, void *); static int passwd_test_getpwnam(struct passwd *, void *); static int passwd_test_getpwuid(struct passwd *, void *); @@ -236,16 +239,20 @@ fin: } static int -passwd_fill_test_data(struct passwd_test_data *td) +passwd_fill_test_data(struct passwd_test_data *td, + int (*cb)(struct passwd *, void *)) { struct passwd *pwd; setpassent(1); while ((pwd = getpwent()) != NULL) { - if (passwd_test_correctness(pwd, NULL) == 0) + if (passwd_test_correctness(pwd, NULL) == 0) { TEST_DATA_APPEND(passwd, td, pwd); - else + if (cb != NULL && cb(pwd, td) != 0) + return (-1); + } else { return (-1); + } } endpwent(); @@ -376,7 +383,7 @@ passwd_test_getpwent(struct passwd *pwd, void *mdata __unused) static int run_tests(const char *snapshot_file, enum test_methods method) { - struct passwd_test_data td, td_snap, td_2pass; + struct passwd_test_data td, td_snap, td_2pass, td_interleaved; int rv; TEST_DATA_INIT(passwd, &td, clone_passwd, free_passwd); @@ -402,7 +409,7 @@ run_tests(const char *snapshot_file, enum test_methods method) } } - rv = passwd_fill_test_data(&td); + rv = passwd_fill_test_data(&td, NULL); if (rv == -1) return (-1); @@ -433,12 +440,28 @@ run_tests(const char *snapshot_file, enum test_methods method) break; case TEST_GETPWENT_2PASS: TEST_DATA_INIT(passwd, &td_2pass, clone_passwd, free_passwd); - rv = passwd_fill_test_data(&td_2pass); + rv = passwd_fill_test_data(&td_2pass, NULL); if (rv != -1) rv = DO_2PASS_TEST(passwd, &td, &td_2pass, compare_passwd, NULL); TEST_DATA_DESTROY(passwd, &td_2pass); break; + case TEST_GETPWENT_INTERLEAVED_GETPWNAM: + TEST_DATA_INIT(passwd, &td_interleaved, clone_passwd, free_passwd); + rv = passwd_fill_test_data(&td_interleaved, passwd_test_getpwnam); + if (rv != -1) + rv = DO_2PASS_TEST(passwd, &td, &td_interleaved, + compare_passwd, NULL); + TEST_DATA_DESTROY(passwd, &td_interleaved); + break; + case TEST_GETPWENT_INTERLEAVED_GETPWUID: + TEST_DATA_INIT(passwd, &td_interleaved, clone_passwd, free_passwd); + rv = passwd_fill_test_data(&td_interleaved, passwd_test_getpwuid); + if (rv != -1) + rv = DO_2PASS_TEST(passwd, &td, &td_interleaved, + compare_passwd, NULL); + TEST_DATA_DESTROY(passwd, &td_interleaved); + break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) rv = TEST_SNAPSHOT_FILE_WRITE(passwd, snapshot_file, @@ -503,6 +526,18 @@ ATF_TC_BODY(getpwuid_with_snapshot, tc) ATF_REQUIRE(run_tests(SNAPSHOT_FILE, TEST_GETPWUID) == 0); } +ATF_TC_WITHOUT_HEAD(getpwent_interleaved_getpwnam); +ATF_TC_BODY(getpwent_interleaved_getpwnam, tc) +{ + ATF_REQUIRE(run_tests(NULL, TEST_GETPWENT_INTERLEAVED_GETPWNAM) == 0); +} + +ATF_TC_WITHOUT_HEAD(getpwent_interleaved_getpwuid); +ATF_TC_BODY(getpwent_interleaved_getpwuid, tc) +{ + ATF_REQUIRE(run_tests(NULL, TEST_GETPWENT_INTERLEAVED_GETPWUID) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, getpwent); @@ -512,6 +547,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getpwnam_with_snapshot); ATF_TP_ADD_TC(tp, getpwuid); ATF_TP_ADD_TC(tp, getpwuid_with_snapshot); + ATF_TP_ADD_TC(tp, getpwent_interleaved_getpwnam); + ATF_TP_ADD_TC(tp, getpwent_interleaved_getpwuid); return (atf_no_error()); } From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:35:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4D90B54D6C8; Sat, 20 Feb 2021 16:35: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 4DjYwY5tgPz3sj4; Sat, 20 Feb 2021 16:35: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 55A91221CD; Sat, 20 Feb 2021 16:35: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 11KGZv8J028878; Sat, 20 Feb 2021 16:35:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZvoc028877; Sat, 20 Feb 2021 16:35:57 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:57 GMT Message-Id: <202102201635.11KGZvoc028877@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: a46d7192f41a - stable/12 - libc/nss: Ensure that setgroupent(3) actually works as advertised 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/12 X-Git-Reftype: branch X-Git-Commit: a46d7192f41aa977a49bb3aae2947131186878ca Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:35:58 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a46d7192f41aa977a49bb3aae2947131186878ca commit a46d7192f41aa977a49bb3aae2947131186878ca Author: Mark Johnston AuthorDate: 2021-01-21 19:30:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libc/nss: Ensure that setgroupent(3) actually works as advertised Because the "files" and "compat" implementations failed to set the "stayopen", keyed lookups would close the database handle, contrary to the purpose of setgroupent(3). setpassent(3)'s implementation does not have this bug. PR: 165527 Submitted by: Andrey Simonenko (cherry picked from commit 48a186863431ec7a23c6174bc376cafa59dd5fbf) --- lib/libc/gen/getgrent.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 6abccea30c6b..afb89cab308b 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -824,6 +824,7 @@ files_setgrent(void *retval, void *mdata, va_list ap) rewind(st->fp); else if (stayopen) st->fp = fopen(_PATH_GROUP, "re"); + st->stayopen = stayopen; break; case ENDGRENT: if (st->fp != NULL) { @@ -1271,6 +1272,7 @@ compat_setgrent(void *retval, void *mdata, va_list ap) rewind(st->fp); else if (stayopen) st->fp = fopen(_PATH_GROUP, "re"); + st->stayopen = stayopen; set_setent(dtab, mdata); (void)_nsdispatch(NULL, dtab, NSDB_GROUP_COMPAT, "setgrent", compatsrc, 0); From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:36:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D738554CFFC; Sat, 20 Feb 2021 16:36: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 4DjYwb0BDQz3sRp; Sat, 20 Feb 2021 16:35: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 8083921F56; Sat, 20 Feb 2021 16:35: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 11KGZwCg028897; Sat, 20 Feb 2021 16:35:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZwee028896; Sat, 20 Feb 2021 16:35:58 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:58 GMT Message-Id: <202102201635.11KGZwee028896@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: 92cf69cb8da6 - stable/12 - libcasper/cap_grp tests: Reset the group database handle 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/12 X-Git-Reftype: branch X-Git-Commit: 92cf69cb8da62688a9e77cb1baeab083d075728d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:36:01 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=92cf69cb8da62688a9e77cb1baeab083d075728d commit 92cf69cb8da62688a9e77cb1baeab083d075728d Author: Mark Johnston AuthorDate: 2021-01-21 19:30:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 libcasper/cap_grp tests: Reset the group database handle Some tests verify that the capgrp capability does not permit calls to setgrent(3), but all tests need to ensure that they reset the capability's group database handle, otherwise the local process and casper process will be out of sync. The cap_pwd tests already handle this. Sponsored by: The FreeBSD Foundation (cherry picked from commit 1a05d9519de62cc0f7719a995fded0926d8b2747) --- lib/libcasper/services/cap_grp/tests/grp_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libcasper/services/cap_grp/tests/grp_test.c b/lib/libcasper/services/cap_grp/tests/grp_test.c index e2bb5e22eb1a..1e84e293e214 100644 --- a/lib/libcasper/services/cap_grp/tests/grp_test.c +++ b/lib/libcasper/services/cap_grp/tests/grp_test.c @@ -321,6 +321,8 @@ test_cmds(cap_channel_t *origcapgrp) capgrp = cap_clone(origcapgrp); CHECK(capgrp != NULL); + cap_setgrent(capgrp); + cmds[0] = "getgrent"; cmds[1] = "getgrent_r"; cmds[2] = "getgrnam"; @@ -361,6 +363,8 @@ test_cmds(cap_channel_t *origcapgrp) capgrp = cap_clone(origcapgrp); CHECK(capgrp != NULL); + cap_setgrent(capgrp); + cmds[0] = "getgrent"; cmds[1] = "getgrent_r"; cmds[2] = "getgrnam"; From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:36:02 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F227754D52E; Sat, 20 Feb 2021 16:36: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 4DjYwc2mmKz3sf0; Sat, 20 Feb 2021 16:36: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 8A8B322509; Sat, 20 Feb 2021 16:35: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 11KGZx08028919; Sat, 20 Feb 2021 16:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGZx2u028918; Sat, 20 Feb 2021 16:35:59 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:35:59 GMT Message-Id: <202102201635.11KGZx2u028918@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: d666638e2434 - stable/12 - usr.sbin/praudit: Fix tests after 5619d49e07 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/12 X-Git-Reftype: branch X-Git-Commit: d666638e243411709cb08ec1f5494864d6b2d849 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:36:03 -0000 The branch stable/12 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d666638e243411709cb08ec1f5494864d6b2d849 commit d666638e243411709cb08ec1f5494864d6b2d849 Author: Alex Richardson AuthorDate: 2021-02-03 15:26:19 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:35:32 +0000 usr.sbin/praudit: Fix tests after 5619d49e07 Commit 5619d49e07 made the getgrgid() call inside bsm work as intended so we now print "wheel" instead of a numeric 0 in the rgid field. Reviewed By: markj Differential Revision: https://reviews.freebsd.org/D28462 (cherry picked from commit 7791ecf04b48a0c365b003447f479ec890115dfc) --- usr.sbin/praudit/tests/input/del_comma | 2 +- usr.sbin/praudit/tests/input/del_underscore | 2 +- usr.sbin/praudit/tests/input/no_args | 2 +- usr.sbin/praudit/tests/input/numeric_form | 2 +- usr.sbin/praudit/tests/input/same_line | 2 +- usr.sbin/praudit/tests/input/short_form | 2 +- usr.sbin/praudit/tests/input/xml_form | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/usr.sbin/praudit/tests/input/del_comma b/usr.sbin/praudit/tests/input/del_comma index 3dbec7bd2c5d..09f089450ac3 100644 --- a/usr.sbin/praudit/tests/input/del_comma +++ b/usr.sbin/praudit/tests/input/del_comma @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,0,7053,4724,37636,10.0.2.2 +subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 diff --git a/usr.sbin/praudit/tests/input/del_underscore b/usr.sbin/praudit/tests/input/del_underscore index ca515ed49ef3..cfc7d4a932f0 100644 --- a/usr.sbin/praudit/tests/input/del_underscore +++ b/usr.sbin/praudit/tests/input/del_underscore @@ -2,6 +2,6 @@ header_113_11_socket(2)_0_Mon Jun 11 10:18:45 2018_ + 380 msec argument_1_0x1c_domain argument_2_0x2_type argument_3_0x0_protocol -subject_root_root_wheel_root_0_7053_4724_37636_10.0.2.2 +subject_root_root_wheel_root_wheel_7053_4724_37636_10.0.2.2 return_success_3 trailer_113 diff --git a/usr.sbin/praudit/tests/input/no_args b/usr.sbin/praudit/tests/input/no_args index 3dbec7bd2c5d..09f089450ac3 100644 --- a/usr.sbin/praudit/tests/input/no_args +++ b/usr.sbin/praudit/tests/input/no_args @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,0,7053,4724,37636,10.0.2.2 +subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 diff --git a/usr.sbin/praudit/tests/input/numeric_form b/usr.sbin/praudit/tests/input/numeric_form index 3dbec7bd2c5d..09f089450ac3 100644 --- a/usr.sbin/praudit/tests/input/numeric_form +++ b/usr.sbin/praudit/tests/input/numeric_form @@ -2,6 +2,6 @@ header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,0,7053,4724,37636,10.0.2.2 +subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 diff --git a/usr.sbin/praudit/tests/input/same_line b/usr.sbin/praudit/tests/input/same_line index 7662c3c6ed37..5a8f19d8901f 100644 --- a/usr.sbin/praudit/tests/input/same_line +++ b/usr.sbin/praudit/tests/input/same_line @@ -1 +1 @@ -header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec,argument,1,0x1c,domain,argument,2,0x2,type,argument,3,0x0,protocol,subject,root,root,wheel,root,0,7053,4724,37636,10.0.2.2,return,success,3,trailer,113, +header,113,11,socket(2),0,Mon Jun 11 10:18:45 2018, + 380 msec,argument,1,0x1c,domain,argument,2,0x2,type,argument,3,0x0,protocol,subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2,return,success,3,trailer,113, diff --git a/usr.sbin/praudit/tests/input/short_form b/usr.sbin/praudit/tests/input/short_form index cc1a705940bb..8e5751fd9efe 100644 --- a/usr.sbin/praudit/tests/input/short_form +++ b/usr.sbin/praudit/tests/input/short_form @@ -2,6 +2,6 @@ header,113,11,AUE_SOCKET,0,Mon Jun 11 10:18:45 2018, + 380 msec argument,1,0x1c,domain argument,2,0x2,type argument,3,0x0,protocol -subject,root,root,wheel,root,0,7053,4724,37636,10.0.2.2 +subject,root,root,wheel,root,wheel,7053,4724,37636,10.0.2.2 return,success,3 trailer,113 diff --git a/usr.sbin/praudit/tests/input/xml_form b/usr.sbin/praudit/tests/input/xml_form index e49b00c028da..d19adeed2b3f 100644 --- a/usr.sbin/praudit/tests/input/xml_form +++ b/usr.sbin/praudit/tests/input/xml_form @@ -4,7 +4,7 @@ - + From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:40:41 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9B67254D8D7; Sat, 20 Feb 2021 16:40: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 4DjZ2143GTz3tfX; Sat, 20 Feb 2021 16:40: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 7DED822431; Sat, 20 Feb 2021 16:40: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 11KGef8M037148; Sat, 20 Feb 2021 16:40:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGefkV037147; Sat, 20 Feb 2021 16:40:41 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:40:41 GMT Message-Id: <202102201640.11KGefkV037147@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: af8073117938 - stable/13 - libdtrace: Stop relying on lex compatibility 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: af80731179386cf019463e392370b6478a714aea Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:40:41 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=af80731179386cf019463e392370b6478a714aea commit af80731179386cf019463e392370b6478a714aea Author: Mark Johnston AuthorDate: 2021-02-17 15:49:38 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 02:39:51 +0000 libdtrace: Stop relying on lex compatibility It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached. PR: 253440 Sponsored by: The FreeBSD Foundation (cherry picked from commit 8ba333e02eaa59337a4e1d5534d4e894344c8226) --- cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h | 2 +- cddl/lib/libdtrace/Makefile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h index f2c60a2b07d4..b3f69bb6329d 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h @@ -717,7 +717,7 @@ extern dt_pcb_t *yypcb; /* pointer to current parser control block */ extern char yyintprefix; /* int token prefix for macros (+/-) */ extern char yyintsuffix[4]; /* int token suffix ([uUlL]*) */ extern int yyintdecimal; /* int token is decimal (1) or octal/hex (0) */ -extern char yytext[]; /* lex input buffer */ +extern char *yytext; /* lex input buffer */ extern int yylineno; /* lex line number */ extern int yydebug; /* lex debugging */ extern dt_node_t *yypragma; /* lex token list for control lines */ diff --git a/cddl/lib/libdtrace/Makefile b/cddl/lib/libdtrace/Makefile index efd73751e2c0..45ca1692cf48 100644 --- a/cddl/lib/libdtrace/Makefile +++ b/cddl/lib/libdtrace/Makefile @@ -129,8 +129,6 @@ SRCS+= dis_tables.c DSRCS+= regs_x86.d .endif -LFLAGS+=-l - YFLAGS+=-d LIBADD= ctf elf proc pthread rtld_db From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:40:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BBEC154D8DC; Sat, 20 Feb 2021 16:40: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 4DjZ224zbVz3tZ4; Sat, 20 Feb 2021 16:40: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 9DCE621F63; Sat, 20 Feb 2021 16:40: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 11KGegEB037170; Sat, 20 Feb 2021 16:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGeg8S037169; Sat, 20 Feb 2021 16:40:42 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:40:42 GMT Message-Id: <202102201640.11KGeg8S037169@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: d69677407ef5 - stable/13 - libdtrace: Trivial style fixes to force dt_lex.c to be regenerated 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: d69677407ef5ba3bd038d595447c1302e720ea1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:40:42 -0000 The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d69677407ef5ba3bd038d595447c1302e720ea1b commit d69677407ef5ba3bd038d595447c1302e720ea1b Author: Mark Johnston AuthorDate: 2021-02-20 02:44:20 +0000 Commit: Mark Johnston CommitDate: 2021-02-20 16:39:53 +0000 libdtrace: Trivial style fixes to force dt_lex.c to be regenerated After commit 8ba333e02e ("libdtrace: Stop relying on lex compatibility"), there have been several reports of incremental buildworlds failing since make does not know that dt_lex.c needs to be regenerated, and I want to avoid this when merging to stable/13. MFC with: 8ba333e02e (cherry picked from commit 150fc89a12a7e41b8e7f5777d2ed762f7e40ea92) --- .../contrib/opensolaris/lib/libdtrace/common/dt_lex.l | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l index 192e1e20d82c..7dcf21652586 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l @@ -51,16 +51,17 @@ /* * Define YY_INPUT for flex since input() can't be re-defined. */ -#define YY_INPUT(buf,result,max_size) \ - if (yypcb->pcb_fileptr != NULL) { \ - if (((result = fread(buf, 1, max_size, yypcb->pcb_fileptr)) == 0) \ - && ferror(yypcb->pcb_fileptr)) \ +#define YY_INPUT(buf, result, max_size) \ + if (yypcb->pcb_fileptr != NULL) { \ + if (((result = fread(buf, 1, max_size, yypcb->pcb_fileptr)) == \ + 0) && ferror(yypcb->pcb_fileptr)) \ longjmp(yypcb->pcb_jmpbuf, EDT_FIO); \ - } else { \ - int n; \ - for (n = 0; n < max_size && \ - yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; n++) \ - buf[n] = *yypcb->pcb_strptr++; \ + } else { \ + int n; \ + for (n = 0; n < max_size && \ + yypcb->pcb_strptr < yypcb->pcb_string + yypcb->pcb_strlen; \ + n++) \ + buf[n] = *yypcb->pcb_strptr++; \ result = n; \ } /* From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:56:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CC93E54E466; Sat, 20 Feb 2021 16:56: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 4DjZNS5Q18z3w9v; Sat, 20 Feb 2021 16:56: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 AD109229E1; Sat, 20 Feb 2021 16:56: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 11KGueG4055563; Sat, 20 Feb 2021 16:56:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGueo3055562; Sat, 20 Feb 2021 16:56:40 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:56:40 GMT Message-Id: <202102201656.11KGueo3055562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fbc57e2df95b - main - bsdinstall: replace multiple ifs with case 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/main X-Git-Reftype: branch X-Git-Commit: fbc57e2df95b582f7d3287ed3919337bfec5711a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:56:40 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc57e2df95b582f7d3287ed3919337bfec5711a commit fbc57e2df95b582f7d3287ed3919337bfec5711a Author: Ed Maste AuthorDate: 2021-01-29 19:00:29 +0000 Commit: Ed Maste CommitDate: 2021-02-20 16:54:31 +0000 bsdinstall: replace multiple ifs with case Reduce copy-paste and use a more typical construct. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28417 --- usr.sbin/bsdinstall/scripts/hardening | 46 ++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/hardening b/usr.sbin/bsdinstall/scripts/hardening index 9fea1b6aed5d..58ea0a112e26 100755 --- a/usr.sbin/bsdinstall/scripts/hardening +++ b/usr.sbin/bsdinstall/scripts/hardening @@ -52,38 +52,40 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ exec 3>&- for feature in $FEATURES; do - if [ "$feature" = "hide_uids" ]; then + case "$feature" in + hide_uids) echo security.bsd.see_other_uids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "hide_gids" ]; then + ;; + hide_gids) echo security.bsd.see_other_gids=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "hide_jail" ]; then + ;; + hide_jail) echo security.bsd.see_jail_proc=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "read_msgbuf" ]; then + ;; + read_msgbuf) echo security.bsd.unprivileged_read_msgbuf=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "proc_debug" ]; then + ;; + proc_debug) echo security.bsd.unprivileged_proc_debug=0 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "random_pid" ]; then + ;; + random_pid) echo kern.randompid=1 >> $BSDINSTALL_TMPETC/sysctl.conf.hardening - fi - if [ "$feature" = "clear_tmp" ]; then + ;; + clear_tmp) echo 'clear_tmp_enable="YES"' >> $BSDINSTALL_TMPETC/rc.conf.hardening - fi - if [ "$feature" = "disable_syslogd" ]; then + ;; + disable_syslogd) echo 'syslogd_flags="-ss"' >> $BSDINSTALL_TMPETC/rc.conf.hardening - fi - if [ "$feature" = "disable_sendmail" ]; then + ;; + disable_sendmail) echo 'sendmail_enable="NONE"' >> $BSDINSTALL_TMPETC/rc.conf.hardening - fi - if [ "$feature" = "secure_console" ]; then + ;; + secure_console) sed "s/unknown off secure/unknown off insecure/g" $BSDINSTALL_CHROOT/etc/ttys > $BSDINSTALL_TMPETC/ttys.hardening - fi - if [ "$feature" = "disable_ddtrace" ]; then + ;; + disable_ddtrace) echo 'security.bsd.allow_destructive_dtrace=0' >> $BSDINSTALL_TMPBOOT/loader.conf.hardening - fi + ;; + esac done From owner-dev-commits-src-all@freebsd.org Sat Feb 20 16:56:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 01FE154E471; Sat, 20 Feb 2021 16:56: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 4DjZNT6d9yz3w9w; Sat, 20 Feb 2021 16:56: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 D6BC2227C3; Sat, 20 Feb 2021 16:56: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 11KGufR0055585; Sat, 20 Feb 2021 16:56:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KGufOD055584; Sat, 20 Feb 2021 16:56:41 GMT (envelope-from git) Date: Sat, 20 Feb 2021 16:56:41 GMT Message-Id: <202102201656.11KGufOD055584@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 020f4112559e - main - bsdinstall: add knob to set ASLR sysctls 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/main X-Git-Reftype: branch X-Git-Commit: 020f4112559ebf7e94665c9a69f89d21929ce82a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 16:56:42 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=020f4112559ebf7e94665c9a69f89d21929ce82a commit 020f4112559ebf7e94665c9a69f89d21929ce82a Author: Ed Maste AuthorDate: 2021-01-29 19:15:28 +0000 Commit: Ed Maste CommitDate: 2021-02-20 16:55:00 +0000 bsdinstall: add knob to set ASLR sysctls Reviewed by: mw Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28418 --- usr.sbin/bsdinstall/scripts/hardening | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/hardening b/usr.sbin/bsdinstall/scripts/hardening index 58ea0a112e26..67ee3672712d 100755 --- a/usr.sbin/bsdinstall/scripts/hardening +++ b/usr.sbin/bsdinstall/scripts/hardening @@ -28,6 +28,20 @@ : ${DIALOG_OK=0} +set_aslr_sysctls() +{ + for bit in 32 64; do + if ! sysctl -Nq kern.elf$bit.aslr.enable >/dev/null; then + continue + fi + cat >> $BSDINSTALL_TMPETC/sysctl.conf.hardening <<-EOF + kern.elf$bit.aslr.enable=1 + kern.elf$bit.aslr.pie_enable=1 + kern.elf$bit.aslr.honor_sbrk=0 + EOF + done +} + echo -n > $BSDINSTALL_TMPETC/rc.conf.hardening echo -n > $BSDINSTALL_TMPETC/sysctl.conf.hardening echo -n > $BSDINSTALL_TMPBOOT/loader.conf.hardening @@ -48,6 +62,7 @@ FEATURES=$( dialog --backtitle "FreeBSD Installer" \ "8 disable_sendmail" "Disable Sendmail service" ${disable_sendmail:-off} \ "9 secure_console" "Enable console password prompt" ${secure_console:-off} \ "10 disable_ddtrace" "Disallow DTrace destructive-mode" ${disable_ddtrace:-off} \ + "11 enable_aslr" "Enable address layout randomization" ${enable_aslr:-off} \ 2>&1 1>&3 ) exec 3>&- @@ -86,6 +101,9 @@ for feature in $FEATURES; do disable_ddtrace) echo 'security.bsd.allow_destructive_dtrace=0' >> $BSDINSTALL_TMPBOOT/loader.conf.hardening ;; + enable_aslr) + set_aslr_sysctls + ;; esac done From owner-dev-commits-src-all@freebsd.org Sat Feb 20 18:27:29 2021 Return-Path: Delivered-To: dev-commits-src-all@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 ACF085506E4; Sat, 20 Feb 2021 18:27: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 4DjcPF4XX0z4W1d; Sat, 20 Feb 2021 18:27: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 8E85C23AEC; Sat, 20 Feb 2021 18:27: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 11KIRTtH074060; Sat, 20 Feb 2021 18:27:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KIRTmB074059; Sat, 20 Feb 2021 18:27:29 GMT (envelope-from git) Date: Sat, 20 Feb 2021 18:27:29 GMT Message-Id: <202102201827.11KIRTmB074059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: e5b394f2d0d9 - main - Fix setting static entries for arp/ndp. 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/main X-Git-Reftype: branch X-Git-Commit: e5b394f2d0d94f190c9da2346fd22d7c6fb14730 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 18:27:29 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=e5b394f2d0d94f190c9da2346fd22d7c6fb14730 commit e5b394f2d0d94f190c9da2346fd22d7c6fb14730 Author: Alexander V. Chernikov AuthorDate: 2021-02-20 18:21:52 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-20 18:26:35 +0000 Fix setting static entries for arp/ndp. rtsock message validation changes committed in 2fe5a79425c7 did not take llinfo messages into account. Add a special validation case for RTA_GATEWAY llinfo messages. MFC after: 2 days --- sys/net/if_llatbl.c | 1 + sys/net/rtsock.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c index 97a8e3e9ccc1..7225869a07d0 100644 --- a/sys/net/if_llatbl.c +++ b/sys/net/if_llatbl.c @@ -693,6 +693,7 @@ lla_rt_output(struct rt_msghdr *rtm, struct rt_addrinfo *info) if (dl == NULL || dl->sdl_family != AF_LINK) return (EINVAL); + /* XXX: should be ntohs() */ ifp = ifnet_byindex(dl->sdl_index); if (ifp == NULL) { log(LOG_INFO, "%s: invalid ifp (sdl_index %d)\n", diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 221661585bbf..12e485f917c8 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1323,11 +1323,37 @@ fill_sockaddr_inet6(struct sockaddr_in6 *sin6, const struct in6_addr *addr6, } #endif +/* + * Checks if gateway is suitable for lltable operations. + * Lltable code requires AF_LINK gateway with ifindex + * and mac address specified. + * Returns 0 on success. + */ +static int +cleanup_xaddrs_lladdr(struct rt_addrinfo *info) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)info->rti_info[RTAX_GATEWAY]; + + if (sdl->sdl_family != AF_LINK) + return (EINVAL); + + if (sdl->sdl_index == 0) + return (EINVAL); + + if (offsetof(struct sockaddr_dl, sdl_data) + sdl->sdl_nlen + sdl->sdl_alen > sdl->sdl_len) + return (EINVAL); + + return (0); +} + static int cleanup_xaddrs_gateway(struct rt_addrinfo *info) { struct sockaddr *gw = info->rti_info[RTAX_GATEWAY]; + if (info->rti_flags & RTF_LLDATA) + return (cleanup_xaddrs_lladdr(info)); + switch (gw->sa_family) { #ifdef INET case AF_INET: From owner-dev-commits-src-all@freebsd.org Sat Feb 20 18:27:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 CB65755055E; Sat, 20 Feb 2021 18:27: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 4DjcPG5M0gz4Vgb; Sat, 20 Feb 2021 18:27: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 A936123C9C; Sat, 20 Feb 2021 18:27: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 11KIRUMO074082; Sat, 20 Feb 2021 18:27:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KIRUdA074081; Sat, 20 Feb 2021 18:27:30 GMT (envelope-from git) Date: Sat, 20 Feb 2021 18:27:30 GMT Message-Id: <202102201827.11KIRUdA074081@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Alexander V. Chernikov" Subject: git: f17f94cd1b99 - main - Add arp/ndp tests in addition to rtsock ll tests. 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/main X-Git-Reftype: branch X-Git-Commit: f17f94cd1b99c61faa08aa988b47805c53b78ac7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 18:27:30 -0000 The branch main has been updated by melifaro: URL: https://cgit.FreeBSD.org/src/commit/?id=f17f94cd1b99c61faa08aa988b47805c53b78ac7 commit f17f94cd1b99c61faa08aa988b47805c53b78ac7 Author: Alexander V. Chernikov AuthorDate: 2021-02-20 18:20:24 +0000 Commit: Alexander V. Chernikov CommitDate: 2021-02-20 18:26:36 +0000 Add arp/ndp tests in addition to rtsock ll tests. --- tests/sys/netinet/Makefile | 2 +- tests/sys/netinet/arp.sh | 97 +++++++++++++++++++++++++++++++++++++ tests/sys/netinet6/Makefile | 3 +- tests/sys/netinet6/ndp.sh | 115 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 215 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 7dd21c3545b5..56a1cf877135 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -10,7 +10,7 @@ ATF_TESTS_C= ip_reass_test \ socket_afinet \ tcp_connect_port_test -ATF_TESTS_SH= carp fibs fibs_test redirect divert forward output lpm +ATF_TESTS_SH= carp fibs fibs_test redirect divert forward output lpm arp TEST_METADATA.output+= required_programs="python" PROGS= udp_dontroute tcp_user_cookie diff --git a/tests/sys/netinet/arp.sh b/tests/sys/netinet/arp.sh new file mode 100755 index 000000000000..8b5b30911314 --- /dev/null +++ b/tests/sys/netinet/arp.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2021 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "arp_add_success" "cleanup" +arp_add_success_head() { + atf_set descr 'Test static arp record addition' + atf_set require.user root +} + +arp_add_success_body() { + + vnet_init + + jname="v4t-arp_add_success" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + jexec ${jname} ifconfig ${epair0}a inet 198.51.100.1/24 + + atf_check jexec ${jname} arp -s 198.51.100.2 90:10:00:01:02:03 + + atf_check -o match:"\? \(198.51.100.2\) at 90:10:00:01:02:03 on ${epair0}a permanent" jexec ${jname} arp -ni ${epair0}a 198.51.100.2 +} + +arp_add_success_cleanup() { + vnet_cleanup +} + + +atf_test_case "arp_del_success" "cleanup" +arp_del_success_head() { + atf_set descr 'Test arp record deletion' + atf_set require.user root +} + +arp_del_success_body() { + + vnet_init + + jname="v4t-arp_del_success" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + jexec ${jname} ifconfig ${epair0}a inet 198.51.100.1/24 + + jexec ${jname} ping -c1 -t1 198.51.100.2 + + atf_check -o match:"198.51.100.2 \(198.51.100.2\) deleted" jexec ${jname} arp -nd 198.51.100.2 +} + +arp_del_success_cleanup() { + vnet_cleanup +} + + +atf_init_test_cases() +{ + + atf_add_test_case "arp_add_success" + atf_add_test_case "arp_del_success" +} + +# end + diff --git a/tests/sys/netinet6/Makefile b/tests/sys/netinet6/Makefile index 0ad95af97c83..dfae9f698ec4 100644 --- a/tests/sys/netinet6/Makefile +++ b/tests/sys/netinet6/Makefile @@ -14,7 +14,8 @@ ATF_TESTS_SH= \ forward6 \ output6 \ lpm6 \ - fibs6 + fibs6 \ + ndp TEST_METADATA.output6+= required_programs="python" ${PACKAGE}FILES+= exthdr.py diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh new file mode 100755 index 000000000000..2b26ffd4c448 --- /dev/null +++ b/tests/sys/netinet6/ndp.sh @@ -0,0 +1,115 @@ +#!/usr/bin/env atf-sh +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2021 Alexander V. Chernikov +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +. $(atf_get_srcdir)/../common/vnet.subr + +atf_test_case "ndp_add_gu_success" "cleanup" +ndp_add_gu_success_head() { + atf_set descr 'Test static ndp record addition' + atf_set require.user root +} + +ndp_add_gu_success_body() { + + vnet_init + + jname="v6t-ndp_add_success" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + jexec ${jname} ndp -i ${epair0}a -- -disabled + jexec ${jname} ifconfig ${epair0}a up + + jexec ${jname} ifconfig ${epair0}a inet6 2001:db8::1/64 + + # wait for DAD to complete + while [ `jexec ${jname} ifconfig | grep inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + + atf_check jexec ${jname} ndp -s 2001:db8::2 90:10:00:01:02:03 + + t=`jexec ${jname} ndp -an | grep 2001:db8::2 | awk '{print $1, $2, $3, $4}'` + if [ "${t}" != "2001:db8::2 90:10:00:01:02:03 ${epair0}a permanent" ]; then + atf_fail "Wrong output: ${t}" + fi + echo "T='${t}'" +} + +ndp_add_gu_success_cleanup() { + vnet_cleanup +} + +atf_test_case "ndp_del_gu_success" "cleanup" +ndp_del_gu_success_head() { + atf_set descr 'Test ndp record deletion' + atf_set require.user root +} + +ndp_del_gu_success_body() { + + vnet_init + + jname="v6t-ndp_del_gu_success" + + epair0=$(vnet_mkepair) + + vnet_mkjail ${jname} ${epair0}a + + jexec ${jname} ndp -i ${epair0}a -- -disabled + jexec ${jname} ifconfig ${epair0}a up + + jexec ${jname} ifconfig ${epair0}a inet6 2001:db8::1/64 + + # wait for DAD to complete + while [ `jexec ${jname} ifconfig | grep inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + + jexec ${jname} ping -c1 -t1 2001:db8::2 + + atf_check -o match:"2001:db8::2 \(2001:db8::2\) deleted" jexec ${jname} ndp -nd 2001:db8::2 +} + +ndp_del_success_cleanup() { + vnet_cleanup +} + + +atf_init_test_cases() +{ + + atf_add_test_case "ndp_add_gu_success" + atf_add_test_case "ndp_del_gu_success" +} + +# end + From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:18:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1F18F5517A9; Sat, 20 Feb 2021 19:18: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 4DjdXC0KM4z4Ysh; Sat, 20 Feb 2021 19:18: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 F215E24378; Sat, 20 Feb 2021 19:18: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 11KJIYmH040290; Sat, 20 Feb 2021 19:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJIYcY040289; Sat, 20 Feb 2021 19:18:34 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:18:34 GMT Message-Id: <202102201918.11KJIYcY040289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 944f43165580 - stable/13 - arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 944f4316558055a2bb6481048386e94b523ab48c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:18:35 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=944f4316558055a2bb6481048386e94b523ab48c commit 944f4316558055a2bb6481048386e94b523ab48c Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:11:36 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-20 19:17:40 +0000 arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE The node have now a compatible with simple-mfd so we need to attach at the same pass so the specific driver will be used. MFC after: 3 days PR: 252971 (cherry picked from commit 1cf282363101f5d99b1dadfb0d3250bbe6f482a5) --- sys/arm/broadcom/bcm2835/bcm2835_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c index 1a061e60a823..03eb4878d23a 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c @@ -180,5 +180,5 @@ DEFINE_CLASS_1(bcm2835_firmware, bcm2835_firmware_driver, simplebus_driver); EARLY_DRIVER_MODULE(bcm2835_firmware, simplebus, bcm2835_firmware_driver, - bcm2835_firmware_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); + bcm2835_firmware_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LATE); MODULE_DEPEND(bcm2835_firmware, mbox, 1, 1, 1); From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:18:36 2021 Return-Path: Delivered-To: dev-commits-src-all@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 31FC455174B; Sat, 20 Feb 2021 19:18: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 4DjdXD0qnmz4Yxc; Sat, 20 Feb 2021 19:18: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 0FDE424904; Sat, 20 Feb 2021 19:18: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 11KJIZTO040311; Sat, 20 Feb 2021 19:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJIZQx040310; Sat, 20 Feb 2021 19:18:35 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:18:35 GMT Message-Id: <202102201918.11KJIZQx040310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 796faf365c0e - stable/13 - arm64: rpi4: gpio: Add brcm, bcm2711-gpio compatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 796faf365c0ea0f50f5138ff8fa62fe48ff3ef71 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:18:36 -0000 The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=796faf365c0ea0f50f5138ff8fa62fe48ff3ef71 commit 796faf365c0ea0f50f5138ff8fa62fe48ff3ef71 Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:12:45 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-20 19:17:44 +0000 arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible Looks like we never enabled the main gpio controller on the RPI4 board. Now gpio are usable. MFC after: 3 days (cherry picked from commit 2551d928501fb613dba09b7ffe7e383dba276ca6) --- sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 61513df9c008..70b69eb154e8 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -157,6 +157,7 @@ enum bcm_gpio_pud { static struct ofw_compat_data compat_data[] = { {"broadcom,bcm2835-gpio", 1}, {"brcm,bcm2835-gpio", 1}, + {"brcm,bcm2711-gpio", 1}, {NULL, 0} }; From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:23:45 2021 Return-Path: Delivered-To: dev-commits-src-all@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 096FD551ADC; Sat, 20 Feb 2021 19:23: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 4Djdf86tc9z4Zgh; Sat, 20 Feb 2021 19:23: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 DF2AC24A24; Sat, 20 Feb 2021 19:23: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 11KJNig6052446; Sat, 20 Feb 2021 19:23:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJNi8R052445; Sat, 20 Feb 2021 19:23:44 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:23:44 GMT Message-Id: <202102201923.11KJNi8R052445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: a8e431e1537d - main - PRR: use accurate rfc6675_pipe when enabled 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/main X-Git-Reftype: branch X-Git-Commit: a8e431e1537d056a3f9e466eaceec28c399c220b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:23:45 -0000 The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=a8e431e1537d056a3f9e466eaceec28c399c220b commit a8e431e1537d056a3f9e466eaceec28c399c220b Author: Richard Scheffenegger AuthorDate: 2021-02-20 19:10:00 +0000 Commit: Richard Scheffenegger CommitDate: 2021-02-20 19:11:48 +0000 PRR: use accurate rfc6675_pipe when enabled Reviewed By: #transport, tuexen MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D28816 --- sys/netinet/tcp_input.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 39039fe5b9a3..59a5a2d6bf34 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -2579,8 +2579,11 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, * estimate to be in the network. */ del_data = tp->sackhint.delivered_data; - pipe = (tp->snd_nxt - tp->snd_fack) + - tp->sackhint.sack_bytes_rexmit; + if (V_tcp_do_rfc6675_pipe) + pipe = tcp_compute_pipe(tp); + else + pipe = (tp->snd_nxt - tp->snd_fack) + + tp->sackhint.sack_bytes_rexmit; tp->sackhint.prr_delivered += del_data; if (pipe > tp->snd_ssthresh) { if (tp->sackhint.recover_fs == 0) @@ -3960,7 +3963,10 @@ tcp_prr_partialack(struct tcpcb *tp, struct tcphdr *th) if (SEQ_GEQ(th->th_ack, tp->snd_una)) del_data = BYTES_THIS_ACK(tp, th); del_data += tp->sackhint.delivered_data; - pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; + if (V_tcp_do_rfc6675_pipe) + pipe = tcp_compute_pipe(tp); + else + pipe = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; tp->sackhint.prr_delivered += del_data; /* * Proportional Rate Reduction From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:29:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 9F210552029; Sat, 20 Feb 2021 19:29: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 4DjdnK43N4z4ZxD; Sat, 20 Feb 2021 19:29: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 7D9E5248DF; Sat, 20 Feb 2021 19:29: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 11KJTvUc053476; Sat, 20 Feb 2021 19:29:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJTvET053475; Sat, 20 Feb 2021 19:29:57 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:29:57 GMT Message-Id: <202102201929.11KJTvET053475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 6cf4aaf763ca - stable/13 - pkg(7): add an -r reponame option for bootstrap and add MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6cf4aaf763ca0fb35d77e00d1daede803038bbf0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:29:57 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6cf4aaf763ca0fb35d77e00d1daede803038bbf0 commit 6cf4aaf763ca0fb35d77e00d1daede803038bbf0 Author: Kyle Evans AuthorDate: 2021-02-12 00:58:26 +0000 Commit: Kyle Evans CommitDate: 2021-02-20 19:29:30 +0000 pkg(7): add an -r reponame option for bootstrap and add This is limited to bootstrap/add because some real pkg(8) commands have -r flags with an incompatible meaning/usage, e.g., pkg-audit. pkg(7) will still commence the search as it has, but it will ignore any repo objects without the given name so that overrides and whatnot still work as expected. The use of it for add is noted in the manpage; notably, that the signature config for that repository will be used over global config if it's specified. i.e., pkg(7) should assume that the given pkg did come from that repository and treat it appropriately. (cherry picked from commit 18418e1936b59c34a9c4a02a1ba5fe0d00dde1b3) --- usr.sbin/pkg/config.c | 24 +++++++++++++++--------- usr.sbin/pkg/config.h | 2 +- usr.sbin/pkg/pkg.7 | 37 +++++++++++++++++++++++++++++++------ usr.sbin/pkg/pkg.c | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 91 insertions(+), 19 deletions(-) diff --git a/usr.sbin/pkg/config.c b/usr.sbin/pkg/config.c index aaa9010b295d..3a5434639d6d 100644 --- a/usr.sbin/pkg/config.c +++ b/usr.sbin/pkg/config.c @@ -324,7 +324,7 @@ cleanup: * etc... */ static void -parse_repo_file(ucl_object_t *obj) +parse_repo_file(ucl_object_t *obj, const char *requested_repo) { ucl_object_iter_t it = NULL; const ucl_object_t *cur; @@ -339,13 +339,17 @@ parse_repo_file(ucl_object_t *obj) if (cur->type != UCL_OBJECT) continue; + if (requested_repo != NULL && strcmp(requested_repo, key) != 0) + continue; + config_parse(cur, CONFFILE_REPO); } } static int -read_conf_file(const char *confpath, pkg_conf_file_t conftype) +read_conf_file(const char *confpath, const char *requested_repo, + pkg_conf_file_t conftype) { struct ucl_parser *p; ucl_object_t *obj = NULL; @@ -369,7 +373,7 @@ read_conf_file(const char *confpath, pkg_conf_file_t conftype) if (conftype == CONFFILE_PKG) config_parse(obj, conftype); else if (conftype == CONFFILE_REPO) - parse_repo_file(obj); + parse_repo_file(obj, requested_repo); } ucl_object_unref(obj); @@ -379,7 +383,7 @@ read_conf_file(const char *confpath, pkg_conf_file_t conftype) } static int -load_repositories(const char *repodir) +load_repositories(const char *repodir, const char *requested_repo) { struct dirent *ent; DIR *d; @@ -403,8 +407,10 @@ load_repositories(const char *repodir) repodir, repodir[strlen(repodir) - 1] == '/' ? "" : "/", ent->d_name); - if (access(path, F_OK) == 0 && - read_conf_file(path, CONFFILE_REPO)) { + if (access(path, F_OK) != 0) + continue; + if (read_conf_file(path, requested_repo, + CONFFILE_REPO)) { ret = 1; goto cleanup; } @@ -418,7 +424,7 @@ cleanup: } int -config_init(void) +config_init(const char *requested_repo) { char *val; int i; @@ -459,7 +465,7 @@ config_init(void) localbase = getlocalbase(); snprintf(confpath, sizeof(confpath), "%s/etc/pkg.conf", localbase); - if (access(confpath, F_OK) == 0 && read_conf_file(confpath, + if (access(confpath, F_OK) == 0 && read_conf_file(confpath, NULL, CONFFILE_PKG)) goto finalize; @@ -477,7 +483,7 @@ config_init(void) } STAILQ_FOREACH(cv, c[REPOS_DIR].list, next) - if (load_repositories(cv->value)) + if (load_repositories(cv->value, requested_repo)) goto finalize; finalize: diff --git a/usr.sbin/pkg/config.h b/usr.sbin/pkg/config.h index f1a2aa227f16..afcd728abd92 100644 --- a/usr.sbin/pkg/config.h +++ b/usr.sbin/pkg/config.h @@ -58,7 +58,7 @@ typedef enum { CONFFILE_REPO, } pkg_conf_file_t; -int config_init(void); +int config_init(const char *); void config_finish(void); int config_string(pkg_config_key, const char **); int config_bool(pkg_config_key, bool *); diff --git a/usr.sbin/pkg/pkg.7 b/usr.sbin/pkg/pkg.7 index c672306ac08d..b92f5c9820cd 100644 --- a/usr.sbin/pkg/pkg.7 +++ b/usr.sbin/pkg/pkg.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 31, 2020 +.Dd February 7, 2021 .Dt PKG 7 .Os .Sh NAME @@ -36,6 +36,7 @@ .Nm add .Op Fl f +.Op Fl r Ar reponame .Op Fl y .Ao Pa pkg.txz Ac .Nm @@ -44,6 +45,7 @@ add .Op Fl 4 | Fl 6 bootstrap .Op Fl f +.Op Fl r Ar reponame .Op Fl y .Sh DESCRIPTION .Nm @@ -68,7 +70,7 @@ is not installed yet, it will be fetched, have its signature verified, installed, and then have the original command forwarded to it. If already installed, the command requested will be forwarded to the real .Xr pkg 8 . -.It Nm Li add Oo Fl f Oc Oo Fl y Oc Ao Pa pkg.txz Ac +.It Nm Li add Oo Fl f Oc Oo Fl r Ar reponame Oc Oo Fl y Oc Ao Pa pkg.txz Ac Install .Xr pkg 8 from a local package instead of fetching from remote. @@ -83,13 +85,19 @@ If the .Fl y flag is specified, no confirmation will be asked when bootstrapping .Xr pkg 8 . +.Pp +If a +.Ar reponame +has been specified, then the signature configuration for that repository will be +used. .It Nm Fl N Do not bootstrap, just determine if .Xr pkg 8 is actually installed or not. Returns 0 and the number of packages installed if it is, otherwise 1. -.It Nm Oo Fl 4 | Fl 6 Oc Li bootstrap Oo Fl f Oc Oo Fl y Oc +.It Nm Oo Fl 4 | Fl 6 Oc Li bootstrap Oo Fl f Oc \ +Oo Fl r Ar reponame Oc Oo Fl y Oc Attempt to bootstrap and do not forward anything to .Xr pkg 8 after it is installed. @@ -110,14 +118,30 @@ If the .Fl y flag is specified, no confirmation will be asked when bootstrapping .Xr pkg 8 . +.Pp +If a +.Ar reponame +has been specified, then the configuration for that repository will be used. .El .Sh CONFIGURATION Configuration varies in whether it is in a repository configuration file or the global configuration file. +The default repository configuration for +.Fx +is stored in +.Pa /etc/pkg/FreeBSD.conf , +and additional repository configuration files will be searched for in +.Ev REPOS_DIR , +or +.Pa /usr/local/etc/pkg/repos +if it is unset. .Pp -Repository configuration can be stored in -.Pa /etc/pkg/FreeBSD.conf -in the following format: +For bootstrapping, +.Nm +will process all repositories that it finds and use the last enabled repository +by default. +.Pp +Repository configuration is stored in the following format: .Bd -literal -offset indent FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", @@ -127,6 +151,7 @@ FreeBSD: { enabled: yes } .Ed +.Pp .Bl -tag -width signature_type -compact .It url Refer to diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 788fdb39ebb9..5e424cf83034 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -1045,7 +1045,7 @@ int main(int argc, char *argv[]) { char pkgpath[MAXPATHLEN]; - const char *pkgarg; + const char *pkgarg, *repo_name; bool activation_test, add_pkg, bootstrap_only, force, yes; signed char ch; const char *fetchOpts; @@ -1058,6 +1058,7 @@ main(int argc, char *argv[]) fetchOpts = ""; force = false; pkgarg = NULL; + repo_name = NULL; yes = false; struct option longopts[] = { @@ -1070,7 +1071,7 @@ main(int argc, char *argv[]) snprintf(pkgpath, MAXPATHLEN, "%s/sbin/pkg", getlocalbase()); - while ((ch = getopt_long(argc, argv, "-:fyN46", longopts, NULL)) != -1) { + while ((ch = getopt_long(argc, argv, "-:fr::yN46", longopts, NULL)) != -1) { switch (ch) { case 'f': force = true; @@ -1087,6 +1088,46 @@ main(int argc, char *argv[]) case '6': fetchOpts = "6"; break; + case 'r': + /* + * The repository can only be specified for an explicit + * bootstrap request at this time, so that we don't + * confuse the user if they're trying to use a verb that + * has some other conflicting meaning but we need to + * bootstrap. + * + * For that reason, we specify that -r has an optional + * argument above and process the next index ourselves. + * This is mostly significant because getopt(3) will + * otherwise eat the next argument, which could be + * something we need to try and make sense of. + * + * At worst this gets us false positives that we ignore + * in other contexts, and we have to do a little fudging + * in order to support separating -r from the reponame + * with a space since it's not actually optional in + * the bootstrap/add sense. + */ + if (add_pkg || bootstrap_only) { + if (optarg != NULL) { + repo_name = optarg; + } else if (optind < argc) { + repo_name = argv[optind]; + } + + if (repo_name == NULL || *repo_name == '\0') { + fprintf(stderr, + "Must specify a repository with -r!\n"); + exit(EXIT_FAILURE); + } + + if (optarg == NULL) { + /* Advance past repo name. */ + optreset = 1; + optind++; + } + } + break; case 1: // Non-option arguments, first one is the command if (command == NULL) { @@ -1126,7 +1167,7 @@ main(int argc, char *argv[]) if (activation_test) errx(EXIT_FAILURE, "pkg is not installed"); - config_init(); + config_init(repo_name); if (add_pkg) { if (pkgarg == NULL) { From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:29:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B1B4E551FCC; Sat, 20 Feb 2021 19:29: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 4DjdnL4h8Zz4ZtH; Sat, 20 Feb 2021 19:29: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 93DC7248E0; Sat, 20 Feb 2021 19:29: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 11KJTwnm053496; Sat, 20 Feb 2021 19:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJTwFS053495; Sat, 20 Feb 2021 19:29:58 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:29:58 GMT Message-Id: <202102201929.11KJTwFS053495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 9ec09b04df17 - stable/13 - pkg(7): address minor nits (mostly clang-analyze complaints) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9ec09b04df17b3601e6f5ae8664c6ab81e1e4783 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:29:58 -0000 The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9ec09b04df17b3601e6f5ae8664c6ab81e1e4783 commit 9ec09b04df17b3601e6f5ae8664c6ab81e1e4783 Author: Kyle Evans AuthorDate: 2021-02-12 00:58:27 +0000 Commit: Kyle Evans CommitDate: 2021-02-20 19:29:46 +0000 pkg(7): address minor nits (mostly clang-analyze complaints) - One (1) spurious whitespace. - One (1) occurrence of "random(3) bad, arc4random(3)" good. - Three (3) writes that will never be seen. The latter two points are complaints from clang-analyze. Switching to arc4random(3) is decidedly a good idea because we weren't doing any kind of PRNG seeding anyways. The discarded assignments are arguably good for future-proofing, but it's better to improve the S/N ratio from clang-analyze. (cherry picked from commit b2c4ca8d2872bc4410626f2b1ceafa49de5828ce) --- usr.sbin/pkg/dns_utils.c | 5 +++-- usr.sbin/pkg/pkg.c | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.sbin/pkg/dns_utils.c b/usr.sbin/pkg/dns_utils.c index 78ebdd426f8b..f3bde529daca 100644 --- a/usr.sbin/pkg/dns_utils.c +++ b/usr.sbin/pkg/dns_utils.c @@ -87,7 +87,7 @@ compute_weight(struct dns_srvinfo **d, int first, int last) int *chosen; totalweight = 0; - + for (i = 0; i <= last; i++) totalweight += d[i]->weight; @@ -98,7 +98,8 @@ compute_weight(struct dns_srvinfo **d, int first, int last) for (i = 0; i <= last; i++) { for (;;) { - chosen[i] = random() % (d[i]->weight * 100 / totalweight); + chosen[i] = arc4random_uniform(d[i]->weight * 100 / + totalweight); for (j = 0; j < i; j++) { if (chosen[i] == chosen[j]) break; diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 5e424cf83034..1f787e3dd246 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -434,9 +434,7 @@ sha256_fd(int fd, char out[SHA256_DIGEST_LENGTH * 2 + 1]) int ret; SHA256_CTX sha256; - my_fd = -1; fp = NULL; - r = 0; ret = 1; out[0] = '\0'; @@ -627,7 +625,6 @@ parse_cert(int fd) { ssize_t linelen; buf = NULL; - my_fd = -1; sc = NULL; line = NULL; linecap = 0; From owner-dev-commits-src-all@freebsd.org Sat Feb 20 19:49:21 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BA99C5524F6; Sat, 20 Feb 2021 19:49: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 4DjfCj4v8rz4cDR; Sat, 20 Feb 2021 19:49: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 9ADD124BFC; Sat, 20 Feb 2021 19:49: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 11KJnLTC079739; Sat, 20 Feb 2021 19:49:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KJnLXM079738; Sat, 20 Feb 2021 19:49:21 GMT (envelope-from git) Date: Sat, 20 Feb 2021 19:49:21 GMT Message-Id: <202102201949.11KJnLXM079738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 26682c1fa74c - stable/12 - pkg(7): address minor nits (mostly clang-analyze complaints) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 26682c1fa74c32fe3fdd250bb1481714197b0b51 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 19:49:21 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=26682c1fa74c32fe3fdd250bb1481714197b0b51 commit 26682c1fa74c32fe3fdd250bb1481714197b0b51 Author: Kyle Evans AuthorDate: 2021-02-12 00:58:27 +0000 Commit: Kyle Evans CommitDate: 2021-02-20 19:49:04 +0000 pkg(7): address minor nits (mostly clang-analyze complaints) - One (1) spurious whitespace. - One (1) occurrence of "random(3) bad, arc4random(3)" good. - Three (3) writes that will never be seen. The latter two points are complaints from clang-analyze. Switching to arc4random(3) is decidedly a good idea because we weren't doing any kind of PRNG seeding anyways. The discarded assignments are arguably good for future-proofing, but it's better to improve the S/N ratio from clang-analyze. (cherry picked from commit b2c4ca8d2872bc4410626f2b1ceafa49de5828ce) --- usr.sbin/pkg/dns_utils.c | 5 +++-- usr.sbin/pkg/pkg.c | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/usr.sbin/pkg/dns_utils.c b/usr.sbin/pkg/dns_utils.c index 78ebdd426f8b..f3bde529daca 100644 --- a/usr.sbin/pkg/dns_utils.c +++ b/usr.sbin/pkg/dns_utils.c @@ -87,7 +87,7 @@ compute_weight(struct dns_srvinfo **d, int first, int last) int *chosen; totalweight = 0; - + for (i = 0; i <= last; i++) totalweight += d[i]->weight; @@ -98,7 +98,8 @@ compute_weight(struct dns_srvinfo **d, int first, int last) for (i = 0; i <= last; i++) { for (;;) { - chosen[i] = random() % (d[i]->weight * 100 / totalweight); + chosen[i] = arc4random_uniform(d[i]->weight * 100 / + totalweight); for (j = 0; j < i; j++) { if (chosen[i] == chosen[j]) break; diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 50b196fd9b30..54eaf0882372 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -433,9 +433,7 @@ sha256_fd(int fd, char out[SHA256_DIGEST_LENGTH * 2 + 1]) int ret; SHA256_CTX sha256; - my_fd = -1; fp = NULL; - r = 0; ret = 1; out[0] = '\0'; @@ -626,7 +624,6 @@ parse_cert(int fd) { ssize_t linelen; buf = NULL; - my_fd = -1; sc = NULL; line = NULL; linecap = 0; From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:03:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A7FEA552A98; Sat, 20 Feb 2021 20:03: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 4DjfWX4LM9z4dKx; Sat, 20 Feb 2021 20:03: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 878F5250AB; Sat, 20 Feb 2021 20:03: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 11KK34g4005603; Sat, 20 Feb 2021 20:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KK34uj005602; Sat, 20 Feb 2021 20:03:04 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:03:04 GMT Message-Id: <202102202003.11KK34uj005602@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: aeb00dca0d03 - stable/13 - Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way 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: aeb00dca0d03e235c5aaabeef0ada9931d680a80 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:03:04 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=aeb00dca0d03e235c5aaabeef0ada9931d680a80 commit aeb00dca0d03e235c5aaabeef0ada9931d680a80 Author: Dimitry Andric AuthorDate: 2021-02-19 18:18:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:00:17 +0000 Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:03:31 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E6BA5552848; Sat, 20 Feb 2021 20:03: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 4DjfX35qykz4dJh; Sat, 20 Feb 2021 20:03: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 BB0C42542C; Sat, 20 Feb 2021 20:03: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 11KK3Vb2005782; Sat, 20 Feb 2021 20:03:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KK3VDg005781; Sat, 20 Feb 2021 20:03:31 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:03:31 GMT Message-Id: <202102202003.11KK3VDg005781@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: 9e86d1669765 - stable/12 - Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way 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: 9e86d16697654c58ae65fd13e2a35fc755ecf73a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:03:32 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9e86d16697654c58ae65fd13e2a35fc755ecf73a commit 9e86d16697654c58ae65fd13e2a35fc755ecf73a Author: Dimitry Andric AuthorDate: 2021-02-19 18:18:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:00:55 +0000 Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:03:53 2021 Return-Path: Delivered-To: dev-commits-src-all@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 343C9552AAF; Sat, 20 Feb 2021 20:03: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 4DjfXT13Vyz4dSD; Sat, 20 Feb 2021 20:03: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 1739E2542D; Sat, 20 Feb 2021 20:03: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 11KK3qHI005945; Sat, 20 Feb 2021 20:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KK3q3m005944; Sat, 20 Feb 2021 20:03:52 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:03:52 GMT Message-Id: <202102202003.11KK3q3m005944@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: 49e7d3fee6ac - stable/11 - Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way 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: 49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:03:53 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1 commit 49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1 Author: Dimitry Andric AuthorDate: 2021-02-19 18:18:22 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:01:49 +0000 Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:43:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F2C1B55410B; Sat, 20 Feb 2021 20:43: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 4DjgQk6bz7z4gxw; Sat, 20 Feb 2021 20:43: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 CB01125A9C; Sat, 20 Feb 2021 20:43: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 11KKhwKS058154; Sat, 20 Feb 2021 20:43:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KKhw9E058153; Sat, 20 Feb 2021 20:43:58 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:43:58 GMT Message-Id: <202102202043.11KKhw9E058153@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: 6af57633d7a0 - stable/13 - Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" 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: 6af57633d7a06ed1ff260f14345caba108f2a16a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:43:59 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=6af57633d7a06ed1ff260f14345caba108f2a16a commit 6af57633d7a06ed1ff260f14345caba108f2a16a Author: Dimitry Andric AuthorDate: 2021-02-20 20:39:43 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:39:43 +0000 Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" This reverts commit aeb00dca0d03e235c5aaabeef0ada9931d680a80, since I messed up and didn't merge the earlier libcxxrt changes first. --- contrib/libcxxrt/exception.cc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0fb26ddb4ed2..0de878e9e6db 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,6 +572,19 @@ static void free_exception(char *e) } } +#ifdef __LP64__ +/** + * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte + * alignment but it was broken by the addition of the referenceCount. + * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep + * compatibility with consumers of the broken __cxa_exception, explicitly add + * padding on allocation (and account for it on free). + */ +static const int exception_alignment_padding = 8; +#else +static const int exception_alignment_padding = 0; +#endif + /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -580,16 +593,19 @@ static void free_exception(char *e) */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = thrown_size + sizeof(__cxa_exception); + size_t size = exception_alignment_padding + sizeof(__cxa_exception) + + thrown_size; char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_exception); + return buffer + exception_alignment_padding + sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = sizeof(__cxa_dependent_exception); + size_t size = exception_alignment_padding + + sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_dependent_exception); + return buffer + exception_alignment_padding + + sizeof(__cxa_dependent_exception); } /** @@ -617,7 +633,8 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } static void releaseException(__cxa_exception *exception) @@ -644,7 +661,8 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:44:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B92A6553EBF; Sat, 20 Feb 2021 20:44: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 4DjgR74kZzz4gyT; Sat, 20 Feb 2021 20:44: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 95AE125A36; Sat, 20 Feb 2021 20:44: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 11KKiJdf058323; Sat, 20 Feb 2021 20:44:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KKiJUx058322; Sat, 20 Feb 2021 20:44:19 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:44:19 GMT Message-Id: <202102202044.11KKiJUx058322@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: 780a76a6ec21 - stable/12 - Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" 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: 780a76a6ec214cec0b8bc1f6b6c249984f5e24f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:44:19 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=780a76a6ec214cec0b8bc1f6b6c249984f5e24f5 commit 780a76a6ec214cec0b8bc1f6b6c249984f5e24f5 Author: Dimitry Andric AuthorDate: 2021-02-20 20:40:41 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:40:41 +0000 Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" This reverts commit 9e86d16697654c58ae65fd13e2a35fc755ecf73a, since I messed up and didn't merge the earlier libcxxrt changes first. --- contrib/libcxxrt/exception.cc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0fb26ddb4ed2..0de878e9e6db 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,6 +572,19 @@ static void free_exception(char *e) } } +#ifdef __LP64__ +/** + * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte + * alignment but it was broken by the addition of the referenceCount. + * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep + * compatibility with consumers of the broken __cxa_exception, explicitly add + * padding on allocation (and account for it on free). + */ +static const int exception_alignment_padding = 8; +#else +static const int exception_alignment_padding = 0; +#endif + /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -580,16 +593,19 @@ static void free_exception(char *e) */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = thrown_size + sizeof(__cxa_exception); + size_t size = exception_alignment_padding + sizeof(__cxa_exception) + + thrown_size; char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_exception); + return buffer + exception_alignment_padding + sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = sizeof(__cxa_dependent_exception); + size_t size = exception_alignment_padding + + sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_dependent_exception); + return buffer + exception_alignment_padding + + sizeof(__cxa_dependent_exception); } /** @@ -617,7 +633,8 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } static void releaseException(__cxa_exception *exception) @@ -644,7 +661,8 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 20:44:47 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EBCA1553DFD; Sat, 20 Feb 2021 20:44: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 4DjgRg6M7Zz4hHH; Sat, 20 Feb 2021 20:44: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 CCFF425C69; Sat, 20 Feb 2021 20:44: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 11KKillY058495; Sat, 20 Feb 2021 20:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KKilel058494; Sat, 20 Feb 2021 20:44:47 GMT (envelope-from git) Date: Sat, 20 Feb 2021 20:44:47 GMT Message-Id: <202102202044.11KKilel058494@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: 9418450e056f - stable/11 - Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" 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: 9418450e056f8a75c0e5d0b1197d94745da0c18d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 20:44:48 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=9418450e056f8a75c0e5d0b1197d94745da0c18d commit 9418450e056f8a75c0e5d0b1197d94745da0c18d Author: Dimitry Andric AuthorDate: 2021-02-20 20:41:13 +0000 Commit: Dimitry Andric CommitDate: 2021-02-20 20:41:13 +0000 Revert "Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way" This reverts commit 49e7d3fee6ac52d1c65160a71b1f2be70e43c5e1, since I messed up and didn't merge the earlier libcxxrt changes first. --- contrib/libcxxrt/exception.cc | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0fb26ddb4ed2..0de878e9e6db 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,6 +572,19 @@ static void free_exception(char *e) } } +#ifdef __LP64__ +/** + * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte + * alignment but it was broken by the addition of the referenceCount. + * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep + * compatibility with consumers of the broken __cxa_exception, explicitly add + * padding on allocation (and account for it on free). + */ +static const int exception_alignment_padding = 8; +#else +static const int exception_alignment_padding = 0; +#endif + /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -580,16 +593,19 @@ static void free_exception(char *e) */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = thrown_size + sizeof(__cxa_exception); + size_t size = exception_alignment_padding + sizeof(__cxa_exception) + + thrown_size; char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_exception); + return buffer + exception_alignment_padding + sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = sizeof(__cxa_dependent_exception); + size_t size = exception_alignment_padding + + sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer+sizeof(__cxa_dependent_exception); + return buffer + exception_alignment_padding + + sizeof(__cxa_dependent_exception); } /** @@ -617,7 +633,8 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } static void releaseException(__cxa_exception *exception) @@ -644,7 +661,8 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex)); + free_exception(reinterpret_cast(ex) - + exception_alignment_padding); } /** From owner-dev-commits-src-all@freebsd.org Sat Feb 20 22:42:07 2021 Return-Path: Delivered-To: dev-commits-src-all@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 EB64D53A433; Sat, 20 Feb 2021 22:42:07 +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 4Djk336JKfz4pNX; Sat, 20 Feb 2021 22:42:07 +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 CB163270C9; Sat, 20 Feb 2021 22:42:07 +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 11KMg74x017504; Sat, 20 Feb 2021 22:42:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11KMg79W017503; Sat, 20 Feb 2021 22:42:07 GMT (envelope-from git) Date: Sat, 20 Feb 2021 22:42:07 GMT Message-Id: <202102202242.11KMg79W017503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: 6e1d1bfcac77 - main - jail: Improve locking when removing prisons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e1d1bfcac77603541706807803a198c6d954d7c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2021 22:42:08 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=6e1d1bfcac77603541706807803a198c6d954d7c commit 6e1d1bfcac77603541706807803a198c6d954d7c Author: Jamie Gritton AuthorDate: 2021-02-20 22:38:58 +0000 Commit: Jamie Gritton CommitDate: 2021-02-20 22:38:58 +0000 jail: Improve locking when removing prisons Change the flow of prison_deref() so it doesn't let go of allprison_lock until it's completely done using it (except for a possible drop as part of an upgrade on its first try). Differential Revision: https://reviews.freebsd.org/D28458 MFC after: 3 days --- sys/kern/kern_jail.c | 69 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 90ab69a372d2..65201eb12951 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2793,11 +2793,17 @@ prison_complete(void *context, int pending) static void prison_deref(struct prison *pr, int flags) { - struct prison *ppr, *tpr; + struct prisonlist freeprison; + struct prison *rpr, *tpr; int lastref, lasturef; + TAILQ_INIT(&freeprison); if (!(flags & PD_LOCKED)) mtx_lock(&pr->pr_mtx); + /* + * Release this prison as requested, which may cause its parent + * to be released, and then maybe its grandparent, etc. + */ for (;;) { if (flags & PD_DEUREF) { KASSERT(refcount_load(&pr->pr_uref) > 0, @@ -2840,56 +2846,63 @@ prison_deref(struct prison *pr, int flags) mtx_unlock(&pr->pr_mtx); } - /* If the prison still has references, nothing else to do. */ - if (!lastref) { - if (flags & PD_LIST_SLOCKED) - sx_sunlock(&allprison_lock); - else if (flags & PD_LIST_XLOCKED) - sx_xunlock(&allprison_lock); - return; - } + if (!lastref) + break; if (flags & PD_LIST_SLOCKED) { if (!sx_try_upgrade(&allprison_lock)) { sx_sunlock(&allprison_lock); sx_xlock(&allprison_lock); } + flags &= ~PD_LIST_SLOCKED; } else if (!(flags & PD_LIST_XLOCKED)) sx_xlock(&allprison_lock); + flags |= PD_LIST_XLOCKED; TAILQ_REMOVE(&allprison, pr, pr_list); LIST_REMOVE(pr, pr_sibling); - ppr = pr->pr_parent; - for (tpr = ppr; tpr != NULL; tpr = tpr->pr_parent) + TAILQ_INSERT_TAIL(&freeprison, pr, pr_list); + for (tpr = pr->pr_parent; tpr != NULL; tpr = tpr->pr_parent) tpr->pr_childcount--; + + /* Removing a prison frees a reference on its parent. */ + pr = pr->pr_parent; + mtx_lock(&pr->pr_mtx); + flags |= PD_DEREF | PD_DEUREF; + } + + /* Release all the prison locks. */ + if (flags & PD_LIST_SLOCKED) + sx_sunlock(&allprison_lock); + else if (flags & PD_LIST_XLOCKED) sx_xunlock(&allprison_lock); + /* + * Finish removing any unreferenced prisons, which couldn't happen + * while allprison_lock was held (to avoid a LOR on vrele). + */ + TAILQ_FOREACH_SAFE(rpr, &freeprison, pr_list, tpr) { #ifdef VIMAGE - if (pr->pr_vnet != ppr->pr_vnet) - vnet_destroy(pr->pr_vnet); + if (rpr->pr_vnet != rpr->pr_parent->pr_vnet) + vnet_destroy(rpr->pr_vnet); #endif - if (pr->pr_root != NULL) - vrele(pr->pr_root); - mtx_destroy(&pr->pr_mtx); + if (rpr->pr_root != NULL) + vrele(rpr->pr_root); + mtx_destroy(&rpr->pr_mtx); #ifdef INET - free(pr->pr_ip4, M_PRISON); + free(rpr->pr_ip4, M_PRISON); #endif #ifdef INET6 - free(pr->pr_ip6, M_PRISON); + free(rpr->pr_ip6, M_PRISON); #endif - if (pr->pr_cpuset != NULL) - cpuset_rel(pr->pr_cpuset); - osd_jail_exit(pr); + if (rpr->pr_cpuset != NULL) + cpuset_rel(rpr->pr_cpuset); + osd_jail_exit(rpr); #ifdef RACCT if (racct_enable) - prison_racct_detach(pr); + prison_racct_detach(rpr); #endif - free(pr, M_PRISON); - - /* Removing a prison frees a reference on its parent. */ - pr = ppr; - mtx_lock(&pr->pr_mtx); - flags = PD_DEREF | PD_DEUREF; + free(rpr, M_PRISON); } } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 00:43:14 2021 Return-Path: Delivered-To: dev-commits-src-all@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 F0BF353DEF9; Sun, 21 Feb 2021 00:43: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 4Djmkp6S9Sz3CbR; Sun, 21 Feb 2021 00:43: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 CFEB0F99; Sun, 21 Feb 2021 00:43: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 11L0hEtp074679; Sun, 21 Feb 2021 00:43:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L0hE1W074678; Sun, 21 Feb 2021 00:43:14 GMT (envelope-from git) Date: Sun, 21 Feb 2021 00:43:14 GMT Message-Id: <202102210043.11L0hE1W074678@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 5fa12fe0cd20 - main - amd64: implement strlen in assembly, take 2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fa12fe0cd203efcbb2ac21e7c3e3fb9b2f801ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 00:43:15 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=5fa12fe0cd203efcbb2ac21e7c3e3fb9b2f801ae commit 5fa12fe0cd203efcbb2ac21e7c3e3fb9b2f801ae Author: Mateusz Guzik AuthorDate: 2021-02-21 00:42:26 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-21 00:43:05 +0000 amd64: implement strlen in assembly, take 2 Tested with glibc test suite. The C variant in libkern performs excessive branching to find the zero byte instead of using the bsfq instruction. The same code patched to use it is still slower than the routine implemented here as the compiler keeps neglecting to perform certain optimizations (like using leaq). On top of that the routine can be used as a starting point for copyinstr which operates on words intead of bytes. The previous attempt had an instance of swapped operands to andq when dealing with fully aligned case, which had a side effect of breaking the code for certain corner cases. Noted by jrtc27. Sample results: $(perl -e "print 'A' x 3"): stock: 211198039 patched:338626619 asm: 465609618 $(perl -e "print 'A' x 100"): stock: 83151997 patched: 98285919 asm: 120719888 Reviewed by: jhb, kib Differential Revision: https://reviews.freebsd.org/D28779 --- sys/amd64/amd64/support.S | 66 +++++++++++++++++++++++++++++++++++++++++++++++ sys/conf/files.amd64 | 1 - 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index b623fba277db..4c0f7da87ef8 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -697,6 +697,72 @@ ENTRY(fillw) ret END(fillw) +/* + * strlen(string) + * %rdi + * + * Uses the ((x - 0x01....01) & ~x & 0x80....80) trick. + * + * 0x01....01 is replaced with 0x0 - 0x01....01 so that it can be added + * with leaq. + * + * For a description see either: + * - "Hacker's Delight" by Henry S. Warren, Jr. + * - "Optimizing subroutines in assembly language: An optimization guide for x86 platforms" + * by Agner Fog + * + * The latter contains a 32-bit variant of the same algorithm coded in assembly for i386. + */ +ENTRY(strlen) + PUSH_FRAME_POINTER + movabsq $0xfefefefefefefeff,%r8 + movabsq $0x8080808080808080,%r9 + + movq %rdi,%r10 + movq %rdi,%rcx + testb $7,%dil + jz 2f + + /* + * Handle misaligned reads: align to 8 and fill + * the spurious bytes. + */ + andq $~7,%rdi + movq (%rdi),%r11 + shlq $3,%rcx + movq $-1,%rdx + shlq %cl,%rdx + notq %rdx + orq %rdx,%r11 + + leaq (%r11,%r8),%rcx + notq %r11 + andq %r11,%rcx + andq %r9,%rcx + jnz 3f + + /* + * Main loop. + */ + ALIGN_TEXT +1: + leaq 8(%rdi),%rdi +2: + movq (%rdi),%r11 + leaq (%r11,%r8),%rcx + notq %r11 + andq %r11,%rcx + andq %r9,%rcx + jz 1b +3: + bsfq %rcx,%rcx + shrq $3,%rcx + leaq (%rcx,%rdi),%rax + subq %r10,%rax + POP_FRAME_POINTER + ret +END(strlen) + /*****************************************************************************/ /* copyout and fubyte family */ /*****************************************************************************/ diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 98a78a8b1ef9..395f501198f8 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -390,7 +390,6 @@ isa/syscons_isa.c optional sc isa/vga_isa.c optional vga kern/imgact_aout.c optional compat_aout kern/link_elf_obj.c standard -libkern/strlen.c standard # # IA32 binary support # From owner-dev-commits-src-all@freebsd.org Sun Feb 21 00:43:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2D69B53DDFB; Sun, 21 Feb 2021 00:43:16 +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 4Djmkr0SY7z3CMX; Sun, 21 Feb 2021 00:43:16 +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 F262DE69; Sun, 21 Feb 2021 00:43: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 11L0hFOp074699; Sun, 21 Feb 2021 00:43:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L0hFhg074698; Sun, 21 Feb 2021 00:43:15 GMT (envelope-from git) Date: Sun, 21 Feb 2021 00:43:15 GMT Message-Id: <202102210043.11L0hFhg074698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: a15f787adb44 - main - vfs: add vfs_ref_from_vp MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a15f787adb4429b83fa911dcb60f69121aaee1ba Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 00:43:16 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=a15f787adb4429b83fa911dcb60f69121aaee1ba commit a15f787adb4429b83fa911dcb60f69121aaee1ba Author: Mateusz Guzik AuthorDate: 2021-02-15 22:08:40 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-21 00:43:05 +0000 vfs: add vfs_ref_from_vp This generalizes what vop_stdgetwritemount used to be doing. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28695 --- sys/kern/vfs_default.c | 25 +------------------------ sys/kern/vfs_mount.c | 38 ++++++++++++++++++++++++++++++++++++++ sys/sys/mount.h | 1 + 3 files changed, 40 insertions(+), 24 deletions(-) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 3c428d7b7511..4b9b1b43f1ce 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -680,7 +680,6 @@ vop_stdgetwritemount(ap) } */ *ap; { struct mount *mp; - struct mount_pcpu *mpcpu; struct vnode *vp; /* @@ -693,29 +692,7 @@ vop_stdgetwritemount(ap) * with releasing it. */ vp = ap->a_vp; - mp = vp->v_mount; - if (mp == NULL) { - *(ap->a_mpp) = NULL; - return (0); - } - if (vfs_op_thread_enter(mp, mpcpu)) { - if (mp == vp->v_mount) { - vfs_mp_count_add_pcpu(mpcpu, ref, 1); - vfs_op_thread_exit(mp, mpcpu); - } else { - vfs_op_thread_exit(mp, mpcpu); - mp = NULL; - } - } else { - MNT_ILOCK(mp); - if (mp == vp->v_mount) { - MNT_REF(mp); - MNT_IUNLOCK(mp); - } else { - MNT_IUNLOCK(mp); - mp = NULL; - } - } + mp = vfs_ref_from_vp(vp); *(ap->a_mpp) = mp; return (0); } diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index b3870e46c5e9..e20e1520f677 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -449,6 +449,44 @@ sys_nmount(struct thread *td, struct nmount_args *uap) * Various utility functions */ +/* + * Get a reference on a mount point from a vnode. + * + * The vnode is allowed to be passed unlocked and race against dooming. Note in + * such case there are no guarantees the referenced mount point will still be + * associated with it after the function returns. + */ +struct mount * +vfs_ref_from_vp(struct vnode *vp) +{ + struct mount *mp; + struct mount_pcpu *mpcpu; + + mp = atomic_load_ptr(&vp->v_mount); + if (__predict_false(mp == NULL)) { + return (mp); + } + if (vfs_op_thread_enter(mp, mpcpu)) { + if (__predict_true(mp == vp->v_mount)) { + vfs_mp_count_add_pcpu(mpcpu, ref, 1); + vfs_op_thread_exit(mp, mpcpu); + } else { + vfs_op_thread_exit(mp, mpcpu); + mp = NULL; + } + } else { + MNT_ILOCK(mp); + if (mp == vp->v_mount) { + MNT_REF(mp); + MNT_IUNLOCK(mp); + } else { + MNT_IUNLOCK(mp); + mp = NULL; + } + } + return (mp); +} + void vfs_ref(struct mount *mp) { diff --git a/sys/sys/mount.h b/sys/sys/mount.h index f965dd72d7ba..9ae5f58e5218 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -997,6 +997,7 @@ void vfs_mount_error(struct mount *, const char *, ...); void vfs_mountroot(void); /* mount our root filesystem */ void vfs_mountedfrom(struct mount *, const char *from); void vfs_notify_upper(struct vnode *, int); +struct mount *vfs_ref_from_vp(struct vnode *); void vfs_ref(struct mount *); void vfs_rel(struct mount *); struct mount *vfs_mount_alloc(struct vnode *, struct vfsconf *, const char *, From owner-dev-commits-src-all@freebsd.org Sun Feb 21 00:43:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6AEA553E215; Sun, 21 Feb 2021 00:43: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 4Djmks1Mchz3CGs; Sun, 21 Feb 2021 00:43: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 204DCB51; Sun, 21 Feb 2021 00:43: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 11L0hHoP074720; Sun, 21 Feb 2021 00:43:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L0hHRq074719; Sun, 21 Feb 2021 00:43:17 GMT (envelope-from git) Date: Sun, 21 Feb 2021 00:43:17 GMT Message-Id: <202102210043.11L0hHRq074719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 81174cd8e24a - main - vfs: employ vfs_ref_from_vp in statfs and fstatfs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81174cd8e24aa2bb27f6a8b41032abf59add479f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 00:43:17 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=81174cd8e24aa2bb27f6a8b41032abf59add479f commit 81174cd8e24aa2bb27f6a8b41032abf59add479f Author: Mateusz Guzik AuthorDate: 2021-02-15 22:08:20 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-21 00:43:05 +0000 vfs: employ vfs_ref_from_vp in statfs and fstatfs Avoids locking and unlocking the vnode. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D28695 --- sys/kern/vfs_syscalls.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index a51d693446e3..11fcc7a3e10d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -333,15 +333,13 @@ kern_statfs(struct thread *td, const char *path, enum uio_seg pathseg, struct nameidata nd; int error; - NDINIT(&nd, LOOKUP, FOLLOW | LOCKSHARED | LOCKLEAF | AUDITVNODE1, - pathseg, path, td); + NDINIT(&nd, LOOKUP, FOLLOW | AUDITVNODE1, pathseg, path, td); error = namei(&nd); if (error != 0) return (error); - mp = nd.ni_vp->v_mount; - vfs_ref(mp); + mp = vfs_ref_from_vp(nd.ni_vp); NDFREE_NOTHING(&nd); - vput(nd.ni_vp); + vrele(nd.ni_vp); return (kern_do_statfs(td, mp, buf)); } @@ -381,14 +379,14 @@ kern_fstatfs(struct thread *td, int fd, struct statfs *buf) if (error != 0) return (error); vp = fp->f_vnode; - vn_lock(vp, LK_SHARED | LK_RETRY); #ifdef AUDIT - AUDIT_ARG_VNODE1(vp); + if (AUDITING_TD(td)) { + vn_lock(vp, LK_SHARED | LK_RETRY); + AUDIT_ARG_VNODE1(vp); + VOP_UNLOCK(vp); + } #endif - mp = vp->v_mount; - if (mp != NULL) - vfs_ref(mp); - VOP_UNLOCK(vp); + mp = vfs_ref_from_vp(vp); fdrop(fp, td); return (kern_do_statfs(td, mp, buf)); } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 00:50:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2770853E25D; Sun, 21 Feb 2021 00:50:16 +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 4Djmtw0b3Fz3CkB; Sun, 21 Feb 2021 00:50:16 +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 06BE7B5E; Sun, 21 Feb 2021 00:50:16 +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 11L0oF2B081021; Sun, 21 Feb 2021 00:50:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L0oFvs081014; Sun, 21 Feb 2021 00:50:15 GMT (envelope-from git) Date: Sun, 21 Feb 2021 00:50:15 GMT Message-Id: <202102210050.11L0oFvs081014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: ea5a304c734f - stable/13 - nvdimm(4): Export NVDIMM health flags via sysctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea5a304c734f7e391dad9bea9a0dc9345d763f5a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 00:50:16 -0000 The branch stable/13 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=ea5a304c734f7e391dad9bea9a0dc9345d763f5a commit ea5a304c734f7e391dad9bea9a0dc9345d763f5a Author: Ravi Pokala AuthorDate: 2021-02-16 08:03:32 +0000 Commit: Ravi Pokala CommitDate: 2021-02-21 00:47:55 +0000 nvdimm(4): Export NVDIMM health flags via sysctl The ACPI NFIT specification defines a set of "NVDIMM State Flags". These flags are already reported by `acpidump -t', but this change makes them available on a per-device basis, in a format that is more easily parsed. To simplify this, introduce acpi_nfit_get_memory_maps_by_dimm(), which locates the (ACPI_NFIT_MEMORY_MAP)s associated with a given (nfit_handle_t). Reviewed by: mav, cem Tested by: mav, rpokala (version for stable/12) MFC after: 3 days Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D28700 (cherry picked from commit bdde49b7c7232c6936525f84ffb90856a7cd8e74) --- sys/dev/nvdimm/nvdimm.c | 65 +++++++++++++++++++++++++++++++++++++++++++- sys/dev/nvdimm/nvdimm_nfit.c | 10 +++++++ sys/dev/nvdimm/nvdimm_var.h | 3 ++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvdimm/nvdimm.c b/sys/dev/nvdimm/nvdimm.c index 66638636ef0e..0df894e4d9b6 100644 --- a/sys/dev/nvdimm/nvdimm.c +++ b/sys/dev/nvdimm/nvdimm.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include @@ -332,12 +334,21 @@ static int nvdimm_attach(device_t dev) { struct nvdimm_dev *nv; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *oid; + struct sysctl_oid_list *children; + struct sbuf *sb; ACPI_TABLE_NFIT *nfitbl; ACPI_HANDLE handle; ACPI_STATUS status; - int error; + ACPI_NFIT_MEMORY_MAP **maps; + int error, i, num_maps; + uint16_t flags; nv = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + oid = device_get_sysctl_tree(dev); + children = SYSCTL_CHILDREN(oid); handle = nvdimm_root_get_acpi_handle(dev); MPASS(handle != NULL); nv->nv_dev = dev; @@ -351,6 +362,57 @@ nvdimm_attach(device_t dev) } acpi_nfit_get_flush_addrs(nfitbl, nv->nv_handle, &nv->nv_flush_addr, &nv->nv_flush_addr_cnt); + + /* + * Each NVDIMM should have at least one memory map associated with it. + * If any of the maps have one of the error flags set, reflect that in + * the overall status. + */ + acpi_nfit_get_memory_maps_by_dimm(nfitbl, nv->nv_handle, &maps, + &num_maps); + if (num_maps == 0) { + free(nv->nv_flush_addr, M_NVDIMM); + free(maps, M_NVDIMM); + device_printf(dev, "cannot find memory map\n"); + return (ENXIO); + } + flags = 0; + for (i = 0; i < num_maps; i++) { + flags |= maps[i]->Flags; + } + free(maps, M_NVDIMM); + + /* sbuf_new_auto(9) is M_WAITOK; no need to check for NULL. */ + sb = sbuf_new_auto(); + (void) sbuf_printf(sb, "0x%b", flags, + "\20" + "\001SAVE_FAILED" + "\002RESTORE_FAILED" + "\003FLUSH_FAILED" + "\004NOT_ARMED" + "\005HEALTH_OBSERVED" + "\006HEALTH_ENABLED" + "\007MAP_FAILED"); + error = sbuf_finish(sb); + if (error != 0) { + sbuf_delete(sb); + free(nv->nv_flush_addr, M_NVDIMM); + device_printf(dev, "cannot convert flags to string\n"); + return (error); + } + /* strdup(9) is M_WAITOK; no need to check for NULL. */ + nv->nv_flags_str = strdup(sbuf_data(sb), M_NVDIMM); + sbuf_delete(sb); + SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "flags", + CTLFLAG_RD | CTLFLAG_MPSAFE, nv->nv_flags_str, 0, + "NVDIMM State Flags"); + /* + * Anything other than HEALTH_ENABLED indicates a fault condition of + * some kind, so log if that's seen. + */ + if ((flags & ~ACPI_NFIT_MEM_HEALTH_ENABLED) != 0) + device_printf(dev, "flags: %s\n", nv->nv_flags_str); + AcpiPutTable(&nfitbl->Header); error = read_label_area_size(nv); if (error == 0) { @@ -370,6 +432,7 @@ nvdimm_detach(device_t dev) struct nvdimm_label_entry *label, *next; nv = device_get_softc(dev); + free(nv->nv_flags_str, M_NVDIMM); free(nv->nv_flush_addr, M_NVDIMM); free(nv->label_index, M_NVDIMM); SLIST_FOREACH_SAFE(label, &nv->labels, link, next) { diff --git a/sys/dev/nvdimm/nvdimm_nfit.c b/sys/dev/nvdimm/nvdimm_nfit.c index ae00b88f8018..7396393a3a2c 100644 --- a/sys/dev/nvdimm/nvdimm_nfit.c +++ b/sys/dev/nvdimm/nvdimm_nfit.c @@ -201,3 +201,13 @@ acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, for (i = 0; i < subtable->HintCount; i++) (*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; } + +void +acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, + ACPI_NFIT_MEMORY_MAP ***listp, int *countp) +{ + + malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_MEMORY_MAP, + offsetof(ACPI_NFIT_MEMORY_MAP, DeviceHandle), UINT32_MAX, dimm, + (void ***)listp, countp); +} diff --git a/sys/dev/nvdimm/nvdimm_var.h b/sys/dev/nvdimm/nvdimm_var.h index d69b1a70d8df..d163698e0660 100644 --- a/sys/dev/nvdimm/nvdimm_var.h +++ b/sys/dev/nvdimm/nvdimm_var.h @@ -93,6 +93,7 @@ struct nvdimm_dev { device_t nv_dev; nfit_handle_t nv_handle; uint64_t **nv_flush_addr; + char *nv_flags_str; int nv_flush_addr_cnt; uint32_t label_area_size; uint32_t max_label_xfer; @@ -163,6 +164,8 @@ void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, uint64_t ***listp, int *countp); +void acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, + nfit_handle_t dimm, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); enum SPA_mapping_type nvdimm_spa_type_from_name(const char *); enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); bool nvdimm_spa_type_user_accessible(enum SPA_mapping_type); From owner-dev-commits-src-all@freebsd.org Sun Feb 21 01:48:19 2021 Return-Path: Delivered-To: dev-commits-src-all@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 4C5FA543B8F; Sun, 21 Feb 2021 01:48: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 4Djp9v1fQlz3JNg; Sun, 21 Feb 2021 01:48: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 2B9131C9F; Sun, 21 Feb 2021 01:48: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 11L1mJOc054826; Sun, 21 Feb 2021 01:48:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L1mJcl054825; Sun, 21 Feb 2021 01:48:19 GMT (envelope-from git) Date: Sun, 21 Feb 2021 01:48:19 GMT Message-Id: <202102210148.11L1mJcl054825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ravi Pokala Subject: git: 49318a0aac64 - stable/12 - nvdimm(4): Export NVDIMM health flags via sysctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rpokala X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 49318a0aac641813d971806667b734feefefbb03 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 01:48:19 -0000 The branch stable/12 has been updated by rpokala: URL: https://cgit.FreeBSD.org/src/commit/?id=49318a0aac641813d971806667b734feefefbb03 commit 49318a0aac641813d971806667b734feefefbb03 Author: Ravi Pokala AuthorDate: 2021-02-16 08:03:32 +0000 Commit: Ravi Pokala CommitDate: 2021-02-21 01:47:34 +0000 nvdimm(4): Export NVDIMM health flags via sysctl The ACPI NFIT specification defines a set of "NVDIMM State Flags". These flags are already reported by `acpidump -t', but this change makes them available on a per-device basis, in a format that is more easily parsed. To simplify this, introduce acpi_nfit_get_memory_maps_by_dimm(), which locates the (ACPI_NFIT_MEMORY_MAP)s associated with a given (nfit_handle_t). Reviewed by: mav, cem Tested by: mav, rpokala (version for stable/12) MFC after: 3 days Sponsored by: Panasas Differential Revision: https://reviews.freebsd.org/D28700 (cherry picked from commit bdde49b7c7232c6936525f84ffb90856a7cd8e74) --- sys/dev/nvdimm/nvdimm.c | 65 +++++++++++++++++++++++++++++++++++++++++++- sys/dev/nvdimm/nvdimm_nfit.c | 10 +++++++ sys/dev/nvdimm/nvdimm_var.h | 3 ++ 3 files changed, 77 insertions(+), 1 deletion(-) diff --git a/sys/dev/nvdimm/nvdimm.c b/sys/dev/nvdimm/nvdimm.c index b2c716044d5d..afa926955498 100644 --- a/sys/dev/nvdimm/nvdimm.c +++ b/sys/dev/nvdimm/nvdimm.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -319,12 +321,21 @@ static int nvdimm_attach(device_t dev) { struct nvdimm_dev *nv; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *oid; + struct sysctl_oid_list *children; + struct sbuf *sb; ACPI_TABLE_NFIT *nfitbl; ACPI_HANDLE handle; ACPI_STATUS status; - int error; + ACPI_NFIT_MEMORY_MAP **maps; + int error, i, num_maps; + uint16_t flags; nv = device_get_softc(dev); + ctx = device_get_sysctl_ctx(dev); + oid = device_get_sysctl_tree(dev); + children = SYSCTL_CHILDREN(oid); handle = nvdimm_root_get_acpi_handle(dev); if (handle == NULL) return (EINVAL); @@ -339,6 +350,57 @@ nvdimm_attach(device_t dev) } acpi_nfit_get_flush_addrs(nfitbl, nv->nv_handle, &nv->nv_flush_addr, &nv->nv_flush_addr_cnt); + + /* + * Each NVDIMM should have at least one memory map associated with it. + * If any of the maps have one of the error flags set, reflect that in + * the overall status. + */ + acpi_nfit_get_memory_maps_by_dimm(nfitbl, nv->nv_handle, &maps, + &num_maps); + if (num_maps == 0) { + free(nv->nv_flush_addr, M_NVDIMM); + free(maps, M_NVDIMM); + device_printf(dev, "cannot find memory map\n"); + return (ENXIO); + } + flags = 0; + for (i = 0; i < num_maps; i++) { + flags |= maps[i]->Flags; + } + free(maps, M_NVDIMM); + + /* sbuf_new_auto(9) is M_WAITOK; no need to check for NULL. */ + sb = sbuf_new_auto(); + (void) sbuf_printf(sb, "0x%b", flags, + "\20" + "\001SAVE_FAILED" + "\002RESTORE_FAILED" + "\003FLUSH_FAILED" + "\004NOT_ARMED" + "\005HEALTH_OBSERVED" + "\006HEALTH_ENABLED" + "\007MAP_FAILED"); + error = sbuf_finish(sb); + if (error != 0) { + sbuf_delete(sb); + free(nv->nv_flush_addr, M_NVDIMM); + device_printf(dev, "cannot convert flags to string\n"); + return (error); + } + /* strdup(9) is M_WAITOK; no need to check for NULL. */ + nv->nv_flags_str = strdup(sbuf_data(sb), M_NVDIMM); + sbuf_delete(sb); + SYSCTL_ADD_STRING(ctx, children, OID_AUTO, "flags", + CTLFLAG_RD | CTLFLAG_MPSAFE, nv->nv_flags_str, 0, + "NVDIMM State Flags"); + /* + * Anything other than HEALTH_ENABLED indicates a fault condition of + * some kind, so log if that's seen. + */ + if ((flags & ~ACPI_NFIT_MEM_HEALTH_ENABLED) != 0) + device_printf(dev, "flags: %s\n", nv->nv_flags_str); + AcpiPutTable(&nfitbl->Header); error = read_label_area_size(nv); if (error == 0) { @@ -358,6 +420,7 @@ nvdimm_detach(device_t dev) struct nvdimm_label_entry *label, *next; nv = device_get_softc(dev); + free(nv->nv_flags_str, M_NVDIMM); free(nv->nv_flush_addr, M_NVDIMM); free(nv->label_index, M_NVDIMM); SLIST_FOREACH_SAFE(label, &nv->labels, link, next) { diff --git a/sys/dev/nvdimm/nvdimm_nfit.c b/sys/dev/nvdimm/nvdimm_nfit.c index ae00b88f8018..7396393a3a2c 100644 --- a/sys/dev/nvdimm/nvdimm_nfit.c +++ b/sys/dev/nvdimm/nvdimm_nfit.c @@ -201,3 +201,13 @@ acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, for (i = 0; i < subtable->HintCount; i++) (*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; } + +void +acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, + ACPI_NFIT_MEMORY_MAP ***listp, int *countp) +{ + + malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_MEMORY_MAP, + offsetof(ACPI_NFIT_MEMORY_MAP, DeviceHandle), UINT32_MAX, dimm, + (void ***)listp, countp); +} diff --git a/sys/dev/nvdimm/nvdimm_var.h b/sys/dev/nvdimm/nvdimm_var.h index 7d1621512a42..e30d6b407293 100644 --- a/sys/dev/nvdimm/nvdimm_var.h +++ b/sys/dev/nvdimm/nvdimm_var.h @@ -97,6 +97,7 @@ struct nvdimm_dev { device_t nv_dev; nfit_handle_t nv_handle; uint64_t **nv_flush_addr; + char *nv_flags_str; int nv_flush_addr_cnt; uint32_t label_area_size; uint32_t max_label_xfer; @@ -167,6 +168,8 @@ void acpi_nfit_get_control_region(ACPI_TABLE_NFIT *nfitbl, uint16_t control_region_index, ACPI_NFIT_CONTROL_REGION **out); void acpi_nfit_get_flush_addrs(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, uint64_t ***listp, int *countp); +void acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, + nfit_handle_t dimm, ACPI_NFIT_MEMORY_MAP ***listp, int *countp); enum SPA_mapping_type nvdimm_spa_type_from_uuid(struct uuid *); struct nvdimm_dev *nvdimm_find_by_handle(nfit_handle_t nv_handle); int nvdimm_spa_init(struct SPA_mapping *spa, ACPI_NFIT_SYSTEM_ADDRESS *nfitaddr, From owner-dev-commits-src-all@freebsd.org Sun Feb 21 05:07:16 2021 Return-Path: Delivered-To: dev-commits-src-all@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 A778354AB0F; Sun, 21 Feb 2021 05:07:16 +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 4DjtbS4LLWz3kSy; Sun, 21 Feb 2021 05:07:16 +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 87F35447E; Sun, 21 Feb 2021 05:07:16 +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 11L57GDc018939; Sun, 21 Feb 2021 05:07:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L57GYO018938; Sun, 21 Feb 2021 05:07:16 GMT (envelope-from git) Date: Sun, 21 Feb 2021 05:07:16 GMT Message-Id: <202102210507.11L57GYO018938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: c9cb66f04d33 - main - termcap: add an entry for the foot terminal MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9cb66f04d33b116d1c6f0fbd755e49772506932 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 05:07:16 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c9cb66f04d33b116d1c6f0fbd755e49772506932 commit c9cb66f04d33b116d1c6f0fbd755e49772506932 Author: Baptiste Daroussin AuthorDate: 2021-02-14 05:57:37 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-21 05:06:47 +0000 termcap: add an entry for the foot terminal MFC after: 3 days --- share/termcap/termcap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/termcap/termcap b/share/termcap/termcap index 6abd897d0a0d..98e35fdc721b 100644 --- a/share/termcap/termcap +++ b/share/termcap/termcap @@ -4769,6 +4769,10 @@ kitty+common|KovId's TTY common properties:\ :us=\E[4m:vb=\E[?5h\E[?5l:ve=\E[?12l\E[?25h:vi=\E[?25l:\ :vs=\E[?12;25h: +foot|foot terminal emulator:\ + :bw:hs:\ + :ds=\E]2;\E\\:fs=\E\\:kb=\177:ts=\E]2;:vb=\E]555\E\\:\ + :tc=xterm-256color: # # END OF TERMCAP # ------------------------ From owner-dev-commits-src-all@freebsd.org Sun Feb 21 05:09:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 D9E8854AE87; Sun, 21 Feb 2021 05:09:23 +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 4Djtdv5MFpz3kcL; Sun, 21 Feb 2021 05:09: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 AA7EC4553; Sun, 21 Feb 2021 05:09: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 11L59Nns019361; Sun, 21 Feb 2021 05:09:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L59NJl019360; Sun, 21 Feb 2021 05:09:23 GMT (envelope-from git) Date: Sun, 21 Feb 2021 05:09:23 GMT Message-Id: <202102210509.11L59NJl019360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: e6bb49f12ca7 - main - pci_vendors: update to 2021.02.20 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6bb49f12ca7a2dc103d69d4c70e1504195f70a6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 05:09:23 -0000 The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=e6bb49f12ca7a2dc103d69d4c70e1504195f70a6 commit e6bb49f12ca7a2dc103d69d4c70e1504195f70a6 Author: Baptiste Daroussin AuthorDate: 2021-02-21 05:09:03 +0000 Commit: Baptiste Daroussin CommitDate: 2021-02-21 05:09:03 +0000 pci_vendors: update to 2021.02.20 --- share/misc/pci_vendors | 349 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 275 insertions(+), 74 deletions(-) diff --git a/share/misc/pci_vendors b/share/misc/pci_vendors index c5b923d463af..35692066d391 100644 --- a/share/misc/pci_vendors +++ b/share/misc/pci_vendors @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2021.01.11 -# Date: 2021-01-11 03:15:01 +# Version: 2021.02.20 +# Date: 2021-02-20 03:15:02 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at https://pci-ids.ucw.cz/. @@ -705,8 +705,7 @@ 1d49 0200 ThinkSystem 430-8i SAS/SATA 12Gb HBA 1d49 0202 ThinkSystem 430-8e SAS/SATA 12Gb HBA 1d49 0204 ThinkSystem 430-8i SAS/SATA 12Gb Dense HBA -# PCIe switch SES management endpoint - 00b2 PEX880xx PCIe Gen 4 Switch SES management endpoint + 00b2 PCIe Switch management endpoint 1d49 0003 ThinkSystem 1611-8P PCIe Gen4 NVMe Switch Adapter 00be SAS3504 Fusion-MPT Tri-Mode RAID On Chip (ROC) 00bf SAS3404 Fusion-MPT Tri-Mode I/O Controller Chip (IOC) @@ -1163,6 +1162,7 @@ 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard 1458 a102 GA-880GMA-USB3 + 1462 7596 760GM-E51(MS-7596) Motherboard 17f2 5000 KI690-AM2 Motherboard 4384 SBx00 PCI to PCI Bridge 4385 SBx00 SMBus Controller @@ -1175,6 +1175,7 @@ 1179 ff50 Satellite P305D-S8995E 1458 4385 GA-MA770-DS3rev2.0 Motherboard 1462 7368 K9AG Neo2 + 1462 7596 760GM-E51(MS-7596) Motherboard 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 17f2 5000 KI690-AM2 Motherboard @@ -1225,6 +1226,7 @@ 1043 8389 M4A785TD Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 b002 GA-MA770-DS3rev2.0 Motherboard + 1462 7596 760GM-E51(MS-7596) Motherboard 1849 4390 Motherboard (one of many) 4391 SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] 103c 1609 ProLiant MicroServer N36L @@ -1248,6 +1250,7 @@ 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 5004 GA-880GMA-USB3 + 1462 7596 760GM-E51(MS-7596) Motherboard 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4397 SB7x0/SB8x0/SB9x0 USB OHCI0 Controller @@ -1258,12 +1261,14 @@ 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 5004 GA-880GMA-USB3 + 1462 7596 760GM-E51(MS-7596) Motherboard 15d9 a811 H8DGU 174b 1001 PURE Fusion Mini 4398 SB7x0 USB OHCI1 Controller 1019 2120 A785GM-M 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1462 7596 760GM-E51(MS-7596) Motherboard 15d9 a811 H8DGU 4399 SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 1019 2120 A785GM-M @@ -1271,6 +1276,7 @@ 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 1458 5004 GA-880GMA-USB3 + 1462 7596 760GM-E51(MS-7596) Motherboard 174b 1001 PURE Fusion Mini 439c SB7x0/SB8x0/SB9x0 IDE Controller 1002 4392 MSI MS-7713 motherboard @@ -1278,6 +1284,7 @@ 103c 1609 ProLiant MicroServer N36L 1043 82ef M3A78-EH Motherboard 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1462 7596 760GM-E51(MS-7596) Motherboard 439d SB7x0/SB8x0/SB9x0 LPC host controller 1019 2120 A785GM-M 103c 1609 ProLiant MicroServer N36L @@ -1285,6 +1292,7 @@ 1043 82ef M3A78-EH Motherboard 1043 8443 M5A88-V EVO 105b 0e13 N15235/A74MX mainboard / AMD SB700 + 1462 7596 760GM-E51(MS-7596) Motherboard 174b 1001 PURE Fusion Mini 43a0 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0) 43a1 SB700/SB800/SB900 PCI to PCI bridge (PCIE port 1) @@ -1913,6 +1921,7 @@ 6607 Mars LE [Radeon HD 8530M / R5 M240] 6608 Oland GL [FirePro W2100] 13cc 3d28 MXRT-2600 + 6609 Oland GL [FirePro W2100 / Barco MXRT 2600] 6610 Oland XT [Radeon HD 8670 / R7 250/350] 1019 0030 Radeon HD 8670 1028 2120 Radeon R7 250 @@ -2592,6 +2601,7 @@ 1043 04dd STRIX R9 390 148c 2358 Radeon R9 390 174b e324 Sapphire Nitro R9 390 + 67b8 Hawaii XT [Radeon R9 290X Engineering Sample] 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE 67c0 Ellesmere [Radeon Pro WX 7100 Mobile] @@ -3617,8 +3627,10 @@ 738c Arcturus GL-XL [AMD Instinct MI100] 738e Arcturus GL-XL 73bf Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] + 1eae 6701 XFX Speedster MERC 319 AMD Radeon RX 6800 XT Black 73c3 Navi 22 73df Navi 22 + 73e0 Navi 23 73ff Navi 23 7833 RS350 Host Bridge 7834 RS350 [Radeon 9100 PRO/XT IGP] @@ -3827,6 +3839,7 @@ 95cd RV620 GL [FirePro 2450] 95cf RV620 GL [FirePro 2260] 960f RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300] + 1462 7596 760GM-E51(MS-7596) Motherboard 9610 RS780 [Radeon HD 3200] 1458 d000 GA-MA78GM-S2H Motherboard 9611 RS780C [Radeon 3100] @@ -3835,6 +3848,8 @@ 9614 RS780D [Radeon HD 3300] 9615 RS780E [Radeon HD 3200] 9616 RS780L [Radeon 3000] +# ID is probably a copy-paste error by a MSI developer from another mainboard, since all other ID numbers on this mainboard including the sub-device of this device has used subsystem ID 1462:7596 + 1462 7501 760GM-E51(MS-7596) Motherboard 9640 Sumo [Radeon HD 6550D] 9641 Sumo [Radeon HD 6620G] 9642 SuperSumo [Radeon HD 6370D] @@ -4169,12 +4184,12 @@ 2646 0001 KNE100TX Fast Ethernet 000a 21230 Video Codec 000d PBXGB [TGA2] - 000f DEFPA FDDI PCI-to-PDQ Interface Chip [PFI] - 1011 def1 FDDI controller (DEFPA) - 103c def1 FDDI controller (3X-DEFPA) + 000f PCI-to-PDQ Interface Chip [PFI] FDDI (DEFPA) + 1011 def1 FDDIcontroller/PCI (DEFPA) + 103c def1 FDDIcontroller/PCI (3X-DEFPA) 0014 DECchip 21041 [Tulip Pass 3] 1186 0100 DE-530+ - 0016 DGLPB [OPPO] + 0016 ATMworks 350 Adapter [OPPO] (DGLPB) 0017 PV-PCI Graphics Controller (ZLXp-L) 0018 Memory Channel interface 0019 DECchip 21142/43 @@ -4637,6 +4652,7 @@ 1450 Family 17h (Models 00h-0fh) Root Complex 1451 Family 17h (Models 00h-0fh) I/O Memory Management Unit 1452 Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge + ea50 ce19 mCOM10-L1900 1453 Family 17h (Models 00h-0fh) PCIe GPP Bridge 1454 Family 17h (Models 00h-0fh) Internal PCIe GPP Bridge 0 to Bus B 1455 Zeppelin/Renoir PCIe Dummy Function @@ -4788,7 +4804,9 @@ 15d5 FireFlight USB 3.1 15da Raven/Raven2 PCIe Dummy Host Bridge 15db Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A + ea50 ce19 mCOM10-L1900 15dc Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B + ea50 ce19 mCOM10-L1900 15de Raven/Raven2/FireFlight HD Audio Controller 15df Family 17h (Models 10h-1fh) Platform Security Processor 1043 876b PRIME Motherboard @@ -4938,6 +4956,7 @@ 2096 CS5536 [Geode companion] UDC 2097 CS5536 [Geode companion] UOC 209a CS5536 [Geode companion] IDE + 2625 AMD Lance/PCI PCNet/32 3000 ELanSC520 Microcontroller 43a0 Hudson PCI to PCI bridge (PCIE port 0) 43a1 Hudson PCI to PCI bridge (PCIE port 1) @@ -7057,6 +7076,7 @@ 103c 17e8 SN1000Q 16Gb Dual Port Fibre Channel Adapter 103c 1939 QMH2672 16Gb Dual Port Fibre Channel Adapter 103c 8002 3830C 16G Fibre Channel Host Bus Adapter + 1077 0241 QLE2670 16Gb Single Port Fibre Channel Adapter 2071 ISP2714-based 16/32Gb Fibre Channel to PCIe Adapter 1077 0283 QLE2764 Quad Port 32Gb Fibre Channel to PCIe Adapter 1077 029e QLE2694 Quad Port 16Gb Fibre Channel to PCIe Adapter @@ -7065,6 +7085,9 @@ 2081 ISP2814-based 64/32G Fibre Channel to PCIe Controller 1077 02e1 QLE2874 Quad Port 64GFC PCIe Gen4 x16 Adapter 1077 02e3 QLE2774 Quad Port 32GFC PCIe Gen4 x16 Adapter + 2089 ISP2854-based 64/32G Fibre Channel to PCIe Controller with StorCryption + 1077 02e8 QLE2884 Quad Port 64GFC PCIe Gen4 x16 Adapter with StorCryption + 1077 02ea QLE2784 Quad Port 32GFC PCIe Gen4 x16 Adapter with StorCryption 2100 QLA2100 64-bit Fibre Channel Adapter 1077 0001 QLA2100 64-bit Fibre Channel Adapter 2200 QLA2200 64-bit Fibre Channel Adapter @@ -7085,6 +7108,7 @@ 1590 0203 StoreFabric SN1600Q 32Gb Single Port Fibre Channel Host Bus Adapter 1590 0204 StoreFabric SN1600Q 32Gb Dual Port Fibre Channel Host Bus Adapter 1590 022d 5830C 32Gb Dual Port Fibre Channel Adapter + 193d 100d NIC-FC680i-Mb-2x16G 2281 ISP2812-based 64/32G Fibre Channel to PCIe Controller 1077 02e2 QLE2872 Dual Port 64GFC PCIe Gen4 x8 Adapter 1077 02e4 QLE2772 Dual Port 32GFC PCIe Gen4 x8 Adapter @@ -7094,6 +7118,11 @@ 1077 02f3 QLogic 2x32Gb QLE2772 FC HBA 1590 02d3 SN1610Q - 1P Enhanced 32GFC Single Port Fibre Channel Host Bus Adapter 1590 02d4 SN1610Q – 2P Enhanced 32GFC Dual Port Fibre Channel Host Bus Adapter + 2289 ISP2852-based 64/32G Fibre Channel to PCIe Controller with StorCryption + 1077 02e9 QLE2882 Dual Port 64GFC PCIe Gen4 x8 Adapter with StorCryption + 1077 02eb QLE2782 Dual Port 32GFC PCIe Gen4 x8 Adapter with StorCryption + 1077 02ef QLE2880 Single Port 64GFC PCIe Gen4 x8 Adapter with StorCryption + 1077 02f1 QLE2780 Single Port 32GFC PCIe Gen4 x8 Adapter with StorCryption 2300 QLA2300 64-bit Fibre Channel Adapter 2312 ISP2312-based 2Gb Fibre Channel to PCI-X HBA 103c 0131 2Gb Fibre Channel - Single port [A7538A] @@ -7186,6 +7215,8 @@ 1590 021f 10/25GbE 2P QL41262HMCU-HP Adapter 1590 0220 10/25GbE 2P QL41122HLRJ-HP Adapter 1590 02bd 10Gb 2P 524SFP+ NIC + 193d 1030 NIC-ETH681i-Mb-2x25G + 193d 1032 NIC-ETH682i-Mb-2x25G 8080 FastLinQ QL41000 Series 10/25/40/50GbE Controller (FCoE) 1077 0001 10GE 2P QL41162HxRJ-DE Adapter 1077 0002 10GE 2P QL41112HxCU-DE Adapter @@ -11994,8 +12025,8 @@ 1c2d GP106M 1c30 GP106GL [Quadro P2000] 1c31 GP106GL [Quadro P2200] - 1c35 GP106 - 1c36 GP106 + 1c35 GP106M [Quadro P2000 Mobile] + 1c36 GP106 [P106M] 1c60 GP106BM [GeForce GTX 1060 Mobile 6GB] 103c 8390 GeForce GTX 1060 Max-Q 6GB 1c61 GP106BM [GeForce GTX 1050 Ti Mobile] @@ -12141,6 +12172,7 @@ 1f98 TU117M [GeForce MX450] 1f99 TU117M 1f9c TU117M [GeForce MX450] + 1f9d TU117M [GeForce GTX 1650 Mobile / Max-Q] 1fae TU117GL 1fb8 TU117GLM [Quadro T2000 Mobile / Max-Q] 1fb9 TU117GLM [Quadro T1000 Mobile] @@ -12150,6 +12182,7 @@ 1ff9 TU117GLM [Quadro T1000 Mobile] 20b0 GA100 [A100 SXM4 40GB] 20b1 GA100 [A100 PCIe 40GB] + 20b2 GA100 [A100 SXM4 80GB] 20be GA100 [GRID A100A] 20bf GA100 [GRID A100B] 20f1 GA100 [A100 PCIe 40GB] @@ -12175,6 +12208,7 @@ 222f GA102 [GeForce RTX 3080 11GB / 12GB Engineering Sample] 2230 GA102GL [RTX A6000] 2235 GA102GL [RTX A40] + 2236 GA102GL 223f GA102GL 228b GA104 High Definition Audio Controller 2321 GA103 @@ -12190,16 +12224,20 @@ 24ad GA104 [GeForce RTX 3060 Engineering Sample] 24af GA104 [GeForce RTX 3070 Engineering Sample] 24b6 GA104 + 24b8 GA104 24bf GA104 [GeForce RTX 3070 Engineering Sample] 24dc GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB] 24dd GA104M [GeForce RTX 3070 Mobile / Max-Q] - 2501 GA106 [GeForce RTX 3060 12GB] - 2503 GA106 [GeForce RTX 3060 6GB] + 2501 GA106 [GeForce RTX 3060] + 2503 GA106 [GeForce RTX 3060] 2505 GA106 2520 GA106M [GeForce RTX 3060 Mobile / Max-Q] 252f GA106 [GeForce RTX 3060 Engineering Sample] 2560 GA106M [GeForce RTX 3060 Mobile / Max-Q] 2583 GA107 [GeForce RTX 3050] + 25a0 GA107M [GeForce RTX 3050 Ti Mobile] + 25a2 GA107M [GeForce RTX 3050 Mobile] + 25a4 GA107 25af GA107 [GeForce RTX 3050 Engineering Sample] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) @@ -12261,6 +12299,7 @@ 1590 0213 StoreFabric SN1200E 1-Port 16Gb Fibre Channel Adapter 1590 0214 StoreFabric SN1200E 2-Port 16Gb Fibre Channel Adapter 1590 022e Synergy 5330C 2-Port 32Gb Fibre Channel Mezz Card + 193d 1060 NIC-FC730i-Mb-2P f011 Saturn: LightPulse Fibre Channel Host Adapter f015 Saturn: LightPulse Fibre Channel Host Adapter f085 LP850 Fibre Channel Host Adapter @@ -12521,6 +12560,7 @@ 1028 0283 Vostro 220 1028 04b2 Vostro 3350 1028 04da Vostro 3750 + 1028 05d7 Alienware X51 R2 1028 06f2 Latitude 3470 1028 06f3 Latitude 3570 1028 0869 Vostro 3470 @@ -12930,12 +12970,12 @@ 0336 K8M890CE Host Bridge 0340 PT900 Host Bridge 0351 K8T890CF Host Bridge - 0353 VX800 Host Bridge + 0353 VX800/820-Series Chipset Host-Bridge Controller 0364 CN896/VN896/P4M900 Host Bridge 1043 81ce P5VD2-VM mothervoard 0391 VT8371 [KX133] 0409 VX855/VX875 Host Bridge: Host Control - 0410 VX900 Host Bridge: Host Control + 0410 VX900 Series Host Bridge: Host Control 0415 VT6415 PATA IDE Host Controller 1043 838f Motherboard 0501 VT8501 [Apollo MVP4] @@ -12962,7 +13002,7 @@ # probably all K7VT2/4*/6 1849 0571 K7VT series Motherboards 0576 VT82C576 3V [Apollo Master] - 0581 CX700/VX700 RAID Controller + 0581 CX700/VX700/VX800/820-Series Serial ATA RAID-Controller # Upgrade bios to get correct ID: 5324 instead of 0581 1106 0581 Wrong IDE ID 0585 VT82C585VP [Apollo VP1/VPX] @@ -13028,7 +13068,7 @@ 1353 VX800/VX820 Error Reporting 1364 CN896/VN896/P4M900 Host Bridge 1409 VX855/VX875 Error Reporting - 1410 VX900 Error Reporting + 1410 VX900 Series Error Reporting 1571 VT82C576M/VT82C586 1595 VT82C595/97 [Apollo VP2/97] 1732 VT1732 [Envy24 II] PCI Multi-Channel Audio Controller @@ -13053,7 +13093,7 @@ 2353 VX800/VX820 Host Bus Control 2364 CN896/VN896/P4M900 Host Bridge 2409 VX855/VX875 Host Bus Control - 2410 VX900 CPU Bus Controller + 2410 VX900 Series CPU Bus Controller 287a VT8251 PCI to PCI Bridge 287b VT8251 Host Bridge 287c VT8251 PCIE Root Port @@ -13186,7 +13226,7 @@ 3101 VT8653 Host Bridge 3102 VT8662 Host Bridge 3103 VT8615 Host Bridge - 3104 USB 2.0 + 3104 USB 2.0 EHCI-Compliant Host-Controller 0925 1234 onboard EHCI USB 2.0 Controller 1019 0a81 L7VTA v1.0 Motherboard (KT400-8235) 1043 808c A7V8X motherboard @@ -13299,7 +13339,7 @@ 3269 KT880 Host Bridge 3282 K8T800Pro Host Bridge 3287 VT8251 PCI to ISA Bridge - 3288 VT8237A/VT8251 HDA Controller + 3288 VX900/VT8xxx High Definition Audio Controller 19da a179 ZBOX VD01 3290 K8M890 Host Bridge 3296 P4M800 Host Bridge @@ -13312,7 +13352,7 @@ 3344 CN700/P4M800 Pro/P4M800 CE/VN800 Graphics [S3 UniChrome Pro] 3349 VT8251 AHCI/SATA 4-Port Controller 3351 VT3351 Host Bridge - 3353 VX800 PCI to PCI Bridge + 3353 VX800/820 PCI to PCI Bridge 3364 CN896/VN896/P4M900 Host Bridge 3371 CN896/VN896/P4M900 [Chrome 9 HC] 3372 VT8237S PCI to ISA Bridge @@ -13322,12 +13362,12 @@ 1043 8374 M5A88-V EVO 1043 8384 P8P67 Deluxe Motherboard 3409 VX855/VX875 DRAM Bus Control - 3410 VX900 DRAM Bus Control + 3410 VX900 Series DRAM Bus Control 19da a179 ZBOX nano VD01 - 3432 VL80x xHCI USB 3.0 Controller + 3432 VL800/801 xHCI USB 3.0 Controller 3456 VX11 Standard Host Bridge 345b VX11 Miscellaneous Bus - 3483 VL805 USB 3.0 Host Controller + 3483 VL805/806 xHCI USB 3.0 Controller 3a01 VX11 Graphics [Chrome 645/640] 4149 VIA VT6420 (ATA133) Controller 4204 K8M800 Host Bridge @@ -13350,7 +13390,7 @@ 4353 VX800/VX820 Power Management Control 4364 CN896/VN896/P4M900 Host Bridge 4409 VX855/VX875 Power Management Control - 4410 VX900 Power Management and Chip Testing Control + 4410 VX900 Series Power Management and Chip Testing Control 19da a179 ZBOX nano VD01 5030 VT82C596 ACPI [Apollo PRO] 5122 VX855/VX875 Chrome 9 HCM Integrated Graphics @@ -13359,7 +13399,7 @@ 5287 VT8251 Serial ATA Controller 5290 K8M890 I/O APIC Interrupt Controller 5308 PT894 I/O APIC Interrupt Controller - 5324 VX800 Serial ATA and EIDE Controller + 5324 CX700M2/VX700/VX800/820-Series Serial ATA & EIDE-Controller 5327 P4M890 I/O APIC Interrupt Controller 5336 K8M890CE I/O APIC Interrupt Controller 5340 PT900 I/O APIC Interrupt Controller @@ -13368,7 +13408,7 @@ 5364 CN896/VN896/P4M900 I/O APIC Interrupt Controller 5372 VT8237/8251 Serial ATA Controller 5409 VX855/VX875 APIC and Central Traffic Control - 5410 VX900 APIC and Central Traffic Control + 5410 VX900 Series APIC and Central Traffic Control 6100 VT85C100A [Rhine II] 6287 SATA RAID Controller 6290 K8M890CE Host Bridge @@ -13376,7 +13416,7 @@ 6353 VX800/VX820 Scratch Registers 6364 CN896/VN896/P4M900 Security Device 6409 VX855/VX875 Scratch Registers - 6410 VX900 Scratch Registers + 6410 VX900 Series Scratch Registers 19da a179 ZBOX nano VD01 7122 VX900 Graphics [Chrome9 HD] 7204 K8M800 Host Bridge @@ -13402,7 +13442,7 @@ 7353 VX800/VX820 North-South Module Interface Control 7364 CN896/VN896/P4M900 Host Bridge 7409 VX855/VX875 North-South Module Interface Control - 7410 VX900 North-South Module Interface Control + 7410 VX900 Series North-South Module Interface Control 19da a179 ZBOX nano VD01 8231 VT8231 [PCI-to-ISA Bridge] 8235 VT8235 ACPI @@ -13412,7 +13452,7 @@ 8391 VT8371 [KX133 AGP] 8400 MVP4 8409 VX855/VX875 Bus Control and Power Management - 8410 VX900 Bus Control and Power Management + 8410 VX900 Series Bus Control and Power Management 19da a179 ZBOX VD01 8500 KLE133/PLE133/PLE133T 8501 VT8501 [Apollo MVP4 AGP] @@ -13428,19 +13468,19 @@ 8a26 KL133/KL133A/KM133/KM133A [S3 ProSavage] 8d01 PN133/PN133T [S3 Twister] 8d04 KM266/P4M266/P4M266A/P4N266 [S3 ProSavageDDR] - 9001 VX900 Serial ATA Controller + 9001 VX900 Series Serial-ATA Controller 9082 Standard AHCI 1.0 SATA Controller 9140 HDMI Audio Device 9201 USB3.0 Controller - 9530 Secure Digital Memory Card Controller - 95d0 SDIO Host Controller + 9530 VX800/820/900 Series Secure Digital Memory Card Controller + 95d0 VX800/820/900 Series SDIO Host Controller a208 PT890 PCI to PCI Bridge Controller a238 K8T890 PCI to PCI Bridge Controller a327 P4M890 PCI to PCI Bridge Controller - a353 VX8xx South-North Module Interface Control + a353 VX8xx/900 Series South-North Module Interface Control a364 CN896/VN896/P4M900 PCI to PCI Bridge Controller - a409 VX855/VX875 USB Device Controller - a410 VX900 PCI Express Root Port 0 + a409 VX855/VX875/VX900 Series USB Device Controller + a410 VX900 Series PCI Express Root Port 0 b091 VT8633 [Apollo Pro266 AGP] b099 VT8366/A/7 [Apollo KT266/A/333 AGP] b101 VT8653 AGP Bridge @@ -13455,31 +13495,32 @@ b198 VT8237/VX700 PCI Bridge b213 VPX/VPX2 I/O APIC Interrupt Controller b353 VX855/VX875/VX900 PCI to PCI Bridge - b410 VX900 PCI Express Root Port 1 + b410 VX900 Series PCI Express Root Port 1 b999 [K8T890 North / VT8237 South] PCI Bridge c208 PT890 PCI to PCI Bridge Controller c238 K8T890 PCI to PCI Bridge Controller c327 P4M890 PCI to PCI Bridge Controller c340 PT900 PCI to PCI Bridge Controller - c353 VX800/VX820 PCI Express Root Port + c353 VX800/820-Series PCI-Express Root (PCI-to-PCI Virtual Bridge) c364 CN896/VN896/P4M900 PCI to PCI Bridge Controller c409 VX855/VX875 EIDE Controller - c410 VX900 PCI Express Root Port 2 + c410 VX900 Series PCI Express Root Port 2 d104 VT8237R USB UDCI Controller d208 PT890 PCI to PCI Bridge Controller d213 VPX/VPX2 PCI to PCI Bridge Controller d238 K8T890 PCI to PCI Bridge Controller d340 PT900 PCI to PCI Bridge Controller - d410 VX900 PCI Express Root Port 3 + d410 VX900 Series PCI Express Root Port 3 e208 PT890 PCI to PCI Bridge Controller e238 K8T890 PCI to PCI Bridge Controller e340 PT900 PCI to PCI Bridge Controller - e353 VX800/VX820 PCI Express Root Port - e410 VX900 PCI Express Physical Layer Electrical Sub-block + e353 VX800/820-Series PCI-Express Root Port 0 + e410 VX900 Series PCI Express Physical Layer Electrical Sub-block f208 PT890 PCI to PCI Bridge Controller f238 K8T890 PCI to PCI Bridge Controller f340 PT900 PCI to PCI Bridge Controller - f353 VX800/VX820 PCI Express Root Port + f353 VX800/820-Series PCI-Express Root Port 1 + f410 VX900 Series PCI UART Port 0-3 1107 Stratus Computers 0576 VIA VT82C570MV [Apollo] (Wrong vendor ID!) 1108 Proteon, Inc. @@ -15520,6 +15561,7 @@ 8073 PM8073 Tachyon SPCve 12G 16-port SAS/SATA controller 8531 PM8531 PFX 24xG3 Fanout PCIe Switches 8546 PM8546 B-FEIP PSX 96xG3 PCIe Storage Switch + 8562 PM8562 Switchtec PFX-L 32xG3 Fanout-Lite PCIe Gen3 Switch 11f9 I-Cube Inc 11fa Kasan Electronics Company, Ltd. 11fb Datel Inc @@ -18369,6 +18411,7 @@ 144d a801 SM963 2.5" NVMe PCIe SSD a808 NVMe SSD Controller SM981/PM981/PM983 1d49 403b Thinksystem U.2 PM983 NVMe SSD + a80a NVMe SSD Controller PM9A1/980PRO a820 NVMe SSD Controller 171X 1028 1f95 Express Flash NVMe XS1715 SSD 400GB 1028 1f96 Express Flash NVMe XS1715 SSD 800GB @@ -18970,6 +19013,7 @@ 103c 339d Ethernet 10Gb 2-port 530SFP+ Adapter 193d 1003 530F-B 193d 1006 530F-L + 193d 100f NIC-ETH522i-Mb-2x10G 1690 NetXtreme BCM57760 Gigabit Ethernet PCIe 1691 NetLink BCM57788 Gigabit Ethernet PCIe 1028 04aa XPS 8300 @@ -18996,6 +19040,7 @@ 16a0 NetLink BCM5785 Fast Ethernet 16a1 BCM57840 NetXtreme II 10 Gigabit Ethernet 1043 866e PEB-10G/57840-2T 10GBase-T Network Adapter + 193d 100b NIC-ETH521i-Mb-4x10G 16a2 BCM57840 NetXtreme II 10/20-Gigabit Ethernet 103c 1916 FlexFabric 20Gb 2-port 630FLB Adapter 103c 1917 FlexFabric 20Gb 2-port 630M Adapter @@ -20246,12 +20291,14 @@ 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC 193d 100a 620F-B + 193d 1031 NIC-ETH640i-Mb-2x25G 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 15b3 0006 ConnectX®-5 EN network interface card, 100GbE single-port QSFP28, PCIe3.0 x16, tall bracket; MCX515A-CCAT 15b3 0007 Mellanox ConnectX®-5 MCX516A-CCAT 15b3 0020 ConnectX®-5 EN network interface card, 10/25GbE dual-port SFP28, PCIe3.0 x8, tall bracket ; MCX512A-ACAT 15b3 0068 ConnectX®-5 EN network interface card for OCP2.0, Type 1, with host management, 25GbE dual-port SFP28, PCIe3.0 x8, no bracket Halogen free ; MCX542B-ACAN + 193d 1051 NIC-IB1040i-Mb-2P 1018 MT27800 Family [ConnectX-5 Virtual Function] 1019 MT28800 Family [ConnectX-5 Ex] 15b3 0008 ConnectX-5 Ex EN network interface card, 100GbE dual-port QSFP28, PCIe4.0 x16, tall bracket; MCX516A-CDAT @@ -20372,7 +20419,7 @@ 15b7 Sandisk Corp 2001 Skyhawk Series NVME SSD 5001 WD Black NVMe SSD - 5002 WD Black 2018 / PC SN720 NVMe SSD + 5002 WD Black 2018/SN750 / PC SN720 NVMe SSD 5003 WD Blue SN500 / PC SN520 NVMe SSD 5004 PC SN520 NVMe SSD 5005 PC SN520 NVMe SSD @@ -20382,6 +20429,7 @@ 500b PC SN530 NVMe SSD 1414 500b Xbox Series X 500d WD Ultrastar DC SN340 NVMe SSD + 5011 WD Black SN850 15b8 ADDI-DATA GmbH 1001 APCI1516 SP controller (16 digi outputs) 1003 APCI1032 SP controller (32 digi inputs w/ opto coupler) @@ -21132,6 +21180,7 @@ ab08 21x4x DEC-Tulip compatible 10/100 Ethernet ab09 21x4x DEC-Tulip compatible 10/100 Ethernet 173b Altima (nee Broadcom) + 0001 AC1002 PCI Gigabit Ethernet controller 03e8 AC1000 Gigabit Ethernet 03e9 AC1001 Gigabit Ethernet 03ea AC9100 Gigabit Ethernet @@ -21179,6 +21228,10 @@ 0245 PCA7428CE_F1 - Analog Inputs isolated 0303 PCD-7006C Digital Input & Output PCI Card 0800 PCD8006 - PCIe digital Inputs/Outputs + 0840 PCA-8428 General-purpose multifunctional PCIe card with 8 analog inputs and 2 analog outputs + 0841 PCA-8429 General-purpose multifunctional PCIe card with 8 analog inputs + 0842 PCA-8438 General-purpose multifunctional PCIe card with 16 analog inputs and 2 analog outputs + 0843 PCA-8439 General-purpose multifunctional PCIe card with 16 analog inputs ff00 CTU CAN FD PCIe Card 1761 Pickering Interfaces Ltd 1771 InnoVISION Multimedia Ltd. @@ -22757,6 +22810,7 @@ 1242 ASM1142 USB 3.1 Host Controller 1343 ASM1143 USB 3.1 Host Controller 2142 ASM2142 USB 3.1 Host Controller + 1462 7a72 H270 PC MATE 3242 ASM3242 USB 3.2 Host Controller 1b26 Netcope Technologies, a.s. c132 COMBO-LXT155 @@ -22839,6 +22893,7 @@ 9172 88SE9172 SATA 6Gb/s Controller 9178 88SE9170 PCIe SATA 6Gb/s Controller 917a 88SE9172 SATA III 6Gb/s RAID Controller + 9182 88SE9182 PCIe 2.0 x2 2-port SATA 6 Gb/s Controller 9183 88SS9183 PCIe SSD Controller 9192 88SE9172 SATA III 6Gb/s RAID Controller 91a0 88SE912x SATA 6Gb/s Controller [IDE mode] @@ -23081,6 +23136,7 @@ 1284 PC300 NVMe Solid State Drive 512GB 1285 PC300 NVMe Solid State Drive 1TB 1327 BC501 NVMe Solid State Drive 512GB + 1339 BC511 1504 SC300 512GB M.2 2280 SATA Solid State Drive 1527 PC401 NVMe Solid State Drive 256GB 243b PE6110 NVMe Solid State Drive @@ -23091,6 +23147,10 @@ 000d PBlaze5 520/526 003d PBlaze5 920/926 003e PBlaze6 6920 + 1c5f 0a31 NVMe SSD PBlaze6 6920 3840GB 2.5" U.2 + 1c5f 0a41 NVMe SSD PBlaze6 6920 7680GB 2.5" U.2 + 1c5f 4a31 NVMe SSD PBlaze6 6920 3200GB 2.5" U.2 + 1c5f 4a41 NVMe SSD PBlaze6 6920 6400GB 2.5" U.2 0540 PBlaze4 NVMe SSD 0550 PBlaze5 700/900 0555 PBlaze5 510/516 @@ -23174,6 +23234,7 @@ 1d00 Pure Storage 1d05 Tongfang Hongkong Limited 1d0f Amazon.com, Inc. + 8061 NVMe EBS Controller cd01 NVMe SSD Controller ec20 Elastic Network Adapter (ENA) efa0 Elastic Fabric Adapter (EFA) @@ -23304,6 +23365,9 @@ 1014 AR-MAN-U280 [Manitou Class Accelerator for U280] 1015 AR-ARK-BBDEV-FX0 [Arkville 32B DPDK Baseband Device] 1016 AR-ARK-BBDEV-FX1 [Arkville 64B DPDK Baseband Device] + 1017 AR-ARK-FX1 [Arkville 64B Multi-Homed Primary Endpoint] + 1018 AR-ARK-FX1 [Arkville 64B Multi-Homed Secondary Endpoint] + 1019 AR-ARK-FX1 [Arkville 64B Multi-Homed Tertiary Endpoint] 4200 A5PL-E1-10GETI [10 GbE Ethernet Traffic Instrument] 1d72 Xiaomi 1d78 DERA Storage @@ -23331,7 +23395,7 @@ 0100 RK3399 PCI Express Root Port 1808 RK1808 Neural Network Processor Card 1d8f Enyx -1d93 YADRO (KNS Group) +1d93 YADRO 1d94 Chengdu Haiguang IC Design Co., Ltd. 1450 Root Complex 1451 I/O Memory Management Unit @@ -23387,61 +23451,61 @@ 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1001 DSC Virtual Downstream Port 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1002 DSC Ethernet Controller 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1003 DSC Ethernet Controller VF 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1004 DSC Management Controller 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1007 DSC Storage Accelerator 1dd8 4000 Naples 100Gb 2-port QSFP28 x16 8GB 1dd8 4001 Naples 100Gb 2-port QSFP28 x16 4GB 1dd8 4002 Naples 25Gb 2-port SFP28 x8 4GB - 1dd8 4007 DSP DSC-25 10/25G 2p OCP Card - 1dd8 4008 DSC-25 10/25G 2-port SFP28 x8 4GB RAM 8GB eMMC + 1dd8 4007 DSP DSC-25 Ent 10/25G OCP3 Card + 1dd8 4008 DSP DSC-25 10/25G 2p SFP28 Card 1dd8 400a DSC-100 40/100G 2-port 8G RAM 16G eMMC G1 Services Card 1dd8 400c DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card - 1dd8 400d DSP DSC-100 100G 2p QSFP28 Card + 1dd8 400d DSP DSC-100 Ent 100Gb Card 1dd8 400e DSC-25 10/25G 2-port 4G RAM 8G eMMC G1 Services Card 1de0 Groq # rename due to conflict with a term in use by another company for an entirely different product. @@ -23465,6 +23529,42 @@ e00a eMAG PCI Express Root Port 5 e00b eMAG PCI Express Root Port 6 e00c eMAG PCI Express Root Port 7 +# Root Complex A (RCA) + e100 Altra PCI Express Root Complex A +# RCA port 0 + e101 Altra PCI Express Root Port a0 +# RCA port 1 + e102 Altra PCI Express Root Port a1 +# RCA port 2 + e103 Altra PCI Express Root Port a2 +# RAC port 3 + e104 Altra PCI Express Root Port a3 +# RCA port 4 + e105 Altra PCI Express Root Port a4 +# RCA port 5 + e106 Altra PCI Express Root Port a5 +# RCA port 6 + e107 Altra PCI Express Root Port a6 +# RCA port 7 + e108 Altra PCI Express Root Port a7 +# Root Complex B (RCB) + e110 Altra PCI Express Root Complex B +# RCB port 0 + e111 Altra PCI Express Root Port b0 +# RCB port 1 + e112 Altra PCI Express Root Port b1 +# RCB port 2 + e113 Altra PCI Express Root Port b2 +# RCB port 3 + e114 Altra PCI Express Root Port b3 +# RCB port 4 + e115 Altra PCI Express Root Port b4 +# RCB port 5 + e116 Altra PCI Express Root Port b5 +# RCB port 6 + e117 Altra PCI Express Root Port b6 +# RCB port 7 + e118 Altra PCI Express Root Port b7 1df3 Ethernity Networks 0201 ACE-NIC40 Programmable Network Accelerator 1df3 0001 ENA1040 @@ -23595,12 +23695,18 @@ # aka SED Systems 1e94 Calian SED 1e95 Solid State Storage Technology Corporation +1ea0 Tencent Technology (Shenzhen) Company Limited + 2a16 Cloud Intelligent Inference Controller 1eab Hefei DATANG Storage Technology Co.,LTD. 300a NVMe SSD Controller 300A 300b NVMe SSD Controller 300B 1eae XFX Limited 1eb1 VeriSilicon Inc 1001 Video Accelerator +1ed8 Digiteq Automotive + 0101 FG4 PCIe Frame Grabber +1ed9 Myrtle.ai +1ee9 SUSE LLC # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -23851,6 +23957,8 @@ 7073 CH356 PCI Quad Serial and Parallel Ports Controller 7173 CH355 PCI Quad Serial Port Controller 434e CAST Navigation LLC +43b0 Tiger Lake-H PCIe Root Port #9 +43bc Tiger Lake-H PCIe Root Port #5 4444 Internext Compression Inc 0016 iTVC16 (CX23416) Video Decoder 0070 0003 WinTV PVR 250 @@ -24521,11 +24629,19 @@ 02a3 Comet Lake PCH-LP SMBus Host Controller 02a4 Comet Lake SPI (flash) Controller 02a6 Comet Lake North Peak + 02b0 Comet Lake PCI Express Root Port #9 + 02b1 Comet Lake PCI Express Root Port #10 + 02b3 Comet Lake PCI Express Root Port #12 + 02b4 Comet Lake PCI Express Root Port #13 + 02b8 Comet Lake PCI Express Root Port #1 + 02bc Comet Lake PCI Express Root Port #5 + 02c5 Comet Lake Serial IO I2C Host Controller 02c8 Comet Lake PCH-LP cAVS 02d3 Comet Lake SATA AHCI Controller 02e0 Comet Lake Management Engine Interface 02e8 Serial IO I2C Host Controller 02e9 Comet Lake Serial IO I2C Host Controller + 02ea Comet Lake PCH-LP LPSS: I2C Controller #2 02ed Comet Lake PCH-LP USB 3.1 xHCI Host Controller 02ef Comet Lake PCH-LP Shared SRAM 02f0 Comet Lake PCH-LP CNVi WiFi @@ -24564,6 +24680,7 @@ 0406 Haswell Integrated Graphics Controller 040a Xeon E3-1200 v3 Processor Integrated Graphics Controller 0412 Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller + 1028 05d7 Alienware X51 R2 103c 1998 EliteDesk 800 G1 17aa 3098 ThinkCentre E73 17aa 309f ThinkCentre M83 @@ -25112,7 +25229,7 @@ 1028 1fe9 Express Flash NVMe 4.0TB HHHL AIC (P4600) 0b26 Thunderbolt 4 Bridge [Goshen Ridge 2020] 0b27 Thunderbolt 4 USB Controller [Goshen Ridge 2020] - 0b60 NVMe DC SSD [3DNAND, Beta Rock Controller] + 0b60 NVMe DC SSD [3DNAND, Sentinel Rock Controller] 1028 2060 NVMe SED MU U.2 1.6TB (P5600) 1028 2061 NVMe SED MU U.2 3.2TB (P5600) 1028 2062 NVMe SED MU U.2 6.4TB (P5600) @@ -25125,6 +25242,7 @@ 1028 2102 NVMe RI U.2 1.92TB (P5500) 1028 2103 NVMe RI U.2 3.84TB (P5500) 1028 2104 NVMe RI U.2 7.68TB (P5500) + 8086 8008 NVMe Datacenter SSD [3DNAND] SE 2.5" U.2 (P5510) 0be0 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 0be1 Atom Processor D2xxx/N2xxx Integrated Graphics Controller 105b 0d7c D270S/D250S Motherboard @@ -25152,6 +25270,7 @@ 0bf6 Atom Processor D2xxx/N2xxx DRAM Controller 0bf7 Atom Processor D2xxx/N2xxx DRAM Controller 0c00 4th Gen Core Processor DRAM Controller + 1028 05d7 Alienware X51 R2 103c 1998 EliteDesk 800 G1 17aa 3098 ThinkCentre E73 17aa 309f ThinkCentre M83 @@ -26397,6 +26516,7 @@ 156f Ethernet Connection I219-LM 1028 06dc Latitude E7470 103c 8079 EliteBook 840 G3 + 17aa 2247 ThinkPad T570 1570 Ethernet Connection I219-V 1571 Ethernet Virtual Function 700 Series 1572 Ethernet Controller X710 for 10GbE SFP+ @@ -26415,7 +26535,10 @@ 17aa 0000 ThinkServer X710 AnyFabric for 10GbE SFP+ 17aa 4001 ThinkServer X710-4 AnyFabric for 10GbE SFP+ 17aa 4002 ThinkServer X710-2 AnyFabric for 10GbE SFP+ + 193d 1020 NIC-ETH561F-sL-4x10G + 193d 1021 NIC-ETH561F-sL-2x10G 19e5 d11c Ethernet 2-port X710 10Gb SFP+ Adapter SP330 + 1bd4 0042 10G SFP+ DP EP102Fi4 Adapter 1bd4 0056 Ethernet Network Adapter X710-BM2 for OCP NIC 3.0 8086 0000 Ethernet Converged Network Adapter X710 8086 0001 Ethernet Converged Network Adapter X710-4 @@ -26461,6 +26584,7 @@ 1059 0170 RD-01213 10GbE interface 1590 0000 Ethernet 2-port 563i Adapter 1590 00f8 Ethernet 2-port 563i Adapter + 193d 100e NIC-ETH561i-Mb-4x10G 8086 0000 Ethernet Converged Network Adapter XL710-Q2 1583 Ethernet Controller XL710 for 40GbE QSFP+ 1028 0000 Ethernet 40G 2P XL710 QSFP+ rNDC @@ -26599,6 +26723,7 @@ 15b6 DSL6540 USB 3.1 Controller [Alpine Ridge] 15b7 Ethernet Connection (2) I219-LM 15b8 Ethernet Connection (2) I219-V + 1462 7a72 H270 PC MATE 15b9 Ethernet Connection (3) I219-LM 15bb Ethernet Connection (7) I219-LM 15bc Ethernet Connection (7) I219-V @@ -26764,6 +26889,7 @@ 103c 825b OMEN-17-w001nv 1911 Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model 1028 0869 Vostro 3470 + 1462 7a72 H270 PC MATE 17aa 2247 ThinkPad T570 17aa 224f ThinkPad X1 Carbon 5th Gen 17aa 225d ThinkPad T480 @@ -26772,6 +26898,7 @@ 1028 06dc Latitude E7470 1028 06f3 Latitude 3570 103c 8079 EliteBook 840 G3 + 17aa 2247 ThinkPad T570 1918 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Host Bridge/DRAM Registers 1919 Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Imaging Unit 1028 06d6 Latitude 7275 tablet @@ -28681,6 +28808,7 @@ 277c 82975X Memory Controller Hub 1043 8178 P5WDG2 WS Professional motherboard 277d 82975X PCI Express Root Port + 2780 82915G/GV/GL/910GL [Grantsdale] Graphics Device 2782 82915G Integrated Graphics Controller 1043 2582 P5GD1-VW Mainboard 1734 105b Scenic W620 @@ -29698,6 +29826,7 @@ 2a41 Mobile 4 Series Chipset PCI Express Graphics Port e4bf cc4d CCM-BOOGIE 2a42 Mobile 4 Series Chipset Integrated Graphics Controller + 1028 02aa Dell Inspiron 1545 17aa 2112 ThinkPad T400 e4bf cc4d CCM-BOOGIE 2a43 Mobile 4 Series Chipset Integrated Graphics Controller @@ -30113,8 +30242,8 @@ 8086 4210 Dual Band Wireless AC 3165 3166 Dual Band Wireless-AC 3165 Plus Bluetooth 8086 4210 Dual Band Wireless-AC 3165 - 3184 UHD Graphics 605 - 3185 UHD Graphics 605 + 3184 GeminiLake [UHD Graphics 605] + 3185 GeminiLake [UHD Graphics 600] 318c Celeron/Pentium Silver Processor Dynamic Platform and Thermal Framework Processor Participant 318e Celeron/Pentium Silver Processor NorthPeak 3190 Celeron/Pentium Silver Processor Gaussian Mixture Model @@ -30859,17 +30988,17 @@ 3e81 8th Gen Core Processor PCIe Controller (x16) 3e85 8th Gen Core Processor PCIe Controller (x8) 3e89 8th Gen Core Processor PCIe Controller (x4) - 3e90 UHD Graphics 610 - 3e91 UHD Graphics 630 - 3e92 UHD Graphics 630 (Desktop) + 3e90 CoffeeLake-S GT1 [UHD Graphics 610] + 3e91 CoffeeLake-S GT2 [UHD Graphics 630] + 3e92 CometLake-S GT2 [UHD Graphics 630] 1028 0869 Vostro 3470 - 3e93 UHD Graphics 610 - 3e96 HD Graphics P630 - 3e98 UHD Graphics 630 (Desktop 9 Series) - 3e9b UHD Graphics 630 (Mobile) - 3ea0 UHD Graphics 620 (Whiskey Lake) + 3e93 CoffeeLake-S GT1 [UHD Graphics 610] + 3e96 CoffeeLake-S GT2 [UHD Graphics P630] + 3e98 CoffeeLake-S GT2 [UHD Graphics 630] + 3e9b CoffeeLake-H GT2 [UHD Graphics 630] + 3ea0 WhiskeyLake-U GT2 [UHD Graphics 620] 1028 089e Inspiron 5482 - 3ea5 Iris Plus Graphics 655 + 3ea5 CoffeeLake-U GT3e [Iris Plus Graphics 655] 3ec2 8th Gen Core Processor Host Bridge/DRAM Registers 1028 0869 Vostro 3470 1043 8694 PRIME H310M-D @@ -31007,6 +31136,14 @@ 8086 1216 WiMAX/WiFi Link 5150 ABG 8086 1311 WiMAX/WiFi Link 5150 AGN 8086 1316 WiMAX/WiFi Link 5150 ABG + 438b Tiger Lake-H LPC/eSPI Controller + 43a3 Tiger Lake-H SMBus Controller + 43a4 Tiger Lake-H SPI Controller + 43c8 Tiger Lake-H HD Audio Controller + 43e0 Tiger Lake-H Management Engine Interface *** 282 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sun Feb 21 09:43:04 2021 Return-Path: Delivered-To: dev-commits-src-all@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 6414155182C; Sun, 21 Feb 2021 09:43: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 4Dk0jh2Ntdz4SML; Sun, 21 Feb 2021 09:43: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 3A5D51045E; Sun, 21 Feb 2021 09:43: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 11L9h4Xf085190; Sun, 21 Feb 2021 09:43:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L9h4CL085189; Sun, 21 Feb 2021 09:43:04 GMT (envelope-from git) Date: Sun, 21 Feb 2021 09:43:04 GMT Message-Id: <202102210943.11L9h4CL085189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ee5ddf4296ad - stable/13 - procstat: distinguish vm map guards in procstat vm output. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ee5ddf4296ada4cac7f60cfb9517f01a87628a62 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 09:43:04 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ee5ddf4296ada4cac7f60cfb9517f01a87628a62 commit ee5ddf4296ada4cac7f60cfb9517f01a87628a62 Author: Konstantin Belousov AuthorDate: 2021-02-14 00:37:24 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:11:34 +0000 procstat: distinguish vm map guards in procstat vm output. (cherry picked from commit 25c6318c7906f6f4e0c66ce16f81bdb830ba2e3b) --- sys/kern/kern_proc.c | 7 +++++-- sys/sys/user.h | 1 + usr.bin/procstat/procstat.1 | 4 +++- usr.bin/procstat/procstat_vm.c | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 305bc7e8a2ef..f8fed2573712 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2514,7 +2514,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vm_offset_t addr; unsigned int last_timestamp; int error; - bool super; + bool guard, super; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -2584,6 +2584,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) if (entry->eflags & MAP_ENTRY_USER_WIRED) kve->kve_flags |= KVME_FLAG_USER_WIRED; + guard = (entry->eflags & MAP_ENTRY_GUARD) != 0; + last_timestamp = map->timestamp; vm_map_unlock_read(map); @@ -2620,7 +2622,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vput(vp); } } else { - kve->kve_type = KVME_TYPE_NONE; + kve->kve_type = guard ? KVME_TYPE_GUARD : + KVME_TYPE_NONE; kve->kve_ref_count = 0; kve->kve_shadow_count = 0; } diff --git a/sys/sys/user.h b/sys/sys/user.h index f60d73b77f3e..f882e7dcd699 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -465,6 +465,7 @@ struct kinfo_file { #define KVME_TYPE_DEAD 6 #define KVME_TYPE_SG 7 #define KVME_TYPE_MGTDEVICE 8 +#define KVME_TYPE_GUARD 9 #define KVME_TYPE_UNKNOWN 255 #define KVME_PROT_READ 0x00000001 diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index 1ce0b796beb4..affe69ffb615 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2020 +.Dd February 13, 2021 .Dt PROCSTAT 1 .Os .Sh NAME @@ -674,6 +674,8 @@ scatter/gather swap .It vn vnode +.It gd +guard (pseudo-type) .El .Pp The following mapping flags may be displayed: diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c index 13a4e1cf03af..7d698fefdc30 100644 --- a/usr.bin/procstat/procstat_vm.c +++ b/usr.bin/procstat/procstat_vm.c @@ -155,6 +155,10 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) str = "md"; lstr = "managed_device"; break; + case KVME_TYPE_GUARD: + str = "gd"; + lstr = "guard"; + break; case KVME_TYPE_UNKNOWN: default: str = "??"; From owner-dev-commits-src-all@freebsd.org Sun Feb 21 09:47:42 2021 Return-Path: Delivered-To: dev-commits-src-all@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 443E3551947; Sun, 21 Feb 2021 09:47: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 4Dk0q21T9gz4Sty; Sun, 21 Feb 2021 09:47: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 1AD34103F0; Sun, 21 Feb 2021 09:47: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 11L9lgC4086012; Sun, 21 Feb 2021 09:47:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11L9lgcF086011; Sun, 21 Feb 2021 09:47:42 GMT (envelope-from git) Date: Sun, 21 Feb 2021 09:47:42 GMT Message-Id: <202102210947.11L9lgcF086011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 1946484bcc15 - stable/12 - procstat: distinguish vm map guards in procstat vm output. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1946484bcc156f69a08203aabfab61a15e53bf55 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 09:47:42 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1946484bcc156f69a08203aabfab61a15e53bf55 commit 1946484bcc156f69a08203aabfab61a15e53bf55 Author: Konstantin Belousov AuthorDate: 2021-02-14 00:37:24 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:44:36 +0000 procstat: distinguish vm map guards in procstat vm output. (cherry picked from commit 25c6318c7906f6f4e0c66ce16f81bdb830ba2e3b) --- sys/kern/kern_proc.c | 7 +++++-- sys/sys/user.h | 1 + usr.bin/procstat/procstat.1 | 4 +++- usr.bin/procstat/procstat_vm.c | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 5b7a663f0d62..239e5790f8dd 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -2457,7 +2457,7 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vm_offset_t addr; unsigned int last_timestamp; int error; - bool super; + bool guard, super; PROC_LOCK_ASSERT(p, MA_OWNED); @@ -2528,6 +2528,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) if (entry->eflags & MAP_ENTRY_USER_WIRED) kve->kve_flags |= KVME_FLAG_USER_WIRED; + guard = (entry->eflags & MAP_ENTRY_GUARD) != 0; + last_timestamp = map->timestamp; vm_map_unlock_read(map); @@ -2602,7 +2604,8 @@ kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) vput(vp); } } else { - kve->kve_type = KVME_TYPE_NONE; + kve->kve_type = guard ? KVME_TYPE_GUARD : + KVME_TYPE_NONE; kve->kve_ref_count = 0; kve->kve_shadow_count = 0; } diff --git a/sys/sys/user.h b/sys/sys/user.h index 75661257528b..78867fe418e4 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -459,6 +459,7 @@ struct kinfo_file { #define KVME_TYPE_DEAD 6 #define KVME_TYPE_SG 7 #define KVME_TYPE_MGTDEVICE 8 +#define KVME_TYPE_GUARD 9 #define KVME_TYPE_UNKNOWN 255 #define KVME_PROT_READ 0x00000001 diff --git a/usr.bin/procstat/procstat.1 b/usr.bin/procstat/procstat.1 index 17da8648b714..e42931e6336c 100644 --- a/usr.bin/procstat/procstat.1 +++ b/usr.bin/procstat/procstat.1 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 14, 2020 +.Dd February 13, 2021 .Dt PROCSTAT 1 .Os .Sh NAME @@ -674,6 +674,8 @@ scatter/gather swap .It vn vnode +.It gd +guard (pseudo-type) .El .Pp The following mapping flags may be displayed: diff --git a/usr.bin/procstat/procstat_vm.c b/usr.bin/procstat/procstat_vm.c index 13a4e1cf03af..7d698fefdc30 100644 --- a/usr.bin/procstat/procstat_vm.c +++ b/usr.bin/procstat/procstat_vm.c @@ -155,6 +155,10 @@ procstat_vm(struct procstat *procstat, struct kinfo_proc *kipp) str = "md"; lstr = "managed_device"; break; + case KVME_TYPE_GUARD: + str = "gd"; + lstr = "guard"; + break; case KVME_TYPE_UNKNOWN: default: str = "??"; From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:14:49 2021 Return-Path: Delivered-To: dev-commits-src-all@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 E7BD8553AAB; Sun, 21 Feb 2021 11:14:49 +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 4Dk2lY6BgVz4Xrp; Sun, 21 Feb 2021 11:14:49 +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 C713D11911; Sun, 21 Feb 2021 11:14:49 +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 11LBEnrZ004974; Sun, 21 Feb 2021 11:14:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBEnUt004973; Sun, 21 Feb 2021 11:14:49 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:14:49 GMT Message-Id: <202102211114.11LBEnUt004973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 750ea20d3fb1 - main - Delete dead CLUSTERDEBUG config option. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 750ea20d3fb143a95ccf3ff84cfbe86cce9b9cac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:14:50 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=750ea20d3fb143a95ccf3ff84cfbe86cce9b9cac commit 750ea20d3fb143a95ccf3ff84cfbe86cce9b9cac Author: Konstantin Belousov AuthorDate: 2021-02-18 09:12:26 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:38:21 +0000 Delete dead CLUSTERDEBUG config option. Reviewed by: mckusick Tested by: pho MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28679 --- sys/conf/NOTES | 3 --- sys/conf/options | 1 - sys/kern/vfs_cluster.c | 8 -------- 3 files changed, 12 deletions(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index b4202bb65618..f73b5a466366 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2732,9 +2732,6 @@ options NSWBUF_MIN=120 options CAM_DEBUG_DELAY -# VFS cluster debugging. -options CLUSTERDEBUG - options DEBUG # Kernel filelock debugging. diff --git a/sys/conf/options b/sys/conf/options index 2f324143c574..b6956193d841 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -570,7 +570,6 @@ TI_JUMBO_HDRSPLIT opt_ti.h # Misc debug flags. Most of these should probably be replaced with # 'DEBUG', and then let people recompile just the interesting modules # with 'make CC="cc -DDEBUG"'. -CLUSTERDEBUG opt_debug_cluster.h DEBUG_1284 opt_ppb_1284.h LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 6b77adf5df34..60f22fd38764 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -36,8 +36,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_debug_cluster.h" - #include #include #include @@ -56,12 +54,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(CLUSTERDEBUG) -static int rcluster= 0; -SYSCTL_INT(_debug, OID_AUTO, rcluster, CTLFLAG_RW, &rcluster, 0, - "Debug VFS clustering code"); -#endif - static MALLOC_DEFINE(M_SEGMENT, "cl_savebuf", "cluster_save buffer"); static uma_zone_t cluster_pbuf_zone; From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:14:51 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1AE40553737; Sun, 21 Feb 2021 11:14:51 +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 4Dk2lb01zBz4Xrs; Sun, 21 Feb 2021 11:14:51 +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 E605311912; Sun, 21 Feb 2021 11:14: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 11LBEoEq004996; Sun, 21 Feb 2021 11:14:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBEoni004994; Sun, 21 Feb 2021 11:14:50 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:14:50 GMT Message-Id: <202102211114.11LBEoni004994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d485c77f203f - main - Remove #define _KERNEL hacks from libprocstat MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d485c77f203fb0f4cdc08dea5ff81631b51d8809 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:14:51 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d485c77f203fb0f4cdc08dea5ff81631b51d8809 commit d485c77f203fb0f4cdc08dea5ff81631b51d8809 Author: Konstantin Belousov AuthorDate: 2021-02-18 13:43:58 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:38:21 +0000 Remove #define _KERNEL hacks from libprocstat Make sys/buf.h, sys/pipe.h, sys/fs/devfs/devfs*.h headers usable in userspace, assuming that the consumer has an idea what it is for. Unhide more material from sys/mount.h and sys/ufs/ufs/inode.h, sys/ufs/ufs/ufsmount.h for consumption of userspace tools, with the same caveat. Remove unacceptable hack from usr.sbin/makefs which relied on sys/buf.h being unusable in userspace, where it override struct buf with its own definition. Instead, provide struct m_buf and struct m_vnode and adapt code to use local variants. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D28679 --- lib/libprocstat/common_kvm.c | 3 +- lib/libprocstat/libprocstat.c | 5 +-- lib/libprocstat/zfs_defs.c | 2 +- lib/libufs/block.c | 2 + lib/libufs/cgroup.c | 2 + lib/libufs/inode.c | 2 + lib/libufs/sblock.c | 2 + lib/libufs/type.c | 2 + sbin/dump/main.c | 2 + sbin/ffsinfo/ffsinfo.c | 2 + sbin/fsck_ffs/suj.c | 2 + sbin/mksnap_ffs/mksnap_ffs.c | 4 ++ sbin/newfs/newfs.c | 2 + sbin/tunefs/tunefs.c | 2 + sys/fs/devfs/devfs.h | 7 ++++ sys/fs/devfs/devfs_int.h | 4 +- sys/fs/msdosfs/denode.h | 1 + sys/sys/buf.h | 3 +- sys/sys/mount.h | 4 ++ sys/sys/pipe.h | 8 ++-- sys/ufs/ufs/extattr.h | 9 +++-- sys/ufs/ufs/inode.h | 6 ++- sys/ufs/ufs/ufsmount.h | 8 ++-- usr.sbin/makefs/ffs.c | 14 +++---- usr.sbin/makefs/ffs/buf.c | 18 ++++----- usr.sbin/makefs/ffs/buf.h | 16 ++++---- usr.sbin/makefs/ffs/ffs_alloc.c | 16 ++++---- usr.sbin/makefs/ffs/ffs_balloc.c | 70 ++++++++++++++++++++-------------- usr.sbin/makefs/ffs/ffs_extern.h | 2 +- usr.sbin/makefs/msdos.c | 13 ++++--- usr.sbin/makefs/msdos.h | 14 ++++++- usr.sbin/makefs/msdos/msdosfs_denode.c | 16 ++++---- usr.sbin/makefs/msdos/msdosfs_fat.c | 43 +++++++++++---------- usr.sbin/makefs/msdos/msdosfs_lookup.c | 28 ++++++++------ usr.sbin/makefs/msdos/msdosfs_vfsops.c | 27 +++++++------ usr.sbin/makefs/msdos/msdosfs_vnops.c | 20 +++++----- 36 files changed, 225 insertions(+), 156 deletions(-) diff --git a/lib/libprocstat/common_kvm.c b/lib/libprocstat/common_kvm.c index 2889f802775d..0ce2a2900f66 100644 --- a/lib/libprocstat/common_kvm.c +++ b/lib/libprocstat/common_kvm.c @@ -42,8 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _KERNEL #include +#define _WANT_MOUNT #include #include #include @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#undef _KERNEL #include #include #include diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index a2de61855815..7ccf6c343705 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -68,15 +68,12 @@ __FBSDID("$FreeBSD$"); #include #include #include -#define _KERNEL +#define _WANT_MOUNT #include #include #include -#include -#include #include #include -#undef _KERNEL #include #include #include diff --git a/lib/libprocstat/zfs_defs.c b/lib/libprocstat/zfs_defs.c index c41054f05136..66acef743dc4 100644 --- a/lib/libprocstat/zfs_defs.c +++ b/lib/libprocstat/zfs_defs.c @@ -71,7 +71,7 @@ struct vattr { long va_spare; /* remain quad aligned */ }; - +#define _WANT_MOUNT #include #include diff --git a/lib/libufs/block.c b/lib/libufs/block.c index 7accc8863693..3c99d288a402 100644 --- a/lib/libufs/block.c +++ b/lib/libufs/block.c @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/lib/libufs/cgroup.c b/lib/libufs/cgroup.c index 1c3e271c4295..90b28eadad2c 100644 --- a/lib/libufs/cgroup.c +++ b/lib/libufs/cgroup.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/lib/libufs/inode.c b/lib/libufs/inode.c index 497ff4c854f6..c4a0cab9e95a 100644 --- a/lib/libufs/inode.c +++ b/lib/libufs/inode.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/lib/libufs/sblock.c b/lib/libufs/sblock.c index 1d687d6d41aa..3b65e79b02b5 100644 --- a/lib/libufs/sblock.c +++ b/lib/libufs/sblock.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/lib/libufs/type.c b/lib/libufs/type.c index 653ef8ceeea1..a060f8ec5abf 100644 --- a/lib/libufs/type.c +++ b/lib/libufs/type.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index bbc54d7ab5d7..8752f2c1bea5 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -48,6 +48,8 @@ static const char rcsid[] = #include #include +#include +#include #include #include #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index 9bd3210986a9..33ec5f175cbd 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -59,6 +59,8 @@ static const char rcsid[] = #include #include +#include +#include #include #include #include diff --git a/sbin/fsck_ffs/suj.c b/sbin/fsck_ffs/suj.c index aa2085e2fa77..4ad86b0dc14d 100644 --- a/sbin/fsck_ffs/suj.c +++ b/sbin/fsck_ffs/suj.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/sbin/mksnap_ffs/mksnap_ffs.c b/sbin/mksnap_ffs/mksnap_ffs.c index 5d230701de85..0e3586fcb2e2 100644 --- a/sbin/mksnap_ffs/mksnap_ffs.c +++ b/sbin/mksnap_ffs/mksnap_ffs.c @@ -40,7 +40,11 @@ #include #include #include + +#include +#include #include + #include #include #include diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 232436c0aa7f..a2d97131d3a7 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c index 2eca8e0a3e36..e59b583ea58b 100644 --- a/sbin/tunefs/tunefs.c +++ b/sbin/tunefs/tunefs.c @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include diff --git a/sys/fs/devfs/devfs.h b/sys/fs/devfs/devfs.h index aef291601289..b62438ff6730 100644 --- a/sys/fs/devfs/devfs.h +++ b/sys/fs/devfs/devfs.h @@ -124,6 +124,8 @@ struct devfs_rule { MALLOC_DECLARE(M_DEVFS); #endif +#endif /* _KERNEL */ + struct componentname; TAILQ_HEAD(devfs_dlist_head, devfs_dirent); @@ -156,6 +158,9 @@ struct devfs_dirent { int de_usecount; }; +#include +#include + struct devfs_mount { u_int dm_idx; struct mount *dm_mount; @@ -168,6 +173,8 @@ struct devfs_mount { #define DEVFS_ROOTINO 2 +#ifdef _KERNEL + extern unsigned devfs_rule_depth; #define VFSTODEVFS(mp) ((struct devfs_mount *)((mp)->mnt_data)) diff --git a/sys/fs/devfs/devfs_int.h b/sys/fs/devfs/devfs_int.h index 5c3cb17eca61..e5afa311cbfd 100644 --- a/sys/fs/devfs/devfs_int.h +++ b/sys/fs/devfs/devfs_int.h @@ -37,8 +37,6 @@ #include -#ifdef _KERNEL - struct devfs_dirent; struct devfs_mount; @@ -76,6 +74,8 @@ struct cdev_priv { #define cdev2priv(c) __containerof(c, struct cdev_priv, cdp_c) +#ifdef _KERNEL + struct cdev *devfs_alloc(int); int devfs_dev_exists(const char *); void devfs_free(struct cdev *); diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index b198a6a39d81..9a4de4acbe2e 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -271,6 +271,7 @@ int msdosfs_reclaim(struct vop_reclaim_args *); /* * Internal service routine prototypes. */ +struct componentname; int deget(struct msdosfsmount *, u_long, u_long, struct denode **); int uniqdosname(struct denode *, struct componentname *, u_char *); diff --git a/sys/sys/buf.h b/sys/sys/buf.h index 2997560b9ab3..aacad3a057d2 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -132,7 +132,8 @@ struct buf { union { TAILQ_ENTRY(buf) b_freelist; /* (Q) */ struct { - void (*b_pgiodone)(void *, vm_page_t *, int, int); + void (*b_pgiodone)(void *, struct vm_page **, + int, int); int b_pgbefore; int b_pgafter; }; diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 9ae5f58e5218..ca3261a22e62 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -163,7 +163,9 @@ struct ostatfs { */ long f_spare[2]; /* unused spare */ }; +#endif /* _KERNEL */ +#if defined(_WANT_MOUNT) || defined(_KERNEL) TAILQ_HEAD(vnodelst, vnode); /* Mount options list */ @@ -243,7 +245,9 @@ struct mount { TAILQ_ENTRY(mount) mnt_upper_link; /* (m) we in the all uppers */ TAILQ_HEAD(, mount) mnt_uppers; /* (m) upper mounts over us*/ }; +#endif /* _WANT_MOUNT || _KERNEL */ +#ifdef _KERNEL /* * Definitions for MNT_VNODE_FOREACH_ALL. */ diff --git a/sys/sys/pipe.h b/sys/sys/pipe.h index f8b008151c6a..c9f222ffb01a 100644 --- a/sys/sys/pipe.h +++ b/sys/sys/pipe.h @@ -24,10 +24,6 @@ #ifndef _SYS_PIPE_H_ #define _SYS_PIPE_H_ -#ifndef _KERNEL -#error "no user-serviceable parts inside" -#endif - /* * Pipe buffer size, keep moderate in value, pipes take kva space. */ @@ -53,11 +49,13 @@ #define PIPENPAGES (BIG_PIPE_SIZE / PAGE_SIZE + 1) +#ifdef _KERNEL /* * See sys_pipe.c for info on what these limits mean. */ extern long maxpipekva; extern struct fileops pipeops; +#endif /* * Pipe buffer information. @@ -147,7 +145,9 @@ struct pipepair { #define PIPE_UNLOCK(pipe) mtx_unlock(PIPE_MTX(pipe)) #define PIPE_LOCK_ASSERT(pipe, type) mtx_assert(PIPE_MTX(pipe), (type)) +#ifdef _KERNEL void pipe_dtor(struct pipe *dpipe); int pipe_named_ctor(struct pipe **ppipe, struct thread *td); void pipeselwakeup(struct pipe *cpipe); +#endif #endif /* !_SYS_PIPE_H_ */ diff --git a/sys/ufs/ufs/extattr.h b/sys/ufs/ufs/extattr.h index 781cc782f415..fa20f8c0b936 100644 --- a/sys/ufs/ufs/extattr.h +++ b/sys/ufs/ufs/extattr.h @@ -104,10 +104,6 @@ struct extattr { #define EXTATTR_BASE_LENGTH(eap) \ roundup2((sizeof(struct extattr) - 1 + (eap)->ea_namelength), 8) -#ifdef _KERNEL - -#include - struct vnode; LIST_HEAD(ufs_extattr_list_head, ufs_extattr_list_entry); struct ufs_extattr_list_entry { @@ -118,6 +114,9 @@ struct ufs_extattr_list_entry { struct vnode *uele_backing_vnode; }; +#include +#include + struct ucred; struct ufs_extattr_per_mount { struct sx uepm_lock; @@ -126,6 +125,8 @@ struct ufs_extattr_per_mount { int uepm_flags; }; +#ifdef _KERNEL + struct vop_getextattr_args; struct vop_deleteextattr_args; struct vop_setextattr_args; diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index 4515dcbed401..e00a89b012d0 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -207,14 +207,14 @@ struct inode { #define i_din1 dinode_u.din1 #define i_din2 dinode_u.din2 -#ifdef _KERNEL - #define ITOUMP(ip) ((ip)->i_ump) #define ITODEV(ip) (ITOUMP(ip)->um_dev) #define ITODEVVP(ip) (ITOUMP(ip)->um_devvp) #define ITOFS(ip) (ITOUMP(ip)->um_fs) #define ITOVFS(ip) ((ip)->i_vnode->v_mount) +#ifdef _KERNEL + static inline _Bool I_IS_UFS1(const struct inode *ip) { @@ -228,6 +228,7 @@ I_IS_UFS2(const struct inode *ip) return ((ip->i_flag & IN_UFS2) != 0); } +#endif /* _KERNEL */ /* * The DIP macro is used to access fields in the dinode that are @@ -275,6 +276,7 @@ struct ufid { uint32_t ufid_gen; /* Generation number. */ }; +#ifdef _KERNEL #ifdef DIAGNOSTIC void ufs_init_trackers(struct inode *ip); void ufs_unlock_tracker(struct inode *ip); diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index 57e163c11d77..0dfcecb178af 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -43,14 +43,14 @@ struct ufs_args { struct oexport_args export; /* network export information */ }; -#ifdef _KERNEL - #include +#ifdef _KERNEL #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_UFSMNT); MALLOC_DECLARE(M_TRIM); #endif +#endif /* _KERNEL */ struct buf; struct inode; @@ -72,6 +72,9 @@ struct fsfail_task { fsid_t fsid; }; +#include +#include + /* * This structure describes the UFS specific mount structure data. * The function operators are used to support different versions of @@ -190,6 +193,5 @@ struct ufsmount { #define MNINDIR(ump) ((ump)->um_nindir) #define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb) #define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc) -#endif /* _KERNEL */ #endif diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 4dfb37889b53..dcc6eb5cbed7 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -90,9 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "makefs.h" -#include "ffs.h" - #if HAVE_STRUCT_STATVFS_F_IOSIZE && HAVE_FSTATVFS #include #endif @@ -101,12 +98,15 @@ __FBSDID("$FreeBSD$"); #include #include - #include "ffs/ufs_bswap.h" #include "ffs/ufs_inode.h" #include "ffs/newfs_extern.h" #include "ffs/ffs_extern.h" +#undef clrbuf +#include "makefs.h" +#include "ffs.h" + #undef DIP #define DIP(dp, field) \ ((ffs_opts->version == 1) ? \ @@ -896,9 +896,9 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts) off_t bufleft, chunk, offset; ssize_t nread; struct inode in; - struct buf * bp; + struct m_buf * bp; ffs_opt_t *ffs_opts = fsopts->fs_specific; - struct vnode vp = { fsopts, NULL }; + struct m_vnode vp = { fsopts, NULL }; assert (din != NULL); assert (buf != NULL); @@ -911,7 +911,7 @@ ffs_write_file(union dinode *din, uint32_t ino, void *buf, fsinfo_t *fsopts) p = NULL; in.i_fs = (struct fs *)fsopts->superblock; - in.i_devvp = &vp; + in.i_devvp = (void *)&vp; if (debug & DEBUG_FS_WRITE_FILE) { printf( diff --git a/usr.sbin/makefs/ffs/buf.c b/usr.sbin/makefs/ffs/buf.c index 959734cacddf..ccbfd8ae1e23 100644 --- a/usr.sbin/makefs/ffs/buf.c +++ b/usr.sbin/makefs/ffs/buf.c @@ -54,11 +54,11 @@ __FBSDID("$FreeBSD$"); #include "makefs.h" #include "buf.h" -static TAILQ_HEAD(buftailhead,buf) buftail; +static TAILQ_HEAD(buftailhead, m_buf) buftail; int -bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused, - struct buf **bpp) +bread(struct m_vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused, + struct m_buf **bpp) { off_t offset; ssize_t rv; @@ -93,7 +93,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struct ucred *u1 __unused, } void -brelse(struct buf *bp) +brelse(struct m_buf *bp) { assert (bp != NULL); @@ -123,7 +123,7 @@ brelse(struct buf *bp) } int -bwrite(struct buf *bp) +bwrite(struct m_buf *bp) { off_t offset; ssize_t rv; @@ -152,7 +152,7 @@ bwrite(struct buf *bp) void bcleanup(void) { - struct buf *bp; + struct m_buf *bp; /* * XXX this really shouldn't be necessary, but i'm curious to @@ -172,12 +172,12 @@ bcleanup(void) printf("bcleanup: done\n"); } -struct buf * -getblk(struct vnode *vp, daddr_t blkno, int size, int u1 __unused, +struct m_buf * +getblk(struct m_vnode *vp, daddr_t blkno, int size, int u1 __unused, int u2 __unused, int u3 __unused) { static int buftailinitted; - struct buf *bp; + struct m_buf *bp; void *n; if (debug & DEBUG_BUF_GETBLK) diff --git a/usr.sbin/makefs/ffs/buf.h b/usr.sbin/makefs/ffs/buf.h index 3bdd7ca2a9f1..31196b8b2fbe 100644 --- a/usr.sbin/makefs/ffs/buf.h +++ b/usr.sbin/makefs/ffs/buf.h @@ -49,12 +49,12 @@ struct componentname; struct makefs_fsinfo; struct ucred; -struct vnode { +struct m_vnode { struct makefs_fsinfo *fs; void *v_data; }; -struct buf { +struct m_buf { char * b_data; long b_bufsize; long b_bcount; @@ -62,15 +62,15 @@ struct buf { daddr_t b_lblkno; struct makefs_fsinfo *b_fs; - TAILQ_ENTRY(buf) b_tailq; + TAILQ_ENTRY(m_buf) b_tailq; }; void bcleanup(void); -int bread(struct vnode *, daddr_t, int, struct ucred *, - struct buf **); -void brelse(struct buf *); -int bwrite(struct buf *); -struct buf * getblk(struct vnode *, daddr_t, int, int, int, int); +int bread(struct m_vnode *, daddr_t, int, struct ucred *, + struct m_buf **); +void brelse(struct m_buf *); +int bwrite(struct m_buf *); +struct m_buf * getblk(struct m_vnode *, daddr_t, int, int, int, int); #define bdwrite(bp) bwrite(bp) #define clrbuf(bp) memset((bp)->b_data, 0, (u_int)(bp)->b_bcount) diff --git a/usr.sbin/makefs/ffs/ffs_alloc.c b/usr.sbin/makefs/ffs/ffs_alloc.c index 88d95d6e5dda..c31106772b45 100644 --- a/usr.sbin/makefs/ffs/ffs_alloc.c +++ b/usr.sbin/makefs/ffs/ffs_alloc.c @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); static int scanc(u_int, const u_char *, const u_char *, int); static daddr_t ffs_alloccg(struct inode *, int, daddr_t, int); -static daddr_t ffs_alloccgblk(struct inode *, struct buf *, daddr_t); +static daddr_t ffs_alloccgblk(struct inode *, struct m_buf *, daddr_t); static daddr_t ffs_hashalloc(struct inode *, u_int, daddr_t, int, daddr_t (*)(struct inode *, int, daddr_t, int)); static int32_t ffs_mapsearch(struct fs *, struct cg *, daddr_t, int); @@ -294,7 +294,7 @@ static daddr_t ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) { struct cg *cgp; - struct buf *bp; + struct m_buf *bp; daddr_t bno, blkno; int error, frags, allocsiz, i; struct fs *fs = ip->i_fs; @@ -302,8 +302,8 @@ ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) if (fs->fs_cs(fs, cg).cs_nbfree == 0 && size == fs->fs_bsize) return (0); - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, - NULL, &bp); + error = bread((void *)ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, NULL, &bp); if (error) { brelse(bp); return (0); @@ -377,7 +377,7 @@ ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, int size) * blocks may be fragmented by the routine that allocates them. */ static daddr_t -ffs_alloccgblk(struct inode *ip, struct buf *bp, daddr_t bpref) +ffs_alloccgblk(struct inode *ip, struct m_buf *bp, daddr_t bpref) { struct cg *cgp; daddr_t blkno; @@ -429,7 +429,7 @@ void ffs_blkfree(struct inode *ip, daddr_t bno, long size) { struct cg *cgp; - struct buf *bp; + struct m_buf *bp; int32_t fragno, cgbno; int i, error, cg, blk, frags, bbase; struct fs *fs = ip->i_fs; @@ -446,8 +446,8 @@ ffs_blkfree(struct inode *ip, daddr_t bno, long size) (uintmax_t)ip->i_number); return; } - error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, - NULL, &bp); + error = bread((void *)ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), + (int)fs->fs_cgsize, NULL, &bp); if (error) { brelse(bp); return; diff --git a/usr.sbin/makefs/ffs/ffs_balloc.c b/usr.sbin/makefs/ffs/ffs_balloc.c index d56ed061457b..275ec4c04471 100644 --- a/usr.sbin/makefs/ffs/ffs_balloc.c +++ b/usr.sbin/makefs/ffs/ffs_balloc.c @@ -56,8 +56,8 @@ __FBSDID("$FreeBSD$"); #include "ffs/ufs_inode.h" #include "ffs/ffs_extern.h" -static int ffs_balloc_ufs1(struct inode *, off_t, int, struct buf **); -static int ffs_balloc_ufs2(struct inode *, off_t, int, struct buf **); +static int ffs_balloc_ufs1(struct inode *, off_t, int, struct m_buf **); +static int ffs_balloc_ufs2(struct inode *, off_t, int, struct m_buf **); /* * Balloc defines the structure of file system storage @@ -68,7 +68,7 @@ static int ffs_balloc_ufs2(struct inode *, off_t, int, struct buf **); */ int -ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct m_buf **bpp) { if (ip->i_fs->fs_magic == FS_UFS2_MAGIC) return ffs_balloc_ufs2(ip, offset, bufsize, bpp); @@ -77,12 +77,13 @@ ffs_balloc(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } static int -ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, + struct m_buf **bpp) { daddr_t lbn, lastlbn; int size; int32_t nb; - struct buf *bp, *nbp; + struct m_buf *bp, *nbp; struct fs *fs = ip->i_fs; struct indir indirs[UFS_NIADDR + 2]; daddr_t newb, pref; @@ -135,8 +136,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, fs->fs_bsize, - NULL, bpp); + error = bread((void *)ip->i_devvp, lbn, + fs->fs_bsize, NULL, bpp); if (error) { brelse(*bpp); return (error); @@ -161,8 +162,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, osize, - NULL, bpp); + error = bread((void *)ip->i_devvp, lbn, + osize, NULL, bpp); if (error) { brelse(*bpp); return (error); @@ -191,7 +192,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_devvp, lbn, nsize, 0, 0, 0); + bp = getblk((void *)ip->i_devvp, lbn, nsize, + 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -229,7 +231,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); + bp = getblk((void *)ip->i_devvp, indirs[1].in_lbn, + fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -247,8 +250,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ for (i = 1;;) { - error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, - NULL, &bp); + error = bread((void *)ip->i_devvp, indirs[i].in_lbn, + fs->fs_bsize, NULL, &bp); if (error) { brelse(bp); return error; @@ -271,7 +274,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk((void *)ip->i_devvp, indirs[i].in_lbn, + fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -302,7 +306,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk((void *)ip->i_devvp, lbn, fs->fs_bsize, + 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -318,7 +323,8 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } brelse(bp); if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); + error = bread((void *)ip->i_devvp, lbn, (int)fs->fs_bsize, + NULL, &nbp); if (error) { brelse(nbp); return error; @@ -329,11 +335,12 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } static int -ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) +ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, + struct m_buf **bpp) { daddr_t lbn, lastlbn; int size; - struct buf *bp, *nbp; + struct m_buf *bp, *nbp; struct fs *fs = ip->i_fs; struct indir indirs[UFS_NIADDR + 2]; daddr_t newb, pref, nb; @@ -386,8 +393,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, fs->fs_bsize, - NULL, bpp); + error = bread((void *)ip->i_devvp, lbn, + fs->fs_bsize, NULL, bpp); if (error) { brelse(*bpp); return (error); @@ -412,8 +419,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, osize, - NULL, bpp); + error = bread((void *)ip->i_devvp, lbn, + osize, NULL, bpp); if (error) { brelse(*bpp); return (error); @@ -442,7 +449,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) if (error) return (error); if (bpp != NULL) { - bp = getblk(ip->i_devvp, lbn, nsize, 0, 0, 0); + bp = getblk((void *)ip->i_devvp, lbn, nsize, + 0, 0, 0); bp->b_blkno = fsbtodb(fs, newb); clrbuf(bp); *bpp = bp; @@ -480,7 +488,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) return error; nb = newb; *allocblk++ = nb; - bp = getblk(ip->i_devvp, indirs[1].in_lbn, fs->fs_bsize, 0, 0, 0); + bp = getblk((void *)ip->i_devvp, indirs[1].in_lbn, + fs->fs_bsize, 0, 0, 0); bp->b_blkno = fsbtodb(fs, nb); clrbuf(bp); /* @@ -498,8 +507,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) */ for (i = 1;;) { - error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, - NULL, &bp); + error = bread((void *)ip->i_devvp, indirs[i].in_lbn, + fs->fs_bsize, NULL, &bp); if (error) { brelse(bp); return error; @@ -522,7 +531,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } nb = newb; *allocblk++ = nb; - nbp = getblk(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk((void *)ip->i_devvp, indirs[i].in_lbn, + fs->fs_bsize, 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); /* @@ -553,7 +563,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) nb = newb; *allocblk++ = nb; if (bpp != NULL) { - nbp = getblk(ip->i_devvp, lbn, fs->fs_bsize, 0, 0, 0); + nbp = getblk((void *)ip->i_devvp, lbn, fs->fs_bsize, + 0, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); clrbuf(nbp); *bpp = nbp; @@ -569,7 +580,8 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bufsize, struct buf **bpp) } brelse(bp); if (bpp != NULL) { - error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); + error = bread((void *)ip->i_devvp, lbn, (int)fs->fs_bsize, + NULL, &nbp); if (error) { brelse(nbp); return error; diff --git a/usr.sbin/makefs/ffs/ffs_extern.h b/usr.sbin/makefs/ffs/ffs_extern.h index b4d4bbaef6e9..12ba0b77989c 100644 --- a/usr.sbin/makefs/ffs/ffs_extern.h +++ b/usr.sbin/makefs/ffs/ffs_extern.h @@ -59,7 +59,7 @@ void ffs_blkfree(struct inode *, daddr_t, long); void ffs_clusteracct(struct fs *, struct cg *, int32_t, int); /* ffs_balloc.c */ -int ffs_balloc(struct inode *, off_t, int, struct buf **); +int ffs_balloc(struct inode *, off_t, int, struct m_buf **); /* ffs_bswap.c */ void ffs_sb_swap(struct fs*, struct fs *); diff --git a/usr.sbin/makefs/msdos.c b/usr.sbin/makefs/msdos.c index a0e0f7174f25..567122c1db7e 100644 --- a/usr.sbin/makefs/msdos.c +++ b/usr.sbin/makefs/msdos.c @@ -55,16 +55,17 @@ __FBSDID("$FreeBSD$"); #include #include -#include "ffs/buf.h" -#include "makefs.h" -#include "msdos.h" - #include #include #include "msdos/direntry.h" #include *** 591 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:14:52 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2D6C85539AF; Sun, 21 Feb 2021 11:14: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 4Dk2lc0klgz4Xrw; Sun, 21 Feb 2021 11:14: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 0ACF311A20; Sun, 21 Feb 2021 11:14: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 11LBEpgq005015; Sun, 21 Feb 2021 11:14:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBEpov005014; Sun, 21 Feb 2021 11:14:51 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:14:51 GMT Message-Id: <202102211114.11LBEpov005014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2bfd8992c7c7 - main - vnode: move write cluster support data to inodes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bfd8992c7c7301166c74931ad63d4755bb4a6c7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:14:52 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2bfd8992c7c7301166c74931ad63d4755bb4a6c7 commit 2bfd8992c7c7301166c74931ad63d4755bb4a6c7 Author: Konstantin Belousov AuthorDate: 2021-02-15 04:35:59 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:38:21 +0000 vnode: move write cluster support data to inodes. The data is only needed by filesystems that 1. use buffer cache 2. utilize clustering write support. Requested by: mjg Reviewed by: asomers (previous version), fsu (ext2 parts), mckusick Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D28679 --- sys/fs/ext2fs/ext2_vfsops.c | 1 + sys/fs/ext2fs/ext2_vnops.c | 3 +- sys/fs/ext2fs/inode.h | 3 ++ sys/fs/fuse/fuse_io.c | 3 +- sys/fs/fuse/fuse_node.c | 1 + sys/fs/fuse/fuse_node.h | 2 + sys/fs/msdosfs/denode.h | 3 ++ sys/fs/msdosfs/msdosfs_denode.c | 1 + sys/fs/msdosfs/msdosfs_vnops.c | 4 +- sys/kern/vfs_cluster.c | 85 +++++++++++++++++++++++------------------ sys/kern/vfs_subr.c | 1 - sys/sys/buf.h | 16 +++++++- sys/sys/vnode.h | 8 ---- sys/ufs/ffs/ffs_inode.c | 2 +- sys/ufs/ffs/ffs_vfsops.c | 1 + sys/ufs/ffs/ffs_vnops.c | 4 +- sys/ufs/ufs/inode.h | 3 ++ 17 files changed, 87 insertions(+), 54 deletions(-) diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c index a64e28186769..099d6bfec981 100644 --- a/sys/fs/ext2fs/ext2_vfsops.c +++ b/sys/fs/ext2fs/ext2_vfsops.c @@ -1229,6 +1229,7 @@ ext2_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) ip->i_e2fs = fs = ump->um_e2fs; ip->i_ump = ump; ip->i_number = ino; + cluster_init_vn(&ip->i_clusterw); lockmgr(vp->v_vnlock, LK_EXCLUSIVE, NULL); error = insmntque(vp, mp); diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index e52db1416890..e00dbc3e0adc 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -2313,7 +2313,8 @@ ext2_write(struct vop_write_args *ap) } else if (xfersize + blkoffset == fs->e2fs_fsize) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; - cluster_write(vp, bp, ip->i_size, seqcount, 0); + cluster_write(vp, &ip->i_clusterw, bp, + ip->i_size, seqcount, 0); } else { bawrite(bp); } diff --git a/sys/fs/ext2fs/inode.h b/sys/fs/ext2fs/inode.h index 2077b6b276ea..2b9ec687a75c 100644 --- a/sys/fs/ext2fs/inode.h +++ b/sys/fs/ext2fs/inode.h @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -118,6 +119,8 @@ struct inode { }; struct ext4_extent_cache i_ext_cache; /* cache for ext4 extent */ + + struct vn_clusterw i_clusterw; /* Buffer clustering information */ }; /* diff --git a/sys/fs/fuse/fuse_io.c b/sys/fs/fuse/fuse_io.c index 3f23a35a8626..bcf6e5f601bf 100644 --- a/sys/fs/fuse/fuse_io.c +++ b/sys/fs/fuse/fuse_io.c @@ -870,7 +870,8 @@ again: bp->b_flags |= B_CLUSTEROK; SDT_PROBE2(fusefs, , io, write_biobackend_issue, 4, bp); - cluster_write(vp, bp, filesize, seqcount, 0); + cluster_write(vp, &fvdat->clusterw, bp, + filesize, seqcount, 0); } else { SDT_PROBE2(fusefs, , io, write_biobackend_issue, 5, bp); diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index d19e49358a22..6acd1df29361 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -164,6 +164,7 @@ fuse_vnode_init(struct vnode *vp, struct fuse_vnode_data *fvdat, } vp->v_type = vtyp; vp->v_data = fvdat; + cluster_init_vn(&fvdat->clusterw); counter_u64_add(fuse_node_count, 1); } diff --git a/sys/fs/fuse/fuse_node.h b/sys/fs/fuse/fuse_node.h index c92874334aa1..e5fb13d43bec 100644 --- a/sys/fs/fuse/fuse_node.h +++ b/sys/fs/fuse/fuse_node.h @@ -68,6 +68,7 @@ #include #include #include +#include #include "fuse_file.h" @@ -118,6 +119,7 @@ struct fuse_vnode_data { struct vattr cached_attrs; uint64_t nlookup; enum vtype vtype; + struct vn_clusterw clusterw; }; /* diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h index 9a4de4acbe2e..f06c11772621 100644 --- a/sys/fs/msdosfs/denode.h +++ b/sys/fs/msdosfs/denode.h @@ -52,6 +52,8 @@ #ifndef _FS_MSDOSFS_DENODE_H_ #define _FS_MSDOSFS_DENODE_H_ +#include + /* * This is the pc filesystem specific portion of the vnode structure. * @@ -142,6 +144,7 @@ struct fatcache { */ struct denode { struct vnode *de_vnode; /* addr of vnode we are part of */ + struct vn_clusterw de_clusterw; /* buffer clustering information */ u_long de_flag; /* flag bits */ u_long de_dirclust; /* cluster of the directory file containing this entry */ u_long de_diroffset; /* offset of this entry in the directory cluster */ diff --git a/sys/fs/msdosfs/msdosfs_denode.c b/sys/fs/msdosfs/msdosfs_denode.c index 158b3cdda4da..369533067ce9 100644 --- a/sys/fs/msdosfs/msdosfs_denode.c +++ b/sys/fs/msdosfs/msdosfs_denode.c @@ -162,6 +162,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_long diroffset, ldep->de_dirclust = dirclust; ldep->de_diroffset = diroffset; ldep->de_inode = inode; + cluster_init_vn(&ldep->de_clusterw); lockmgr(nvp->v_vnlock, LK_EXCLUSIVE, NULL); fc_purge(ldep, 0); /* init the FAT cache for this denode */ error = insmntque(nvp, mntp); diff --git a/sys/fs/msdosfs/msdosfs_vnops.c b/sys/fs/msdosfs/msdosfs_vnops.c index 8885ac856588..5cd2c27cb46b 100644 --- a/sys/fs/msdosfs/msdosfs_vnops.c +++ b/sys/fs/msdosfs/msdosfs_vnops.c @@ -796,8 +796,8 @@ msdosfs_write(struct vop_write_args *ap) bawrite(bp); else if (n + croffset == pmp->pm_bpcluster) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) - cluster_write(vp, bp, dep->de_FileSize, - seqcount, 0); + cluster_write(vp, &dep->de_clusterw, bp, + dep->de_FileSize, seqcount, 0); else bawrite(bp); } else diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 60f22fd38764..7e328454c877 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -59,7 +59,7 @@ static uma_zone_t cluster_pbuf_zone; static void cluster_init(void *); static struct cluster_save *cluster_collectbufs(struct vnode *vp, - struct buf *last_bp, int gbflags); + struct vn_clusterw *vnc, struct buf *last_bp, int gbflags); static struct buf *cluster_rbuild(struct vnode *vp, u_quad_t filesize, daddr_t lbn, daddr_t blkno, long size, int run, int gbflags, struct buf *fbp); @@ -643,8 +643,8 @@ cluster_wbuild_wb(struct vnode *vp, long size, daddr_t start_lbn, int len, * 4. end of a cluster - asynchronously write cluster */ void -cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, - int gbflags) +cluster_write(struct vnode *vp, struct vn_clusterw *vnc, struct buf *bp, + u_quad_t filesize, int seqcount, int gbflags) { daddr_t lbn; int maxclen, cursize; @@ -666,12 +666,12 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, /* Initialize vnode to beginning of file. */ if (lbn == 0) - vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; + vnc->v_lasta = vnc->v_clen = vnc->v_cstart = vnc->v_lastw = 0; - if (vp->v_clen == 0 || lbn != vp->v_lastw + 1 || - (bp->b_blkno != vp->v_lasta + btodb(lblocksize))) { + if (vnc->v_clen == 0 || lbn != vnc->v_lastw + 1 || + (bp->b_blkno != vnc->v_lasta + btodb(lblocksize))) { maxclen = vp->v_mount->mnt_iosize_max / lblocksize - 1; - if (vp->v_clen != 0) { + if (vnc->v_clen != 0) { /* * Next block is not sequential. * @@ -688,18 +688,19 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, * later on in the buf_daemon or update daemon * flush. */ - cursize = vp->v_lastw - vp->v_cstart + 1; - if (((u_quad_t) bp->b_offset + lblocksize) != filesize || - lbn != vp->v_lastw + 1 || vp->v_clen <= cursize) { + cursize = vnc->v_lastw - vnc->v_cstart + 1; + if ((u_quad_t)bp->b_offset + lblocksize != filesize || + lbn != vnc->v_lastw + 1 || vnc->v_clen <= cursize) { if (!async && seqcount > 0) { cluster_wbuild_wb(vp, lblocksize, - vp->v_cstart, cursize, gbflags); + vnc->v_cstart, cursize, gbflags); } } else { struct buf **bpp, **endbp; struct cluster_save *buflist; - buflist = cluster_collectbufs(vp, bp, gbflags); + buflist = cluster_collectbufs(vp, vnc, bp, + gbflags); if (buflist == NULL) { /* * Cluster build failed so just write @@ -725,7 +726,7 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, free(buflist, M_SEGMENT); if (seqcount > 1) { cluster_wbuild_wb(vp, - lblocksize, vp->v_cstart, + lblocksize, vnc->v_cstart, cursize, gbflags); } } else { @@ -736,8 +737,8 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, bpp <= endbp; bpp++) bdwrite(*bpp); free(buflist, M_SEGMENT); - vp->v_lastw = lbn; - vp->v_lasta = bp->b_blkno; + vnc->v_lastw = lbn; + vnc->v_lasta = bp->b_blkno; return; } } @@ -747,27 +748,27 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, * cluster as large as possible, otherwise find size of * existing cluster. */ - if ((vp->v_type == VREG) && - ((u_quad_t) bp->b_offset + lblocksize) != filesize && - (bp->b_blkno == bp->b_lblkno) && - (VOP_BMAP(vp, lbn, NULL, &bp->b_blkno, &maxclen, NULL) || - bp->b_blkno == -1)) { + if (vp->v_type == VREG && + (u_quad_t) bp->b_offset + lblocksize != filesize && + bp->b_blkno == bp->b_lblkno && + (VOP_BMAP(vp, lbn, NULL, &bp->b_blkno, &maxclen, + NULL) != 0 || bp->b_blkno == -1)) { bawrite(bp); - vp->v_clen = 0; - vp->v_lasta = bp->b_blkno; - vp->v_cstart = lbn + 1; - vp->v_lastw = lbn; + vnc->v_clen = 0; + vnc->v_lasta = bp->b_blkno; + vnc->v_cstart = lbn + 1; + vnc->v_lastw = lbn; return; } - vp->v_clen = maxclen; + vnc->v_clen = maxclen; if (!async && maxclen == 0) { /* I/O not contiguous */ - vp->v_cstart = lbn + 1; + vnc->v_cstart = lbn + 1; bawrite(bp); } else { /* Wait for rest of cluster */ - vp->v_cstart = lbn; + vnc->v_cstart = lbn; bdwrite(bp); } - } else if (lbn == vp->v_cstart + vp->v_clen) { + } else if (lbn == vnc->v_cstart + vnc->v_clen) { /* * At end of cluster, write it out if seqcount tells us we * are operating sequentially, otherwise let the buf or @@ -775,11 +776,11 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, */ bdwrite(bp); if (seqcount > 1) { - cluster_wbuild_wb(vp, lblocksize, vp->v_cstart, - vp->v_clen + 1, gbflags); + cluster_wbuild_wb(vp, lblocksize, vnc->v_cstart, + vnc->v_clen + 1, gbflags); } - vp->v_clen = 0; - vp->v_cstart = lbn + 1; + vnc->v_clen = 0; + vnc->v_cstart = lbn + 1; } else if (vm_page_count_severe()) { /* * We are low on memory, get it going NOW @@ -791,8 +792,8 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, */ bdwrite(bp); } - vp->v_lastw = lbn; - vp->v_lasta = bp->b_blkno; + vnc->v_lastw = lbn; + vnc->v_lasta = bp->b_blkno; } /* @@ -1039,19 +1040,20 @@ cluster_wbuild(struct vnode *vp, long size, daddr_t start_lbn, int len, * Plus add one additional buffer. */ static struct cluster_save * -cluster_collectbufs(struct vnode *vp, struct buf *last_bp, int gbflags) +cluster_collectbufs(struct vnode *vp, struct vn_clusterw *vnc, + struct buf *last_bp, int gbflags) { struct cluster_save *buflist; struct buf *bp; daddr_t lbn; int i, j, len, error; - len = vp->v_lastw - vp->v_cstart + 1; + len = vnc->v_lastw - vnc->v_cstart + 1; buflist = malloc(sizeof(struct buf *) * (len + 1) + sizeof(*buflist), M_SEGMENT, M_WAITOK); buflist->bs_nchildren = 0; buflist->bs_children = (struct buf **) (buflist + 1); - for (lbn = vp->v_cstart, i = 0; i < len; lbn++, i++) { + for (lbn = vnc->v_cstart, i = 0; i < len; lbn++, i++) { error = bread_gb(vp, lbn, last_bp->b_bcount, NOCRED, gbflags, &bp); if (error != 0) { @@ -1075,3 +1077,12 @@ cluster_collectbufs(struct vnode *vp, struct buf *last_bp, int gbflags) buflist->bs_nchildren = i + 1; return (buflist); } + +void +cluster_init_vn(struct vn_clusterw *vnc) +{ + vnc->v_lasta = 0; + vnc->v_clen = 0; + vnc->v_cstart = 0; + vnc->v_lastw = 0; +} diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3e39d19666e5..3f7dae762de0 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1823,7 +1823,6 @@ freevnode(struct vnode *vp) vp->v_unpcb = NULL; vp->v_rdev = NULL; vp->v_fifoinfo = NULL; - vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; vp->v_iflag = 0; vp->v_vflag = 0; bo->bo_flag = 0; diff --git a/sys/sys/buf.h b/sys/sys/buf.h index aacad3a057d2..d6c4c7f44795 100644 --- a/sys/sys/buf.h +++ b/sys/sys/buf.h @@ -407,6 +407,16 @@ struct cluster_save { struct buf **bs_children; /* List of associated buffers. */ }; +/* + * Vnode clustering tracker + */ +struct vn_clusterw { + daddr_t v_cstart; /* v start block of cluster */ + daddr_t v_lasta; /* v last allocation */ + daddr_t v_lastw; /* v last write */ + int v_clen; /* v length of cur. cluster */ +}; + #ifdef _KERNEL static __inline int @@ -571,10 +581,14 @@ void bd_speedup(void); extern uma_zone_t pbuf_zone; uma_zone_t pbuf_zsecond_create(const char *name, int max); +struct vn_clusterw; + +void cluster_init_vn(struct vn_clusterw *vnc); int cluster_read(struct vnode *, u_quad_t, daddr_t, long, struct ucred *, long, int, int, struct buf **); int cluster_wbuild(struct vnode *, long, daddr_t, int, int); -void cluster_write(struct vnode *, struct buf *, u_quad_t, int, int); +void cluster_write(struct vnode *, struct vn_clusterw *, struct buf *, + u_quad_t, int, int); void vfs_bio_brelse(struct buf *bp, int ioflags); void vfs_bio_bzero_buf(struct buf *bp, int base, int size); void vfs_bio_clrbuf(struct buf *); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 9d68f9e236f6..d71f3bfcb817 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -163,14 +163,6 @@ struct vnode { struct lockf *v_lockf; /* Byte-level advisory lock list */ struct rangelock v_rl; /* Byte-range lock */ - /* - * clustering stuff - */ - daddr_t v_cstart; /* v start block of cluster */ - daddr_t v_lasta; /* v last allocation */ - daddr_t v_lastw; /* v last write */ - int v_clen; /* v length of cur. cluster */ - u_int v_holdcnt; /* I prevents recycling. */ u_int v_usecount; /* I ref count of users */ u_short v_iflag; /* i vnode flags (see below) */ diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 3df7bf8e8596..5598c7ba30e8 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -354,7 +354,7 @@ ffs_truncate(vp, length, flags, cred) panic("ffs_truncate: read-only filesystem"); if (IS_SNAPSHOT(ip)) ffs_snapremove(vp); - vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; + cluster_init_vn(&ip->i_clusterw); osize = ip->i_size; /* * Lengthen the size of the file. We must ensure that the diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 540dd02c9631..762874562082 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -2011,6 +2011,7 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags) ip->i_nextclustercg = -1; ip->i_flag = fs->fs_magic == FS_UFS1_MAGIC ? 0 : IN_UFS2; ip->i_mode = 0; /* ensure error cases below throw away vnode */ + cluster_init_vn(&ip->i_clusterw); #ifdef DIAGNOSTIC ufs_init_trackers(ip); #endif diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 1dfdf5182a42..686bfddcb0ea 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -976,8 +976,8 @@ ffs_write(ap) } else if (xfersize + blkoffset == fs->fs_bsize) { if ((vp->v_mount->mnt_flag & MNT_NOCLUSTERW) == 0) { bp->b_flags |= B_CLUSTEROK; - cluster_write(vp, bp, ip->i_size, seqcount, - GB_UNMAPPED); + cluster_write(vp, &ip->i_clusterw, bp, + ip->i_size, seqcount, GB_UNMAPPED); } else { bawrite(bp); } diff --git a/sys/ufs/ufs/inode.h b/sys/ufs/ufs/inode.h index e00a89b012d0..0169d2903108 100644 --- a/sys/ufs/ufs/inode.h +++ b/sys/ufs/ufs/inode.h @@ -47,6 +47,7 @@ #ifdef DIAGNOSTIC #include #endif +#include /* * This must agree with the definition in . @@ -115,6 +116,8 @@ struct inode { int i_nextclustercg; /* last cg searched for cluster */ + struct vn_clusterw i_clusterw; /* Buffer clustering information */ + /* * Data for extended attribute modification. */ From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:14:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DEC2D553743; Sun, 21 Feb 2021 11:14: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 4Dk2ld6wXJz4XdT; Sun, 21 Feb 2021 11:14: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 52577119DF; Sun, 21 Feb 2021 11:14: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 11LBErMu005037; Sun, 21 Feb 2021 11:14:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBErxP005036; Sun, 21 Feb 2021 11:14:53 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:14:53 GMT Message-Id: <202102211114.11LBErxP005036@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8b7239681e27 - main - ext2fs: clear write cluster tracking on truncation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b7239681e27ab75175c45c48e6ad1685571b1f2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:14:56 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8b7239681e27ab75175c45c48e6ad1685571b1f2 commit 8b7239681e27ab75175c45c48e6ad1685571b1f2 Author: Konstantin Belousov AuthorDate: 2021-02-17 12:35:56 +0000 Commit: Konstantin Belousov CommitDate: 2021-02-21 09:38:21 +0000 ext2fs: clear write cluster tracking on truncation Reviewed by: fsu, mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D28679 --- sys/fs/ext2fs/ext2_inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/fs/ext2fs/ext2_inode.c b/sys/fs/ext2fs/ext2_inode.c index 1e7584ebaa66..34c32f2f113d 100644 --- a/sys/fs/ext2fs/ext2_inode.c +++ b/sys/fs/ext2fs/ext2_inode.c @@ -581,6 +581,7 @@ ext2_truncate(struct vnode *vp, off_t length, int flags, struct ucred *cred, error = ext2_ext_truncate(vp, length, flags, cred, td); else error = ext2_ind_truncate(vp, length, flags, cred, td); + cluster_init_vn(&ip->i_clusterw); return (error); } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:48:37 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7834255481B; Sun, 21 Feb 2021 11:48: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 4Dk3VY2fjjz4Zr2; Sun, 21 Feb 2021 11:48: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 4DED911E29; Sun, 21 Feb 2021 11:48: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 11LBmbGD044846; Sun, 21 Feb 2021 11:48:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBmbxW044845; Sun, 21 Feb 2021 11:48:37 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:48:37 GMT Message-Id: <202102211148.11LBmbxW044845@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: e26f82b9e6fb - stable/12 - pf: Fix osfp configuration 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: e26f82b9e6fbea402c090f0d1699f969b5f92caf Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:48:37 -0000 The branch stable/12 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e26f82b9e6fbea402c090f0d1699f969b5f92caf commit e26f82b9e6fbea402c090f0d1699f969b5f92caf Author: Kristof Provost AuthorDate: 2021-02-18 07:36:46 +0000 Commit: Kristof Provost CommitDate: 2021-02-21 11:48:13 +0000 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Reported by: delphij@ MFC after: 3 days (cherry picked from commit 2ed689a674c380e48245933d5326da4dda65f94d) --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index edf147699235..c3e8d0459c88 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1624,7 +1624,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) /* Don't allow userspace to set evaulations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ - krule->os_fingerprint = krule->os_fingerprint; + krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); From owner-dev-commits-src-all@freebsd.org Sun Feb 21 11:48:40 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2C4C15548B2; Sun, 21 Feb 2021 11:48: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 4Dk3Vc0G4Dz4Zfw; Sun, 21 Feb 2021 11:48: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 DEDB711CE4; Sun, 21 Feb 2021 11:48: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 11LBmdif044956; Sun, 21 Feb 2021 11:48:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LBmdbt044955; Sun, 21 Feb 2021 11:48:39 GMT (envelope-from git) Date: Sun, 21 Feb 2021 11:48:39 GMT Message-Id: <202102211148.11LBmdbt044955@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: 9823eb6909fc - stable/13 - pf: Fix osfp configuration 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: 9823eb6909fcd82bb9d70e77037542e527e3d6ff Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 11:48:40 -0000 The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9823eb6909fcd82bb9d70e77037542e527e3d6ff commit 9823eb6909fcd82bb9d70e77037542e527e3d6ff Author: Kristof Provost AuthorDate: 2021-02-18 07:36:46 +0000 Commit: Kristof Provost CommitDate: 2021-02-21 11:48:20 +0000 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Reported by: delphij@ MFC after: 3 days (cherry picked from commit 2ed689a674c380e48245933d5326da4dda65f94d) --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index edc8443dcc0a..bd8896cfb772 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1623,7 +1623,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) /* Don't allow userspace to set evaulations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ - krule->os_fingerprint = krule->os_fingerprint; + krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); From owner-dev-commits-src-all@freebsd.org Sun Feb 21 12:01:35 2021 Return-Path: Delivered-To: dev-commits-src-all@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 1C3405554C9; Sun, 21 Feb 2021 12:01: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 4Dk3nW0MLsz4c8x; Sun, 21 Feb 2021 12:01: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 F361612329; Sun, 21 Feb 2021 12:01: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 11LC1Yoj069698; Sun, 21 Feb 2021 12:01:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LC1Y8H069697; Sun, 21 Feb 2021 12:01:34 GMT (envelope-from git) Date: Sun, 21 Feb 2021 12:01:34 GMT Message-Id: <202102211201.11LC1Y8H069697@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: d4a0c102a237 - stable/13 - Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 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: d4a0c102a237beb5650a2de4cc80f1aa496601d7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 12:01:35 -0000 The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a0c102a237beb5650a2de4cc80f1aa496601d7 commit d4a0c102a237beb5650a2de4cc80f1aa496601d7 Author: Dimitry Andric AuthorDate: 2021-02-18 21:30:27 +0000 Commit: Dimitry Andric CommitDate: 2021-02-21 11:57:45 +0000 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 Reported by: arichardson PR: 253226 (cherry picked from commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368) Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ contrib/libcxxrt/libelftc_dem_gnu3.c | 14 +++++++++++--- contrib/libcxxrt/unwind-arm.h | 3 ++- contrib/libcxxrt/unwind-itanium.h | 10 +++++++--- 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** diff --git a/contrib/libcxxrt/libelftc_dem_gnu3.c b/contrib/libcxxrt/libelftc_dem_gnu3.c index a8d061591826..6e88f7b4bb4c 100644 --- a/contrib/libcxxrt/libelftc_dem_gnu3.c +++ b/contrib/libcxxrt/libelftc_dem_gnu3.c @@ -541,9 +541,19 @@ __cxa_demangle_gnu3(const char *org) char *rtn; bool has_ret, more_type; - if (org == NULL || (org_len = strlen(org)) < 2) + if (org == NULL) return (NULL); + org_len = strlen(org); + // Try demangling as a type for short encodings + if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { + if (!cpp_demangle_data_init(&ddata, org)) + return (NULL); + if (!cpp_demangle_read_type(&ddata, 0)) + goto clean; + rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); + goto clean; + } if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { if ((rtn = malloc(org_len + 19)) == NULL) return (NULL); @@ -552,8 +562,6 @@ __cxa_demangle_gnu3(const char *org) return (rtn); } - if (org[0] != '_' || org[1] != 'Z') - return (NULL); if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); diff --git a/contrib/libcxxrt/unwind-arm.h b/contrib/libcxxrt/unwind-arm.h index a4bf1bd058bc..ec81237e573b 100644 --- a/contrib/libcxxrt/unwind-arm.h +++ b/contrib/libcxxrt/unwind-arm.h @@ -29,6 +29,7 @@ */ typedef enum { + _URC_NO_REASON = 0, _URC_OK = 0, /* operation completed successfully */ _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_END_OF_STACK = 5, @@ -96,7 +97,7 @@ struct _Unwind_Exception } pr_cache; /** Force alignment of next item to 8-byte boundary */ long long int :0; -}; +} __attribute__((__aligned__(8))); /* Unwinding functions */ _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *ucbp); diff --git a/contrib/libcxxrt/unwind-itanium.h b/contrib/libcxxrt/unwind-itanium.h index 0ca9488605aa..199d91de283d 100644 --- a/contrib/libcxxrt/unwind-itanium.h +++ b/contrib/libcxxrt/unwind-itanium.h @@ -40,6 +40,7 @@ extern "C" { typedef enum { _URC_NO_REASON = 0, + _URC_OK = 0, _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, _URC_FATAL_PHASE1_ERROR = 3, @@ -78,9 +79,12 @@ struct _Unwind_Exception { uint64_t exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; - unsigned long private_1; - unsigned long private_2; - } ; + uintptr_t private_1; + uintptr_t private_2; +#if __SIZEOF_POINTER__ == 4 + uint32_t reserved[3]; +#endif + } __attribute__((__aligned__)); extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, From owner-dev-commits-src-all@freebsd.org Sun Feb 21 12:02:00 2021 Return-Path: Delivered-To: dev-commits-src-all@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 17841555442; Sun, 21 Feb 2021 12:02: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 4Dk3p00CFqz4cG7; Sun, 21 Feb 2021 12:02: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 EDEA51221D; Sun, 21 Feb 2021 12:01: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 11LC1xTf069876; Sun, 21 Feb 2021 12:01:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LC1xnQ069875; Sun, 21 Feb 2021 12:01:59 GMT (envelope-from git) Date: Sun, 21 Feb 2021 12:01:59 GMT Message-Id: <202102211201.11LC1xnQ069875@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: 72b20d2aa973 - stable/12 - Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 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: 72b20d2aa973daa897256cdcf9c86d6f81f0e813 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 12:02:00 -0000 The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=72b20d2aa973daa897256cdcf9c86d6f81f0e813 commit 72b20d2aa973daa897256cdcf9c86d6f81f0e813 Author: Dimitry Andric AuthorDate: 2021-02-18 21:30:27 +0000 Commit: Dimitry Andric CommitDate: 2021-02-21 11:59:13 +0000 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 Reported by: arichardson PR: 253226 (cherry picked from commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368) Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ contrib/libcxxrt/libelftc_dem_gnu3.c | 14 +++++++++++--- contrib/libcxxrt/unwind-arm.h | 3 ++- contrib/libcxxrt/unwind-itanium.h | 10 +++++++--- 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** diff --git a/contrib/libcxxrt/libelftc_dem_gnu3.c b/contrib/libcxxrt/libelftc_dem_gnu3.c index a8d061591826..6e88f7b4bb4c 100644 --- a/contrib/libcxxrt/libelftc_dem_gnu3.c +++ b/contrib/libcxxrt/libelftc_dem_gnu3.c @@ -541,9 +541,19 @@ __cxa_demangle_gnu3(const char *org) char *rtn; bool has_ret, more_type; - if (org == NULL || (org_len = strlen(org)) < 2) + if (org == NULL) return (NULL); + org_len = strlen(org); + // Try demangling as a type for short encodings + if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { + if (!cpp_demangle_data_init(&ddata, org)) + return (NULL); + if (!cpp_demangle_read_type(&ddata, 0)) + goto clean; + rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); + goto clean; + } if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { if ((rtn = malloc(org_len + 19)) == NULL) return (NULL); @@ -552,8 +562,6 @@ __cxa_demangle_gnu3(const char *org) return (rtn); } - if (org[0] != '_' || org[1] != 'Z') - return (NULL); if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); diff --git a/contrib/libcxxrt/unwind-arm.h b/contrib/libcxxrt/unwind-arm.h index a4bf1bd058bc..ec81237e573b 100644 --- a/contrib/libcxxrt/unwind-arm.h +++ b/contrib/libcxxrt/unwind-arm.h @@ -29,6 +29,7 @@ */ typedef enum { + _URC_NO_REASON = 0, _URC_OK = 0, /* operation completed successfully */ _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_END_OF_STACK = 5, @@ -96,7 +97,7 @@ struct _Unwind_Exception } pr_cache; /** Force alignment of next item to 8-byte boundary */ long long int :0; -}; +} __attribute__((__aligned__(8))); /* Unwinding functions */ _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *ucbp); diff --git a/contrib/libcxxrt/unwind-itanium.h b/contrib/libcxxrt/unwind-itanium.h index 0ca9488605aa..199d91de283d 100644 --- a/contrib/libcxxrt/unwind-itanium.h +++ b/contrib/libcxxrt/unwind-itanium.h @@ -40,6 +40,7 @@ extern "C" { typedef enum { _URC_NO_REASON = 0, + _URC_OK = 0, _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, _URC_FATAL_PHASE1_ERROR = 3, @@ -78,9 +79,12 @@ struct _Unwind_Exception { uint64_t exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; - unsigned long private_1; - unsigned long private_2; - } ; + uintptr_t private_1; + uintptr_t private_2; +#if __SIZEOF_POINTER__ == 4 + uint32_t reserved[3]; +#endif + } __attribute__((__aligned__)); extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, From owner-dev-commits-src-all@freebsd.org Sun Feb 21 12:02:23 2021 Return-Path: Delivered-To: dev-commits-src-all@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 57661555928; Sun, 21 Feb 2021 12:02:23 +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 4Dk3pQ4M1Wz4cMv; Sun, 21 Feb 2021 12:02:22 +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 4CA76124AC; Sun, 21 Feb 2021 12:02:22 +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 11LC2Mlp070743; Sun, 21 Feb 2021 12:02:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LC2Mj2070742; Sun, 21 Feb 2021 12:02:22 GMT (envelope-from git) Date: Sun, 21 Feb 2021 12:02:22 GMT Message-Id: <202102211202.11LC2Mj2070742@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: 0aa8c6552ff5 - stable/11 - Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 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: 0aa8c6552ff58a8945a62750771b3f582f938d08 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 12:02:23 -0000 The branch stable/11 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=0aa8c6552ff58a8945a62750771b3f582f938d08 commit 0aa8c6552ff58a8945a62750771b3f582f938d08 Author: Dimitry Andric AuthorDate: 2021-02-18 21:30:27 +0000 Commit: Dimitry Andric CommitDate: 2021-02-21 11:59:52 +0000 Merge libcxxrt master 8049924686b8414d8e652cbd2a52c763b48e8456 Interesting fixes: b3c73ba libelftc_dem_gnu3: Sync with elftoolchain r3877 7b2335c Mostly fix __cxa_demangle after #3 Reported by: arichardson PR: 253226 (cherry picked from commit 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368) Revert 3c4fd2463bb2 since upstream libcxxrt fixed it in another way In 0ee0dbfb0d26cf4bc37f24f12e76c7f532b0f368 I imported a more recent libcxxrt snapshot, which includes an upstream fix for the padding of struct _Unwind_Exception: https://github.com/libcxxrt/libcxxrt/commit/e458560b7e22fff59af643dba363544b393bd8db However, we also had a similar fix in our tree as: https://cgit.freebsd.org/src/commit/?id=3c4fd2463bb29f65ef1404011fcb31e508cdf2e2 Since having both fixes makes the struct too large again, it leads to SIGBUSes when throwing exceptions on amd64 (or other LP64 arches). This is most easily tested by running kyua without any arguments. It looks like our fix is no longer needed now, so revert it to reduce diffs against upstream. PR: 253226 Reviewed by: arichardson, kp Differential Revision: https://reviews.freebsd.org/D28799 (cherry picked from commit d2b3fadf2db56131376a71b0597876b591a6aee4) --- contrib/libcxxrt/exception.cc | 30 ++++++------------------------ contrib/libcxxrt/libelftc_dem_gnu3.c | 14 +++++++++++--- contrib/libcxxrt/unwind-arm.h | 3 ++- contrib/libcxxrt/unwind-itanium.h | 10 +++++++--- 4 files changed, 26 insertions(+), 31 deletions(-) diff --git a/contrib/libcxxrt/exception.cc b/contrib/libcxxrt/exception.cc index 0de878e9e6db..0fb26ddb4ed2 100644 --- a/contrib/libcxxrt/exception.cc +++ b/contrib/libcxxrt/exception.cc @@ -572,19 +572,6 @@ static void free_exception(char *e) } } -#ifdef __LP64__ -/** - * There's an ABI bug in __cxa_exception: unwindHeader requires 16-byte - * alignment but it was broken by the addition of the referenceCount. - * The unwindHeader is at offset 0x58 in __cxa_exception. In order to keep - * compatibility with consumers of the broken __cxa_exception, explicitly add - * padding on allocation (and account for it on free). - */ -static const int exception_alignment_padding = 8; -#else -static const int exception_alignment_padding = 0; -#endif - /** * Allocates an exception structure. Returns a pointer to the space that can * be used to store an object of thrown_size bytes. This function will use an @@ -593,19 +580,16 @@ static const int exception_alignment_padding = 0; */ extern "C" void *__cxa_allocate_exception(size_t thrown_size) { - size_t size = exception_alignment_padding + sizeof(__cxa_exception) + - thrown_size; + size_t size = thrown_size + sizeof(__cxa_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + sizeof(__cxa_exception); + return buffer+sizeof(__cxa_exception); } extern "C" void *__cxa_allocate_dependent_exception(void) { - size_t size = exception_alignment_padding + - sizeof(__cxa_dependent_exception); + size_t size = sizeof(__cxa_dependent_exception); char *buffer = alloc_or_die(size); - return buffer + exception_alignment_padding + - sizeof(__cxa_dependent_exception); + return buffer+sizeof(__cxa_dependent_exception); } /** @@ -633,8 +617,7 @@ extern "C" void __cxa_free_exception(void *thrown_exception) } } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } static void releaseException(__cxa_exception *exception) @@ -661,8 +644,7 @@ void __cxa_free_dependent_exception(void *thrown_exception) { releaseException(realExceptionFromException(reinterpret_cast<__cxa_exception*>(ex))); } - free_exception(reinterpret_cast(ex) - - exception_alignment_padding); + free_exception(reinterpret_cast(ex)); } /** diff --git a/contrib/libcxxrt/libelftc_dem_gnu3.c b/contrib/libcxxrt/libelftc_dem_gnu3.c index a8d061591826..6e88f7b4bb4c 100644 --- a/contrib/libcxxrt/libelftc_dem_gnu3.c +++ b/contrib/libcxxrt/libelftc_dem_gnu3.c @@ -541,9 +541,19 @@ __cxa_demangle_gnu3(const char *org) char *rtn; bool has_ret, more_type; - if (org == NULL || (org_len = strlen(org)) < 2) + if (org == NULL) return (NULL); + org_len = strlen(org); + // Try demangling as a type for short encodings + if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) { + if (!cpp_demangle_data_init(&ddata, org)) + return (NULL); + if (!cpp_demangle_read_type(&ddata, 0)) + goto clean; + rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL); + goto clean; + } if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) { if ((rtn = malloc(org_len + 19)) == NULL) return (NULL); @@ -552,8 +562,6 @@ __cxa_demangle_gnu3(const char *org) return (rtn); } - if (org[0] != '_' || org[1] != 'Z') - return (NULL); if (!cpp_demangle_data_init(&ddata, org + 2)) return (NULL); diff --git a/contrib/libcxxrt/unwind-arm.h b/contrib/libcxxrt/unwind-arm.h index a4bf1bd058bc..ec81237e573b 100644 --- a/contrib/libcxxrt/unwind-arm.h +++ b/contrib/libcxxrt/unwind-arm.h @@ -29,6 +29,7 @@ */ typedef enum { + _URC_NO_REASON = 0, _URC_OK = 0, /* operation completed successfully */ _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_END_OF_STACK = 5, @@ -96,7 +97,7 @@ struct _Unwind_Exception } pr_cache; /** Force alignment of next item to 8-byte boundary */ long long int :0; -}; +} __attribute__((__aligned__(8))); /* Unwinding functions */ _Unwind_Reason_Code _Unwind_RaiseException(struct _Unwind_Exception *ucbp); diff --git a/contrib/libcxxrt/unwind-itanium.h b/contrib/libcxxrt/unwind-itanium.h index 0ca9488605aa..199d91de283d 100644 --- a/contrib/libcxxrt/unwind-itanium.h +++ b/contrib/libcxxrt/unwind-itanium.h @@ -40,6 +40,7 @@ extern "C" { typedef enum { _URC_NO_REASON = 0, + _URC_OK = 0, _URC_FOREIGN_EXCEPTION_CAUGHT = 1, _URC_FATAL_PHASE2_ERROR = 2, _URC_FATAL_PHASE1_ERROR = 3, @@ -78,9 +79,12 @@ struct _Unwind_Exception { uint64_t exception_class; _Unwind_Exception_Cleanup_Fn exception_cleanup; - unsigned long private_1; - unsigned long private_2; - } ; + uintptr_t private_1; + uintptr_t private_2; +#if __SIZEOF_POINTER__ == 4 + uint32_t reserved[3]; +#endif + } __attribute__((__aligned__)); extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *); extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *, From owner-dev-commits-src-all@freebsd.org Sun Feb 21 12:52:17 2021 Return-Path: Delivered-To: dev-commits-src-all@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 2E2545568B5; Sun, 21 Feb 2021 12:52: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 4Dk4w10tCFz4g8v; Sun, 21 Feb 2021 12:52: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 1132A128CF; Sun, 21 Feb 2021 12:52: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 11LCqGEh034130; Sun, 21 Feb 2021 12:52:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LCqGX2034129; Sun, 21 Feb 2021 12:52:16 GMT (envelope-from git) Date: Sun, 21 Feb 2021 12:52:16 GMT Message-Id: <202102211252.11LCqGX2034129@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 5ac839029d01 - main - sctp: clear a pointer to a net which will be removed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 12:52:17 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee commit 5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee Author: Michael Tuexen AuthorDate: 2021-02-21 12:03:57 +0000 Commit: Michael Tuexen CommitDate: 2021-02-21 12:06:05 +0000 sctp: clear a pointer to a net which will be removed MFC after: 3 days --- sys/netinet/sctp_pcb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 2e082570cfc1..4d09ad3a7353 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -4443,6 +4443,10 @@ out: /* Clear net */ asoc->last_control_chunk_from = NULL; } + if (net == asoc->last_net_cmt_send_started) { + /* Clear net */ + asoc->last_net_cmt_send_started = NULL; + } if (net == stcb->asoc.alternate) { sctp_free_remote_addr(stcb->asoc.alternate); stcb->asoc.alternate = NULL; From owner-dev-commits-src-all@freebsd.org Sun Feb 21 16:17:15 2021 Return-Path: Delivered-To: dev-commits-src-all@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 58E2A55AB52; Sun, 21 Feb 2021 16:17: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 4Dk9SW226Dz4rk0; Sun, 21 Feb 2021 16:17: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 3851C15C68; Sun, 21 Feb 2021 16:17: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 11LGHFT9000902; Sun, 21 Feb 2021 16:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LGHFdi000901; Sun, 21 Feb 2021 16:17:15 GMT (envelope-from git) Date: Sun, 21 Feb 2021 16:17:15 GMT Message-Id: <202102211617.11LGHFdi000901@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b963ce4588b3 - main - sctp: improve computation of an alternate net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b963ce4588b33f733aef3f7a7f3fbe5018a89728 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 16:17:15 -0000 The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b963ce4588b33f733aef3f7a7f3fbe5018a89728 commit b963ce4588b33f733aef3f7a7f3fbe5018a89728 Author: Michael Tuexen AuthorDate: 2021-02-21 16:13:06 +0000 Commit: Michael Tuexen CommitDate: 2021-02-21 16:13:06 +0000 sctp: improve computation of an alternate net Espeially handle the case where the net passed in is about to be deleted and therefore not in the list of nets anymore. MFC after: 3 days Reported by: syzbot+9756917a7c8381adf5e8@syzkaller.appspotmail.com --- sys/netinet/sctp_timer.c | 85 ++++++++++++++++++++++++++++-------------------- 1 file changed, 49 insertions(+), 36 deletions(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index bce1f5cd166d..582abd8e8854 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -164,8 +164,8 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb, } /* - * sctp_find_alternate_net() returns a non-NULL pointer as long - * the argument net is non-NULL. + * sctp_find_alternate_net() returns a non-NULL pointer as long as there + * exists nets, which are not being deleted. */ struct sctp_nets * sctp_find_alternate_net(struct sctp_tcb *stcb, @@ -174,14 +174,14 @@ sctp_find_alternate_net(struct sctp_tcb *stcb, { /* Find and return an alternate network if possible */ struct sctp_nets *alt, *mnet, *min_errors_net = NULL, *max_cwnd_net = NULL; - int once; + bool looped; /* JRS 5/14/07 - Initialize min_errors to an impossible value. */ int min_errors = -1; uint32_t max_cwnd = 0; if (stcb->asoc.numnets == 1) { - /* No others but net */ + /* No selection can be made. */ return (TAILQ_FIRST(&stcb->asoc.nets)); } /* @@ -328,25 +328,22 @@ sctp_find_alternate_net(struct sctp_tcb *stcb, return (max_cwnd_net); } } - mnet = net; - once = 0; - - if (mnet == NULL) { - mnet = TAILQ_FIRST(&stcb->asoc.nets); - if (mnet == NULL) { - return (NULL); - } + /* Look for an alternate net, which is active. */ + if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { + alt = TAILQ_NEXT(net, sctp_next);; + } else { + alt = TAILQ_FIRST(&stcb->asoc.nets); } + looped = false; for (;;) { - alt = TAILQ_NEXT(mnet, sctp_next); if (alt == NULL) { - once++; - if (once > 1) { - break; + if (!looped) { + alt = TAILQ_FIRST(&stcb->asoc.nets); + looped = true; } - alt = TAILQ_FIRST(&stcb->asoc.nets); + /* Definitely out of candidates. */ if (alt == NULL) { - return (NULL); + break; } } if (alt->ro.ro_nh == NULL) { @@ -358,43 +355,59 @@ sctp_find_alternate_net(struct sctp_tcb *stcb, } if (((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && (alt->ro.ro_nh != NULL) && - (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED))) { - /* Found a reachable address */ + (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED)) && + (alt != net)) { + /* Found an alternate net, which is reachable. */ break; } - mnet = alt; + alt = TAILQ_NEXT(alt, sctp_next); } if (alt == NULL) { - /* Case where NO insv network exists (dormant state) */ - /* we rotate destinations */ - once = 0; - mnet = net; + /* + * In case no active alternate net has been found, look for + * an alternate net, which is confirmed. + */ + if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { + alt = TAILQ_NEXT(net, sctp_next);; + } else { + alt = TAILQ_FIRST(&stcb->asoc.nets); + } + looped = false; for (;;) { - if (mnet == NULL) { - return (TAILQ_FIRST(&stcb->asoc.nets)); - } - alt = TAILQ_NEXT(mnet, sctp_next); if (alt == NULL) { - once++; - if (once > 1) { - break; + if (!looped) { + alt = TAILQ_FIRST(&stcb->asoc.nets); + looped = true; } - alt = TAILQ_FIRST(&stcb->asoc.nets); + /* Definitely out of candidates. */ if (alt == NULL) { break; } } if ((!(alt->dest_state & SCTP_ADDR_UNCONFIRMED)) && (alt != net)) { - /* Found an alternate address */ + /* + * Found an alternate net, which is + * confirmed. + */ break; } - mnet = alt; + alt = TAILQ_NEXT(alt, sctp_next); } } if (alt == NULL) { - return (net); + /* + * In case no confirmed alternate net has been found, just + * return net, if it is not being deleted. In the other case + * just return the first net. + */ + if ((net != NULL) && ((net->dest_state & SCTP_ADDR_BEING_DELETED) == 0)) { + alt = net; + } + if (alt == NULL) { + alt = TAILQ_FIRST(&stcb->asoc.nets); + } } return (alt); } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 16:42:30 2021 Return-Path: Delivered-To: dev-commits-src-all@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 0D71955B256; Sun, 21 Feb 2021 16:42: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 4DkB1d73Ddz4smT; Sun, 21 Feb 2021 16:42: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 E4DDF16111; Sun, 21 Feb 2021 16:42: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 11LGgTpY039391; Sun, 21 Feb 2021 16:42:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LGgTMm039390; Sun, 21 Feb 2021 16:42:29 GMT (envelope-from git) Date: Sun, 21 Feb 2021 16:42:29 GMT Message-Id: <202102211642.11LGgTMm039390@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: a310973472b5 - releng/13.0 - pf: Fix osfp configuration 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/releng/13.0 X-Git-Reftype: branch X-Git-Commit: a310973472b56a1c224ba76ffaa5adff7211f244 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 16:42:30 -0000 The branch releng/13.0 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a310973472b56a1c224ba76ffaa5adff7211f244 commit a310973472b56a1c224ba76ffaa5adff7211f244 Author: Kristof Provost AuthorDate: 2021-02-18 07:36:46 +0000 Commit: Kristof Provost CommitDate: 2021-02-21 16:31:27 +0000 pf: Fix osfp configuration pf_rule_to_krule() incorrectly converted the rule osfp configuration to the krule structure. Approved by: re (kib) Reported by: delphij@ MFC after: 3 days (cherry picked from commit 2ed689a674c380e48245933d5326da4dda65f94d) (cherry picked from commit 9823eb6909fcd82bb9d70e77037542e527e3d6ff) --- sys/netpfil/pf/pf_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index edc8443dcc0a..bd8896cfb772 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -1623,7 +1623,7 @@ pf_rule_to_krule(const struct pf_rule *rule, struct pf_krule *krule) /* Don't allow userspace to set evaulations, packets or bytes. */ /* kif, anchor, overload_tbl are not copied over. */ - krule->os_fingerprint = krule->os_fingerprint; + krule->os_fingerprint = rule->os_fingerprint; krule->rtableid = rule->rtableid; bcopy(rule->timeout, krule->timeout, sizeof(krule->timeout)); From owner-dev-commits-src-all@freebsd.org Sun Feb 21 18:56:58 2021 Return-Path: Delivered-To: dev-commits-src-all@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 8381755E567; Sun, 21 Feb 2021 18:56: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 4DkF0p3Kbqz3H6g; Sun, 21 Feb 2021 18:56: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 6500117B9E; Sun, 21 Feb 2021 18:56: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 11LIuwEv010963; Sun, 21 Feb 2021 18:56:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LIuwS8010962; Sun, 21 Feb 2021 18:56:58 GMT (envelope-from git) Date: Sun, 21 Feb 2021 18:56:58 GMT Message-Id: <202102211856.11LIuwS8010962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: f7496dcab036 - main - jail: Change the locking around pr_ref and pr_uref MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7496dcab0360a74bfb00cd6118f66323fffda61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 18:56:58 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=f7496dcab0360a74bfb00cd6118f66323fffda61 commit f7496dcab0360a74bfb00cd6118f66323fffda61 Author: Jamie Gritton AuthorDate: 2021-02-21 18:55:44 +0000 Commit: Jamie Gritton CommitDate: 2021-02-21 18:55:44 +0000 jail: Change the locking around pr_ref and pr_uref Require both the prison mutex and allprison_lock when pr_ref or pr_uref go to/from zero. Adding a non-first or removing a non-last reference remain lock-free. This means that a shared hold on allprison_lock is sufficient for prison_isalive() to be useful, which removes a number of cases of lock/check/unlock on the prison mutex. Expand the locking in kern_jail_set() to keep allprison_lock held exclusive until the new prison is valid, thus making invalid prisons invisible to any thread holding allprison_lock (except of course the one creating or destroying the prison). This renders prison_isvalid() nearly redundant, now used only in asserts. Differential Revision: https://reviews.freebsd.org/D28419 Differential Revision: https://reviews.freebsd.org/D28458 --- sys/kern/kern_jail.c | 423 ++++++++++++++++++++++++------------------------- sys/kern/sysv_msg.c | 2 +- sys/kern/sysv_sem.c | 2 +- sys/kern/sysv_shm.c | 2 +- sys/kern/uipc_mqueue.c | 35 ++-- sys/sys/jail.h | 3 +- 6 files changed, 232 insertions(+), 235 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 65201eb12951..48c91a95bf1a 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -137,9 +137,11 @@ LIST_HEAD(, prison_racct) allprison_racct; int lastprid = 0; static int get_next_prid(struct prison **insprp); -static int do_jail_attach(struct thread *td, struct prison *pr); +static int do_jail_attach(struct thread *td, struct prison *pr, int drflags); static void prison_complete(void *context, int pending); static void prison_deref(struct prison *pr, int flags); +static int prison_lock_xlock(struct prison *pr, int flags); +static void prison_free_not_last(struct prison *pr); static void prison_set_allow_locked(struct prison *pr, unsigned flag, int enable); static char *prison_path(struct prison *pr1, struct prison *pr2); @@ -1006,18 +1008,15 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * where it can be inserted later. */ TAILQ_FOREACH(inspr, &allprison, pr_list) { - if (inspr->pr_id == jid) { - mtx_lock(&inspr->pr_mtx); - if (prison_isvalid(inspr)) { - pr = inspr; - drflags |= PD_LOCKED; - inspr = NULL; - } else - mtx_unlock(&inspr->pr_mtx); - break; - } + if (inspr->pr_id < jid) + continue; if (inspr->pr_id > jid) break; + pr = inspr; + mtx_lock(&pr->pr_mtx); + drflags |= PD_LOCKED; + inspr = NULL; + break; } if (pr != NULL) { ppr = pr->pr_parent; @@ -1041,13 +1040,15 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) error = ENOENT; vfs_opterror(opts, "jail %d not found", jid); goto done_deref; - } else if (!prison_isalive(pr)) { + } + if (!prison_isalive(pr)) { if (!(flags & JAIL_DYING)) { error = ENOENT; vfs_opterror(opts, "jail %d is dying", jid); goto done_deref; - } else if ((flags & JAIL_ATTACH) || + } + if ((flags & JAIL_ATTACH) || (pr_flags & PR_PERSIST)) { /* * A dying jail might be resurrected @@ -1121,12 +1122,10 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) if (namelc[0] != '\0') { pnamelen = (ppr == &prison0) ? 0 : strlen(ppr->pr_name) + 1; - name_again: deadpr = NULL; FOREACH_PRISON_CHILD(ppr, tpr) { if (tpr != pr && !strcmp(tpr->pr_name + pnamelen, namelc)) { - mtx_lock(&tpr->pr_mtx); if (prison_isalive(tpr)) { if (pr == NULL && cuflags != JAIL_CREATE) { @@ -1135,6 +1134,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * for updates. */ pr = tpr; + mtx_lock(&pr->pr_mtx); drflags |= PD_LOCKED; break; } @@ -1144,28 +1144,22 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * active sibling jail. */ error = EEXIST; - mtx_unlock(&tpr->pr_mtx); vfs_opterror(opts, "jail \"%s\" already exists", name); goto done_deref; } if (pr == NULL && - cuflags != JAIL_CREATE && - prison_isvalid(tpr)) + cuflags != JAIL_CREATE) { deadpr = tpr; - mtx_unlock(&tpr->pr_mtx); + } } } /* If no active jail is found, use a dying one. */ if (deadpr != NULL && pr == NULL) { if (flags & JAIL_DYING) { - mtx_lock(&deadpr->pr_mtx); - if (!prison_isvalid(deadpr)) { - mtx_unlock(&deadpr->pr_mtx); - goto name_again; - } pr = deadpr; + mtx_lock(&pr->pr_mtx); drflags |= PD_LOCKED; } else if (cuflags == JAIL_UPDATE) { error = ENOENT; @@ -1199,19 +1193,11 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) vfs_opterror(opts, "prison limit exceeded"); goto done_deref; } - mtx_lock(&ppr->pr_mtx); - if (!prison_isvalid(ppr)) { - mtx_unlock(&ppr->pr_mtx); - error = ENOENT; - vfs_opterror(opts, "jail \"%s\" not found", - prison_name(mypr, ppr)); - goto done_deref; - } prison_hold(ppr); - if (refcount_acquire(&ppr->pr_uref)) - mtx_unlock(&ppr->pr_mtx); - else { + if (!refcount_acquire_if_not_zero(&ppr->pr_uref)) { /* This brings the parent back to life. */ + mtx_lock(&ppr->pr_mtx); + refcount_acquire(&ppr->pr_uref); mtx_unlock(&ppr->pr_mtx); error = osd_jail_call(ppr, PR_METHOD_CREATE, opts); if (error) { @@ -1219,7 +1205,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) drflags |= PD_DEREF | PD_DEUREF; goto done_deref; } - } + } if (jid == 0 && (jid = get_next_prid(&inspr)) == 0) { error = EAGAIN; @@ -1230,6 +1216,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } pr = malloc(sizeof(*pr), M_PRISON, M_WAITOK | M_ZERO); + refcount_init(&pr->pr_ref, 0); + refcount_init(&pr->pr_uref, 0); LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); TASK_INIT(&pr->pr_task, 0, prison_complete, pr); @@ -1452,7 +1440,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #ifdef VIMAGE (tpr != tppr && (tpr->pr_flags & PR_VNET)) || #endif - refcount_load(&tpr->pr_uref) == 0) { + !prison_isalive(tpr)) { descend = 0; continue; } @@ -1520,7 +1508,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #ifdef VIMAGE (tpr != tppr && (tpr->pr_flags & PR_VNET)) || #endif - refcount_load(&tpr->pr_uref) == 0) { + !prison_isalive(tpr)) { descend = 0; continue; } @@ -1759,8 +1747,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) prison_hold(pr); refcount_acquire(&pr->pr_uref); } else { - refcount_release(&pr->pr_ref); drflags |= PD_DEUREF; + prison_free_not_last(pr); } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; @@ -1824,8 +1812,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #endif /* Let the modules do their work. */ - sx_downgrade(&allprison_lock); - drflags = (drflags & ~PD_LIST_XLOCKED) | PD_LIST_SLOCKED; if (born) { error = osd_jail_call(pr, PR_METHOD_CREATE, opts); if (error) { @@ -1842,9 +1828,8 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* Attach this process to the prison if requested. */ if (flags & JAIL_ATTACH) { - mtx_lock(&pr->pr_mtx); - error = do_jail_attach(td, pr); - drflags &= ~PD_LIST_SLOCKED; + error = do_jail_attach(td, pr, prison_lock_xlock(pr, drflags)); + drflags &= ~(PD_LOCKED | PD_LIST_XLOCKED); if (error) { if (created) { /* do_jail_attach has removed the prison. */ @@ -1857,9 +1842,9 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) #ifdef RACCT if (racct_enable && !created) { - if (drflags & PD_LIST_SLOCKED) { - sx_sunlock(&allprison_lock); - drflags &= ~PD_LIST_SLOCKED; + if (drflags & PD_LIST_XLOCKED) { + sx_xunlock(&allprison_lock); + drflags &= ~PD_LIST_XLOCKED; } prison_racct_modify(pr); } @@ -1874,8 +1859,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) * not be publicly visible). */ if (pr_flags & PR_PERSIST) { - mtx_lock(&pr->pr_mtx); - drflags |= PD_LOCKED; + drflags = prison_lock_xlock(pr, drflags); refcount_acquire(&pr->pr_ref); refcount_acquire(&pr->pr_uref); } else { @@ -1952,13 +1936,8 @@ get_next_prid(struct prison **insprp) TAILQ_FOREACH(inspr, &allprison, pr_list) { if (inspr->pr_id < jid) continue; - if (inspr->pr_id > jid || - refcount_load(&inspr->pr_ref) == 0) { - /* - * Found an opening. This may be a gap - * in the list, or a dead jail with the - * same ID. - */ + if (inspr->pr_id > jid) { + /* Found an opening. */ maxid = 0; break; } @@ -2047,18 +2026,14 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) error = vfs_copyopt(opts, "lastjid", &jid, sizeof(jid)); if (error == 0) { TAILQ_FOREACH(pr, &allprison, pr_list) { - if (pr->pr_id > jid && prison_ischild(mypr, pr)) { + if (pr->pr_id > jid && + ((flags & JAIL_DYING) || prison_isalive(pr)) && + prison_ischild(mypr, pr)) { mtx_lock(&pr->pr_mtx); - if ((flags & JAIL_DYING) - ? prison_isvalid(pr) : prison_isalive(pr)) - break; - mtx_unlock(&pr->pr_mtx); + drflags |= PD_LOCKED; + goto found_prison; } } - if (pr != NULL) { - drflags |= PD_LOCKED; - goto found_prison; - } error = ENOENT; vfs_opterror(opts, "no jail after %d", jid); goto done; @@ -2314,7 +2289,7 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) int sys_jail_remove(struct thread *td, struct jail_remove_args *uap) { - struct prison *pr, *cpr, *lpr, *tpr; + struct prison *pr, *cpr, *lpr; int descend, error; error = priv_check(td, PRIV_JAIL_REMOVE); @@ -2334,21 +2309,13 @@ sys_jail_remove(struct thread *td, struct jail_remove_args *uap) mtx_unlock(&pr->pr_mtx); lpr = NULL; FOREACH_PRISON_DESCENDANT(pr, cpr, descend) { - mtx_lock(&cpr->pr_mtx); - if (prison_isvalid(cpr)) { - tpr = cpr; - prison_hold(cpr); - } else { - /* Already removed - do not do it again. */ - tpr = NULL; - } - mtx_unlock(&cpr->pr_mtx); + prison_hold(cpr); if (lpr != NULL) { mtx_lock(&lpr->pr_mtx); prison_remove_one(lpr); sx_xlock(&allprison_lock); } - lpr = tpr; + lpr = cpr; } if (lpr != NULL) { mtx_lock(&lpr->pr_mtx); @@ -2377,8 +2344,8 @@ prison_remove_one(struct prison *pr) /* If the prison was persistent, it is not anymore. */ if (pr->pr_flags & PR_PERSIST) { - refcount_release(&pr->pr_ref); drflags |= PD_DEUREF; + prison_free_not_last(pr); pr->pr_flags &= ~PR_PERSIST; } @@ -2428,14 +2395,7 @@ sys_jail_attach(struct thread *td, struct jail_attach_args *uap) if (error) return (error); - /* - * Start with exclusive hold on allprison_lock to ensure that a possible - * PR_METHOD_REMOVE call isn't concurrent with jail_set or jail_remove. - * But then immediately downgrade it since we don't need to stop - * readers. - */ - sx_xlock(&allprison_lock); - sx_downgrade(&allprison_lock); + sx_slock(&allprison_lock); pr = prison_find_child(td->td_ucred->cr_prison, uap->jid); if (pr == NULL) { sx_sunlock(&allprison_lock); @@ -2449,16 +2409,18 @@ sys_jail_attach(struct thread *td, struct jail_attach_args *uap) return (EINVAL); } - return (do_jail_attach(td, pr)); + return (do_jail_attach(td, pr, PD_LOCKED | PD_LIST_SLOCKED)); } static int -do_jail_attach(struct thread *td, struct prison *pr) +do_jail_attach(struct thread *td, struct prison *pr, int drflags) { struct proc *p; struct ucred *newcred, *oldcred; int error; + mtx_assert(&pr->pr_mtx, MA_OWNED); + sx_assert(&allprison_lock, SX_LOCKED); /* * XXX: Note that there is a slight race here if two threads * in the same privileged process attempt to attach to two @@ -2469,15 +2431,18 @@ do_jail_attach(struct thread *td, struct prison *pr) */ refcount_acquire(&pr->pr_ref); refcount_acquire(&pr->pr_uref); + drflags |= PD_DEREF | PD_DEUREF; mtx_unlock(&pr->pr_mtx); + drflags &= ~PD_LOCKED; /* Let modules do whatever they need to prepare for attaching. */ error = osd_jail_call(pr, PR_METHOD_ATTACH, td); if (error) { - prison_deref(pr, PD_DEREF | PD_DEUREF | PD_LIST_SLOCKED); + prison_deref(pr, drflags); return (error); } - sx_sunlock(&allprison_lock); + sx_unlock(&allprison_lock); + drflags &= ~(PD_LIST_SLOCKED | PD_LIST_XLOCKED); /* * Reparent the newly attached process to this jail. @@ -2513,7 +2478,7 @@ do_jail_attach(struct thread *td, struct prison *pr) rctl_proc_ucred_changed(p, newcred); crfree(newcred); #endif - prison_deref(oldcred->cr_prison, PD_DEREF | PD_DEUREF); + prison_deref(oldcred->cr_prison, drflags); crfree(oldcred); /* @@ -2533,8 +2498,9 @@ do_jail_attach(struct thread *td, struct prison *pr) e_revert_osd: /* Tell modules this thread is still in its old jail after all. */ sx_slock(&allprison_lock); + drflags |= PD_LIST_SLOCKED; (void)osd_jail_call(td->td_ucred->cr_prison, PR_METHOD_ATTACH, td); - prison_deref(pr, PD_DEREF | PD_DEUREF | PD_LIST_SLOCKED); + prison_deref(pr, drflags); return (error); } @@ -2548,19 +2514,13 @@ prison_find(int prid) sx_assert(&allprison_lock, SX_LOCKED); TAILQ_FOREACH(pr, &allprison, pr_list) { - if (pr->pr_id == prid) { - mtx_lock(&pr->pr_mtx); - if (prison_isvalid(pr)) - return (pr); - /* - * Any active prison with the same ID would have - * been inserted before a dead one. - */ - mtx_unlock(&pr->pr_mtx); - break; - } + if (pr->pr_id < prid) + continue; if (pr->pr_id > prid) break; + KASSERT(prison_isvalid(pr), ("Found invalid prison %p", pr)); + mtx_lock(&pr->pr_mtx); + return (pr); } return (NULL); } @@ -2577,10 +2537,10 @@ prison_find_child(struct prison *mypr, int prid) sx_assert(&allprison_lock, SX_LOCKED); FOREACH_PRISON_DESCENDANT(mypr, pr, descend) { if (pr->pr_id == prid) { + KASSERT(prison_isvalid(pr), + ("Found invalid prison %p", pr)); mtx_lock(&pr->pr_mtx); - if (prison_isvalid(pr)) - return (pr); - mtx_unlock(&pr->pr_mtx); + return (pr); } } return (NULL); @@ -2598,26 +2558,21 @@ prison_find_name(struct prison *mypr, const char *name) sx_assert(&allprison_lock, SX_LOCKED); mylen = (mypr == &prison0) ? 0 : strlen(mypr->pr_name) + 1; - again: deadpr = NULL; FOREACH_PRISON_DESCENDANT(mypr, pr, descend) { if (!strcmp(pr->pr_name + mylen, name)) { - mtx_lock(&pr->pr_mtx); - if (prison_isalive(pr)) + KASSERT(prison_isvalid(pr), + ("Found invalid prison %p", pr)); + if (prison_isalive(pr)) { + mtx_lock(&pr->pr_mtx); return (pr); - if (prison_isvalid(pr)) - deadpr = pr; - mtx_unlock(&pr->pr_mtx); + } + deadpr = pr; } } /* There was no valid prison - perhaps there was a dying one. */ - if (deadpr != NULL) { + if (deadpr != NULL) mtx_lock(&deadpr->pr_mtx); - if (!prison_isvalid(deadpr)) { - mtx_unlock(&deadpr->pr_mtx); - goto again; - } - } return (deadpr); } @@ -2671,45 +2626,53 @@ prison_hold(struct prison *pr) /* * Remove a prison reference. If that was the last reference, the - * prison will be removed (at a later time). Return with the prison - * unlocked. + * prison will be removed (at a later time). */ void prison_free_locked(struct prison *pr) { - int lastref; mtx_assert(&pr->pr_mtx, MA_OWNED); + /* + * Locking is no longer required, but unlock because the caller + * expects it. + */ + mtx_unlock(&pr->pr_mtx); + prison_free(pr); +} + +void +prison_free(struct prison *pr) +{ + KASSERT(refcount_load(&pr->pr_ref) > 0, ("Trying to free dead prison %p (jid=%d).", pr, pr->pr_id)); - lastref = refcount_release(&pr->pr_ref); - mtx_unlock(&pr->pr_mtx); - if (lastref) { + if (!refcount_release_if_not_last(&pr->pr_ref)) { /* - * Don't remove the prison itself in this context, + * Don't remove the last reference in this context, * in case there are locks held. */ taskqueue_enqueue(taskqueue_thread, &pr->pr_task); } } -void -prison_free(struct prison *pr) +static void +prison_free_not_last(struct prison *pr) { +#ifdef INVARIANTS + int lastref; - /* - * Locking is only required when releasing the last reference. - * This allows assurance that a locked prison will remain valid - * until it is unlocked. - */ KASSERT(refcount_load(&pr->pr_ref) > 0, ("Trying to free dead prison %p (jid=%d).", pr, pr->pr_id)); - if (refcount_release_if_not_last(&pr->pr_ref)) - return; - mtx_lock(&pr->pr_mtx); - prison_free_locked(pr); + lastref = refcount_release(&pr->pr_ref); + KASSERT(!lastref, + ("prison_free_not_last freed last ref on prison %p (jid=%d).", + pr, pr->pr_id)); +#else + refcount_release(&pr>pr_ref); +#endif } /* @@ -2718,7 +2681,8 @@ prison_free(struct prison *pr) * user-visible, except through the the jail system calls. It is also * an error to hold an invalid prison. A prison record will remain * alive as long as it has at least one user reference, and will not - * be set to the dying state was long as the prison mutex is held. + * be set to the dying state until the prison mutex and allprison_lock + * are both freed. */ void prison_proc_hold(struct prison *pr) @@ -2756,7 +2720,7 @@ prison_proc_free(struct prison *pr) * but also half dead. Add a reference so any calls to * prison_free() won't re-submit the task. */ - refcount_acquire(&pr->pr_ref); + prison_hold(pr); taskqueue_enqueue(taskqueue_thread, &pr->pr_task); } } @@ -2768,18 +2732,18 @@ static void prison_complete(void *context, int pending) { struct prison *pr = context; + int drflags; - sx_xlock(&allprison_lock); - mtx_lock(&pr->pr_mtx); /* - * If this is completing a call to prison_proc_free, there will still - * be a user reference held; clear that as well as the reference that - * was added. No references are expected if this is completing a call - * to prison_free, but prison_deref is still called for the cleanup. + * This could be called to release the last reference, or the + * last user reference; the existence of a user reference implies + * the latter. There will always be a reference to remove, as + * prison_proc_free adds one. */ - prison_deref(pr, refcount_load(&pr->pr_uref) > 0 - ? PD_DEREF | PD_DEUREF | PD_LOCKED | PD_LIST_XLOCKED - : PD_LOCKED | PD_LIST_XLOCKED); + drflags = prison_lock_xlock(pr, PD_DEREF); + if (refcount_load(&pr->pr_uref) > 0) + drflags |= PD_DEUREF; + prison_deref(pr, drflags); } /* @@ -2794,84 +2758,86 @@ static void prison_deref(struct prison *pr, int flags) { struct prisonlist freeprison; - struct prison *rpr, *tpr; - int lastref, lasturef; + struct prison *rpr, *ppr, *tpr; TAILQ_INIT(&freeprison); - if (!(flags & PD_LOCKED)) - mtx_lock(&pr->pr_mtx); /* * Release this prison as requested, which may cause its parent * to be released, and then maybe its grandparent, etc. */ for (;;) { if (flags & PD_DEUREF) { + /* Drop a user reference. */ KASSERT(refcount_load(&pr->pr_uref) > 0, ("prison_deref PD_DEUREF on a dead prison (jid=%d)", pr->pr_id)); - lasturef = refcount_release(&pr->pr_uref); - if (lasturef) - refcount_acquire(&pr->pr_ref); - KASSERT(refcount_load(&prison0.pr_uref) > 0, - ("prison0 pr_uref=0")); - } else - lasturef = 0; + if (!refcount_release_if_not_last(&pr->pr_uref)) { + if (!(flags & PD_DEREF)) { + prison_hold(pr); + flags |= PD_DEREF; + } + flags = prison_lock_xlock(pr, flags); + if (refcount_release(&pr->pr_uref)) { + /* + * When the last user references goes, + * this becomes a dying prison. + */ + KASSERT( + refcount_load(&prison0.pr_uref) > 0, + ("prison0 pr_uref=0")); + mtx_unlock(&pr->pr_mtx); + flags &= ~PD_LOCKED; + (void)osd_jail_call(pr, + PR_METHOD_REMOVE, NULL); + } + } + } if (flags & PD_DEREF) { + /* Drop a reference. */ KASSERT(refcount_load(&pr->pr_ref) > 0, ("prison_deref PD_DEREF on a dead prison (jid=%d)", pr->pr_id)); - lastref = refcount_release(&pr->pr_ref); - } - else - lastref = refcount_load(&pr->pr_ref) == 0; - mtx_unlock(&pr->pr_mtx); - - /* - * Tell the modules if the last user reference was removed - * (even it sticks around in dying state). - */ - if (lasturef) { - if (!(flags & (PD_LIST_SLOCKED | PD_LIST_XLOCKED))) { - if (atomic_load_acq_int(&pr->pr_ref) > 1) { - sx_slock(&allprison_lock); - flags |= PD_LIST_SLOCKED; - } else { - sx_xlock(&allprison_lock); - flags |= PD_LIST_XLOCKED; + if (!refcount_release_if_not_last(&pr->pr_ref)) { + flags = prison_lock_xlock(pr, flags); + if (refcount_release(&pr->pr_ref)) { + /* + * When the last reference goes, + * unlink the prison and set it aside. + */ + KASSERT( + refcount_load(&pr->pr_uref) == 0, + ("prison_deref: last ref, " + "but still has %d urefs (jid=%d)", + pr->pr_uref, pr->pr_id)); + KASSERT( + refcount_load(&prison0.pr_ref) != 0, + ("prison0 pr_ref=0")); + TAILQ_REMOVE(&allprison, pr, pr_list); + LIST_REMOVE(pr, pr_sibling); + TAILQ_INSERT_TAIL(&freeprison, pr, + pr_list); + for (ppr = pr->pr_parent; + ppr != NULL; + ppr = ppr->pr_parent) + ppr->pr_childcount--; + /* + * Removing a prison frees references + * from its parent. + */ + mtx_unlock(&pr->pr_mtx); + flags &= ~PD_LOCKED; + pr = pr->pr_parent; + flags |= PD_DEREF | PD_DEUREF; + continue; } } - (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); - mtx_lock(&pr->pr_mtx); - lastref = refcount_release(&pr->pr_ref); - mtx_unlock(&pr->pr_mtx); } - - if (!lastref) - break; - - if (flags & PD_LIST_SLOCKED) { - if (!sx_try_upgrade(&allprison_lock)) { - sx_sunlock(&allprison_lock); - sx_xlock(&allprison_lock); - } - flags &= ~PD_LIST_SLOCKED; - } else if (!(flags & PD_LIST_XLOCKED)) - sx_xlock(&allprison_lock); - flags |= PD_LIST_XLOCKED; - - TAILQ_REMOVE(&allprison, pr, pr_list); - LIST_REMOVE(pr, pr_sibling); - TAILQ_INSERT_TAIL(&freeprison, pr, pr_list); - for (tpr = pr->pr_parent; tpr != NULL; tpr = tpr->pr_parent) - tpr->pr_childcount--; - - /* Removing a prison frees a reference on its parent. */ - pr = pr->pr_parent; - mtx_lock(&pr->pr_mtx); - flags |= PD_DEREF | PD_DEUREF; + break; } /* Release all the prison locks. */ + if (flags & PD_LOCKED) + mtx_unlock(&pr->pr_mtx); if (flags & PD_LIST_SLOCKED) sx_sunlock(&allprison_lock); else if (flags & PD_LIST_XLOCKED) @@ -2902,10 +2868,47 @@ prison_deref(struct prison *pr, int flags) if (racct_enable) prison_racct_detach(rpr); #endif + TAILQ_REMOVE(&freeprison, rpr, pr_list); free(rpr, M_PRISON); } } +/* + * Given the current locking state in the flags, make sure allprison_lock + * is held exclusive, and the prison is locked. Return flags indicating + * the new state. + */ +static int +prison_lock_xlock(struct prison *pr, int flags) +{ + + if (!(flags & PD_LIST_XLOCKED)) { + /* + * Get allprison_lock, which may be an upgrade, + * and may require unlocking the prison. + */ + if (flags & PD_LOCKED) { + mtx_unlock(&pr->pr_mtx); + flags &= ~PD_LOCKED; + } + if (flags & PD_LIST_SLOCKED) { + if (!sx_try_upgrade(&allprison_lock)) { + sx_sunlock(&allprison_lock); + sx_xlock(&allprison_lock); + } + flags &= ~PD_LIST_SLOCKED; + } else + sx_xlock(&allprison_lock); + flags |= PD_LIST_XLOCKED; + } + if (!(flags & PD_LOCKED)) { + /* Lock the prison mutex. */ + mtx_lock(&pr->pr_mtx); + flags |= PD_LOCKED; + } + return flags; +} + /* * Set or clear a permission bit in the pr_allow field, passing restrictions * (cleared permission) down to child jails. @@ -3068,15 +3071,13 @@ prison_ischild(struct prison *pr1, struct prison *pr2) } /* - * Return true if the prison is currently alive. A prison is alive if it is - * valid and holds user references, and it isn't being removed. + * Return true if the prison is currently alive. A prison is alive if it + * holds user references and it isn't being removed. */ bool prison_isalive(struct prison *pr) { - if (__predict_false(refcount_load(&pr->pr_ref) == 0)) - return (false); if (__predict_false(refcount_load(&pr->pr_uref) == 0)) return (false); if (__predict_false(pr->pr_flags & PR_REMOVE)) @@ -3087,7 +3088,9 @@ prison_isalive(struct prison *pr) /* * Return true if the prison is currently valid. A prison is valid if it has * been fully created, and is not being destroyed. Note that dying prisons - * are still considered valid. + * are still considered valid. Invalid prisons won't be found under normal + * circumstances, as they're only put in that state by functions that have + * an exclusive hold on allprison_lock. */ bool prison_isvalid(struct prison *pr) @@ -3754,10 +3757,6 @@ sysctl_jail_list(SYSCTL_HANDLER_ARGS) cpr->pr_ip6s * sizeof(struct in6_addr)); } #endif - if (!prison_isvalid(cpr)) { - mtx_unlock(&cpr->pr_mtx); - continue; - } bzero(xp, sizeof(*xp)); xp->pr_version = XPRISON_VERSION; xp->pr_id = cpr->pr_id; diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index f048234f3a33..435235f0384d 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -290,7 +290,7 @@ msginit() if (rsv == NULL) rsv = osd_reserve(msg_prison_slot); prison_lock(pr); - if (prison_isvalid(pr) && (pr->pr_allow & PR_ALLOW_SYSVIPC)) { + if (pr->pr_allow & PR_ALLOW_SYSVIPC) { (void)osd_jail_set_reserved(pr, msg_prison_slot, rsv, &prison0); rsv = NULL; diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c index deee60d87a5a..dd8925246d1e 100644 --- a/sys/kern/sysv_sem.c +++ b/sys/kern/sysv_sem.c @@ -321,7 +321,7 @@ seminit(void) if (rsv == NULL) rsv = osd_reserve(sem_prison_slot); prison_lock(pr); - if (prison_isvalid(pr) && (pr->pr_allow & PR_ALLOW_SYSVIPC)) { + if (pr->pr_allow & PR_ALLOW_SYSVIPC) { (void)osd_jail_set_reserved(pr, sem_prison_slot, rsv, &prison0); rsv = NULL; diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index ad5f0030b965..2e7ae927dcc3 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -979,7 +979,7 @@ shminit(void) if (rsv == NULL) rsv = osd_reserve(shm_prison_slot); prison_lock(pr); - if (prison_isvalid(pr) && (pr->pr_allow & PR_ALLOW_SYSVIPC)) { + if (pr->pr_allow & PR_ALLOW_SYSVIPC) { (void)osd_jail_set_reserved(pr, shm_prison_slot, rsv, &prison0); rsv = NULL; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index dc94ce213d08..5c1775a261fc 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -1564,29 +1564,26 @@ mqfs_prison_remove(void *obj, void *data __unused) const struct prison *pr = obj; struct prison *tpr; struct mqfs_node *pn, *tpn; - int found; + struct vnode *pr_root; - found = 0; + pr_root = pr->pr_root; + if (pr->pr_parent->pr_root == pr_root) + return (0); TAILQ_FOREACH(tpr, &allprison, pr_list) { - prison_lock(tpr); - if (tpr != pr && prison_isvalid(tpr) && - tpr->pr_root == pr->pr_root) - found = 1; - prison_unlock(tpr); + if (tpr != pr && tpr->pr_root == pr_root) + return (0); } - if (!found) { - /* - * No jails are rooted in this directory anymore, - * so no queues should be either. - */ - sx_xlock(&mqfs_data.mi_lock); - LIST_FOREACH_SAFE(pn, &mqfs_data.mi_root->mn_children, - mn_sibling, tpn) { - if (pn->mn_pr_root == pr->pr_root) - (void)do_unlink(pn, curthread->td_ucred); - } - sx_xunlock(&mqfs_data.mi_lock); + /* + * No jails are rooted in this directory anymore, + * so no queues should be either. + */ + sx_xlock(&mqfs_data.mi_lock); + LIST_FOREACH_SAFE(pn, &mqfs_data.mi_root->mn_children, + mn_sibling, tpn) { + if (pn->mn_pr_root == pr_root) + (void)do_unlink(pn, curthread->td_ucred); } + sx_xunlock(&mqfs_data.mi_lock); return (0); } diff --git a/sys/sys/jail.h b/sys/sys/jail.h index 2ac6aabdbd43..a48e189729dc 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -155,7 +155,8 @@ struct prison_racct; * (m) locked by pr_mtx * (p) locked by pr_mtx, and also at least shared allprison_lock required * to update - * (r) atomic via refcount(9), pr_mtx required to decrement to zero + * (r) atomic via refcount(9), pr_mtx and allprison_lock required to + * decrement to zero */ struct prison { TAILQ_ENTRY(prison) pr_list; /* (a) all prisons */ From owner-dev-commits-src-all@freebsd.org Sun Feb 21 20:38:09 2021 Return-Path: Delivered-To: dev-commits-src-all@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 5C5075398E4 for ; Sun, 21 Feb 2021 20:38: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 4DkHFY1bP4z3P6l; Sun, 21 Feb 2021 20:38: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 2410B19313; Sun, 21 Feb 2021 20:38: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 11LKc9f6042339; Sun, 21 Feb 2021 20:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LKc9XL042338; Sun, 21 Feb 2021 20:38:09 GMT (envelope-from git) Date: Sun, 21 Feb 2021 20:38:09 GMT Message-Id: <202102212038.11LKc9XL042338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 0626917d0786 - vendor/openzfs - Update vendor/openzfs to master-9312e0fd1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs X-Git-Reftype: branch X-Git-Commit: 0626917d07863899cfee3820aa57c6b7ed4304f4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 20:38:09 -0000 The branch vendor/openzfs has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=0626917d07863899cfee3820aa57c6b7ed4304f4 commit 0626917d07863899cfee3820aa57c6b7ed4304f4 Author: Martin Matuska AuthorDate: 2021-02-21 20:22:07 +0000 Commit: Martin Matuska CommitDate: 2021-02-21 20:22:07 +0000 Update vendor/openzfs to master-9312e0fd1 Notable changes: - fix reporting of mount progress (778869fa1) - disable use of hardware crypto offload drivers on FreeBSD (e7adccf7f) - fix checksum errors not being counted on repeated repair (03e02e5b5) - restore FreeBSD resource usage accounting (64e0fe14f) - fix panic if scrubbing after removing a slog device (11f2e9a49) --- cmd/zfs/zfs_main.c | 3 - cmd/ztest/ztest.c | 113 ++++++++- include/os/freebsd/spl/sys/uio.h | 43 +--- include/os/linux/spl/sys/uio.h | 22 +- include/os/linux/zfs/sys/zfs_context_os.h | 1 - include/sys/Makefile.am | 1 + include/sys/spa.h | 3 +- include/sys/uio_impl.h | 21 +- include/sys/zfs_context.h | 3 +- include/sys/zfs_racct.h | 37 +++ lib/libzpool/Makefile.am | 1 + lib/libzpool/util.c | 74 ++++-- lib/libzutil/os/linux/zutil_device_path_os.c | 252 ++++++++++++--------- module/Makefile.bsd | 1 + module/os/freebsd/spl/spl_uio.c | 9 +- module/os/freebsd/zfs/crypto_os.c | 15 +- module/os/freebsd/zfs/zfs_racct.c | 55 +++++ module/os/linux/zfs/Makefile.in | 1 + module/os/linux/zfs/zfs_racct.c | 36 +++ module/zfs/arc.c | 2 + module/zfs/dmu.c | 5 + module/zfs/dsl_scan.c | 6 +- module/zfs/spa_config.c | 2 +- module/zfs/vdev.c | 9 +- module/zfs/vdev_indirect.c | 10 +- module/zfs/vdev_raidz.c | 20 +- module/zfs/vdev_rebuild.c | 3 + module/zfs/zfs_fm.c | 46 +++- module/zfs/zfs_ioctl.c | 2 +- module/zfs/zfs_vnops.c | 2 +- module/zfs/zio.c | 11 +- scripts/zfs.sh | 2 +- tests/runfiles/common.run | 3 +- .../functional/cli_root/zpool_events/Makefile.am | 3 +- .../zpool_events/zpool_events_clear_retained.ksh | 135 +++++++++++ .../zpool_events/zpool_events_duplicates.ksh | 11 - 36 files changed, 716 insertions(+), 247 deletions(-) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index ab2b006ae460..9a59fddbf06d 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -6912,9 +6912,6 @@ report_mount_progress(int current, int total) time_t now = time(NULL); char info[32]; - /* report 1..n instead of 0..n-1 */ - ++current; - /* display header if we're here for the first time */ if (current == 1) { set_progress_header(gettext("Mounting ZFS filesystems")); diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c index d2bf0101993e..cfa1290d78d1 100644 --- a/cmd/ztest/ztest.c +++ b/cmd/ztest/ztest.c @@ -158,6 +158,9 @@ enum ztest_class_state { ZTEST_VDEV_CLASS_RND }; +#define ZO_GVARS_MAX_ARGLEN ((size_t)64) +#define ZO_GVARS_MAX_COUNT ((size_t)10) + typedef struct ztest_shared_opts { char zo_pool[ZFS_MAX_DATASET_NAME_LEN]; char zo_dir[ZFS_MAX_DATASET_NAME_LEN]; @@ -185,6 +188,8 @@ typedef struct ztest_shared_opts { int zo_mmp_test; int zo_special_vdevs; int zo_dump_dbgmsg; + int zo_gvars_count; + char zo_gvars[ZO_GVARS_MAX_COUNT][ZO_GVARS_MAX_ARGLEN]; } ztest_shared_opts_t; static const ztest_shared_opts_t ztest_opts_defaults = { @@ -212,6 +217,7 @@ static const ztest_shared_opts_t ztest_opts_defaults = { .zo_maxloops = 50, /* max loops during spa_freeze() */ .zo_metaslab_force_ganging = 64 << 10, .zo_special_vdevs = ZTEST_VDEV_CLASS_RND, + .zo_gvars_count = 0, }; extern uint64_t metaslab_force_ganging; @@ -918,8 +924,21 @@ process_options(int argc, char **argv) ztest_parse_name_value(optarg, zo); break; case 'o': - if (set_global_var(optarg) != 0) + if (zo->zo_gvars_count >= ZO_GVARS_MAX_COUNT) { + (void) fprintf(stderr, + "max global var count (%zu) exceeded\n", + ZO_GVARS_MAX_COUNT); + usage(B_FALSE); + } + char *v = zo->zo_gvars[zo->zo_gvars_count]; + if (strlcpy(v, optarg, ZO_GVARS_MAX_ARGLEN) >= + ZO_GVARS_MAX_ARGLEN) { + (void) fprintf(stderr, + "global var option '%s' is too long\n", + optarg); usage(B_FALSE); + } + zo->zo_gvars_count++; break; case 'G': zo->zo_dump_dbgmsg = 1; @@ -6373,6 +6392,75 @@ ztest_fletcher_incr(ztest_ds_t *zd, uint64_t id) } } +static int +ztest_set_global_vars(void) +{ + for (size_t i = 0; i < ztest_opts.zo_gvars_count; i++) { + char *kv = ztest_opts.zo_gvars[i]; + VERIFY3U(strlen(kv), <=, ZO_GVARS_MAX_ARGLEN); + VERIFY3U(strlen(kv), >, 0); + int err = set_global_var(kv); + if (ztest_opts.zo_verbose > 0) { + (void) printf("setting global var %s ... %s\n", kv, + err ? "failed" : "ok"); + } + if (err != 0) { + (void) fprintf(stderr, + "failed to set global var '%s'\n", kv); + return (err); + } + } + return (0); +} + +static char ** +ztest_global_vars_to_zdb_args(void) +{ + char **args = calloc(2*ztest_opts.zo_gvars_count + 1, sizeof (char *)); + char **cur = args; + for (size_t i = 0; i < ztest_opts.zo_gvars_count; i++) { + char *kv = ztest_opts.zo_gvars[i]; + *cur = "-o"; + cur++; + *cur = strdup(kv); + cur++; + } + ASSERT3P(cur, ==, &args[2*ztest_opts.zo_gvars_count]); + *cur = NULL; + return (args); +} + +/* The end of strings is indicated by a NULL element */ +static char * +join_strings(char **strings, const char *sep) +{ + size_t totallen = 0; + for (char **sp = strings; *sp != NULL; sp++) { + totallen += strlen(*sp); + totallen += strlen(sep); + } + if (totallen > 0) { + ASSERT(totallen >= strlen(sep)); + totallen -= strlen(sep); + } + + size_t buflen = totallen + 1; + char *o = malloc(buflen); /* trailing 0 byte */ + o[0] = '\0'; + for (char **sp = strings; *sp != NULL; sp++) { + size_t would; + would = strlcat(o, *sp, buflen); + VERIFY3U(would, <, buflen); + if (*(sp+1) == NULL) { + break; + } + would = strlcat(o, sep, buflen); + VERIFY3U(would, <, buflen); + } + ASSERT3S(strlen(o), ==, totallen); + return (o); +} + static int ztest_check_path(char *path) { @@ -6601,13 +6689,21 @@ ztest_run_zdb(char *pool) ztest_get_zdb_bin(bin, len); - (void) sprintf(zdb, - "%s -bcc%s%s -G -d -Y -e -y -p %s %s", + char **set_gvars_args = ztest_global_vars_to_zdb_args(); + char *set_gvars_args_joined = join_strings(set_gvars_args, " "); + free(set_gvars_args); + + size_t would = snprintf(zdb, len, + "%s -bcc%s%s -G -d -Y -e -y %s -p %s %s", bin, ztest_opts.zo_verbose >= 3 ? "s" : "", ztest_opts.zo_verbose >= 4 ? "v" : "", + set_gvars_args_joined, ztest_opts.zo_dir, pool); + ASSERT3U(would, <, len); + + free(set_gvars_args_joined); if (ztest_opts.zo_verbose >= 5) (void) printf("Executing %s\n", strstr(zdb, "zdb ")); @@ -7727,7 +7823,7 @@ main(int argc, char **argv) char numbuf[NN_NUMBUF_SZ]; char *cmd; boolean_t hasalt; - int f; + int f, err; char *fd_data_str = getenv("ZTEST_FD_DATA"); struct sigaction action; @@ -7794,6 +7890,15 @@ main(int argc, char **argv) } ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count); + err = ztest_set_global_vars(); + if (err != 0 && !fd_data_str) { + /* error message done by ztest_set_global_vars */ + exit(EXIT_FAILURE); + } else { + /* children should not be spawned if setting gvars fails */ + VERIFY3S(err, ==, 0); + } + /* Override location of zpool.cache */ VERIFY3S(asprintf((char **)&spa_config_path, "%s/zpool.cache", ztest_opts.zo_dir), !=, -1); diff --git a/include/os/freebsd/spl/sys/uio.h b/include/os/freebsd/spl/sys/uio.h index f1d30195f048..b71f2f2e5625 100644 --- a/include/os/freebsd/spl/sys/uio.h +++ b/include/os/freebsd/spl/sys/uio.h @@ -55,38 +55,12 @@ typedef struct zfs_uio { #define zfs_uio_fault_disable(u, set) #define zfs_uio_prefaultpages(size, u) (0) - -static __inline void -zfs_uio_init(zfs_uio_t *uio, struct uio *uio_s) -{ - GET_UIO_STRUCT(uio) = uio_s; -} - -static __inline void +static inline void zfs_uio_setoffset(zfs_uio_t *uio, offset_t off) { zfs_uio_offset(uio) = off; } -static __inline int -zfs_uiomove(void *cp, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio) -{ - ASSERT(zfs_uio_rw(uio) == dir); - return (uiomove(cp, (int)n, GET_UIO_STRUCT(uio))); -} - -int zfs_uiocopy(void *p, size_t n, zfs_uio_rw_t rw, zfs_uio_t *uio, - size_t *cbytes); -void zfs_uioskip(zfs_uio_t *uiop, size_t n); -int zfs_uio_fault_move(void *p, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio); - -static inline void -zfs_uio_iov_at_index(zfs_uio_t *uio, uint_t idx, void **base, uint64_t *len) -{ - *base = zfs_uio_iovbase(uio, idx); - *len = zfs_uio_iovlen(uio, idx); -} - static inline void zfs_uio_advance(zfs_uio_t *uio, size_t size) { @@ -94,19 +68,14 @@ zfs_uio_advance(zfs_uio_t *uio, size_t size) zfs_uio_offset(uio) += size; } -static inline offset_t -zfs_uio_index_at_offset(zfs_uio_t *uio, offset_t off, uint_t *vec_idx) +static __inline void +zfs_uio_init(zfs_uio_t *uio, struct uio *uio_s) { - *vec_idx = 0; - while (*vec_idx < zfs_uio_iovcnt(uio) && - off >= zfs_uio_iovlen(uio, *vec_idx)) { - off -= zfs_uio_iovlen(uio, *vec_idx); - (*vec_idx)++; - } - - return (off); + GET_UIO_STRUCT(uio) = uio_s; } +int zfs_uio_fault_move(void *p, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio); + #endif /* !_STANDALONE */ #endif /* !_OPENSOLARIS_SYS_UIO_H_ */ diff --git a/include/os/linux/spl/sys/uio.h b/include/os/linux/spl/sys/uio.h index 0deed3c5736d..66af2b0b534c 100644 --- a/include/os/linux/spl/sys/uio.h +++ b/include/os/linux/spl/sys/uio.h @@ -78,19 +78,14 @@ typedef struct zfs_uio { #define zfs_uio_rlimit_fsize(z, u) (0) #define zfs_uio_fault_move(p, n, rw, u) zfs_uiomove((p), (n), (rw), (u)) +extern int zfs_uio_prefaultpages(ssize_t, zfs_uio_t *); + static inline void zfs_uio_setoffset(zfs_uio_t *uio, offset_t off) { uio->uio_loffset = off; } -static inline void -zfs_uio_iov_at_index(zfs_uio_t *uio, uint_t idx, void **base, uint64_t *len) -{ - *base = zfs_uio_iovbase(uio, idx); - *len = zfs_uio_iovlen(uio, idx); -} - static inline void zfs_uio_advance(zfs_uio_t *uio, size_t size) { @@ -98,19 +93,6 @@ zfs_uio_advance(zfs_uio_t *uio, size_t size) uio->uio_loffset += size; } -static inline offset_t -zfs_uio_index_at_offset(zfs_uio_t *uio, offset_t off, uint_t *vec_idx) -{ - *vec_idx = 0; - while (*vec_idx < zfs_uio_iovcnt(uio) && - off >= zfs_uio_iovlen(uio, *vec_idx)) { - off -= zfs_uio_iovlen(uio, *vec_idx); - (*vec_idx)++; - } - - return (off); -} - static inline void zfs_uio_iovec_init(zfs_uio_t *uio, const struct iovec *iov, unsigned long nr_segs, offset_t offset, zfs_uio_seg_t seg, ssize_t resid, diff --git a/include/os/linux/zfs/sys/zfs_context_os.h b/include/os/linux/zfs/sys/zfs_context_os.h index 9e5fdd79f019..de7015b929b6 100644 --- a/include/os/linux/zfs/sys/zfs_context_os.h +++ b/include/os/linux/zfs/sys/zfs_context_os.h @@ -23,7 +23,6 @@ #ifndef ZFS_CONTEXT_OS_H #define ZFS_CONTEXT_OS_H -#include #include #include diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am index c3ebf17b5288..385c82c926ae 100644 --- a/include/sys/Makefile.am +++ b/include/sys/Makefile.am @@ -111,6 +111,7 @@ COMMON_H = \ zfs_fuid.h \ zfs_project.h \ zfs_quota.h \ + zfs_racct.h \ zfs_ratelimit.h \ zfs_refcount.h \ zfs_rlock.h \ diff --git a/include/sys/spa.h b/include/sys/spa.h index 0762ae8a3e13..8391be8328b6 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2011, 2020 by Delphix. All rights reserved. + * Copyright (c) 2011, 2021 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. * Copyright 2013 Saso Kiselkov. All rights reserved. @@ -1150,6 +1150,7 @@ extern int zfs_ereport_post(const char *clazz, spa_t *spa, vdev_t *vd, extern boolean_t zfs_ereport_is_valid(const char *clazz, spa_t *spa, vdev_t *vd, zio_t *zio); extern void zfs_ereport_taskq_fini(void); +extern void zfs_ereport_clear(spa_t *spa, vdev_t *vd); extern nvlist_t *zfs_event_create(spa_t *spa, vdev_t *vd, const char *type, const char *name, nvlist_t *aux); extern void zfs_post_remove(spa_t *spa, vdev_t *vd); diff --git a/include/sys/uio_impl.h b/include/sys/uio_impl.h index be70cea54818..cde3ef40485b 100644 --- a/include/sys/uio_impl.h +++ b/include/sys/uio_impl.h @@ -42,8 +42,27 @@ #include extern int zfs_uiomove(void *, size_t, zfs_uio_rw_t, zfs_uio_t *); -extern int zfs_uio_prefaultpages(ssize_t, zfs_uio_t *); extern int zfs_uiocopy(void *, size_t, zfs_uio_rw_t, zfs_uio_t *, size_t *); extern void zfs_uioskip(zfs_uio_t *, size_t); +static inline void +zfs_uio_iov_at_index(zfs_uio_t *uio, uint_t idx, void **base, uint64_t *len) +{ + *base = zfs_uio_iovbase(uio, idx); + *len = zfs_uio_iovlen(uio, idx); +} + +static inline offset_t +zfs_uio_index_at_offset(zfs_uio_t *uio, offset_t off, uint_t *vec_idx) +{ + *vec_idx = 0; + while (*vec_idx < zfs_uio_iovcnt(uio) && + off >= zfs_uio_iovlen(uio, *vec_idx)) { + off -= zfs_uio_iovlen(uio, *vec_idx); + (*vec_idx)++; + } + + return (off); +} + #endif /* _SYS_UIO_IMPL_H */ diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index ee3216d6763a..6cdcc6d30966 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -72,6 +72,7 @@ extern "C" { #include #include #include +#include #include #else /* _KERNEL || _STANDALONE */ @@ -652,7 +653,7 @@ extern void random_fini(void); struct spa; extern void show_pool_stats(struct spa *); -extern int set_global_var(char *arg); +extern int set_global_var(char const *arg); typedef struct callb_cpr { kmutex_t *cc_lockp; diff --git a/include/sys/zfs_racct.h b/include/sys/zfs_racct.h new file mode 100644 index 000000000000..cfcdd336ea42 --- /dev/null +++ b/include/sys/zfs_racct.h @@ -0,0 +1,37 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Portions Copyright 2021 iXsystems, Inc. + */ + +#ifndef _SYS_ZFS_RACCT_H +#define _SYS_ZFS_RACCT_H + +#include + +/* + * Platform-dependent resource accounting hooks + */ +void zfs_racct_read(uint64_t size, uint64_t iops); +void zfs_racct_write(uint64_t size, uint64_t iops); + +#endif /* _SYS_ZFS_RACCT_H */ diff --git a/lib/libzpool/Makefile.am b/lib/libzpool/Makefile.am index 04ef34ebfa1b..929f5bed8b2f 100644 --- a/lib/libzpool/Makefile.am +++ b/lib/libzpool/Makefile.am @@ -163,6 +163,7 @@ KERNEL_C = \ zfs_debug.c \ zfs_fm.c \ zfs_fuid.c \ + zfs_racct.c \ zfs_sa.c \ zfs_znode.c \ zfs_ratelimit.c \ diff --git a/lib/libzpool/util.c b/lib/libzpool/util.c index ebfaa9b41a2a..2da2375a1d2d 100644 --- a/lib/libzpool/util.c +++ b/lib/libzpool/util.c @@ -148,18 +148,54 @@ show_pool_stats(spa_t *spa) nvlist_free(config); } +/* *k_out must be freed by the caller */ +static int +set_global_var_parse_kv(const char *arg, char **k_out, u_longlong_t *v_out) +{ + int err; + VERIFY(arg); + char *d = strdup(arg); + + char *save = NULL; + char *k = strtok_r(d, "=", &save); + char *v_str = strtok_r(NULL, "=", &save); + char *follow = strtok_r(NULL, "=", &save); + if (k == NULL || v_str == NULL || follow != NULL) { + err = EINVAL; + goto err_free; + } + + u_longlong_t val = strtoull(v_str, NULL, 0); + if (val > UINT32_MAX) { + fprintf(stderr, "Value for global variable '%s' must " + "be a 32-bit unsigned integer, got '%s'\n", k, v_str); + err = EOVERFLOW; + goto err_free; + } + + *k_out = k; + *v_out = val; + return (0); + +err_free: + free(k); + + return (err); +} + /* * Sets given global variable in libzpool to given unsigned 32-bit value. * arg: "=" */ int -set_global_var(char *arg) +set_global_var(char const *arg) { void *zpoolhdl; - char *varname = arg, *varval; + char *varname; u_longlong_t val; + int ret; -#ifndef _LITTLE_ENDIAN +#ifndef _ZFS_LITTLE_ENDIAN /* * On big endian systems changing a 64-bit variable would set the high * 32 bits instead of the low 32 bits, which could cause unexpected @@ -167,19 +203,12 @@ set_global_var(char *arg) */ fprintf(stderr, "Setting global variables is only supported on " "little-endian systems\n"); - return (ENOTSUP); + ret = ENOTSUP; + goto out_ret; #endif - if (arg != NULL && (varval = strchr(arg, '=')) != NULL) { - *varval = '\0'; - varval++; - val = strtoull(varval, NULL, 0); - if (val > UINT32_MAX) { - fprintf(stderr, "Value for global variable '%s' must " - "be a 32-bit unsigned integer\n", varname); - return (EOVERFLOW); - } - } else { - return (EINVAL); + + if ((ret = set_global_var_parse_kv(arg, &varname, &val)) != 0) { + goto out_ret; } zpoolhdl = dlopen("libzpool.so", RTLD_LAZY); @@ -189,18 +218,25 @@ set_global_var(char *arg) if (var == NULL) { fprintf(stderr, "Global variable '%s' does not exist " "in libzpool.so\n", varname); - return (EINVAL); + ret = EINVAL; + goto out_dlclose; } *var = (uint32_t)val; - dlclose(zpoolhdl); } else { fprintf(stderr, "Failed to open libzpool.so to set global " "variable\n"); - return (EIO); + ret = EIO; + goto out_dlclose; } - return (0); + ret = 0; + +out_dlclose: + dlclose(zpoolhdl); + free(varname); +out_ret: + return (ret); } static nvlist_t * diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c index 36331fd72bf7..1f767bb7a6e7 100644 --- a/lib/libzutil/os/linux/zutil_device_path_os.c +++ b/lib/libzutil/os/linux/zutil_device_path_os.c @@ -154,15 +154,124 @@ zfs_strip_path(char *path) return (strrchr(path, '/') + 1); } +/* + * Given a dev name like "sda", return the full enclosure sysfs path to + * the disk. You can also pass in the name with "/dev" prepended + * to it (like /dev/sda). + * + * For example, disk "sda" in enclosure slot 1: + * dev: "sda" + * returns: "/sys/class/enclosure/1:0:3:0/Slot 1" + * + * 'dev' must be a non-devicemapper device. + * + * Returned string must be freed. + */ +char * +zfs_get_enclosure_sysfs_path(const char *dev_name) +{ + DIR *dp = NULL; + struct dirent *ep; + char buf[MAXPATHLEN]; + char *tmp1 = NULL; + char *tmp2 = NULL; + char *tmp3 = NULL; + char *path = NULL; + size_t size; + int tmpsize; + + if (dev_name == NULL) + return (NULL); + + /* If they preface 'dev' with a path (like "/dev") then strip it off */ + tmp1 = strrchr(dev_name, '/'); + if (tmp1 != NULL) + dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ + + tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); + if (tmpsize == -1 || tmp1 == NULL) { + tmp1 = NULL; + goto end; + } + + dp = opendir(tmp1); + if (dp == NULL) { + tmp1 = NULL; /* To make free() at the end a NOP */ + goto end; + } + + /* + * Look though all sysfs entries in /sys/block//device for + * the enclosure symlink. + */ + while ((ep = readdir(dp))) { + /* Ignore everything that's not our enclosure_device link */ + if (strstr(ep->d_name, "enclosure_device") == NULL) + continue; + + if (asprintf(&tmp2, "%s/%s", tmp1, ep->d_name) == -1 || + tmp2 == NULL) + break; + + size = readlink(tmp2, buf, sizeof (buf)); + + /* Did readlink fail or crop the link name? */ + if (size == -1 || size >= sizeof (buf)) { + free(tmp2); + tmp2 = NULL; /* To make free() at the end a NOP */ + break; + } + + /* + * We got a valid link. readlink() doesn't terminate strings + * so we have to do it. + */ + buf[size] = '\0'; + + /* + * Our link will look like: + * + * "../../../../port-11:1:2/..STUFF../enclosure/1:0:3:0/SLOT 1" + * + * We want to grab the "enclosure/1:0:3:0/SLOT 1" part + */ + tmp3 = strstr(buf, "enclosure"); + if (tmp3 == NULL) + break; + + if (asprintf(&path, "/sys/class/%s", tmp3) == -1) { + /* If asprintf() fails, 'path' is undefined */ + path = NULL; + break; + } + + if (path == NULL) + break; + } + +end: + free(tmp2); + free(tmp1); + + if (dp != NULL) + closedir(dp); + + return (path); +} + /* * Allocate and return the underlying device name for a device mapper device. - * If a device mapper device maps to multiple devices, return the first device. * * For example, dm_name = "/dev/dm-0" could return "/dev/sda". Symlinks to a * DM device (like /dev/disk/by-vdev/A0) are also allowed. * - * Returns device name, or NULL on error or no match. If dm_name is not a DM - * device then return NULL. + * If the DM device has multiple underlying devices (like with multipath + * DM devices), then favor underlying devices that have a symlink back to their + * back to their enclosure device in sysfs. This will be useful for the + * zedlet scripts that toggle the fault LED. + * + * Returns an underlying device name, or NULL on error or no match. If dm_name + * is not a DM device then return NULL. * * NOTE: The returned name string must be *freed*. */ @@ -176,6 +285,8 @@ dm_get_underlying_path(const char *dm_name) char *path = NULL; char *dev_str; int size; + char *first_path = NULL; + char *enclosure_path; if (dm_name == NULL) return (NULL); @@ -204,13 +315,27 @@ dm_get_underlying_path(const char *dm_name) goto end; /* - * Return first entry (that isn't itself a directory) in the - * directory containing device-mapper dependent (underlying) - * devices. + * A device-mapper device can have multiple paths to it (multipath). + * Favor paths that have a symlink back to their enclosure device. + * We have to do this since some enclosures may only provide a symlink + * back for one underlying path to a disk and not the other. + * + * If no paths have links back to their enclosure, then just return the + * first path. */ while ((ep = readdir(dp))) { if (ep->d_type != DT_DIR) { /* skip "." and ".." dirs */ + if (!first_path) + first_path = strdup(ep->d_name); + + enclosure_path = + zfs_get_enclosure_sysfs_path(ep->d_name); + + if (!enclosure_path) + continue; + size = asprintf(&path, "/dev/%s", ep->d_name); + free(enclosure_path); break; } } @@ -220,6 +345,17 @@ end: closedir(dp); free(tmp); free(realp); + + if (!path) { + /* + * None of the underlying paths had a link back to their + * enclosure devices. Throw up out hands and return the first + * underlying path. + */ + size = asprintf(&path, "/dev/%s", first_path); + } + + free(first_path); return (path); } @@ -331,110 +467,6 @@ zfs_get_underlying_path(const char *dev_name) return (name); } -/* - * Given a dev name like "sda", return the full enclosure sysfs path to - * the disk. You can also pass in the name with "/dev" prepended - * to it (like /dev/sda). - * - * For example, disk "sda" in enclosure slot 1: - * dev: "sda" - * returns: "/sys/class/enclosure/1:0:3:0/Slot 1" - * - * 'dev' must be a non-devicemapper device. - * - * Returned string must be freed. - */ -char * -zfs_get_enclosure_sysfs_path(const char *dev_name) -{ - DIR *dp = NULL; - struct dirent *ep; - char buf[MAXPATHLEN]; - char *tmp1 = NULL; - char *tmp2 = NULL; - char *tmp3 = NULL; - char *path = NULL; - size_t size; - int tmpsize; - - if (dev_name == NULL) - return (NULL); - - /* If they preface 'dev' with a path (like "/dev") then strip it off */ - tmp1 = strrchr(dev_name, '/'); - if (tmp1 != NULL) - dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ - - tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); - if (tmpsize == -1 || tmp1 == NULL) { - tmp1 = NULL; - goto end; - } - - dp = opendir(tmp1); - if (dp == NULL) { - tmp1 = NULL; /* To make free() at the end a NOP */ - goto end; - } - - /* - * Look though all sysfs entries in /sys/block//device for - * the enclosure symlink. - */ - while ((ep = readdir(dp))) { - /* Ignore everything that's not our enclosure_device link */ - if (strstr(ep->d_name, "enclosure_device") == NULL) - continue; - - if (asprintf(&tmp2, "%s/%s", tmp1, ep->d_name) == -1 || - tmp2 == NULL) - break; - - size = readlink(tmp2, buf, sizeof (buf)); - - /* Did readlink fail or crop the link name? */ - if (size == -1 || size >= sizeof (buf)) { - free(tmp2); - tmp2 = NULL; /* To make free() at the end a NOP */ - break; - } - - /* - * We got a valid link. readlink() doesn't terminate strings - * so we have to do it. - */ - buf[size] = '\0'; - - /* - * Our link will look like: - * - * "../../../../port-11:1:2/..STUFF../enclosure/1:0:3:0/SLOT 1" - * - * We want to grab the "enclosure/1:0:3:0/SLOT 1" part - */ - tmp3 = strstr(buf, "enclosure"); - if (tmp3 == NULL) - break; - - if (asprintf(&path, "/sys/class/%s", tmp3) == -1) { - /* If asprintf() fails, 'path' is undefined */ - path = NULL; - break; - } - - if (path == NULL) - break; - } - -end: - free(tmp2); - free(tmp1); - - if (dp != NULL) - closedir(dp); - - return (path); -} #ifdef HAVE_LIBUDEV diff --git a/module/Makefile.bsd b/module/Makefile.bsd index e7cddcc5bb5e..8aa4ed22275e 100644 --- a/module/Makefile.bsd +++ b/module/Makefile.bsd @@ -153,6 +153,7 @@ SRCS+= abd_os.c \ zfs_dir.c \ zfs_ioctl_compat.c \ zfs_ioctl_os.c \ + zfs_racct.c \ zfs_vfsops.c \ zfs_vnops_os.c \ zfs_znode.c \ diff --git a/module/os/freebsd/spl/spl_uio.c b/module/os/freebsd/spl/spl_uio.c index f5f3524f7b9d..59a781ee1b64 100644 --- a/module/os/freebsd/spl/spl_uio.c +++ b/module/os/freebsd/spl/spl_uio.c @@ -41,10 +41,17 @@ */ #include -#include +#include #include #include +int +zfs_uiomove(void *cp, size_t n, zfs_uio_rw_t dir, zfs_uio_t *uio) +{ + ASSERT(zfs_uio_rw(uio) == dir); + return (uiomove(cp, (int)n, GET_UIO_STRUCT(uio))); +} + /* * same as zfs_uiomove() but doesn't modify uio structure. * return in cbytes how many bytes were copied. diff --git a/module/os/freebsd/zfs/crypto_os.c b/module/os/freebsd/zfs/crypto_os.c index fbf998416234..03d14ed7cf5c 100644 --- a/module/os/freebsd/zfs/crypto_os.c +++ b/module/os/freebsd/zfs/crypto_os.c @@ -293,8 +293,19 @@ freebsd_crypt_newsession(freebsd_crypt_session_t *sessp, error = ENOTSUP; goto bad; } - error = crypto_newsession(&sessp->fs_sid, &csp, - CRYPTOCAP_F_HARDWARE | CRYPTOCAP_F_SOFTWARE); + + /* + * Disable the use of hardware drivers on FreeBSD 13 and later since + * common crypto offload drivers impose constraints on AES-GCM AAD + * lengths that make them unusable for ZFS, and we currently do not have *** 669 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sun Feb 21 20:43:06 2021 Return-Path: Delivered-To: dev-commits-src-all@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 7783D539AF1; Sun, 21 Feb 2021 20:43:06 +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 4DkHMG310Qz3Phd; Sun, 21 Feb 2021 20:43:06 +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 5A0ED1917C; Sun, 21 Feb 2021 20:43:06 +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 11LKh6Fq055038; Sun, 21 Feb 2021 20:43:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LKh6HB055037; Sun, 21 Feb 2021 20:43:06 GMT (envelope-from git) Date: Sun, 21 Feb 2021 20:43:06 GMT Message-Id: <202102212043.11LKh6HB055037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 26b11d047d20 - releng/13.0 - libpmc: fix linking with C programs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 26b11d047d207d9d8859a03e582efc0c01c64f85 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 20:43:06 -0000 The branch releng/13.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=26b11d047d207d9d8859a03e582efc0c01c64f85 commit 26b11d047d207d9d8859a03e582efc0c01c64f85 Author: Alan Somers AuthorDate: 2021-02-15 22:51:31 +0000 Commit: Alan Somers CommitDate: 2021-02-21 20:42:51 +0000 libpmc: fix linking with C programs Revision r334749 Added some C++ code to libpmc. It didn't change the ABI, but it did introduce a dependency on libc++. Nobody noticed because every program that in the base system that uses libpmc is also C++. Approved by: re (gjb) Reported-by: Dom Dwyer Reviewed By: vangyzen MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D28550 (cherry picked from commit 04e34c0202ea50cea67d5779f54bc612c74e6532) --- lib/libpmc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile index 01554e9b1526..42aa14e58471 100644 --- a/lib/libpmc/Makefile +++ b/lib/libpmc/Makefile @@ -6,6 +6,7 @@ SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json.cc INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${SRCTOP}/${RELDIR:H}/libpmcstat +LDADD+= -lc++ .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \ ${MACHINE_ARCH} == "i386" From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:03:56 2021 Return-Path: Delivered-To: dev-commits-src-all@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 BB99A53B5F5; Sun, 21 Feb 2021 21:03:56 +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 4DkHqJ4wM5z3hST; Sun, 21 Feb 2021 21:03:56 +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 9B7841999B; Sun, 21 Feb 2021 21:03:56 +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 11LL3uN1081833; Sun, 21 Feb 2021 21:03:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LL3uBQ081832; Sun, 21 Feb 2021 21:03:56 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:03:56 GMT Message-Id: <202102212103.11LL3uBQ081832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 07efb4cef7be - releng/13.0 - arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 07efb4cef7be8336b272869cf9a68c817445983a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:03:56 -0000 The branch releng/13.0 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=07efb4cef7be8336b272869cf9a68c817445983a commit 07efb4cef7be8336b272869cf9a68c817445983a Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:11:36 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-21 21:02:47 +0000 arm64: rpi4: firmware: Attach at BUS_PASS_BUS + BUS_PASS_ORDER_LATE The node have now a compatible with simple-mfd so we need to attach at the same pass so the specific driver will be used. Approved by: re (gjb) MFC after: 3 days PR: 252971 (cherry picked from commit 1cf282363101f5d99b1dadfb0d3250bbe6f482a5) (cherry picked from commit 944f4316558055a2bb6481048386e94b523ab48c) --- sys/arm/broadcom/bcm2835/bcm2835_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c index 1a061e60a823..03eb4878d23a 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_firmware.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_firmware.c @@ -180,5 +180,5 @@ DEFINE_CLASS_1(bcm2835_firmware, bcm2835_firmware_driver, simplebus_driver); EARLY_DRIVER_MODULE(bcm2835_firmware, simplebus, bcm2835_firmware_driver, - bcm2835_firmware_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_LAST); + bcm2835_firmware_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_LATE); MODULE_DEPEND(bcm2835_firmware, mbox, 1, 1, 1); From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:03:57 2021 Return-Path: Delivered-To: dev-commits-src-all@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 DF52F53B98E; Sun, 21 Feb 2021 21: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 4DkHqK5Sbwz3hYR; Sun, 21 Feb 2021 21: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 ADCE8197B3; Sun, 21 Feb 2021 21: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 11LL3vmX081854; Sun, 21 Feb 2021 21: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 11LL3vSv081853; Sun, 21 Feb 2021 21:03:57 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:03:57 GMT Message-Id: <202102212103.11LL3vSv081853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: 1d0d443daa57 - releng/13.0 - arm64: rpi4: gpio: Add brcm, bcm2711-gpio compatible MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.0 X-Git-Reftype: branch X-Git-Commit: 1d0d443daa570c8eaa60ec2c2accbe19554a6c12 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:03:58 -0000 The branch releng/13.0 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=1d0d443daa570c8eaa60ec2c2accbe19554a6c12 commit 1d0d443daa570c8eaa60ec2c2accbe19554a6c12 Author: Emmanuel Vadot AuthorDate: 2021-02-17 12:12:45 +0000 Commit: Emmanuel Vadot CommitDate: 2021-02-21 21:03:14 +0000 arm64: rpi4: gpio: Add brcm,bcm2711-gpio compatible Looks like we never enabled the main gpio controller on the RPI4 board. Now gpio are usable. Approved by: re (gjb) MFC after: 3 days (cherry picked from commit 2551d928501fb613dba09b7ffe7e383dba276ca6) (cherry picked from commit 796faf365c0ea0f50f5138ff8fa62fe48ff3ef71) --- sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 61513df9c008..70b69eb154e8 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -157,6 +157,7 @@ enum bcm_gpio_pud { static struct ofw_compat_data compat_data[] = { {"broadcom,bcm2835-gpio", 1}, {"brcm,bcm2835-gpio", 1}, + {"brcm,bcm2711-gpio", 1}, {NULL, 0} }; From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:10:32 2021 Return-Path: Delivered-To: dev-commits-src-all@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 997DF53BD0A; Sun, 21 Feb 2021 21:10: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 4DkHyw3y23z3hk4; Sun, 21 Feb 2021 21:10: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 7A9AE19823; Sun, 21 Feb 2021 21:10: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 11LLAW6X090316; Sun, 21 Feb 2021 21:10:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LLAWcX090315; Sun, 21 Feb 2021 21:10:32 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:10:32 GMT Message-Id: <202102212110.11LLAWcX090315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ee9b37ae5c11 - main - jail: fix build after the previous commit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee9b37ae5c115c41835119bb5c9d2e14c83abd65 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:10:32 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ee9b37ae5c115c41835119bb5c9d2e14c83abd65 commit ee9b37ae5c115c41835119bb5c9d2e14c83abd65 Author: Mateusz Guzik AuthorDate: 2021-02-21 19:57:21 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-21 21:05:25 +0000 jail: fix build after the previous commit Noted by: Michael Butler --- sys/kern/kern_jail.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 48c91a95bf1a..342af50462f2 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -2671,7 +2671,7 @@ prison_free_not_last(struct prison *pr) ("prison_free_not_last freed last ref on prison %p (jid=%d).", pr, pr->pr_id)); #else - refcount_release(&pr>pr_ref); + refcount_release(&pr->pr_ref); #endif } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:10:33 2021 Return-Path: Delivered-To: dev-commits-src-all@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 B44A953BB55; Sun, 21 Feb 2021 21:10: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 4DkHyx4nWXz3hxD; Sun, 21 Feb 2021 21:10: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 973BB19824; Sun, 21 Feb 2021 21:10: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 11LLAXkT090339; Sun, 21 Feb 2021 21:10:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LLAXgh090338; Sun, 21 Feb 2021 21:10:33 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:10:33 GMT Message-Id: <202102212110.11LLAXgh090338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 2443068d4860 - main - vfs: shrink struct vnode to 448 bytes on LP64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2443068d486020ed9a4250e0d3b28168c40f741a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:10:33 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=2443068d486020ed9a4250e0d3b28168c40f741a commit 2443068d486020ed9a4250e0d3b28168c40f741a Author: Mateusz Guzik AuthorDate: 2021-02-21 19:48:49 +0000 Commit: Mateusz Guzik CommitDate: 2021-02-21 21:07:14 +0000 vfs: shrink struct vnode to 448 bytes on LP64 ... by moving v_hash into a 4 byte hole. Combined with several previous size reductions this makes the size small enough to fit 9 vnodes per page as opposed to 8. Add a compilation time assert so that this is not unknowingly worsened. Note the structure still remains bigger than it should be. --- sys/sys/vnode.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index d71f3bfcb817..0e46bea14b64 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -109,6 +109,7 @@ struct vnode { short v_irflag; /* i frequently read flags */ seqc_t v_seqc; /* i modification count */ uint32_t v_nchash; /* u namecache hash */ + u_int v_hash; struct vop_vector *v_op; /* u vnode operations vector */ void *v_data; /* u private data for fs */ @@ -172,9 +173,19 @@ struct vnode { int v_writecount; /* I ref count of writers or (negative) text users */ int v_seqc_users; /* i modifications pending */ - u_int v_hash; }; +#ifndef DEBUG_LOCKS +#ifdef _LP64 +/* + * Not crossing 448 bytes fits 9 vnodes per page. If you have to add fields + * to the structure and there is nothing which can be done to prevent growth + * then so be it. But don't grow it without a good reason. + */ +_Static_assert(sizeof(struct vnode) <= 448, "vnode size crosses 448 bytes"); +#endif +#endif + #endif /* defined(_KERNEL) || defined(_KVM_VNODE) */ #define bo2vnode(bo) __containerof((bo), struct vnode, v_bufobj) From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:25:26 2021 Return-Path: Delivered-To: dev-commits-src-all@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 26EB153C2BD; Sun, 21 Feb 2021 21:25:26 +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 4DkJJ60gHtz3jnc; Sun, 21 Feb 2021 21:25: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 09D7419D33; Sun, 21 Feb 2021 21:25: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 11LLPPmm008563; Sun, 21 Feb 2021 21:25:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LLPPV7008562; Sun, 21 Feb 2021 21:25:25 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:25:25 GMT Message-Id: <202102212125.11LLPPV7008562@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: 1158508a8086 - main - jail: Add pr_state to struct prison MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1158508a8086a1a93492c1a2e22b61cd7fee4ec7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:25:26 -0000 The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=1158508a8086a1a93492c1a2e22b61cd7fee4ec7 commit 1158508a8086a1a93492c1a2e22b61cd7fee4ec7 Author: Jamie Gritton AuthorDate: 2021-02-21 21:24:47 +0000 Commit: Jamie Gritton CommitDate: 2021-02-21 21:24:47 +0000 jail: Add pr_state to struct prison Rather that using references (pr_ref and pr_uref) to deduce the state of a prison, keep track of its state explicitly. A prison is either "invalid" (pr_ref == 0), "alive" (pr_uref > 0) or "dying" (pr_uref == 0). State transitions are generally tied to the reference counts, but with some flexibility: a new prison is "invalid" even though it now starts with a reference, and jail_remove(2) sets the state to "dying" before the user reference count drops to zero (which was prviously accomplished via the PR_REMOVE flag). pr_state is protected by both the prison mutex and allprison_lock, so it has the same availablity guarantees as the reference counts do. Differential Revision: https://reviews.freebsd.org/D27876 --- sys/kern/kern_jail.c | 102 +++++++++++++++++++++++++++------------------------ sys/sys/jail.h | 14 +++++-- 2 files changed, 65 insertions(+), 51 deletions(-) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 342af50462f2..1ddfe3c3df5f 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -106,6 +106,7 @@ struct prison prison0 = { .pr_path = "/", .pr_securelevel = -1, .pr_devfs_rsnum = 0, + .pr_state = PRISON_STATE_ALIVE, .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(prison0.pr_children), @@ -663,7 +664,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } ch_flags |= jsf->new | jsf->disable; } - if ((flags & (JAIL_CREATE | JAIL_UPDATE | JAIL_ATTACH)) == JAIL_CREATE + if ((flags & (JAIL_CREATE | JAIL_ATTACH)) == JAIL_CREATE && !(pr_flags & PR_PERSIST)) { error = EINVAL; vfs_opterror(opts, "new jail must persist or attach"); @@ -1198,6 +1199,7 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) /* This brings the parent back to life. */ mtx_lock(&ppr->pr_mtx); refcount_acquire(&ppr->pr_uref); + ppr->pr_state = PRISON_STATE_ALIVE; mtx_unlock(&ppr->pr_mtx); error = osd_jail_call(ppr, PR_METHOD_CREATE, opts); if (error) { @@ -1216,8 +1218,10 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } pr = malloc(sizeof(*pr), M_PRISON, M_WAITOK | M_ZERO); - refcount_init(&pr->pr_ref, 0); + pr->pr_state = PRISON_STATE_INVALID; + refcount_init(&pr->pr_ref, 1); refcount_init(&pr->pr_uref, 0); + drflags |= PD_DEREF; LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); TASK_INIT(&pr->pr_task, 0, prison_complete, pr); @@ -1311,11 +1315,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) mtx_lock(&pr->pr_mtx); drflags |= PD_LOCKED; - /* - * New prisons do not yet have a reference, because we do not - * want others to see the incomplete prison once the - * allprison_lock is downgraded. - */ } else { /* * Grab a reference for existing prisons, to ensure they @@ -1737,14 +1736,17 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) prison_set_allow_locked(pr, tallow, 0); /* * Persistent prisons get an extra reference, and prisons losing their - * persist flag lose that reference. Only do this for existing prisons - * for now, so new ones will remain unseen until after the module - * handlers have completed. + * persist flag lose that reference. */ born = !prison_isalive(pr); - if (!created && (ch_flags & PR_PERSIST & (pr_flags ^ pr->pr_flags))) { + if (ch_flags & PR_PERSIST & (pr_flags ^ pr->pr_flags)) { if (pr_flags & PR_PERSIST) { prison_hold(pr); + /* + * This may make a dead prison alive again, but wait + * to label it as such until after OSD calls have had + * a chance to run (and perhaps to fail). + */ refcount_acquire(&pr->pr_uref); } else { drflags |= PD_DEUREF; @@ -1752,7 +1754,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) } } pr->pr_flags = (pr->pr_flags & ~ch_flags) | pr_flags; - pr->pr_flags &= ~PR_REMOVE; mtx_unlock(&pr->pr_mtx); drflags &= ~PD_LOCKED; @@ -1826,15 +1827,20 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) goto done_deref; } + /* + * A new prison is now ready to be seen; either it has gained a user + * reference via persistence, or is about to gain one via attachment. + */ + if (born) { + drflags = prison_lock_xlock(pr, drflags); + pr->pr_state = PRISON_STATE_ALIVE; + } + /* Attach this process to the prison if requested. */ if (flags & JAIL_ATTACH) { error = do_jail_attach(td, pr, prison_lock_xlock(pr, drflags)); drflags &= ~(PD_LOCKED | PD_LIST_XLOCKED); if (error) { - if (created) { - /* do_jail_attach has removed the prison. */ - pr = NULL; - } vfs_opterror(opts, "attach failed"); goto done_deref; } @@ -1852,22 +1858,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) td->td_retval[0] = pr->pr_id; - if (created) { - /* - * Add a reference to newly created persistent prisons - * (which was not done earlier so that the prison would - * not be publicly visible). - */ - if (pr_flags & PR_PERSIST) { - drflags = prison_lock_xlock(pr, drflags); - refcount_acquire(&pr->pr_ref); - refcount_acquire(&pr->pr_uref); - } else { - /* Non-persistent jails need no further changes. */ - pr = NULL; - } - } - done_deref: /* Release any temporary prison holds and/or locks. */ if (pr != NULL) @@ -2332,7 +2322,7 @@ static void prison_remove_one(struct prison *pr) { struct proc *p; - int drflags; + int was_alive, drflags; drflags = PD_DEREF | PD_LOCKED | PD_LIST_XLOCKED; @@ -2340,7 +2330,8 @@ prison_remove_one(struct prison *pr) * Mark the prison as doomed, so it doesn't accidentally come back * to life. It may still be explicitly brought back by jail_set(2). */ - pr->pr_flags |= PR_REMOVE; + was_alive = pr->pr_state == PRISON_STATE_ALIVE; + pr->pr_state = PRISON_STATE_DYING; /* If the prison was persistent, it is not anymore. */ if (pr->pr_flags & PR_PERSIST) { @@ -2361,9 +2352,14 @@ prison_remove_one(struct prison *pr) return; } + /* Tell modules this prison has died. */ mtx_unlock(&pr->pr_mtx); + drflags &= ~PD_LOCKED; + if (was_alive) + (void)osd_jail_call(pr, PR_METHOD_REMOVE, NULL); + sx_xunlock(&allprison_lock); - drflags &= ~(PD_LOCKED | PD_LIST_XLOCKED); + drflags &= ~PD_LIST_XLOCKED; /* * Kill all processes unfortunate enough to be attached to this prison. */ @@ -2429,7 +2425,7 @@ do_jail_attach(struct thread *td, struct prison *pr, int drflags) * a process root from one prison, but attached to the jail * of another. */ - refcount_acquire(&pr->pr_ref); + prison_hold(pr); refcount_acquire(&pr->pr_uref); drflags |= PD_DEREF | PD_DEUREF; mtx_unlock(&pr->pr_mtx); @@ -2721,6 +2717,12 @@ prison_proc_free(struct prison *pr) * prison_free() won't re-submit the task. */ prison_hold(pr); + mtx_lock(&pr->pr_mtx); + KASSERT(!(pr->pr_flags & PR_COMPLETE_PROC), + ("Redundant last reference in prison_proc_free (jid=%d)", + pr->pr_id)); + pr->pr_flags |= PR_COMPLETE_PROC; + mtx_unlock(&pr->pr_mtx); taskqueue_enqueue(taskqueue_thread, &pr->pr_task); } } @@ -2735,14 +2737,14 @@ prison_complete(void *context, int pending) int drflags; /* - * This could be called to release the last reference, or the - * last user reference; the existence of a user reference implies - * the latter. There will always be a reference to remove, as - * prison_proc_free adds one. + * This could be called to release the last reference, or the last + * user reference (plus the reference held in prison_proc_free). */ drflags = prison_lock_xlock(pr, PD_DEREF); - if (refcount_load(&pr->pr_uref) > 0) + if (pr->pr_flags & PR_COMPLETE_PROC) { + pr->pr_flags &= ~PR_COMPLETE_PROC; drflags |= PD_DEUREF; + } prison_deref(pr, drflags); } @@ -2777,7 +2779,8 @@ prison_deref(struct prison *pr, int flags) flags |= PD_DEREF; } flags = prison_lock_xlock(pr, flags); - if (refcount_release(&pr->pr_uref)) { + if (refcount_release(&pr->pr_uref) && + pr->pr_state == PRISON_STATE_ALIVE) { /* * When the last user references goes, * this becomes a dying prison. @@ -2785,6 +2788,7 @@ prison_deref(struct prison *pr, int flags) KASSERT( refcount_load(&prison0.pr_uref) > 0, ("prison0 pr_uref=0")); + pr->pr_state = PRISON_STATE_DYING; mtx_unlock(&pr->pr_mtx); flags &= ~PD_LOCKED; (void)osd_jail_call(pr, @@ -2812,6 +2816,7 @@ prison_deref(struct prison *pr, int flags) KASSERT( refcount_load(&prison0.pr_ref) != 0, ("prison0 pr_ref=0")); + pr->pr_state = PRISON_STATE_INVALID; TAILQ_REMOVE(&allprison, pr, pr_list); LIST_REMOVE(pr, pr_sibling); TAILQ_INSERT_TAIL(&freeprison, pr, @@ -3078,9 +3083,7 @@ bool prison_isalive(struct prison *pr) { - if (__predict_false(refcount_load(&pr->pr_uref) == 0)) - return (false); - if (__predict_false(pr->pr_flags & PR_REMOVE)) + if (__predict_false(pr->pr_state != PRISON_STATE_ALIVE)) return (false); return (true); } @@ -3096,6 +3099,8 @@ bool prison_isvalid(struct prison *pr) { + if (__predict_false(pr->pr_state == PRISON_STATE_INVALID)) + return (false); if (__predict_false(refcount_load(&pr->pr_ref) == 0)) return (false); return (true); @@ -3760,8 +3765,7 @@ sysctl_jail_list(SYSCTL_HANDLER_ARGS) bzero(xp, sizeof(*xp)); xp->pr_version = XPRISON_VERSION; xp->pr_id = cpr->pr_id; - xp->pr_state = prison_isalive(cpr) - ? PRISON_STATE_ALIVE : PRISON_STATE_DYING; + xp->pr_state = cpr->pr_state; strlcpy(xp->pr_path, prison_path(pr, cpr), sizeof(xp->pr_path)); strlcpy(xp->pr_host, cpr->pr_hostname, sizeof(xp->pr_host)); strlcpy(xp->pr_name, prison_name(pr, cpr), sizeof(xp->pr_name)); @@ -4412,6 +4416,10 @@ db_show_prison(struct prison *pr) db_printf(" parent = %p\n", pr->pr_parent); db_printf(" ref = %d\n", pr->pr_ref); db_printf(" uref = %d\n", pr->pr_uref); + db_printf(" state = %s\n", + pr->pr_state == PRISON_STATE_ALIVE ? "alive" : + pr->pr_state == PRISON_STATE_DYING ? "dying" : + "invalid"); db_printf(" path = %s\n", pr->pr_path); db_printf(" cpuset = %d\n", pr->pr_cpuset ? pr->pr_cpuset->cs_id : -1); diff --git a/sys/sys/jail.h b/sys/sys/jail.h index a48e189729dc..723a1fff0b82 100644 --- a/sys/sys/jail.h +++ b/sys/sys/jail.h @@ -88,9 +88,11 @@ struct xprison { }; #define XPRISON_VERSION 3 -#define PRISON_STATE_INVALID 0 -#define PRISON_STATE_ALIVE 1 -#define PRISON_STATE_DYING 2 +enum prison_state { + PRISON_STATE_INVALID = 0, /* New prison, not ready to be seen */ + PRISON_STATE_ALIVE, /* Current prison, visible to all */ + PRISON_STATE_DYING /* Removed but holding resources, */ +}; /* optionally visible. */ /* * Flags for jail_set and jail_get. @@ -155,6 +157,7 @@ struct prison_racct; * (m) locked by pr_mtx * (p) locked by pr_mtx, and also at least shared allprison_lock required * to update + * (q) locked by both pr_mtx and allprison_lock * (r) atomic via refcount(9), pr_mtx and allprison_lock required to * decrement to zero */ @@ -185,7 +188,8 @@ struct prison { int pr_securelevel; /* (p) securelevel */ int pr_enforce_statfs; /* (p) statfs permission */ int pr_devfs_rsnum; /* (p) devfs ruleset */ - int pr_spare[3]; + enum prison_state pr_state; /* (q) state in life cycle */ + int pr_spare[2]; int pr_osreldate; /* (c) kern.osreldate value */ unsigned long pr_hostid; /* (p) jail hostid */ char pr_name[MAXHOSTNAMELEN]; /* (p) admin jail name */ @@ -222,6 +226,8 @@ struct prison_racct { /* by this jail or an ancestor */ #define PR_IP6 0x04000000 /* IPv6 restricted or disabled */ /* by this jail or an ancestor */ +#define PR_COMPLETE_PROC 0x08000000 /* prison_complete called from */ + /* prison_proc_free, releases uref */ /* * Flags for pr_allow From owner-dev-commits-src-all@freebsd.org Sun Feb 21 21:52:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 62EE653D548; Sun, 21 Feb 2021 21:52: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 4DkJvV2KZYz3lLR; Sun, 21 Feb 2021 21:52: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 428391A2B5; Sun, 21 Feb 2021 21:52: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 11LLqchs047424; Sun, 21 Feb 2021 21:52:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LLqc3Z047423; Sun, 21 Feb 2021 21:52:38 GMT (envelope-from git) Date: Sun, 21 Feb 2021 21:52:38 GMT Message-Id: <202102212152.11LLqc3Z047423@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 2c7dc6bae9fd - main - Refactor CTL datamove KPI. 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/main X-Git-Reftype: branch X-Git-Commit: 2c7dc6bae9fd5c2fa0a65768df8e4e99c2f159f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 21:52:38 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=2c7dc6bae9fd5c2fa0a65768df8e4e99c2f159f1 commit 2c7dc6bae9fd5c2fa0a65768df8e4e99c2f159f1 Author: Alexander Motin AuthorDate: 2021-02-21 21:45:14 +0000 Commit: Alexander Motin CommitDate: 2021-02-21 21:52:33 +0000 Refactor CTL datamove KPI. - Make frontends call unified CTL core method ctl_datamove_done() to report move completion. It allows to reduce code duplication in differerent backends by accounting DMA time in common code. - Add to ctl_datamove_done() and be_move_done() callback samethr argument, reporting whether the callback is called in the same context as ctl_datamove(). It allows for some cases like iSCSI write with immediate data or camsim frontend write save one context switch, since we know that the context is sleepable. - Remove data_move_done() methods from struct ctl_backend_driver, unused since forever. MFC after: 1 month --- sys/cam/ctl/ctl.c | 112 +++++++++++++++++-------------------- sys/cam/ctl/ctl.h | 3 +- sys/cam/ctl/ctl_backend.h | 1 - sys/cam/ctl/ctl_backend_block.c | 64 ++++++--------------- sys/cam/ctl/ctl_backend_ramdisk.c | 36 ++---------- sys/cam/ctl/ctl_frontend_cam_sim.c | 2 +- sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- sys/cam/ctl/ctl_frontend_iscsi.c | 23 ++++---- sys/cam/ctl/ctl_io.h | 2 +- sys/cam/ctl/ctl_tpc_local.c | 2 +- sys/cam/ctl/scsi_ctl.c | 3 +- sys/dev/usb/storage/cfumass.c | 6 +- 12 files changed, 94 insertions(+), 162 deletions(-) diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c index 464fd8dfc25e..9a9ae70c2173 100644 --- a/sys/cam/ctl/ctl.c +++ b/sys/cam/ctl/ctl.c @@ -535,9 +535,9 @@ static void ctl_done_timer_wakeup(void *arg); static void ctl_send_datamove_done(union ctl_io *io, int have_lock); static void ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq); -static int ctl_datamove_remote_dm_write_cb(union ctl_io *io); +static int ctl_datamove_remote_dm_write_cb(union ctl_io *io, bool samethr); static void ctl_datamove_remote_write(union ctl_io *io); -static int ctl_datamove_remote_dm_read_cb(union ctl_io *io); +static int ctl_datamove_remote_dm_read_cb(union ctl_io *io, bool samethr); static void ctl_datamove_remote_read_cb(struct ctl_ha_dt_req *rq); static int ctl_datamove_remote_sgl_setup(union ctl_io *io); static int ctl_datamove_remote_xfer(union ctl_io *io, unsigned command, @@ -736,7 +736,7 @@ ctl_ha_datamove(union ctl_io *io) sizeof(struct ctl_sg_entry) * msg.dt.cur_sg_entries, M_WAITOK) > CTL_HA_STATUS_SUCCESS) { io->io_hdr.port_status = 31341; - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); return; } msg.dt.sent_sg_entries = sg_entries_sent; @@ -753,7 +753,7 @@ ctl_ha_datamove(union ctl_io *io) if (lun) mtx_unlock(&lun->lun_lock); io->io_hdr.port_status = 31342; - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); return; } io->io_hdr.flags &= ~CTL_FLAG_IO_ACTIVE; @@ -5028,7 +5028,7 @@ ctl_lun_capacity_changed(struct ctl_be_lun *be_lun) * make it down to say RAIDCore's configuration code. */ int -ctl_config_move_done(union ctl_io *io) +ctl_config_move_done(union ctl_io *io, bool samethr) { int retval; @@ -5036,18 +5036,6 @@ ctl_config_move_done(union ctl_io *io) KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); - if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, - /*retry_count*/ io->io_hdr.port_status); - } else if (io->scsiio.kern_data_resid != 0 && - (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_invalid_field_ciu(&io->scsiio); - } - if (ctl_debug & CTL_DEBUG_CDB_DATA) ctl_data_print(io); if (((io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_IN) || @@ -12303,7 +12291,7 @@ ctl_handle_isc(union ctl_io *io) ctl_datamove_remote(io); break; case CTL_MSG_DATAMOVE_DONE: /* Only used in XFER mode */ - io->scsiio.be_move_done(io); + ctl_datamove_done(io, false); break; case CTL_MSG_FAILOVER: ctl_failover_lun(io); @@ -12462,6 +12450,45 @@ ctl_datamove_timer_wakeup(void *arg) } #endif /* CTL_IO_DELAY */ +static void +ctl_datamove_done_process(union ctl_io *io) +{ +#ifdef CTL_TIME_IO + struct bintime cur_bt; +#endif + + KASSERT(io->io_hdr.io_type == CTL_IO_SCSI, + ("%s: unexpected I/O type %x", __func__, io->io_hdr.io_type)); + +#ifdef CTL_TIME_IO + getbinuptime(&cur_bt); + bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); + bintime_add(&io->io_hdr.dma_bt, &cur_bt); +#endif + io->io_hdr.num_dmas++; + + if ((io->io_hdr.port_status != 0) && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, + /*retry_count*/ io->io_hdr.port_status); + } else if (io->scsiio.kern_data_resid != 0 && + (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && + ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { + ctl_set_invalid_field_ciu(&io->scsiio); + } else if (ctl_debug & CTL_DEBUG_CDB_DATA) + ctl_data_print(io); +} + +void +ctl_datamove_done(union ctl_io *io, bool samethr) +{ + + ctl_datamove_done_process(io); + io->scsiio.be_move_done(io, samethr); +} + void ctl_datamove(union ctl_io *io) { @@ -12475,39 +12502,7 @@ ctl_datamove(union ctl_io *io) io->scsiio.kern_data_resid = io->scsiio.kern_data_len; #ifdef CTL_TIME_IO - if ((time_uptime - io->io_hdr.start_time) > ctl_time_io_secs) { - char str[256]; - char path_str[64]; - struct sbuf sb; - - ctl_scsi_path_string(io, path_str, sizeof(path_str)); - sbuf_new(&sb, str, sizeof(str), SBUF_FIXEDLEN); - - sbuf_cat(&sb, path_str); - switch (io->io_hdr.io_type) { - case CTL_IO_SCSI: - ctl_scsi_command_string(&io->scsiio, NULL, &sb); - sbuf_printf(&sb, "\n"); - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "Tag: 0x%04x/%d, Prio: %d\n", - io->scsiio.tag_num, io->scsiio.tag_type, - io->scsiio.priority); - break; - case CTL_IO_TASK: - sbuf_printf(&sb, "Task Action: %d Tag: 0x%04x/%d\n", - io->taskio.task_action, - io->taskio.tag_num, io->taskio.tag_type); - break; - default: - panic("%s: Invalid CTL I/O type %d\n", - __func__, io->io_hdr.io_type); - } - sbuf_cat(&sb, path_str); - sbuf_printf(&sb, "ctl_datamove: %jd seconds\n", - (intmax_t)time_uptime - io->io_hdr.start_time); - sbuf_finish(&sb); - printf("%s", sbuf_data(&sb)); - } + getbinuptime(&io->io_hdr.dma_start_bt); #endif /* CTL_TIME_IO */ #ifdef CTL_IO_DELAY @@ -12542,18 +12537,15 @@ ctl_datamove(union ctl_io *io) io->io_hdr.nexus.targ_port, io->io_hdr.nexus.targ_lun); io->io_hdr.port_status = 31337; - /* - * Note that the backend, in this case, will get the - * callback in its context. In other cases it may get - * called in the frontend's interrupt thread context. - */ - io->scsiio.be_move_done(io); + ctl_datamove_done_process(io); + io->scsiio.be_move_done(io, true); return; } /* Don't confuse frontend with zero length data move. */ if (io->scsiio.kern_data_len == 0) { - io->scsiio.be_move_done(io); + ctl_datamove_done_process(io); + io->scsiio.be_move_done(io, true); return; } @@ -12640,7 +12632,7 @@ ctl_datamove_remote_write_cb(struct ctl_ha_dt_req *rq) * need to push it over to the remote controller's memory. */ static int -ctl_datamove_remote_dm_write_cb(union ctl_io *io) +ctl_datamove_remote_dm_write_cb(union ctl_io *io, bool samethr) { int retval; @@ -12679,7 +12671,7 @@ ctl_datamove_remote_write(union ctl_io *io) } static int -ctl_datamove_remote_dm_read_cb(union ctl_io *io) +ctl_datamove_remote_dm_read_cb(union ctl_io *io, bool samethr) { uint32_t i; diff --git a/sys/cam/ctl/ctl.h b/sys/cam/ctl/ctl.h index 56dd5313b4cb..be3e4a37b157 100644 --- a/sys/cam/ctl/ctl.h +++ b/sys/cam/ctl/ctl.h @@ -170,7 +170,8 @@ int ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio, int ctl_ie_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc); -int ctl_config_move_done(union ctl_io *io); +int ctl_config_move_done(union ctl_io *io, bool samethr); +void ctl_datamove_done(union ctl_io *io, bool samethr); void ctl_datamove(union ctl_io *io); void ctl_serseq_done(union ctl_io *io); void ctl_done(union ctl_io *io); diff --git a/sys/cam/ctl/ctl_backend.h b/sys/cam/ctl/ctl_backend.h index be8ab4d1706b..05e65abe41f8 100644 --- a/sys/cam/ctl/ctl_backend.h +++ b/sys/cam/ctl/ctl_backend.h @@ -186,7 +186,6 @@ struct ctl_backend_driver { be_init_t init; /* passed to CTL */ be_shutdown_t shutdown; /* passed to CTL */ be_func_t data_submit; /* passed to CTL */ - be_func_t data_move_done; /* passed to CTL */ be_func_t config_read; /* passed to CTL */ be_func_t config_write; /* passed to CTL */ be_ioctl_t ioctl; /* passed to CTL */ diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 5262c041bf62..7ec8e32f7338 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -235,7 +235,7 @@ SYSCTL_INT(_kern_cam_ctl_block, OID_AUTO, num_threads, CTLFLAG_RWTUN, static struct ctl_be_block_io *ctl_alloc_beio(struct ctl_be_block_softc *softc); static void ctl_free_beio(struct ctl_be_block_io *beio); static void ctl_complete_beio(struct ctl_be_block_io *beio); -static int ctl_be_block_move_done(union ctl_io *io); +static int ctl_be_block_move_done(union ctl_io *io, bool samethr); static void ctl_be_block_biodone(struct bio *bio); static void ctl_be_block_flush_file(struct ctl_be_block_lun *be_lun, struct ctl_be_block_io *beio); @@ -291,7 +291,6 @@ static struct ctl_backend_driver ctl_be_block_driver = .init = ctl_be_block_init, .shutdown = ctl_be_block_shutdown, .data_submit = ctl_be_block_submit, - .data_move_done = ctl_be_block_move_done, .config_read = ctl_be_block_config_read, .config_write = ctl_be_block_config_write, .ioctl = ctl_be_block_ioctl, @@ -432,46 +431,23 @@ ctl_be_block_compare(union ctl_io *io) } static int -ctl_be_block_move_done(union ctl_io *io) +ctl_be_block_move_done(union ctl_io *io, bool samethr) { struct ctl_be_block_io *beio; struct ctl_be_block_lun *be_lun; struct ctl_lba_len_flags *lbalen; -#ifdef CTL_TIME_IO - struct bintime cur_bt; -#endif beio = (struct ctl_be_block_io *)PRIV(io)->ptr; be_lun = beio->lun; DPRINTF("entered\n"); - -#ifdef CTL_TIME_IO - getbinuptime(&cur_bt); - bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); - bintime_add(&io->io_hdr.dma_bt, &cur_bt); -#endif - io->io_hdr.num_dmas++; io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; /* - * We set status at this point for read commands, and write - * commands with errors. + * We set status at this point for read and compare commands. */ - if (io->io_hdr.flags & CTL_FLAG_ABORT) { - ; - } else if ((io->io_hdr.port_status != 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, - /*retry_count*/ io->io_hdr.port_status); - } else if (io->scsiio.kern_data_resid != 0 && - (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_invalid_field_ciu(&io->scsiio); - } else if ((io->io_hdr.port_status == 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) { lbalen = ARGS(beio->io); if (lbalen->flags & CTL_LLF_READ) { ctl_set_success(&io->scsiio); @@ -492,18 +468,22 @@ ctl_be_block_move_done(union ctl_io *io) } /* - * At this point, we have a write and the DMA completed - * successfully. We now have to queue it to the task queue to + * At this point, we have a write and the DMA completed successfully. + * If we were called synchronously in the original thread then just + * dispatch, otherwise we now have to queue it to the task queue to * execute the backend I/O. That is because we do blocking * memory allocations, and in the file backing case, blocking I/O. * This move done routine is generally called in the SIM's * interrupt context, and therefore we cannot block. */ - mtx_lock(&be_lun->queue_lock); - STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links); - mtx_unlock(&be_lun->queue_lock); - taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); - + if (samethr) { + be_lun->dispatch(be_lun, beio); + } else { + mtx_lock(&be_lun->queue_lock); + STAILQ_INSERT_TAIL(&be_lun->datamove_queue, &io->io_hdr, links); + mtx_unlock(&be_lun->queue_lock); + taskqueue_enqueue(be_lun->io_taskqueue, &be_lun->io_task); + } return (0); } @@ -598,9 +578,6 @@ ctl_be_block_biodone(struct bio *bio) ctl_set_success(&io->scsiio); ctl_serseq_done(io); } -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } } @@ -811,9 +788,6 @@ ctl_be_block_dispatch_file(struct ctl_be_block_lun *be_lun, ctl_set_success(&io->scsiio); ctl_serseq_done(io); } -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } } @@ -980,9 +954,6 @@ ctl_be_block_dispatch_zvol(struct ctl_be_block_lun *be_lun, ctl_set_success(&io->scsiio); ctl_serseq_done(io); } -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } } @@ -1672,9 +1643,6 @@ ctl_be_block_dispatch(struct ctl_be_block_lun *be_lun, be_lun->dispatch(be_lun, beio); } else { SDT_PROBE0(cbb, , write, alloc_done); -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } } diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c index 2595aa0be00e..e67d699bda70 100644 --- a/sys/cam/ctl/ctl_backend_ramdisk.c +++ b/sys/cam/ctl/ctl_backend_ramdisk.c @@ -139,7 +139,7 @@ extern struct ctl_softc *control_softc; static int ctl_backend_ramdisk_init(void); static int ctl_backend_ramdisk_shutdown(void); -static int ctl_backend_ramdisk_move_done(union ctl_io *io); +static int ctl_backend_ramdisk_move_done(union ctl_io *io, bool samethr); static void ctl_backend_ramdisk_compare(union ctl_io *io); static void ctl_backend_ramdisk_rw(union ctl_io *io); static int ctl_backend_ramdisk_submit(union ctl_io *io); @@ -164,7 +164,6 @@ static struct ctl_backend_driver ctl_be_ramdisk_driver = .init = ctl_backend_ramdisk_init, .shutdown = ctl_backend_ramdisk_shutdown, .data_submit = ctl_backend_ramdisk_submit, - .data_move_done = ctl_backend_ramdisk_move_done, .config_read = ctl_backend_ramdisk_config_read, .config_write = ctl_backend_ramdisk_config_write, .ioctl = ctl_backend_ramdisk_ioctl, @@ -402,38 +401,17 @@ ctl_backend_ramdisk_cmp(union ctl_io *io) } static int -ctl_backend_ramdisk_move_done(union ctl_io *io) +ctl_backend_ramdisk_move_done(union ctl_io *io, bool samethr) { struct ctl_be_ramdisk_lun *be_lun = (struct ctl_be_ramdisk_lun *)CTL_BACKEND_LUN(io); -#ifdef CTL_TIME_IO - struct bintime cur_bt; -#endif CTL_DEBUG_PRINT(("ctl_backend_ramdisk_move_done\n")); -#ifdef CTL_TIME_IO - getbinuptime(&cur_bt); - bintime_sub(&cur_bt, &io->io_hdr.dma_start_bt); - bintime_add(&io->io_hdr.dma_bt, &cur_bt); -#endif - io->io_hdr.num_dmas++; if (io->scsiio.kern_sg_entries > 0) free(io->scsiio.kern_data_ptr, M_RAMDISK); io->scsiio.kern_rel_offset += io->scsiio.kern_data_len; - if (io->io_hdr.flags & CTL_FLAG_ABORT) { - ; - } else if (io->io_hdr.port_status != 0 && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_internal_failure(&io->scsiio, /*sks_valid*/ 1, - /*retry_count*/ io->io_hdr.port_status); - } else if (io->scsiio.kern_data_resid != 0 && - (io->io_hdr.flags & CTL_FLAG_DATA_MASK) == CTL_FLAG_DATA_OUT && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE || - (io->io_hdr.status & CTL_STATUS_MASK) == CTL_SUCCESS)) { - ctl_set_invalid_field_ciu(&io->scsiio); - } else if ((io->io_hdr.port_status == 0) && - ((io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE)) { + if ((io->io_hdr.flags & CTL_FLAG_ABORT) == 0 && + (io->io_hdr.status & CTL_STATUS_MASK) == CTL_STATUS_NONE) { if (ARGS(io)->flags & CTL_LLF_COMPARE) { /* We have data block ready for comparison. */ if (ctl_backend_ramdisk_cmp(io)) @@ -471,9 +449,6 @@ ctl_backend_ramdisk_compare(union ctl_io *io) io->scsiio.kern_sg_entries = 0; io->io_hdr.flags |= CTL_FLAG_ALLOCATED; PRIV(io)->len += lbas; -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } @@ -534,9 +509,6 @@ nospc: ctl_set_success(&io->scsiio); ctl_serseq_done(io); } -#ifdef CTL_TIME_IO - getbinuptime(&io->io_hdr.dma_start_bt); -#endif ctl_datamove(io); } diff --git a/sys/cam/ctl/ctl_frontend_cam_sim.c b/sys/cam/ctl/ctl_frontend_cam_sim.c index fdcccee2f569..0e61a80e452c 100644 --- a/sys/cam/ctl/ctl_frontend_cam_sim.c +++ b/sys/cam/ctl/ctl_frontend_cam_sim.c @@ -415,7 +415,7 @@ cfcs_datamove(union ctl_io *io) xpt_done(ccb); } - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); } static void diff --git a/sys/cam/ctl/ctl_frontend_ioctl.c b/sys/cam/ctl/ctl_frontend_ioctl.c index ef5e2bd22a86..f326100cb013 100644 --- a/sys/cam/ctl/ctl_frontend_ioctl.c +++ b/sys/cam/ctl/ctl_frontend_ioctl.c @@ -566,7 +566,7 @@ cfi_submit_wait(union ctl_io *io) * will immediately call back and wake us up, * probably using our own context. */ - io->scsiio.be_move_done(io); + ctl_datamove_done(io, false); break; case CTL_IOCTL_DONE: mtx_unlock(¶ms.ioctl_mtx); diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index 73483fb155cc..fdbc06150f93 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -933,7 +933,7 @@ cfiscsi_pdu_handle_data_out(struct icl_pdu *request) cfiscsi_data_wait_free(cs, cdw); io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; if (done) - io->scsiio.be_move_done(io); + ctl_datamove_done(io, false); else cfiscsi_datamove_out(io); } @@ -1146,7 +1146,7 @@ cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs) */ cdw->cdw_ctl_io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; - cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); + ctl_datamove_done(cdw->cdw_ctl_io, false); cfiscsi_data_wait_free(cs, cdw); CFISCSI_SESSION_LOCK(cs); } @@ -2487,7 +2487,7 @@ cfiscsi_datamove_in(union ctl_io *io) CFISCSI_SESSION_DEBUG(cs, "buffer_offset = %zd, " "already sent the expected len", buffer_offset); #endif - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); return; } @@ -2508,7 +2508,7 @@ cfiscsi_datamove_in(union ctl_io *io) CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); ctl_set_busy(&io->scsiio); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); cfiscsi_session_terminate(cs); return; } @@ -2566,7 +2566,7 @@ cfiscsi_datamove_in(union ctl_io *io) "allocate memory; dropping connection"); icl_pdu_free(response); ctl_set_busy(&io->scsiio); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); cfiscsi_session_terminate(cs); return; } @@ -2656,7 +2656,7 @@ cfiscsi_datamove_in(union ctl_io *io) cfiscsi_pdu_queue_cb(response, cb); } - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); } static void @@ -2685,9 +2685,10 @@ cfiscsi_datamove_out(union ctl_io *io) */ expected_len = ntohl(bhssc->bhssc_expected_data_transfer_length); if (io->scsiio.kern_rel_offset >= expected_len) { - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); return; } + datamove_len = MIN(io->scsiio.kern_data_len, expected_len - io->scsiio.kern_rel_offset); @@ -2703,7 +2704,7 @@ cfiscsi_datamove_out(union ctl_io *io) CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); ctl_set_busy(&io->scsiio); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); cfiscsi_session_terminate(cs); return; } @@ -2750,7 +2751,7 @@ cfiscsi_datamove_out(union ctl_io *io) done = cfiscsi_handle_data_segment(request, cdw); if (done) { cfiscsi_data_wait_free(cs, cdw); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); return; } } @@ -2773,7 +2774,7 @@ cfiscsi_datamove_out(union ctl_io *io) CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); ctl_set_busy(&io->scsiio); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); cfiscsi_session_terminate(cs); return; } @@ -2954,7 +2955,7 @@ cfiscsi_task_management_done(union ctl_io *io) cdw, cdw_next); io->io_hdr.flags &= ~CTL_FLAG_DMA_INPROG; cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 43; - cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); + ctl_datamove_done(cdw->cdw_ctl_io, false); cfiscsi_data_wait_free(cs, cdw); } CFISCSI_SESSION_UNLOCK(cs); diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h index 52ba98f3a9bd..60f8aef82d02 100644 --- a/sys/cam/ctl/ctl_io.h +++ b/sys/cam/ctl/ctl_io.h @@ -329,7 +329,7 @@ struct ctl_scsiio { ctl_tag_type tag_type; /* simple, ordered, head of queue,etc.*/ uint8_t cdb_len; /* CDB length */ uint8_t cdb[CTL_MAX_CDBLEN]; /* CDB */ - int (*be_move_done)(union ctl_io *io); /* called by fe */ + int (*be_move_done)(union ctl_io *io, bool samethr); /* called by fe */ int (*io_cont)(union ctl_io *io); /* to continue processing */ ctl_ref kern_data_ref; /* Method to reference/release data */ void *kern_data_arg; /* Opaque argument for kern_data_ref() */ diff --git a/sys/cam/ctl/ctl_tpc_local.c b/sys/cam/ctl/ctl_tpc_local.c index 714240fe8228..9b2c85ac8173 100644 --- a/sys/cam/ctl/ctl_tpc_local.c +++ b/sys/cam/ctl/ctl_tpc_local.c @@ -254,7 +254,7 @@ tpcl_datamove(union ctl_io *io) __func__, ctsio->ext_data_len, ctsio->kern_data_len)); bailout: - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); } static void diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c index 646b3fe07053..d3023f9a6c8c 100644 --- a/sys/cam/ctl/scsi_ctl.c +++ b/sys/cam/ctl/scsi_ctl.c @@ -1394,8 +1394,7 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb) xpt_release_ccb(done_ccb); mtx_unlock(mtx); - /* Call the backend move done callback */ - io->scsiio.be_move_done(io); + ctl_datamove_done(io, false); } return; } diff --git a/sys/dev/usb/storage/cfumass.c b/sys/dev/usb/storage/cfumass.c index 59d744bd62d0..88b5a6156704 100644 --- a/sys/dev/usb/storage/cfumass.c +++ b/sys/dev/usb/storage/cfumass.c @@ -475,7 +475,7 @@ cfumass_terminate(struct cfumass_softc *sc) if (sc->sc_ctl_io != NULL) { CFUMASS_DEBUG(sc, "terminating CTL transfer"); ctl_set_data_phase_error(&sc->sc_ctl_io->scsiio); - sc->sc_ctl_io->scsiio.be_move_done(sc->sc_ctl_io); + ctl_datamove_done(sc->sc_ctl_io, false); sc->sc_ctl_io = NULL; } @@ -730,7 +730,7 @@ cfumass_t_data_callback(struct usb_xfer *xfer, usb_error_t usb_error) sc->sc_current_residue == 0 || io->scsiio.kern_data_resid == 0) { sc->sc_ctl_io = NULL; - io->scsiio.be_move_done(io); + ctl_datamove_done(io, false); break; } /* FALLTHROUGH */ @@ -887,7 +887,7 @@ cfumass_datamove(union ctl_io *io) fail: ctl_set_data_phase_error(&io->scsiio); - io->scsiio.be_move_done(io); + ctl_datamove_done(io, true); sc->sc_ctl_io = NULL; } From owner-dev-commits-src-all@freebsd.org Sun Feb 21 22:21:38 2021 Return-Path: Delivered-To: dev-commits-src-all@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 26C7F53DFB3; Sun, 21 Feb 2021 22:21: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 4DkKXy0YSJz3mMW; Sun, 21 Feb 2021 22:21: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 05CED1A768; Sun, 21 Feb 2021 22:21: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 11LMLb2s086579; Sun, 21 Feb 2021 22:21:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 11LMLblW086578; Sun, 21 Feb 2021 22:21:37 GMT (envelope-from git) Date: Sun, 21 Feb 2021 22:21:37 GMT Message-Id: <202102212221.11LMLblW086578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: c02a28754bc2 - main - Fix build after 2c7dc6bae9fd. 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/main X-Git-Reftype: branch X-Git-Commit: c02a28754bc229c05e8baf9b6632cbd59bc73e48 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Feb 2021 22:21:38 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=c02a28754bc229c05e8baf9b6632cbd59bc73e48 commit c02a28754bc229c05e8baf9b6632cbd59bc73e48 Author: Alexander Motin AuthorDate: 2021-02-21 22:21:14 +0000 Commit: Alexander Motin CommitDate: 2021-02-21 22:21:14 +0000 Fix build after 2c7dc6bae9fd. MFC after: 1 month --- sys/cam/ctl/ctl_io.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/cam/ctl/ctl_io.h b/sys/cam/ctl/ctl_io.h index 60f8aef82d02..349cb02820d9 100644 --- a/sys/cam/ctl/ctl_io.h +++ b/sys/cam/ctl/ctl_io.h @@ -42,6 +42,10 @@ #ifndef _CTL_IO_H_ #define _CTL_IO_H_ +#ifndef _KERNEL +#include +#endif + #define CTL_MAX_CDBLEN 32 /* * Uncomment this next line to enable printing out times for I/Os