openbsd
10 months agoFavor usage of REGRESS_SKIP_TARGETS instead of this custom logic.
anton [Tue, 27 Feb 2024 07:21:07 +0000 (07:21 +0000)]
Favor usage of REGRESS_SKIP_TARGETS instead of this custom logic.

10 months agoCope with recent ctfdump output changes.
anton [Tue, 27 Feb 2024 06:58:48 +0000 (06:58 +0000)]
Cope with recent ctfdump output changes.

10 months agoRecent ctfconv refactoring broke support for long double types, as
anton [Tue, 27 Feb 2024 06:58:19 +0000 (06:58 +0000)]
Recent ctfconv refactoring broke support for long double types, as
discovered by the regress tests.

10 months agoEnable MSIs on RK3588. We have a U-Boot package with device trees that
kettenis [Mon, 26 Feb 2024 21:41:24 +0000 (21:41 +0000)]
Enable MSIs on RK3588.  We have a U-Boot package with device trees that
work now.

ok patrick@

10 months agoAlso download SPLs via rsync
job [Mon, 26 Feb 2024 20:37:27 +0000 (20:37 +0000)]
Also download SPLs via rsync

OK tb@

10 months agoAdd RK3588 support. Rework the RK3568 support to take advantage of the
kettenis [Mon, 26 Feb 2024 18:57:50 +0000 (18:57 +0000)]
Add RK3588 support.  Rework the RK3568 support to take advantage of the
PHY mode enum like the new RK3588 code.

ok jmatthew@

10 months agoAdd GMAC related RK3588 clocks.
kettenis [Mon, 26 Feb 2024 18:54:25 +0000 (18:54 +0000)]
Add GMAC related RK3588 clocks.

ok jmatthew@

10 months agofix Tx rate selection for management frames in iwx(4)
stsp [Mon, 26 Feb 2024 18:00:09 +0000 (18:00 +0000)]
fix Tx rate selection for management frames in iwx(4)

The Tx rate index stored in ni->ni_txrate is not intended for use
with management frames, yet iwx_tx_fill_cmd() was using it anyway.
Use the minimum basic rate selected within iwx_tx_fill_cmd() instead.

10 months agoTrack the number of new files moving from 'staging' to 'validated cache'
job [Mon, 26 Feb 2024 15:40:33 +0000 (15:40 +0000)]
Track the number of new files moving from 'staging' to 'validated cache'

The OpenMetrics output shows per-repository counters for new files
added, the main process and JSON output emit the sum of all new files.

OK claudio@

10 months agoNeuter OBJ_bsearch{_,ex_}()
tb [Mon, 26 Feb 2024 15:00:30 +0000 (15:00 +0000)]
Neuter OBJ_bsearch{_,ex_}()

Make these functions always fail. A copy of OBJ_bsearch_ex_() is kept
in stack.c, where it is still used by internal_find() for sk_find{,_ex}().
sk_find_ex() will be removed in the upcoming bump, and then we can
simplify or rewrite what's still needed.

ok jsing

10 months agoAdd NAS-Identifier "npppd" for RADIUS requests. Also send Accouting-On
yasuoka [Mon, 26 Feb 2024 10:42:05 +0000 (10:42 +0000)]
Add NAS-Identifier "npppd" for RADIUS requests.  Also send Accouting-On
when RADIUS accounting is configured.

10 months agoProperly close JSON array before continuing in TAK
job [Mon, 26 Feb 2024 10:02:37 +0000 (10:02 +0000)]
Properly close JSON array before continuing in TAK

OK claudio@

10 months agouse TAILQ_FOREACH_SAFE() to avoid use after free
jsg [Mon, 26 Feb 2024 09:50:42 +0000 (09:50 +0000)]
use TAILQ_FOREACH_SAFE() to avoid use after free
found by smatch, ok claudio@

10 months agoPut the RADIUS message authenticator in the Access-Request and check
yasuoka [Mon, 26 Feb 2024 08:47:28 +0000 (08:47 +0000)]
Put the RADIUS message authenticator in the Access-Request and check
the message authenticators of any received messages from servers only
if they include a message authenticator.

10 months agoUse unsigned integers for bit fields. Also fix white spaces.
yasuoka [Mon, 26 Feb 2024 08:29:37 +0000 (08:29 +0000)]
Use unsigned integers for bit fields.  Also fix white spaces.

10 months agoConvert K&R style function declarations to ANSI.
yasuoka [Mon, 26 Feb 2024 08:25:51 +0000 (08:25 +0000)]
Convert K&R style function declarations to ANSI.

