openbsd
18 months agoImplement dt(4) utrace support on amd64 and i386.
claudio [Wed, 26 Apr 2023 16:53:58 +0000 (16:53 +0000)]
Implement dt(4) utrace support on amd64 and i386.

This adds stacktrace_save_utrace() to extract and save the userland stack
which is stubbed out on most archs. alpha and riscv64 do not even implement
dt(4) and stacktrace_save_at() so the stubs are excluded there.

Additionally add a new ioctl DTIOCGETAUXBASE which allows btrace to
fetch the AUX_BASE vallue from the AUX vector of a process.

OK mpi@ (some time ago) discussed with kettenis@

18 months agoImprove accounting by tracking things by repo and tal.
claudio [Wed, 26 Apr 2023 16:32:41 +0000 (16:32 +0000)]
Improve accounting by tracking things by repo and tal.
This fixes some wrong accounting for repositories that are referenced
from more than one TAL. It changes the ometric lable output a little bit
since there are repository metrics that no longer include the 'name' label.
OK tb@

18 months agoReodrer some things to fix vmctl/vmd builds after the vmm MI/MD split
mlarkin [Wed, 26 Apr 2023 16:13:19 +0000 (16:13 +0000)]
Reodrer some things to fix vmctl/vmd builds after the vmm MI/MD split

18 months agoFix vmd after vmm MI/MD split
mlarkin [Wed, 26 Apr 2023 16:12:21 +0000 (16:12 +0000)]
Fix vmd after vmm MI/MD split

18 months agoRemove +20y old rt_timer_init() comment
kn [Wed, 26 Apr 2023 16:09:44 +0000 (16:09 +0000)]
Remove +20y old rt_timer_init() comment

Obsolete since last year's r1.411 "Rework the rttimer code."
OK claudio

18 months agoIncorporate r1.140 and r1.141 of vmm.c:
mlarkin [Wed, 26 Apr 2023 15:40:51 +0000 (15:40 +0000)]
Incorporate r1.140 and r1.141 of vmm.c:

----------------------------
revision 1.341
date: 2023/04/26 09:39:56;  author: dv;  state: Exp;  lines: +3 -3;  commitid: 1XztmVbxa8OP2xYi;
Unbreak vmm on Intel. Mistakenly enabled CET on non-CET systems.

Found by anton@ & jsg@
----------------------------
revision 1.340
date: 2023/04/24 16:53:57;  author: dv;  state: Exp;  lines: +11 -1;  commitid: q9qQ55f7h2gen8N4;
vmm(4): allow guests to enable and use supervisor IBT.

Why should hosts have all the fun? Conditionally unmask the cpuid
bits for IBT and allow r/w access to the supervisor CET msr.

Will need revisiting when we introduce usage of userland CET msr.

18 months agotypofix rttimer comment
kn [Wed, 26 Apr 2023 15:40:33 +0000 (15:40 +0000)]
typofix rttimer comment

18 months agoIntegrate r1.339 of vmm.c which I missed during the previous MI/MD split
mlarkin [Wed, 26 Apr 2023 15:34:31 +0000 (15:34 +0000)]
Integrate r1.339 of vmm.c which I missed during the previous MI/MD split

---
revision 1.339
date: 2023/04/22 18:27:28;  author: guenther;  state: Exp;  lines: +3 -3;  commitid: ajtkYPSAhtJdB488;
Rename the XCR0_* #defines to XFEATURE_* and add the new supervisor-state
features: while all are appropriate for xsaves/xrstors, the
supervisor-state features aren't for xcr0 but rather for the new XSS_MSR,
making the current names kinda confusing.

Add #defines for masking bits for xcr0 vs XSS.

Add and report the new XSAVE_XFD xsave subfeature bit.
---

18 months agovmm.c -> vmm_machdep.c (remove old file)
mlarkin [Wed, 26 Apr 2023 15:13:59 +0000 (15:13 +0000)]
vmm.c -> vmm_machdep.c (remove old file)

18 months agoFix splassert noticed by sthen
beck [Wed, 26 Apr 2023 15:13:52 +0000 (15:13 +0000)]
Fix splassert noticed by sthen

Called wrong incore when not holding bio.

ok claudio@

