Commit Graph

16576 Commits

Author SHA1 Message Date
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
christos
c9979bce58 new openldap.h 2020-08-11 13:19:15 +00:00
rillig
c0e93ee0a8 make(1): add test for .USE combined with inference rule without commands
Discovered by christos.
2020-08-09 16:32:28 +00:00
rillig
0a54428996 make(1): add test for non-obvious .MAKE.EXPORTED edge case 2020-08-09 12:59:16 +00:00
rillig
98f2f3e4fd make(1): add test for exporting variables 2020-08-07 19:24:27 +00:00
snj
61057d564f s/developement/development/ 2020-08-07 00:43:47 +00:00
snj
036ace7152 fix typo.
new sentence, new line.
2020-08-07 00:27:11 +00:00
rillig
4d4fd97a93 make(1): add test for unintended "recursive variable" in -dL mode 2020-08-06 05:36:32 +00:00
jmcneill
4f13f64982 Add support for EC2 and resize root to AMD64 live images. 2020-08-05 01:35:18 +00:00
christos
fffaea8800 bump bind9 libs 2020-08-03 17:30:17 +00:00
christos
3293ee94c7 Make bind-9 arm obsolete for now since we lack the tools in base to build it. 2020-08-03 17:26:13 +00:00
rillig
35fd6fe173 make(1): in lint mode, disallow dynamic variable names in :@ modifier
This is an extremely obscure feature that hopefully nobody ever
considered using.
2020-08-03 15:43:31 +00:00
rillig
e2ff37d040 make(1): add test for nested VAR_SUBST assignments 2020-08-02 14:53:01 +00:00
rillig
ed8690bbc2 make(1): add test for braces in dependency lines
The comment at DirExpandCurly says something about "recursively", but the
nested braces don't work.

The manual page only mentions that "{} may be used", but it keeps quiet
about the exact meaning and also doesn't mention any nesting.
2020-07-31 16:42:51 +00:00
rillig
b12a565098 make(1): add test for setting .OBJDIR via the command line 2020-07-28 22:44:44 +00:00
rillig
1417e3eec0 make(1): add tests for parsing directives like .if and .info 2020-07-27 20:46:17 +00:00
rillig
05105f4250 make(1): add very basic test for archive handling
The whole code in arch.c had been uncovered by tests before.

The code coverage shows that neither the archive name nor the member
contain any $, even though archive.mk looks like it.  It could be
necessary to place the variable assignments below the dependency line,
to force late evaluation.
2020-07-27 18:51:03 +00:00
rillig
4c360672c6 make(1): add test for off-by-one error in Var_Parse 2020-07-26 22:15:36 +00:00
nia
afd659dfcd replace KDE with a desktop that's actually current in pkgsrc 2020-07-26 18:53:50 +00:00
christos
df1af03d3a extattr.3 is obsolete 2020-07-26 18:11:43 +00:00
jdolecek
6b6d7b2ff3 add rudimentary wwanc(4) manpage 2020-07-26 15:13:09 +00:00
riastradh
ddd4654428 Another /usr/libdata/usr/tests/sys/crypto/chacha set list entry.
(Why do we need this here _and_ in debug/mi?)
2020-07-26 14:22:22 +00:00
jmcneill
e18ed6ff5c Remove Arm OABI -> EABI change notice 2020-07-26 11:05:39 +00:00
jmcneill
8fcd3028c3 ARM -> Arm 2020-07-26 11:00:28 +00:00
jmcneill
32bd1eb491 Remove duplicate word 2020-07-26 10:58:59 +00:00
jmcneill
5c3f3fd6a3 List all supported Amlogic SoCs 2020-07-26 10:58:27 +00:00
jmcneill
74a4a39d4f Add i.MX8MQ 2020-07-26 10:55:36 +00:00
jmcneill
b136bcde77 ThunderX is covered by SBBR+SBSA 2020-07-26 10:52:17 +00:00
jmcneill
60b4f060be Add BCM2711 2020-07-26 10:51:57 +00:00
jmcneill
dbce5dc42f Clarify SBSA support 2020-07-26 10:50:26 +00:00
jmcneill
3d8b9252fb Note support for TI AM335x SoC 2020-07-26 10:49:05 +00:00
tsutsui
b99993626f Give syspkg name to Xsun server files. 2020-07-26 07:02:14 +00:00
riastradh
59613b8a1a Add kernel ChaCha test to exercise all available implementations. 2020-07-25 22:53:38 +00:00
rillig
91d1c0769c make(1): add newly added unit tests 2020-07-25 21:23:09 +00:00
nia
f72bfa2a9f upgrades to upgrade instructions 2020-07-24 12:41:20 +00:00
jmcneill
70370e75d4 evbmips: add ofctl(8) and /dev/openfirm support 2020-07-24 12:07:09 +00:00
jdolecek
9967176af4 <xen/xenio.h> is in fact used by the newly imported xentools 4.13,
reinstantiate it

header is for use by xentools only, which define domid_t themselves,
so it should not be a problem the header doesn't define it per PR port-xen/52874
2020-07-24 06:12:21 +00:00
nia
c121fe4afe freescale support in GENERIC 2020-07-23 14:10:25 +00:00
nia
2d4f770c75 more 9.0 hardware 2020-07-23 14:09:31 +00:00
tsutsui
a4cb5b71b6 Add .debug binaries for Xsun servers.
Note daily build.sh on releng.netbsd.org has MKDEBUG=yes
so local test builds should also include it.
2020-07-23 09:46:49 +00:00
tsutsui
32de12aea9 Add build glue for Xorg-Server-1.20'fied monolithic Xsun servers. 2020-07-22 20:54:07 +00:00
roy
a73ffa0270 Note the new resolvconf files 2020-07-22 19:02:01 +00:00
martin
31fc9817bb Split the local disk availability step into two phases to allow scripts
that pre-populate parts of the system (e.g. a tmpfs based /var) an
easy place to plug in like:

