<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux, branch backport-5.4.y</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>http://git.waynecole.info/wireguard-linux/atom?h=backport-5.4.y</id>
<link rel='self' href='http://git.waynecole.info/wireguard-linux/atom?h=backport-5.4.y'/>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/'/>
<updated>2022-07-07T11:26:46Z</updated>
<entry>
<title>wireguard: selftests: use microvm on x86</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-07-07T00:31:55Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=75b996084918a6c2877ccb4808ecf715c6cfb438'/>
<id>urn:sha1:75b996084918a6c2877ccb4808ecf715c6cfb438</id>
<content type='text'>
commit b83fdcd9fb8ad7e59f4188ba9ec221917f463a17 upstream.

This makes for faster tests, faster compile time, and allows us to ditch
ACPI finally.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: always call kernel makefile</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-07-07T00:31:54Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=d464ac26e127868e565fbcdff0d3cb048a18be67'/>
<id>urn:sha1:d464ac26e127868e565fbcdff0d3cb048a18be67</id>
<content type='text'>
commit 1a087eec257154e26a81a7a0a15380d7a2431765 upstream.

These selftests are used for much more extensive changes than just the
wireguard source files. So always call the kernel's build file, which
will do something or nothing after checking the whole tree, per usual.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: set fake real time in init</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-07-07T00:31:52Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=d0d610c254ea3e8b0ced33a2853efb3a2e8ee9f9'/>
<id>urn:sha1:d0d610c254ea3e8b0ced33a2853efb3a2e8ee9f9</id>
<content type='text'>
commit 829be057dbc1e71383b8d7de8edb31dcf07b4aa0 upstream.

Not all platforms have an RTC, and rather than trying to force one into
each, it's much easier to just set a fixed time. This is necessary
because WireGuard's latest handshakes parameter is returned in wallclock
time, and if the system time isn't set, and the system is really fast,
then this returns 0, which trips the test.

Turning this on requires setting CONFIG_COMPAT_32BIT_TIME=y, as musl
doesn't support settimeofday without it.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: set panic_on_warn=1 from cmdline</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:20Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=b33b459a4c28a40e53c812afd8e40caff2e436ed'/>
<id>urn:sha1:b33b459a4c28a40e53c812afd8e40caff2e436ed</id>
<content type='text'>
commit 3fc1b11e5d7278437bdfff0e01f51e777eefb222 upstream.

Rather than setting this once init is running, set panic_on_warn from
the kernel command line, so that it catches splats from WireGuard
initialization code and the various crypto selftests.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: bump package deps</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:19Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=19b81aa9ed3358d08e4b691d8dd2ad88d38b3e34'/>
<id>urn:sha1:19b81aa9ed3358d08e4b691d8dd2ad88d38b3e34</id>
<content type='text'>
commit a6b8ea9144340c0aaa66c817a3bbb6bca47f0321 upstream.

Use newer, more reliable package dependencies. These should hopefully
reduce flakes. However, we keep the old iputils package, as it
accumulated bugs after resulting in flakes on slow machines.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: restore support for ccache</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:18Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=b16c995fe5656941cdab37ac6fea252f5cebf83b'/>
<id>urn:sha1:b16c995fe5656941cdab37ac6fea252f5cebf83b</id>
<content type='text'>
commit d261ba6aa411e03c27da266b7df4bef771e8105e upstream.

When moving to non-system toolchains, we inadvertantly killed the
ability to use ccache. So instead, build ccache support into the test
harness directly.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: use newer toolchains to fill out architectures</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:17Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=7bae33e788ef78f8b93b32545d4395addb70d375'/>
<id>urn:sha1:7bae33e788ef78f8b93b32545d4395addb70d375</id>
<content type='text'>
commit d5d9b29bc963cc084c5c0f3a7c28e2632a22e0c4 upstream.

Rather than relying on the system to have cross toolchains available,
simply download musl.cc's ones and use that libc.so, and then we use it
to fill in a few missing platforms, such as s390x and powerpc64.

Also, on arm, use virtio's serial port to avoid having to patch QEMU.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: limit parallelism to $(nproc) tests at once</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:16Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=3df15ef0911a727f0a0b7d89bcaf4ab583498884'/>
<id>urn:sha1:3df15ef0911a727f0a0b7d89bcaf4ab583498884</id>
<content type='text'>
commit 39f02bf1e5ce9d72045de01e3d618ade1067158c upstream.

The parallel tests were added to catch queueing issues from multiple
cores. But what happens in reality when testing tons of processes is
that these separate threads wind up fighting with the scheduler, and we
wind up with contention in places we don't care about that decrease the
chances of hitting a bug. So just do a test with the number of CPU
cores, rather than trying to scale up arbitrarily.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: selftests: make routing loop test non-fatal</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-04T20:29:15Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=4fa8bc1fdd6d843f8d6a1d6a78dda2cf8baab0c2'/>
<id>urn:sha1:4fa8bc1fdd6d843f8d6a1d6a78dda2cf8baab0c2</id>
<content type='text'>
commit ae2de669c14a18b5144cdacf49933ad400ed7e1c upstream.

I hate to do this, but I still do not have a good solution to actually
fix this bug across architectures. So just disable it for now, so that
the CI can still deliver actionable results. This commit adds a large
red warning, so that at least the failure isn't lost forever, and
hopefully this can be revisited down the line.

