Looks like 4.13 introduces a new incompatibility
With Fedora's 4.13.0-0.rc0.git3.1.fc27 kernel, master no longer compiles. It is still a week before rc1 and I can use 4.12 on the relevant machines, but I thought I'd give a heads up.
[bruno@wolff src]$ make clean all
make -C /lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src clean make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
CLEAN /home/bruno/WireGuard/src/.tmp_versions
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE' make -C tools clean
make[1]: Entering directory '/home/bruno/WireGuard/src/tools'
rm -f wg *.o *.d
make[1]: Leaving directory '/home/bruno/WireGuard/src/tools'
make -C /lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src modules make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
CC [M] /home/bruno/WireGuard/src/main.o
CC [M] /home/bruno/WireGuard/src/noise.o
CC [M] /home/bruno/WireGuard/src/device.o
/home/bruno/WireGuard/src/device.c:372:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.newlink = newlink,
^~~~~~~/home/bruno/WireGuard/src/device.c:372:14: note: (near initialization for ‘link_ops.newlink’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:303: /home/bruno/WireGuard/src/device.o] Error 1 make[1]: *** [Makefile:1512: _module_/home/bruno/WireGuard/src] Error 2 make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
make: *** [Makefile:28: module] Error 2
Hey Bruno,
Thanks for the heads up. Does this fix it?
https://git.zx2c4.com/WireGuard/commit/?id=dd007ad550b3def8a858e57aa718af9b00047a28
Jason
Quoted 5 lines · Jason A. Donenfeld
Hey Bruno,
Thanks for the heads up. Does this fix it?
https://git.zx2c4.com/WireGuard/commit/?id=dd007ad550b3def8a858e57aa718af9b00047a28
It looks like it fixed the problem. (At least device.o gets built.) But it seems there is another problem.
[bruno@wolff src]$ make clean all
make -C /lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src clean make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
CLEAN /home/bruno/WireGuard/src/.tmp_versions
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE' make -C tools clean
make[1]: Entering directory '/home/bruno/WireGuard/src/tools'
rm -f wg *.o *.d
make[1]: Leaving directory '/home/bruno/WireGuard/src/tools'
make -C /lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/build M=/home/bruno/WireGuard/src modules make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
CC [M] /home/bruno/WireGuard/src/main.o CC [M] /home/bruno/WireGuard/src/noise.o CC [M] /home/bruno/WireGuard/src/device.o CC [M] /home/bruno/WireGuard/src/peer.o CC [M] /home/bruno/WireGuard/src/timers.o CC [M] /home/bruno/WireGuard/src/data.o CC [M] /home/bruno/WireGuard/src/send.o CC [M] /home/bruno/WireGuard/src/receive.o CC [M] /home/bruno/WireGuard/src/socket.o CC [M] /home/bruno/WireGuard/src/config.o CC [M] /home/bruno/WireGuard/src/hashtables.o CC [M] /home/bruno/WireGuard/src/routingtable.o CC [M] /home/bruno/WireGuard/src/ratelimiter.o CC [M] /home/bruno/WireGuard/src/cookie.o
/home/bruno/WireGuard/src/cookie.c: In function ‘cookie_message_create’:/home/bruno/WireGuard/src/cookie.c:156:2: error: implicit declaration of function ‘get_random_bytes_wait’; did you mean ‘get_random_bytes_arch’? [-Werror=implicit-function-declaration]
get_random_bytes_wait(dst->nonce, COOKIE_NONCE_LEN);
^~~~~~~~~~~~~~~~~~~~~
get_random_bytes_arch
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:303: /home/bruno/WireGuard/src/cookie.o] Error 1
make[1]: *** [Makefile:1512: _module_/home/bruno/WireGuard/src] Error 2
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
make: *** [Makefile:28: module] Error 2
Quoted 9 lines · Bruno Wolff III
Quoted 7 lines · Jason A. Donenfeld
Hey Bruno,
Thanks for the heads up. Does this fix it?
https://git.zx2c4.com/WireGuard/commit/?id=3Ddd007ad550b3def8a858e57aa71=
8af9b00047a28
Quoted 3 lines
It looks like it fixed the problem. (At least device.o gets built.) But i=
t
Quoted 32 lines
seems there is another problem.
[bruno@wolff src]$ make clean all
make -C/lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/buildM=3D/home/bruno/WireGuard/src clean
make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'
CLEAN/home/bruno/WireGuard/src/.tmp_versions
make[1]: Leaving directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE' make -C tools clean
make[1]: Entering directory '/home/bruno/WireGuard/src/tools' rm -f wg *.o *.d
make[1]: Leaving directory '/home/bruno/WireGuard/src/tools' make -C/lib/modules/4.13.0-0.rc0.git3.1.fc27.i686+PAE/buildM=3D/home/bruno/WireGuard/src modules
make[1]: Entering directory '/usr/src/kernels/4.13.0-0.rc0.git3.1.fc27.i686+PAE'CC [M] /home/bruno/WireGuard/src/main.o CC [M] /home/bruno/WireGuard/src/noise.o CC [M] /home/bruno/WireGuard/src/device.o CC [M] /home/bruno/WireGuard/src/peer.o CC [M] /home/bruno/WireGuard/src/timers.o CC [M] /home/bruno/WireGuard/src/data.o CC [M] /home/bruno/WireGuard/src/send.o CC [M] /home/bruno/WireGuard/src/receive.o CC [M] /home/bruno/WireGuard/src/socket.o CC [M] /home/bruno/WireGuard/src/config.o CC [M] /home/bruno/WireGuard/src/hashtables.o CC [M] /home/bruno/WireGuard/src/routingtable.o CC [M] /home/bruno/WireGuard/src/ratelimiter.o CC [M] /home/bruno/WireGuard/src/cookie.o
Quoted 1 line
/home/bruno/WireGuard/src/cookie.c: In function =E2=80=98cookie_message_c=
reate=E2=80=99:
Quoted 2 lines
/home/bruno/WireGuard/src/cookie.c:156:2: error: implicit declaration of function =E2=80=98get_random_bytes_wait=E2=80=99; did you mean =E2=80=98g=
et_random_bytes_arch=E2=80=99?
Quoted 7 lines
[-Werror=3Dimplicit-function-declaration]
get_random_bytes_wait(dst->nonce, COOKIE_NONCE_LEN); ^~~~~~~~~~~~~~~~~~~~~
get_random_bytes_arch
cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:303:/home/bruno/WireGuard/src/cookie.o] Error 1
I need to annoy Ted Tso about this. It'll get merged for rc1 or rc2.
Jason
Quoted 2 lines · Jason A. Donenfeld
I need to annoy Ted Tso about this. It'll get merged for rc1 or rc2.
OK. I'll confirm when it builds again. I might try it out early if Tso has it in a public develoment tree before it gets to Linus' tree. This might show up other issues in things that build after cookie.o and so might be worthwhile even if building kernels from source is otherwise not usually worth the effort for me.
Quoted 4 lines · Jason A. Donenfeld
These two commits:
https://git.kernel.org/pub/scm/linux/kernel/git/tytso/random.git/patch/?id=e297a783e41560b44e3c14f38e420cba518113b8
https://git.kernel.org/pub/scm/linux/kernel/git/tytso/random.git/patch/?id=da9ba564bd683374b8d319756f312821b8265b06
I'm trying it out, but the kernel build will be slow and most likely I won't be able to test it until tomorrow afternoon.
(I'm cherry picking the two commits into Linus' current master. This doesn't include any patches Fedira is carrying.)
Quoted 2 lines · Jason A. Donenfeld
I need to annoy Ted Tso about this. It'll get merged for rc1 or rc2.
Linus merged it a couple of hours ago, so it will make rc1. I'll be able to use Fedora kernels again early next week. I'm going to build another kernel manually in the mean time. I'll let you know if there is a problem, otherwise we can consider this issued closed.
Nice! I was starting to loose faith in Ted. But glad we got this done...
If you haven't noticed, this is another piece of WireGuard that's gone upstream, with the compat/ section augmented for old kernels. Little by little, I'm hoping to move more into compat/ to get the controversial things upstream piecemeal without folks noticing. Shh, don't tell! Strategy seems to be working quite well. :)
Jason