10 months agotype mgtv -> mgt; from todd carson
jmc [Mon, 26 Feb 2024 06:49:38 +0000 (06:49 +0000)]
type mgtv -> mgt; from todd carson

10 months agodrm/amd/display: Preserve original aspect ratio in create stream
jsg [Mon, 26 Feb 2024 00:06:08 +0000 (00:06 +0000)]
drm/amd/display: Preserve original aspect ratio in create stream

From Tom Chung
482cda9e50dedda43695fe52410add03cc146a30 in linux-6.6.y/6.6.18
deb110292180cd501f6fde2a0178d65fcbcabb0c in mainline linux

10 months agodrm/amd/display: Fix MST Null Ptr for RV
jsg [Mon, 26 Feb 2024 00:04:18 +0000 (00:04 +0000)]
drm/amd/display: Fix MST Null Ptr for RV

From Fangzhi Zuo
7407c61f43b66e90ad127d0cdd13cbc9d87141a5 in linux-6.6.y/6.6.18
e6a7df96facdcf5b1f71eb3ec26f2f9f6ad61e57 in mainline linux

10 months agodrm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution
jsg [Mon, 26 Feb 2024 00:02:20 +0000 (00:02 +0000)]
drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution

From Thong
b476ae1da1369bc56e090d0a55bbd55bf0d8d409 in linux-6.6.y/6.6.18
2f542421a47e8246e9b7d2c6508fe3a6e6c63078 in mainline linux

10 months agodrm/prime: Support page array >= 4GB
jsg [Mon, 26 Feb 2024 00:00:17 +0000 (00:00 +0000)]
drm/prime: Support page array >= 4GB

From Philip Yang
4ff8ec01a86568ffa5b8825bfe51c4d0d1379286 in linux-6.6.y/6.6.18
b671cd3d456315f63171a670769356a196cf7fd0 in mainline linux

10 months agodrm/amd/display: Add align done check
jsg [Sun, 25 Feb 2024 23:59:06 +0000 (23:59 +0000)]
drm/amd/display: Add align done check

From Zhikai Zhai
b9e373ed8d9cefd56bf2ff2dd2914105bf53bd4e in linux-6.6.y/6.6.18
94b38b895dec8c0ef093140a141e191b60ff614c in mainline linux

10 months agodrm/amd: Don't init MEC2 firmware when it fails to load
jsg [Sun, 25 Feb 2024 23:57:35 +0000 (23:57 +0000)]
drm/amd: Don't init MEC2 firmware when it fails to load

From David McFarland
38fd4dfa2764280e48c862e89623def321d0328d in linux-6.6.y/6.6.18
8ef85a0ce24a6d9322dfa2a67477e473c3619b4f in mainline linux

10 months agodrm/amdgpu: Reset IH OVERFLOW_CLEAR bit
jsg [Sun, 25 Feb 2024 23:55:59 +0000 (23:55 +0000)]
drm/amdgpu: Reset IH OVERFLOW_CLEAR bit

From Friedrich Vock
8983397951b4b0bd51bb4b4ba9749424e1ccbb70 in linux-6.6.y/6.6.18
7330256268664ea0a7dd5b07a3fed363093477dd in mainline linux

10 months agoRevert "drm/amd: flush any delayed gfxoff on suspend entry"
jsg [Sun, 25 Feb 2024 23:54:12 +0000 (23:54 +0000)]
Revert "drm/amd: flush any delayed gfxoff on suspend entry"

From Mario Limonciello
caa2565a2e13899be31f7b1e069e6465d3e2adb0 in linux-6.6.y/6.6.18
916361685319098f696b798ef1560f69ed96e934 in mainline linux

10 months agoWe don't do compat32 so MSR_CSTAR shouldn't be set up: delete the
guenther [Sun, 25 Feb 2024 22:33:09 +0000 (22:33 +0000)]
We don't do compat32 so MSR_CSTAR shouldn't be set up: delete the
Xsyscall32 stub and UCODE32 selector, set MSR_CSTAR to zero at CPU
startup, and rezero on ACPI resume and VM exit.

requested a while ago by deraadt@
AMD VM testing chris@
testing and ok krw@

10 months agoclockintr: rename "struct clockintr_queue" to "struct clockqueue"
cheloha [Sun, 25 Feb 2024 19:15:50 +0000 (19:15 +0000)]
clockintr: rename "struct clockintr_queue" to "struct clockqueue"

The code has outgrown the original name for this struct.  Both the
external and internal APIs have used the "clockqueue" namespace for
some time when operating on it, and that name is eyeball-consistent
with "clockintr" and "clockrequest", so "clockqueue" it is.