18 months agoRefactor MD/MI parts of vmm.
mlarkin [Wed, 26 Apr 2023 15:11:21 +0000 (15:11 +0000)]
Refactor MD/MI parts of vmm.

ok dv, deraadt

18 months agoDocument those BIO_ctrl(3) command constants
schwarze [Wed, 26 Apr 2023 15:03:02 +0000 (15:03 +0000)]
Document those BIO_ctrl(3) command constants
that correspond to more than one macro each.

18 months agoDon't rely on the disklabel defaults or a disktab entry's ba#/fa#
krw [Wed, 26 Apr 2023 14:42:27 +0000 (14:42 +0000)]
Don't rely on the disklabel defaults or a disktab entry's ba#/fa#
values for the block/fragment sizes that some install media need.
Hoist the desired values into the newfs(8) invocations to make it
obvious non-default values are required and what the values are.

No functional change.

ok kn@

18 months agoFix my email address.
kettenis [Wed, 26 Apr 2023 14:39:42 +0000 (14:39 +0000)]
Fix my email address.

18 months agoDuring boot we have a protective and restrictive pf ruleset during the time
phessler [Wed, 26 Apr 2023 14:28:09 +0000 (14:28 +0000)]
During boot we have a protective and restrictive pf ruleset during the time
we are running netstart, and then load the pf.conf ruleset after all of the
interfaces are loaded.

Allow in and out IPv6 neighbor advertisement traffic without state during
that time.

suggestions/OK from saschan@
OK sthen@ kn@ florian@ deraadt@

18 months agoRemove the now unused bio_pk7.c
tb [Wed, 26 Apr 2023 14:27:40 +0000 (14:27 +0000)]
Remove the now unused bio_pk7.c

18 months agoMove BIO_new_PKCS7() to the the other streaming stuff in pk7_mime.c
tb [Wed, 26 Apr 2023 14:25:58 +0000 (14:25 +0000)]
Move BIO_new_PKCS7() to the the other streaming stuff in pk7_mime.c

18 months agoKNF nit
tb [Wed, 26 Apr 2023 14:23:18 +0000 (14:23 +0000)]
KNF nit

18 months agoClean up ec.h a little.
tb [Wed, 26 Apr 2023 13:12:51 +0000 (13:12 +0000)]
Clean up ec.h a little.

The doxygen comments are either obvious or otherwise unhelpful and
generally an eye sore. Go read the manpage if the header isn't enough.

18 months agoNuke variable 'LBA'. Always set for ramdisk_cd, never set for
krw [Wed, 26 Apr 2023 13:01:02 +0000 (13:01 +0000)]
Nuke variable 'LBA'. Always set for ramdisk_cd, never set for
ramdisk, so just keep or remove the conditional sections.

ok kn@ miod@

18 months agoProperly handle userland branch target traps.
kettenis [Wed, 26 Apr 2023 12:30:24 +0000 (12:30 +0000)]
Properly handle userland branch target traps.

ok deraadt@, patrick@

