openbsd
3 years agomerge NSD 4.3.6
sthen [Tue, 6 Apr 2021 18:57:55 +0000 (18:57 +0000)]
merge NSD 4.3.6

3 years agomerge NSD 4.3.6
sthen [Tue, 6 Apr 2021 18:51:46 +0000 (18:51 +0000)]
merge NSD 4.3.6

3 years agoDo not return when a hash check failed in rrdp_data_handler() instead
claudio [Tue, 6 Apr 2021 18:35:46 +0000 (18:35 +0000)]
Do not return when a hash check failed in rrdp_data_handler() instead
let the code progress to set the state to RRDP_STATE_PARSE_DONE and
call rrdp_finished() since this transfer is over.
Should fix a hang seen by deraadt@
OK tb@

3 years agouppercase "HTTP";
jmc [Tue, 6 Apr 2021 18:29:43 +0000 (18:29 +0000)]
uppercase "HTTP";

3 years agouse errx() instead of err()
tb [Tue, 6 Apr 2021 16:40:34 +0000 (16:40 +0000)]
use errx() instead of err()

3 years agospaces -> tabs
tb [Tue, 6 Apr 2021 16:30:27 +0000 (16:30 +0000)]
spaces -> tabs

3 years agoMention the http client in two places.
tb [Tue, 6 Apr 2021 15:22:30 +0000 (15:22 +0000)]
Mention the http client in two places.

ok claudio

3 years agominor style tweaks
tb [Tue, 6 Apr 2021 15:00:19 +0000 (15:00 +0000)]
minor style tweaks

3 years agoPrint all mount(2) flags in ddb's "show all mounts"
kn [Tue, 6 Apr 2021 14:17:35 +0000 (14:17 +0000)]
Print all mount(2) flags in ddb's "show all mounts"

Quite a few flags were never accounted for in MNT_BITS, resulting in bogus
debug output such as "flags 4205800<WXALLOWED,LOCAL,ROOTFS>" (integer value
does not match string interpretation, i.e. "SOFTDEP,SWAPPABLE" is missing).

Spotted while instrumenting "show all mounts" to report a softdep panic.

Feedback OK visa

3 years agoCleanup http_connect() and make it look more like the example in
claudio [Tue, 6 Apr 2021 12:35:24 +0000 (12:35 +0000)]
Cleanup http_connect() and make it look more like the example in
getaddrinfo(3). Most notable change is the error reporting.
Do not warn if cause is not set. In this case the last connect attempt
failed but there is no alternate address to use. Since that error was
already logged there is no need for an extra warning here.
OK job@

3 years agoMove the http_fail() call out of http_free(). Doing the error reporting
claudio [Tue, 6 Apr 2021 12:30:43 +0000 (12:30 +0000)]
Move the http_fail() call out of http_free(). Doing the error reporting
there is not quite right.
OK job@

3 years agoKill unused globals and swap the POLLIN and POLLOUT handler for the
claudio [Tue, 6 Apr 2021 12:28:56 +0000 (12:28 +0000)]
Kill unused globals and swap the POLLIN and POLLOUT handler for the
pipe to the main process.
OK job@

3 years agoDon't check return value of unsetenv(). It's part of the environment
dtucker [Tue, 6 Apr 2021 09:07:33 +0000 (09:07 +0000)]
Don't check return value of unsetenv().  It's part of the environment
setup and not part of the actual test, and some platforms -portable runs
on declare it as returning void, which prevents the test from compiling.

3 years agouse "braces" consistenly; fastcgi can take multiple options;
jmc [Tue, 6 Apr 2021 06:28:38 +0000 (06:28 +0000)]
use "braces" consistenly; fastcgi can take multiple options;
original issue and text from laurence tratt, with updates from raf czlonka

3 years agoRestore EPT protection checks on VMX when using VMM_IOC_MPROTECT_EPT
dv [Tue, 6 Apr 2021 00:19:58 +0000 (00:19 +0000)]
Restore EPT protection checks on VMX when using VMM_IOC_MPROTECT_EPT

A prior fix related to lack of TLB flushing accidentally removed the
fault type checks related to the access protection features available
via the VMM_IOC_MPROTECT_EPT ioctl. This restores the same logic for
checking the fault type and the exit to userland if the fault is due
to EPT access protections.

