Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Markus Grundmann <markus@activezone.de>,
	wireguard@lists.zx2c4.com, 934763@bugs.debian.org
Subject: Re: Debian 4.9.0.9-amd64 :: DMKS failed
Date: Mon, 19 Aug 2019 18:23:58 -0400	[thread overview]
Message-ID: <87d0h0g5fl.fsf@fifthhorseman.net> (raw)
In-Reply-To: <a8490bd3-e273-6431-6ca5-5fc4bba0ce19@activezone.de>


[-- Attachment #1.1.1: Type: text/plain, Size: 715 bytes --]

On Mon 2019-08-19 14:06:37 +0200, Markus Grundmann wrote:
> This is a new debian VM running on BHYVE. After the installation and
> upgrading operating system the following DKMS fails.

This is https://bugs.debian.org/934763, which i'll work around shortly
with the attached patch to the wireguard packaging in 0.0.20190702-2.
Thanks to Jason for supplying the attached patch to update the
compatibility checks.

Note that if you apply the attached patch to wireguard and build against
4.9.168-1+deb9u5, but then try to load the module on a system running
4.9.168-1+deb9u4, the module will fail to load with unrecognized
symbols, due to the weird state of the backported siphash (but no
hsiphash).

          --dkg


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: 0003-compat-fix-on-debian-4.9.168-in-sloppy-manner.patch --]
[-- Type: text/x-diff, Size: 1160 bytes --]

From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Thu, 15 Aug 2019 06:37:10 +0000
Subject: compat: fix on debian 4.9.168 in sloppy manner

Ben backported siphash but forgot to backport hsiphash,
which goes into the same .h and .o files, making a proper
compat layer for it kind of cumbersome and annoying. Since
he plans to backport hsiphash for 4.9.169, this commit is
a stop-gap solution for the Debian package.
---
 src/compat/compat.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/compat/compat.h b/src/compat/compat.h
index 239fa58..7fc3145 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -844,6 +844,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
 #define cpu_have_named_feature(name) (elf_hwcap & (HWCAP_ ## name))
 #endif
 
+#if LINUX_VERSION_CODE == KERNEL_VERSION(4, 9, 168)
+#define hsiphash_2u32 siphash_2u32
+#define hsiphash_3u32 siphash_3u32
+#define hsiphash_key_t siphash_key_t
+#endif
+
 /* https://github.com/ClangBuiltLinux/linux/issues/7 */
 #if defined( __clang__) && (!defined(CONFIG_CLANG_VERSION) || CONFIG_CLANG_VERSION < 80000)
 #include <linux/bug.h>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

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

  reply	other threads:[~2019-08-19 22:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19 12:06 Markus Grundmann
2019-08-19 22:23 ` Daniel Kahn Gillmor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-19 12:04 Markus Grundmann
2019-08-25 15:59 ` Jason A. Donenfeld

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d0h0g5fl.fsf@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=934763@bugs.debian.org \
    --cc=markus@activezone.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).