<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux-compat/src/tests, branch master</title>
<subtitle>WireGuard kernel module backport for Linux 3.10 - 5.5</subtitle>
<id>https://git.zx2c4.com/wireguard-linux-compat/atom/src/tests?h=master</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux-compat/atom/src/tests?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/'/>
<updated>2022-06-22T15:14:00Z</updated>
<entry>
<title>compat: handle backported rng and blake2s</title>
<updated>2022-06-22T15:14:00Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-06-22T13:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=3ec3e822b615e8f07ed0dfc464e026bb508bbcdc'/>
<id>urn:sha1:3ec3e822b615e8f07ed0dfc464e026bb508bbcdc</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>qemu: give up on RHEL8 in CI</title>
<updated>2022-05-05T14:24:24Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-05T14:20:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=ba45dd6fbfe9f94baf3634a965bcfe6c2c41f4c8'/>
<id>urn:sha1:ba45dd6fbfe9f94baf3634a965bcfe6c2c41f4c8</id>
<content type='text'>
They keep breaking their kernel and being difficult when I send patches
to fix it, so just give up on trying to support this in the CI. It'll
bitrot and people will complain and we'll see what happens at that
point.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>qemu: set panic_on_warn=1 from cmdline</title>
<updated>2022-05-05T14:24:24Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-05T14:16:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=c7560fd0e0b5aba307a9cd5e9eb7c998a059c8a4'/>
<id>urn:sha1:c7560fd0e0b5aba307a9cd5e9eb7c998a059c8a4</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>qemu: use vports on arm</title>
<updated>2022-05-05T14:24:24Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-05-05T14:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=33c87a11109996e13a13259e0c488e590c15f760'/>
<id>urn:sha1:33c87a11109996e13a13259e0c488e590c15f760</id>
<content type='text'>
Rather than having to hack up QEMU, just use the virtio serial device.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>netns: limit parallelism to $(nproc) tests at once</title>
<updated>2022-05-05T14:08:26Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-04-30T20:20:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=894152a5b89655863b012b707643f66a06e1c60a'/>
<id>urn:sha1:894152a5b89655863b012b707643f66a06e1c60a</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>netns: make routing loop test non-fatal</title>
<updated>2022-05-05T14:07:27Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-04-27T01:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=f8886735e303b0483e67dd4d4671cd271d427588'/>
<id>urn:sha1:f8886735e303b0483e67dd4d4671cd271d427588</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>qemu: enable ACPI for SMP</title>
<updated>2022-04-06T16:01:04Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-04-06T16:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=f909532a213dd82a43becfb79d33d66fe5ecc411'/>
<id>urn:sha1:f909532a213dd82a43becfb79d33d66fe5ecc411</id>
<content type='text'>
It turns out that by having CONFIG_ACPI=n, we've been failing to boot
additional CPUs, and so these systems were functionally UP. The code
bloat is unfortunate for build times, but I don't see an alternative. So
this commit sets CONFIG_ACPI=y for x86_64 and i686 configs.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>qemu: simplify RNG seeding</title>
<updated>2022-03-02T23:10:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-02-22T15:04:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=ffb8cd62334ebc1880108f552bc07b9ac0a2ed33'/>
<id>urn:sha1:ffb8cd62334ebc1880108f552bc07b9ac0a2ed33</id>
<content type='text'>
We don't actualy need to write anything in the pool. Instead, we just
force the total over 128, and we should be good to go for all old
kernels. We also only need this on getrandom() kernels, which simplifies
things too.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>device: reset peer src endpoint when netns exits</title>
<updated>2021-12-03T22:24:03Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2021-11-29T18:52:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=68abb1b9ba6c9726ea108f796ae7d84f8553d620'/>
<id>urn:sha1:68abb1b9ba6c9726ea108f796ae7d84f8553d620</id>
<content type='text'>
Each peer's endpoint contains a dst_cache entry that takes a reference
to another netdev. When the containing namespace exits, we take down the
socket and prevent future sockets from being created (by setting
creating_net to NULL), which removes that potential reference on the
netns. However, it doesn't release references to the netns that a netdev
cached in dst_cache might be taking, so the netns still might fail to
exit. Since the socket is gimped anyway, we can simply clear all the
dst_caches (by way of clearing the endpoint src), which will release all
references.

However, the current dst_cache_reset function only releases those
references lazily. But it turns out that all of our usages of
wg_socket_clear_peer_endpoint_src are called from contexts that are not
exactly high-speed or bottle-necked. For example, when there's
connection difficulty, or when userspace is reconfiguring the interface.
And in particular for this patch, when the netns is exiting. So for
those cases, it makes more sense to call dst_release immediately. For
that, we add a small helper function to dst_cache.

This patch also adds a test to netns.sh from Hangbin Liu to ensure this
doesn't regress.

Test-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Reported-by: Xiumei Mu &lt;xmu@redhat.com&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>netns: actually test for routing loops</title>
<updated>2021-12-03T22:24:03Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2021-11-29T18:43:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux-compat/commit/?id=cb001d454024a01256fc269c64e364752a0e7c60'/>
<id>urn:sha1:cb001d454024a01256fc269c64e364752a0e7c60</id>
<content type='text'>
We previously removed the restriction on looping to self, and then added
a test to make sure the kernel didn't blow up during a routing loop. The
kernel didn't blow up, thankfully, but on certain architectures where
skb fragmentation is easier, such as ppc64, the skbs weren't actually
being discarded after a few rounds through. But the test wasn't catching
this. So actually test explicitly for massive increases in tx to see if
we have a routing loop. Note that the actual loop problem will need to
be addressed in a different commit.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
</feed>
