openbsd
7 months agoOn machines lacking xonly support hardware, we emulate xonly in the
deraadt [Fri, 5 Apr 2024 12:58:49 +0000 (12:58 +0000)]
On machines lacking xonly support hardware, we emulate xonly in the
copyin(9) layer below system calls, using a 4-entry lookup; the 4th
entry is libc.so text. We were assuming, or rather insisting, that
on all our architectures libc.so text is treated as xonly, even if
the linker was behind in it's game.
Since msyscall(2) is gone, kernel no longer has information about the
start,len of libc.so text segment.  But we can instead use the (same)
start,len range of pinsyscalls() instead for this purpose.
ld.so is passing the same text-range to the kernel in this position.
regression tests run by anton discovered that libc.so text had become
copyin-readable.
ok kettenis

7 months agoEsure the base,len range provided by ld.so is definately in the map.
deraadt [Fri, 5 Apr 2024 12:51:15 +0000 (12:51 +0000)]
Esure the base,len range provided by ld.so is definately in the map.
Being outside the map doesn't seem like it can do anything bad.
Discussed with kettenis

7 months agoPick newest session as documented, not oldest, from Magnus Gross.
nicm [Thu, 4 Apr 2024 22:44:40 +0000 (22:44 +0000)]
Pick newest session as documented, not oldest, from Magnus Gross.

7 months agoset right mode on ssh-agent at boot-time
semarie [Thu, 4 Apr 2024 16:00:51 +0000 (16:00 +0000)]
set right mode on ssh-agent at boot-time

which sthen@
ok deraadt@

7 months agoRemove incorrect function counts
tb [Thu, 4 Apr 2024 09:30:43 +0000 (09:30 +0000)]
Remove incorrect function counts

Vincent Lee spotted that I failed to update numbers that count how many
functions are documented here when removing {CRYPTO,OPENSSL}_realloc.
This isn't helpful information and nobody will remember to go look for
such numbers next time this page is adjusted, so remove the counts.

agreement from jmc

7 months agodrm/amdgpu: fix use-after-free bug
jsg [Thu, 4 Apr 2024 08:14:53 +0000 (08:14 +0000)]
drm/amdgpu: fix use-after-free bug

From Vitaly Prosyak
e87e08c94c9541b4e18c4c13f2f605935f512605 in linux-6.6.y/6.6.24
22207fd5c80177b860279653d017474b2812af5e in mainline linux

7 months agodrm/amd/display: Clear OPTC mem select on disable
jsg [Thu, 4 Apr 2024 08:13:21 +0000 (08:13 +0000)]
drm/amd/display: Clear OPTC mem select on disable

From Ilya Bakoulin
2ceddecdd0ef6fe7cdb31ec14ff2e26ed938fa4b in linux-6.6.y/6.6.24
b4e05bb1dec53fe28c3c88425aded824498666e5 in mainline linux

7 months agodrm/amd/display: Disconnect phantom pipe OPP from OPTC being disabled
jsg [Thu, 4 Apr 2024 08:11:23 +0000 (08:11 +0000)]
drm/amd/display: Disconnect phantom pipe OPP from OPTC being disabled

From George Shen
6a1cb68b9810f71644eb5d2d663e59083540bada in linux-6.6.y/6.6.24
7bdbfb4e36e34eb788e44f27666bf0a2b3b90803 in mainline linux

7 months agodrm/amd/display: Fix hang/underflow when transitioning to ODM4:1
jsg [Thu, 4 Apr 2024 08:09:03 +0000 (08:09 +0000)]
drm/amd/display: Fix hang/underflow when transitioning to ODM4:1

From Ilya Bakoulin
ae62f1dde66a6f0eee98defc4c7a346bd5acd239 in linux-6.6.y/6.6.24
e7b2b108cdeab76a7e7324459e50b0c1214c0386 in mainline linux

7 months agodrm/i915/gt: Reset queue_priority_hint on parking
jsg [Thu, 4 Apr 2024 08:07:39 +0000 (08:07 +0000)]
drm/i915/gt: Reset queue_priority_hint on parking

From Chris Wilson
3b031e4fcb2740988143c303f81f69f18ce86325 in linux-6.6.y/6.6.24
4a3859ea5240365d21f6053ee219bb240d520895 in mainline linux

7 months agodrm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()
jsg [Thu, 4 Apr 2024 08:05:26 +0000 (08:05 +0000)]
drm/i915: Do not match JSL in ehl_combo_pll_div_frac_wa_needed()

From Jonathon Hall
07c011e3351da3e5d4633ec1b259457b1626faa4 in linux-6.6.y/6.6.24
e41d769f1a7a1dc533c35ef7b366be3dbf432a1c in mainline linux