10 months agosys/clockintr.h: consolidate forward declarations
cheloha [Sun, 25 Feb 2024 18:29:26 +0000 (18:29 +0000)]
sys/clockintr.h: consolidate forward declarations

10 months agoclockintr.h, kern_clockintr.c: add 2023, 2024 to copyright range
cheloha [Sun, 25 Feb 2024 18:17:11 +0000 (18:17 +0000)]
clockintr.h, kern_clockintr.c: add 2023, 2024 to copyright range

10 months agoLet some missing missing RFC 1918 reverse zones through.
florian [Sun, 25 Feb 2024 10:13:09 +0000 (10:13 +0000)]
Let some missing missing RFC 1918 reverse zones through.
Problem spotted and diff from Einfach Jemand (rru.142 at gmail),
thanks!

OK phessler, jca

10 months agoFix a typo
yasuoka [Sun, 25 Feb 2024 06:22:45 +0000 (06:22 +0000)]
Fix a typo

10 months agoNew accounting flag ABTCFI to indicate signal SIGILL + code ILL_BTCFI
deraadt [Sun, 25 Feb 2024 00:07:13 +0000 (00:07 +0000)]
New accounting flag ABTCFI to indicate signal SIGILL + code ILL_BTCFI
has occurred in the process.
ok various people

10 months agoCheck for builtins used inside tuple to ask the kernel to copyout specific data.
mpi [Sat, 24 Feb 2024 19:42:54 +0000 (19:42 +0000)]
Check for builtins used inside tuple to ask the kernel to copyout specific data.

Allow to save stacktrace and process name in tuples.

10 months agosync
deraadt [Sat, 24 Feb 2024 19:13:05 +0000 (19:13 +0000)]
sync

10 months agoAdd a few missing endbr64 to libcrypto
tb [Sat, 24 Feb 2024 17:53:20 +0000 (17:53 +0000)]
Add a few missing endbr64 to libcrypto

gcm_{gmult,ghash}_4bit(), aesni_ccm64_decrypt_blocks(), aes_cbc_encrypt(),
and aesni_xts_{en,de}crypt() were overlooked in previous passes.

Found with a diff for ld.lld by kettenis
ok kettenis

10 months agoImplement 'store' for maps.
mpi [Sat, 24 Feb 2024 17:05:59 +0000 (17:05 +0000)]
Implement 'store' for maps.

A current limitation is the value read from a map is converted to an
integer.  To preserve the original type we have to make maps aware of
the type of its elements.

10 months agoExplicitly disable MSR_CET_NO_TRACK_EN in MSR_S_CET. If enabled by the
deraadt [Sat, 24 Feb 2024 17:00:05 +0000 (17:00 +0000)]
Explicitly disable MSR_CET_NO_TRACK_EN in MSR_S_CET.  If enabled by the
boot-process, we don't want to accidentally allow "notrack" indirect
branches. Linux kernel does the same.  Today it is difficult to do the
same for userland, because there is 1 known piece of software using
"notrack" (which needs to be fixed).
ok kettenis

10 months agoclockintr_bind.9: document clockintr, clockrequest APIs
cheloha [Sat, 24 Feb 2024 16:21:32 +0000 (16:21 +0000)]
clockintr_bind.9: document clockintr, clockrequest APIs

This manpage only covers the frontend APIs.  The backend API is still
moving around and will be documented separately.

Tons of input, editing, and suggestions from jmc@, schwarze@, mpi@,
claudio@, mlarkin@, and probably several others I'm forgetting.

ok jmc@ schwarze@ claudio@ mpi@

10 months agoImplement 'store' for all builtins, they are either string or integer.
mpi [Sat, 24 Feb 2024 16:19:49 +0000 (16:19 +0000)]
Implement 'store' for all builtins, they are either string or integer.

10 months agoReplace uses of endbr64 with _CET_ENDBR from cet.h
tb [Sat, 24 Feb 2024 15:30:14 +0000 (15:30 +0000)]
Replace uses of endbr64 with _CET_ENDBR from cet.h

cet.h is needed for other platforms to emit the relevant .gnu.properties
sections that are necessary for them to enable IBT. It also avoids issues
with older toolchains on macOS that explode on encountering endbr64.

based on a diff by kettenis
ok beck kettenis

10 months agoqwx(4): qwx_dp_rx_tid_del_func: fix dp_reo_cache_flush_elem expiration logic
cheloha [Sat, 24 Feb 2024 15:21:39 +0000 (15:21 +0000)]
qwx(4): qwx_dp_rx_tid_del_func: fix dp_reo_cache_flush_elem expiration logic