18 months agoBackout previous commit:
bluhm [Wed, 26 Apr 2023 12:25:12 +0000 (12:25 +0000)]
Backout previous commit:
Do not grab the `vmmaplk' recursively, prevent a self-deadlock.
It causes panic: uvm_map_pageable_wire: stale map
Found by regress/misc/posixtestsuite conformance/interfaces/mmap/18-1
requested by deraadt@

18 months agoParameter names are not needed
job [Wed, 26 Apr 2023 11:06:32 +0000 (11:06 +0000)]
Parameter names are not needed

18 months agoRemove unneeded parentheses
job [Wed, 26 Apr 2023 11:04:12 +0000 (11:04 +0000)]
Remove unneeded parentheses

18 months agoNo need to pass around const pointer cpder2
job [Wed, 26 Apr 2023 11:00:49 +0000 (11:00 +0000)]
No need to pass around const pointer cpder2

Suggested by tb@

18 months agoShrink signature as cpder is only needed as local variable
job [Wed, 26 Apr 2023 10:55:58 +0000 (10:55 +0000)]
Shrink signature as cpder is only needed as local variable

Suggested by tb@

18 months agowhitespace fix
mlarkin [Wed, 26 Apr 2023 10:52:55 +0000 (10:52 +0000)]
whitespace fix

18 months agoReplace macros with functions
job [Wed, 26 Apr 2023 10:34:08 +0000 (10:34 +0000)]
Replace macros with functions

Requested by tb@

18 months agoregress: remove vmd path length tests.
dv [Wed, 26 Apr 2023 10:14:21 +0000 (10:14 +0000)]
regress: remove vmd path length tests.

These add no value and we'd now that we don't artificially limit
path lengths just be updating them to check PATH_MAX.

18 months agoDon't redeclare s, it's already there.
beck [Wed, 26 Apr 2023 10:00:37 +0000 (10:00 +0000)]
Don't redeclare s, it's already there.

noticed by miod@
ok kettenis@

18 months agoFix missing splbio() needed in nfs
beck [Wed, 26 Apr 2023 09:53:55 +0000 (09:53 +0000)]
Fix missing splbio() needed in nfs

ok claudio@ kettenis@

18 months agoUnbreak vmm on Intel. Mistakenly enabled CET on non-CET systems.
dv [Wed, 26 Apr 2023 09:39:56 +0000 (09:39 +0000)]
Unbreak vmm on Intel. Mistakenly enabled CET on non-CET systems.

Found by anton@ & jsg@

18 months agoSome more EC2M cleanup
tb [Wed, 26 Apr 2023 09:31:12 +0000 (09:31 +0000)]
Some more EC2M cleanup

18 months agoRotate the console in amdgpu when there is an orientation quirk.
bentley [Wed, 26 Apr 2023 09:19:47 +0000 (09:19 +0000)]
Rotate the console in amdgpu when there is an orientation quirk.

ok jsg@

18 months agoGarbage collect test using the nseq command
tb [Wed, 26 Apr 2023 09:07:59 +0000 (09:07 +0000)]
Garbage collect test using the nseq command

reminded by anton

18 months agoRename dercache regress test to x509_asn1
job [Wed, 26 Apr 2023 08:58:03 +0000 (08:58 +0000)]
Rename dercache regress test to x509_asn1

Requested by jsing@

18 months agoFix typo in comment: default scalue values -> default scale values
bentley [Wed, 26 Apr 2023 08:38:51 +0000 (08:38 +0000)]
Fix typo in comment: default scalue values -> default scale values

18 months agoRemove e_old.c again
tb [Wed, 26 Apr 2023 08:25:37 +0000 (08:25 +0000)]
Remove e_old.c again

Also remove nonexistent symbols #defined to other symbols that confuse
some linkers in -portable.

This commit entails no ABI change on OpenBSD.

Discussed with jsing

18 months agoDeclare sendsyslog to match its man page
gnezdo [Wed, 26 Apr 2023 06:52:45 +0000 (06:52 +0000)]
Declare sendsyslog to match its man page

This simplifies syzkaller revival after the removal of __syscall.

OK bluhm, millert, deraadt

18 months agoAdd parent to nvgre in ifconfig.8.
asou [Wed, 26 Apr 2023 02:38:08 +0000 (02:38 +0000)]
Add parent to nvgre in ifconfig.8.

ok david@

18 months agoCheck for ProxyJump=none in CanonicalizeHostname logic.
djm [Wed, 26 Apr 2023 01:36:03 +0000 (01:36 +0000)]
Check for ProxyJump=none in CanonicalizeHostname logic.

Previously ssh would incorrectly refuse to canonicalise the hostname
if ProxyJump was explicitly set to "none" when CanonicalizeHostname=yes

bz3567; ok dtucker

18 months agoAlso set TSO flag on vlan interfaces.
jan [Wed, 26 Apr 2023 00:14:21 +0000 (00:14 +0000)]
Also set TSO flag on vlan interfaces.

with tweaks from bluhm, claudio and dlg

I fine with it from claudio
looks good to me from dlg

ok bluhm

18 months agoReinstate e_old.c it is still used by -portable
tb [Tue, 25 Apr 2023 23:16:31 +0000 (23:16 +0000)]
Reinstate e_old.c it is still used by -portable

18 months agoFix white space.
bluhm [Tue, 25 Apr 2023 22:56:28 +0000 (22:56 +0000)]
Fix white space.

18 months agoregen
kettenis [Tue, 25 Apr 2023 21:58:36 +0000 (21:58 +0000)]
regen

18 months agoAdd RK3588.
kettenis [Tue, 25 Apr 2023 21:57:29 +0000 (21:57 +0000)]
Add RK3588.

18 months agoAdd regress test for invalidation of DER cache in select X509 setter functions
job [Tue, 25 Apr 2023 21:51:44 +0000 (21:51 +0000)]
Add regress test for invalidation of DER cache in select X509 setter functions

18 months agoRemove documentation of BN_BLINDING_{g,s}et_thread_id
tb [Tue, 25 Apr 2023 20:07:55 +0000 (20:07 +0000)]
Remove documentation of BN_BLINDING_{g,s}et_thread_id

18 months agoe_old can also go
tb [Tue, 25 Apr 2023 20:06:35 +0000 (20:06 +0000)]
e_old can also go

18 months agoRemove the deprecated API from BN
tb [Tue, 25 Apr 2023 19:57:59 +0000 (19:57 +0000)]
Remove the deprecated API from BN

18 months agoGF2m bites the dust. It won't be missed.
tb [Tue, 25 Apr 2023 19:53:30 +0000 (19:53 +0000)]
GF2m bites the dust. It won't be missed.

18 months agoASN1_item_ndef_i2d also goes. discussed with deraadt
tb [Tue, 25 Apr 2023 19:52:25 +0000 (19:52 +0000)]
ASN1_item_ndef_i2d also goes. discussed with deraadt

18 months agobio_asn1: adjust for more recent churn
tb [Tue, 25 Apr 2023 19:48:24 +0000 (19:48 +0000)]
bio_asn1: adjust for more recent churn

18 months agoRemove commented version of OPENSSL_NO_EC2M
tb [Tue, 25 Apr 2023 19:34:06 +0000 (19:34 +0000)]
Remove commented version of OPENSSL_NO_EC2M

18 months agoRemove duplicate NID definitions
tb [Tue, 25 Apr 2023 19:32:19 +0000 (19:32 +0000)]
Remove duplicate NID definitions

18 months agoLIBRESSL_NEXT_API is no longer needed
tb [Tue, 25 Apr 2023 19:29:36 +0000 (19:29 +0000)]
LIBRESSL_NEXT_API is no longer needed

18 months agoRemove prototype of EC_GFp_nist_method()
tb [Tue, 25 Apr 2023 19:28:22 +0000 (19:28 +0000)]
Remove prototype of EC_GFp_nist_method()

18 months agoMove EC_KEY_{insert,set}_key_method_data() to internal-only
tb [Tue, 25 Apr 2023 19:26:45 +0000 (19:26 +0000)]
Move EC_KEY_{insert,set}_key_method_data() to internal-only

18 months agoMove low level BIO_new_NDEF API to internal-only
tb [Tue, 25 Apr 2023 19:08:30 +0000 (19:08 +0000)]
Move low level BIO_new_NDEF API to internal-only

18 months agoRemove proxy cert remnants
tb [Tue, 25 Apr 2023 19:01:01 +0000 (19:01 +0000)]
Remove proxy cert remnants

18 months agoRemove NETSCAPE_CERT_SEQUENCE
tb [Tue, 25 Apr 2023 18:57:57 +0000 (18:57 +0000)]
Remove NETSCAPE_CERT_SEQUENCE

18 months agoMove the policy STACK_OF stuff to pcy_int.h as well
tb [Tue, 25 Apr 2023 18:53:42 +0000 (18:53 +0000)]
Move the policy STACK_OF stuff to pcy_int.h as well

18 months agosync
tb [Tue, 25 Apr 2023 18:49:23 +0000 (18:49 +0000)]
sync

18 months agoRemove SXNET
tb [Tue, 25 Apr 2023 18:48:32 +0000 (18:48 +0000)]
Remove SXNET

Unused and no authorative information was found online in 2016

18 months agoMove truncated sha-2 and sha3 out of #ifdef wrappers
tb [Tue, 25 Apr 2023 18:39:12 +0000 (18:39 +0000)]
Move truncated sha-2 and sha3 out of #ifdef wrappers

18 months agoUse X509_STORE_CTX_get1_{certs,crls}() instead of an alias
tb [Tue, 25 Apr 2023 18:37:56 +0000 (18:37 +0000)]
Use X509_STORE_CTX_get1_{certs,crls}() instead of an alias

18 months agoX509_STORE_get1_{certs,crls} become X509_STORE_CTX_* also in
tb [Tue, 25 Apr 2023 18:33:50 +0000 (18:33 +0000)]
X509_STORE_get1_{certs,crls} become X509_STORE_CTX_* also in
Symbols.namespace

18 months agoX509_STORE_get1_{certs,crls} become X509_STORE_CTX_*
tb [Tue, 25 Apr 2023 18:32:42 +0000 (18:32 +0000)]
X509_STORE_get1_{certs,crls} become X509_STORE_CTX_*

This matches the OpenSSL 1.1 API a bit better.

18 months agoMove the policy tree code to internal-only
tb [Tue, 25 Apr 2023 18:28:05 +0000 (18:28 +0000)]
Move the policy tree code to internal-only

A few hooks remain in the legacy validator, which will soon be replaced
with something better. The rest of the tentacles are now largely contained.

18 months agoRename ps_refcnt to ps_threadcnt in struct process and implement
claudio [Tue, 25 Apr 2023 18:14:06 +0000 (18:14 +0000)]
Rename ps_refcnt to ps_threadcnt in struct process and implement
P_HASSIBLING() using this count.
OK mvs@ mpi@

18 months agoRemove i2d_PKCS7_NDEF from the hidden version as well
tb [Tue, 25 Apr 2023 18:13:25 +0000 (18:13 +0000)]
Remove i2d_PKCS7_NDEF from the hidden version as well

18 months agoRemove documentation for i2d_PKCS7_NDEF
tb [Tue, 25 Apr 2023 18:05:07 +0000 (18:05 +0000)]
Remove documentation for i2d_PKCS7_NDEF

18 months agoRemove i2d_PKCS7_NDEF
tb [Tue, 25 Apr 2023 18:04:03 +0000 (18:04 +0000)]
Remove i2d_PKCS7_NDEF

18 months agoBN_RECP_CTX moves to internal
tb [Tue, 25 Apr 2023 17:59:41 +0000 (17:59 +0000)]
BN_RECP_CTX moves to internal

18 months agoPut ERRORS and DIAGNOSTICS information in the sections where they belong.
schwarze [Tue, 25 Apr 2023 17:57:55 +0000 (17:57 +0000)]
Put ERRORS and DIAGNOSTICS information in the sections where they belong.
More details on RETURN VALUES and ERRORS.
Document all DIAGNOSTICS messages except the various malloc(3)-related
ones and except those that cannot actually occur but would merely report
violations of internal invariants.  Shorten some wordings in this section.

Using feedback from jmc@ and Ted Bullock.
OK jmc@ and nicm@ on an earlier version.

18 months agoRemove CTS mode
tb [Tue, 25 Apr 2023 17:54:10 +0000 (17:54 +0000)]
Remove CTS mode

ok jsing

18 months agoRemove TS_VERIFY_CTX_init()
tb [Tue, 25 Apr 2023 17:52:54 +0000 (17:52 +0000)]
Remove TS_VERIFY_CTX_init()

18 months agoRemove PEM wrappers for NETSCAPE_CERT_SEQUENCE
tb [Tue, 25 Apr 2023 17:51:36 +0000 (17:51 +0000)]
Remove PEM wrappers for NETSCAPE_CERT_SEQUENCE

18 months agoRemove the horror show that is bn_nist and ecp_nist
tb [Tue, 25 Apr 2023 17:42:07 +0000 (17:42 +0000)]
Remove the horror show that is bn_nist and ecp_nist

This code is full of problematic C and is also otherwise of questionable
quality. It is far from constant time and jsing informs me it also isn't
faster. Good riddance.

18 months agoRemove BN_init() documentation
tb [Tue, 25 Apr 2023 17:23:08 +0000 (17:23 +0000)]
Remove BN_init() documentation

18 months agoRemove BN_CTX_init() documentation
tb [Tue, 25 Apr 2023 17:21:51 +0000 (17:21 +0000)]
Remove BN_CTX_init() documentation

18 months agoRemove the no longer used BN_MONT_CTX_init()
tb [Tue, 25 Apr 2023 17:20:24 +0000 (17:20 +0000)]
Remove the no longer used BN_MONT_CTX_init()

18 months agoRemove a couple of temporary hacks
tb [Tue, 25 Apr 2023 17:17:21 +0000 (17:17 +0000)]
Remove a couple of temporary hacks

18 months agoMove a few now internal prototypes to bn_local.h
tb [Tue, 25 Apr 2023 17:13:06 +0000 (17:13 +0000)]
Move a few now internal prototypes to bn_local.h

18 months agoRemove old BN_one/BN_zero compat stuff
tb [Tue, 25 Apr 2023 17:01:21 +0000 (17:01 +0000)]
Remove old BN_one/BN_zero compat stuff

ok jsing

18 months agozlib: sync with src
tb [Tue, 25 Apr 2023 16:59:57 +0000 (16:59 +0000)]
zlib: sync with src

18 months agoUpdate libz to the HEAD of the develop branch
tb [Tue, 25 Apr 2023 16:59:10 +0000 (16:59 +0000)]
Update libz to the HEAD of the develop branch

This mostly moves from K&R prototypes to ANSI prototypes and includes a
handful of bug fixes that are nice to have. The corresponding sys commit
will allow us to undo some hacks that jca applied to make the kernel build
with clang 15.

discussed with deraadt

18 months agoRemove X9.31 support
tb [Tue, 25 Apr 2023 16:50:33 +0000 (16:50 +0000)]
Remove X9.31 support

ok jsing

18 months agoRemove the no longer used BN_CTX_init()
tb [Tue, 25 Apr 2023 16:41:29 +0000 (16:41 +0000)]
Remove the no longer used BN_CTX_init()

ok jsing

18 months agoExclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
bluhm [Tue, 25 Apr 2023 16:24:25 +0000 (16:24 +0000)]
Exclusive net lock or mutex arp_mtx protect the llinfo_arp fields.
So kernel lock is only needed for changing the route rt_flags.  In
arpresolve() protect rt_llinfo lookup and llinfo_arp modification
with arp_mtx.  Grab kernel lock for rt_flags reject modification
only when needed.
Tested by Hrvoje Popovski; OK patrick@ kn@

18 months agoBump LibreSSL version to 3.8.0
tb [Tue, 25 Apr 2023 16:15:37 +0000 (16:15 +0000)]
Bump LibreSSL version to 3.8.0

18 months agoRemove the nseq command
tb [Tue, 25 Apr 2023 16:11:02 +0000 (16:11 +0000)]
Remove the nseq command

18 months agoDocument most command constants.
schwarze [Tue, 25 Apr 2023 15:59:45 +0000 (15:59 +0000)]
Document most command constants.
They are part of the public API, may be needed for implementing custom BIO
types, and application programmers need to avoid clashing with them.

18 months agoUpdate Wycheproof.go to exercise truncated SHA-2 and SHA-3
tb [Tue, 25 Apr 2023 15:56:56 +0000 (15:56 +0000)]
Update Wycheproof.go to exercise truncated SHA-2 and SHA-3

18 months agosync
tb [Tue, 25 Apr 2023 15:55:26 +0000 (15:55 +0000)]
sync

18 months agoBump majors after symbol addition and removal
tb [Tue, 25 Apr 2023 15:54:19 +0000 (15:54 +0000)]
Bump majors after symbol addition and removal

18 months agoUpdate Symbols.list after symbol addition and removal
tb [Tue, 25 Apr 2023 15:52:41 +0000 (15:52 +0000)]
Update Symbols.list after symbol addition and removal

18 months agoComment out a few now unused files from Makefile
tb [Tue, 25 Apr 2023 15:51:31 +0000 (15:51 +0000)]
Comment out a few now unused files from Makefile

18 months agoUse proper fix for the recent x400Address issue
tb [Tue, 25 Apr 2023 15:51:04 +0000 (15:51 +0000)]
Use proper fix for the recent x400Address issue

From David Benjamin (BoringSSL)

ok beck

18 months agoTemporarily define LIBRESSL_NEXT_API in opensslfeatures.h
tb [Tue, 25 Apr 2023 15:50:09 +0000 (15:50 +0000)]
Temporarily define LIBRESSL_NEXT_API in opensslfeatures.h