# REQUIRE: mountcritlocal
# BEFORE: MOUNTCRITLOCAL

This also cleans up the existing special handling a bit by separating it
into new scripts. All later scripts now depend on MOUNTCRITLOCAL.
Discussed on tech-userlevel some time ago.
2020-07-22 16:50:41 +00:00
nia
970d926d53 Fix location of device trees 2020-07-21 02:21:12 +00:00
nia
8555e3a676 missing e.g. 2020-07-18 18:11:46 +00:00
nia
fba738a313 more hardware 2020-07-18 18:09:42 +00:00
nia
879844e8a6 clarify 2020-07-18 17:45:11 +00:00
nia
65b55d2ec3 Initial evbarm upgrade instructions - need work 2020-07-18 17:40:14 +00:00
nia
3c1d32f8ae more contents 2020-07-18 17:20:59 +00:00
nia
4007c97d9d safe estimation of required storage 2020-07-18 17:10:23 +00:00
nia
ebf5b694b7 more modernization of evbarm install instructions 2020-07-18 16:41:14 +00:00
kamil
07e8492e26 Add ppoll() a compatibility wrapper around pollts(2)
Submitted by Apurva Nandan.
2020-07-17 15:34:16 +00:00
kamil
8d51512d13 man5/changelist.5 does not depend on MKPOSTFIX 2020-07-17 15:24:03 +00:00
jmcneill
4813953ca0 Create an "octeon.img.gz" bootable image for evbmips64-eb release builds. 2020-07-17 15:16:34 +00:00
jdolecek
4dc6094006 don't install xen/xenio.h and xen/xenio3.h anymore, xentools don't use it
PR port-xen/52874
2020-07-17 12:12:24 +00:00
simonb
bc6a081a98 Rename the evbmips ERLITE kernel to OCTEON now that it supports more
than just the EdgeRouter Lite.
2020-07-15 12:15:30 +00:00
jruoho
0eb7ac5e23 Add stub manual pages for /etc/changelist and /etc/pkgpath.conf.
Fixes PR bin/55477.
2020-07-13 09:10:34 +00:00
thorpej
26c5d1c962 Update pci_configure_bus(9) to reflect the new reality -- no more manual
fiddling with extent maps, use pciconf_resource_{init,add,fini}() instead.
2020-07-10 02:27:13 +00:00
uki
cc89970806 Rename base-termcap-share to base-terminfo-share in descrs 2020-07-09 10:42:44 +00:00
thorpej
b873b678a2 Add ./usr/share/wscons/fonts/spleen-8x16.fnt 2020-07-08 13:39:04 +00:00
christos
e6556af56e new mapped test. 2020-07-06 18:47:02 +00:00
chs
af5290a884 the x86 xen and non-xen modules are identical,
so remove the unneeded extra copies.
Xen kernels now use the same modules as native kernels.
2020-07-04 21:02:15 +00:00
roy
f8262fcce8 unbreak build, put /var/db/dhcpcd into the set lists 2020-07-03 12:53:27 +00:00
jruoho
9cb1df3cd3 Add a check for PR bin/54692. 2020-07-03 04:25:28 +00:00
jruoho
7bd1b83147 Add a check for the overflow noted in PR lib/46542. 2020-07-03 03:59:18 +00:00
lukem
08fb4e9235 Makefile.minirootkmod don't have SRCS 2020-07-02 08:48:10 +00:00
jruoho
4704e28c3f Add basic checks for magic symlink(7)'s. These include a case for PR lib/55361,
although it seems that realpath(3) has bigger problems with these symlinks.
2020-07-01 13:49:26 +00:00
jruoho
55abcd082f Add basic checks for a64l(3), l64a(3), and l64a_r(3). 2020-07-01 07:16:37 +00:00
lukem
41b765e18c fix sets for MKKYUA 2020-06-30 23:51:47 +00:00
riastradh
bd9707e06e New test sys/crypto/aes/t_aes.
Runs aes_selftest on all kernel AES implementations supported on the
current hardware, not just the preferred one.
2020-06-30 20:32:10 +00:00
jruoho
2ba250a115 After a comedy of errors, move t_mbtowc to its final resting place. 2020-06-30 16:09:40 +00:00
jruoho
8b2d29b6bf Check that DTrace's execsnoop and opensnoop work (cf. PR kern/53417). 2020-06-30 14:30:49 +00:00
jruoho
e643f0ea97 Add a couple of tests for sequential ifconfig(8) options, incl. PR kern/41912. 2020-06-30 11:48:20 +00:00
riastradh
04a6492d1e New cgd cipher adiantum.
Adiantum is a wide-block cipher, built out of AES, XChaCha12,
Poly1305, and NH, defined in

   Paul Crowley and Eric Biggers, `Adiantum: length-preserving
   encryption for entry-level processors', IACR Transactions on
   Symmetric Cryptology 2018(4), pp. 39--61.

Adiantum provides better security than a narrow-block cipher with CBC
or XTS, because every bit of each sector affects every other bit,
whereas with CBC each block of plaintext only affects the following
blocks of ciphertext in the disk sector, and with XTS each block of
plaintext only affects its own block of ciphertext and nothing else.

Adiantum generally provides much better performance than
constant-time AES-CBC or AES-XTS software do without hardware
support, and performance comparable to or better than the
variable-time (i.e., leaky) AES-CBC and AES-XTS software we had
before.  (Note: Adiantum also uses AES as a subroutine, but only once
per disk sector.  It takes only a small fraction of the time spent by
Adiantum, so there's relatively little performance impact to using
constant-time AES software over using variable-time AES software for
it.)

Adiantum naturally scales to essentially arbitrary disk sector sizes;
sizes >=1024-bytes take the most advantage of Adiantum's design for
performance, so 4096-byte sectors would be a natural choice if we
taught cgd to change the disk sector size.  (However, it's a
different cipher for each disk sector size, so it _must_ be a cgd
parameter.)

The paper presents a similar construction HPolyC.  The salient
difference is that HPolyC uses Poly1305 directly, whereas Adiantum
uses Poly1395(NH(...)).  NH is annoying because it requires a
1072-byte key, which means the test vectors are ginormous, and
changing keys is costly; HPolyC avoids these shortcomings by using
Poly1305 directly, but HPolyC is measurably slower, costing about
1.5x what Adiantum costs on 4096-byte sectors.

For the purposes of cgd, we will reuse each key for many messages,
and there will be very few keys in total (one per cgd volume) so --
except for the annoying verbosity of test vectors -- the tradeoff
weighs in the favour of Adiantum, especially if we teach cgd to do
>>512-byte sectors.

For now, everything that Adiantum needs beyond what's already in the
kernel is gathered into a single file, including NH, Poly1305, and
XChaCha12.  We can split those out -- and reuse them, and provide MD
tuned implementations, and so on -- as needed; this is just a first
pass to get Adiantum implemented for experimentation.
2020-06-29 23:44:01 +00:00
fcambus
ad2873740c Add font files for Spleen, which can be loaded into the wsfont pool
or a wscons display device using wsfontload(8).

For example, Spleen 16x32 can be loaded and enabled as follow:

wsfontload -N spleen-16x32 -w 16 -h 32 spleen-16x32.fnt
wsconsctl -dw font=spleen-16x32
2020-06-28 14:26:18 +00:00
rillig
068560b5e3 make(1): demonstrate bug when evaluating conditions 2020-06-28 09:42:40 +00:00
pgoyette
4e70e0c622 Add missing debug entry for new t_mbtowc
XXX Please note that there are now TWO tests named t_mbtowc - this one in
XXX tests/lib/libc/stdlib/ and an older one in tests/lib/libc/locale
XXX I don't know if the functionality is duplicated or not.
2020-06-28 01:38:39 +00:00
christos
465626063e fix the build 2020-06-27 18:03:52 +00:00
jruoho
7725c11dd6 Add also a test that writes random garbage to every ifconfig(8) option that
takes parameters. Based on quick testing, iwn(4) and wm(4) pass, but
urtwn(4) panics. Use at your own risk; in some cases, it may be possible
that horrors are written directly to the hardware.
2020-06-27 13:53:43 +00:00
jruoho
14dd606bd8 Add t_t_mbtowc. 2020-06-27 10:15:50 +00:00
jruoho
f60c53b495 Move the test for mktemp(3) to the right place. 2020-06-27 09:45:57 +00:00
jruoho
313072e773 Add a simple test case that writes random garbage to (almost) every sysctl node.
This test reproduced already at least five unique panics in a few quick runs.
The test is skipped by default as it is not likely safe even without the panics.
2020-06-27 08:50:46 +00:00
jruoho
b61f0fee17 Add a basic test for enabling/disabling network interface capabilities. 2020-06-27 06:57:44 +00:00
rin
77128b9fa3 Remove stale comments. 2020-06-27 05:39:07 +00:00
jruoho
78bd8e59f5 Add a test case for PR kern/53767. 2020-06-27 05:20:34 +00:00
jruoho
dc018d6b62 Add test cases for different 802.11 options. These include cases for
PR kern/35045, PR kern/45745, and PR kern/55424.
2020-06-27 05:07:07 +00:00
jruoho
f5fa72a2a9 Test creating thousands of bridge(4)'s. Unlike with tap(4) (PR kern/55417),
this test succeeeds. It is even possible to have the ultimate ifconfig(8)
output with more than 65,000 devices.
2020-06-25 18:30:42 +00:00
jruoho
9611465bb1 Verify that PR kern/52150 is no longer present. 2020-06-25 17:08:32 +00:00
jruoho
2a70c17495 Add a test case for PR kern/52744, which no longer appears to be present. 2020-06-25 16:16:48 +00:00
jruoho
0f5766374a Add a test case for kern/52771. 2020-06-25 15:41:40 +00:00
jruoho
77e941ddd2 Add a test case for PR kern/53410. 2020-06-25 15:01:35 +00:00
jruoho
5c3bd061a3 Add test cases for PR kern/53546 and PR kern/55417. Both are skipped as
both reproduce panics.
2020-06-25 14:24:45 +00:00
jruoho
55d0ca692c Check that fstat(1) works (cf. PR kern/55407). 2020-06-24 10:05:07 +00:00
jruoho
3f1bde296f Add a few checks for stdethers(8) and stdhosts(8). 2020-06-24 09:47:17 +00:00
jruoho
d60b9b731a Add few basic tests for cpuctl(8). These cover PR kern/45117 and PR bin/54220.
Though, the former is not explicitly tested as it hangs the system.
2020-06-24 09:32:41 +00:00
jruoho
27ee1d2935 Add a test case for bin/54620. 2020-06-24 09:21:43 +00:00
jruoho
6ecb6de692 Add a test case for PR bin/55389. 2020-06-24 09:11:26 +00:00
rin
5d002ee84c Fix prefix for previous. 2020-06-23 21:34:44 +00:00
maxv
61584588ce kernel_sanitizers.7 2020-06-23 16:08:46 +00:00
martin
4a198ac36d Pass the name of the compressor actually used for sets to groff and use
it in the content description (XXX need to adapt a few more copies in,
as of now, unaffected architectures)
2020-06-23 06:28:01 +00:00
maya
76dccf74d6 Mention that USE_XZ_SETS are either always xzipped, and in evbarm might
be xzipped or gzipped.
2020-06-22 12:03:46 +00:00
thorpej
2d473240cd Add evbmips installboot board data. 2020-06-21 17:15:51 +00:00
tsutsui
69b4acc8fa Provide wdboot as a link of sdboot for Milan also in sysinst.
See the following commit log for details:
 https://mail-index.netbsd.org/source-changes/2018/03/04/msg092779.html
2020-06-18 18:14:06 +00:00
thorpej
4abc8d232e Add vmem_xfreeall(), which frees all allocated regions in the specified arena.
All outstanding allocations MUST have been performed with vmem_xalloc() or
else the behavior is undefined.  (This also implies that the arena must also
not have a quantum cache; note this in the documentation.)
2020-06-16 01:29:00 +00:00
christos
29d11e7e15 For MKREPRO builds:
1. compute cur_date from the timestamp
2. pass the date to groff so that it can set its registers
2020-06-16 00:45:56 +00:00
christos
f0e4e4213c Add compatfile to libblacklist 2020-06-15 23:41:55 +00:00
christos
2f0bfbf344 Rename blacklist -> blocklist 2020-06-15 01:57:29 +00:00
christos
6241e0b790 bump libmagic 2020-06-15 00:39:03 +00:00
tsutsui
98121728df Put a message in build error logs to notify what this target builds. 2020-06-14 05:10:33 +00:00
tsutsui
9dd46b30d9 Use more shrinked x_foo binaries. 2020-06-13 19:15:43 +00:00
roy
b05648aa26 Remove in-kernel handling of Router Advertisements
This is much better handled by a user-land tool.
Proposed on tech-net here:
https://mail-index.netbsd.org/tech-net/2020/04/22/msg007766.html

Note that the ioctl SIOCGIFINFO_IN6 no longer sets flags. That now
needs to be done using the pre-existing SIOCSIFINFO_FLAGS ioctl.

Compat is fully provided where it makes sense, but trying to turn on
RA handling will obviously throw an error as it no longer exists.

Note that if you use IPv6 temporary addresses, this now needs to be
turned on in dhcpcd.conf(5) rather than in sysctl.conf(5).
2020-06-12 11:04:44 +00:00
jmcneill
e6ecdc649f Build i.MX7D dtbs for armv7 2020-06-10 18:53:31 +00:00
kamil
4228f24a2e Build and install llvm-symbolizer for MKLLVM=yes
llvm-symbolizer is an alternative for GNU addr2line(1), heavily used by the
LLVM sanitizers.

Do not install it as tools as it is not necessary as of today in that
stage.
2020-06-09 21:50:32 +00:00
maxv
3e534f26ae install fault.h 2020-06-08 16:36:18 +00:00
rin
b7016d1c78 Remove t_proplib.debug from debug/shl.mi, which is built regardless of MKPIC,
and has been moved into debug/mi.
2020-06-08 05:05:43 +00:00
rin
fe5c2a10ab For /usr/libdata/debug/usr/tests/lib/libprop
- Obsolete t_basic.debug and
- Add t_proplib.debug
2020-06-08 02:54:41 +00:00
thorpej
87f84208ec One more libprop-related cat pages fixup. 2020-06-07 14:55:13 +00:00
martin
f12e2cb828 Fix debug sets for libprop changes 2020-06-07 10:24:50 +00:00
thorpej
a792b8435e Improvements to the problib(3) API:
==> Provide a much more complete set of setters and getters for different
    value types in the prop_array_util(3) and prop_dictionary_util(3)
    functions.

==> Overhaul the prop_data(3), prop_number(3), and prop_string(3) APIs
    to be easier to use and less awkwardly named,  Deprecate the old
    awkward names, and produce link-time warnings when they are referenced.

==> Deprecate mutable prop_data(3) and prop_string(3) objects.  The old
    APIs that support them still exist, but will now produce link-time
    warnings when used.

==> When the new prop_string(3) API is used, strings are internally
    de-duplicated as a memory footprint optimization.

==> Provide a rich set of bounds-checked gettter functions in and a
    corresponding set of convenience setters in the prop_number(3) API.

==> Add a new prop_bool_value(3) function that is equivalent to
    prop_bool_true(3), but aligned with the new "value" routines in
    prop_data(3), prop_string(3), and prop_number(3).
2020-06-06 21:25:59 +00:00
roy
08dd032c7f dhcpcd: re-obsolete the chroot sub dirs
Ordering matters - dhcpcd needs to be fixed before obsolete for postinstall
2020-06-04 14:08:16 +00:00
rin
58c9080053 Manifest that we need liblzma only when USE_XZ_SETS is enabled. 2020-06-03 07:06:18 +00:00
rin
ff75e2ce53 x_gzip need liblzma for xz support. 2020-06-03 06:36:44 +00:00
rin
cc266ebf05 Add missing compat debug symbols only available for llvm && dtrace. 2020-06-03 02:55:17 +00:00
roy
475e97d322 dhcpcd: delete the obsolete chroot paths
postinstall will take care of it.
2020-06-02 19:15:15 +00:00
jmcneill
df8cb9d11d Revert previous; always use the same INSTIMAGEMB size regardless of
MKDEBUG. Should fit now that USE_XZ_SETS=yes on aarch64.
2020-06-02 14:27:32 +00:00
jmcneill
af0e7b8750 Use a larger INSTIMAGEMB value for MKDEBUG builds 2020-06-02 10:41:30 +00:00
jmcneill
65519e6f7f Exclude ramdisk images and empty instkernel directory 2020-06-02 01:34:50 +00:00
roy
e6c8f49786 Revert prior - mark dirs as obsolete.
Thanks wiz@
2020-05-31 13:07:50 +00:00
roy
79d62731fd We don't install any chroot subdirs for dhcpcd anymore 2020-05-31 13:00:48 +00:00
christos
e4bfa5b301 Make libuv private, requested by joerg@ 2020-05-30 20:47:58 +00:00
jmcneill
6b1f2fdc7f Make room for debug sets 2020-05-30 12:36:37 +00:00
tsutsui
4cfa80aabb Shrink ramdisk to make RAMDISK kernel smaller for ARC BIOS restriction. 2020-05-29 23:12:12 +00:00
jmcneill
3123321d90 Shrink the evbarm install image by not including the live images on the install media 2020-05-28 19:20:57 +00:00
christos
dc08c496a4 bump openssh 2020-05-28 17:06:24 +00:00
jmcneill
2e1299c4b4 Remove support for evbarm cdrom images. Not sure that any of them can even
be used.
2020-05-28 15:27:59 +00:00
jmcneill
52ca013273 Build install images for aarch64 and earmv7hf. 2020-05-28 15:23:43 +00:00
jmcneill
9555656604 Only install gptmbr.bin if USE_GPTMBR=yes 2020-05-28 15:13:21 +00:00
jmcneill
1052b1ffc3 Default USE_MBR to no 2020-05-28 15:12:03 +00:00
jmcneill
210b40805c Create a separate Arm64 image that uses MBR partitioning. Amlogic SoCs
require the bootloader to be installed on SD cards at LBA1 which makes
them incompatible with GPT images.
2020-05-28 10:22:49 +00:00
jmcneill
7923818521 Allow config file to override hostname 2020-05-28 10:19:02 +00:00
maya
bec9186e4c rename amd64 uefi-installimage to be just installimage.
Works for both purposes, no confusing name.
2020-05-27 22:27:58 +00:00
jmcneill
aec3f0cda8 Move back to MBR based images for armv7 because Amlogic's bootloader (for
Amlogic S805 based boards) needs to be installed to sector 1, which
conflicts with the GPT header.
2020-05-27 21:53:04 +00:00
nia
dc6f7f016f Briefly explain how to pkgsrc u-boot. Pointed out by maya. 2020-05-27 13:51:05 +00:00
nia
094ca3bf8f s/boards/devices/ 2020-05-27 12:47:47 +00:00
nia
3c044d5b1a First attempt at modernising the evbarm install guide and hardware lists
- Install instructions mostly based on wiki pages
- Supported hardware lists mostly based on GENERIC and GENERIC64 kernels
2020-05-27 12:45:07 +00:00
jmcneill
0fb404c413 Fix kernel= order, add pi0w conditional and comments 2020-05-27 11:02:52 +00:00
jmcneill
eb9218acf0 Conditionally boot kernel.img or kernel7.img depending on board 2020-05-27 10:56:59 +00:00
jmcneill
3f1e657dba No need to rename netbsd-GENERIC.img to kernel7.img 2020-05-25 11:11:52 +00:00
jmcneill
32049c2b73 Switch to GPT w/ hybrid MBR for armv7 images 2020-05-25 11:06:49 +00:00
christos
7578ae9051 new bind+libuv 2020-05-24 19:47:59 +00:00
jmcneill
1c81516763 Enable GPT support w/ hybrid MBR for Raspberry Pi compatibility. 2020-05-24 18:44:46 +00:00
jmcneill
2e7e9cc4e8 Add support for hybrid MBR/GPT images. 2020-05-24 18:43:39 +00:00
jmcneill
2190516631 Add GPT support to mkimage. 2020-05-24 14:45:49 +00:00
skrll
0a6d4780d8 imx6 kernels are part of GENERIC now 2020-05-23 13:24:07 +00:00
tsutsui
f184828963 Now Xserver works on hp425e built-in EVRX framebuffer. 2020-05-23 00:02:10 +00:00
rin
3886d0713a Add one more auto-generated file. 2020-05-22 23:59:01 +00:00
rin
b4dc77fc88 Regen 2020-05-22 23:58:22 +00:00
skrll
9b07d9ea0d Sort 2020-05-22 15:55:51 +00:00
christos
75ab167c58 put back extattr.3 2020-05-19 19:15:06 +00:00
rin
2bc2f88aff Bump ramdisk size to 2MB. 2020-05-19 09:02:48 +00:00
jdc
e738d60314 Add tadpmu to Makefile and set list. 2020-05-19 06:26:37 +00:00
jmcneill
043d88a7c1 Separate devicetree .dts -> .dtb building from kernel builds. They are now
part of a separate set, "dtb.tgz", and only built when MKDTB=yes. This
defaults to yes for earmv[67]* and aarch64, and no everywhere else.
2020-05-18 21:19:34 +00:00
martin
1af5bcc972 Fix lists for RUMP-less builds 2020-05-17 15:28:27 +00:00
ad
8b4ce5d40a Install sparc/intr.h 2020-05-17 13:49:37 +00:00
rillig
08808cd251 usr.bin/make: demonstrate actual behavior of .INCLUDEDFROMFILE 2020-05-17 12:36:26 +00:00
christos
c00e7542d4 move the fido man pages from man to comp where they belong. I wonder about
the other section 3 man pages? Should they also move from man to comp?
2020-05-16 19:05:05 +00:00
christos
049ab299d2 bump libc 2020-05-16 19:00:13 +00:00
christos
9aa2a9c323 Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
maya
5cf9e8b81f Remove uyap, USB YAP phone firmware loader.
And the associated ezload EZ-USB code, which is only used by uyap.
It could theoretically be used by other drivers, but none of them are
in tree.

I suspect that this device isn't in use, as phone technology has improved
a lot since 2001 when uyap(4) was added to the tree.

Proposed with no objections on netbsd-users on 13 April 2020
2020-05-16 13:46:10 +00:00
christos
6d46df7548 PR/55102: Kamil Rytarowski: Duplicate fifo_vnodeop_entries,
fifo_vnodeop_opv_desc symbols.

Many filesystems ffs, lfs, ulfs, chfs, ext2fs etc. use fifofs
internally for their fifo vnops. NFS does too, but it also needs
networking anyway.  Unfortunately fifofs brings in a lot of the
networking code so that the rumpkernel is not well partition. In
addition the fifo code is rarely used.

The existing hack depended on duplicating the above symbols and
adding minimal functionality for the majority of the the tests
(except the ffs and the puffs one). In these two cases both symbols
were loaded and the symbol sizes clashed which broke the sanitizers.
While this can be fixed with weak symbols and other kinds of
indirection, it is more straight forward to select between the
minimal and the full fifofs implementation by introducing a new
shared library librumpvfs_nofifofs.
2020-05-15 23:32:27 +00:00
joerg
7cbd7912a7 Bump libc minor version for malloc lock change 2020-05-15 14:57:33 +00:00
kamil
b2e8cbc777 Fix typo
Reported by vezhlys on IRC.
2020-05-15 09:21:59 +00:00
ryo
eeb5bd9a17 fix evbarm64 build release with LLVM 2020-05-13 06:09:25 +00:00
yhardy
dd377fc593 Fix the build for MKCOMPAT=no.
The t_user_ldt test needs the i386 compat library which is only built
when MKCOMPAT=yes.
2020-05-11 21:51:25 +00:00
rillig
c34ad787e6 usr.bin/make: add tests for surprising dollar removal 2020-05-10 12:34:01 +00:00
skrll
698fd2a973 Update for trap.h 2020-05-10 11:06:14 +00:00
nia
5e1fba1a1e Add getentropy() to libc - a simple wrapper to access the kernel CSPRNG.
Posted to tech-userlevel@ a week ago and reviewed by riastradh@.

GETENTROPY(3)		   Library Functions Manual		 GETENTROPY(3)

NAME
     getentropy - fill a buffer with high quality random data

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <unistd.h>

     int
     getentropy(void *buf, size_t buflen);

DESCRIPTION
     The getentropy() function fills a buffer with high quality random data,
     suitable for seeding cryptographically secure psuedorandom number
     generators.

     getentropy() is only intended for seeding random number generators and is
     not intended for use by regular code which simply needs secure random
     data.  For this purpose, please use arc4random(3).

     The maximum value for buflen is 256 bytes.

IMPLEMENTATION NOTES
     getentropy() reads from the sysctl(7) variable kern.arandom.

RETURN VALUES
     The getentropy() function returns 0 on success, and -1 if an error
     occurred.

ERRORS
     getentropy() will succeed unless:

     [EFAULT]		The buf argument points to an invalid memory address.

     [EIO]		Too many bytes were requested.

SEE ALSO
     arc4random(3), rnd(4)

STANDARDS
     The getentropy() function is non-standard.

HISTORY
     The getentropy() function first appeared in OpenBSD 5.6, then in
     FreeBSD 12.0, and NetBSD 10.
2020-05-06 16:17:36 +00:00
bouyer
da456d1ffb Bump INSTIMAGEMB, hopefully fix releng autobuilds 2020-05-06 09:18:10 +00:00
christos
3a4af96978 A tiny little more. 2020-05-05 16:04:07 +00:00
christos
4ed76a2ea0 bump caused by the module debug sets 2020-05-03 13:29:04 +00:00
christos
a8a60eb46c Add support for debugging modules for multi-arch (xen etc.) 2020-05-02 19:44:59 +00:00
christos
69865c461a /usr/libdata/debug/stand is where the debug modules go 2020-05-01 22:25:18 +00:00
christos
18b0456cb4 add more module sets. 2020-05-01 22:21:49 +00:00
christos
3a2dc2da1e Add module debug sets 2020-05-01 22:21:11 +00:00
jdolecek
40ace5566a link also m_apply(9) to mbuf(9) 2020-05-01 21:43:23 +00:00
christos
a461f65adc Move the rump module test programs in the regular mi file. These are not
really kernel modules and the other md module test is in the md.amd64 file
already.
2020-05-01 17:14:28 +00:00
tsutsui
23536c517e Move HP332 to "Supported hardware" list, as reported by Chris Hanson. 2020-05-01 03:02:28 +00:00
ryo
1da5a7c800 Add a test for sigaltstack(2) and SA_ONSTACK 2020-04-30 11:03:29 +00:00
riastradh
5084c1b50f Rewrite entropy subsystem.
Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources.  Hardware RNG devices should have hardware-specific
health tests.  For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug.  Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
  kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
  knob kern.entropy.depletion; otherwise it is disabled, and once the
  system reaches full entropy it is assumed to stay there as far as
  modern cryptography is concerned.

- No `entropy estimation' based on sample values.  Such `entropy
  estimation' is a contradiction in terms, dishonest to users, and a
  potential source of side channels.  It is the responsibility of the
  driver author to study the entropy of the process that generates
  the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
  it's ready, if we've never reached full entropy, and with a rate
  limit afterward.  Operators can force consolidation now by running
  sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
  whenever entropy is consolidated into the global pool.
  . Usage: Cache entropy_epoch() when you seed.  If entropy_epoch()
    has changed when you're about to use whatever you seeded, reseed.
  . Epoch is never zero, so initialize cache to 0 if you want to reseed
    on first use.
  . Epoch is -1 iff we have never reached full entropy -- in other
    words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
    but it is better if you check for changes rather than for -1, so
    that if the system estimated its own entropy incorrectly, entropy
    consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
  happening:
  . kern.entropy.needed - bits of entropy short of full entropy
  . kern.entropy.pending - bits known to be pending in per-CPU pools,
    can be consolidated with sysctl -w kern.entropy.consolidate=1
  . kern.entropy.epoch - number of times consolidation has happened,
    never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
  Hash_DRBGs.  There are only two in the system: user_cprng for
  /dev/urandom and sysctl kern.?random, and kern_cprng for kernel
  users which may need to operate in interrupt context up to IPL_VM.

  (Calling cprng_strong in interrupt context does not strike me as a
  particularly good idea, so I added an event counter to see whether
  anything actually does.)

