Development discussion of WireGuard
 help / color / mirror / Atom feed
* Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
@ 2020-05-03 20:33 Pascal Ernster
  2020-05-05  1:37 ` Jason A. Donenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Pascal Ernster @ 2020-05-03 20:33 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Hi,


Ubuntu kernel 5.3.0-52.46 breaks the DKMS build for
wireguard-linux-compat 1.0.20200429. Function skb_reset_redirect() got
added to the kernel's include/linux/skbuff.h, but collides with the
function defintion from wireguard-linux-compat's compat/compat.h:

https://kernel.ubuntu.com/git/ubuntu/ubuntu-eoan.git/commit/include/linux/skbuff.h?h=Ubuntu-5.3.0-52.46&id=b8845f9376917c49f5e219288613c6cbe172f884

Kernel 5.3.0-52.46 is not only used for Ubuntu 19.10, but serves also as
HWE kernel in Ubuntu 18.04.

I've got the DKMS module to compile again on Ubuntu 18.04 using the
attached patch, but I'm not sure it that's the correct solution to the
problem since the colliding function definitions differ and I'm not
really familiar with the kernel's network internals.


Regards
Pascal

[-- Attachment #2: fix-for-ubuntu-kernel-5.3.0-52.46.patch --]
[-- Type: text/x-patch, Size: 860 bytes --]

--- /var/lib/dkms/wireguard/1.0.20200429/source/compat/compat.h	2020-04-30 23:03:40.000000000 +0000
+++ /var/lib/dkms/wireguard/1.0.20200429/source/compat/compat.h	2020-04-30 23:03:40.000000000 +0000
@@ -1021,12 +1021,14 @@ out:
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 14))
 #include <linux/skbuff.h>
 #include <net/sch_generic.h>
+#if !(defined(UTS_UBUNTU_RELEASE_ABI) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) && (UTS_UBUNTU_RELEASE_ABI >= 52)) // Ubuntu 18.04-HWE and 19.10 >= 5.3.0-52.46
 static inline void skb_reset_redirect(struct sk_buff *skb)
 {
 #ifdef CONFIG_NET_SCHED
 	skb_reset_tc(skb);
 #endif
 }
+#endif
 #endif
 
 #if defined(ISUBUNTU1604) || defined(ISRHEL7)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-03 20:33 Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included Pascal Ernster
@ 2020-05-05  1:37 ` Jason A. Donenfeld
  2020-05-05  3:52   ` Pascal Ernster
  0 siblings, 1 reply; 8+ messages in thread
From: Jason A. Donenfeld @ 2020-05-05  1:37 UTC (permalink / raw)
  To: Pascal Ernster; +Cc: WireGuard mailing list

Hey Pascal,

Thanks a bunch for the report and patch.

Can you confirm to me whether or not this patch fixes the issue on
both 19.10 and 18.04-hwe?

https://git.zx2c4.com/wireguard-linux-compat/commit/?id=1325bedf8ee3d69ed58460b7a8fee96d949f67da

Thanks,
Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-05  1:37 ` Jason A. Donenfeld
@ 2020-05-05  3:52   ` Pascal Ernster
  2020-05-05  4:03     ` Jason A. Donenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Pascal Ernster @ 2020-05-05  3:52 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hi Jason,


[2020-05-05 03:37] Jason A. Donenfeld:
> Can you confirm to me whether or not this patch fixes the issue on
> both 19.10 and 18.04-hwe?
> 
> https://git.zx2c4.com/wireguard-linux-compat/commit/?id=1325bedf8ee3d69ed58460b7a8fee96d949f67da

I don't have a 19.10 machine to test on, but at least on an 18.04
machine with the 5.3.0-52.46 kernel, it works as intended.

However, building the module for the previous 5.3.0-51.44 kernel fails
now, and it doesn't fail when I use my original patch.

Note that as of now, 5.3.0-51.44 is still the latest "official" HWE
kernel for 18.04, and 5.3.0-52.46 is only available from Ubuntu's
"bionic-proposed" repo.


Regards
Pascal

-- 
Forschung und wissenschaftliche Informationsversorgung
IT.SERVICES
Ruhr-Universität Bochum | 44780 Bochum
Fon: +49 234 32-29169
Fax: +49 234 32-07835

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-05  3:52   ` Pascal Ernster
@ 2020-05-05  4:03     ` Jason A. Donenfeld
  2020-05-05  4:27       ` Pascal Ernster
  2020-05-06 16:22       ` Simon Deziel
  0 siblings, 2 replies; 8+ messages in thread
From: Jason A. Donenfeld @ 2020-05-05  4:03 UTC (permalink / raw)
  To: Pascal Ernster; +Cc: WireGuard mailing list

Hi Pascal,

On Mon, May 4, 2020 at 9:52 PM Pascal Ernster
<pascal.ernster+wireguard@rub.de> wrote:
>
> Hi Jason,
>
>
> [2020-05-05 03:37] Jason A. Donenfeld:
> > Can you confirm to me whether or not this patch fixes the issue on
> > both 19.10 and 18.04-hwe?
> >
> > https://git.zx2c4.com/wireguard-linux-compat/commit/?id=1325bedf8ee3d69ed58460b7a8fee96d949f67da
>
> I don't have a 19.10 machine to test on, but at least on an 18.04
> machine with the 5.3.0-52.46 kernel, it works as intended.
>
> However, building the module for the previous 5.3.0-51.44 kernel fails
> now, and it doesn't fail when I use my original patch.

