1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-24 06:04:47 +00:00
Commit Graph

243755 Commits

Author SHA1 Message Date
kettenis
401a1d0147 Implement support for the Zicbom and Svpbmt extensions. Rework the cache
flushing code to operate on virtual addresses instead of physical
addresses.  Seems the Zicbom implementation on the SpacemiT X60 cores
doesn't flush the caches if the mapping is non-cachable.  So adjust
_pmap_kenter_pa() to use a temporary cachable mapping to clean a page we
want to map non-cachable.

ok jca@
2026-04-05 11:48:17 +00:00
kettenis
9092a47d4d Add smtclock(4), a driver for the clock/reset controller on the SpacemiT
K1 SoC.

ok jca@
2026-04-05 11:40:50 +00:00
mlarkin
1d8b087cfc netgroup_mkdb(8) calls abort() when _ng_parse() returns
_NG_ERROR for a malformed netgroup entry. Make this code
exit via the same paradigm as other errors (errx).

From Renaud Allard, thanks!

ok op@
2026-04-04 21:20:42 +00:00
deraadt
d929a90643 sync 2026-04-04 21:07:37 +00:00
jca
9340cd4a2b Fix hw.blockcpu sysctl variable name
From Matthias Schmidt
2026-04-04 19:26:32 +00:00
martijn
aa01551487 Use proc-name, instead of command name for a filter's default syslog tag.
OK op@
2026-04-04 19:18:37 +00:00
nicm
91e11a7d89 Cache user from getpwuid because it can be very expensive on some
platforms. From Ben Maurer in GitHub issue 4973.
2026-04-04 17:13:07 +00:00
nicm
361a42094f Add remain-on-exit key to keep pane around until a key is pressed, from
Michael Grant.
2026-04-04 17:00:33 +00:00
nicm
2a0de18b8a Bring some new formats from the floating panes work: pane_zoomed_flag,
pane_flags, pane_floating_flag. By Michael Grant.
2026-04-04 16:40:27 +00:00
kettenis
ff124e2ac9 smtgpio(4) 2026-04-04 14:12:50 +00:00
nicm
bf327798d5 Document control ranges, from Dane Jensen. 2026-04-04 11:48:00 +00:00
nicm
9e3dfc0792 Set up default and last cell before clearing padding, reported by
someone on GitHub.
2026-04-04 11:39:49 +00:00
nicm
c374aa19a7 Do not read off end of buffer if it ends in \ when expanding \c, found
by ossfuzz.
2026-04-04 11:32:05 +00:00
nicm
4791559ae8 Clamp width to terminal width, also change calculation of end of screen
(it is OK to be outside the screen). Fixes problem reported by Dane
Jensen in GitHub issue 4969.
2026-04-04 11:20:01 +00:00
op
1329367c83 fix previous bound check in dname_expand()
introduced mistakenly by me while reworking renaud's diff.  spotted the
hard way by deraadt

ok jtt@
2026-04-04 11:01:41 +00:00
jtt
1ac8d6c943 ksh: yank on 'change' in vi-mode
Until now, only 'delete' operations in ksh's vi-mode yank the deleted
range to the yank buffer. Make 'change' operations do the same.
This is consistent with vi(1)'s behavior.

ok tb@
2026-04-04 09:33:18 +00:00
jsg
3f02b625e6 match on Intel 800 Series
ok mlarkin@
2026-04-04 09:01:13 +00:00
kirill
50c69bf41c sys/octeon: interrupts and barier cleanup
octciu_intr_establish() happens on autoconf where only CPU0 exists, and
on octeon we increase ncpus in cpu hatch, and not attach, which means
that ncpus is 1 at octciu_intr_establish() time.

What makes cpuid always 1 for that code and schedules all interrupts on
CPU0.

I also moved octciu_intr_barrier() to actual interrupt's cpu.

OK: visa@, kn@
2026-04-04 09:00:20 +00:00
jsg
ebfb438939 regen 2026-04-04 08:59:07 +00:00
jsg
bd8cabee06 add Intel 800 Series ids
from:
Intel 800 Series Chipset Family Platform Controller Hub (PCH)
Datasheet, Volume 1 of 2, Doc. No.: 833778, Rev.: 003

