openbsd
9 months agodrm/dp_mst: Fix fractional DSC bpp handling
jsg [Mon, 29 Jan 2024 01:23:04 +0000 (01:23 +0000)]
drm/dp_mst: Fix fractional DSC bpp handling

From Ville Syrjala
4e042f022255604c68ab5d5f73c8f437d24d651e in linux-6.6.y/6.6.14
7707dd6022593f3edd8e182e7935870cf326f874 in mainline linux

9 months agoOpen /etc/{services,protocols} before pledge(2).
yasuoka [Mon, 29 Jan 2024 00:59:54 +0000 (00:59 +0000)]
Open /etc/{services,protocols} before pledge(2).

ok tobhe

9 months agoadd support for sending management frames to qwx(4)
stsp [Sun, 28 Jan 2024 22:30:39 +0000 (22:30 +0000)]
add support for sending management frames to qwx(4)

The initial AUTH frame is now sent when an AP is found during scans.
We then receive an AUTH response from the AP. Handling this response
in the driver will be our next step.

9 months agoThe KNF script didn't grok LHASH_OF(), STACK_OF()
tb [Sun, 28 Jan 2024 21:00:54 +0000 (21:00 +0000)]
The KNF script didn't grok LHASH_OF(), STACK_OF()

9 months agoAvoid calling EVP_CIPHER_CTX_reset() on a NULL ctx
tb [Sun, 28 Jan 2024 20:57:15 +0000 (20:57 +0000)]
Avoid calling EVP_CIPHER_CTX_reset() on a NULL ctx

9 months agoUse more specific sockaddr type for inpcb notify.
bluhm [Sun, 28 Jan 2024 20:34:25 +0000 (20:34 +0000)]
Use more specific sockaddr type for inpcb notify.

in_pcbnotifyall() is an IPv4 only function.  All callers check that
sockaddr dst is in fact a sockaddr_in.  Pass the more spcific type
and remove the runtime check at beginning of in_pcbnotifyall().
Use const sockaddr_in in in_pcbnotifyall() and const sockaddr_in6
in6_pcbnotify() as dst parameter.

OK millert@

9 months agoRemove the 'l' and 'L' flag printing in 'STAT' column. These were added
deraadt [Sun, 28 Jan 2024 19:05:33 +0000 (19:05 +0000)]
Remove the 'l' and 'L' flag printing in 'STAT' column. These were added
to provide visibility of the internal behaviour of pinsyscalls(2) during
introduction.  These flags remain (less) visible in the "-o procflags"
option, as 0x08000000 (PS_PIN) and 0x10000000 (PS_LIBCPIN).
That's good enough.

9 months agoBack out the TSO support diff, since we got issues reported for which
mglocker [Sun, 28 Jan 2024 18:42:58 +0000 (18:42 +0000)]
Back out the TSO support diff, since we got issues reported for which
no solution could be found.  Known issues at this point:

1. sparc64 panics, probably because of an alignment issue in struct
   tcphdr { th_off }.  A diff for potentially fixing the alignment issue
   exists, but testing is pending.
2. Watchdogs reported on the I350 chip, which can't be reproduced on own
   hardware.

9 months agocorrect DPADD; fromKrystian Lewandowski
deraadt [Sun, 28 Jan 2024 18:38:16 +0000 (18:38 +0000)]
correct DPADD; fromKrystian Lewandowski

9 months agoallow escaping inside quotes
op [Sun, 28 Jan 2024 17:23:17 +0000 (17:23 +0000)]
allow escaping inside quotes

RFC5322 allows for escapes using \ inside quotes.  Otherwise, headers
such as

From: "\"Doe, John\"" <op>

get mangled as "\"Doe@localhost, John\" <op> since \ would be treated as
ordinary character and not the escape for the quote.

Bug reported by TobiasEgg on the OpenSMTPD-portable github repository.

ok millert@

9 months agosync with userland
tb [Sun, 28 Jan 2024 16:11:31 +0000 (16:11 +0000)]
sync with userland

9 months agoPull in some post 1.3.1 upstream commits
tb [Sun, 28 Jan 2024 16:10:51 +0000 (16:10 +0000)]
Pull in some post 1.3.1 upstream commits

This is only cosmetic as far as OpenBSD is concerned.

9 months agoClean up EVP_CIPHER_CTX_init() usage in cmac.c
joshua [Sun, 28 Jan 2024 14:55:40 +0000 (14:55 +0000)]
Clean up EVP_CIPHER_CTX_init() usage in cmac.c

This replaces usage of EVP_CIPHER_CTX_init() with EVEP_CIPHER_CTX_new(),
and EVP_CIPHER_CTX_cleanup() with EVP_CIPHER_CTX_reset().

This also replaces usage of malloc with calloc, and free with freezero.

ok tb@

9 months agoClean up EVP_MD_CTX_{init,cleanup}() usage in ASN1_item_verify()
joshua [Sun, 28 Jan 2024 14:43:48 +0000 (14:43 +0000)]
Clean up EVP_MD_CTX_{init,cleanup}() usage in ASN1_item_verify()

ok tb@

9 months agoUse the wait until construct in ixp.sh in the hopes of making it more
anton [Sun, 28 Jan 2024 12:36:21 +0000 (12:36 +0000)]
Use the wait until construct in ixp.sh in the hopes of making it more
stable.

