openbsd
9 months agoEnable for TLSv1.3 now that shutdown behaviour matches the legacy stack.
jsing [Sat, 27 Jan 2024 14:35:13 +0000 (14:35 +0000)]
Enable for TLSv1.3 now that shutdown behaviour matches the legacy stack.

9 months agoRework tls13_legacy_shutdown() to match the legacy stack behaviour.
jsing [Sat, 27 Jan 2024 14:34:28 +0000 (14:34 +0000)]
Rework tls13_legacy_shutdown() to match the legacy stack behaviour.

Respect the ssl->shutdown flags rather than what has actually happened,
return -1 for all EOF errors and completely ignore the return value when
attempting to read a close-notify from the wire.

ok tb@

9 months agoMake tls13_legacy_return_code() static.
jsing [Sat, 27 Jan 2024 14:31:01 +0000 (14:31 +0000)]
Make tls13_legacy_return_code() static.

9 months agoAdd message callbacks for alerts in the TLSv1.3 stack.
jsing [Sat, 27 Jan 2024 14:23:51 +0000 (14:23 +0000)]
Add message callbacks for alerts in the TLSv1.3 stack.

This will make it easier to regress test shutdown behaviour in the TLSv1.3
stack. Additionally, `openssl -msg` now shows alerts for TLSv1.3
connections.

ok tb@

9 months agoAdd a few drivers to support Allwinner D1.
kettenis [Sat, 27 Jan 2024 12:23:03 +0000 (12:23 +0000)]
Add a few drivers to support Allwinner D1.

9 months agoOn Allwinner D1, the SBI call to schedule timer interrupts doesn't work.
kettenis [Sat, 27 Jan 2024 12:05:40 +0000 (12:05 +0000)]
On Allwinner D1, the SBI call to schedule timer interrupts doesn't work.
Instead we have to use one of the timers integerated on the SoC that
triggers an external interrupt.  Add the appropriate driver and change
the MD clock code to hook it up.

ok cheloha@, jca@

9 months agoAdd support for newer SoCs that store the data as number of days since the
kettenis [Sat, 27 Jan 2024 11:22:16 +0000 (11:22 +0000)]
Add support for newer SoCs that store the data as number of days since the
Unix epoch instead of a calender date.

ok jca@

9 months agoImplement an initial SMIv2 parser based around RFC257[89]. RFC2580 isn't
martijn [Sat, 27 Jan 2024 09:53:59 +0000 (09:53 +0000)]
Implement an initial SMIv2 parser based around RFC257[89]. RFC2580 isn't
supported yet. SMIv1 is not supported. Parsing is done in a strict
manner, but except for the (deprecated) IPV6-TC MIB everything from
IETF/IANA that I found parses.

For now this code will be used OID<->name translations, but other
functionality could be added in the future.

This commit just includes the parser, usage and including the MIB files
will be done in separate commits.

Go ahead from tb@

9 months agoAllocate a fixed NID for the acmeIdentifer OID
tb [Sat, 27 Jan 2024 07:28:28 +0000 (07:28 +0000)]
Allocate a fixed NID for the acmeIdentifer OID

ok job jsing

9 months agoAdd data for the RFC 8737 acmeIdentifier
tb [Sat, 27 Jan 2024 07:27:41 +0000 (07:27 +0000)]
Add data for the RFC 8737 acmeIdentifier

This teaches the object database OID, long and short names for the
ACME identifier X.509v3 extension defined in RFC 8737.

ok job jsing

9 months agosync
deraadt [Sat, 27 Jan 2024 00:12:34 +0000 (00:12 +0000)]
sync

9 months agoPut checksum flags in bpf_hdr to use them in userland dhcpleased.
jan [Fri, 26 Jan 2024 21:14:08 +0000 (21:14 +0000)]
Put checksum flags in bpf_hdr to use them in userland dhcpleased.

Thus, dhcpleased accept non-calculated checksums which were verified by
hardware/hypervisor.

With tweaks from dlg@

ok bluhm@
mkay tobhe@

9 months agoFix panic messages.
kettenis [Fri, 26 Jan 2024 19:23:03 +0000 (19:23 +0000)]
Fix panic messages.