7 months agodrm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostly
jsg [Thu, 4 Apr 2024 08:03:27 +0000 (08:03 +0000)]
drm/i915/dsi: Go back to the previous INIT_OTP/DISPLAY_ON order, mostly

From Ville Syrjala
69fa0e23a6a3b30dc14b731c7e5818375aaa4da6 in linux-6.6.y/6.6.24
18846627ef1210dcd55d65342b055ea97a46ffff in mainline linux

7 months agoRecommit a better version of the removal of the F5 workaround
tb [Thu, 4 Apr 2024 08:02:21 +0000 (08:02 +0000)]
Recommit a better version of the removal of the F5 workaround

Unlike for previous TLS versions, TLSv1.3 servers can send the supported
groups extension to inform a client of the server's preferences. The
intention is that a client can adapt for subsequent commits. We ignore
this info for now, but sthen ran into java-based servers that do this.

Thus, rejecting the extension outright was incorrect. Instead, only allow
the extension in TLSv1.3 encrypted extensions. This way the F5 workaround
is also disabled, but we continue to interoperate with TLSv1.3 servers that
do follow the last paragraph of RFC 8446, section 4.2.7.

This mostly adjusts outdated/misleading comments.

ok jsing sthen

7 months agodrm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()
jsg [Thu, 4 Apr 2024 08:00:22 +0000 (08:00 +0000)]
drm/i915/bios: Tolerate devdata==NULL in intel_bios_encoder_supports_dp_dual_mode()

From Ville Syrjala
a891add409e3bc381f4f68c2ce9d953f1865cb1f in linux-6.6.y/6.6.24
32e39bab59934bfd3f37097d4dd85ac5eb0fd549 in mainline linux

7 months agodrm/i915/hwmon: Fix locking inversion in sysfs getter
jsg [Thu, 4 Apr 2024 07:58:45 +0000 (07:58 +0000)]
drm/i915/hwmon: Fix locking inversion in sysfs getter

From Janusz Krzysztofik
510c5f5e4837cab803c4f594c5f79783ff7b463d in linux-6.6.y/6.6.24
b212b79768ccde74429f872c37618c543fa11333 in mainline linux

7 months agodrm/amdgpu: fix deadlock while reading mqd from debugfs
jsg [Thu, 4 Apr 2024 07:56:50 +0000 (07:56 +0000)]
drm/amdgpu: fix deadlock while reading mqd from debugfs

From Johannes Weiner
197f6d6987c55860f6eea1c93e4f800c59078874 in linux-6.6.y/6.6.24
8678b1060ae2b75feb60b87e5b75e17374e3c1c5 in mainline linux

7 months agodrm/amdkfd: fix TLB flush after unmap for GFX9.4.2
jsg [Thu, 4 Apr 2024 07:53:08 +0000 (07:53 +0000)]
drm/amdkfd: fix TLB flush after unmap for GFX9.4.2

From Eric Huang
2684393685f7f3e264a55d4b55282e780bc2376d in linux-6.6.y/6.6.24
1210e2f1033dc56b666c9f6dfb761a2d3f9f5d6c in mainline linux

7 months agoRevert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays...
jsg [Thu, 4 Apr 2024 07:51:23 +0000 (07:51 +0000)]
Revert "drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR"

From Harry Wentland
78516979792d4bf890e1df24c7f425ebe920ad29 in linux-6.6.y/6.6.24
78aca9ee5e012e130dbfbd7191bc2302b0cf3b37 in mainline linux

7 months agodrm/amd/display: handle range offsets in VRR ranges
jsg [Thu, 4 Apr 2024 07:48:59 +0000 (07:48 +0000)]
drm/amd/display: handle range offsets in VRR ranges

From Alex Deucher
23b99c7bf6ecf643a4a37bd98eeae81323aef6f8 in linux-6.6.y/6.6.24
937844d661354bf142dc1c621396fdab10ecbacc in mainline linux

7 months agodrm/i915: Don't explode when the dig port we don't have an AUX CH
jsg [Thu, 4 Apr 2024 07:47:26 +0000 (07:47 +0000)]
drm/i915: Don't explode when the dig port we don't have an AUX CH

From Ville Syrjala
e21fee1035b9172fb7dc0e77692df7ebdbfce425 in linux-6.6.y/6.6.24
0b385be4c3ccd5636441923d7cad5eda6b4651cb in mainline linux

7 months agodrm/i915: Check before removing mm notifier
jsg [Thu, 4 Apr 2024 07:43:15 +0000 (07:43 +0000)]
drm/i915: Check before removing mm notifier

