Commit Graph

3176 Commits

Author SHA1 Message Date
christos f54caa8bd5 give it more time. 2017-05-24 15:29:51 +00:00
ozaki-r 1104a9e5a4 Enable DEBUG to know what is happening on anita/sparc 2017-05-24 09:34:48 +00:00
christos 505231416e Add the error in syscall failure. 2017-05-23 16:01:46 +00:00
christos 535d7bd162 not allowed to map RWX anymore. 2017-05-23 15:56:55 +00:00
christos c415a8906b Handle dk disks and print errors. 2017-05-23 13:04:29 +00:00
christos 268abfe922 there is no more UsePrivilegeSeparation 2017-05-22 21:22:30 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
riastradh 09956316a6 Remove MKCRYPTO_RC5. Unconditionally include RC5 in libcrypto.so.
This option existed only because RC5 is covered by patents that, twenty
years ago, we had reason to suspect the patent holder, RSA, Inc., might
litigate.  The two US patents in question are 5,724,428 and 5,835,600.

According to the USPTO Patent Term Calculator web site at
<https://www.uspto.gov/patent/laws-and-regulations/patent-term-calculator#heading-5>
(retrieved 2017-05-21), patents filed after 1995-06-07 expire twenty
years after the filing date.

number          filing date
5,724,428       1995-11-01
5,835,600       1997-04-21

Thus, these patents appear to be expired.

As proposed on tech-crypto and tech-security:

https://mail-index.netbsd.org/tech-crypto/2017/05/05/msg000718.html
https://mail-index.netbsd.org/tech-security/2017/05/05/msg000927.html
2017-05-21 14:20:44 +00:00
kre 79115595d5 Add a test of sh syntax & parsing (first attempt anyway.) 2017-05-20 16:35:55 +00:00
ozaki-r 0871e3e188 Enable debug logging of kernels such as ARP and ND if $DEUBG=true 2017-05-19 02:56:58 +00:00
ozaki-r 43af182f5e Don't check the existence of SA entries eagerly
They can be expired at that point if their lifetime is very short.
This may fix unexpected failures of tests running on anita.
2017-05-18 14:43:42 +00:00
martin 4fcb013cbf Add (currently failing) test cases for profiled programs. 2017-05-18 10:29:47 +00:00
ozaki-r 28c6f0e797 Test CARP handover on setups without having IPs on carpdev (shmif)
Note that tests for IPv6 don't pass yet; nd6 needs to handle CARP
correctly like arp does.
2017-05-18 06:34:48 +00:00
ozaki-r 9c1d2498f1 Reduce duplicated codes (DRY) 2017-05-18 06:33:49 +00:00
ozaki-r beade07f61 Add test cases of TCP communications with IPsec enabled
The test cases transfer data over TCP by using nc with IPsec just enabled
(no SA/SP is configured) and confirm the commit "Fix diagnostic assertion
failure in ipsec_init_policy" really fixes the issue.
2017-05-17 06:30:15 +00:00
kre 22a6d2dd08 More test sub-cases for the dollar_hash ( ${#...} ) test.
Upi really (really!) don't want to know!

Also, add a comment (in another section) and avoid giving messages
to atf_fail that include newlines - AFT really doesn't like that.
Instead, convert the \n's to ;'s so at least the content is retained.
2017-05-15 19:53:40 +00:00
ozaki-r fe20eadb23 Add test cases for SA lifetime 2017-05-15 09:58:22 +00:00
ozaki-r 12efcd61a3 Fix typo 2017-05-15 09:56:47 +00:00
kre c70ddc9b88 Add a test for opening files with exec "when" in posix mode (close-on-exec
should not get set.)  While here, remove the (unused) runhelper() function.
2017-05-14 17:28:46 +00:00
kre a30f469fdd Add a test case for the various ways that ${xxx} expansions, which
contain a # character, can get parsed (which amounts to 86 extra checks,
any Australian can tell you why I decided to stop there and not add one
more...)
2017-05-14 11:28:49 +00:00
kamil d1be05c0a9 Add new ATF C++ tests in usr.bin/c++: t_static_destructor
These tests are cloned from t_cxxruntime and check proper order of destructor
calls. They must be reported in reverse order of constructor completion.

Added tests:
 - static_destructor
 - static_destructor_pic
 - static_destructor_pie
 - static_destructor32

This test file replaces src/regress/usr.bin/c++/static_destructor.
2017-05-14 02:02:25 +00:00
kamil 179f19cf82 Use more C++ sugar in t_cxxruntime (ATF test) 2017-05-14 01:13:44 +00:00
kamil 9fab767d88 Add new ATF C++ tests in usr.bin/c++
These tests are cloned from t_hello and use c++ runtime basic functions.

Added tests:
 - hello
 - hello_pic
 - hello_pie
 - hello32
2017-05-14 01:03:21 +00:00
kamil b971227c60 Add new c++ ATF tests in usr.bin/c++: t_hello
This is a copy of t_hello from usr.bin/cc.

Added tests:
 - hello
 - hello_pic
 - hello_pie
 - hello32

These tests do not use c++ runtime library functions.

Protect these tests with MKCXX.
2017-05-14 00:07:07 +00:00
kamil 4dde76f99d Correct hellp_pic ATF test in usr.bin/cc
Drop "-dPIC", this is misspelled "-DPIC" option for libtool.
Enhance code example to be more pedantic.
2017-05-13 23:51:39 +00:00
ozaki-r e106de3177 Dedup some routines 2017-05-12 02:34:45 +00:00
ozaki-r cb7a3799fb Test tunnel mode with IPv4 over IPv6 and IPv6 over IPv4 2017-05-10 09:08:25 +00:00
ozaki-r f70653090a Disable DAD rather than waiting its completion every time 2017-05-10 09:00:29 +00:00
ozaki-r 27f51fa5d6 Dedup some routines 2017-05-10 08:59:40 +00:00
ozaki-r 0eb085d9dc Introduce check_sa_entries to remove lots of duplicated codes 2017-05-10 04:46:13 +00:00
ozaki-r 63d8d68bc2 Test flushing SAD/SPD entries 2017-05-09 04:25:28 +00:00
joerg 4f77b889d0 Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
2017-05-06 21:34:51 +00:00
kamil d4cc32a150 Improve style of PT_SETSTEP and PT_CLEARSTEP tests in t_ptrace_wait*
No functional change.

Sponsored by <The NetBSD Foundation>
2017-05-03 19:46:54 +00:00
pgoyette 45d3394e0e Fix detection of expected results. The rump kernel code apparently
includes source-code line numbers in the messages, so rather than
hard-coding them in the test, just use a reg-ex to match the text.

Fixes PR bin/52207
2017-05-03 12:09:41 +00:00
kamil a9391cc9b5 Fix typo in ATF test t_strtoi.c
No functional change.
2017-04-28 19:01:01 +00:00
ozaki-r 1926b285fc Test transport mode as well as tunnel mode 2017-04-27 10:17:12 +00:00
ozaki-r 15fbe23193 Prefer rijndael-cbc 2017-04-27 08:06:59 +00:00
ozaki-r 3c135203c7 Add test cases for L2TP/IPsec 2017-04-27 06:53:44 +00:00
ozaki-r 9b089297f0 Add test cases for gif/IPsec 2017-04-27 06:52:45 +00:00
ozaki-r 881bdf498c Add minimum sets of algorithms for testing 2017-04-27 06:50:42 +00:00
christos d30a2b5f27 - add range tests
- be more descriptive about errors
2017-04-26 14:52:57 +00:00
kre dfcb546256 If we are using the pad audio device, there must be a process with
the corresponding pad device open, or we get EIO from audio accesses

Explained and fix provided by Nathanial Sloss <nat@n.o>

Note: if we are testing and using real audio hardware, the open
of /dev/pad0 is irrelevant (but harmless, so we don't attempt to
check) and what's more it doesn't matter if it succeeds or fails.

If we're testing under qemu (or any other situation where the only
audio "hardware" is pad) then the open will work, and there should be
no more EIO.