9 months agoRecognize the T-Head PLIC implementation.
kettenis [Fri, 26 Jan 2024 19:20:00 +0000 (19:20 +0000)]
Recognize the T-Head PLIC implementation.

ok jca@

9 months agopartial sync
deraadt [Fri, 26 Jan 2024 18:57:06 +0000 (18:57 +0000)]
partial sync

9 months agoregen
mvs [Fri, 26 Jan 2024 18:24:58 +0000 (18:24 +0000)]
regen

9 months agoUnlock listen(2). `somaxconn_local' and `sominconn_local' used
mvs [Fri, 26 Jan 2024 18:24:23 +0000 (18:24 +0000)]
Unlock listen(2). `somaxconn_local' and `sominconn_local' used
respectively to cache values as we do in other places.

ok bluhm

9 months agoAdd a -V flag to bgplgd
job [Fri, 26 Jan 2024 18:11:49 +0000 (18:11 +0000)]
Add a -V flag to bgplgd

OK claudio@

9 months agoSkip test with 100000 file descriptors also on macppc.
bluhm [Fri, 26 Jan 2024 18:09:24 +0000 (18:09 +0000)]
Skip test with 100000 file descriptors also on macppc.
It panics with malloc: out of space in kmem_map.

9 months agoInitial clock support for Allwinner D1.
kettenis [Fri, 26 Jan 2024 17:50:00 +0000 (17:50 +0000)]
Initial clock support for Allwinner D1.

ok dlg@, mlarkin@

9 months agoAdd support for the Allwinner D1 USB PHY.
kettenis [Fri, 26 Jan 2024 17:11:50 +0000 (17:11 +0000)]
Add support for the Allwinner D1 USB PHY.

ok dlg@, jca@

9 months agoAdd Allwinner D1 support.
kettenis [Fri, 26 Jan 2024 17:03:45 +0000 (17:03 +0000)]
Add Allwinner D1 support.

ok dlg@, jca@

9 months agoImplement T-Head cache management operations which are needed to handle
kettenis [Fri, 26 Jan 2024 16:59:47 +0000 (16:59 +0000)]
Implement T-Head cache management operations which are needed to handle
the incoherent hardware design of SoCs like the Allwinner D1.

ok miod@, jca@

9 months agoremove /mnt/usr/include/c++/v1 before extracting sets, it changed from
sthen [Fri, 26 Jan 2024 16:35:58 +0000 (16:35 +0000)]
remove /mnt/usr/include/c++/v1 before extracting sets, it changed from
a file to a dir with the libc++ update to 16.  ok deraadt phessler

9 months agorepair gratitous difference for install command arguments, relative to all other...
deraadt [Fri, 26 Jan 2024 15:11:18 +0000 (15:11 +0000)]
repair gratitous difference for install command arguments, relative to all other architectures

9 months agoAdd 'openssl x509 -new' functionality to the libcrypto CLI utility
job [Fri, 26 Jan 2024 11:58:36 +0000 (11:58 +0000)]
Add 'openssl x509 -new' functionality to the libcrypto CLI utility

The ability to generate a new certificate is useful for testing and
experimentation with rechaining PKIs.

While there, alias '-key' to '-signkey' for compatibility.

with and OK tb@

9 months agoupdate libcxx, libcxxabi and libunwind to 16.0.6;
robert [Fri, 26 Jan 2024 11:51:45 +0000 (11:51 +0000)]
update libcxx, libcxxabi and libunwind to 16.0.6;

tested by and input from tb@; ok kettenis@

9 months agomerge llvm libcxx 16.0.6
robert [Fri, 26 Jan 2024 11:49:45 +0000 (11:49 +0000)]
merge llvm libcxx 16.0.6

9 months agoimport of libcxx-16.0.6
robert [Fri, 26 Jan 2024 11:47:53 +0000 (11:47 +0000)]
import of libcxx-16.0.6

9 months agomerge llvm libcxxabi 16.0.6
robert [Fri, 26 Jan 2024 11:45:17 +0000 (11:45 +0000)]
merge llvm libcxxabi 16.0.6

9 months agoimport of libcxxabi 16.0.6
robert [Fri, 26 Jan 2024 11:43:33 +0000 (11:43 +0000)]
import of libcxxabi 16.0.6