While here, update the comment for vmx_fault_page to accurately
reflect the various potential return values.

Reported by Adam Steen.

OK mlarkin@

3 years agoregen
mglocker [Mon, 5 Apr 2021 20:46:06 +0000 (20:46 +0000)]
regen

3 years agoAdd a new quirk flag to not attach video devices which aren't supported by
mglocker [Mon, 5 Apr 2021 20:45:49 +0000 (20:45 +0000)]
Add a new quirk flag to not attach video devices which aren't supported by
uvideo(4) currently, like the Chicony Integrated IR Camera.  This is
especially helpful when you have two video devices of which the unsupported
one is attached first as reported by martijn@.

OK gnezdo@

3 years agoImprove rdmsr/wrmsr exit handling for both AMD SVM and Intel VMX.
dv [Mon, 5 Apr 2021 18:26:45 +0000 (18:26 +0000)]
Improve rdmsr/wrmsr exit handling for both AMD SVM and Intel VMX.

At some point, the logic for handling vmexits related to msr access
changed and the handling for SVM diverged from VMX. While booting the
newest 9front release, abieber@ noticed boot loops on an AMD host.

This commit changes the behavior to be the same between SVM and VMX hosts,
with the exception of a single MSR, and enforces that any rdmsr
instruction must be explicitly handled otherwise a #GP is injected into
the guest. Any wrmsr instructions that are not explicitly handled are
ignored (%rax, %rdx set to 0).