- Event counters provide operator visibility into when reseeding
  happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
2020-04-30 03:28:18 +00:00
rillig
0cf5f48424 usr.bin/make: add test case for lazy conditions 2020-04-29 23:15:21 +00:00
mrg
92e849c948 bump ramdisk size to 3200k for gcc 8. yay! 2020-04-29 06:53:46 +00:00
rjs
9df5444666 The x86_pte tests are only built when MKKMOD=yes. 2020-04-28 13:43:45 +00:00
mlelstv
6676af1407 Add missing futex tests. 2020-04-26 21:05:36 +00:00
thorpej
276ef22378 Add a NetBSD native futex implementation, mostly written by riastradh@.
Map the COMPAT_LINUX futex calls to the native ones.
2020-04-26 18:53:31 +00:00
maxv
e497fc86e6 Add tests on the x86 PTEs. We scan the MMU page tables directly and verify
certain properties.
2020-04-26 09:08:40 +00:00
rin
e14b16b8c0 Adjust for binutils 2.34. 2020-04-26 06:58:05 +00:00
bouyer
224cc4e632 Add /usr/include/xen/intrdefs.h to sets
Add xen to KLINKFILES for amd64/i386
2020-04-25 15:46:59 +00:00
kre
9d0d79c629 Update to tzdata2020a (new zone file America/Nuuk)
XXX pullup -8 -9
2020-04-25 12:18:47 +00:00
uki
6f0f0600e3 Add -unknown- to "./netbsd" in modules/mi to fix "build.sh syspkgs" failure 2020-04-23 11:41:28 +00:00
maxv
7ee848d944 Add tests for USER_LDT. 2020-04-19 13:22:58 +00:00
jdolecek
39b0cf9180 enable NO_IOBUF_ALIGNED for x_newfs and x_fsck_ffs 2020-04-18 12:56:38 +00:00
jdolecek
ad81495fd9 include aligned_alloc(3), now needed for newfs and fsck_ffs 2020-04-17 14:55:24 +00:00
roy
b19d027e40 We solves the zpool SIGBUS issue by building a threaded libhack. 2020-04-14 12:14:59 +00:00
kre
e9f637c8af Since dhcpcd-hools/02-dump seems to have been removed from the
repository, don't attempt to install it, and don't expect it to
be installed.    If a better fix is to return 02-dump, then this
change can be reverted (by anyone, just go ahead and do it).