9 months agomerge llvm libunwind 16.0.6
robert [Fri, 26 Jan 2024 11:41:32 +0000 (11:41 +0000)]
merge llvm libunwind 16.0.6

9 months agoimport of llvm libunwind 16.0.6
robert [Fri, 26 Jan 2024 11:39:01 +0000 (11:39 +0000)]
import of llvm libunwind 16.0.6

9 months agomerge llvm compiler-rt 16.0.6
robert [Fri, 26 Jan 2024 11:36:31 +0000 (11:36 +0000)]
merge llvm compiler-rt 16.0.6

9 months agoremove stub printf from amdgpu_acpi_enumerate_xcc()
jsg [Fri, 26 Jan 2024 11:36:26 +0000 (11:36 +0000)]
remove stub printf from amdgpu_acpi_enumerate_xcc()
the loop that looks for AMD* hid objects remains disabled

9 months agoimport llvm compiler-rt 16.0.6
robert [Fri, 26 Jan 2024 11:27:33 +0000 (11:27 +0000)]
import llvm compiler-rt 16.0.6

9 months agoReturn 0 when accessing an argument not defined in a probe.
mpi [Thu, 25 Jan 2024 20:50:58 +0000 (20:50 +0000)]
Return 0 when accessing an argument not defined in a probe.

Adapted from a fix from Christian Ludwig.

9 months agoMake qwx(4) avoid sub-directories in firmware paths.
stsp [Thu, 25 Jan 2024 17:00:20 +0000 (17:00 +0000)]
Make qwx(4) avoid sub-directories in firmware paths.

9 months agoUpdate awk to the Jan 22, 2024 version.
millert [Thu, 25 Jan 2024 16:40:51 +0000 (16:40 +0000)]
Update awk to the Jan 22, 2024 version.

9 months agoPlug a few leaks and perform some other code hygiene
tb [Thu, 25 Jan 2024 15:33:35 +0000 (15:33 +0000)]
Plug a few leaks and perform some other code hygiene

Closing this directory now until the daily Coverity run throws a hissy fit.

ok jsing

9 months agoThis table no longer needs to be sorted
tb [Thu, 25 Jan 2024 15:09:22 +0000 (15:09 +0000)]
This table no longer needs to be sorted

9 months agop12_npas.c: hoist some helpers from the bottom to the top in reverse order
tb [Thu, 25 Jan 2024 14:15:05 +0000 (14:15 +0000)]
p12_npas.c: hoist some helpers from the bottom to the top in reverse order

9 months agop12_npas.c: maclen -> mac_len
tb [Thu, 25 Jan 2024 14:09:26 +0000 (14:09 +0000)]
p12_npas.c: maclen -> mac_len

9 months agop12_npas.c: Use slightly less awkward variable names
tb [Thu, 25 Jan 2024 14:08:30 +0000 (14:08 +0000)]
p12_npas.c: Use slightly less awkward variable names

9 months agoFix various NULL dereferences in PKCS #12
tb [Thu, 25 Jan 2024 13:44:08 +0000 (13:44 +0000)]
Fix various NULL dereferences in PKCS #12

The PKCS #7 ContentInfo has a mandatory contentType, but the content itself
is OPTIONAL. Various unpacking API assumed presence of the content type is
enough to access members of the content, resulting in crashes.

Reported by Bahaa Naamneh on libressl-security, many thanks

ok jsing

9 months agoMerge PKCS12_newpass() and newpass_p12()
tb [Thu, 25 Jan 2024 13:32:49 +0000 (13:32 +0000)]
Merge PKCS12_newpass() and newpass_p12()

With the previous refactoring, newpass_p12() became simple enough that it
doesn't require a separate function anymore. Merge the public API into it
and move it below (most of) the things it calls.

ok jsing

9 months agoDitch another noop from OPENSSL_cleanup()
tb [Thu, 25 Jan 2024 12:22:31 +0000 (12:22 +0000)]
Ditch another noop from OPENSSL_cleanup()

9 months agoRemove the custom X509v3 extensions stack
tb [Thu, 25 Jan 2024 12:20:17 +0000 (12:20 +0000)]
Remove the custom X509v3 extensions stack