The PAT msr is now shadowed, allowing guests to read a copy of the host
PAT. Their writes are stored in guest vcpu state and not passed through to
the host cpu. (PAT writes are validated, however, and invalid values
inject #GP.)

tested by brynet@, abieber@
ok brynet@, mlarkin@

3 years agominor KNF
deraadt [Mon, 5 Apr 2021 18:17:37 +0000 (18:17 +0000)]
minor KNF

3 years agoSupport booting from compressed kernel images.
dv [Mon, 5 Apr 2021 18:09:48 +0000 (18:09 +0000)]
Support booting from compressed kernel images.

The bsd.rd ramdisk now ships gzip'd on amd64. Use libz in base to
transparently handle decompression of any compressed kernel images.

Patch from Josh Rickmar.

ok kn@

3 years agougold(4): add support for TEMPerGold & more TEMPerHUM devices
landry [Mon, 5 Apr 2021 16:26:06 +0000 (16:26 +0000)]
ugold(4): add support for TEMPerGold & more TEMPerHUM devices

originally from mlarkin@ for TEMPerGold_V3.1 (only a temperature sensor),
i just added TEMPerX variants to the mix - all those devices share the
same usb product id (boo), so differentiate them on the firmware string...
even if the device is labelled as TEMPerHUM and has a blue TXT button on
it, its firmware reports itself as TEMPerX_V3.3.

ok jung@ sthen@ mlarkin@

3 years agosync
landry [Mon, 5 Apr 2021 16:18:32 +0000 (16:18 +0000)]
sync

3 years agoAdd 0x413d:0x2107 for various PCSensors TEMPer devices
landry [Mon, 5 Apr 2021 16:17:25 +0000 (16:17 +0000)]
Add 0x413d:0x2107 for various PCSensors TEMPer devices

3 years agoUntil tls_accept_socket() succeeds, the tls context bound to a session
eric [Mon, 5 Apr 2021 15:50:11 +0000 (15:50 +0000)]
Until tls_accept_socket() succeeds, the tls context bound to a session
belongs to the listener, and should not be freed with that session if
an error occurs before.  Unlink it from the session early in the accept
callback to avoid this.

tweaks and ok millert@

3 years agoSet sysclk before using it
kn [Mon, 5 Apr 2021 14:36:18 +0000 (14:36 +0000)]
Set sysclk before using it

simpleaudio_set_params() calls set_params() which reads sysclk off the
"i2s_clk" property before it sets that very clock's rate with
dd_set_sysclk() (in case there's multiplier specified).

Hence reverse the order so set_params() can pick up the newly set rate.

The rate is still off on the Pinebook Pro, but I came across this when
reading the code;  this also matches NetBSD's sys/dev/fdt/ausoc.c r1.6
"Set sysclk rate at set_format time, so the link set_format callback can
read the new sysclk".

OK kettenis patrick

3 years agoMove client-detached into server_client_lost so it is fired even if a
nicm [Mon, 5 Apr 2021 14:11:05 +0000 (14:11 +0000)]
Move client-detached into server_client_lost so it is fired even if a
client is closed unexpectedly.

3 years agoFix typo in debug message. ok kettenis@
dtucker [Mon, 5 Apr 2021 12:13:07 +0000 (12:13 +0000)]
Fix typo in debug message.  ok kettenis@

3 years agoSend correct response type on unpause errors.
dv [Mon, 5 Apr 2021 11:35:26 +0000 (11:35 +0000)]
Send correct response type on unpause errors.

ok pd@

3 years agoRevert slow mode change so that we always use it for legacy and high speed
patrick [Mon, 5 Apr 2021 09:31:45 +0000 (09:31 +0000)]
Revert slow mode change so that we always use it for legacy and high speed
timings, and if the device tree tells us to.  While the change was done to
reduce diff, it introduced a regression on some devices, hence this revert.

Reported and tested by dtucker@
Tested by kettenis@ and myself

3 years agoFix a couple of edge cases with the jump-back-xxx commands, and also
nicm [Mon, 5 Apr 2021 08:43:48 +0000 (08:43 +0000)]
Fix a couple of edge cases with the jump-back-xxx commands, and also
update back-to-indentation to use grid_reader, thereby fixing line
wrapping issues. From Anindya Mukherjee, GitHub issue 2633.

3 years agoDon't leak param->name in x509_verify_param_zero()
tb [Mon, 5 Apr 2021 07:02:50 +0000 (07:02 +0000)]
Don't leak param->name in x509_verify_param_zero()

For dynamically allocated verify parameters, param->name is only ever set
in X509_VERIFY_set1_name() where the old one is freed and the new one is
assigned via strdup(). Setting it to NULL without freeing it beforehand is
a leak.

looks correct to millert, ok inoguchi

3 years agoRemove unused variables
kn [Mon, 5 Apr 2021 00:51:14 +0000 (00:51 +0000)]
Remove unused variables

From Daniel Kovacic <daniel dot kovacic at unbugd dot com>, thanks!
No object change.

3 years agoleave -beta
deraadt [Sun, 4 Apr 2021 23:03:07 +0000 (23:03 +0000)]
leave -beta

3 years agoAdd missing error check for AES_unwrap_key().
tb [Sun, 4 Apr 2021 20:40:48 +0000 (20:40 +0000)]
Add missing error check for AES_unwrap_key().

3 years agoFix two copy paste errors in error messages
tb [Sun, 4 Apr 2021 20:21:43 +0000 (20:21 +0000)]
Fix two copy paste errors in error messages

3 years agoAdd tests for DTLSv1_2{,_client,_server}_method()
tb [Sun, 4 Apr 2021 20:16:29 +0000 (20:16 +0000)]
Add tests for DTLSv1_2{,_client,_server}_method()

3 years ago431 is an overlay over 204 (Manitoba)
deraadt [Sun, 4 Apr 2021 20:08:49 +0000 (20:08 +0000)]
431 is an overlay over 204 (Manitoba)

3 years agoUse correct type for tmp in test_write_bytes()
tb [Sun, 4 Apr 2021 19:55:46 +0000 (19:55 +0000)]
Use correct type for tmp in test_write_bytes()

3 years agoExplicitly NULL pointers to avoid a double free.
tb [Sun, 4 Apr 2021 19:36:09 +0000 (19:36 +0000)]
Explicitly NULL pointers to avoid a double free.

3 years agoDon't leak key and dh in the error path.
tb [Sun, 4 Apr 2021 19:32:26 +0000 (19:32 +0000)]
Don't leak key and dh in the error path.

3 years agoClean up client and server tls{,_config} contexts in tls_test().
tb [Sun, 4 Apr 2021 16:19:47 +0000 (16:19 +0000)]
Clean up client and server tls{,_config} contexts in tls_test().

Leaks reported by Ilya Shipitsin.

3 years agoDocument support subset of conversion specification
kn [Sun, 4 Apr 2021 15:25:11 +0000 (15:25 +0000)]
Document support subset of conversion specification

Clarify that printf(9) only knows
%[width][size]conversion
contrary to printf(3)'s
%[argno$][flags][width][.precision][size]conversion

Feedback OK jmc
OK deraadt

3 years agoremove stray inserts; from matthias schmidt
jmc [Sun, 4 Apr 2021 11:36:56 +0000 (11:36 +0000)]
remove stray inserts; from matthias schmidt

3 years agofix spacing issue in macro;
jmc [Sun, 4 Apr 2021 06:18:58 +0000 (06:18 +0000)]
fix spacing issue in macro;

3 years agomissing comma; from kawashima james
jmc [Sun, 4 Apr 2021 06:11:24 +0000 (06:11 +0000)]
missing comma; from kawashima james

3 years agoAdd size check for sockaddr mask.
tobhe [Sat, 3 Apr 2021 21:29:14 +0000 (21:29 +0000)]
Add size check for sockaddr mask.

3 years agoAdd a guard page between I/O virtual address space allocations. The idea
patrick [Sat, 3 Apr 2021 15:59:08 +0000 (15:59 +0000)]
Add a guard page between I/O virtual address space allocations.  The idea
is that IOVA allocations always have a gap in-between which produces a fault
on access.  If a transfer to a given allocation runs further than expected
we should be able to see it.  We pre-allocate IOVA on bus DMA map creation,
and as long as we don't allocate a PTE descriptor, this comes with no cost.
We have plenty of address space anyway, so adding a page-sized gap does not
hurt at all and can only have positive effects.

Idea from kettenis@

3 years agoExclude the first page from I/O virtual address space, which is the NULL
patrick [Sat, 3 Apr 2021 15:10:58 +0000 (15:10 +0000)]
Exclude the first page from I/O virtual address space, which is the NULL
pointer address.  Not allowing this one to be allocated might help find
driver bugs, where the device is programmed with a NULL pointer.  We have
plenty of address space anyway, so excluding this single page does not
hurt at all and can only have positive effects.

Idea from kettenis@

3 years agoRun the CMAC tests through EVP_PKEY_new_CMAC_key().
tb [Sat, 3 Apr 2021 13:34:45 +0000 (13:34 +0000)]
Run the CMAC tests through EVP_PKEY_new_CMAC_key().

3 years agotypos in comments; GHPR#180 from Ville Skyttä
djm [Sat, 3 Apr 2021 06:58:30 +0000 (06:58 +0000)]
typos in comments; GHPR#180 from Ville Skyttä

3 years agosync CASignatureAlgorithms lists with reality. GHPR#174 from
djm [Sat, 3 Apr 2021 06:55:52 +0000 (06:55 +0000)]
sync CASignatureAlgorithms lists with reality. GHPR#174 from
Matt Hazinski

3 years agohighly polished whitespace, mostly fixing spaces-for-tab and bad
djm [Sat, 3 Apr 2021 06:18:40 +0000 (06:18 +0000)]
highly polished whitespace, mostly fixing spaces-for-tab and bad
indentation on continuation lines. Prompted by GHPR#185

3 years agowhitespace (tab after space)
djm [Sat, 3 Apr 2021 05:54:14 +0000 (05:54 +0000)]
whitespace (tab after space)

3 years agofix incorrect plural; from Ville Skyttä via GHPR#181
djm [Sat, 3 Apr 2021 05:46:41 +0000 (05:46 +0000)]
fix incorrect plural; from Ville Skyttä via GHPR#181

3 years agoensure that pkcs11_del_provider() is called before exit - some PKCS#11
djm [Sat, 3 Apr 2021 05:40:39 +0000 (05:40 +0000)]
ensure that pkcs11_del_provider() is called before exit - some PKCS#11
providers get upset if C_Initialize is not matched with C_Finalize.

From Adithya Baglody via GHPR#234; ok markus

3 years agounused variable
djm [Sat, 3 Apr 2021 05:28:43 +0000 (05:28 +0000)]
unused variable

3 years agoFix two problems in string->argv conversion: 1) multiple backslashes
djm [Sat, 3 Apr 2021 05:21:46 +0000 (05:21 +0000)]
Fix two problems in string->argv conversion: 1) multiple backslashes
were not being dequoted correctly and 2) quoted space in the middle
of a string was being incorrectly split.

