Commit Graph

4293 Commits

Author SHA1 Message Date
gson
9c5137ef5c Format PR references consistently so that they can be automatically
turned into links in HTML reports.
2020-09-01 18:40:09 +00:00
riastradh
4131d8f567 tests/net/if_wg: Allow one second of leeway for rekey. 2020-08-31 20:32:58 +00:00
martin
fb1355a7bc Skip timeout tests, pointing to PR 55632. 2020-08-31 14:03:56 +00:00
tih
e76a1fdd82 Update the if_wg tests for the human readable 'latest-handshake'
output of wgconfig.
2020-08-29 07:22:49 +00:00
martin
f834934d77 Skip threxec test pointing at PR 55338, this kills some test beds. 2020-08-29 05:46:34 +00:00
martin
e1e4474c3c Also skip the stress_short test - it just needs way too long to timeout
and fail.
2020-08-28 19:35:07 +00:00
martin
18c37829c4 lockme_DOUBLEINIT:
The failure message differs slightly when using LOCKDEBUG, modify the
expected pattern to cover both variants.
2020-08-28 19:29:58 +00:00
martin
6cd60e7467 Skip a few tests with reference to already existing PRs as after "recent"
scheduler changes these tests now leave rump_server processes around that
eat CPU and disturb later tests.
2020-08-28 19:14:17 +00:00
christos
7865465b60 PR/55612: Martin Husemann: libarchive tests pollute /tmp w/o cleanup
Set $TMPDIR to where we are.
2020-08-28 18:46:05 +00:00
riastradh
4a9d230258 Nix trailing whitespace. 2020-08-28 14:18:29 +00:00
christos
fb880abaf0 When running the tests with atf-run the directory we are running in is
drwx------ so when we change to a different user, we can't find the socket
we created.

Make a directory and put the socket in there. Of course now atf can't
record its results as a different user, but that is not fatal.

tc-se:FATAL ERROR: Cannot create results file '/tmp/atf-run.9vOjFd/tcr': \
Permission denied
2020-08-28 13:56:29 +00:00
christos
33a3e8378d Remove unneeded sete{u,g}id pointed out by kre.
Remove dup unlink.
2020-08-28 11:46:05 +00:00
christos
52d4f80613 - when running as root, create the socket under a different uid/gid to verify
that it works properly with different users opening the socket.
- verify that linux works the same for both getpeereid() and fstat()
2020-08-27 14:00:01 +00:00
riastradh
03c60d1bc0 wg: Check mbuf chain length before m_copydata. 2020-08-27 02:52:33 +00:00
riastradh
5ec0ae9a4b Use wgconfig as intended to show diagnostics, not a usage message. 2020-08-27 02:51:49 +00:00
christos
ac4837d560 Check that fstat returns the correct socket owner 2020-08-26 22:52:58 +00:00
riastradh
25154f5f0c Clarify wg(4)'s relation to WireGuard, pending further discussion.
Still planning to replace wgconfig(8) and wg-keygen(8) by one wg(8)
tool compatible with wireguard-tools; update wg(4) for the minor
changes from the 2018-06-30 spec to the 2020-06-01 spec; &c.  This just
clarifies the current state of affairs as it exists in the development
tree for now.

Mark the man page EXPERIMENTAL for extra clarity.
2020-08-26 16:03:40 +00:00
gson
9d42296eb9 Only expect the fmod test case to fail when using qemu's TCG CPU emulation,
and not under hardware virtualization such as qemu -accel nvmm.
2020-08-25 13:39:16 +00:00
riastradh
c9aa4f445f Fix getrandom() tests.
Use sigaction() without SA_RESTART -- signal() implies SA_RESTART so
we never got the EINTR.