This is essentially unused. The only consumer, www/kore,-acme is in the
process of being fixed. It is also incomplete: in particular, the verifier
doesn't learn about extensions added to the list, making the entire
exercise rather pointless. So let's ditch that crap.

This was the last consumer of the horror that is OBJ_bsearch_().
The even worse OBJ_bsearch_ex_() is still being "used" by M2Crypto...

This prepares the removal of X509V3_EXT_{add{,_list,_alias},cleanup}().
and removes another piece of thread-unsafe global state.

ok jsing

9 months agoUse RFC7606 treat-as-withdraw for ORIGIN attributes with an invalid value.
claudio [Thu, 25 Jan 2024 11:13:35 +0000 (11:13 +0000)]
Use RFC7606 treat-as-withdraw for ORIGIN attributes with an invalid value.

OK tb@

9 months agoRename pkcs12_repack_safe() into pkcs12_repack_authsafes()
tb [Thu, 25 Jan 2024 10:53:05 +0000 (10:53 +0000)]
Rename pkcs12_repack_safe() into pkcs12_repack_authsafes()

discussed with jsing

9 months agoRework newpass_p12() a bit more
tb [Thu, 25 Jan 2024 10:44:39 +0000 (10:44 +0000)]
Rework newpass_p12() a bit more

Split the bottom half that repacks the authsafes into a helper function.
This simplifies the curly exit path and makes it clearer what is being
done. PKCS12_pack_authsafes() is a very inconvenient  API and there are
some extra dances needed due to it.

ok jsing

9 months agoimplement qwx_auth() which moves the device from SCAN into AUTH state
stsp [Thu, 25 Jan 2024 10:11:04 +0000 (10:11 +0000)]
implement qwx_auth() which moves the device from SCAN into AUTH state

Port code from Linux to provide access point info to firmware and to
start up the firmware's virtual interface in station mode.
Sending frames does not work yet so we cannot actually connect anywhere.

9 months agoProcess scan results in qwx(4) now that we are longer crashing the kernel.
stsp [Thu, 25 Jan 2024 10:07:47 +0000 (10:07 +0000)]
Process scan results in qwx(4) now that we are longer crashing the kernel.

9 months agoDisable monitor status ring support in qwx(4).
stsp [Thu, 25 Jan 2024 10:03:20 +0000 (10:03 +0000)]
Disable monitor status ring support in qwx(4).

The ring isn't needed to scan for APs. This ring's ext interrupt fires
continously and we somehow end up with mbuf corruption which looks
like an mcl2k cluster overwrite (this bug is present even before the
changes added in my previous commit). Disable this code path for now
to work around the corruption, allowing work on this driver to proceed.

9 months agoSiwtch IMSG_CTL_SHOW_RIB_COMMUNITIES over to the new ibuf api.
claudio [Thu, 25 Jan 2024 09:54:21 +0000 (09:54 +0000)]
Siwtch IMSG_CTL_SHOW_RIB_COMMUNITIES over to the new ibuf api.

Adjust fmt_ext_community() to take a uint64_t as argument instead of
passing a pointer.
OK tb@

9 months agoPort over some ath11k code to handle the qwx(4) monitor status ring.
stsp [Thu, 25 Jan 2024 09:51:33 +0000 (09:51 +0000)]
Port over some ath11k code to handle the qwx(4) monitor status ring.

These changes are incomplete. More work will be required to get this
ring working if it turns out to be needed. Hopefully it will only be
required for monitor mode.

9 months agoConvert most attributes in rde_attr_parse() to new ibuf API.
claudio [Thu, 25 Jan 2024 09:46:12 +0000 (09:46 +0000)]
Convert most attributes in rde_attr_parse() to new ibuf API.

This skips ATTR_ASPATH and ATTR_AS4_PATH for now, those will follow soon.
Reshuffle checks a little bit. While ibuf_get does ensure that enough data
is available do a precise size check to ensure that only the expected amount
of data is available.

OK tb@

9 months agoUse multi-vector MSI interrupts in qwx(4).
stsp [Thu, 25 Jan 2024 09:44:56 +0000 (09:44 +0000)]
Use multi-vector MSI interrupts in qwx(4).