Tweak a few things in qwx_dp_rx_tid_del_func() to make it behave
correctly on OpenBSD:

- struct dp_reo_cache_flush_elem: make ts a 64-bit count of nanoseconds

  Linux uses jiffies to timestamp dp_reo_cache_flush_elem.  Although
  OpenBSD has a global jiffies variable, we shouldn't use it outside
  of drm(4).  I would rather not use our global ticks variable, either.
  We can use getnsecuptime(9), a low-res 64-bit nanosecond timestamp,
  as a substitute.

- qwx_dp_rx_tid_del_func: replace gettime(9) with getnsecuptime(9)

- qwx_dp_rx_tid_del_func: convert DP_REO_DESC_FREE_TIMEOUT_MS to nanoseconds

- qwx_dp_rx_tid_del_func: reverse timestamp comparison operator

  This comparison is backwards.  Linux uses the time_after() macro to
  test whether a given entry has expired, so our ported code needs to
  test whether the current uptime is greater than or equal to a given
  entry's expiration time.

Joint effort with stsp@.  Tested by stsp@.

ok stsp@

10 months agoRemove custom key length handling
tb [Sat, 24 Feb 2024 08:00:37 +0000 (08:00 +0000)]
Remove custom key length handling

No cipher in libcrypto is marked EVP_CIPH_CUSTOM_KEY_LENGTH and no control
handler deals with EVP_CTRL_SET_KEY_LENGTH, which means that this code is
dead as far as libcrypto is concerned. Almost nothing uses EVP_CIPHER_meth*
(this was added for a single project) and nothing sets a custom ctrl. This
isn't going to change anyway since EVP_CIPHER_meth* is deprecated in order
to promote more provider beauty.

ok beck jsing

10 months agoRemove last calls to CRYPTO_{push,pop}_info()
tb [Sat, 24 Feb 2024 07:53:01 +0000 (07:53 +0000)]
Remove last calls to CRYPTO_{push,pop}_info()

These don't do anything but return 0 and will be garbage collected in the
upcoming bump.

ok jsing

10 months agoerr.c: fix incorrect line wrapping
tb [Sat, 24 Feb 2024 07:50:25 +0000 (07:50 +0000)]
err.c: fix incorrect line wrapping

10 months agoclockintr: rename clockqueue_reset_intrclock to clockqueue_intrclock_reprogram
cheloha [Sat, 24 Feb 2024 01:43:32 +0000 (01:43 +0000)]
clockintr: rename clockqueue_reset_intrclock to clockqueue_intrclock_reprogram

The function should be in the clockqueue_intrclock namespace.  Also,
"reprogram" is a better word for what the function actually does.

10 months agotimecounting: start system uptime at 0.0 instead of 1.0
cheloha [Fri, 23 Feb 2024 23:01:15 +0000 (23:01 +0000)]
timecounting: start system uptime at 0.0 instead of 1.0

OpenBSD starts the system uptime clock at 1.0 instead of 0.0.  We
inherited this behavior from FreeBSD when we imported kern_tc.c.

patrick@ reports that this causes a problem in sdmmc(4) during boot:
the sdmmc_delay() call in sdmmc_init() doesn't block for the full
250ms.  This happens because the system hardclock() starts at 0.0 and
executes about hz times, rapidly, to "catch up" to 1.0.  This
instantly expires the first hz timeout ticks, hence the short sleep.

Starting the system uptime at 0.0 fixes the problem.

Prompted by patrick@.  Tested by patrick@.  In snaps since Feb 19 2023.

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

ok patrick@ deraadt@

10 months agoThere is a 21BY x13s model. Handle it like 21BX.
kettenis [Fri, 23 Feb 2024 21:52:12 +0000 (21:52 +0000)]
There is a 21BY x13s model.  Handle it like 21BX.

ok beck@, deraadt@

10 months agoStart of a BTCFI test.
kettenis [Fri, 23 Feb 2024 21:33:51 +0000 (21:33 +0000)]
Start of a BTCFI test.

10 months agoddb(4): db_read_bytes/db_write_bytes: change dst/src parameter to void*
cheloha [Fri, 23 Feb 2024 18:19:02 +0000 (18:19 +0000)]
ddb(4): db_read_bytes/db_write_bytes: change dst/src parameter to void*

Almost all db_read_bytes() callers cast the destination buffer
argument to char*, which suggests the API's prototype is incompatible
with how the API is actually used.