Right. The compat layer, in order to keep it maintainable in the long
term, only supports the latest distro frankenkernel for each distro
release. The latest 14.04, 16.04, ..., RHEL7, RHEL8, SLE 15, and so
forth.

>
> Note that as of now, 5.3.0-51.44 is still the latest "official" HWE
> kernel for 18.04, and 5.3.0-52.46 is only available from Ubuntu's
> "bionic-proposed" repo.

Ahh, you're running -proposed, gotcha. So I guess I should wait until
this hits the main repo. Any idea when they usually do that?

Jason

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-05  4:03     ` Jason A. Donenfeld
@ 2020-05-05  4:27       ` Pascal Ernster
  2020-05-06 16:22       ` Simon Deziel
  1 sibling, 0 replies; 8+ messages in thread
From: Pascal Ernster @ 2020-05-05  4:27 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hi Jason,


[2020-05-05 06:03] Jason A. Donenfeld:
> Ahh, you're running -proposed, gotcha. So I guess I should wait until
> this hits the main repo. Any idea when they usually do that?

I'm not a Ubuntu developer, but my educated guess would be "when their
next HWE kernel security advisory hits the RSS feed". At least that's
what happened when 5.3.0-51.44 got released:

https://usn.ubuntu.com/4342-1/


Regards
Pascal

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-05  4:03     ` Jason A. Donenfeld
  2020-05-05  4:27       ` Pascal Ernster
@ 2020-05-06 16:22       ` Simon Deziel
  2020-05-07  0:29         ` Jason A. Donenfeld
  2020-05-20 15:04         ` Vasili Pupkin
  1 sibling, 2 replies; 8+ messages in thread
From: Simon Deziel @ 2020-05-06 16:22 UTC (permalink / raw)
  To: wireguard

On 2020-05-05 12:03 a.m., Jason at zx2c4.com (Jason A. Donenfeld) wrote:
>> Note that as of now, 5.3.0-51.44 is still the latest "official" HWE
>> kernel for 18.04, and 5.3.0-52.46 is only available from Ubuntu's
>> "bionic-proposed" repo.
> 
> Ahh, you're running -proposed, gotcha. So I guess I should wait until
> this hits the main repo. Any idea when they usually do that?

The next kernel batch should land in -updates on May 18th. The detailed
schedule is at https://kernel.ubuntu.com/

Regards,
Simon

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-06 16:22       ` Simon Deziel
@ 2020-05-07  0:29         ` Jason A. Donenfeld
  2020-05-20 15:04         ` Vasili Pupkin
  1 sibling, 0 replies; 8+ messages in thread
From: Jason A. Donenfeld @ 2020-05-07  0:29 UTC (permalink / raw)
  To: Simon Deziel, unit193; +Cc: WireGuard mailing list

On Wed, May 6, 2020 at 6:27 PM Simon Deziel <simon@sdeziel.info> wrote:
>
> On 2020-05-05 12:03 a.m., Jason at zx2c4.com (Jason A. Donenfeld) wrote:
> >> Note that as of now, 5.3.0-51.44 is still the latest "official" HWE
> >> kernel for 18.04, and 5.3.0-52.46 is only available from Ubuntu's
> >> "bionic-proposed" repo.
> >
> > Ahh, you're running -proposed, gotcha. So I guess I should wait until
> > this hits the main repo. Any idea when they usually do that?
>
> The next kernel batch should land in -updates on May 18th. The detailed
> schedule is at https://kernel.ubuntu.com/

Ooof, thanks for that info. Looks like we're a tad early on the .52 changes.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
  2020-05-06 16:22       ` Simon Deziel
  2020-05-07  0:29         ` Jason A. Donenfeld
@ 2020-05-20 15:04         ` Vasili Pupkin
  1 sibling, 0 replies; 8+ messages in thread
From: Vasili Pupkin @ 2020-05-20 15:04 UTC (permalink / raw)
  To: Simon Deziel, wireguard

On 06.05.2020 19:22, Simon Deziel wrote:
> On 2020-05-05 12:03 a.m., Jason at zx2c4.com (Jason A. Donenfeld) wrote:
>> Ahh, you're running -proposed, gotcha. So I guess I should wait until
>> this hits the main repo. Any idea when they usually do that?
> The next kernel batch should land in -updates on May 18th. The detailed
> schedule is at https://kernel.ubuntu.com/

The broken kernel 5.3.0-53.47~18.04.1 was still pushed to 18.04 very 
recently, today or may be yesterday

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-05-20 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 20:33 Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included Pascal Ernster
2020-05-05  1:37 ` Jason A. Donenfeld
2020-05-05  3:52   ` Pascal Ernster
2020-05-05  4:03     ` Jason A. Donenfeld
2020-05-05  4:27       ` Pascal Ernster
2020-05-06 16:22       ` Simon Deziel
2020-05-07  0:29         ` Jason A. Donenfeld
2020-05-20 15:04         ` Vasili Pupkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).