From Nirmoy Das
a30c36bc0cfc32ec3662408e6a5cdf8a809fde51 in linux-6.6.y/6.6.24
01bb1ae35006e473138c90711bad1a6b614a1823 in mainline linux

7 months agodrm/amdgpu/pm: Fix the error of pwm1_enable setting
jsg [Thu, 4 Apr 2024 07:39:57 +0000 (07:39 +0000)]
drm/amdgpu/pm: Fix the error of pwm1_enable setting

From Ma Jun
6f3c1dabe8d014ad95b72fc56276d82a6f5e6ab3 in linux-6.6.y/6.6.24
0dafaf659cc463f2db0af92003313a8bc46781cd in mainline linux

7 months agodrm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found
jsg [Thu, 4 Apr 2024 07:38:34 +0000 (07:38 +0000)]
drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found

From Mario Limonciello
95232806972adab87d6979256df37f5ceb1ad561 in linux-6.6.y/6.6.24
2f14c0c8cae8e9e3b603a3f91909baba66540027 in mainline linux

7 months agodrm/bridge: add ->edid_read hook and drm_bridge_edid_read()
jsg [Thu, 4 Apr 2024 07:35:50 +0000 (07:35 +0000)]
drm/bridge: add ->edid_read hook and drm_bridge_edid_read()

From Jani Nikula
2b6aaf7b193be2bfa4e1af90c0d96e78a80aef69 in linux-6.6.y/6.6.24
d807ad80d811ba0c22adfd871e2a46491f80d6e2 in mainline linux

7 months agodrm/ttm: Make sure the mapped tt pages are decrypted when needed
jsg [Thu, 4 Apr 2024 07:33:22 +0000 (07:33 +0000)]
drm/ttm: Make sure the mapped tt pages are decrypted when needed

From Zack Rusin
de125efb3bae7720d10364a9ab6785466e4e2461 in linux-6.6.y/6.6.24
71ce046327cfd3aef3f93d1c44e091395eb03f8f in mainline linux

7 months agodrm/amd/display: Fix noise issue on HDMI AV mute
jsg [Thu, 4 Apr 2024 07:29:56 +0000 (07:29 +0000)]
drm/amd/display: Fix noise issue on HDMI AV mute

From Leo Ma
066bbc4306445f16e529a13a6e8d05ec6074416e in linux-6.6.y/6.6.24
69e3be6893a7e668660b05a966bead82bbddb01d in mainline linux

7 months agodrm/amd/display: Return the correct HDCP error code
jsg [Thu, 4 Apr 2024 07:27:46 +0000 (07:27 +0000)]
drm/amd/display: Return the correct HDCP error code

From Rodrigo Siqueira
c7c855fd3d5af01496aaa8be93a1e9811166cf11 in linux-6.6.y/6.6.24
e64b3f55e458ce7e2087a0051f47edabf74545e7 in mainline linux

7 months agodrm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag
jsg [Thu, 4 Apr 2024 07:26:19 +0000 (07:26 +0000)]
drm/amdgpu: amdgpu_ttm_gart_bind set gtt bound flag

From Philip Yang
6fcd12cb90888ef2d8af8d4c04e913252eee4ef3 in linux-6.6.y/6.6.24
6c6064cbe58b43533e3451ad6a8ba9736c109ac3 in mainline linux

7 months agodrm/panel: do not return negative error codes from drm_panel_get_modes()
jsg [Thu, 4 Apr 2024 07:23:40 +0000 (07:23 +0000)]
drm/panel: do not return negative error codes from drm_panel_get_modes()

From Jani Nikula
a686732df6cecc3561595e6ce7a962a0121eed00 in linux-6.6.y/6.6.24
fc4e97726530241d96dd7db72eb65979217422c9 in mainline linux

7 months agodrm/probe-helper: warn about negative .get_modes()
jsg [Thu, 4 Apr 2024 07:20:55 +0000 (07:20 +0000)]
drm/probe-helper: warn about negative .get_modes()

From Jani Nikula
12bbe2c25cdb571190d523fd814e7696964a84d9 in linux-6.6.y/6.6.24
7af03e688792293ba33149fb8df619a8dff90e80 in mainline linux

7 months agoadd pgprot_decrypted() for 6.6.24 drm
jsg [Thu, 4 Apr 2024 05:43:43 +0000 (05:43 +0000)]
add pgprot_decrypted() for 6.6.24 drm

7 months agoadd cc_platform_has() for 6.6.24 drm
jsg [Thu, 4 Apr 2024 05:38:35 +0000 (05:38 +0000)]
add cc_platform_has() for 6.6.24 drm