Change db_read_bytes() and db_write_bytes() to take a void* as the
destination/source buffer parameter so callers don't need to cast the
argument.

With input from bluhm@.  Bugs caught by Clemens Gossnitzer (ASCII
approximation of name).

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

ok bluhm@

10 months agotimeout: make to_kclock validation more rigorous
cheloha [Fri, 23 Feb 2024 16:51:39 +0000 (16:51 +0000)]
timeout: make to_kclock validation more rigorous

In kern_timeout.c, the to_kclock checks are not strict enough to catch
all plausible programmer mistakes.  Tighten them up:

- timeout_set_flags: KASSERT that kclock is valid
- timeout_abs_ts: KASSERT that to_kclock is KCLOCK_UPTIME

We can also add to_kclock validation to softclock() and
db_show_timeout(), which may help to debug memory corruption:

- softclock: panic if to_kclock is not KCLOCK_NONE or KCLOCK_UPTIME
- db_show_timeout: print warning if to_kclock is invalid

Prompted by bluhm@ in response to a syzbot panic.  Hopefully these
changes help to narrow down the root cause.

Link: https://syzkaller.appspot.com/bug?extid=49d3f7118413963f651a
Reported-by: syzbot+49d3f7118413963f651a@syzkaller.appspotmail.com
ok bluhm@

10 months agoPrepare to provide X509_STORE_get1_objects()
tb [Fri, 23 Feb 2024 10:39:07 +0000 (10:39 +0000)]
Prepare to provide X509_STORE_get1_objects()

The OpenSSL 1.1 API X509_STORE_get0_objects() is not thread safe. It
exposes a naked internal pointer containing certificates, CRLs and
cached objects added by X509_LOOKUP_hash_dir(). Thus, if the store is
shared between threads, it is not possible to inspect this pointer safely
since another thread could concurrently add to it. This may happen in
particular during certificate verification. This API led to security
issues in rust-openssl and is also problematic in current Python.

Other consumers of X509_STORE_get0_objects() are haproxy, isync, openvpn.

The solution is to take a snapshot of the state under a lock and return
that. This is what X509_STORE_get1_objects() does. It returns a newly
allocated stack that needs to be freed with sk_X509_OBJECT_pop_free(),
passing X509_OBJECT_free as a second argument.

Based on a diff by David Benjamin for BoringSSL.
https://boringssl-review.googlesource.com/c/boringssl/+/65787

ok beck jsing

PS: Variants of this have landed in Python and OpenSSL 3 as well. There the
sk_*deep_copy() API is used, which in OpenSSL relies on evaluating function
pointers after casts (BoringSSL fixed that). Instead of using this macro
insanity and exposing that garbage in public, we can do this by implementing
a pedestrian, static sk_X509_OBJECT_deep_copy() by hand.

10 months agoRemove ASN1_time_clamp_notafter() prototype
tb [Fri, 23 Feb 2024 09:50:19 +0000 (09:50 +0000)]
Remove ASN1_time_clamp_notafter() prototype

There is now a prototype in x509_internal.h, so no need to repeat that
here.

10 months ago- Add support for reporting flow control status.
kevlo [Fri, 23 Feb 2024 01:06:18 +0000 (01:06 +0000)]
- Add support for reporting flow control status.
- Add missing igc_check_for_link() call; from Masanobu SAITOH via NetBSD.

"Fine" deraadt@

ok jan@

10 months agomake qwx(4) ignore ESHUTDOWN while printing errors to dmesg
stsp [Thu, 22 Feb 2024 21:21:35 +0000 (21:21 +0000)]
make qwx(4) ignore ESHUTDOWN while printing errors to dmesg

ESHUTDOWN is an expected thread-synchronization condition which
can be triggered via ifconfig commands. Don't warn about this.

Reported by Marco van Hulten on misc@

10 months agoFix copy-paste error in comment
tb [Thu, 22 Feb 2024 21:00:26 +0000 (21:00 +0000)]
Fix copy-paste error in comment

10 months agoZap trailing blanks
tb [Thu, 22 Feb 2024 19:29:55 +0000 (19:29 +0000)]
Zap trailing blanks

10 months agosync
deraadt [Thu, 22 Feb 2024 18:07:59 +0000 (18:07 +0000)]
sync

10 months agowrap an overlong line to appease mandoc -Tlint
tb [Thu, 22 Feb 2024 17:54:08 +0000 (17:54 +0000)]
wrap an overlong line to appease mandoc -Tlint

10 months agoMake the route cache aware of multipath routing.
bluhm [Thu, 22 Feb 2024 14:25:58 +0000 (14:25 +0000)]
Make the route cache aware of multipath routing.

