risc-v: split the jh7100 clock controller driver
In preparation for the JH7110 clock driver split the clock definition
and attachment code from the clock handling macros / methods.
wg(4): Allow modunload before any interface creation.
The workqueue and pktq are both lazily created, for annoying module
initialization order reasons, so they may not have been created by
the time of modunload.
PR kern/58470
sys/crypto/sodium: Tighten stdlib.h glue.
1. Make sure nothing uses malloc and free. All of the routines we
need should work in fixed-size, caller-allocated buffers and
reasonable stack space.
2. Make panic message for abort() stub clearer. There are calls to
it, but they imply internal errors inside libsodium which should
not happen unless there is an unrecoverable software bug in
libsodium.
PR kern/58468
sys/crypto/sodium: Nix unused errno.h.
Maybe this was a vestige of an earlier draft of the libsodium import,
but it doesn't appear to be needed now by any libsodium files we use.
PR kern/58468
sys/crypto/sodium: Nix risky defines from core.h stub.
These are risky not because they might cause crypto flaws, but
because they might cause usage of the SIMD unit in the kernel along
paths where we haven't made it safe.
That said -- no change to the amd64 module .o and .kmod files, so
this doesn't currently make a difference; it's just risky to have
around in case we later include other parts of libsodium that it does
affect, like the Salsa20 code.
PR kern/58468
sys/crypto/sodium: Nix unused assert.h stub.
Maybe this was a vestige of an earlier draft of the libsodium import,
but it doesn't appear to be needed now by any libsodium files we use.
PR kern/58468
sys/crypto/sodium: Simplify string.h stub.
Not sure of any particular problem with the previous stub, but let's
make sure to use the same prototypes for memset/memcpy/memmove as
everything else in the kernel.
PR kern/58468
sys/crypto/sodium: Fill out crypto_verify_16 stub.
Without this change, libsodium silently accepts forgeries.
This one's a doozy, and it's a sobering reminder that:
(a) wg(4) is still experimental (only user of libsodium in kernel;
both are available only through default-off optional modules).
(b) Known-answer test vectors are critical, including negative tests
(test that forgeries are rejected), and must be mandatory for all
new crypto code -- and should be added to old crypto code too.
(c) Crypto code must also have self-tests that run in the same
environment, not just the same code in a different build or test
environment -- the libsodium code itself is fine, but we built it
differently and need to exercise it differently from upstream's
automatic tests.
[43 lines not shown]
Make the debug (WG_DEBUG) func gethexdump() always return a valid
pointer, never NULL, so it doesn't need to be tested before being
printed, which was being done sometimes, but not always.
While the previous change fixed the broken build, it wasn't the best
way, as defining any of the WG_DEBUG_XXX symbols then effectively
defined all of them - making them as seperate entities, pointless.
So, rearrange the way things are done a little to avoid doing that.
If any of the WG_DEBUG_XXX symbols happens to be defined (say, from a
stray rump Makefile...) then we now must have WG_DEBUG also defined, so
if it wasn't, make it so.
Pull up following revision(s) (requested by uwe in ticket #768):
tests/lib/libcurses/tests/curs_set: revision 1.2
lib/libcurses/screen.c: revision 1.39
curses: init old_mode to 1 (normal visible cursor)
PR bin/58090: Ctrl-Z, fg makes blinking cursor in vi
ok blymn@
adjust initial cursor state to reflect reality
Missed in PR bin/58090
Fixes PR lib/58313