krw [Mon, 7 Feb 2022 20:24:30 +0000 (20:24 +0000)]
Use fdisk's -b to create boot partitions instead of -e scripts.
Build, boot and install tested by visa@
ok visa@
tb [Mon, 7 Feb 2022 19:49:56 +0000 (19:49 +0000)]
Avoid a NULL dereference in BN_mod_exp2_mont()
This is a very rarely used function and the crash is hard to reach in
practice. Instead of implementing BN_is_odd() badly by hand, just call
the real thing.
Reported by Guido Vranken
ok beck jsing
tb [Mon, 7 Feb 2022 19:44:23 +0000 (19:44 +0000)]
Check for zero modulus in BN_MONT_CTX_set().
From OpenSSL
6a009812, prompted by a report by Guido Vranken
ok beck jsing
guenther [Mon, 7 Feb 2022 19:30:48 +0000 (19:30 +0000)]
Delete STACKGAPLEN: this exec-time allocation at the top of the
original thread's stack hasn't been used since 2015.
ok miod@ deraadt@
rob [Mon, 7 Feb 2022 19:28:14 +0000 (19:28 +0000)]
Tweak previous.
cheloha [Mon, 7 Feb 2022 17:19:57 +0000 (17:19 +0000)]
head(1): check for stdio errors
- Output errors are terminal.
- Input errors yield a warning and cause head(1) to fail
gracefully.
Tweaked by millert@.
Thread: https://marc.info/?l=openbsd-tech&m=
164419238123928&w=2
ok millert@
mbuhl [Mon, 7 Feb 2022 16:42:59 +0000 (16:42 +0000)]
mark failing tests for armv7
mbuhl [Mon, 7 Feb 2022 16:28:45 +0000 (16:28 +0000)]
trig_test-2 now passes on macppc
bluhm [Mon, 7 Feb 2022 15:23:43 +0000 (15:23 +0000)]
Checking ifaddr pointer for NULL without checking in6_ifaddr works
as ifaddr ia_ifa is the first field of in6_ifaddr. So the pointers
are the same, and one NULL check works for both. But in ISO C NULL
has some kind of type and this is undefined behavior. So add a
second NULL check that the compiler can optimize away. The resulting
assembler is the same.
found by kubsan; OK tobhe@
krw [Mon, 7 Feb 2022 15:21:38 +0000 (15:21 +0000)]
Use fdisk's -b to create boot partitions instead of -e scripts.
Build, boot and install tested by visa@
ok visa@
rob [Mon, 7 Feb 2022 13:17:27 +0000 (13:17 +0000)]
Sync ps.1 with sys/proc.h. Tweaked by deraadt@.
Ok millert@ deraadt@
kettenis [Mon, 7 Feb 2022 13:16:42 +0000 (13:16 +0000)]
Convert KVA allocation to km_alloc(9).
ok jsg@
claudio [Mon, 7 Feb 2022 11:03:34 +0000 (11:03 +0000)]
In rtredirect() change an bad assignment in an if condition to the
correct equality check.
Found by and OK jsg@
espie [Mon, 7 Feb 2022 09:38:33 +0000 (09:38 +0000)]
systematically remove setuid/setgid from files before archiving AND
during extractions. Those bits belong in a museum^Win the packing-list.
thx naddy@ for checking this thru a bulk.
claudio [Mon, 7 Feb 2022 09:31:21 +0000 (09:31 +0000)]
Switch to stdint.h types like rest of bgpd
djm [Mon, 7 Feb 2022 01:25:12 +0000 (01:25 +0000)]
use libfido2 1.8.0+ fido_assert_set_clientdata() instead of manually
hashing data outselves. Saves a fair bit of code and makes life easier
for some -portable platforms.
dtucker [Sun, 6 Feb 2022 22:58:33 +0000 (22:58 +0000)]
Add test for empty hostname with port.
kettenis [Sun, 6 Feb 2022 19:10:07 +0000 (19:10 +0000)]
Avoid touching "locked" DARTs. While there, print something when we place
a DART in bypass mode.
ok patrick@
rob [Sun, 6 Feb 2022 17:24:58 +0000 (17:24 +0000)]
s/poll/pool
jsing [Sun, 6 Feb 2022 16:11:58 +0000 (16:11 +0000)]
Remove i <= 0 checks from SSL_get_error()
In order for SSL_get_error() to work with SSL_read_ex() and SSL_write_ex()
the error handling needs to be performed without checking i <= 0. This is
effectively part of OpenSSL
8051ab2b6f8 and should bring the behaviour of
SSL_get_error() largely inline with OpenSSL 1.1.
Issue reported by Johannes Nixdorf.
ok inoguchi@ tb@
jsing [Sun, 6 Feb 2022 16:08:14 +0000 (16:08 +0000)]
Handle zero byte reads/writes that trigger handshakes in the TLSv1.3 stack.
With the legaacy stack, it is possible to do a zero byte SSL_read() or
SSL_write() that triggers the handshake, but then returns zero without
SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE being flagged. This currently
works in the TLSv1.3 stack by returning TLS_IO_WANT_POLLIN or
TLS_IO_WANT_POLLOUT, which is then hidden by SSL_get_error().
However, due to upcoming changes to SSL_get_error() this will no longer be
the case. In order to maintain the existing legacy behaviour, explicitly
handle zero byte reads and writes in the TLSv1.3 stack, following
completion of a handshake.
ok inoguchi@ tb@
krw [Sun, 6 Feb 2022 15:52:23 +0000 (15:52 +0000)]
Use fdisk's -b to create boot partitions instead of -e scripts.
Build, boot and install tested by visa@
ok visa@
op [Sun, 6 Feb 2022 13:56:14 +0000 (13:56 +0000)]
fix jobs and -j description: dpb uses hw.ncpuonline since
ports/infrastructure/lib/DPB/Core/Init.pm revision 1.32
OK espie
visa [Sun, 6 Feb 2022 11:29:18 +0000 (11:29 +0000)]
Allow installation on a disk with a GPT.
OK krw@
claudio [Sun, 6 Feb 2022 09:57:59 +0000 (09:57 +0000)]
Simplify cursig() a bit and make sure that signals are always sent to
the parent of ptraced processes. Especially ignore the signal mask set
by sigprocmask(2) in that case. In userret() alter the testcase for
when to call cursig() which is only there to avoid taking the
KERNEL_LOCK when returning from a MP safe syscall. This can be revisited
once cursig() is MP safe.
Problem with debugging signal handlers found by kurt@
Tested and OK kurt@, OK mpi@
claudio [Sun, 6 Feb 2022 09:52:32 +0000 (09:52 +0000)]
Switch from u_intX_t types to stdint.h uintX_t like it was done in bgpd.
OK florian@ tb@
claudio [Sun, 6 Feb 2022 09:51:19 +0000 (09:51 +0000)]
Switch from u_intX_t types to stdint.h uintX_t. Mostly mechanical with
a few reindents.
OK florian@ tb@
anton [Sun, 6 Feb 2022 09:19:46 +0000 (09:19 +0000)]
cope with recent S3I removal; ok tb@
robert [Sun, 6 Feb 2022 09:07:42 +0000 (09:07 +0000)]
now that APM_BATT_CHARGING is also set in acpi and on some m1 devices
enable support for displaying an estimate recharge time in apm(d)
e.g:
Battery state: charging, 95% remaining, 11 minutes recharge time estimate
Battery state: charging, 97% remaining, 8 minutes recharge time estimate
Battery state: charging, 98% remaining, 6 minutes recharge time estimate
Battery state: charging, 99% remaining, 3 minutes recharge time estimate
Battery state: charging, 99% remaining, 1 minutes recharge time estimate
Battery state: charging, 99% remaining, 0 minutes recharge time estimate
ok jca@
jsg [Sun, 6 Feb 2022 00:29:02 +0000 (00:29 +0000)]
remove please from manual pages
ok jmc@ sthen@ millert@
gnezdo [Sat, 5 Feb 2022 23:00:20 +0000 (23:00 +0000)]
Fix UB "shift-out-of-bounds" in battlestar
OK millert@
naddy [Sat, 5 Feb 2022 22:59:58 +0000 (22:59 +0000)]
ypldap: fix -Wunused-but-set-variable warnings
* wrlen has been write-only since the code was imported
* removing "dns_pid" mirrors ntpd/ntp.c 1.122
* ifdef out unfinished code in yp_check()
ok millert@ deraadt@
daniel [Sat, 5 Feb 2022 20:31:26 +0000 (20:31 +0000)]
grow the dmesg buffer on i386 from 4 to 8 pages
I have a machine where the dmesg is too big for 4 pages.
ok deraadt@
tb [Sat, 5 Feb 2022 18:36:08 +0000 (18:36 +0000)]
Adapt appstest.sh for the new TLS_ names.
tb [Sat, 5 Feb 2022 18:34:06 +0000 (18:34 +0000)]
Add a workaround due to OpenSSL's limitation of SSL_CTX_set_cipher_list
SSL_CTX_set_cipher_list() in OpenSSL 1.1 does not accept TLSv1.3 ciphers.
This wasn't a problem until now since the AEAD- ciphers were counted as
distinct from TLS_ ciphers by the regress test, so they were never used
in the {run,check}-cipher-${cipher}-client-${clib}-server-${slib} tests
With the renaming, the TLSv1.3 ciphers are now considered as common
ciphers, so they're tested. With openssl11 this results in
0:error:
1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match:ssl/ssl_lib.c:2573:
The design of these tests doesn't allow easily adding a call to
SSL_CTX_set_ciphersuites (since they also need to work with openssl 1.0.2)
so skip the TLS_* ciphers for the time being.
tb [Sat, 5 Feb 2022 18:21:09 +0000 (18:21 +0000)]
Mechanically adjust from AEAD- to TLS_ to adjust to the new cipher names.
tb [Sat, 5 Feb 2022 18:19:39 +0000 (18:19 +0000)]
Adjust the ssl_get_shared_ciphers to the new names.
tb [Sat, 5 Feb 2022 18:18:18 +0000 (18:18 +0000)]
Switch TLSv1.3 cipher names from AEAD- to OpenSSL's TLS_
OpenSSL chose to break the previous naming convention for ciphers and
to adopt TLS_* "RFC" names instead. Unfortunately, these names are
exposed in several APIs and some language bindings test for these
non-standard names instead of cipher values, which is ... unfortunate
(others would say "plain crazy").
We currently have to maintain patches in regress and ports (p5-Net-SSLeay,
openssl-ruby-tests - which means that Ruby will pick this up at some point)
to work around this difference and that's just not worth the effort.
The old AEAD- names will become aliases and continue to work, but in
openssl ciphers and netcat output the TLS_* names will now be displayed.
"I would be very happy if this gets committed" bluhm
ok beck inoguchi, begrudgingly ok jsing
gkoehler [Sat, 5 Feb 2022 17:11:56 +0000 (17:11 +0000)]
Provide logbl(3) when long double is double
bcallah@ had same diff
ok guenther@
jsing [Sat, 5 Feb 2022 14:54:40 +0000 (14:54 +0000)]
Revise for S3I removal.
jsing [Sat, 5 Feb 2022 14:54:10 +0000 (14:54 +0000)]
Bye bye S3I.
S3I has served us well, however now that libssl is fully opaque it is time
to say goodbye. Aside from removing the calloc/free/memset, the rest is
mechanical sed.
ok inoguchi@ tb@
kettenis [Sat, 5 Feb 2022 09:37:06 +0000 (09:37 +0000)]
Switch vmapbuf() and vunmapbuf() over to km_alloc(9) and km_free(9) like
we did for arm64 and powerpc64 some time ago.
ok guenther@
anton [Sat, 5 Feb 2022 07:31:40 +0000 (07:31 +0000)]
Only install the sensors once as multiple devices can be paired with the
same receiver. Prevents a newly added assertion from triggering.
Problem reported by Joel Carnat <joel at carnat dot net> on bugs@
dlg [Sat, 5 Feb 2022 04:08:27 +0000 (04:08 +0000)]
make bpf_movein align the packet payload.
bluhm@ hit a problem while running a regress test where a packet
generated and injected via bpf ends up being consumed by the network
stack. the stack assumes that packets are aligned properly, but bpf
was lazy and put whatever was written to it at the start of an mbuf.
ethernet has a 14 byte header, so if you put that at the start the
payload will be misaligned by 2 bytes.
bpf already has handling for different link header types, so this
handling is extended a bit to align the payload after the link
header.
while here we're fixing up a few error codes. short packets produce
EINVAL instead of EPERM, and packets larger than the biggest mbuf
the kernel supports generates EMSGSIZE.
with tweaks and ok bluhm@
dlg [Sat, 5 Feb 2022 03:56:16 +0000 (03:56 +0000)]
remove an extra set of brackets. no functional change.
krw [Fri, 4 Feb 2022 23:32:17 +0000 (23:32 +0000)]
Wrap some annoyingly long lines.
kettenis [Fri, 4 Feb 2022 22:24:09 +0000 (22:24 +0000)]
Add prototype for clock_set_frequency_idx().
krw [Fri, 4 Feb 2022 18:21:33 +0000 (18:21 +0000)]
%llu should be enough for anybody, no need to use %lld/(long long) for
uint64_t values.
kettenis [Fri, 4 Feb 2022 18:15:40 +0000 (18:15 +0000)]
Define __HAVE_PMAP_MPSAFE_ENTER_COW; the ARMv8 architecture requires
that we implement proper "break-before-make" semantics and I've stared
at the code for long enough that I've convinced myself that we do indeed
implement this correctly several times.
ok guenther@
krw [Fri, 4 Feb 2022 18:12:47 +0000 (18:12 +0000)]
Use the '-b' to create boot partitions instead of '-e' scripts.
Media creation & subsequent installation tests by visa@
ok visa@
tedu [Fri, 4 Feb 2022 17:50:28 +0000 (17:50 +0000)]
whitelist resolv.conf for stat. go dns library does this.
ok deraadt
tb [Fri, 4 Feb 2022 16:50:49 +0000 (16:50 +0000)]
More consistency in the return code docs.
tb [Fri, 4 Feb 2022 16:50:01 +0000 (16:50 +0000)]
Document certificate_policies() in a comment.
tb [Fri, 4 Feb 2022 16:42:15 +0000 (16:42 +0000)]
Bump libressl's version in pkgconfig to 2.0.0
LibreSSL's pc files effectively hardcode the version to 1.0.0 since
LibreSSL exists. That probably never made much sense. This causes
some pain for ports that "need 'openssl' ['>= +1.1.0'] found '1.0.0'"
or similar while they would build perfectly fine with LibreSSL.
This only affects OpenBSD. We do not put the actual LibreSSL version
in there since it may cause trouble
Discussed with sthen, millert, inoguchi, beck over the past year.
Diff from/ok sthen
tb [Fri, 4 Feb 2022 16:34:15 +0000 (16:34 +0000)]
Remove a strange inheritance check from addr_validate_path_internal()
The trust anchor can't inherit, but the code says that it can inherit
just not if the leaf tries to inherit from that. This makes no sense
and doesn't match what is done on the asid side.
ok jsing
tb [Fri, 4 Feb 2022 16:29:43 +0000 (16:29 +0000)]
whitespace
tb [Fri, 4 Feb 2022 16:28:20 +0000 (16:28 +0000)]
Ensure that certificate policies follow RFC 7318
RFC 7318 makes requirements on the certificate policy extension imposed
by RFC 6487 a bit stricter. It requires that exactly one policy OID is
present and that it be id-cp-ipAddr-asNumber and if there is a policy
qualifier it must be id-qt-cps. These are requirements that the X.509
verifier's policy code can't enforce, so unpack the certificate policy
extension by hand and check that it matches expectations.
ok claudio
tb [Fri, 4 Feb 2022 16:21:11 +0000 (16:21 +0000)]
Enforce Certificate Policy for RPKI
RFCs 6384 defines a certificate policy for RPKI. Ensure that the verifier
builds a certification path that follows this OID: set up a policy on the
X509_STORE_CTX's verify parameters and set initial-explicit-policy and
initial-policy-mapping-inhibit.
Pointed out by Ties de Kock
ok claudio
tb [Fri, 4 Feb 2022 16:08:53 +0000 (16:08 +0000)]
Add id-cp-ipAddr-asNumber OID to x509_init_oid()
Unfortunately, NID_ipAddr_asNumber is not available in LibreSSL < 3.3
and OpenSSL, so load its OID by hand to help -portable. This will be
used for certificate policy checks.
ok claudio
kettenis [Fri, 4 Feb 2022 16:08:39 +0000 (16:08 +0000)]
Now that installboot(8) creates the startup.nsh file, remove the shell
scripting doing the same thing from here.
ok deraadt@, visa@
krw [Fri, 4 Feb 2022 14:07:56 +0000 (14:07 +0000)]
Remove CHS information from internal representation of MBR partitions. Generate
CHS information as required when writing MBR to disk, editing a partition in CHS
mode or printing MBR.
No intentional functional change.
job [Fri, 4 Feb 2022 13:50:32 +0000 (13:50 +0000)]
Fix outdated comment
Nowadays SKI/AKI validation happens in proc_parser_roa()
claudio [Fri, 4 Feb 2022 13:11:14 +0000 (13:11 +0000)]
Test that a non conforming xmlns attribute results in a failure.
claudio [Fri, 4 Feb 2022 13:05:47 +0000 (13:05 +0000)]
Fix xmlns URI, I guess I search and replaced too much in this file.
Update hash in the Makefile.inc since it changed as well.
Noticed by anton@
claudio [Fri, 4 Feb 2022 12:01:33 +0000 (12:01 +0000)]
Rename sockaddr_un sun to sa_un since sun is defined on illumos systems.
OK dlg@
claudio [Fri, 4 Feb 2022 12:01:12 +0000 (12:01 +0000)]
Rename sockaddr_un sun to sa_un since sun is defined on illumos systems.
OK dlg@
nicm [Fri, 4 Feb 2022 11:57:22 +0000 (11:57 +0000)]
Use ACS for pane border indicators so they work with different line
types, from Thomas Adam.
robert [Fri, 4 Feb 2022 08:06:48 +0000 (08:06 +0000)]
set the APM_BATT_CHARGING state if the battery is being charged and try
to calculate the remaining time to be fully charged
ok jca@
tb [Fri, 4 Feb 2022 07:59:54 +0000 (07:59 +0000)]
Fix another instance of incorrect capitalization of ChaCha20.
pointed out by jmc
dtucker [Fri, 4 Feb 2022 07:53:44 +0000 (07:53 +0000)]
Add unit tests for hpdelim.
dtucker [Fri, 4 Feb 2022 02:49:17 +0000 (02:49 +0000)]
Since they are deprecated, move DSA to the end of the default list of
public keys so that they will be tried last. From github PR#295 from
"ProBackup-nl", ok djm@
tb [Fri, 4 Feb 2022 00:55:52 +0000 (00:55 +0000)]
Fix capitalization of ChaCha20
jsg [Thu, 3 Feb 2022 22:24:09 +0000 (22:24 +0000)]
store root bridge data in softc before calling intel_init_stolen_res()
should fix panic on boot on x41 reported by Fred Crowson
guenther [Thu, 3 Feb 2022 19:57:11 +0000 (19:57 +0000)]
The sparc64 pmap at least requires the fault access_type to be a
subset of the request permissions, so when forcing an initial RO
fault for CoW also clamp the access_type.
problem reported by bluhm@
based on a suggestion from miod@
ok kettenis@
tb [Thu, 3 Feb 2022 18:40:34 +0000 (18:40 +0000)]
Unindent and unwrap lines. Pull up a NULL check. No functional change.
tb [Thu, 3 Feb 2022 18:35:24 +0000 (18:35 +0000)]
Remove commented variable declarations
claudio [Thu, 3 Feb 2022 18:19:32 +0000 (18:19 +0000)]
Enforce the RRDP XMLNS to "www.ripe.net/rpki/rrdp"
Missing check reported by Ties de Kock
OK tb@ benno@
tb [Thu, 3 Feb 2022 18:05:31 +0000 (18:05 +0000)]
Fix copy-paste error: X509_V_ERR_CRL_SIGNATURE_FAILURE means that the
CRL's signature is invalid, not the certificate's.
tb [Thu, 3 Feb 2022 17:44:04 +0000 (17:44 +0000)]
Use X509_*get0_pubkey() wherever possible to simplify and clean up
the code. Also add error checking where possible.
ok jsing
tb [Thu, 3 Feb 2022 17:42:54 +0000 (17:42 +0000)]
Remove some stale comments.
ok jsing
claudio [Thu, 3 Feb 2022 17:26:17 +0000 (17:26 +0000)]
Time for rpki-client 7.6
OK benno@
bluhm [Thu, 3 Feb 2022 17:22:01 +0000 (17:22 +0000)]
On i386 run-regress-ungc fails with EINVAL. It passes uninitialized
data from struct msghdr to system call sendmsg(2). Fix the controllen
and make error messages unique.
OK mvs@
guenther [Thu, 3 Feb 2022 17:18:22 +0000 (17:18 +0000)]
Delete unused/obsolete M_* type values.
ok miod@ mpi@
kn [Thu, 3 Feb 2022 17:06:09 +0000 (17:06 +0000)]
Use UVM_KMF_TRYLOCK for consistency
No object change.
OK millert
jsing [Thu, 3 Feb 2022 16:33:12 +0000 (16:33 +0000)]
Cleanup/simplify ssl_cert_type()
Remove the X509 argument as it is unused - this was passed so that
ssl_cert_type() can get the public key from the X509 object if the
EVP_PKEY argument is NULL, however this is never the case.
ok tb@
visa [Thu, 3 Feb 2022 13:24:04 +0000 (13:24 +0000)]
fdisk(8): Make -A preserve BIOS boot partition
On PolarFire SoC, the HSS firmware loads HSS payload from BIOS boot
partition. Typically the payload carries second-stage low-level boot
code, such as U-Boot. If the payload is missing, the SoC is not able
to boot normally. Hence automatic disk formatting should not delete
the partition.
OK krw@
nicm [Thu, 3 Feb 2022 11:06:11 +0000 (11:06 +0000)]
Adjust size given to resize-pane for pane status line, GitHub issue
3050.
visa [Thu, 3 Feb 2022 10:27:33 +0000 (10:27 +0000)]
Use installboot(8) in install.md of riscv64.
OK kettenis@ deraadt@
visa [Thu, 3 Feb 2022 10:25:14 +0000 (10:25 +0000)]
installboot(8): Adjustments for EFI platforms
Reduce #ifdef'ing within the control logic to make it clearer that there
are no essential differences in behaviour between the platforms.
Make installboot(8) write startup.nsh to enable simpler and more consistent
code in install.md.
Input and OK kettenis@ deraadt@
visa [Thu, 3 Feb 2022 10:21:13 +0000 (10:21 +0000)]
Rename armv7_installboot.c to efi_installboot.c.
The code is common to EFI platforms, not specific to armv7.
Suggested by kettenis@
nicm [Thu, 3 Feb 2022 10:07:11 +0000 (10:07 +0000)]
Use format_draw for command prompt prefix to allow styles, GitHub issue
3054.
nicm [Thu, 3 Feb 2022 07:38:17 +0000 (07:38 +0000)]
Update focus when active pane changes after pane destroyed.
nicm [Thu, 3 Feb 2022 07:26:43 +0000 (07:26 +0000)]
Add a key in copy mode to toggle position indicator.
jsg [Thu, 3 Feb 2022 04:45:01 +0000 (04:45 +0000)]
inteldrm now requires ttm
jsg [Thu, 3 Feb 2022 02:39:45 +0000 (02:39 +0000)]
sync list of amdgpu files built with -msse -msse2 with linux 5.15.y
kettenis [Wed, 2 Feb 2022 22:55:57 +0000 (22:55 +0000)]
Add apldma(4), a driver for the DMA controller found on Apple SoCs.
This driver implements an interface for using DMA for audio output.
ok ratchov@
miod [Wed, 2 Feb 2022 17:11:36 +0000 (17:11 +0000)]
Get the pci bus number from the bus-range property when available, rather
than assuming it will always be zero.
ok kettenis@
claudio [Wed, 2 Feb 2022 15:13:00 +0000 (15:13 +0000)]
When a RRDP fetch failed not only clear the filesystem but also flush
the to delete list stored this RRDP node.
Noticed by Job on console.rpki-client.org with the help of idnic.net
OK tb@
visa [Wed, 2 Feb 2022 13:22:10 +0000 (13:22 +0000)]
Add missing mode argument to open(2) with O_CREAT.
tb [Wed, 2 Feb 2022 12:10:40 +0000 (12:10 +0000)]
typo