tb [Wed, 10 Jul 2024 06:53:27 +0000 (06:53 +0000)]
Unwrap two lines
jmc [Wed, 10 Jul 2024 05:41:34 +0000 (05:41 +0000)]
remove stray ".Xc";
jmc [Wed, 10 Jul 2024 05:40:08 +0000 (05:40 +0000)]
grammar tweak;
jmc [Wed, 10 Jul 2024 05:39:25 +0000 (05:39 +0000)]
grammar/macro/spelling fixes;
jmc [Wed, 10 Jul 2024 05:19:02 +0000 (05:19 +0000)]
an universal -> a universal
bluhm [Tue, 9 Jul 2024 19:11:06 +0000 (19:11 +0000)]
Prepare pmap for using the AMD SEV C-bit to encrypt guest memory.
The C-bit in a page table entry is used by a SEV guest to specify,
which pages are to be encrypted and which not. The latter is needed
to share pages with the hypervisor for virtio(4).
The actual position of the C-bit within a PTE is CPU implementation
dependend and needs to be determined dynamically at system boot.
The position of the C-bit also determines the actual size of page
frame mask. This will be provided by a separate change.
To be able to use the same kernel as both host and guest, the C-bit
is provided as variable similar to the NX-bit. Same holds for the
page frame masks.
Right now, pg_crypt is set to 0, pg_frame an pg_lgframe to PG_FRAME
and PG_LGFRAME respectively. Thus the kernel works as a host system
same as before.
Also introduce a PMAP_NOCRYPT flag. A guest will use this with
busdma to establish unencrypted mappings that can be shared with
the hypervisor.
from hshoexer@; OK mlarkin@
jan [Tue, 9 Jul 2024 18:56:54 +0000 (18:56 +0000)]
mbuf.9: Add missing fields, fix order and spacing.
fine by jmc@
sure mvs@
jan [Tue, 9 Jul 2024 18:49:05 +0000 (18:49 +0000)]
vmd(8): Avoid double DHCP reply when using the internal dhcp server.
DHCP request should no leave vmd if its answered internally.
ok dv@
tb [Tue, 9 Jul 2024 17:58:36 +0000 (17:58 +0000)]
Add another empty line
tb [Tue, 9 Jul 2024 17:56:41 +0000 (17:56 +0000)]
Turn tls1_prf_alg() into single exit
requested by jsing on review
ok beck
tb [Tue, 9 Jul 2024 17:47:20 +0000 (17:47 +0000)]
Unwrap a few more lines
tb [Tue, 9 Jul 2024 17:46:32 +0000 (17:46 +0000)]
Unwrap a couple of lines
tb [Tue, 9 Jul 2024 17:44:18 +0000 (17:44 +0000)]
Align math with t1_enc.c
suggested by jsing on review
tb [Tue, 9 Jul 2024 17:35:55 +0000 (17:35 +0000)]
Minor cosmetics in pkey_tls1_prf_derive()
noticed by jsing on review
yasuoka [Tue, 9 Jul 2024 17:34:10 +0000 (17:34 +0000)]
Fix a typo
tb [Tue, 9 Jul 2024 17:29:51 +0000 (17:29 +0000)]
Replace explicit_bzero() plus free() with freezero()
This is simpler, if slightly more expensive
yasuoka [Tue, 9 Jul 2024 17:26:14 +0000 (17:26 +0000)]
Add radiusd_ipcp(8). A module which provides IP configuration through
RADIUS Access-Accept messages and manages IP address pool through
RADIUS accounting messages.
tb [Tue, 9 Jul 2024 17:24:12 +0000 (17:24 +0000)]
Improve test coverage for TLS1-PRF
This is basically a copy of the libssl unit tests, moved to libcrypto to
avoid starting the infection of libssl with this particular piece of EVP
garbage.
tb [Tue, 9 Jul 2024 17:09:23 +0000 (17:09 +0000)]
Add a minimal regress test for TLS1-PRF
tb [Tue, 9 Jul 2024 17:05:46 +0000 (17:05 +0000)]
Shuffle things into a more sensible order
no functional change
tb [Tue, 9 Jul 2024 17:04:50 +0000 (17:04 +0000)]
Use better order in EVP_PKEY_CTRL_TLS_SECRET
Also avoid an unnecessary NULL check.
tb [Tue, 9 Jul 2024 17:02:29 +0000 (17:02 +0000)]
Add tls1_prf_pkey_meth to pkey_methods
ok jsing
tb [Tue, 9 Jul 2024 17:01:40 +0000 (17:01 +0000)]
Make a NULL check explicit
tb [Tue, 9 Jul 2024 17:00:59 +0000 (17:00 +0000)]
Zap or align some ugly comments
tb [Tue, 9 Jul 2024 17:00:25 +0000 (17:00 +0000)]
Test & assign once more
tb [Tue, 9 Jul 2024 16:59:50 +0000 (16:59 +0000)]
sec_len -> secret_len
tb [Tue, 9 Jul 2024 16:59:07 +0000 (16:59 +0000)]
Test and assign in tls1_prf_P_hash()
tb [Tue, 9 Jul 2024 16:58:13 +0000 (16:58 +0000)]
Fix whitespace around '/'
tb [Tue, 9 Jul 2024 16:57:27 +0000 (16:57 +0000)]
Invert logic in tls1_prf_alg()
tb [Tue, 9 Jul 2024 16:54:13 +0000 (16:54 +0000)]
olen -> out_len
tb [Tue, 9 Jul 2024 16:53:33 +0000 (16:53 +0000)]
Add a few empty lines
tb [Tue, 9 Jul 2024 16:52:34 +0000 (16:52 +0000)]
seedlen -> seed_len
tb [Tue, 9 Jul 2024 16:51:50 +0000 (16:51 +0000)]
seclen -> secret_len
tb [Tue, 9 Jul 2024 16:51:01 +0000 (16:51 +0000)]
slen -> secret_len
tb [Tue, 9 Jul 2024 16:50:07 +0000 (16:50 +0000)]
sec -> secret
tb [Tue, 9 Jul 2024 16:48:39 +0000 (16:48 +0000)]
Replace local typedef with spelling out the struct name
tb [Tue, 9 Jul 2024 16:47:36 +0000 (16:47 +0000)]
Remove a few useless comments
tb [Tue, 9 Jul 2024 16:46:33 +0000 (16:46 +0000)]
Apply a knfmt(8) sledgehammer
tb [Tue, 9 Jul 2024 16:45:33 +0000 (16:45 +0000)]
Add an RCS tag
tb [Tue, 9 Jul 2024 16:44:42 +0000 (16:44 +0000)]
Replace license stub with full license
This reverts to the license added in OpenSSL's initial import of this
file in commit
1eff3485b63f84956b5f212aa4d853783bf6c8b5
tb [Tue, 9 Jul 2024 16:41:44 +0000 (16:41 +0000)]
link tls1_prf.c to build
ok jsing
tb [Tue, 9 Jul 2024 16:38:40 +0000 (16:38 +0000)]
Replace a malloc() call with calloc()
tb [Tue, 9 Jul 2024 16:37:43 +0000 (16:37 +0000)]
Replace an ossl_assert() with an error check
tb [Tue, 9 Jul 2024 16:36:46 +0000 (16:36 +0000)]
Use C99 initializers for tls1_prf_pkey_meth()
tb [Tue, 9 Jul 2024 16:33:10 +0000 (16:33 +0000)]
Inline an instance of OPENSSL_memdup()
tb [Tue, 9 Jul 2024 16:31:40 +0000 (16:31 +0000)]
Tidy up includes
tb [Tue, 9 Jul 2024 16:30:54 +0000 (16:30 +0000)]
OPENSSL_free() -> free()
tb [Tue, 9 Jul 2024 16:30:28 +0000 (16:30 +0000)]
OPENSSL_cleanse() -> explicit_bzero()
tb [Tue, 9 Jul 2024 16:29:27 +0000 (16:29 +0000)]
OPENSSL_clear_free() -> freezero()
tb [Tue, 9 Jul 2024 16:28:31 +0000 (16:28 +0000)]
OPENSSL_malloc() -> malloc()
tb [Tue, 9 Jul 2024 16:27:48 +0000 (16:27 +0000)]
Spell OPENSSL_zalloc() correctly as calloc()
tb [Tue, 9 Jul 2024 16:26:59 +0000 (16:26 +0000)]
Mechanically replace KDFerr() with KDFerror()
florian [Tue, 9 Jul 2024 16:24:57 +0000 (16:24 +0000)]
Track configured and new prefix delegations in iface.
When the DHCPv6 server renumbers and hands us new delegations we have
to deconfigure the old prefixes. To prevent situations where we have
no IPv6 at all, first configure the new prefixes and then remove the
old prefixes.
tb [Tue, 9 Jul 2024 16:24:47 +0000 (16:24 +0000)]
Add a verbatim copy of tls1_prf.c from OpenSSL 1.1.1
From the last public commit
b372b1f76450acdfed1e2301a39810146e28b02c
of the OpenSSL_1_1_1-stable branch
SHA256 (kdf/tls1_prf.c) = a519d3ff721d4ec59befac8586e24624fa87d9d8f6479327f7af58d652b6e4e5
Will be beat (a little bit) into shape in tree before linking it to the
build.
ok jsing
tb [Tue, 9 Jul 2024 16:20:17 +0000 (16:20 +0000)]
Add various defines for TLS1-PRF
ok jsing
florian [Tue, 9 Jul 2024 16:15:42 +0000 (16:15 +0000)]
Skip prefixes with vltime 0.
Servers indicate unusable prefixes with vltime 0 when we are in
state reboot and probably hand us new, valid prefixes.
In IPv4 dhcp we would receive a NACK instead...
tb [Tue, 9 Jul 2024 16:15:37 +0000 (16:15 +0000)]
Add EVP_PKEY_TLS1_PRF as alias for NID_tls1_prf
ok jsing
tb [Tue, 9 Jul 2024 16:12:33 +0000 (16:12 +0000)]
Choose fixed NID for TLS1-PRF
tb [Tue, 9 Jul 2024 16:12:08 +0000 (16:12 +0000)]
Add NID for TLS1-PRF
ok jsing
mpi [Tue, 9 Jul 2024 16:08:30 +0000 (16:08 +0000)]
Read the whole buffer, not its size minus one.
From Christian Ludwig cludwig at genua.de.
jmatthew [Tue, 9 Jul 2024 16:04:15 +0000 (16:04 +0000)]
netlock is no longer held for SIOCSIFMEDIA and SIOCGIFMEDIA, so rely on
the kernel lock instead, as done in if_ixl.c r1.84.
from Yuichiro NAITO
mlarkin [Tue, 9 Jul 2024 15:51:11 +0000 (15:51 +0000)]
vmctl(8): set exit code for vmctl stat -r
set exit code to 1 if no running VMs are detected with vmctl stat -r.
ok dv
claudio [Tue, 9 Jul 2024 15:20:15 +0000 (15:20 +0000)]
Remove splassert() for now since IPL_STATCLOCK is MD and not all archs have it.
Noticed by bluhm@ on octeon
op [Tue, 9 Jul 2024 14:51:37 +0000 (14:51 +0000)]
document C-u handling on shell-command{,-on-region}, forgot in previous
krw [Tue, 9 Jul 2024 14:47:21 +0000 (14:47 +0000)]
Removing 'softdep' options from fstab entries during upgrade is no longer
necessary as 'softdep' is now a no-op.
ok beck@ sthen@
op [Tue, 9 Jul 2024 14:46:17 +0000 (14:46 +0000)]
mg: handle C-u in M-! and M-|
With the C-u modifier, these commands (respectively shell-command
and shell-command-on-region) will operate in-place instead of opening
a special buffer with the result.
ok and lots of feedback from florian@
(signature for iomux and preadin changed after the ok -- the buffer
pointer was no longer needed)
beck [Tue, 9 Jul 2024 13:43:57 +0000 (13:43 +0000)]
Don't push the error stack in ssl_sigalg_select()
Doing so breaks certificate selection if a TLS 1.3 client does not support
EC certs, and needs to fall back to RSA.
ok tb@
florian [Tue, 9 Jul 2024 13:27:18 +0000 (13:27 +0000)]
remove unnused prototype
bentley [Tue, 9 Jul 2024 13:05:15 +0000 (13:05 +0000)]
Document MODFONT_DOCDIR and MODFONT_DOCFILES.
beck [Tue, 9 Jul 2024 12:27:27 +0000 (12:27 +0000)]
Fix TLS key share check to not fire when using < TLS 1.3
The check was being too aggressive and was catching us when the
extension was being sent by a client which supports tls 1.3 but
the server was capped at TLS 1.2. This moves the check after the
max version check, so we won't error out if we do not support
TLS 1.3
Reported by obsd@bartula.de
ok tb@
deraadt [Tue, 9 Jul 2024 11:21:44 +0000 (11:21 +0000)]
do not need to force bss values to 0
deraadt [Tue, 9 Jul 2024 11:15:58 +0000 (11:15 +0000)]
do a manual ret-clean operation inside the vmm_dispatch_intr asm code
ok mlarkin
tb [Tue, 9 Jul 2024 10:51:14 +0000 (10:51 +0000)]
sync with userland: let z_off_t fall back to long long instead of long
In the boot blocks, this would result in various 64-bit instruction being
used, which might result in undesirable bloat in legacy boot loaders, so
add a workaround for the _STANDALONE case to still fall back to long
instead of long long.
with/ok deraadt, ok millert
tb [Tue, 9 Jul 2024 10:48:31 +0000 (10:48 +0000)]
Let z_off_t fall back to long long instead of only long
This is a noop on OpenBSD in userland
ok deraadt millert
beck [Tue, 9 Jul 2024 09:39:14 +0000 (09:39 +0000)]
Actually enable namespaced builds in both libcrypto and libssl
(instead of commiting only one part)
bluhm [Tue, 9 Jul 2024 09:33:13 +0000 (09:33 +0000)]
IPv6 forward copies small packet content on the stack.
Unfortunately RFC 4443 demands that the ICMP6 error packet containing
the orignal packet is up to 1280 bytes long. That means for every
forwarded packet forward() creates a mbuf copy, just in case delivery
fails.
For small packets we can copy the content on the stack like IPv4
forward does. This saves us some mbuf allocations if the content
is shorter than the mbuf data size.
OK mvs@
dv [Tue, 9 Jul 2024 09:31:37 +0000 (09:31 +0000)]
vmd/vmm: move vm_run_params into mi header.
To prepare for mi/md splitting vmd, need to fixup the dev/vmm/vmm.h
mi header. Move the vm_run_params struct and clean up the includes
in vmd.
"sure", mlarkin@
claudio [Tue, 9 Jul 2024 09:22:50 +0000 (09:22 +0000)]
Reshuffle the switch cases in ptsignal and single_thread_set to be
in the order needed for future changes. No functional change.
OK mpi@
kettenis [Tue, 9 Jul 2024 08:47:10 +0000 (08:47 +0000)]
Implement MSI multiple-vector support.
ok patrick@
claudio [Tue, 9 Jul 2024 08:44:36 +0000 (08:44 +0000)]
In sched_toidle() only call the TRACEPOINT if curproc is set.
sched_toidle() is called by cpu_hatch() to start APs and then curproc
may be NULL.
OK mpi@
tb [Tue, 9 Jul 2024 07:57:57 +0000 (07:57 +0000)]
Add bounded attributes to hmac.h
ok beck
deraadt [Tue, 9 Jul 2024 07:51:09 +0000 (07:51 +0000)]
KNF a pile of else if blocks; ok tb
beck [Tue, 9 Jul 2024 07:39:21 +0000 (07:39 +0000)]
Enable namespaced builds by default for libssl and libcrypto.
Some further refinements will happen to the build process to
automatically generate the Symbols.namespace file, and to remove
our last public unhidden symbol (which was a mistake, but waits for
a major bump to get removed)
But for now everything should be using this.
ok tb@
mlarkin [Tue, 9 Jul 2024 07:28:12 +0000 (07:28 +0000)]
Remove trailing whitespace. No code change.
beck [Tue, 9 Jul 2024 07:17:13 +0000 (07:17 +0000)]
Hide remaining unused ERR functions in err.h
ok tb@
beck [Tue, 9 Jul 2024 07:16:44 +0000 (07:16 +0000)]
Hide CRYPTO_get_dynlock_create_callback
ok tb@
beck [Tue, 9 Jul 2024 07:16:13 +0000 (07:16 +0000)]
Hide DES global variables
ok tb@
beck [Tue, 9 Jul 2024 07:15:39 +0000 (07:15 +0000)]
Add missing symbols to Symbols.namespace
ok tb@
beck [Tue, 9 Jul 2024 07:14:26 +0000 (07:14 +0000)]
Remove duplicates from Symbols.namespace
ok tb@
beck [Tue, 9 Jul 2024 06:14:59 +0000 (06:14 +0000)]
Hide symbols for two missed public functions in bio.h
ok tb@
beck [Tue, 9 Jul 2024 06:13:22 +0000 (06:13 +0000)]
Hide global _it symbols in pkcs12.h
ok tb@
beck [Tue, 9 Jul 2024 06:12:45 +0000 (06:12 +0000)]
Hide global _it symbola in cms.h
ok tb@
jmc [Tue, 9 Jul 2024 05:19:41 +0000 (05:19 +0000)]
point mount -> mount point;
from netbsd -r1.46/pgoyette
jsg [Tue, 9 Jul 2024 04:42:48 +0000 (04:42 +0000)]
change format strings to fix SEM_DEBUG build
jsg [Tue, 9 Jul 2024 03:21:47 +0000 (03:21 +0000)]
spelling
jsg [Tue, 9 Jul 2024 01:21:19 +0000 (01:21 +0000)]
fix disasm of fucompp
when merging changes from FreeBSD in i386 rev 1.10
db_Esca5 was added but not used
ok mlarkin@
dv [Mon, 8 Jul 2024 17:33:45 +0000 (17:33 +0000)]
Quiet vmd in debug logging mode. We don't need to hear about handled
page faults.
sure, @mlarkin.
beck [Mon, 8 Jul 2024 17:11:05 +0000 (17:11 +0000)]
Hide global _it symbols in dsa.h
ok tb@
beck [Mon, 8 Jul 2024 17:10:18 +0000 (17:10 +0000)]
Hide global _it symbols in rsa.h
ok tb@
beck [Mon, 8 Jul 2024 17:01:54 +0000 (17:01 +0000)]
Guard variable declarations to unbreak non-namespaced builds.
ok tb@