"bus error" when generating public key

Christian Hewitt christianshewitt at gmail.com
Fri Dec 7 12:46:53 CET 2018


I’m working to add WireGuard support to an embedded distro that runs on a mix of x86 and ARM hardware. I’m using 4.19.7 as the kernel base, cross compiling using a well proven toolchain and build-system. The kernel defconfig can be seen here:

https://github.com/chewitt/LibreELEC.tv/blob/amlogic/projects/Amlogic/linux/linux.aarch64.conf

I see no compile errors when building the kernel module or wireguard tools. The kernel module loads without errors and ‘wg’ can generate private and preshared keys, but when creating a public key from the private key ‘wg pubkey < /path/to/privatekey' fails with “Bus error” and no key is generated.

dmesg from the device after the failure: http://ix.io/1vrb

modinfo wireguard
filename:       /lib/modules/4.19.7/kernel/net/wireguard/wireguard.ko
alias:          net-pf-16-proto-16-family-wireguard
alias:          rtnl-link-wireguard
version:        0.0.20181119
author:         Jason A. Donenfeld <Jason at zx2c4.com>
description:    WireGuard secure network tunnel
license:        GPL v2
srcversion:     1CFE12F8E5CF00DB842FD50
depends:        ipv6,udp_tunnel,ip6_udp_tunnel
intree:         Y
name:           wireguard
vermagic:       4.19.7 SMP preempt mod_unload aarch64

ldd /usr/bin/wg
	libc.so.6 => /usr/lib/libc.so.6 (0xf7771000)
	/lib/ld-linux-armhf.so.3 => /usr/lib/ld-linux-armhf.so.3 (0xf78ad000)

I’m not a coding developer, but I’m able to follow instructions to a reasonable level if there is some kind of debugging or additional output that would be useful.

Can you spot the problem? Any suggestions?

Christian




More information about the WireGuard mailing list