With only one vector enabled we need to manually check various rings
to see why an interrupt triggered. This makes debugging difficult at
this early stage of development, so use multiple vectors if possible,
as the Linux driver was designed to do.
The intention is to keep single-vector mode working as well but for
now this mode will lack testing by myself.

Thanks to kettenis@ for adding the required MSI/PCI code on amd64.

9 months agonewpass_p12(): factor for loop body into helpers
tb [Thu, 25 Jan 2024 09:40:09 +0000 (09:40 +0000)]
newpass_p12(): factor for loop body into helpers

Since newpass_bags() and sk_PKCS7_push() could be shared between two
otherwise entirely unrelated code paths, it was decided to dedup the
code in about the ugliest possible way. Untangle the spaghetti and
split the code paths into helper functions, so we can easily error
check and avoid a bunch of leaks.

ok jsing

9 months agocall amdgpu_driver_load_kms() instead of doing the equivalent
jsg [Thu, 25 Jan 2024 09:05:54 +0000 (09:05 +0000)]
call amdgpu_driver_load_kms() instead of doing the equivalent

9 months agoFix a memleak and a double free in newpass_p12()
tb [Thu, 25 Jan 2024 08:10:14 +0000 (08:10 +0000)]
Fix a memleak and a double free in newpass_p12()

If the allocation of newsafes fails, asafes is leaked. And if the
ASN1_OCTET_STRING_new() after the freeing of asafes fails, asafes is
freed a second time.

ok jsing

9 months agomove pwr_state init out of ifdef
jsg [Thu, 25 Jan 2024 08:08:10 +0000 (08:08 +0000)]
move pwr_state init out of ifdef

9 months agoclockintr: switch from callee- to caller-allocated clockintr structs
cheloha [Wed, 24 Jan 2024 19:23:38 +0000 (19:23 +0000)]
clockintr: switch from callee- to caller-allocated clockintr structs

Currently, clockintr_establish() calls malloc(9) to allocate a
clockintr struct on behalf of the caller.  mpi@ says this behavior is
incompatible with dt(4).  In particular, calling malloc(9) during the
initialization of a PCB outside of dt_pcb_alloc() is (a) awkward and
(b) may conflict with future changes/optimizations to PCB allocation.

To side-step the problem, this patch changes the clockintr subsystem
to use caller-allocated clockintr structs instead of callee-allocated
structs.

clockintr_establish() is named after softintr_establish(), which uses
malloc(9) internally to create softintr objects.  The clockintr subsystem
is no longer using malloc(9), so the "establish" naming is no longer apt.
To avoid confusion, this patch also renames "clockintr_establish" to
"clockintr_bind".

Requested by mpi@.  Tweaked by mpi@.

Thread: https://marc.info/?l=openbsd-tech&m=170597126103504&w=2

ok claudio@ mlarkin@ mpi@

9 months agoAvoid a four-byte overread in gcm_ghash_4bit_mmx() on i386
tb [Wed, 24 Jan 2024 15:24:28 +0000 (15:24 +0000)]
Avoid a four-byte overread in gcm_ghash_4bit_mmx() on i386

This is a variant of the same logic error fixed in ghash-x86_64.pl r1.6.
The code path is only reachable on machines without FXSR or PCLMUL.

ok jsing

9 months agoAdjust community regress test after the switch to ibuf in bgpd.
claudio [Wed, 24 Jan 2024 14:51:56 +0000 (14:51 +0000)]
Adjust community regress test after the switch to ibuf in bgpd.
OK tb@

9 months agoConvert the community parsers to the new ibuf api.
claudio [Wed, 24 Jan 2024 14:51:11 +0000 (14:51 +0000)]
Convert the community parsers to the new ibuf api.

This converts community_add(), community_large_add() and community_ext_add()
and as a result removes some hacks from rde_attr_add() and rde_attr_parse().
OK tb@

9 months agoAdd more authers that made significant contributions to the Linux driver.
kettenis [Wed, 24 Jan 2024 14:17:37 +0000 (14:17 +0000)]
Add more authers that made significant contributions to the Linux driver.

