kn [Sat, 12 Nov 2022 02:50:59 +0000 (02:50 +0000)]
Zap comment about dead linkmtu
Removed in 2015
a923c8476c6771493ee2bc4f277a429c9ae3eaff
Remove linkmtu and maxmtu from struct nd_ifinfo.
kn [Sat, 12 Nov 2022 02:49:34 +0000 (02:49 +0000)]
Zap dead ip6_auto_linklocal
Removed in 2015
15f0a5b39a2bb226b44457ed81a5d989cfee0393
Ensure that link-local addresses are correctly configured on loopback
interfaces.
kn [Sat, 12 Nov 2022 02:48:14 +0000 (02:48 +0000)]
Put pf_state_import() under NPFSYNC>0 to fix build without pfsync
mpi [Fri, 11 Nov 2022 22:43:09 +0000 (22:43 +0000)]
Add support for storing builtins arguments into local variables.
mpi [Fri, 11 Nov 2022 22:40:41 +0000 (22:40 +0000)]
Add support for multiple statements in if () blocks.
jmc [Fri, 11 Nov 2022 21:41:45 +0000 (21:41 +0000)]
fix ounctuation and SEE ALSO;
beck [Fri, 11 Nov 2022 19:18:55 +0000 (19:18 +0000)]
Hide symbols in libcrypto/stack
Automated change from the first attempts at the semi automated
Guentherizer 2000.
ok jsing@ tb@ joshua@
krw [Fri, 11 Nov 2022 18:53:29 +0000 (18:53 +0000)]
Revert last until we can guarantee gh_guid can't escape to the
d_uid written to disk.
joshua [Fri, 11 Nov 2022 18:24:32 +0000 (18:24 +0000)]
Clean up openssl(1) command execution.
This cleans up the code that handles command execution for openssl(1),
displays the help message when 'openssl help' is executed, and exits
with code 1 when an invalid command is executed, matching the behaviour
of OpenSSL version 1.1+ and above.
ok tb@
cheloha [Fri, 11 Nov 2022 18:09:58 +0000 (18:09 +0000)]
timeout(9): remove timeout_set_kclock(), TIMEOUT_INITIALIZER_KCLOCK()
We have too many timeout(9) initialization functions and macros.
Let's slim it down and combine some interfaces.
- Remove timeout_set_kclock(), TIMEOUT_INITIALIZER_KCLOCK().
- Expand timeout_set_flags(), TIMEOUT_INITIALIZER_FLAGS() to accept
an additional "kclock" parameter.
- Reimplement timeout_set(), timeout_set_proc() with timeout_set_flags().
- Reimplement TIMEOUT_INITIALIZER() with TIMEOUT_INITIALIZER_FLAGS().
- Update the sole timeout_set_flags() user to pass a kclock parameter.
- Update the sole timeout_set_kclock() user to call timeout_set_flags().
- Update the sole TIMEOUT_INITIALIZER_FLAGS() user to provide a kclock
parameter.
The timeout(9) code is now a bit out of sync with the manpage. This
will be corrected in a subsequent commit.
ok kn@
mbuhl [Fri, 11 Nov 2022 17:58:14 +0000 (17:58 +0000)]
Make sure csa->csa_bundled is NULL after freeing to prevent a
possible use after free.
ok tobhe@
matthieu [Fri, 11 Nov 2022 17:23:09 +0000 (17:23 +0000)]
Debug was accidentally left enabled in previous commit.
jsing [Fri, 11 Nov 2022 17:15:26 +0000 (17:15 +0000)]
Convert the legacy TLS stack to tls_content.
This converts the legacy TLS stack to tls_content - records are now
opened into a tls_content structure, rather than being written back into
the same buffer that the sealed record was read into.
This will allow for further clean up of the legacy record layer.
ok tb@
dlg [Fri, 11 Nov 2022 17:12:30 +0000 (17:12 +0000)]
me and my text editor are not getting along today
joshua [Fri, 11 Nov 2022 17:07:38 +0000 (17:07 +0000)]
Remove the legacy interactive mode from openssl(1).
This removes the legacy interactive mode from openssl(1) since it is
rarely used, complicates the code, and has also been removed from
OpenSSL in version 3.x.x.
ok tb@ jsing@
mbuhl [Fri, 11 Nov 2022 16:41:44 +0000 (16:41 +0000)]
Due to checksum offloading one more element could be written to the ring
than there is space available.
ok dlg
mbuhl [Fri, 11 Nov 2022 16:17:16 +0000 (16:17 +0000)]
In case of an invalid SA resp is passed to ikev2_msg_cleanup without
initialization where the msg_parent field is accessed.
ok tobhe
dlg [Fri, 11 Nov 2022 16:12:08 +0000 (16:12 +0000)]
try pf.c r1.1143 again: move pf_purge out from under the kernel lock
this also avoids holding NET_LOCK too long.
the main change is done by running the purge tasks in systqmp instead
of systq. the pf state list was recently reworked so iteration over
the state can be done without blocking insertions.
however, scanning a lot of states can still take a lot of time, so
this also makes the state list scanner yield if it has spent too
much time running.
the other purge tasks for source nodes, rules, and fragments have
been moved to their own timeout/task pair to simplify the time
accounting.
in my environment, before this change pf purges often took 10 to
50ms. the softclock thread runs next to it often took a similar
amount of time, presumably because they ended up spinning waiting
for each other. after this change the pf_purges are more like 6 to
12ms, and dont block softclock. most of the variability in the runs
now seems to come from contention on the net lock.
tested by me sthen@ chris@
ok sashan@ kn@ claudio@
the diff was backed out because it made things a bit more racey,
but sashan@ has squashed those races this week. let's try it again.
matthieu [Fri, 11 Nov 2022 16:06:13 +0000 (16:06 +0000)]
sync
matthieu [Fri, 11 Nov 2022 15:27:39 +0000 (15:27 +0000)]
Enable icc(4). ok anton@ patrick@
matthieu [Fri, 11 Nov 2022 15:25:13 +0000 (15:25 +0000)]
Add icc(4) to handle Customer Control keyboards attached to i2c bus.
ok anton@ patrick@
dlg [Fri, 11 Nov 2022 15:02:31 +0000 (15:02 +0000)]
add a mutex to struct pf_state and init it.
nothing is protected by it yet but it will allow us to provide
consistent updates to individual states without relying on a global
lock. getting that right between the packet processing in pf itself,
pfsync, the pf purge code, the ioctl paths, etc is not worth the
required contortions.
while pf_state does grow, it doesn't use more cachelines on machines
where we will want to run in parallel with a lot of states.
stolen from and ok sashan@
anton [Fri, 11 Nov 2022 13:59:40 +0000 (13:59 +0000)]
ihidev can pass a buffer larger than the size of the claimed input
report since it unconditionally uses the size of the longest input
report. This is quite harmless and the defensive check in hidcc can
therefore be relaxed and instead only examining the number of expected
bytes.
ok matthieu@ patrick@
anton [Fri, 11 Nov 2022 13:59:02 +0000 (13:59 +0000)]
cvs(1) populates the author keyword using getlogin(2), therefore favor
logname(1) when normalizing the output.
tb [Fri, 11 Nov 2022 13:08:29 +0000 (13:08 +0000)]
Symbols.list: Drop comments and sort.
While grouping the API by its purpose is nice, it doesn't help much if >90%
is "general API".
ok jsing
dlg [Fri, 11 Nov 2022 12:50:45 +0000 (12:50 +0000)]
kn points out that brackets are not parentheses
dlg [Fri, 11 Nov 2022 12:36:05 +0000 (12:36 +0000)]
fix a misuse of vi.
dlg [Fri, 11 Nov 2022 12:29:32 +0000 (12:29 +0000)]
kn@ points out that lock annotations are usually wrapped in ()
jsing [Fri, 11 Nov 2022 12:23:49 +0000 (12:23 +0000)]
Use named initialisers.
Requested by tb@
jsing [Fri, 11 Nov 2022 12:22:21 +0000 (12:22 +0000)]
Merge bf_pi.h into bf_skey.c.
There's not much point having a static table in a header file that is only
included in one source file.
Discussed with tb@
jsing [Fri, 11 Nov 2022 12:18:25 +0000 (12:18 +0000)]
Tidy includes, fix comment style and mop up some blank lines.
krw [Fri, 11 Nov 2022 12:14:01 +0000 (12:14 +0000)]
Use the first 8 bytes of GPT gh_guid as the default d_uid. gh_guid is
initialized with arc4random().
jsing [Fri, 11 Nov 2022 12:08:29 +0000 (12:08 +0000)]
Whack blowfish with a style(9) bat.
dlg [Fri, 11 Nov 2022 12:06:17 +0000 (12:06 +0000)]
steal a change by sashan@ to say which bits of pf_state need which locks.
not all members are annotated yet, but that's because there's no clear
protection for them yet.
ok sashan@
krw [Fri, 11 Nov 2022 12:05:32 +0000 (12:05 +0000)]
Nuke trailing space in a comment.
beck [Fri, 11 Nov 2022 12:02:34 +0000 (12:02 +0000)]
Start CBS-ifying the name constraints code.
ok jsing@ tb@
jsing [Fri, 11 Nov 2022 11:53:24 +0000 (11:53 +0000)]
Stop pretending that obj_mac.h is optional.
This is effectively:
unifdef -m -DUSE_OBJ_MAC objects/objects.h
ok beck@, with extreme prejudice.
dlg [Fri, 11 Nov 2022 11:47:12 +0000 (11:47 +0000)]
rename pfsync_up() to pfsync_is_up()
foo_up() where foo is a network driver is usually a function that
configures and brings an interface up into a running state. this
small tweak just makes the code a bit easier for me to read.
kettenis [Fri, 11 Nov 2022 11:45:10 +0000 (11:45 +0000)]
Unmap and free memory when we shutdown rtkit. This fixes an issue where
we run out of SART entries after a few suspend/resume cycles.
ok patrick@
daniel [Fri, 11 Nov 2022 11:27:05 +0000 (11:27 +0000)]
resync with ISO web site; ok kmos@
beck [Fri, 11 Nov 2022 11:25:18 +0000 (11:25 +0000)]
Add support for symbol hiding disabled by default.
Fully explained in libcrypto/README. TL;DR make sure libcrypto
and libssl's function calls internally and to each other are via
symbol names that won't get overridden by linking other libraries.
Mostly work by guenther@, which will currently be gated behind a
build setting NAMESPACE=yes. once we convert all the symbols to
this method we will do a major bump and pick up the changes.
ok tb@ jsing@
sashan [Fri, 11 Nov 2022 11:22:48 +0000 (11:22 +0000)]
Turn KASSERT() into if() to prevent state being inserted to
pfsync snapshot multiple times.
OK dlg@
dlg [Fri, 11 Nov 2022 11:02:35 +0000 (11:02 +0000)]
rewrite the pf_state_peer_ntoh and pf_state_peer_hton macros as functions.
i can read this code as functions, but it takes too much effort as macros.
dlg [Fri, 11 Nov 2022 10:55:48 +0000 (10:55 +0000)]
move struct pf_state from pfvar.h to pfvar_priv.h.
we (sashan) are going to add a mutex to the pf_state struct, but a
mutex is a kernel data structure that changes shape depending on
things like whether MULTIPROCESSOR is enabled, and should therefore
not be visible to userland. when we added a mutex to pf_state,
compiling pfctl failed because it doesn't know what a mutex is and
it can't know which version of it the current kernel is running
with.
moving struct pf_state to pfvar_priv.h makes it clear it is a private
kernel only data structure, and avoids this leak into userland.
tested by me and make build
ok sashan@
dv [Fri, 11 Nov 2022 10:52:44 +0000 (10:52 +0000)]
Revert removal of toggling interrupt line in vmd vcpu run loop.
phessler reports a performance regression. Needs more testing.
dlg [Fri, 11 Nov 2022 10:51:46 +0000 (10:51 +0000)]
prepare for moving struct pf_state from pfvar.h to pfvar_priv.h
pflow obviously looks at the kernel pf state structure to do it's
thing, so it will need the header that provides it. i'm committing
this chunk separately to the actual pf_state move to keep the commits
small and simple.
ok sashan@
mpi [Fri, 11 Nov 2022 10:51:39 +0000 (10:51 +0000)]
typo
nicm [Fri, 11 Nov 2022 08:44:11 +0000 (08:44 +0000)]
Tweak previous to set and log the feature instead of just setting the
flag.
nicm [Fri, 11 Nov 2022 08:37:55 +0000 (08:37 +0000)]
Parse primary device attributes as well as secondary and add a SIXEL
flag (not used yet), from Anindya Mukherjee.
deraadt [Fri, 11 Nov 2022 08:35:11 +0000 (08:35 +0000)]
sync
nicm [Fri, 11 Nov 2022 08:27:17 +0000 (08:27 +0000)]
Document alternative delimiters for substitution, from Jim Wisniewski.
jsg [Fri, 11 Nov 2022 07:59:19 +0000 (07:59 +0000)]
regen
jsg [Fri, 11 Nov 2022 07:58:42 +0000 (07:58 +0000)]
add AMD family 19h model 44h (Rembrandt) ids
from a ThinkPad T14 Gen 3 AMD dmesg provided by Philippe Meunier
anton [Fri, 11 Nov 2022 06:48:38 +0000 (06:48 +0000)]
Make ucc(4) the first consumer of hidcc. No intended functional change.
ok matthieu@
anton [Fri, 11 Nov 2022 06:47:18 +0000 (06:47 +0000)]
sync
anton [Fri, 11 Nov 2022 06:46:48 +0000 (06:46 +0000)]
Extract the HID specific pieces from ucc(4) into hidcc. First steps
toward attaching hidcc over i2c.
ok matthieu@
jsg [Fri, 11 Nov 2022 02:21:09 +0000 (02:21 +0000)]
return early from drm activate functions after fatal error
avoids a page fault trap trying to take an uninitialised
modeset lock on suspend
reported and tested by Ali Farzanrad on HP ProBook 4530s
radeondrm0 at pci1 dev 0 function 0 "ATI Radeon HD 6400M" rev 0x00
drm1 at radeondrm0
radeondrm0: msi
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 3000" rev 0x09
drm0 at inteldrm0
inteldrm0: msi, SANDYBRIDGE, gen 6
..
radeondrm0: CAICOS
[drm] *ERROR* Unable to locate a BIOS ROM
drm:pid0:radeondrm_attachhook *ERROR* Fatal error during GPU init
inteldrm0: 1366x768, 32bpp
tb [Fri, 11 Nov 2022 01:44:26 +0000 (01:44 +0000)]
zap stray space (CRITICAL!)
jsg [Thu, 10 Nov 2022 23:57:31 +0000 (23:57 +0000)]
divison -> division
jsg [Thu, 10 Nov 2022 23:42:15 +0000 (23:42 +0000)]
pscivar.h include no longer needed
ok kettenis@
dv [Thu, 10 Nov 2022 23:39:51 +0000 (23:39 +0000)]
vmd(8): remove toggling interrupt line on vcpu in vcpu run loop
We toggle the interrupt "line" on the vcpu when we assert or deassert
irq on the pic in either the vcpu thread (emulating some devices)
or on the device event thread (mostly handling reading available
data). Having it in the vcpu run loop here just results in another
ioctl(2) call before the one for re-entering the guest cpu.
Removing it shows no noticeable behavioral change in existing guests.
ok mlarkin@
kettenis [Thu, 10 Nov 2022 23:21:15 +0000 (23:21 +0000)]
Sprinkle some #ifdef SUSPEND to unbreak the tree.
dtucker [Thu, 10 Nov 2022 23:03:10 +0000 (23:03 +0000)]
Handle dynamic remote port forwarding in escape commandline's -R processing.
bz#3499, ok djm@
jmc [Thu, 10 Nov 2022 22:58:39 +0000 (22:58 +0000)]
- sort options; from josiah frentsos
ok nicm
- add -N to SYNOPSIS
- sort usage()
jmc [Thu, 10 Nov 2022 19:10:50 +0000 (19:10 +0000)]
fix SEE ALSO and new sentence, new line;
similar patch floated by josian frentsos on tech
jmc [Thu, 10 Nov 2022 19:07:21 +0000 (19:07 +0000)]
tweak the "once" text; ok sashan
mbuhl [Thu, 10 Nov 2022 18:58:02 +0000 (18:58 +0000)]
Initialize data before passing it to get_input_data. Strictly
speaking this is not necessary as all used bits of the uint32_t are
zeroed.
ok mlarkin
tb [Thu, 10 Nov 2022 18:15:36 +0000 (18:15 +0000)]
Bump LibreSSL version to 3.7
jsing [Thu, 10 Nov 2022 18:06:37 +0000 (18:06 +0000)]
Use tls_buffer for alert and handshake fragments in the legacy stack.
This avoids a bunch of pointer munging and a handrolled memmove.
ok tb@
joshua [Thu, 10 Nov 2022 17:53:45 +0000 (17:53 +0000)]
Finish migrating to one source file per line.
ok jsing@ tb@
schwarze [Thu, 10 Nov 2022 17:44:05 +0000 (17:44 +0000)]
In asn1.h rev. 1.65, beck@ provided ASN1_TIME_set_string_X509(3),
ASN1_TIME_normalize(3), ASN1_TIME_to_tm(3), ASN1_TIME_cmp_time_t(3),
and ASN1_TIME_compare(3).
Merge documentation from the OpenSSL 1.1.1 branch, which is still
under a free license, with tweaks by me in several respects to match
our implementation, and also using some feedback from beck@.
OK beck@.
dlg [Thu, 10 Nov 2022 17:17:47 +0000 (17:17 +0000)]
bring back r1.673: replace SRP with SMR in the if_idxmap.
when i first wrote if_idxmap i didn't realise (and no one thought
to tell me) that index 0 was special and means "no interface", so
while here use the 0th slot in the interface map to store the length
of the map instead of prepending the map with a length field.
if_get() now special cases index 0 and returns NULL directly. this
also means the size of the map is now always a power of 2, which
is a nicer fit with what the kernel malloc aprovides.
the problem with r1.673 that hrvoje popovski found was that attaching
a lot of interfaces during autoconf would lock up when growing the
map called smr_barrier. the fix in this diff is to (ab)use the
usedidx bitmap to store an smr_entry and defer the freeing of the
interface pointer map with it.
tested by hrvoje popovski
tweaks and ok visa@
beck [Thu, 10 Nov 2022 16:52:19 +0000 (16:52 +0000)]
Allow explicit cert trusts or distrusts for EKU any
This matches the current OpenSSL behaviour introduced
in their commit:
commit
0daccd4dc1f1ac62181738a91714f35472e50f3c
Date: Thu Jan 28 03:01:45 2016 -0500
ok jsing@ tb@
jsing [Thu, 10 Nov 2022 16:38:57 +0000 (16:38 +0000)]
Add regress coverage for
Ed25519 and X25519 EVP interfaces.
jsing [Thu, 10 Nov 2022 16:37:51 +0000 (16:37 +0000)]
Implement EVP interfaces for
Ed25519 and X25519.
ok beck@ tb@
schwarze [Thu, 10 Nov 2022 16:34:23 +0000 (16:34 +0000)]
Remove obsolete function, struct, and macro names
that tb@ removed from asn1.h on January 14:
rev. 1.58: ASN1_CTX ASN1_const_CTX
rev. 1.60: ASN1_OBJECT_FLAG_CRITICAL ASN1_OBJECT_FLAG_DYNAMIC
rev. 1.60: ASN1_OBJECT_FLAG_DYNAMIC_DATA ASN1_OBJECT_FLAG_DYNAMIC_STRINGS
rev. 1.61: NETSCAPE_X509 NETSCAPE_X509_free NETSCAPE_X509_new
rev. 1.61: d2i_NETSCAPE_X509 i2d_NETSCAPE_X509
sashan [Thu, 10 Nov 2022 16:29:20 +0000 (16:29 +0000)]
revert pf_state mtx commit, because it breaks tree.
pfctl does not build
OK dlg@
patrick [Thu, 10 Nov 2022 16:20:54 +0000 (16:20 +0000)]
Apparently we receive interrupts for both powerkey press and release, which
isn't quite helpful when it's used to come back from suspend and then the
second interrupt initiates powerdown. Ignore press, but handle release.
ok kettenis@
kettenis [Thu, 10 Nov 2022 16:14:50 +0000 (16:14 +0000)]
Since the introduction of automatic immutable from the kernel, the munmap()
of ld.so boot.text region is now (silently) failing because the region is
contained within the text LOAD, which is immutable. So create a new btext
LOAD with flags PF_X|PF_R|PF_OPENBSD_MUTABLE, and place all boot.text objects
in there. This LOAD must also be page-aligned so it doesn't skip unmapping
some of the object region, previously it was hilariously unaligned.
ok kettenis and guenther seemed to like it also
This one is for powerpc64 and a modified version of the diff deraadt@ mailed
out to make sure the LOADs are in increasing address order.
krw [Thu, 10 Nov 2022 16:12:05 +0000 (16:12 +0000)]
Add mbr_get_fstype() and use it to translate MBR dp_typ fields
into FS_* values. Similar to what gpt_get_fstype() does. Code is
clearer and better positioned for planned enhancements to
spoofing.
No intentional functional change.
jsing [Thu, 10 Nov 2022 16:04:31 +0000 (16:04 +0000)]
Map objects for
ED25519 to
Ed25519.
OpenSSL used
ED25519, even though the RFCs use
Ed25519 - as such, we get to
provide both.
ok tb@
joshua [Thu, 10 Nov 2022 16:00:34 +0000 (16:00 +0000)]
Continue migrating to one source file per line.
ok jsing@ tb@
kn [Thu, 10 Nov 2022 16:00:17 +0000 (16:00 +0000)]
Use local variable for consistency
OK claudio
krw [Thu, 10 Nov 2022 15:26:38 +0000 (15:26 +0000)]
HP-300's hd is now gone. svnd transmorgified into vnd in 2011. No
need to keep checking for these device names.
jsing [Thu, 10 Nov 2022 15:17:30 +0000 (15:17 +0000)]
Provide digestsign/digestverify hooks for EVP_PKEY_METHOD.
These are needed for EVP implementations of
Ed25519 and X25519.
ok beck@ tb@
joshua [Thu, 10 Nov 2022 15:13:52 +0000 (15:13 +0000)]
Continue migrating to one source file per line.
ok jsing@ tb@
kn [Thu, 10 Nov 2022 14:51:01 +0000 (14:51 +0000)]
Downgrade test to C++98 to fix build on GCC archs
Spotted on sparc64, diff from miod, tb and bluhm agree.
jsing [Thu, 10 Nov 2022 14:46:44 +0000 (14:46 +0000)]
Port EVP raw key API from OpenSSL.
This will be needed to deal with Curve25519 based keys.
ok beck@ tb@
sashan [Thu, 10 Nov 2022 14:22:43 +0000 (14:22 +0000)]
Add a mutex to pf_state structure. Mutex retain a consistency
of structure members without using a global state lock.
The first member which uses protection by mutex is key[] array.
more will follow.
OK dlg@
kettenis [Thu, 10 Nov 2022 14:15:15 +0000 (14:15 +0000)]
Add suspend/resume support to control the power domain.
ok patrick@
job [Thu, 10 Nov 2022 13:22:55 +0000 (13:22 +0000)]
Indicate compliance with work-in-progress spec for ROA objects
jsing [Thu, 10 Nov 2022 13:09:34 +0000 (13:09 +0000)]
Port ASN1_buf_print() from OpenSSL 1.1.
This is needed to print byte array based keys, such as
Ed25519 and X25519.
ok beck@ tb@
patrick [Thu, 10 Nov 2022 13:08:57 +0000 (13:08 +0000)]
qcpon(4), qcpwm(4), qcrtc(4)
patrick [Thu, 10 Nov 2022 12:59:26 +0000 (12:59 +0000)]
update for consistency
patrick [Thu, 10 Nov 2022 12:57:08 +0000 (12:57 +0000)]
qcpmic(4), qcpmicgpio(4), qcspmi(4)
joshua [Thu, 10 Nov 2022 12:55:49 +0000 (12:55 +0000)]
Continue migrating to one source file per line.
ok jsing@ tb@
kn [Thu, 10 Nov 2022 12:46:19 +0000 (12:46 +0000)]
typofix; ok dlg
anton [Thu, 10 Nov 2022 12:40:29 +0000 (12:40 +0000)]
cope with recent route output changes
patrick [Thu, 10 Nov 2022 12:40:07 +0000 (12:40 +0000)]
qcpdc(4)
anton [Thu, 10 Nov 2022 12:38:57 +0000 (12:38 +0000)]
Use /tmp as opposed of /var/tmp as the default directory for temporary
files.