Pass source address to route_cache() and store it in struct route.
Cached multipath routes are only valid if source address matches.
If sysctl multipath changes, increase route generation number.

OK claudio@

10 months agoImprove db_ctf_pprint(), implement handlers for arrays and enums.
claudio [Thu, 22 Feb 2024 13:49:17 +0000 (13:49 +0000)]
Improve db_ctf_pprint(), implement handlers for arrays and enums.

Use db_get_value() to access addr to ensure that alignment errors
don't cause exceptions. DDB on 32bit archs does normally not handle
64bit values so to print 64bit ints a bit of gymnastics is needed.

OK mpi@

10 months agoPrint the size of more objects (basic types and enums) based on their
claudio [Thu, 22 Feb 2024 13:21:03 +0000 (13:21 +0000)]
Print the size of more objects (basic types and enums) based on their
ctt_size info. This helps to ensure that the reported sizes match.
OK mpi@

10 months agoRewrite the it_cmp() function to use the common check bigger than, check
claudio [Thu, 22 Feb 2024 13:17:18 +0000 (13:17 +0000)]
Rewrite the it_cmp() function to use the common check bigger than, check
smaller than logic.

There was a bug in this code because of a badly placed ) which I only
noticed after rewriting the function since I assumed that C integer
promotion is playing tricks with us.

OK mpi@

10 months agoThe ctt_size of integers and floating point numbers is in bytes not bits.
claudio [Thu, 22 Feb 2024 13:15:17 +0000 (13:15 +0000)]
The ctt_size of integers and floating point numbers is in bytes not bits.
OK mpi@

10 months agoAdd regress for Signed Prefix List objects
job [Thu, 22 Feb 2024 12:51:50 +0000 (12:51 +0000)]
Add regress for Signed Prefix List objects

10 months agoAdd support for RPKI Signed Prefix Lists
job [Thu, 22 Feb 2024 12:49:42 +0000 (12:49 +0000)]
Add support for RPKI Signed Prefix Lists

Signed Prefix List are a CMS protected content type for use with the
RPKI to carry the complete list of prefixes which an Autonomous System
may originate to all or any of its routing peers. The validation of a
Signed Prefix List confirms that the holder of the listed ASN produced
the object, and that this list is a current, accurate and complete
description of address prefixes that may be announced into the routing
system originated by this AS.

https://datatracker.ietf.org/doc/html/draft-ietf-sidrops-rpki-prefixlist

with and OK claudio@ tb@

10 months agoget rid of the qwx(4) mhi_newstate_task
stsp [Thu, 22 Feb 2024 09:15:34 +0000 (09:15 +0000)]
get rid of the qwx(4) mhi_newstate_task

We can now run MHI state transition code in the interrupt handler.
There is no reason to run a separate thread just to poke at some
registers and send a few of wakeups().

10 months agostart qwx(4) MHI channels in process context rather than in a task
stsp [Thu, 22 Feb 2024 09:12:45 +0000 (09:12 +0000)]
start qwx(4) MHI channels in process context rather than in a task

This removes all sleep points from the MHI state-change task, which
will allow us to get rid of it. And I can now reproduce the channel
startup issue kettenis@ saw on arm64 by removing the delay() call.

10 months agocache qwx(4) firmware images in memory across suspend/resume cycles
stsp [Thu, 22 Feb 2024 09:08:08 +0000 (09:08 +0000)]
cache qwx(4) firmware images in memory across suspend/resume cycles

testing + ok phessler@

10 months agoadd suspend/resume support to qwx(4)
stsp [Thu, 22 Feb 2024 09:06:11 +0000 (09:06 +0000)]
add suspend/resume support to qwx(4)

testing + ok phessler@ deraadt@

10 months agoadd 7.6 syspatch public key
robert [Thu, 22 Feb 2024 08:35:38 +0000 (08:35 +0000)]
add 7.6 syspatch public key

10 months agoif_inkstatehook -> if_linkstatehook
jsg [Thu, 22 Feb 2024 08:10:08 +0000 (08:10 +0000)]
if_inkstatehook -> if_linkstatehook

10 months agoWorkaround for gcc3 - the use of anonymous unions now makes it complain
miod [Thu, 22 Feb 2024 06:45:22 +0000 (06:45 +0000)]
Workaround for gcc3 - the use of anonymous unions now makes it complain
when named initializers use fields within these anonymous unions.

Hopefully a short-term bandaid until the appropriate changes are identified
and backported to gcc3.

ok claudio@