7 months agotzset_basic: only call issetugid(2) if TZ has changed
millert [Thu, 4 Apr 2024 02:20:01 +0000 (02:20 +0000)]
tzset_basic: only call issetugid(2) if TZ has changed
If we are just going to return without parsing TZ, there is no need
to call issetugid(2) first.  We only need to call issetugid(2) the
first time TZ is checked or when the value of TZ has changed.
Previously, we called issetugid(2) for every call to the functions
described by localtime(3).  OK deraadt@

7 months agoStopping grabbing the kernel lock in kbind(2).
kettenis [Wed, 3 Apr 2024 22:21:48 +0000 (22:21 +0000)]
Stopping grabbing the kernel lock in kbind(2).

ok mpi@

7 months agoInitialize earlier macppc's and powerpc64's pmap_hash_lock
gkoehler [Wed, 3 Apr 2024 19:30:59 +0000 (19:30 +0000)]
Initialize earlier macppc's and powerpc64's pmap_hash_lock

At boot, the powerpc64 kernel was calling
  pmap_bootstrap -> pmap_kenter_pa -> mtx_enter(&pmap_hash_lock)
before it did
  pmap_init -> mtx_init(&pmap_hash_lock, IPL_HIGH)

Change from mtx_init to MUTEX_INITIALIZER.  This allows an option
WITNESS kernel to boot without warning of an uninitialized mutex.

Also change macppc's pmap_hash_lock from __ppc_lock_init to
PPC_LOCK_INITIALIZER, though WITNESS doesn't see this lock.

ok mpi@

7 months agopmap_virtual_space() and pmap_steal_memory() are mutually exclusive, so
miod [Wed, 3 Apr 2024 18:43:32 +0000 (18:43 +0000)]
pmap_virtual_space() and pmap_steal_memory() are mutually exclusive, so
make sure only one of them is prototyped and only one of them is implemented.
ok mpi@ kettenis@

7 months agoReuse the timeout from struct scsi_xfer rather than declaring one in
miod [Wed, 3 Apr 2024 18:41:38 +0000 (18:41 +0000)]
Reuse the timeout from struct scsi_xfer rather than declaring one in
struct ncr53c9x_ecb.

When the scsi_xfer timeout was introduced *cough* 23 years ago, SCSI drivers
were progressively updated to use this, but for some reason that driver got
missed.

ok dlg@ krw@

7 months agoChange ipmi(4)'s taskq from IPL_NONE to IPL_MPFLOOR
gkoehler [Wed, 3 Apr 2024 18:32:47 +0000 (18:32 +0000)]
Change ipmi(4)'s taskq from IPL_NONE to IPL_MPFLOOR

The IPL_NONE mutex didn't block interrupts that can cause a powerpc64
kernel with option WITNESS to "panic: acquiring blockable sleep lock
with spinlock or critical section held (kernel_lock) &kernel_lock".

ok mpi@

7 months agosync
deraadt [Wed, 3 Apr 2024 15:21:03 +0000 (15:21 +0000)]
sync

7 months agoSwitch one of the tcpmd5 passwords over to use the hex key instead.
claudio [Wed, 3 Apr 2024 08:58:55 +0000 (08:58 +0000)]
Switch one of the tcpmd5 passwords over to use the hex key instead.
This way both modes are tested.

7 months agoRewrite str2key() to not use strtoul() to convert 2 hexdigits into one
claudio [Wed, 3 Apr 2024 08:57:26 +0000 (08:57 +0000)]
Rewrite str2key() to not use strtoul() to convert 2 hexdigits into one
char. Instead use a simple function to do the conversion per nibble.
OK deraadt@ tb@

7 months agoSince ssh-agent(1) is only readable by root by now, use ssh(1) while
anton [Wed, 3 Apr 2024 06:01:11 +0000 (06:01 +0000)]
Since ssh-agent(1) is only readable by root by now, use ssh(1) while
generating data in tests.

7 months agoReading https://github.com/Geal/rust-syslog/issues/79, I came to a
deraadt [Wed, 3 Apr 2024 04:36:53 +0000 (04:36 +0000)]
Reading https://github.com/Geal/rust-syslog/issues/79, I came to a
related conclusion that our syslog_r should not stomp on errno.
The errno being returned from sendsyslog() isn't exactly compatible
with the what a legacy syslog_r() would do here anyways, and it is
better to just be void and non-stomping;
ok millert bluhm

7 months agoFix warning about DistributionPointName type
tb [Wed, 3 Apr 2024 04:20:13 +0000 (04:20 +0000)]
Fix warning about DistributionPointName type

The warning incorrectly mentioned GEN_OTHERNAME, while this is about
fullName vs nameRelativeToCRLIssuer. Also add a comment to indicate
that there's no enum or macros obviate the meaning of the magic 0.

