tb [Tue, 6 Apr 2021 16:30:27 +0000 (16:30 +0000)]
spaces -> tabs
tb [Tue, 6 Apr 2021 15:22:30 +0000 (15:22 +0000)]
Mention the http client in two places.
ok claudio
tb [Tue, 6 Apr 2021 15:00:19 +0000 (15:00 +0000)]
minor style tweaks
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
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@
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@
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@
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.
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
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@
mglocker [Mon, 5 Apr 2021 20:46:06 +0000 (20:46 +0000)]
regen
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@
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@
deraadt [Mon, 5 Apr 2021 18:17:37 +0000 (18:17 +0000)]
minor KNF
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@
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@
landry [Mon, 5 Apr 2021 16:18:32 +0000 (16:18 +0000)]
sync
landry [Mon, 5 Apr 2021 16:17:25 +0000 (16:17 +0000)]
Add 0x413d:0x2107 for various PCSensors TEMPer devices
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@
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
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.
dtucker [Mon, 5 Apr 2021 12:13:07 +0000 (12:13 +0000)]
Fix typo in debug message. ok kettenis@
dv [Mon, 5 Apr 2021 11:35:26 +0000 (11:35 +0000)]
Send correct response type on unpause errors.
ok pd@
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
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.
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
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.
deraadt [Sun, 4 Apr 2021 23:03:07 +0000 (23:03 +0000)]
leave -beta
tb [Sun, 4 Apr 2021 20:40:48 +0000 (20:40 +0000)]
Add missing error check for AES_unwrap_key().
tb [Sun, 4 Apr 2021 20:21:43 +0000 (20:21 +0000)]
Fix two copy paste errors in error messages
tb [Sun, 4 Apr 2021 20:16:29 +0000 (20:16 +0000)]
Add tests for DTLSv1_2{,_client,_server}_method()
deraadt [Sun, 4 Apr 2021 20:08:49 +0000 (20:08 +0000)]
431 is an overlay over 204 (Manitoba)
tb [Sun, 4 Apr 2021 19:55:46 +0000 (19:55 +0000)]
Use correct type for tmp in test_write_bytes()
tb [Sun, 4 Apr 2021 19:36:09 +0000 (19:36 +0000)]
Explicitly NULL pointers to avoid a double free.
tb [Sun, 4 Apr 2021 19:32:26 +0000 (19:32 +0000)]
Don't leak key and dh in the error path.
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.
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
jmc [Sun, 4 Apr 2021 11:36:56 +0000 (11:36 +0000)]
remove stray inserts; from matthias schmidt
jmc [Sun, 4 Apr 2021 06:18:58 +0000 (06:18 +0000)]
fix spacing issue in macro;
jmc [Sun, 4 Apr 2021 06:11:24 +0000 (06:11 +0000)]
missing comma; from kawashima james
tobhe [Sat, 3 Apr 2021 21:29:14 +0000 (21:29 +0000)]
Add size check for sockaddr mask.
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@
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@
tb [Sat, 3 Apr 2021 13:34:45 +0000 (13:34 +0000)]
Run the CMAC tests through EVP_PKEY_new_CMAC_key().
djm [Sat, 3 Apr 2021 06:58:30 +0000 (06:58 +0000)]
typos in comments; GHPR#180 from Ville Skyttä
djm [Sat, 3 Apr 2021 06:55:52 +0000 (06:55 +0000)]
sync CASignatureAlgorithms lists with reality. GHPR#174 from
Matt Hazinski
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
djm [Sat, 3 Apr 2021 05:54:14 +0000 (05:54 +0000)]
whitespace (tab after space)
djm [Sat, 3 Apr 2021 05:46:41 +0000 (05:46 +0000)]
fix incorrect plural; from Ville Skyttä via GHPR#181
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
djm [Sat, 3 Apr 2021 05:28:43 +0000 (05:28 +0000)]
unused variable
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@
dv [Fri, 2 Apr 2021 19:07:18 +0000 (19:07 +0000)]
Remove superflouus mmcpy()
Reported by Preben Guldberg. ok mlarkin@
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@
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
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.
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.
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@
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
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
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
florian [Fri, 2 Apr 2021 06:37:40 +0000 (06:37 +0000)]
Implement ZONEMD (RFC8976), based on DS (ds_43.c)
OK sthen
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@
jmc [Fri, 2 Apr 2021 06:11:01 +0000 (06:11 +0000)]
fix sentence structure;
jmc [Fri, 2 Apr 2021 06:09:44 +0000 (06:09 +0000)]
tweak previous;
tb [Fri, 2 Apr 2021 05:16:29 +0000 (05:16 +0000)]
fix typo + some whitespace
tb [Fri, 2 Apr 2021 03:02:45 +0000 (03:02 +0000)]
Fix Dale's email address
ok drahn
deraadt [Fri, 2 Apr 2021 02:30:29 +0000 (02:30 +0000)]
sync
deraadt [Fri, 2 Apr 2021 02:29:54 +0000 (02:29 +0000)]
don't put ptys onto the ramdisk media
from miod
tb [Fri, 2 Apr 2021 02:20:17 +0000 (02:20 +0000)]
Indent struct members like everywhere else.
dv [Fri, 2 Apr 2021 01:56:20 +0000 (01:56 +0000)]
Document ioctl(2)'s for vmm(4). OK kn@.
job [Thu, 1 Apr 2021 17:43:11 +0000 (17:43 +0000)]
Update manpage about RRDP
OK claudio@
jmc [Thu, 1 Apr 2021 16:59:57 +0000 (16:59 +0000)]
update currency exchange rates;
jmc [Thu, 1 Apr 2021 16:58:56 +0000 (16:58 +0000)]
sort options list;
deraadt [Thu, 1 Apr 2021 16:50:23 +0000 (16:50 +0000)]
spelling
tb [Thu, 1 Apr 2021 16:40:05 +0000 (16:40 +0000)]
Sort usage: rR -> Rr
claudio [Thu, 1 Apr 2021 16:16:44 +0000 (16:16 +0000)]
RRDP is currently off by default.
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.
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@
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
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.
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
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.
job [Thu, 1 Apr 2021 11:04:30 +0000 (11:04 +0000)]
Abate superfluous lines from remote servers
OK claudio@
inoguchi [Thu, 1 Apr 2021 10:47:38 +0000 (10:47 +0000)]
Compare the pointer variable explicitly with NULL in if condition
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
sthen [Thu, 1 Apr 2021 09:56:11 +0000 (09:56 +0000)]
merge NSD 4.3.6rc1
sthen [Thu, 1 Apr 2021 09:55:16 +0000 (09:55 +0000)]
import NSD 4.3.6rc1, tested by me and florian@
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@
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@
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@
claudio [Thu, 1 Apr 2021 06:47:18 +0000 (06:47 +0000)]
Add encoding.c to the various build targets
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.
claudio [Thu, 1 Apr 2021 06:43:23 +0000 (06:43 +0000)]
Move base64 and hex encoding functions into their own place.
OK tb@
nicm [Thu, 1 Apr 2021 06:37:46 +0000 (06:37 +0000)]
Missing commas, from Vipul Kumar.
djm [Wed, 31 Mar 2021 22:16:34 +0000 (22:16 +0000)]
Use new limits@openssh.com protocol extension to let the client select
good limits based on what the server supports. Split the download and
upload buffer sizes to allow them to be chosen independently.
In practice (and assuming upgraded sftp/sftp-server at each end), this
increases the download buffer 32->64KiB and the upload buffer
32->255KiB.
Patches from Mike Frysinger; ok dtucker@
djm [Wed, 31 Mar 2021 21:59:26 +0000 (21:59 +0000)]
cannot effectively test posix-rename extension after changes in
feature advertisment.
djm [Wed, 31 Mar 2021 21:58:07 +0000 (21:58 +0000)]
do not advertise protocol extensions that have been disallowed by
the command-line options (e.g. -p/-P/-R); ok dtucker@
krw [Wed, 31 Mar 2021 21:17:46 +0000 (21:17 +0000)]
Set 'select_timeout' to 'now' when an OFFER is received for the IP address
requested in the DISCOVER.
i.e. immediately accept the OFFER rather than waiting for select_timeout to
expire before accepting the same OFFER.
A corner case since select-timeout is 0 by default.
krw [Wed, 31 Mar 2021 20:52:09 +0000 (20:52 +0000)]
Add two missing checks for strdup() returning NULL.