ok mlarkin@
2026-04-04 08:58:26 +00:00
sf
7f3953d504 Fix order of cpus in CPU_INFO_FOREACH
The cpus were put into the linked list in mostly inverted order during attach.
The linked list determines the order used by the CPU_INFO_FOREACH macros.
Order the linked list by ci_cpuid instead.

ok jca@ for most archs
"this should go in" deraadt@
2026-04-03 22:01:46 +00:00
kettenis
c9c58e0235 Stop printing the riscv,isa string; our code to do so is broken and the
string is now deprecated.  Instead change hw.model to be the CPU core
name for cpu0 like we do on other architectures.

We'll revisit printing CPU features for riscv64 in the future.

ok jca@, mlarkin@
2026-04-03 17:44:32 +00:00
kettenis
6159827a9d Add hw.blockcpu support for arm64. Here we classify CPU cores based on
their "capacity".  This a concept borrowed from the device tree standard
that indicates the nominal performance of a CPU core.  For ACPI machines
we use similar information from ACPI's Collaborative Processor Performance
Control (CPPC).  If performance is less than 30% of the fastest cores in
the same we classify them as L.  Between 30% and 80% we classify them as E.
And above 80% we classify them as P.  The CPU capacity is communicated to
userland though kstat(4).

ok deraadt@, jca@
2026-04-03 14:20:23 +00:00
jsing
a9ecf4b7f2 Remove lib/libssl/test.
This is all unhelpful historical cruft.

Discussed with tb@
2026-04-03 14:16:38 +00:00
op
a0d451d3eb fix memory leak in config_purge() when dealing CONFIG_PROTOS
original diff from CypherFox (openbsd at cypher-fox com), thanks!
slightly rearranged to be a bit smaller by me, but still equivalent.
2026-04-03 13:21:00 +00:00
jsing
760e21a767 Remove workaround for SSL 3.0/TLS 1.0 CBC vulnerability.
We no longer support TLSv1.0 and definitely do not support SSLv3 - remove
the empty fragments workaround for the CBC vulnerability in these
protocols.

ok kenjiro@ tb@
2026-04-03 13:11:00 +00:00
kirill
2fe63a4b3d usr.bin/patch: fix fd leak
From Renaud Allard

OK: op@
2026-04-03 12:58:40 +00:00
jsing
8da299b8d4 Ensure that we cannot negotiate TLSv1.1 or lower.
TLS versions prior to TLSv1.2 were disabled a while ago, however this
was done in the version handling code. Remove TLSv1.1 and earlier from
ssl_get_method() and add an explicit min version check in the legacy
client and server, to provide a stronger guarantee.

ok kenjiro@ tb@
2026-04-03 12:58:19 +00:00
kettenis
c37df6e24f Add smtgpio(4), a driver for the GPIO controller found on SpacemiT K1 SoCs.
ok jca@
2026-04-03 12:47:06 +00:00
jtt
130baa166a smtpd: fix using modifiers with partial expansion in format specifiers
Nits on the manpage and ok op@
2026-04-03 10:18:58 +00:00
nicm
e33be6833f Add some new mouse ranges called "control0" to "control9", will be used
for controls on floating panes, from Dane Jensen, with some bits from
Michael Grant.
2026-04-03 10:13:20 +00:00
op
39c267db61 remove dup block that tries to close tls client ca fd
it's already closed and fd set to -1 a few lines above.
diff from Marc Jorge (openbsd [at] cypher-fox com), thanks!
2026-04-03 09:36:21 +00:00
nicm
d23a905203 Missed a line from previous. 2026-04-03 09:18:24 +00:00
nicm
8dc426a4b6 Handle OSC 9;4 progress bar sequence and store in format variables, from
Eric Dorland in GitHub issue 4954.
2026-04-03 09:14:27 +00:00
nicm
05efa5c0da Increase b64_pton buffer to allow for Base64 without padding, from
Michal Majchrowicz.
2026-04-03 08:23:10 +00:00
jsing
97bf1c6c43 Fix min vs max in failure output. 2026-04-03 07:40:14 +00:00
jsing
3a30f3e4e9 Use DTLS_client_method() instead of DTLSv1_client_method(). 2026-04-03 07:37:52 +00:00
jsing
ac993068e4 Remove ssl_server_legacy_first_packet()
This has not been reachable since we made the TLSv1.3 stack the default
entry point - tls13_record_layer_read_record() will send a protocol
version alert and raise an error, which means we never transition into
the legacy stack.