10 months agovmd(8): only add vionet tap read events after a notify event.
dv [Thu, 22 Feb 2024 02:38:53 +0000 (02:38 +0000)]
vmd(8): only add vionet tap read events after a notify event.

My recent refactor introduced a bug where the vionet device will
add the tap(4) read event on an unpause regardless of driver and
device state, causing the cpu to peg as the read event fires
indefinitely because the guest's virtqueue isn't ready to receive
the data.

Add in a global flag that tracks if the rx-side is enabled or not
to coordinate adding the tap read event.

ok mlarkin@

10 months agomatch on C740; tested by and ok deraadt@
jsg [Wed, 21 Feb 2024 22:57:11 +0000 (22:57 +0000)]
match on C740; tested by and ok deraadt@

10 months agorecognise Neoverse V3 (Poseidon), Neoverse N3 (Hermes)
jsg [Wed, 21 Feb 2024 21:50:17 +0000 (21:50 +0000)]
recognise Neoverse V3 (Poseidon), Neoverse N3 (Hermes)

10 months agofix typos in qwx(4) firmware file names
stsp [Wed, 21 Feb 2024 21:31:02 +0000 (21:31 +0000)]
fix typos in qwx(4) firmware file names

10 months agosync
deraadt [Wed, 21 Feb 2024 18:21:16 +0000 (18:21 +0000)]
sync

10 months agocreate a new code ILL_BTCFI associated with SIGILL for trap faults which
deraadt [Wed, 21 Feb 2024 15:53:07 +0000 (15:53 +0000)]
create a new code ILL_BTCFI associated with SIGILL for trap faults which
indicate missing indirect branch target instructions (on the two
architectures which currently have this).  This becomes nicely visible in
kdump:
  6526 cat      PSIG  SIGILL SIG_DFL code=ILL_BTCFI addr=0x438fad6a990 trapno=21
ok kettenis sthen miod rsadowski

10 months agoRemove duplicate definitions.
kevlo [Wed, 21 Feb 2024 14:40:50 +0000 (14:40 +0000)]
Remove duplicate definitions.

ok stsp@

10 months agoAdd missing checksum flag M_TCP_TSO to ddb show mbuf.
bluhm [Wed, 21 Feb 2024 13:42:06 +0000 (13:42 +0000)]
Add missing checksum flag M_TCP_TSO to ddb show mbuf.

OK mglocker@ claudio@

10 months agoIn it_cmp() make sure that arrays are only considered equal if both
claudio [Wed, 21 Feb 2024 13:24:37 +0000 (13:24 +0000)]
In it_cmp() make sure that arrays are only considered equal if both
have the same number of elements. This fixes an issue where arrays
where too aggressivly merged and as a result the number of elements
was mostly wrong in the CTF bits.
Also it_cmp() should return 0 if both elements are considered equal.
OK mpi@

10 months agoMake DPRINTF() depend on DEBUG and add the missing ;
claudio [Wed, 21 Feb 2024 13:21:56 +0000 (13:21 +0000)]
Make DPRINTF() depend on DEBUG and add the missing ;
OK mpi@

10 months agoApply the void workaround also for typedefs.
claudio [Wed, 21 Feb 2024 13:20:38 +0000 (13:20 +0000)]
Apply the void workaround also for typedefs.

The kernel has 'typedef VOID void' which needs this.
OK mpi@

10 months agoHandle DW_FORM_udata and DW_FORM_ref_udata in dav2val().
claudio [Wed, 21 Feb 2024 13:18:33 +0000 (13:18 +0000)]
Handle DW_FORM_udata and DW_FORM_ref_udata in dav2val().

At least with clang enums use DW_FORM_udata and without this all enum
values would be reported as -1.

OK mpi@

10 months agoMake sure dw_at2name() never returns NULL. This call is used in various
claudio [Wed, 21 Feb 2024 13:16:14 +0000 (13:16 +0000)]
Make sure dw_at2name() never returns NULL. This call is used in various
printf calls that clang decided to optimise into puts calls that crash
with a NULL argument.
Also add DW_AT_noreturn which caused this when running ./ctfconv -d ./ctfconv
OK mpi@

10 months agoGroup logx() getmonotime() and get_current_time() together
tb [Wed, 21 Feb 2024 12:48:25 +0000 (12:48 +0000)]
Group logx() getmonotime() and get_current_time() together

Fix their indent in extern.h, move the X509_TIME_* macros to main.c since
they aren't (and can't really be) used elsewhere, document the meaning of
the magic numbers. Also move get_current_time() out of the middle of entity
handlers.

ok claudio job