If there is no audio hardware of any kind on the system being tested,
the attempt top open /dev/mixer should fail, and the test will be
skipped.
2017-04-20 00:17:11 +00:00
knakahara e7af88294b add opencrypto atf for CRYPTO_3DES_CBC and CRYPTO_AES_CBC(=CRYPTO_RIJNDAEL128_CBC). 2017-04-17 03:59:37 +00:00
riastradh 894367af71 Stress rump hyperentropy a little harder. 2017-04-16 18:24:23 +00:00
kamil b505cb2592 ATF test attach2/t_ptrace_wait* is unstable
Mark it broken with:

PR kern/52168 attach2:t_ptrace_wait* is unsable

In order to get reliable failure, abort this test at the end (if we get
there).
2017-04-16 13:09:40 +00:00
kamil 8cd63a3b3a Mark signal3/t_ptrace_wait* with timeout on sparc 32-bit
PR kern/52167 signal3/t_ptrace_wait* timeouts on sparc 32-bit

This test is also marked as failure on other platforms:

PR kern/51918 ptrace tracee can prevent tracer to get its signals by masking

Both issues are valid on sparc 32-bit, but the timeout one wins.
2017-04-16 12:50:59 +00:00
kamil a0fde0b9f7 Mark syscallemu1/t_ptrace_wait* broken on 32-bit sparc
PR kern/52166
2017-04-16 12:32:03 +00:00
kamil b1bdad9a86 Restore atf_tc_expect_fail in signal4 of t_ptrace_wait*
Accidentally there was removed a PR, it was never fixed.

PR 51918 "ptrace tracee can prevent tracer to get its signals by masking"
2017-04-16 12:03:25 +00:00
ozaki-r ef3b2c8cef Revert "Mark tests of tunnel/AH/IPv6 as expected failure (PR kern/52161)"
The issue was fixed by christos@
2017-04-16 10:34:49 +00:00
ozaki-r 47978ed2ef Mark tests of tunnel/AH/IPv6 as expected failure (PR kern/52161) 2017-04-14 03:35:40 +00:00