wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat: support building for RHEL-8.2
@ 2020-01-23 11:18 Ilie Halip
  2020-01-28 14:14 ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Ilie Halip @ 2020-01-23 11:18 UTC (permalink / raw)
  To: wireguard

RedHat backported some more changes, now released as kernel 4.18.0-168.el8.
To maintain compatibility with kernel -147, a new macro is introduced: ISRHEL82.

Compile-tested with the -168 and -147 kernels.

Signed-off-by: Ilie Halip <ilie.halip@gmail.com>
---
 src/compat/compat.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/compat/compat.h b/src/compat/compat.h
index 96f3556..a77f973 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -16,6 +16,11 @@
 #define ISRHEL7
 #elif RHEL_MAJOR == 8
 #define ISRHEL8
+#ifdef RHEL_MINOR
+#if RHEL_MINOR == 2
+#define ISRHEL82
+#endif
+#endif
 #endif
 #endif
 #ifdef UTS_UBUNTU_RELEASE_ABI
@@ -783,7 +788,7 @@ struct __kernel_timespec {
 #endif
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(ISRHEL82)
 #include <linux/skbuff.h>
 #define skb_probe_transport_header(a) skb_probe_transport_header(a, 0)
 #endif
@@ -792,7 +797,7 @@ struct __kernel_timespec {
 #define ignore_df local_df
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && !defined(ISRHEL82)
 /* Note that all intentional uses of the non-_bh variety need to explicitly
  * undef these, conditionalized on COMPAT_CANNOT_DEPRECIATE_BH_RCU.
  */
@@ -834,7 +839,7 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0) && !defined(ISRHEL8)
 #define NLA_EXACT_LEN NLA_UNSPEC
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) && !defined(ISRHEL82)
 #define NLA_MIN_LEN NLA_UNSPEC
 #define COMPAT_CANNOT_INDIVIDUAL_NETLINK_OPS_POLICY
 #endif
-- 
2.17.1

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: [PATCH] compat: support building for RHEL-8.2
  2020-01-23 11:18 [PATCH] compat: support building for RHEL-8.2 Ilie Halip
@ 2020-01-28 14:14 ` Jason A. Donenfeld
  2020-01-30 13:54   ` Jason A. Donenfeld
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2020-01-28 14:14 UTC (permalink / raw)
  To: Ilie Halip; +Cc: WireGuard mailing list

Hi Ilie,

Thanks for this. Usually we don't special case RHEL point releases and
just maintain that wireguard-linux-compat only works with the latest
RHEL. Could you resubmit this using the normal ISRHEL check instead?

Do you have any idea on RHEL8.2 release date?

Thanks,
Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: [PATCH] compat: support building for RHEL-8.2
  2020-01-28 14:14 ` Jason A. Donenfeld
@ 2020-01-30 13:54   ` Jason A. Donenfeld
  2020-01-31  9:18     ` Ilie Halip
  0 siblings, 1 reply; 5+ messages in thread
From: Jason A. Donenfeld @ 2020-01-30 13:54 UTC (permalink / raw)
  To: Ilie Halip; +Cc: WireGuard mailing list

I would up merging this anyway with a justification in the git commit for it:

https://git.zx2c4.com/wireguard-linux-compat/commit/?id=003fb6ee9502741f41cb2563d2916172d98f5fd1

Thanks for the patch.

Jason
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: [PATCH] compat: support building for RHEL-8.2
  2020-01-30 13:54   ` Jason A. Donenfeld
@ 2020-01-31  9:18     ` Ilie Halip
  2020-02-01 19:10       ` Alex Davies
  0 siblings, 1 reply; 5+ messages in thread
From: Ilie Halip @ 2020-01-31  9:18 UTC (permalink / raw)
  To: Jason A. Donenfeld; +Cc: WireGuard mailing list

Hey Jason,

> Do you have any idea on RHEL8.2 release date?
RHEL 8.2 should be released sometime in May 2020 (6 months after 8.1, which
was back in early November).

I was also torn on introducing that macro but since some users wish to run
the newer kernel, I thought it was a good idea to support both.

Thanks,
I.H.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: [PATCH] compat: support building for RHEL-8.2
  2020-01-31  9:18     ` Ilie Halip
@ 2020-02-01 19:10       ` Alex Davies
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Davies @ 2020-02-01 19:10 UTC (permalink / raw)
  To: Ilie Halip; +Cc: WireGuard mailing list


[-- Attachment #1.1: Type: text/plain, Size: 863 bytes --]

Hey All,

Its worth remembering that the RHEL release date and the CentOS release
dates are months part, for example:

RHEL 8.1 released: 5 Nov 2019
CentOS 8.1 released: ~15 Jan 2020

Much as I dont like this, the reality is that most RHEL/CentOS users will
not immediately upgrade to the "latest" kernel/release and even if they try
they cant for months unless they are paying RedHat money.

For what its worth, we are using our small influence as a paying
customer of RedHat (we have many thousands of host subscriptions) to ask
them to merge the (now upstream) upstream patches into RHEL8 (and then
manage it like everything else in their kernel), probably initially as a
Tech Preview, which is the real fix to this. If anybody else is also keen
to see this and is paying them, feel free to message me off-list and we can
get our TAMs to work together!

-Alex

[-- Attachment #1.2: Type: text/html, Size: 1071 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

end of thread, other threads:[~2020-02-01 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 11:18 [PATCH] compat: support building for RHEL-8.2 Ilie Halip
2020-01-28 14:14 ` Jason A. Donenfeld
2020-01-30 13:54   ` Jason A. Donenfeld
2020-01-31  9:18     ` Ilie Halip
2020-02-01 19:10       ` Alex Davies

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).