10 months agoFix secondary indent of various ip_* and as_* prototypes
tb [Wed, 21 Feb 2024 12:38:10 +0000 (12:38 +0000)]
Fix secondary indent of various ip_* and as_* prototypes

10 months agoRemove prototypes for tak_read() and ip_addr_cmp()
tb [Wed, 21 Feb 2024 12:35:36 +0000 (12:35 +0000)]
Remove prototypes for tak_read() and ip_addr_cmp()

These functions never existed.

ok claudio job

10 months agospelling fixes; ok claudio@
jsg [Wed, 21 Feb 2024 12:08:05 +0000 (12:08 +0000)]
spelling fixes; ok claudio@

10 months agoImport mwx(4) a driver for Mediatek MT7921 and MT7922 802.11ax devices
claudio [Wed, 21 Feb 2024 10:48:10 +0000 (10:48 +0000)]
Import mwx(4) a driver for Mediatek MT7921 and MT7922 802.11ax devices

This is work in progress. Scan works, RX of packets is more or less there
but TX does not work yet. The packets are passed to the chip but get stuck
or ignored there. It is easy to hang the device or the system since device
reset is not quite right (like many other bits).

Also this is only for MT7921 right now since I have no access to a MT7922
device.

Lots of pushing from deraadt@ to commit this now.

10 months agoKeep mbuf data alignment intact in m_defrag()
claudio [Wed, 21 Feb 2024 09:28:29 +0000 (09:28 +0000)]
Keep mbuf data alignment intact in m_defrag()

The recent TSO support in em(4) triggered an alignment error on the TCP
header. In em(4) m_defrag() is called before setting up the TSO dma bits
and with that the TCP header was suddenly no longer aligned. Like other
mbuf functions preserve the data alignment in m_defrag() to prevent such
unaligned packets.

With help and OK bluhm@ mglocker@

10 months agorpki-client: remove the remaining struct parse
tb [Wed, 21 Feb 2024 09:17:06 +0000 (09:17 +0000)]
rpki-client: remove the remaining struct parse

With the exception of mft.c where there is an additional boolean, this
struct carries a file name and a result. This means functions having
struct parse in the signature can't be shared between files, which has
been annoying. Simply pass file name and necessary info directly as a
function parameter and add a small dance to handle the boolean in mft.c.

ok job

10 months agoexplain arguments of internal-sftp
djm [Wed, 21 Feb 2024 06:17:29 +0000 (06:17 +0000)]
explain arguments of internal-sftp
GHPR#454 from Niklas Hambüchen

10 months agoclarify permissions requirements for ChrootDirectory
djm [Wed, 21 Feb 2024 06:06:43 +0000 (06:06 +0000)]
clarify permissions requirements for ChrootDirectory
Part of GHPR#454 from Niklas Hambüchen

10 months ago.Cm for a keyword. Part of GHPR#454 from Niklas Hambüchen
djm [Wed, 21 Feb 2024 06:05:06 +0000 (06:05 +0000)]
.Cm for a keyword. Part of GHPR#454 from Niklas Hambüchen

10 months agofix typo in match directive predicate (s/tagged/tag)
djm [Wed, 21 Feb 2024 06:01:13 +0000 (06:01 +0000)]
fix typo in match directive predicate (s/tagged/tag)
GHPR#462 from Tobias Manske

10 months agofix proxy multiplexing mode, broken when keystroke timing
djm [Wed, 21 Feb 2024 05:57:34 +0000 (05:57 +0000)]
fix proxy multiplexing mode, broken when keystroke timing
obfuscation was added. GHPR#463 from montag451

10 months agorevert r1.35
dlg [Wed, 21 Feb 2024 04:26:45 +0000 (04:26 +0000)]
revert r1.35

i dont know what i'm doing wrong with the handling of the no-map
property, but i'll find some coffee and time and figure it out soon
hopefully.

10 months agoDNS resolution is best effort; if at this time IP addresses for tickers
deraadt [Wed, 21 Feb 2024 03:31:28 +0000 (03:31 +0000)]
DNS resolution is best effort; if at this time IP addresses for tickers
cannot be resolved, don't spam syslog like crazy.  Change the
"DNS lookup tmpfail" message into a log_debug()
ok millert

10 months agoOnly return EPERM for immutable regions for the nasty operations
deraadt [Wed, 21 Feb 2024 03:28:29 +0000 (03:28 +0000)]
Only return EPERM for immutable regions for the nasty operations
of madvise() and msync() which damaged the region.  The sync ones
are allowed to proceed (even if most of them are nops...)
based on issues noted by anton and semarie