Link: https://lore.kernel.org/netdev/CAHmME9pv1x6C4TNdL6648HydD8r+txpV4hTUXOBVkrapBXH4QQ@mail.gmail.com/
Link: https://lore.kernel.org/netdev/YmszSXueTxYOC41G@zx2c4.com/
Link: https://lore.kernel.org/wireguard/CAHmME9rNnBiNvBstb7MPwK-7AmAN0sOfnhdR=eeLrowWcKxaaQ@mail.gmail.com/
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>wireguard: device: check for metadata_dst with skb_valid_dst()</title>
<updated>2022-07-07T11:26:46Z</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>razor@blackwall.org</email>
</author>
<published>2022-04-21T13:48:05Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/wireguard-linux/commit/?id=5ea67e6bc9fa50223d3ef6348866af23ed39c297'/>
<id>urn:sha1:5ea67e6bc9fa50223d3ef6348866af23ed39c297</id>
<content type='text'>
commit 45ac774c33d834fe9d4de06ab5f1022fe8cd2071 upstream.

When we try to transmit an skb with md_dst attached through wireguard
we hit a null pointer dereference in wg_xmit() due to the use of
dst_mtu() which calls into dst_blackhole_mtu() which in turn tries to
dereference dst-&gt;dev.

Since wireguard doesn't use md_dsts we should use skb_valid_dst(), which
checks for DST_METADATA flag, and if it's set, then falls back to
wireguard's device mtu. That gives us the best chance of transmitting
the packet; otherwise if the blackhole netdev is used we'd get
ETH_MIN_MTU.

 [  263.693506] BUG: kernel NULL pointer dereference, address: 00000000000000e0
 [  263.693908] #PF: supervisor read access in kernel mode
 [  263.694174] #PF: error_code(0x0000) - not-present page
 [  263.694424] PGD 0 P4D 0
 [  263.694653] Oops: 0000 [#1] PREEMPT SMP NOPTI
 [  263.694876] CPU: 5 PID: 951 Comm: mausezahn Kdump: loaded Not tainted 5.18.0-rc1+ #522
 [  263.695190] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1.fc35 04/01/2014
 [  263.695529] RIP: 0010:dst_blackhole_mtu+0x17/0x20
 [  263.695770] Code: 00 00 00 0f 1f 44 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 47 10 48 83 e0 fc 8b 40 04 85 c0 75 09 48 8b 07 &lt;8b&gt; 80 e0 00 00 00 c3 66 90 0f 1f 44 00 00 48 89 d7 be 01 00 00 00
 [  263.696339] RSP: 0018:ffffa4a4422fbb28 EFLAGS: 00010246
 [  263.696600] RAX: 0000000000000000 RBX: ffff8ac9c3553000 RCX: 0000000000000000
 [  263.696891] RDX: 0000000000000401 RSI: 00000000fffffe01 RDI: ffffc4a43fb48900
 [  263.697178] RBP: ffffa4a4422fbb90 R08: ffffffff9622635e R09: 0000000000000002
 [  263.697469] R10: ffffffff9b69a6c0 R11: ffffa4a4422fbd0c R12: ffff8ac9d18b1a00
 [  263.697766] R13: ffff8ac9d0ce1840 R14: ffff8ac9d18b1a00 R15: ffff8ac9c3553000
 [  263.698054] FS:  00007f3704c337c0(0000) GS:ffff8acaebf40000(0000) knlGS:0000000000000000
 [  263.698470] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
 [  263.698826] CR2: 00000000000000e0 CR3: 0000000117a5c000 CR4: 00000000000006e0
 [  263.699214] Call Trace:
 [  263.699505]  &lt;TASK&gt;
 [  263.699759]  wg_xmit+0x411/0x450
 [  263.700059]  ? bpf_skb_set_tunnel_key+0x46/0x2d0
 [   263.700382]  ? dev_queue_xmit_nit+0x31/0x2b0
 [  263.700719]  dev_hard_start_xmit+0xd9/0x220
 [  263.701047]  __dev_queue_xmit+0x8b9/0xd30
 [  263.701344]  __bpf_redirect+0x1a4/0x380
 [  263.701664]  __dev_queue_xmit+0x83b/0xd30
 [  263.701961]  ? packet_parse_headers+0xb4/0xf0
 [  263.702275]  packet_sendmsg+0x9a8/0x16a0
 [  263.702596]  ? _raw_spin_unlock_irqrestore+0x23/0x40
 [  263.702933]  sock_sendmsg+0x5e/0x60
 [  263.703239]  __sys_sendto+0xf0/0x160
 [  263.703549]  __x64_sys_sendto+0x20/0x30
 [  263.703853]  do_syscall_64+0x3b/0x90
 [  263.704162]  entry_SYSCALL_64_after_hwframe+0x44/0xae
 [  263.704494] RIP: 0033:0x7f3704d50506
 [  263.704789] Code: 48 c7 c0 ff ff ff ff eb b7 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 2c 00 00 00 0f 05 &lt;48&gt; 3d 00 f0 ff ff 77 72 c3 90 55 48 83 ec 30 44 89 4c 24 2c 4c 89
 [  263.705652] RSP: 002b:00007ffe954b0b88 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
 [  263.706141] RAX: ffffffffffffffda RBX: 0000558bb259b490 RCX: 00007f3704d50506
 [  263.706544] RDX: 000000000000004a RSI: 0000558bb259b7b2 RDI: 0000000000000003
 [  263.706952] RBP: 0000000000000000 R08: 00007ffe954b0b90 R09: 0000000000000014
 [  263.707339] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe954b0b90
 [  263.707735] R13: 000000000000004a R14: 0000558bb259b7b2 R15: 0000000000000001
 [  263.708132]  &lt;/TASK&gt;
 [  263.708398] Modules linked in: bridge netconsole bonding [last unloaded: bridge]
 [  263.708942] CR2: 00000000000000e0

Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Link: https://github.com/cilium/cilium/issues/19428
Reported-by: Martynas Pumputis &lt;m@lambda.lt&gt;
Signed-off-by: Nikolay Aleksandrov &lt;razor@blackwall.org&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
</feed>