9 months agoStop fiddling with hash table internals from lhash doall callers.
jsing [Wed, 24 Jan 2024 14:05:10 +0000 (14:05 +0000)]
Stop fiddling with hash table internals from lhash doall callers.

It is now safe to call delete from an lhash doall callback - stop fiddling
wit hash table internals from lhash doall callers that previously has to
workaround this themselves.

ok tb@

9 months agoMake it safe to delete entries from an lhash doall callback.
jsing [Wed, 24 Jan 2024 14:02:52 +0000 (14:02 +0000)]
Make it safe to delete entries from an lhash doall callback.

Currently, the callback cannot safely delete entries as it could lead to
contraction of the hash table, which in turn could lead to doall skipping
entries (and that typically leads to memory leaks). The recommended
workaround is to reach in and fiddle with the hash table internals in
order to prevent contraction, call the doall function and then restore
the internals that were changed.

Rather than just improving our documentation, actually make it safe to
delete entries from an lhash doall callback by pausing contractions prior
to starting the callback loop, then restoring the down load factor and
triggering contraction once completed. This means that callers no longer
need access to change hash table internals in order to achieve this same
behaviour.

ok tb@

9 months agoAvoid a four byte overread in gcm_ghash_4bit() on amd64.
jsing [Wed, 24 Jan 2024 13:39:44 +0000 (13:39 +0000)]
Avoid a four byte overread in gcm_ghash_4bit() on amd64.

The assembly code for gcm_ghash_4bit() reads one too many times from Xi,
resulting in a four byte overread. Prevent this by not loading the next
value in the final iteration of the loop. If another full iteration is
required the next Xi value will be loaded at the top of the outer_loop.

Many thanks to Douglas Gliner <Douglas.Gliner at sony dot com> for finding
and reporting this issue, along with a detailed reproducer.

Same diff from deraadt@

ok tb@

9 months agoRemove atomic_store_64(), misleading and now unused
jca [Wed, 24 Jan 2024 12:25:50 +0000 (12:25 +0000)]
Remove atomic_store_64(), misleading and now unused

The function was actually performing an OR instead of a store.

ok kettenis@

9 months agoUse per connection peerid for control replies
tobhe [Wed, 24 Jan 2024 10:09:07 +0000 (10:09 +0000)]
Use per connection peerid for control replies
instead of 'broadcasting' replies for 'ikectl show sa' and
similar control requests, we now assign a uniq peerid to each
request and pass this peerid between the processes so the reply
can be sent on the matching connection.

from markus@

9 months agoAdd iwm(4) to arm64 GENERIC, as follow up of 1.280
kevlo [Wed, 24 Jan 2024 07:36:52 +0000 (07:36 +0000)]
Add iwm(4) to arm64 GENERIC, as follow up of 1.280

ok mlarkin@

9 months agotag packets going out a sec interface to prevent route/encap loops.
dlg [Wed, 24 Jan 2024 00:17:01 +0000 (00:17 +0000)]
tag packets going out a sec interface to prevent route/encap loops.

sec(4) was already looking for this mbuf tag so it could drop packets
that had already been sent out on the same interface, but i forgot
the code that adds the tag.

this was reported by jason tubnor who experienced spins/lockups
when using sec and a physical interface was disconnected. rather
than being a locking problem like we initially assumed, it turned
out that unplugging a physical interface caused a route for ipsec
encapsulated traffic to go out over sec(4), causing the packet to
loop in the stack.

the fix was also tested and verified by jason. sorry for taking so
long to look at it.

9 months agoThe 1023-byte entry limit is historical, as is the vi(1) limitation.
millert [Tue, 23 Jan 2024 22:28:20 +0000 (22:28 +0000)]
The 1023-byte entry limit is historical, as is the vi(1) limitation.
We ship nvi, not classic vi, so that parst is not relevant.
OK deraadt@ jmc@

9 months agoConsider the whole tuple when reading a map entry whose key is that tuple.
mpi [Tue, 23 Jan 2024 22:04:15 +0000 (22:04 +0000)]
Consider the whole tuple when reading a map entry whose key is that tuple.

Previously only the first element of the tuple was considered.  This led to
the introduction of new map entries.

Reported by Christian Ludwig.