While here, reduce the timeout to something more reasonable so we
don't waste 20min of testbed time if anything goes wrong and the
one-second alarm doesn't fire.
2020-08-25 01:37:38 +00:00
gson
59b669221c Expect a failure to trap unaligned acesses only when running under
qemu's TCG CPU emulation, not when running under hardware virtualization
such as qemu -accel nvmm.
2020-08-24 06:55:16 +00:00
riastradh
284084a72c Nix trailing whitespace. 2020-08-23 22:34:29 +00:00
riastradh
bbfb23c92a Split getrandom tests into several cases to find out which ones hang. 2020-08-23 17:50:19 +00:00
perseant
5e1ae64c39 Expand test to cover more failure cases. Change from skipped to expect fail
in anticipation of working roll-forward code.
2020-08-23 16:03:54 +00:00
ryo
8c1c74cde8 adjust the number of spaces to match the current df(1) output.
fix NetBSD PR/55600

TODO: it should not be dependent on the number of spaces.
2020-08-23 15:51:30 +00:00
gson
bd4d304f2b Expect failure only when running under qemu's TCG CPU emulation, not
when running under hardware virtualization such as qemu -accel nvmm.
2020-08-23 11:04:58 +00:00
gson
3b030f477c Provide separate functions to check for running under qemu in general
and for running under qemu's built-in TCG CPU emulation (as opposed to
hardware virtualization via NVMM or KVM).
2020-08-23 11:00:18 +00:00
riastradh
61fd7d67f5 [ozaki-r] Add wg files 2020-08-20 21:28:00 +00:00
riastradh
a14187eca5 [ozaki-r] Changes to the kernel core for wireguard 2020-08-20 21:21:31 +00:00
riastradh
f1323c812d Nix trailing whitespace. 2020-08-20 13:58:30 +00:00
riastradh
f3d2f6ec55 clang can't handle __aligned on anonymous structure initializers. 2020-08-20 13:33:54 +00:00
gson
b134f0a332 Add cleanup of possible leftover rump processes, replacing the
non-working cleanup code just removed from ffs_common.sh.  Fixes
PR bin/48892 with respect to the t_rquotad test.
2020-08-20 07:32:40 +00:00
gson
912167fe43 Remove non-functional cleanup code from test_case() and test_case_root().
It had no effect because RUMP_SOCKETS_LIST is not set in the shell
running the cleanup phase.  Even if RUMP_SOCKETS_LIST had been set,
the code would still not have worked correctly because it ran
rump.halt via "atf_check -s exit:1", which would cause the first
successful halting of a rump processes to be treated as a failure
and abort the cleanup without halting any other rump processes still
running.
2020-08-20 07:23:20 +00:00
perseant
c7e481e284 Add skipped test for in-kernel roll-forward agent 2020-08-18 03:02:50 +00:00
riastradh
7f7b51ca34 Make the AES and ChaCha NEON tests work in softfloat userland.
(`Softfloat' here refers to the ABI, which of course may be running
on a CPU with NEON.)
2020-08-17 16:26:02 +00:00
gson
de5f9e0f37 Remove unused function rump_shutdown() 2020-08-17 06:18:39 +00:00
martin
9c197a80ad Restrict the NEON code to v7hf - the softfloat toolchain does not like
it (nor is it likely to work if there is no FPU present).
2020-08-16 15:52:14 +00:00
mlelstv
8f599c8a78 Plaintext buffers are used directly for write() operations to the raw device.
Align them to the needs of cgd(4).
2020-08-15 10:03:10 +00:00
rillig
edce479061 make(1): mark tests impsrc and phony-end as no longer failing
These tests have been adjusted to demonstrate the current behavior,
mentioning the expected behavior in comments.
2020-08-15 01:50:54 +00:00
martin
41db1294c8 Fix C++ file suffix (.cpp -> .cc) 2020-08-14 06:23:49 +00:00
martin
b220268543 Fix a few copy + pastos, simplify shell arithmetic 2020-08-14 05:22:25 +00:00
riastradh
bdad8b2721 New system call getrandom() compatible with Linux and others.
Three ways to call:

getrandom(p, n, 0)              Blocks at boot until full entropy.
                                Returns up to n bytes at p; guarantees
                                up to 256 bytes even if interrupted
                                after blocking.  getrandom(0,0,0)
                                serves as an entropy barrier: return
                                only after system has full entropy.

getrandom(p, n, GRND_INSECURE)  Never blocks.  Guarantees up to 256
                                bytes even if interrupted.  Equivalent
                                to /dev/urandom.  Safe only after
                                successful getrandom(...,0),
                                getrandom(...,GRND_RANDOM), or read
                                from /dev/random.

getrandom(p, n, GRND_RANDOM)    May block at any time.  Returns up to n
                                bytes at p, but no guarantees about how
                                many -- may return as short as 1 byte.
                                Equivalent to /dev/random.  Legacy.
                                Provided only for source compatibility
                                with Linux.

Can also use flags|GRND_NONBLOCK to fail with EWOULDBLOCK/EAGAIN
without producing any output instead of blocking.

- The combination GRND_INSECURE|GRND_NONBLOCK is the same as
  GRND_INSECURE, since GRND_INSECURE never blocks anyway.

- The combinations GRND_INSECURE|GRND_RANDOM and
  GRND_INSECURE|GRND_RANDOM|GRND_NONBLOCK are nonsensical and fail
  with EINVAL.

As proposed on tech-userlevel, tech-crypto, tech-security, and
tech-kern, and subsequently adopted by core (minus the getentropy part
of the proposal, because other operating systems and participants in
the discussion couldn't come to an agreement about getentropy and
blocking semantics):

https://mail-index.netbsd.org/tech-userlevel/2020/05/02/msg012333.html
2020-08-14 00:53:15 +00:00
knakahara
57870677c1 Fix missing "-m tranport" options. Pointed out by k-goda@IIJ.
Using any mode SA causes unepected call path, that is,
ipsec4_common_input_cb() calls ip_input() directly instead of
ipsecif4_input().
2020-08-05 01:10:50 +00:00
riastradh
7a8eb9a111 Implement 4-way vectorization of ChaCha for armv7 NEON.
cgd performance is not as good as I was hoping (~4% improvement over
chacha_ref.c) but it should improve substantially more if we let the
cgd worker thread keep fpu state so we don't have to pay the cost of
isb and zero-the-fpu on every 512-byte cgd block.
2020-07-28 20:08:48 +00:00
riastradh
dadf58c832 It's __ARM_NEON, not __ARM_NEON__, sometimes, apparently. 2020-07-27 20:59:53 +00:00
riastradh
f7b532dd9f Enable ChaCha NEON code on armv7 too.
The 4-blocks-at-a-time assembly helper is disabled for now; adapting
it to armv7 is going to be a little annoying with only 16 128-bit
vector registers.

(Should also do a fifth block in the integer registers for 320 bytes
at a time.)
2020-07-27 20:51:29 +00:00
gson
e665c975ab Skip the repeated_link_addr test by default as it causes the
evbarm-aarch64 testbed to hang (PR port-evbarm/55521), and will not be
safe to run by default even after that bug is fixed, for similar
reasons as t_repeated_updown.
2020-07-27 16:57:44 +00:00
jruoho
3f94c7658e Use the new "run_unsafe" atf_config_get() option also with a couple of other
tests that are known to be unsafe.
2020-07-27 07:36:19 +00:00
gson
7836998153 Instead of just skipping interfaces that are "up", skip the whole
repeated_updown test case unless explicitly enabled with "atf-run -v
run_unsafe=yes".  Gratuitously configuring interfaces "up" is no more
safe than gratuitously configuring them "down"; for example, it could
lead to accidentally connecting to an insecure network or diverting
traffic from the desired route.
2020-07-27 06:52:48 +00:00
riastradh
ed8eacd373 Sort includes. 2020-07-26 14:01:14 +00:00
martin
9c03d654a9 Add missing include to fix the build on architectures w/o any special
accelerated AES implementation.
2020-07-26 12:43:27 +00:00