ok claudio job

7 months agoAdd ci_cpuid_level and ci_vendor holding the per-CPU basic cpuid
guenther [Wed, 3 Apr 2024 02:01:21 +0000 (02:01 +0000)]
Add ci_cpuid_level and ci_vendor holding the per-CPU basic cpuid
level and a numeric mapping of the cpu vendor, both from CPUID(0).
Convert the general use of strcmp(cpu_vendor) to simple numeric
tests of ci_vendor.  Track the minimum of all ci_cpuid_level in the
cpuid_level global and continue to use that for what we vmm exposes.

AMD testing help matthieu@ krw@
ok miod@ deraadt@ cheloha@

7 months agoBackout previous commit (intending that libressl client rejects a supported
sthen [Tue, 2 Apr 2024 22:50:54 +0000 (22:50 +0000)]
Backout previous commit (intending that libressl client rejects a supported
groups extension from the server). It triggers 'CONNECT_CR_SRVR_HELLO:tlsv1
alert decode error' when connecting to a (modern) java server (tomcat 10.1.18
on openjdk 17.0.10).

"please revert" tb@

7 months agoImplement and enable TSO in vmx(4)
jan [Tue, 2 Apr 2024 20:59:48 +0000 (20:59 +0000)]
Implement and enable TSO in vmx(4)

Tested with IPv4/IPv6 and vlan(4).

ok jmatthew@

7 months agoAdd check to make sure EAP header length matches expected payload length.
tobhe [Tue, 2 Apr 2024 19:58:28 +0000 (19:58 +0000)]
Add check to make sure EAP header length matches expected payload length.

ok markus@ yasuoka@

7 months agoImplement SO_ACCEPTCONN in getsockopt(2)
claudio [Tue, 2 Apr 2024 14:23:15 +0000 (14:23 +0000)]
Implement SO_ACCEPTCONN in getsockopt(2)
Requested by robert@
OK mvs@ millert@ deraadt@

7 months agoOops, incorrect hex conversion spotted by claudio. While here try to
deraadt [Tue, 2 Apr 2024 12:22:38 +0000 (12:22 +0000)]
Oops, incorrect hex conversion spotted by claudio.  While here try to
improve how it reads a bit better.  Surprising the regression tests
didn't spot this error, maybe it fails to roundtrip the values.

7 months agoRemove wrong "temporary udp error" comment in filt_so{read,write}(). Not
mvs [Tue, 2 Apr 2024 12:21:39 +0000 (12:21 +0000)]
Remove wrong "temporary udp error" comment in filt_so{read,write}(). Not
only udp(4) sockets set and check `so_error'.

No functional changes.

ok bluhm

7 months agoRemove unused file
claudio [Tue, 2 Apr 2024 10:04:28 +0000 (10:04 +0000)]
Remove unused file

7 months agofor parse_ipqos(), use strtonum() instead of mostly idiomatic strtoul(),
deraadt [Tue, 2 Apr 2024 10:02:08 +0000 (10:02 +0000)]
for parse_ipqos(), use strtonum() instead of mostly idiomatic strtoul(),
but wow it's so gross.
ok djm

7 months agocan shortcut by returning strtonum() value directly; ok djm
deraadt [Tue, 2 Apr 2024 09:56:58 +0000 (09:56 +0000)]
can shortcut by returning strtonum() value directly; ok djm

7 months agorewrite convtime() to use a isdigit-scanner and strtonum() instead of
deraadt [Tue, 2 Apr 2024 09:52:14 +0000 (09:52 +0000)]
rewrite convtime() to use a isdigit-scanner and strtonum() instead of
strange strtoul can might be fooled by garage characters.
passes regress/usr.bin/ssh/unittests/misc
ok djm

7 months agoRemove unused ptr[3] char array in pkcs11_decode_hex.
claudio [Tue, 2 Apr 2024 09:48:24 +0000 (09:48 +0000)]
Remove unused ptr[3] char array in pkcs11_decode_hex.
OK deraadt@

7 months agoReplace non-idiomatic strtoul(, 16) to parse a region of 2-character
deraadt [Tue, 2 Apr 2024 09:32:28 +0000 (09:32 +0000)]
Replace non-idiomatic strtoul(, 16) to parse a region of 2-character
hex sequences with a low-level replacement designed just for the task.
ok djm

7 months agoUse strtonum() instead of severely non-idomatic strtoul()
deraadt [Tue, 2 Apr 2024 09:29:31 +0000 (09:29 +0000)]
Use strtonum() instead of severely non-idomatic strtoul()
In particular this will now reject trailing garbage, ie. '12garbage'.
ok djm

7 months agofix unintended sizeof(pointer) introduced in rev 1.41
jsg [Tue, 2 Apr 2024 08:51:06 +0000 (08:51 +0000)]
fix unintended sizeof(pointer) introduced in rev 1.41
found with noderef.cocci, ok deraadt@

7 months agoDelete the msyscall mechanism entirely, since mimmutable+pinsyscalls has
deraadt [Tue, 2 Apr 2024 08:39:16 +0000 (08:39 +0000)]
Delete the msyscall mechanism entirely, since mimmutable+pinsyscalls has
replaced it with a more strict mechanism, which happens to be lockless O(1)
rather than micro-lock O(1)+O(log N).  Also nop-out the sys_msyscall(2) guts,
but leave the syscall around for a bit longer so that people can build through
it, since ld.so(1) still wants to call it.

7 months agoremove useless whitespace; from Jia Tan
deraadt [Tue, 2 Apr 2024 08:27:22 +0000 (08:27 +0000)]
remove useless whitespace; from Jia Tan

7 months agoalso relink ssh-agent
deraadt [Tue, 2 Apr 2024 08:21:04 +0000 (08:21 +0000)]
also relink ssh-agent

7 months agosndiod: Migrate clients upon watchdog timeout
ratchov [Tue, 2 Apr 2024 05:32:10 +0000 (05:32 +0000)]
sndiod: Migrate clients upon watchdog timeout

When -F is used, fixes the difference in behavior between watchdog
timer expiry and other errors.

7 months agosndiod: Fix confusion between the slot and ctlslot pointers
ratchov [Tue, 2 Apr 2024 05:21:32 +0000 (05:21 +0000)]
sndiod: Fix confusion between the slot and ctlslot pointers

Fixes crash when the device is disconnected and the clients are not
migrated to another device.

7 months agoSimplify ecx_cms_sign_or_verify() using X509_ALGOR_set0_by_nid()
tb [Tue, 2 Apr 2024 04:04:07 +0000 (04:04 +0000)]
Simplify ecx_cms_sign_or_verify() using X509_ALGOR_set0_by_nid()

ok jsing

7 months agoinit var to fix missing symtab section path
jsg [Mon, 1 Apr 2024 22:49:04 +0000 (22:49 +0000)]
init var to fix missing symtab section path
found by smatch, ok mpi@

7 months agoAdvertise SMTPUTF8 and 8BITMIME extensions in EHLO.
millert [Mon, 1 Apr 2024 21:09:44 +0000 (21:09 +0000)]
Advertise SMTPUTF8 and 8BITMIME extensions in EHLO.
Fixes potential interoperability issues when the real MTA
supports those extensions.  From Arnt Gulbrandsen, OK benno@

7 months agopinsyscalls appeared in 7.5
benno [Mon, 1 Apr 2024 19:29:16 +0000 (19:29 +0000)]
pinsyscalls appeared in 7.5
ok deraadt

7 months agoThe regress/sys/arch/amd64/fpu/fenv.S utility issues "direct" syscalls
anton [Mon, 1 Apr 2024 18:52:34 +0000 (18:52 +0000)]
The regress/sys/arch/amd64/fpu/fenv.S utility issues "direct" syscalls
which does not go through libc. This is no longer possible due to
pinsyscalls(2). Borrow the PINSYSCALL asm macro from libc/arch/DEFS.h to
setup a .openbsd.syscalls section.

7 months agosync
deraadt [Mon, 1 Apr 2024 18:10:47 +0000 (18:10 +0000)]
sync

7 months agoalso create a relink kit for ssh-agent, since it is a long-running setgid
deraadt [Mon, 1 Apr 2024 15:50:17 +0000 (15:50 +0000)]
also create a relink kit for ssh-agent, since it is a long-running setgid
program carrying keys with some (not very powerful) communication channels.
solution for testing the binary from dtucker.  agreement from djm.
Will add it into /etc/rc in a few days.

7 months agonew-style relink kit for sshd. The old scheme created a Makefile by
deraadt [Mon, 1 Apr 2024 15:48:16 +0000 (15:48 +0000)]
new-style relink kit for sshd.  The old scheme created a Makefile by
concatenating two Makefiles and was incredibly fragile.  In the new way
a narrow-purposed install.sh script is created and shipped with the objects.
A recently commited /etc/rc script understands these files.

7 months agoThe previous unveil feature test assumed that having the
florian [Mon, 1 Apr 2024 14:24:30 +0000 (14:24 +0000)]
The previous unveil feature test assumed that having the
unistd.h header file was enough. The new feature tests also
requires that the required unveil system calls are
supported.

7 months agoAdd some #ifdef XML_TESTING to the libexpat tests.
bluhm [Mon, 1 Apr 2024 13:46:06 +0000 (13:46 +0000)]
Add some #ifdef XML_TESTING to the libexpat tests.

Upstream builds special libexpat objects for testing with an internal
flag and counter.  As OpenBSD does test the installed production
library, disable tests that depend on special options.  Use the
same define that activates the test code in the library.  Without
this, regress would not compile.

7 months agoUpdate libexpat to version 2.6.2.
bluhm [Mon, 1 Apr 2024 13:30:41 +0000 (13:30 +0000)]
Update libexpat to version 2.6.2.

The fix for CVE-2024-28757 has been applied earlier.  Relevant for
OpenBSD are bug fixes #839 #841, and other change #829.  No library
bump is necessary.

OK deraadt@

7 months agoMention that port can be specified as 0 in some situations, so that the
deraadt [Mon, 1 Apr 2024 12:40:18 +0000 (12:40 +0000)]
Mention that port can be specified as 0 in some situations, so that the
system will allocate a port.

7 months agoEnforce the pinsyscall rules on non-static/ld.so/libc.so text segments
deraadt [Mon, 1 Apr 2024 12:00:15 +0000 (12:00 +0000)]
Enforce the pinsyscall rules on non-static/ld.so/libc.so text segments
also. Previously this was handled by msyscall(2), but that was just
removed and anton fond out a piece of enforcement was missed..

7 months agoAdd clocks for the RK3588 PWM controller.
patrick [Mon, 1 Apr 2024 11:16:11 +0000 (11:16 +0000)]
Add clocks for the RK3588 PWM controller.

ok kettenis@

7 months agosync
deraadt [Mon, 1 Apr 2024 05:47:03 +0000 (05:47 +0000)]
sync

7 months agoDelete 108 lines of ASM from vmx_enter_guest() that predated lots
guenther [Mon, 1 Apr 2024 05:11:49 +0000 (05:11 +0000)]
Delete 108 lines of ASM from vmx_enter_guest() that predated lots
of later enhancements, removing the save/restore of flags, selectors,
and MSRs: flags are caller-saved and don't need restoring while
selectors and MSRs are auto-restored.  The FSBASE, GSBASE, and
KERNELGSBASE MSRs just need the correct values set with vmwrite()
in the "on new CPU?" block of vcpu_run_vmx().

Also, only rdmsr(MSR_MISC_ENABLE) once in vcpu_reset_regs_vmx(),
give symbolic names to the exit-load MSR slots, eliminate
VMX_NUM_MSR_STORE, and #if 0 the vc_vmx_msr_entry_load_{va,pa} code
and definitions as unused.

ok dv@

7 months agoEnable rge(4).
kettenis [Sun, 31 Mar 2024 19:17:53 +0000 (19:17 +0000)]
Enable rge(4).

7 months agoCombine route_cache() and rtalloc_mpath() in new route_mpath().
bluhm [Sun, 31 Mar 2024 15:53:12 +0000 (15:53 +0000)]
Combine route_cache() and rtalloc_mpath() in new route_mpath().

Fill and check the cache and call rtalloc_mpath() together.  Then
the caller of route_mpath() does not have to care about the uint32_t
*src pointer and just pass struct in_addr.  All the conversions are
done inside the functions.

A previous version of this diff was backed out.  There was an
additional rtisvalid() in rtalloc_mpath() that prevented packet
output via interfaces that were not up.  Now the route in the cache
has to be valid, but after new lookup, rtalloc_mpath() may return
invalid routes.  This generates less errors in userland an preserves
existing behavior.

OK sashan@

7 months agoAllow listen(2) only on sockets of type SOCK_STREAM or SOCK_SEQPACKET.
mvs [Sun, 31 Mar 2024 14:01:28 +0000 (14:01 +0000)]
Allow listen(2) only on sockets of type SOCK_STREAM or SOCK_SEQPACKET.
listen(2) man(1) page clearly prohibits sockets of other types.

Reported-by: syzbot+00450333592fcd38c6fe@syzkaller.appspotmail.com
ok bluhm

7 months agoMark `so_rcv' sockbuf of udp(4) sockets as SB_OWNLOCK.
mvs [Sun, 31 Mar 2024 13:50:00 +0000 (13:50 +0000)]
Mark `so_rcv' sockbuf of udp(4) sockets as SB_OWNLOCK.

sbappend*() and soreceive() of SB_MTXLOCK marked sockets uses `sb_mtx'
mutex(9) for protection, meanwhile buffer usage check and corresponding
sbwait() sleep still serialized by solock(). Mark udp(4) as SB_OWNLOCK
to avoid solock() serialization and rely to `sb_mtx' mutex(9). The
`sb_state' and `sb_flags' modifications must be protected by `sb_mtx'
too.

ok bluhm

7 months agoRegen
miod [Sun, 31 Mar 2024 10:14:46 +0000 (10:14 +0000)]
Regen

7 months agoFix /dev/bio major.
miod [Sun, 31 Mar 2024 10:14:35 +0000 (10:14 +0000)]
Fix /dev/bio major.

7 months agoRemove long dead isa-on-powerpc leftovers.
miod [Sun, 31 Mar 2024 09:49:33 +0000 (09:49 +0000)]
Remove long dead isa-on-powerpc leftovers.

7 months agoStop referring to dead-since-30-years gatherstats() in comments.
miod [Sun, 31 Mar 2024 07:23:29 +0000 (07:23 +0000)]
Stop referring to dead-since-30-years gatherstats() in comments.

7 months agoPrevent a recursion inside wakeup(9) when scheduler tracepoints are enabled.
mpi [Sat, 30 Mar 2024 13:33:20 +0000 (13:33 +0000)]
Prevent a recursion inside wakeup(9) when scheduler tracepoints are enabled.

Tracepoints like "sched:enqueue" and "sched:unsleep" were called from inside
the loop iterating over sleeping threads as part of wakeup_proc().  When such
tracepoints were enabled they could result in another wakeup(9) possibly
corrupting the sleepqueue.

Rewrite wakeup(9) in two stages, first dequeue threads from the sleepqueue then
call setrunnable() and possible tracepoints for each of them.

This requires moving unsleep() outside of setrunnable() because it messes with
the sleepqueue.

ok claudio@

7 months agoDocument that pmemrange control data are protected by `uvm.fpageqlock'.
mpi [Sat, 30 Mar 2024 12:47:47 +0000 (12:47 +0000)]
Document that pmemrange control data are protected by `uvm.fpageqlock'.

7 months agoregen
jsg [Sat, 30 Mar 2024 11:13:17 +0000 (11:13 +0000)]
regen

7 months agoadd ids seen on Milk-V Pioneer
jsg [Sat, 30 Mar 2024 11:12:20 +0000 (11:12 +0000)]
add ids seen on Milk-V Pioneer

but not the Cadence ppb, it seems unlikely they asked Cadence to use it
ok deraadt@ kettenis@

7 months agoUse illop1 as failure instruction in the locore gap file.
miod [Sat, 30 Mar 2024 10:43:38 +0000 (10:43 +0000)]
Use illop1 as failure instruction in the locore gap file.

7 months agoPrefer illop1 rather than nop for text padding in the ld.so linker script.
miod [Sat, 30 Mar 2024 10:42:26 +0000 (10:42 +0000)]
Prefer illop1 rather than nop for text padding in the ld.so linker script.

7 months agoProvide illop1 instruction encoding as TRAP.
miod [Sat, 30 Mar 2024 10:41:17 +0000 (10:41 +0000)]
Provide illop1 instruction encoding as TRAP.

7 months agoAdd missing LCRYPTO_ALIAS()
tb [Sat, 30 Mar 2024 10:10:58 +0000 (10:10 +0000)]
Add missing LCRYPTO_ALIAS()

HMAC_CTX_reset() and HMAC_Init() had missing LCRYPTO_ALIAS().

ok beck jsing

7 months agoFix LCRYPTO_UNUSED() in namespace builds
tb [Sat, 30 Mar 2024 10:09:43 +0000 (10:09 +0000)]
Fix LCRYPTO_UNUSED() in namespace builds

If namespace builds are enabled, static links don't work due to missing
_lcry_* symbols. Make LCRYPTO_UNUSED() match LCRYPTO_USED() with an extra
deprecated attribute. This way we can remove the !LIBRESSL_INTERNAL #ifdef
wrapping in public headers.

ok beck joshua

7 months agoInitialize quic_method in tlsexttest
tb [Sat, 30 Mar 2024 09:53:41 +0000 (09:53 +0000)]
Initialize quic_method in tlsexttest

This is only there to pretend a quic method was set on the SSL, but
apparently some compilers warn about an uninitialized variable.

from Christian Andersen

7 months agoReplace silly test1_exit() with exit()
tb [Sat, 30 Mar 2024 09:49:59 +0000 (09:49 +0000)]
Replace silly test1_exit() with exit()

Appeases some compiler.

from Christian Andersen

7 months agoRemove call to lh_FUNCTION_free()
tb [Sat, 30 Mar 2024 09:41:25 +0000 (09:41 +0000)]
Remove call to lh_FUNCTION_free()

This is a wrapper around lh_free() which is already tested.

From Christian Andersen