9 months agoT-Head implemented a page attribute extension that violates the RISC-V
kettenis [Tue, 23 Jan 2024 19:51:10 +0000 (19:51 +0000)]
T-Head implemented a page attribute extension that violates the RISC-V
specification.  The default attributes result in memory being uncached
which makes the system perform like a slug.  So implement a workaround
that is designed to make implementation of the Svpbmt extension that is
part of the latest published RISC-V specification.  This gets us a bit
further booting OpenBSD on an Allwinner D1 SoC.

ok mlarkin@, jca@

9 months agoIntroduce pipex_iterator(), the special thing to perform
mvs [Tue, 23 Jan 2024 17:57:21 +0000 (17:57 +0000)]
Introduce pipex_iterator(), the special thing to perform
`pipex_session_list' foreach walkthrough with `pipex_list_mtx' mutex(9)
relocking. It inserts special item after acquired `session' and keeps it
linked until `session' release. Only owner can unlink it's own item, so
the LIST_NEXT(session) is always valid even the `session' was unlinked.
The iterator skips special items at the `session' acquisition time, as
all other foreach loops where `pipex_list_mtx' mutex(9) is not relocked.

ok yasuoka

9 months agoRemove `pipex_rd_head6' and `ps6_rn[2]'. They are not used.
mvs [Tue, 23 Jan 2024 16:57:52 +0000 (16:57 +0000)]
Remove `pipex_rd_head6' and `ps6_rn[2]'. They are not used.

ok yasuoka

9 months agoAdopt bgpctl code to the ibuf changes done in bgpd.
claudio [Tue, 23 Jan 2024 16:16:15 +0000 (16:16 +0000)]
Adopt bgpctl code to the ibuf changes done in bgpd.

Adjust code that calls nlri_get_prefix() and friends to work with
an ibuf. show_mrt_update() is mostly converted because of this.
The output functions and the rest of the mrtparser are just
minimally touched to keep the diff reasonable.
OK tb@

9 months agoStart converting the message parser to use the new ibuf api.
claudio [Tue, 23 Jan 2024 16:13:35 +0000 (16:13 +0000)]
Start converting the message parser to use the new ibuf api.

Rewrite rde_update_dispatch() to use ibufs. Because of this
rde_update_err(), rde_get_mp_nexthop(), nlri_get_prefix() and
friends are switched to use ibufs. For rde_attr_parse() a minimal
change was done for now.

OK tb@

9 months agoFix tab after space
claudio [Tue, 23 Jan 2024 16:08:35 +0000 (16:08 +0000)]
Fix tab after space

9 months agoKNF, space before EOL
claudio [Tue, 23 Jan 2024 15:59:56 +0000 (15:59 +0000)]
KNF, space before EOL

9 months agoFixup more spaces
claudio [Tue, 23 Jan 2024 15:56:48 +0000 (15:56 +0000)]
Fixup more spaces

9 months agodrm: apple: Fix/remove log messages
kettenis [Tue, 23 Jan 2024 15:56:01 +0000 (15:56 +0000)]
drm: apple: Fix/remove log messages

From Janne Grunau
37a0cddeede0a715d137838a88c61e0c53c8d6cd in jannau's bits/200-dcp

9 months agoSpaces
claudio [Tue, 23 Jan 2024 15:55:20 +0000 (15:55 +0000)]
Spaces

9 months agodrm: apple: backlight: force backlight update after resume
kettenis [Tue, 23 Jan 2024 15:48:28 +0000 (15:48 +0000)]
drm: apple: backlight: force backlight update after resume

From Mark Kettenis
fcad9f366ba0c934f877662ee8199051b636d2e1 in jannau's bits/200-dcp

9 months agoSync with userland
tb [Tue, 23 Jan 2024 14:46:51 +0000 (14:46 +0000)]
Sync with userland

9 months agoUpdate to zlib 1.3.1
tb [Tue, 23 Jan 2024 14:46:27 +0000 (14:46 +0000)]
Update to zlib 1.3.1

Since we already pulled in all fixes, this only bumps version/magic numbers
and copyright years. The fixes relevant to OpenBSD are:

- Fix bug in inflateSync() for data held in bit buffer
- Add LIT_MEM define to use more memory for a small deflate speedup
- Add bounds checking to ERR_MSG() macro, used by zError()
- Various portability and appearance improvements

9 months agoSplit cases and call peer_stale() individually instead of using a
claudio [Tue, 23 Jan 2024 14:39:10 +0000 (14:39 +0000)]
Split cases and call peer_stale() individually instead of using a
conditional argument.
OK tb@

9 months agodrm/apple: spelling fixes
kettenis [Tue, 23 Jan 2024 14:30:13 +0000 (14:30 +0000)]
drm/apple: spelling fixes

From Jonathan Gray
cee29f9bcbf9574ce1ae19e586728a9d85c3db05 in jannau's bits/200-dcp

9 months agodrm: apple: use strscpy() in place of strlcpy()
kettenis [Tue, 23 Jan 2024 14:27:26 +0000 (14:27 +0000)]
drm: apple: use strscpy() in place of strlcpy()

From Arnd Bergmann
2501a971dbec631932aba9aba55b7b61b7c3c390 in jannau's bits/200-dcp

9 months agodrm: apple: mark local functions static
kettenis [Tue, 23 Jan 2024 14:25:07 +0000 (14:25 +0000)]
drm: apple: mark local functions static

From Arnd Bergmann
c23a90c49c665bfb61f0200e966cef042063e364 in jannau's bits/200-dcp

9 months agoPick up some fixup commits that add #include <linux/bitfield.h> from
kettenis [Tue, 23 Jan 2024 14:18:11 +0000 (14:18 +0000)]
Pick up some fixup commits that add #include <linux/bitfield.h> from
https://github.com/jannau/linux/tree/bits/200-dcp

9 months agofound some boilerplate strncpy to replace with strlcpy. They are in
deraadt [Tue, 23 Jan 2024 14:13:55 +0000 (14:13 +0000)]
found some boilerplate strncpy to replace with strlcpy.  They are in
messages, but the messages are zero'd first.
ok jmatthew

9 months agoDelete unused labels which cause error in making kernel.
aoyama [Tue, 23 Jan 2024 13:02:15 +0000 (13:02 +0000)]
Delete unused labels which cause error in making kernel.

ok miod@

9 months agoexplicitly disable Energy-Efficient Ethernet (EEE) on Marvell E151x
uwe [Tue, 23 Jan 2024 11:51:53 +0000 (11:51 +0000)]
explicitly disable Energy-Efficient Ethernet (EEE) on Marvell E151x

The Energy Detect feature is part of EEE and it defaults to off on both
hardware and software reset to enter "normal 10/100/1000 Mbps operation."
This change makes it explicit, as for the other PHYs in that family.

Note that, if EEE was actually enabled, an errata applies which requires
a certain sequence of magic register writes.

ok stsp@ kettenis@

9 months agoPlace the blob in the .openbsd.mutable section to cope with recent
anton [Tue, 23 Jan 2024 10:27:12 +0000 (10:27 +0000)]
Place the blob in the .openbsd.mutable section to cope with recent
madvise(2) changes.

ok deraadt@

9 months agoWarn about overclaiming intermediate CAs, but don't error
job [Tue, 23 Jan 2024 09:32:57 +0000 (09:32 +0000)]
Warn about overclaiming intermediate CAs, but don't error

OK tb@

9 months agoChange default duplex setting and simplify the setup of srrctl.BSIZEPKT.
kevlo [Tue, 23 Jan 2024 08:48:12 +0000 (08:48 +0000)]
Change default duplex setting and simplify the setup of srrctl.BSIZEPKT.

During media selection through ifconfig one might not specify the duplex
setting through the mediaopt flag.  In that case the igc(4) would default
to full-duplex.  The problem with this approach is that em(4) defaults to
half-duplex.  Because of that if one connects both NICs and sets media to
e.g. 100baseTX on both of them no carrier will be found.
Fix that by matching igc(4) behaviour with what em(4) does.

Adapted from FreeBSD commits 3b8d04f845b416d29a258658b8a48d1afb4a2e81 and
0eb8cd1de26849cbaefaf3bc59aa9612fa0dfa52 respectively.

ok mbuhl@