dhcpcd(8) should also have mention of 02-dump removed, if removing
it was intentional.
2020-04-14 03:16:26 +00:00
tsutsui
e68b02666c Fix typo. 2020-04-12 17:13:29 +00:00
simonb
a91470c59b Add uxrcom driver for Exar XR21V141x USB serial adapters. Based in part
on the OpenBSD single-port XR21V1410 uxrcom driver, but adds support
for multi-port chipsets and uses the common umodem framework instead of
being a standalone driver.

Thanks to skrll@ for much USB clue and mrg@ for financing the
development of this driver.
2020-04-12 01:10:53 +00:00
christos
407ffe11fc Add new t_extattr 2020-04-11 01:51:14 +00:00
tsutsui
4c1178c516 Drop the entry for Yasushi Yamasaki, per recent ad clause removal. 2020-04-10 17:02:33 +00:00
martin
32f67d2cf1 Ooops, editor mishap in previous 2020-04-07 10:22:00 +00:00
martin
94c50ac97f Sync image size with available space reserved in the RAMDISK kernel 2020-04-06 13:28:15 +00:00
martin
05220c998f Use full available ram disk space 2020-04-06 11:58:10 +00:00
sevan
841fdb7e60 Support the use of DHCP in the install environment 2020-04-05 14:36:43 +00:00
martin
d001b02d00 Adapt to libterminfo as part of libhack-curses 2020-04-05 11:19:01 +00:00
martin
fa0d5eae99 Extend the curses hack to terminfo - build selected parts of
libterminfo as part of libhack, so we can drop unwanted features
for small install media.
2020-04-05 11:18:02 +00:00
mlelstv
f8df89e092 revert to previous 2020-04-05 05:19:24 +00:00
christos
102c608adf we don't delete entries, we mark them obsolete so that postinstall can
delete the files.
2020-04-05 01:21:43 +00:00
mlelstv
e264b2bd0f one more netsmb reference. 2020-04-04 22:08:33 +00:00
christos
d8e96a2d4f Infrastructure for putting kernel+modules in /netbsd/kernel and
/netbsd/modules respectively instead of /netbsd and
/stand/<arch>/<version>/modules.  This is only supported for x86,
and is turned off by default. To try it, add KERNEL_DIR=yes in your
/mk.conf and install a system from that build.
2020-04-04 19:50:53 +00:00
christos
8809b7dc13 fix netsmb, libgnuctf 2020-04-04 19:26:51 +00:00
christos
ec53555ab5 gnuctf is only binutils=234 2020-04-04 17:00:05 +00:00
christos
1a8140ac32 fix libgnuctf 2020-04-04 16:05:39 +00:00
christos
1e0e781857 fix sets for new binutils 2020-04-04 16:04:01 +00:00
jdolecek
b28734a61b remove SMBFS and nsmb/netsmb - userland part 2020-04-04 15:39:13 +00:00
mlelstv
9f445f8e17 More binutils version mismatch. 2020-04-04 12:06:57 +00:00
mlelstv
19fee71a55 conditionally list library versions for binutils 2.31 and 2.34 2020-04-04 09:57:12 +00:00
roy
da35319256 Adjust set lists for dhcpcd chroot 2020-04-02 13:03:22 +00:00
kamil
bf4492493d Add ioctlprint - descriptive ioctl value printer
ioctlprint(1) is embedded in the kdump(1) program.
2020-04-02 03:32:46 +00:00
maxv
0512ed0af2 Put the ioctl definitions in a header, and install it. 2020-03-31 16:28:28 +00:00
christos
f56084844e Add rpcapd 2020-03-30 02:12:38 +00:00
christos
66d7aa31df enable remote for libpcap and add rpcapd 2020-03-29 17:13:46 +00:00
martin
f5c15489c8 Try to fix previous: include etc.evbarm/Makefile.inc to get proper sub-arch
settings and key the subdirs off KERENEL_SETS instead of ALL_KERNELS
(which is not always defined)
2020-03-28 15:41:23 +00:00
rin
5bbf0e2308 Get back to terminfo.cdb. 2020-03-27 15:18:22 +00:00
christos
3958d16a96 As described in tech-userlevel:
- Modify the writing code to only write entries in the new
  format for the terminal descriptions that require it.