A unit test for these cases has already been committed

prompted by and based on GHPR#223 by Eero Häkkinen; ok markus@

3 years agoRemove superflouus mmcpy()
dv [Fri, 2 Apr 2021 19:07:18 +0000 (19:07 +0000)]
Remove superflouus mmcpy()

Reported by Preben Guldberg. ok mlarkin@

3 years agoIn http_connect() if the connect was actually successful break out of the
claudio [Fri, 2 Apr 2021 17:10:12 +0000 (17:10 +0000)]
In http_connect() if the connect was actually successful break out of the
for loop. Also in http_finish_connect() if the connect was successful
cleanup the addrinfo struct. It is no longer needed.
Found with deraadt@

3 years agoinfo gotten via getnameinfo in http_connect() is not used anymore, it is
deraadt [Fri, 2 Apr 2021 16:41:36 +0000 (16:41 +0000)]
info gotten via getnameinfo in http_connect() is not used anymore, it is
old debugging gunk
ok claudio

3 years agoTwo cases of BRE involving counts and backrefs that go wrong and
otto [Fri, 2 Apr 2021 14:20:57 +0000 (14:20 +0000)]
Two cases of BRE involving counts and backrefs that go wrong and
similar that have no isssues. Reported by Michael Paoli.  Failing
cases commented out for now.