9 months agomatch on Intel C3000
jsg [Sun, 28 Jan 2024 03:01:39 +0000 (03:01 +0000)]
match on Intel C3000
tested by Stephane Tranchemer

9 months agoForce -fno-stack-protector on "boot block" that absolutely can't have
deraadt [Sun, 28 Jan 2024 01:07:26 +0000 (01:07 +0000)]
Force -fno-stack-protector on "boot block" that absolutely can't have
a stack protector (probably not even a -fstack-protector-strong) because
the bloat would render them unuseable.  This also means the system
compiler can now take on any more it wants, and all the pieces which
can't use the stack protector are properly marked.
ok kettenis

9 months agoset -fno-stack-protector in NORMAL_C_NOP, which is used to compile
deraadt [Sun, 28 Jan 2024 00:40:22 +0000 (00:40 +0000)]
set -fno-stack-protector in NORMAL_C_NOP, which is used to compile
mcount.c, in the same way that -fno-ret-protector is set (because
the default ret-protector is an "always" generator).  This change
ensures there is never a stack protector prologue/epilogue in the
functions in that file, no matter what stack protector selection
algorithm is in play.
ok kettenis guenther

9 months agoDynamic EVP_PKEY_METHODs are a thing from the past
tb [Sat, 27 Jan 2024 23:34:18 +0000 (23:34 +0000)]
Dynamic EVP_PKEY_METHODs are a thing from the past

9 months agoAssert that tcp_timer_rexmt() uses IPv4 inpcb.
bluhm [Sat, 27 Jan 2024 21:35:13 +0000 (21:35 +0000)]
Assert that tcp_timer_rexmt() uses IPv4 inpcb.

in_pcbnotifyall() must be called with IPv4 inpcb only.  Comment why
this is the case and verify it with kassert.  This assures that
inp_faddr is a valid address.

OK mvs@

9 months agoDeclare address parameter in TCP SYN cache const.
bluhm [Sat, 27 Jan 2024 21:13:46 +0000 (21:13 +0000)]
Declare address parameter in TCP SYN cache const.

tcp6_ctlinput() casted a constant sockaddr_sin6 to non-const sockaddr.
sa6_src may be &sa6_any which lives in read-only data section.
Better pass down the const addresses to syn_cache_lookup().  They
are needed for hash lookup and are not modified.

OK mvs@

9 months agoAdd a few aliases for ECDSA and DSA for security/xca
tb [Sat, 27 Jan 2024 18:12:27 +0000 (18:12 +0000)]
Add a few aliases for ECDSA and DSA for security/xca

ok jsing

9 months agoUse ret instead of rv in a few keyivgen functions
tb [Sat, 27 Jan 2024 17:20:20 +0000 (17:20 +0000)]
Use ret instead of rv in a few keyivgen functions

9 months agoFold keyivgen functions into evp_pbe.c
tb [Sat, 27 Jan 2024 17:14:33 +0000 (17:14 +0000)]
Fold keyivgen functions into evp_pbe.c

These are only used by the EVP_PBE routines and will become internal in
the next major bump.

9 months agoMake some comments and some whitespace less ugly
tb [Sat, 27 Jan 2024 16:50:39 +0000 (16:50 +0000)]
Make some comments and some whitespace less ugly

9 months agoWhitespace tweak
tb [Sat, 27 Jan 2024 16:36:17 +0000 (16:36 +0000)]
Whitespace tweak

9 months agoThrow PKCS5_PBE_add() into the trash bin at the end of evp_pbe.c
tb [Sat, 27 Jan 2024 16:26:25 +0000 (16:26 +0000)]
Throw PKCS5_PBE_add() into the trash bin at the end of evp_pbe.c

This has been a noop since forever and will be removed in the next bump.

9 months agoMark the functions at the end of this file for removal
tb [Sat, 27 Jan 2024 16:22:29 +0000 (16:22 +0000)]
Mark the functions at the end of this file for removal

9 months agoSupport HMAC with SHA-3 as a PBE PRF
tb [Sat, 27 Jan 2024 16:18:25 +0000 (16:18 +0000)]
Support HMAC with SHA-3 as a PBE PRF

ok jsing

9 months agoSupport HMAC with truncated SHA-2 as a PBE PRF
tb [Sat, 27 Jan 2024 16:17:32 +0000 (16:17 +0000)]
Support HMAC with truncated SHA-2 as a PBE PRF

ok jsing

9 months agoTeach OBJ_find_sigid_{,by_}algs(3) about ECDSA with SHA-3
tb [Sat, 27 Jan 2024 16:08:43 +0000 (16:08 +0000)]
Teach OBJ_find_sigid_{,by_}algs(3) about ECDSA with SHA-3

This allows signing and verifying ASN.1 "items" using the ECDSA with SHA-3
signature algorithms. With this diff, ECDSA certificates and CMS products
using ECDSA with SHA-3 can be generated using the openssl command line tool.

ok jsing

9 months agofirmware for qwx(4) devices
phessler [Sat, 27 Jan 2024 15:15:01 +0000 (15:15 +0000)]
firmware for qwx(4) devices

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@