- Store new format entries as <name>@v3
- Store old format entries with clamped values as <name> for
  backwards compatibility
- Lookup first <name>@v3 and then <name> if that is not found.
- Don't create terminfo2 anymore; old programs keep working with
  clamped entries, and new programs be able to use the wide
  fields with using the original db file.
2020-03-27 15:11:57 +00:00
thorpej
8ddade78c3 Let xunlong,orangepi-lite2 share bwfm config with raspberrypi,3-model-b-plus;
it seem to work fine and there's no better alternative at the moment.
2020-03-27 04:31:18 +00:00
skrll
35f8f9c96c Only build sshramdisk when building RPI_INSTALLx 2020-03-26 08:02:55 +00:00
skrll
909a200b92 Bump IMAGESIZE 2020-03-26 07:44:43 +00:00
kre
5388a00941 Document strerror_l()
While here also document (but comment it out since it isn't
available - yet) strerror_lr().   To include that, simply
uncomment the relevant lines, and (twice I think) s/returns/return/
on lines just after currently commented out lines (that is, it
currently says, "A returns" after the comments are returned, we
need it to be "A and B return" - the "and B" appears when the comment
markers are removed, removing the 's' from returns must be done manually.

In addition to adding strerror_l() some additional enhancements were
made to the general strerror() doc.
2020-03-25 18:45:42 +00:00
christos
4fa722caef add pw_gensalt 2020-03-25 17:13:49 +00:00
roy
bb2ce1fb3d curses: Add stubs for mouse functions
No mouse support actually included.
But that doesn't matter because most terms don't actually support a mouse.

We should look into hooking these into wsmouse(4) and xterm mouse
in the future.

Compatable with nCurses mouse API version 2.
2020-03-23 13:37:36 +00:00
martin
a5c8ab7a11 Bump image size - new firmware files need more space 2020-03-23 11:45:00 +00:00
thorpej
3639ae7e3e Install the common AP6212 nvram config and use it for sinovoip,bpi-m2-zero. 2020-03-22 22:36:12 +00:00
thorpej
fa16de81c1 The raspberrypi,model-zero-w uses the same nvram config file as the
raspberrypi,3-model-b.
2020-03-22 22:17:11 +00:00
thorpej
e36e7c169a Install the "bwfm" firmware for the Pinebook Pro. 2020-03-22 21:13:35 +00:00
thorpej
4886cefda0 Add new bwfm firmware binaries and config files. Only install the
SDIO firmware binaries and platform-specific config files on platforms
where they're relevant.
2020-03-22 20:21:53 +00:00
ad
5de49fc7c2 Wrap vnode_impl.h in defined(_KERNEL) || defined(_KMEMUSER), and install
it for kmem grovellers.
2020-03-22 14:27:33 +00:00
tsutsui
608bd4460c Add "build.sh live-image" support for hpcarm.
Tested on WS003SH.
See also PR/55075 for live-image with FAT partition support.
2020-03-21 14:25:49 +00:00
tsutsui
d9d42379c6 Add "build.sh live-image" support for zaurus.
Tested on SL-C3000 and SL-C700.
See also PR/55075 for live-image with FAT partition support.
2020-03-21 14:24:12 +00:00
tsutsui
2b0ec46162 Add "live-image with a FAT partition for bootstrap files" support.
See PR/55075 for more details.
2020-03-21 14:19:26 +00:00
rin
fe3b3a2843 Catch up with major bump in terminfo. Unbreak build. 2020-03-16 10:02:47 +00:00
skrll
73cad4db9c hopefully fix builds 2020-03-14 06:39:20 +00:00