3 years agoInclude the default cert.pem file path in tls_load_file error message.
claudio [Fri, 2 Apr 2021 11:35:05 +0000 (11:35 +0000)]
Include the default cert.pem file path in tls_load_file error message.
Should help for -portable where sometimes the cert.pem is missing.

3 years agoShow DTLS1.2 message with openssl(1) s_server and s_client
inoguchi [Fri, 2 Apr 2021 10:19:19 +0000 (10:19 +0000)]
Show DTLS1.2 message with openssl(1) s_server and s_client

ok jsing@ tb@

3 years agoDon't leak the uri of a delta with duplicate serial.
tb [Fri, 2 Apr 2021 08:07:47 +0000 (08:07 +0000)]
Don't leak the uri of a delta with duplicate serial.

ok claudio deraadt

3 years agoswap rname and mname in debug output, and handle the USE_CD flag
eric [Fri, 2 Apr 2021 07:00:30 +0000 (07:00 +0000)]
swap rname and mname in debug output, and handle the USE_CD flag

from Boudewijn Dijkstra

3 years agoconfigyyrename.h is no longer needed with the switch to flex -P c_.
florian [Fri, 2 Apr 2021 06:44:24 +0000 (06:44 +0000)]
configyyrename.h is no longer needed with the switch to flex -P c_.
This was also removed upstream.
OK sthen

3 years agoImplement ZONEMD (RFC8976), based on DS (ds_43.c)
florian [Fri, 2 Apr 2021 06:37:40 +0000 (06:37 +0000)]
Implement ZONEMD (RFC8976), based on DS (ds_43.c)
OK sthen

3 years agoif cipher list is not specified for a relay action, use the global
eric [Fri, 2 Apr 2021 06:30:55 +0000 (06:30 +0000)]
if cipher list is not specified for a relay action, use the global
cipher list if defined. otherwise fallback to libtls default.

ok millert@

3 years agofix sentence structure;
jmc [Fri, 2 Apr 2021 06:11:01 +0000 (06:11 +0000)]
fix sentence structure;

3 years agotweak previous;
jmc [Fri, 2 Apr 2021 06:09:44 +0000 (06:09 +0000)]
tweak previous;

3 years agofix typo + some whitespace
tb [Fri, 2 Apr 2021 05:16:29 +0000 (05:16 +0000)]
fix typo + some whitespace

3 years agoFix Dale's email address
tb [Fri, 2 Apr 2021 03:02:45 +0000 (03:02 +0000)]
Fix Dale's email address

ok drahn

