Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-19 Thread Paul de Weerd
On Tue, Jan 18, 2022 at 01:51:45PM +0100, Alexander Bluhm wrote: | On Tue, Jan 18, 2022 at 12:59:25PM +0100, Christian Ehrhardt wrote: | > If so, any volunteers to commit this? | | Done. Thanks for fixing this. Just to close the loop on this topic. I've now transferred well over a terabyte wort

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-18 Thread Christian Ehrhardt
Hi Alexander, On Tue, Jan 18, 2022 at 01:51:45PM +0100, Alexander Bluhm wrote: > On Tue, Jan 18, 2022 at 12:59:25PM +0100, Christian Ehrhardt wrote: > > If so, any volunteers to commit this? > > Done. Thanks for fixing this. > > Two more things: > > - We need a man page update. I think the m

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-18 Thread Alexander Bluhm
On Tue, Jan 18, 2022 at 12:59:25PM +0100, Christian Ehrhardt wrote: > If so, any volunteers to commit this? Done. Thanks for fixing this. Two more things: - We need a man page update. I think the missing documentation of this feature was the reason that this bug was introduced. - The strange

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-18 Thread Christian Ehrhardt
Hi Claudio, On Fri, Jan 14, 2022 at 11:02:18AM +0100, Claudio Jeker wrote: > One small comment below. > > > diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c > > index 5e4cb5ba88..21ae5059b0 100644 > > --- a/sys/kern/uipc_mbuf.c > > +++ b/sys/kern/uipc_mbuf.c > > [ ... ] > > @@ -983,14 +

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-14 Thread Claudio Jeker
On Thu, Jan 13, 2022 at 09:12:32AM +0100, Christian Ehrhardt wrote: > > Hi all, > > On Wed, Jan 12, 2022 at 08:04:11PM +0100, Alexander Bluhm wrote: > > On Wed, Jan 12, 2022 at 04:21:13PM +0100, Christian Ehrhardt wrote: > > > > > - if (len <= tail - head) { > > > > > - /* there's

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-13 Thread Alexander Bluhm
On Thu, Jan 13, 2022 at 09:12:32AM +0100, Christian Ehrhardt wrote: > True, updated patch (v3) below. > > regards Christian Passed full regress run on i386. OK bluhm@ > commit 2265c7db45a9127bcf236de6432d6dd323414bd5 > Author: Christian Ehrhardt > Date: Tue Jan 11 10:31:46 2022 +0100

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-13 Thread Christian Ehrhardt
Hi all, On Wed, Jan 12, 2022 at 08:04:11PM +0100, Alexander Bluhm wrote: > On Wed, Jan 12, 2022 at 04:21:13PM +0100, Christian Ehrhardt wrote: > > > > - if (len <= tail - head) { > > > > - /* there's enough space in the first mbuf */ > > > > - > > > > - if (len >

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-12 Thread Alexander Bluhm
On Wed, Jan 12, 2022 at 04:21:13PM +0100, Christian Ehrhardt wrote: > > > - if (len <= tail - head) { > > > - /* there's enough space in the first mbuf */ > > > - > > > - if (len > tail - mtod(m0, caddr_t)) { > > > + if (!M_READONLY(m0) && len <= tail - head) { > > > + /* we

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-12 Thread Paul de Weerd
On Wed, Jan 12, 2022 at 10:50:50AM +0100, Christian Ehrhardt wrote: | So here is what happens: | - The iwx(4) (and the iwm(4) driver for that matter) receive multiple | IP packets in an aggregated WLAN packet. All of these packets | live in the same mbuf cluster. | - The iwx(4) driver uses m_co

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-12 Thread Christian Ehrhardt
Hi, On Wed, Jan 12, 2022 at 02:57:28PM +0100, Stefan Sperling wrote: > On Wed, Jan 12, 2022 at 10:50:50AM +0100, Christian Ehrhardt wrote: > > diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c > > index 5e4cb5ba88..d8b9e751c6 100644 > > --- a/sys/kern/uipc_mbuf.c > > +++ b/sys/kern/uipc_mb

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-12 Thread Stefan Sperling
On Wed, Jan 12, 2022 at 10:50:50AM +0100, Christian Ehrhardt wrote: > diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c > index 5e4cb5ba88..d8b9e751c6 100644 > --- a/sys/kern/uipc_mbuf.c > +++ b/sys/kern/uipc_mbuf.c > @@ -957,8 +957,6 @@ m_pullup(struct mbuf *m0, int len) > > head =

Re: wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-12 Thread Christian Ehrhardt
Hi all, I think I have an explanation and a fix... On Tue, Jan 11, 2022 at 09:59:45PM +0100, Paul de Weerd wrote: > More debugging later, it turns out that I can now pretty reliably > panic the GENERIC.MP kernel with a WireGuard tunnel that has an MTU of > 1500 bytes, sending over the iwx(4) in m

wireguard-related mbuf panic (was: Re: panic: ieee80211_has_seq(wh) assertion failed)

2022-01-11 Thread Paul de Weerd
Hi all, More debugging later, it turns out that I can now pretty reliably panic the GENERIC.MP kernel with a WireGuard tunnel that has an MTU of 1500 bytes, sending over the iwx(4) in my machine. Christian Ehrhard (over at Genua) provided a diff that printf's when there's a read-only mbuf passed

Re: panic: ieee80211_has_seq(wh) assertion failed

2022-01-10 Thread Paul de Weerd
Hi all, After many kernel rebuilds, data transfers, panics and a lot of back-and-forth with stsp@, and later also Christian Ehrhardt (many thanks for their patience to both of them!), we've found the following: The problem started after the commit by stsp@ that implements Rx aggregation offload i

Re: panic: ieee80211_has_seq(wh) assertion failed

2021-11-08 Thread Paul de Weerd
Hi Stefan, On Mon, Nov 08, 2021 at 02:35:16PM +0100, Stefan Sperling wrote: | Unfortunately, I cannot make any sense of this. | | There were no new changes in iwx(4) since Oct 15. If the Oct 31 snap | was working fine then your problem is not related to driver-side changes. Hmm, I may have gotte

Re: panic: ieee80211_has_seq(wh) assertion failed

2021-11-08 Thread Stefan Sperling
On Mon, Nov 08, 2021 at 01:57:53PM +0100, Paul de Weerd wrote: > Hi all, > > After upgrading my laptop to a newer snapshot this weekend, I started > getting panics. I was running OpenBSD 7.0-current (GENERIC.MP) #60: > Sun Oct 31 13:27:05 MDT 2021 before the upgrade. Hand-typed from a > picture

panic: ieee80211_has_seq(wh) assertion failed

2021-11-08 Thread Paul de Weerd
Hi all, After upgrading my laptop to a newer snapshot this weekend, I started getting panics. I was running OpenBSD 7.0-current (GENERIC.MP) #60: Sun Oct 31 13:27:05 MDT 2021 before the upgrade. Hand-typed from a picture I took: panic: kernel diagnostic assertion "ieee80211_has_seq(hw)" failed