From owner-dev-commits-ports-all@freebsd.org Sun Apr 25 18:34:36 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 992015E2AE0; Sun, 25 Apr 2021 18:34: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 4FSxWw3vZdz3tp7; Sun, 25 Apr 2021 18:34: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 6A35918E68; Sun, 25 Apr 2021 18:34: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 13PIYaWT016034; Sun, 25 Apr 2021 18:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13PIYaxL016033; Sun, 25 Apr 2021 18:34:36 GMT (envelope-from git) Date: Sun, 25 Apr 2021 18:34:36 GMT Message-Id: <202104251834.13PIYaxL016033@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Bernhard Froehlich Subject: git: a3bb4c38f3be - 2021Q2 - net/wireguard-kmod: Add patch to fix panic due to missing epoch tracking in transmit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: decke X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q2 X-Git-Reftype: branch X-Git-Commit: a3bb4c38f3be163c3bacc24efa49e853e62b717c Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2021 18:34:36 -0000 The branch 2021Q2 has been updated by decke: URL: https://cgit.FreeBSD.org/ports/commit/?id=a3bb4c38f3be163c3bacc24efa49e853e62b717c commit a3bb4c38f3be163c3bacc24efa49e853e62b717c Author: Bernhard Froehlich AuthorDate: 2021-04-25 18:29:29 +0000 Commit: Bernhard Froehlich CommitDate: 2021-04-25 18:33:47 +0000 net/wireguard-kmod: Add patch to fix panic due to missing epoch tracking in transmit Obtained from: https://git.zx2c4.com/wireguard-freebsd/commit/?id=e03bf597383cef7f16c41fa4952a6b04093e9e64 (cherry picked from commit 98c107c85696297c2a1ec986b3f76e67f7590771) --- net/wireguard-kmod/Makefile | 1 + .../patch-e03bf597383cef7f16c41fa4952a6b04093e9e64 | 52 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/net/wireguard-kmod/Makefile b/net/wireguard-kmod/Makefile index 938c094e8296..e0565d48f874 100644 --- a/net/wireguard-kmod/Makefile +++ b/net/wireguard-kmod/Makefile @@ -1,6 +1,7 @@ PORTNAME= wireguard-kmod PORTVERSION= 0.0.20210424 +PORTREVISION= 1 CATEGORIES= net net-vpn MASTER_SITES= https://git.zx2c4.com/wireguard-freebsd/snapshot/ DISTNAME= wireguard-freebsd-${PORTVERSION} diff --git a/net/wireguard-kmod/files/patch-e03bf597383cef7f16c41fa4952a6b04093e9e64 b/net/wireguard-kmod/files/patch-e03bf597383cef7f16c41fa4952a6b04093e9e64 new file mode 100644 index 000000000000..1705a0f9a69f --- /dev/null +++ b/net/wireguard-kmod/files/patch-e03bf597383cef7f16c41fa4952a6b04093e9e64 @@ -0,0 +1,52 @@ +From e03bf597383cef7f16c41fa4952a6b04093e9e64 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Sun, 25 Apr 2021 10:45:39 -0400 +Subject: if_wg: re-add epoch tracking to transmit + +This was accidentally removed before. We need it to work around v6 core +bugs. + +Signed-off-by: Jason A. Donenfeld +--- + src/if_wg.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/if_wg.c b/src/if_wg.c +index 095a4f37f8dc..0c2565ce56c0 100644 +--- if_wg.c ++++ if_wg.c +@@ -2063,6 +2063,7 @@ error: + static int + wg_transmit(struct ifnet *ifp, struct mbuf *m) + { ++ struct epoch_tracker et; + struct wg_packet *pkt = m->m_pkthdr.PH_loc.ptr; + struct wg_softc *sc = ifp->if_softc; + struct wg_peer *peer; +@@ -2070,6 +2071,7 @@ wg_transmit(struct ifnet *ifp, struct mbuf *m) + int rc = 0; + sa_family_t peer_af; + ++ NET_EPOCH_ENTER(et); + /* Work around lifetime issue in the ipv6 mld code. */ + if (__predict_false((ifp->if_flags & IFF_DYING) || !sc)) { + rc = ENXIO; +@@ -2109,11 +2111,15 @@ wg_transmit(struct ifnet *ifp, struct mbuf *m) + wg_queue_push_staged(&peer->p_stage_queue, pkt); + wg_peer_send_staged(peer); + noise_remote_put(peer->p_remote); ++ NET_EPOCH_EXIT(et); ++ + return (0); + err_peer: + noise_remote_put(peer->p_remote); + err: + if_inc_counter(sc->sc_ifp, IFCOUNTER_OERRORS, 1); ++ NET_EPOCH_EXIT(et); ++ /* TODO: send ICMP unreachable? */ + wg_packet_free(pkt); + return (rc); + } +-- +cgit v1.2.3-11-g984f +