WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Debian 4.9.0.9-amd64 :: DMKS failed
@ 2019-08-19 12:04 Markus Grundmann
  2019-08-25 15:59 ` Jason A. Donenfeld
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Grundmann @ 2019-08-19 12:04 UTC (permalink / raw)
  To: wireguard

This is a new debian VM running on BHYVE. After the installation and
upgrading operating system the following DKMS fails.

Installation procedure:
1) Modifying the files described on wireguard.com
2) apt update
3) apt install wireguard

[FAIL]

// Linux raspivm 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5
(2019-08-11) x86_64 GNU/Linux

### Manual removing of 'wireguard-dkms'

root@raspivm:/# apt remove wireguard-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  dkms fakeroot gcc libfakeroot linux-headers-amd64 sudo wireguard-tools
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  wireguard-dkms
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1,780 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 64696 files and directories currently installed.)
Removing wireguard-dkms (0.0.20190702-1) ...

------------------------------
Deleting module version: 0.0.20190702
completely from the DKMS tree.
------------------------------
Done.

### Try to reinstall 'wireguard-dkms'

root@raspivm:/# apt install wireguard-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  wireguard-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 263 kB of archives.
After this operation, 1,780 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian unstable/main amd64 wireguard-dkms
all 0.0.20190702-1 [263 kB]
Fetched 263 kB in 0s (3,246 kB/s)
Selecting previously unselected package wireguard-dkms.
(Reading database ... 64553 files and directories currently installed.)
Preparing to unpack .../wireguard-dkms_0.0.20190702-1_all.deb ...
Unpacking wireguard-dkms (0.0.20190702-1) ...
Setting up wireguard-dkms (0.0.20190702-1) ...
Loading new wireguard-0.0.20190702 DKMS files...
Building for 4.9.0-9-amd64
Building initial module for 4.9.0-9-amd64
//
// ERROR
//
Error! Bad return status for module build on kernel: 4.9.0-9-amd64 (x86_64)
Consult /var/lib/dkms/wireguard/0.0.20190702/build/make.log for more
information.
//
//

### I try to build manual but make fails. Error: "hsiphash_key_t unknown".

# /var/lib/dkms/wireguard/0.0.20190702/build# make

ver="#define WIREGUARD_VERSION \"\"" && \
[ "$(cat version.h 2>/dev/null)" != "$ver" ] && \
echo "$ver" > version.h || true
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:25:8: error:
unknown type name ‘hsiphash_key_t’
 static hsiphash_key_t key;
        ^~~~~~~~~~~~~~
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c: In function
‘wg_ratelimiter_allow’:
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:109:22: error:
implicit declaration of function ‘hsiphash_2u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v4[hsiphash_2u32(net_word, ip, &key) &
                      ^~~~~~~~~~~~~
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:116:22: error:
implicit declaration of function ‘hsiphash_3u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v6[hsiphash_3u32(net_word, ip >> 32, ip, &key) &
                      ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:309: recipe
for target '/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o' failed
make[4]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o]
Error 1
/usr/src/linux-headers-4.9.0-9-common/Makefile:1544: recipe for target
'_module_/var/lib/dkms/wireguard/0.0.20190702/build' failed
make[3]: *** [_module_/var/lib/dkms/wireguard/0.0.20190702/build] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:32: recipe for target 'module' failed
make: *** [module] Error 2

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

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

* Re: Debian 4.9.0.9-amd64 :: DMKS failed
  2019-08-19 12:04 Debian 4.9.0.9-amd64 :: DMKS failed Markus Grundmann
@ 2019-08-25 15:59 ` Jason A. Donenfeld
  0 siblings, 0 replies; 4+ messages in thread
From: Jason A. Donenfeld @ 2019-08-25 15:59 UTC (permalink / raw)
  To: Markus Grundmann; +Cc: WireGuard mailing list

Addressed with:

https://salsa.debian.org/debian/wireguard/commit/dca2647fa39e037448b450cb82d5d62b13685b25
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=934763
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

* Re: Debian 4.9.0.9-amd64 :: DMKS failed
  2019-08-19 12:06 Markus Grundmann