ok kenjiro@
2026-04-03 07:26:20 +00:00
jsing
432cf71846 Mop up mac_packet.
This is a left over from when we accepted SSLv2 ClientHello messages.

ok kenjiro@
2026-04-03 07:17:36 +00:00
tb
cbee47e0be rpki-client: stop aligning variables in cert_parse_extensions()
While it looks a bit tidier if the variables are aligned with a tab in
the declarations, this is also a source of churn, so give up on this in
this function.
2026-04-03 02:41:03 +00:00
tb
cfe3850a6c rpki-client: const for ext and OID in cert_parse_extensions()
This is the last step of sprinkling const for OpenSSL 4. Move the extension
retrieved via X509_get_ext() to a const. The extension is first passed to
the simple X509_EXTENSION_get_object() getter and in the extension parsers
to X509V3_EXT_d2i(). The OID is passed to the const correct OBJ_obj2nid()
and OBJ_obj2text().

discussed with claudio
2026-04-03 02:36:38 +00:00
tb
8155187ede rpki-client: cast extension passed to X509_EXTENSION_get_object()
Again this is currently a noop which is needed since this simple getter
isn't const correct in OpenSSL < 4 and LibreSSL and because OpenSSL 4
fixed this.

discussed with claudio
2026-04-03 02:33:21 +00:00
tb
de6be2070b rpki-client: const correct cert extension handlers
The only reason the extension passed in wasn't const was X509V3_EXT_d2i(),
for which we now cast away const.

discussed with claudio
2026-04-03 02:23:33 +00:00
tb
03bf51787e rpki-client: cast extension passed to X509V3_EXT_d2i()
This function has never modified the extensions. It only uses the extension's
object (OID) to retrieve the X509_EXT_METHOD and then calls the appropriate
d2i handler on the extension's value. OpenSSL 4 correctly added a const
qualifier to this function.

The cast is a noop right now, but once we switch the extension handlers'
signatures to take a const, this will generate a warning due to passing a
const pointer to a non-const function for OpensSL < 4 and LibreSSL.
Annotate the cast for our future selves.

discussed with claudio
2026-04-03 02:20:03 +00:00
tb
9bf5475c8f rpki-client: rename certificate_policies() into cert_policies()
This is slightly more consistent with the remainder of the file.
All other extension handlers except those for ipAddrBlocks and
autonomousSysIds, which start with sbgp_ for historical reasons,
have a cert_ prefix.

discussed with claudio
2026-04-03 02:11:43 +00:00
tb
163ad7a20f rpki-client: cast away const for X509_get_X509_PUBKEY()
In cert_check_spki() the pubkey is a libcrypto-internal pointer hanging
off cert->x509, which is then passed to the very const-incorrect getter
X509_PUBKEY_get0_param(): that's a piece of art which hands back pointers
to things deeper down in the x509 - some of them const, some non-const.
OpenSSL 3 made its X509_PUBKEY argument const, but their X509_ALGOR **
still isn't. I don't believe they thought about this in #11894 as they
had a more important _cmp() vs _eq() bikeshed to sort out.

discussed with claudio
2026-04-03 02:10:10 +00:00
tb
b751ae36c1 rpki-client: make the X509_NAME *xissuer const
X509_get_issuer_name() isn't const correct in LibreSSL and OpenSSL < 4
and it returns a modifiable X509_NAME *. The xissuer is only passed to
X509_NAME_oneline() which takes a const X509_NAME, so it can be const.

discussed with claudio
2026-04-03 02:07:15 +00:00
yasuoka
5934184e11 Fix a memory leak in handling radius configuration. Diff from iij. 2026-04-03 00:09:24 +00:00
kili
00994d152b Fix leap year detection.
Found and initial diff from Alvar Penning, shorter diff from me (I
guess it's a matter of taste).

ok jca@, who would do it the same way.
2026-04-02 18:22:24 +00:00
deraadt
877bcf024a If a fd satisfies both POLLIN and POLLOUT in the same cycle, but the
POLLIN resulted in a file close, the POLLOUT runs incorrectly which
matters in the TLS context which attempts to read after free.
from James J. Lippard
ok millert
2026-04-02 17:23:04 +00:00