3 years agosync
deraadt [Fri, 2 Apr 2021 02:30:29 +0000 (02:30 +0000)]
sync

3 years agodon't put ptys onto the ramdisk media
deraadt [Fri, 2 Apr 2021 02:29:54 +0000 (02:29 +0000)]
don't put ptys onto the ramdisk media
from miod

3 years agoIndent struct members like everywhere else.
tb [Fri, 2 Apr 2021 02:20:17 +0000 (02:20 +0000)]
Indent struct members like everywhere else.

3 years agoDocument ioctl(2)'s for vmm(4). OK kn@.
dv [Fri, 2 Apr 2021 01:56:20 +0000 (01:56 +0000)]
Document ioctl(2)'s for vmm(4). OK kn@.

3 years agoUpdate manpage about RRDP
job [Thu, 1 Apr 2021 17:43:11 +0000 (17:43 +0000)]
Update manpage about RRDP

OK claudio@

3 years agoupdate currency exchange rates;
jmc [Thu, 1 Apr 2021 16:59:57 +0000 (16:59 +0000)]
update currency exchange rates;

3 years agosort options list;
jmc [Thu, 1 Apr 2021 16:58:56 +0000 (16:58 +0000)]
sort options list;

3 years agospelling
deraadt [Thu, 1 Apr 2021 16:50:23 +0000 (16:50 +0000)]
spelling

3 years agoSort usage: rR -> Rr
tb [Thu, 1 Apr 2021 16:40:05 +0000 (16:40 +0000)]
Sort usage: rR -> Rr

3 years agoRRDP is currently off by default.
claudio [Thu, 1 Apr 2021 16:16:44 +0000 (16:16 +0000)]
RRDP is currently off by default.

3 years agoTweak log_debug() verbiage to reduce repetitive info
krw [Thu, 1 Apr 2021 16:07:44 +0000 (16:07 +0000)]
Tweak log_debug() verbiage to reduce repetitive info
(ACK/NAK), add details (DISCOVER/REQUEST) and provide
before/after info for SSID/LLADDR/MTU changes.

3 years agoInitial commit of RRDP (The RPKI Repository Delta Protocol - RFC8182) support
claudio [Thu, 1 Apr 2021 16:04:48 +0000 (16:04 +0000)]
Initial commit of RRDP (The RPKI Repository Delta Protocol - RFC8182) support
in rpki-client. For now it is off by default.

All XML processing is done in its own process with minimal pledge rights.
It uses the already present https process to fetch the xml files and uses
the master porcess to handle the file IO into the repositories.
RRDP data is stored in the cache under ./rrdp/ and the first directory
is the SHA256 hash of the notify URI.

Fetching snapshots and deltas works to bring the cache up to date.
If something goes wrong rpki-client will fall back to rsync.

RRDP was implemented by Nils Fisher and integrated into rpki-client by myself.
"Time to get it in" deraadt@

3 years agoFor the snprintf range check demo, add a (size_t) cast in the right place
deraadt [Thu, 1 Apr 2021 14:27:47 +0000 (14:27 +0000)]
For the snprintf range check demo, add a (size_t) cast in the right place
which will satisfy the toughest compiler options

3 years agoAlso immediately accept the *first* OFFER if it matches the requested address,
krw [Thu, 1 Apr 2021 13:17:48 +0000 (13:17 +0000)]
Also immediately accept the *first* OFFER if it matches the requested address,
rather than waiting for select_timeout to expire before accepting the same
OFFER.

3 years agoClean up nonexistent/unused properties handling
kn [Thu, 1 Apr 2021 12:06:00 +0000 (12:06 +0000)]
Clean up nonexistent/unused properties handling

Never used since import and probably just ported over from NetBSD as-is;
"design-capacity" does not exist in the device tree binding.
"monitor-interval-ms" defaults to 250ms as per binding and could be used
in the sensor_task_register() call, but our framework only supports whole
seconds and there's no advantage over our current fixed poll interval of 5s.

OK patrick

3 years agoRemove extraneous call of vm_getbyvmid during pause event
dv [Thu, 1 Apr 2021 11:05:47 +0000 (11:05 +0000)]
Remove extraneous call of vm_getbyvmid during pause event

The vm is already being assigned by a call in the if-condition.

3 years agoAbate superfluous lines from remote servers
job [Thu, 1 Apr 2021 11:04:30 +0000 (11:04 +0000)]
Abate superfluous lines from remote servers

OK claudio@

3 years agoCompare the pointer variable explicitly with NULL in if condition
inoguchi [Thu, 1 Apr 2021 10:47:38 +0000 (10:47 +0000)]
Compare the pointer variable explicitly with NULL in if condition

3 years agoHardcode meaningful alert level, track apm's battery state better
kn [Thu, 1 Apr 2021 10:34:21 +0000 (10:34 +0000)]
Hardcode meaningful alert level, track apm's battery state better

The current code looks for the nonexistent "cellwise,alert-level" property
and falls back to zero as threshold (like the original NetBSD code).
It also updates the CONFIG register with that very threshold to let the
hardware set a bit and thus alert us when it has been reached.

Since our sensor framework is designed to poll every N seconds and this
driver does not actually look at whether the hardware alerted, neither
using a default threshold of zero nor updating the hardware with it makes
sense.

Remove the alert level code and simply map >50%, >25% and <=25% of
remaining battery life to apm(4)'s "high", "low" and "critical" battery
state respectively;  this matches exactly what acpibat(4) does and provides
more meaningful sensor readings without relying on nonexistent device tree
bindings.

Feedback OK patrick

3 years agomerge NSD 4.3.6rc1
sthen [Thu, 1 Apr 2021 09:56:11 +0000 (09:56 +0000)]
merge NSD 4.3.6rc1

3 years agoimport NSD 4.3.6rc1, tested by me and florian@
sthen [Thu, 1 Apr 2021 09:55:16 +0000 (09:55 +0000)]
import NSD 4.3.6rc1, tested by me and florian@

3 years agoPush kernel lock down to umb_rtrequest().
mvs [Thu, 1 Apr 2021 08:39:52 +0000 (08:39 +0000)]
Push kernel lock down to umb_rtrequest().

We are going to unlock PF_ROUTE sockets. This means `if_rtrequest'
handler will be performed without kernel lock.

umb_rtrequest() calls umb_send_inet_proposal() which touches kernel lock
protected `ipv{4,6}dns' array. Also umb_rtrequest() is the only handler
which requires kernel lock to be held. So push the lock down to
umb_rtrequest() instead of grab it around `if_rtrequest' call.

This hunk was commited separately for decreases PF_ROUTE sockets
unlocking diff.

ok gerhard@ deraadt@

3 years agoMake build_crls() behave like build_chain(). If there is not auth data
claudio [Thu, 1 Apr 2021 08:29:10 +0000 (08:29 +0000)]
Make build_crls() behave like build_chain(). If there is not auth data
just NULL the STACK_OF() pointer since libcrypto calls can handle that.
Update comments to be more accurate.
With and OK tb@

3 years agoDo a better job at cleaning up. Remove empty directories, scan not only the
claudio [Thu, 1 Apr 2021 06:53:49 +0000 (06:53 +0000)]
Do a better job at cleaning up. Remove empty directories, scan not only the
known repositories but also clean up no longer known repositories.
With this rpki-client keeps its cache nice and shiny.
With and OK job@

3 years agoAdd encoding.c to the various build targets
claudio [Thu, 1 Apr 2021 06:47:18 +0000 (06:47 +0000)]
Add encoding.c to the various build targets

3 years agoChange search-again with vi keys to work like actual vi(1), also some
nicm [Thu, 1 Apr 2021 06:46:12 +0000 (06:46 +0000)]
Change search-again with vi keys to work like actual vi(1), also some
other fixes. From Aaron Jensen with help from Anindya Mukherjee.

3 years agoMove base64 and hex encoding functions into their own place.
claudio [Thu, 1 Apr 2021 06:43:23 +0000 (06:43 +0000)]
Move base64 and hex encoding functions into their own place.
OK tb@

3 years agoMissing commas, from Vipul Kumar.
nicm [Thu, 1 Apr 2021 06:37:46 +0000 (06:37 +0000)]
Missing commas, from Vipul Kumar.