@ 2019-08-19 22:23 ` Daniel Kahn Gillmor
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Kahn Gillmor @ 2019-08-19 22:23 UTC (permalink / raw)
  To: Markus Grundmann, wireguard, 934763

[-- 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


[-- Attachment #1.1.2: 0003-compat-fix-on-debian-4.9.168-in-sloppy-manner.patch --]
[-- Type: text/x-diff, Size: 1160 bytes --]

[-- 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

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

* Debian 4.9.0.9-amd64 :: DMKS failed
@ 2019-08-19 12:06 Markus Grundmann
  2019-08-19 22:23 ` Daniel Kahn Gillmor
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Grundmann @ 2019-08-19 12:06 UTC (permalink / raw)
  To: wireguard

This is a new debian VM running on BHYVE. After the installation and
upgrading operating system the following DKMS fails.

Installation procedure:
1) Modifying the files described on wireguard.com
2) apt update
3) apt install wireguard

[FAIL]

// Linux raspivm 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5
(2019-08-11) x86_64 GNU/Linux

### Manual removing of 'wireguard-dkms'

root@raspivm:/# apt remove wireguard-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer
required:
  dkms fakeroot gcc libfakeroot linux-headers-amd64 sudo wireguard-tools
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  wireguard-dkms
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 1,780 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 64696 files and directories currently installed.)
Removing wireguard-dkms (0.0.20190702-1) ...

------------------------------
Deleting module version: 0.0.20190702
completely from the DKMS tree.
------------------------------
Done.

### Try to reinstall 'wireguard-dkms'

root@raspivm:/# apt install wireguard-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  wireguard-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 263 kB of archives.
After this operation, 1,780 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian unstable/main amd64 wireguard-dkms
all 0.0.20190702-1 [263 kB]
Fetched 263 kB in 0s (3,246 kB/s)
Selecting previously unselected package wireguard-dkms.
(Reading database ... 64553 files and directories currently installed.)
Preparing to unpack .../wireguard-dkms_0.0.20190702-1_all.deb ...
Unpacking wireguard-dkms (0.0.20190702-1) ...
Setting up wireguard-dkms (0.0.20190702-1) ...
Loading new wireguard-0.0.20190702 DKMS files...
Building for 4.9.0-9-amd64
Building initial module for 4.9.0-9-amd64
//
// ERROR
//
Error! Bad return status for module build on kernel: 4.9.0-9-amd64 (x86_64)
Consult /var/lib/dkms/wireguard/0.0.20190702/build/make.log for more
information.
//
//

### I try to build manual but make fails. Error: "hsiphash_key_t unknown".

# /var/lib/dkms/wireguard/0.0.20190702/build# make

ver="#define WIREGUARD_VERSION \"\"" && \
[ "$(cat version.h 2>/dev/null)" != "$ver" ] && \
echo "$ver" > version.h || true
  CC [M]  /var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:25:8: error:
unknown type name ‘hsiphash_key_t’
 static hsiphash_key_t key;
        ^~~~~~~~~~~~~~
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c: In function
‘wg_ratelimiter_allow’:
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:109:22: error:
implicit declaration of function ‘hsiphash_2u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v4[hsiphash_2u32(net_word, ip, &key) &
                      ^~~~~~~~~~~~~
/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.c:116:22: error:
implicit declaration of function ‘hsiphash_3u32’
[-Werror=implicit-function-declaration]
   bucket = &table_v6[hsiphash_3u32(net_word, ip >> 32, ip, &key) &
                      ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:309: recipe
for target '/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o' failed
make[4]: *** [/var/lib/dkms/wireguard/0.0.20190702/build/ratelimiter.o]
Error 1
/usr/src/linux-headers-4.9.0-9-common/Makefile:1544: recipe for target
'_module_/var/lib/dkms/wireguard/0.0.20190702/build' failed
make[3]: *** [_module_/var/lib/dkms/wireguard/0.0.20190702/build] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
Makefile:32: recipe for target 'module' failed
make: *** [module] Error 2


-- 
Best regards,
Markus

Better Privacy with PGP encrypted Mail: http://activezone.de/pgp/
Fingerprint: 58C5 8BAF 6FCE B24F 1881 B5B8 F2A8 E1D0 484B 0054
Threema ID: 7ZRET2JY

„Wer die Freiheit aufgibt um Sicherheit zu gewinnen,
 der wird am Ende beides verlieren.“ -- Benjamin Franklin
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 12:04 Debian 4.9.0.9-amd64 :: DMKS failed Markus Grundmann
2019-08-25 15:59 ` Jason A. Donenfeld
2019-08-19 12:06 Markus Grundmann
2019-08-19 22:23 ` Daniel Kahn Gillmor

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox