openbsd
3 months agoMove the signal related kqueue filters to kern_event.c.
claudio [Mon, 29 Jul 2024 12:42:53 +0000 (12:42 +0000)]
Move the signal related kqueue filters to kern_event.c.

Since proc and signal filters share the same klist it makes sense
to keep them together.
OK mvs@

3 months agoUse shared net lock instead of exclusive when frag6 calls icmp6_error().
bluhm [Mon, 29 Jul 2024 12:41:30 +0000 (12:41 +0000)]
Use shared net lock instead of exclusive when frag6 calls icmp6_error().

OK mvs@ a while ago as part of a larger diff

3 months agoadd SBZ
patrick [Mon, 29 Jul 2024 12:32:02 +0000 (12:32 +0000)]
add SBZ

3 months agoRemove `sb_sel' from sobuf_print() output, no sense to print "...".
mvs [Mon, 29 Jul 2024 10:35:22 +0000 (10:35 +0000)]
Remove `sb_sel' from sobuf_print() output, no sense to print "...".

ok bluhm

3 months agoSync with sys/proc.h after P_CONTINUED -> PS_CONTINUED change.
claudio [Mon, 29 Jul 2024 09:50:30 +0000 (09:50 +0000)]
Sync with sys/proc.h after P_CONTINUED -> PS_CONTINUED change.
OK mpi@

3 months agoReplace per thread P_CONTINUED with per process PS_CONTINUED flag
claudio [Mon, 29 Jul 2024 09:49:49 +0000 (09:49 +0000)]
Replace per thread P_CONTINUED with per process PS_CONTINUED flag

dowait6() can only look at per process state so switch this over.
Right now SIGCONT handling in ptsignal is recursive and not quite
right but this is a step in the right direction. It fixes dowait6()
handling for multithreaded processes where the main thread exited.

OK mpi@

3 months agotypo: regresss -> regress
tb [Mon, 29 Jul 2024 06:05:31 +0000 (06:05 +0000)]
typo: regresss -> regress

3 months agodrm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()
jsg [Mon, 29 Jul 2024 01:26:15 +0000 (01:26 +0000)]
drm/amdgpu: Fix signedness bug in sdma_v4_0_process_trap_irq()

From Dan Carpenter
4edb0a84e6b32e75dc9bd6dd085b2c2ff19ec287 in linux-6.6.y/6.6.43
6769a23697f17f9bf9365ca8ed62fe37e361a05a in mainline linux

3 months agoregen
jsg [Mon, 29 Jul 2024 01:18:32 +0000 (01:18 +0000)]
regen

3 months agoadd "Strix Point" APU device id, and another Navi 31
jsg [Mon, 29 Jul 2024 01:17:53 +0000 (01:17 +0000)]
add "Strix Point" APU device id, and another Navi 31

150e rev c1 is Radeon 880M/890M
150e rev c4 is Radeon 880M/890M
150e rev c6 is Radeon 890M
744a rev 00 is Radeon Pro W7900 Dual Slot

found in AMD Software: Adrenalin Edition 24.7.1

3 months agoThe dash must not come first in the getopt(3) string
kn [Sun, 28 Jul 2024 21:44:42 +0000 (21:44 +0000)]
The dash must not come first in the getopt(3) string

Broken/sorted in previous -u addition, fix/move it to the end.
By tb

3 months agopwd_mkdb: limit db entries to _PW_BUF_LEN to match libc
millert [Sun, 28 Jul 2024 19:13:26 +0000 (19:13 +0000)]
pwd_mkdb: limit db entries to _PW_BUF_LEN to match libc

Otherwise, it is possible to create a passwd(5) entry that is too
large for getpwent(3), which ignores database entries larger than
_PW_BUF_LEN.  This adds a check in db_store() so that we do not
store an entry larger than getpwent(3) can read.  Callers of
pwd_mkdb(8), typically via pw_mkdb(3), already check for failure.

In most cases, the checks in chpass(1) will prevent a user from
creating an entry that is too large by changing their gecos field.
However, it is only when storing the db record that we know the
true size.

OK deraadt@

3 months agoblock SIGHUP in the same places where SIGCHLD is blocked to protect
deraadt [Sun, 28 Jul 2024 15:31:22 +0000 (15:31 +0000)]
block SIGHUP in the same places where SIGCHLD is blocked to protect
the process lists, because the SIGHUP handler looks at them (and
it is very difficult to rewrite the that handler a different way)
ok millert

3 months agoSupport "-u name" to remove variable from environment
kn [Sun, 28 Jul 2024 10:08:44 +0000 (10:08 +0000)]
Support "-u name" to remove variable from environment

OK aisha millert
Feedback jmc

3 months agoAllow for another TEMPerHUM version. From Sebastiaan Indesteege.
miod [Sat, 27 Jul 2024 17:31:49 +0000 (17:31 +0000)]
Allow for another TEMPerHUM version. From Sebastiaan Indesteege.

3 months agoUse ".arch_extension fp" for the signal trampoline since it saves and
kettenis [Sat, 27 Jul 2024 13:31:26 +0000 (13:31 +0000)]
Use ".arch_extension fp" for the signal trampoline since it saves and
restores the FPU registers (running in userland).  And add an
".arch_extension nofp" afterwards such that the remaining kernel code
can't touch the FPU.

Needed to build with clang18

ok jsg@

3 months agosync
deraadt [Sat, 27 Jul 2024 03:26:12 +0000 (03:26 +0000)]
sync

3 months agoshorten strings by removing pointless information
deraadt [Sat, 27 Jul 2024 03:26:04 +0000 (03:26 +0000)]
shorten strings by removing pointless information
ok jsg

3 months agoSort and regularize all the ktrstruct() macros
guenther [Sat, 27 Jul 2024 02:10:26 +0000 (02:10 +0000)]
Sort and regularize all the ktrstruct() macros

ok deraadt@

3 months agoTrace struct itimerval
guenther [Fri, 26 Jul 2024 19:16:31 +0000 (19:16 +0000)]
Trace struct itimerval

ok deraadt@ claudio@

3 months agoOn AMD vmm(4) set SVM_INTERCEPT_INVLPGA in intercept1.
bluhm [Fri, 26 Jul 2024 15:59:04 +0000 (15:59 +0000)]
On AMD vmm(4) set SVM_INTERCEPT_INVLPGA in intercept1.

According to the AMD64 Architecture Programmer's Manual volume 2
the intercept SVM_INTERCEPT_INVLPGA needs to be set in vmcb.intercept1
(vector 3, offest 00Ch) instead of intercept2 (vector 4, offset
010h).  SVM_INTERCEPT_INVLPGA is bit 26, so before vcpu_reset_regs_svm()
was actually setting an intercept for CR10, which does not exist.

from hshoexer@; OK mlarkin@

3 months agoMark ipsecflowinfo immutable.
yasuoka [Fri, 26 Jul 2024 15:51:09 +0000 (15:51 +0000)]
Mark ipsecflowinfo immutable.

ok mvs

3 months agoIn pipex_l2tp_input(), check if ipsecflowinfo is not changed instead
yasuoka [Fri, 26 Jul 2024 15:45:31 +0000 (15:45 +0000)]
In pipex_l2tp_input(), check if ipsecflowinfo is not changed instead
of updating it blindly.

ok mvs

3 months agodocument the reduced logingrace penalty
naddy [Fri, 26 Jul 2024 15:24:49 +0000 (15:24 +0000)]
document the reduced logingrace penalty

3 months agoRun UDP input on multiple CPU in parallel.
bluhm [Fri, 26 Jul 2024 14:38:20 +0000 (14:38 +0000)]
Run UDP input on multiple CPU in parallel.

The socket layer of UDP has been made fully MP safe.  UDP output
is MP safe for a while.  mvs@ has fixed the missing pieces in socket
splicing recently.  This means that complete UDP stack can be
processed by multiple threads now.  Activate multi processing for
udp_input() when called with IPv4 or IPv6 packets.

Usually IP processing runs on multiple softnet threads with shared
net lock.  From there local packets are queued and processed by one
thread with exclusive net lock.  If the PR_MPINPUT flag is set,
protocol input is called directly from IP input on multiple threads,
with shared net lock and no additional queueing.

tested by Hrvoje Popovski; OK mvs@

3 months agoMark X509at_get_attr{,_count}() and X509at_delete_attr() as unused
tb [Fri, 26 Jul 2024 13:34:56 +0000 (13:34 +0000)]
Mark X509at_get_attr{,_count}() and X509at_delete_attr() as unused

ok jsing

3 months agoDisable X509at_get_attr{,_count}() and X509at_delete_attr()
tb [Fri, 26 Jul 2024 13:33:39 +0000 (13:33 +0000)]
Disable X509at_get_attr{,_count}() and X509at_delete_attr()

These are (not so) thin wrappers around the stack API and only make
things unreadable by adding an unneccesary layer of indirection and
repeating checks already present in the stack API. X509at_delete_attr()
is a masterpiece.

ok jsing

3 months agoInline last user of X509at_get_attr()
tb [Fri, 26 Jul 2024 13:30:40 +0000 (13:30 +0000)]
Inline last user of X509at_get_attr()

ok jsing

3 months agoInline trivial X509at_* calls in x509_req
tb [Fri, 26 Jul 2024 13:24:39 +0000 (13:24 +0000)]
Inline trivial X509at_* calls in x509_req

ok jsing

3 months agoInline a few trivial X509at_* calls in cms
tb [Fri, 26 Jul 2024 13:23:52 +0000 (13:23 +0000)]
Inline a few trivial X509at_* calls in cms

ok jsing

3 months agovirtio: add/fix feature bits
sf [Fri, 26 Jul 2024 07:55:23 +0000 (07:55 +0000)]
virtio: add/fix feature bits

There was a off-by-one in unused vioblk feature defines. Fix this.

Add missing feature bits from virtio 1.2 so that they are displayed
with VIRTIO_DEBUG.

ok jan@

3 months agovio: Don't request csum offload if not negotiated
sf [Fri, 26 Jul 2024 06:29:01 +0000 (06:29 +0000)]
vio: Don't request csum offload if not negotiated

The standard says "A driver MUST NOT enable an offload for which the
appropriate feature has not been negotiated."

ok jan@

3 months ago- document "ca" in the action ... relay section
jmc [Fri, 26 Jul 2024 06:24:52 +0000 (06:24 +0000)]
- document "ca" in the action ... relay section
from philipp plus openbsd at bureaucracy de

- within the "ca" section, refer to "listen on" and "action ... relay",
which is the actual syntax

ok op

3 months agodrm/radeon: check bo_va->bo is non-NULL before using it
jsg [Fri, 26 Jul 2024 03:42:02 +0000 (03:42 +0000)]
drm/radeon: check bo_va->bo is non-NULL before using it

From Pierre-Eric Pelloux-Prayer
f13c96e0e325a057c03f8a47734adb360e112efe in linux-6.6.y/6.6.42
6fb15dcbcf4f212930350eaee174bb60ed40a536 in mainline linux

3 months agoPut opening brace on correct line
tb [Fri, 26 Jul 2024 03:40:43 +0000 (03:40 +0000)]
Put opening brace on correct line

3 months agodrm/amd/display: Fix refresh rate range for some panel
jsg [Fri, 26 Jul 2024 03:39:34 +0000 (03:39 +0000)]
drm/amd/display: Fix refresh rate range for some panel

From Tom Chung
607731f315d15558696e9b542121d40411df37fd in linux-6.6.y/6.6.42
9ef1548aeaa8858e7aee2152bf95cc71cdcd6dff in mainline linux

3 months agodrm/amd/display: Account for cursor prefetch BW in DML1 mode support
jsg [Fri, 26 Jul 2024 03:37:12 +0000 (03:37 +0000)]
drm/amd/display: Account for cursor prefetch BW in DML1 mode support

From Alvin Lee
6ecf239f71ef7f6e9f8ea46b9c7ef4df2afd96c9 in linux-6.6.y/6.6.42
074b3a886713f69d98d30bb348b1e4cb3ce52b22 in mainline linux

3 months agodrm/amd/display: Add refresh rate range check
jsg [Fri, 26 Jul 2024 03:34:59 +0000 (03:34 +0000)]
drm/amd/display: Add refresh rate range check

From Tom Chung
531e7852fb62bfc6a15cc1df85f62720f704d537 in linux-6.6.y/6.6.42
74ad26b36d303ac233eccadc5c3a8d7ee4709f31 in mainline linux

3 months agodrm/amdgpu: Indicate CU havest info to CP
jsg [Fri, 26 Jul 2024 03:32:20 +0000 (03:32 +0000)]
drm/amdgpu: Indicate CU havest info to CP

From Harish Kasiviswanathan
86a6a3964f600d458412295ac8d705b6b9a8efdb in linux-6.6.y/6.6.42
49c9ffabde555c841392858d8b9e6cf58998a50c in mainline linux

3 months agodrm: panel-orientation-quirks: Add quirk for Aya Neo KUN
jsg [Fri, 26 Jul 2024 03:29:47 +0000 (03:29 +0000)]
drm: panel-orientation-quirks: Add quirk for Aya Neo KUN

From Tobias Jakobi
97f71343f794c6ecbb3a2d55b4a04464e924b139 in linux-6.6.y/6.6.42
f74fb5df429ebc6a614dc5aa9e44d7194d402e5a in mainline linux

3 months agosync
deraadt [Fri, 26 Jul 2024 01:38:59 +0000 (01:38 +0000)]
sync

3 months agouse the fp target attribute with fpu_save()/fpu_load()
jsg [Fri, 26 Jul 2024 00:23:57 +0000 (00:23 +0000)]
use the fp target attribute with fpu_save()/fpu_load()

otherwise clang 18 errors when inline assembly uses floating point
registers with nofp in -march

ok kettenis@

3 months agoreduce logingrace penalty.
djm [Thu, 25 Jul 2024 23:44:01 +0000 (23:44 +0000)]
reduce logingrace penalty.

A single forgotton login that times out should be below the penalty
threshold.

ok deraadt/claudio

3 months agoFix proxy multiplexing (-O proxy) bug
djm [Thu, 25 Jul 2024 22:40:08 +0000 (22:40 +0000)]
Fix proxy multiplexing (-O proxy) bug

If a mux started with ControlPersist then later has a forwarding added using
mux proxy connection and the forwarding was used, then when the mux proxy
session terminates, the mux master process will send a channel close to the
server with a bad channel ID and crash the connection.

This was caused by my stupidly reusing c->remote_id for mux channel
associations when I should have just added another member to struct channel.

ok markus@

3 months agoExplicitly request for battery status updates as the firmware doesn't seem
kettenis [Thu, 25 Jul 2024 20:21:40 +0000 (20:21 +0000)]
Explicitly request for battery status updates as the firmware doesn't seem
to send us regular updates itself.  Estamate the remaining battery (charge)
time by using the reported rate.

ok phessler@

3 months agodocument deflateUsed()
tb [Thu, 25 Jul 2024 17:29:51 +0000 (17:29 +0000)]
document deflateUsed()

text mostly from upstream, the function will soon be added to libz.

ok jmc

3 months agofix a small markup mistake (missing newline)
tb [Thu, 25 Jul 2024 17:25:59 +0000 (17:25 +0000)]
fix a small markup mistake (missing newline)

ok jmc (as part of a larger diff)

3 months agomention MODPY_PYBUILD=pdm
sthen [Thu, 25 Jul 2024 15:36:56 +0000 (15:36 +0000)]
mention MODPY_PYBUILD=pdm

3 months agofix double space; from crystal kolipe
jmc [Thu, 25 Jul 2024 13:40:55 +0000 (13:40 +0000)]
fix double space; from crystal kolipe

3 months agoSilence a false positive warning for gcc
tb [Thu, 25 Jul 2024 08:44:39 +0000 (08:44 +0000)]
Silence a false positive warning for gcc

The code path gcc is whining about ensures that the struct auth in
question is initialized, but the pile of garbage that is gcc's use
of uninitialized warnings can't figure that one out. Enough time on
this was wasted during the last few releases that silencing gcc with
annoying workarounds may be the lesser evil.

ok claudio

3 months agovirtio: Allow more verbose debugging
sf [Thu, 25 Jul 2024 08:35:40 +0000 (08:35 +0000)]
virtio: Allow more verbose debugging

If VIRTIO_DEBUG is set to 2, dump the whole virtqueues.

3 months agoFix test23. It assumed the place of the attribute is unchanged. But now,
yasuoka [Thu, 25 Jul 2024 07:24:40 +0000 (07:24 +0000)]
Fix test23.  It assumed the place of the attribute is unchanged.  But now,
the message-authenticator is located at first always.  found anton

3 months agosync
miod [Thu, 25 Jul 2024 05:33:06 +0000 (05:33 +0000)]
sync

3 months agoIf the CPU cores implement FEAT_IDST, emulate access to the CPU ID
kettenis [Wed, 24 Jul 2024 21:24:18 +0000 (21:24 +0000)]
If the CPU cores implement FEAT_IDST, emulate access to the CPU ID
registers from userland and set HWCAP_CPUID.  This will allow detection
of features to be introduced into the architecture in the future without
allocating new HWCAP_xxx or HWCAP2_xxx bits.  We provide the same
sanitized view of the CPU ID registers as is currently available through
sysctl(2).

Note that this introduces an unconditional read of ID_AA64MMFR2_EL1.  This
is known to cause problems on older versions of QEMU.  If this turns out
to be a problem in cases where updating QEMU is not an option, we'll have
to implement a workaround.

Also note that since we don't emulate the CPU ID registers on older core,
this means that microarchitectural optimizations keyed of reads of MIDR_EL1
are not possible on OpenBSD.  I don't think that is a real problem.

ok jca@

3 months agovmm(4): drop checks for EPT or RVI in some functions.
dv [Wed, 24 Jul 2024 21:04:12 +0000 (21:04 +0000)]
vmm(4): drop checks for EPT or RVI in some functions.

vmm(4) only supports using nested paging on Intel or AMD and no
longer supports HLAT or shadow paging.

ok mlarkin@

3 months agoAdd 5f00::/16 segment routing SRv6 SIDs prefix to example bogon list
job [Wed, 24 Jul 2024 19:28:37 +0000 (19:28 +0000)]
Add 5f00::/16 segment routing SRv6 SIDs prefix to example bogon list

"In SRv6, SR source nodes initiate packets with a segment identifier in
the Destination Address of the IPv6 header, and SR segment endpoint
nodes process a local segment present in the Destination Address of an
IPv6 header."

https://www.iana.org/assignments/iana-ipv6-special-registry/
https://datatracker.ietf.org/doc/html/draft-ietf-6man-sids

OK phessler@

3 months ago3fff::/20 has been set aside as an additional documentation prefix
job [Wed, 24 Jul 2024 18:56:57 +0000 (18:56 +0000)]
3fff::/20 has been set aside as an additional documentation prefix

Per https://www.iana.org/assignments/iana-ipv6-special-registry/
and https://datatracker.ietf.org/doc/html/draft-ietf-v6ops-rfc3849-update

OK phessler@ claudio@

3 months agoKASSERT that the ps_single proc has P_SUSPSINGLE cleared.
claudio [Wed, 24 Jul 2024 15:31:08 +0000 (15:31 +0000)]
KASSERT that the ps_single proc has P_SUSPSINGLE cleared.
Requested by kettenis@ and guenther@

3 months agoRemove the (pr->ps_single->p_flag & P_SUSPSINGLE) == 0 check since it
claudio [Wed, 24 Jul 2024 15:30:17 +0000 (15:30 +0000)]
Remove the (pr->ps_single->p_flag & P_SUSPSINGLE) == 0 check since it
is always true. Also consitently wrap all flag checks into parantheses.
OK kettenis@ guenther@

3 months agoUse a different mutex to protect the kqueue klist in logsoftc.
claudio [Wed, 24 Jul 2024 13:37:05 +0000 (13:37 +0000)]
Use a different mutex to protect the kqueue klist in logsoftc.

knote_locked() will call wakeup() and with it the SCHED_LOCK and by that
makes log_mtx no longer a leaf lock. By using an own lock for the klist
we can keep log_mtx a leaf lock and with that printf(9) can be used in
most contexts again.
OK mvs@

3 months agoRemove workaround for lock ordering issue in uvm_pseg_get().
mpi [Wed, 24 Jul 2024 12:18:10 +0000 (12:18 +0000)]
Remove workaround for lock ordering issue in uvm_pseg_get().

Now that uvm_unmap_detach() no longer grab the KERNEL_LOCK() it should be
safe to call it with the `uvm_pseg_lck' mutex held via uvm_km_valloc_try().

ok jca@, claudio@

3 months agoMove uvm_exit() outside of the KERNEL_LOCK() in the reaper.
mpi [Wed, 24 Jul 2024 12:17:31 +0000 (12:17 +0000)]
Move uvm_exit() outside of the KERNEL_LOCK() in the reaper.

Use atomic operations to reference count VM spaces.

Tested by claudio@, bluhm@, sthen@, jca@

ok jca@, claudio@

3 months agoGrab the kernel lock in preparation for unlocking most of uvm_unmap_detach().
mpi [Wed, 24 Jul 2024 12:16:21 +0000 (12:16 +0000)]
Grab the kernel lock in preparation for unlocking most of uvm_unmap_detach().

ok jca@, claudio@

3 months agoRemove assertion in udv_detach(), the function is already mpsafe.
mpi [Wed, 24 Jul 2024 12:15:55 +0000 (12:15 +0000)]
Remove assertion in udv_detach(), the function is already mpsafe.

ok jca@, claudio@

3 months agoBUF_MEM_new.3: add a touch of KNF
tb [Wed, 24 Jul 2024 08:57:58 +0000 (08:57 +0000)]
BUF_MEM_new.3: add a touch of KNF

3 months agodd "msgauth" option for "test" command to specify whether use
yasuoka [Wed, 24 Jul 2024 08:27:20 +0000 (08:27 +0000)]
dd "msgauth" option for "test" command to specify whether use
Message-Authentication or not.

3 months agoAdd Symbols.list and enable version script to hide some local functions.
yasuoka [Wed, 24 Jul 2024 08:22:26 +0000 (08:22 +0000)]
Add Symbols.list and enable version script to hide some local functions.

3 months agoPlace Message-Authenticator at the beginning of the attributes
yasuoka [Wed, 24 Jul 2024 08:19:16 +0000 (08:19 +0000)]
Place Message-Authenticator at the beginning of the attributes
as draft-ietf-radext-deprecating-radius-02 suggests.

3 months agoAccept and ignore SADB_X_EXT_REPLAY and SADB_X_EXT_COUNTER payloads for
tobhe [Tue, 23 Jul 2024 20:04:51 +0000 (20:04 +0000)]
Accept and ignore SADB_X_EXT_REPLAY and SADB_X_EXT_COUNTER payloads for
incoming SADB_ADD and SADB_UPDATE message. Since we send them as part of
the SADB_GET reply we must also accept them on SADB_ADD/UPDATE as sasyncd
will forward payloads previously received in SADB_GET. Fixes a bug where
sasync can't restore SAs because pfkey returns EINVAL.

From Rafa\xc5\x82 Ramocki
ok bluhm@

3 months agovirtio: fix comment
sf [Tue, 23 Jul 2024 19:14:05 +0000 (19:14 +0000)]
virtio: fix comment

3 months agoRevise regress for ssl3_get_cipher() changes.
jsing [Tue, 23 Jul 2024 14:42:03 +0000 (14:42 +0000)]
Revise regress for ssl3_get_cipher() changes.

3 months agoRemove get_cipher from SSL_METHOD.
jsing [Tue, 23 Jul 2024 14:40:53 +0000 (14:40 +0000)]
Remove get_cipher from SSL_METHOD.

Inline the get_cipher implementation (including the special handling
for DTLS) in ssl_cipher_collect_ciphers() (the only consumer), remove
the get_cipher member of SSL_METHOD and mop up dtls1_get_cipher().

ssl3_get_cipher() has always had a strange property of being a reverse
index, which is relied on by the cipher list ordering code, since it
currently assumes that high cipher suite values are preferable. Rather
than complicating ssl3_get_cipher() (and regress), change the iteration
order in ssl_cipher_collect_ciphers() to match what it requires. Lastly,
rename ssl3_get_cipher() to be more descriptive.

ok tb@

3 months agouaudio: Fix confusion between interface numbers and interface indexes
ratchov [Tue, 23 Jul 2024 08:59:21 +0000 (08:59 +0000)]
uaudio: Fix confusion between interface numbers and interface indexes

There is rare hardware for which the interface numbers and indexes are
not equal. Such devices couldn't attach because the driver claimed the
wrong interface.

3 months agoPass curproc pointer down from sleep_finish() instead of pulling it in
claudio [Tue, 23 Jul 2024 08:38:02 +0000 (08:38 +0000)]
Pass curproc pointer down from sleep_finish() instead of pulling it in
again in sleep_signal_check().
OK dlg@

3 months agolibsndio: Don't use poll(2) for output on the control device.
ratchov [Tue, 23 Jul 2024 08:36:51 +0000 (08:36 +0000)]
libsndio: Don't use poll(2) for output on the control device.

The AUDIO_MIXER_WRITE ioctl always succeeds without blocking, so no
need to use poll(2) for output. The audio(4) control device driver
doesn't implement the corresponding struct filterops anyway.

Fixes delayed level settings.

3 months agosndiod: Properly update the poll(2) event masks after i/o.
ratchov [Tue, 23 Jul 2024 06:34:03 +0000 (06:34 +0000)]
sndiod: Properly update the poll(2) event masks after i/o.

If there are no descriptors to poll for an event source, we call
the i/o handlers immediately (before poll(2) is called). As this
may generate output for other descriptors, their the poll(2) event
masks need to be updated.

3 months agoSpecify a priority for _libc_preinit() to make sure it runs before other
kettenis [Mon, 22 Jul 2024 22:06:27 +0000 (22:06 +0000)]
Specify a priority for _libc_preinit() to make sure it runs before other
constructors (such as the constructor for libcompiler_rt).

ok guenther@

3 months agorpcgen(1): default to "STDIN" as input file when compiling to headers.
dv [Mon, 22 Jul 2024 17:55:18 +0000 (17:55 +0000)]
rpcgen(1): default to "STDIN" as input file when compiling to headers.

FreeBSD, NetBSD, and GNU all use a variation of "STDIN" as the
default input filename when compiling to header files (-h) to prevent
a NULL-pointer deference. Adopt a similar approach.

ok millert@

3 months agoExpand full array option values if no index is provided, GitHub issue
nicm [Mon, 22 Jul 2024 15:27:42 +0000 (15:27 +0000)]
Expand full array option values if no index is provided, GitHub issue
4051.

3 months agoRevise regress to match cipher suite values change.
jsing [Mon, 22 Jul 2024 14:50:45 +0000 (14:50 +0000)]
Revise regress to match cipher suite values change.

3 months agoUse cipher suite values instead of IDs.
jsing [Mon, 22 Jul 2024 14:47:15 +0000 (14:47 +0000)]
Use cipher suite values instead of IDs.

OpenSSL has had the concept of cipher IDs, which were a way of working
around overlapping cipher suite values between SSLv2 and SSLv3. Given
that we no longer have to deal with this issue, replace the use of IDs
with cipher suite values. In particular, this means that we can stop
mapping back and forth between the two, simplifying things considerably.

While here, remove the 'valid' member of the SSL_CIPHER. The ssl3_ciphers[]
table is no longer mutable, meaning that ciphers cannot be disabled at
runtime (and we have `#if 0' if we want to do it at compile time).

Clean up the comments and add/update RFC references for cipher suites.

ok tb@

3 months agoremove unneeded prototypes for functions in other files
jsg [Mon, 22 Jul 2024 14:03:22 +0000 (14:03 +0000)]
remove unneeded prototypes for functions in other files

3 months agoremove prototype with no matching function
jsg [Mon, 22 Jul 2024 12:05:38 +0000 (12:05 +0000)]
remove prototype with no matching function

3 months agoFix ipcp module to use (the maximum sequence number from the db) + 1
yasuoka [Mon, 22 Jul 2024 10:00:16 +0000 (10:00 +0000)]
Fix ipcp module to use (the maximum sequence number from the db) + 1
properly.

3 months agoSync with proc.h: s/PS_STOPPED/PS_STOPPING/
claudio [Mon, 22 Jul 2024 09:44:37 +0000 (09:44 +0000)]
Sync with proc.h: s/PS_STOPPED/PS_STOPPING/
OK kettenis@

3 months agoRename PS_STOPPED to PS_STOPPING. I want to use PS_STOPPED to indicate
claudio [Mon, 22 Jul 2024 09:43:47 +0000 (09:43 +0000)]
Rename PS_STOPPED to PS_STOPPING. I want to use PS_STOPPED to indicate
that a process has been stopped so make room for that.
OK kettenis@

3 months agoModify ipcp module to return a result for
yasuoka [Mon, 22 Jul 2024 09:39:23 +0000 (09:39 +0000)]
Modify ipcp module to return a result for
IMSG_RADIUSD_MODULE_IPCP_DISCONNECT and radiusctl to handle the
result.

3 months agoMake some functions "static".
yasuoka [Mon, 22 Jul 2024 09:27:16 +0000 (09:27 +0000)]
Make some functions "static".

3 months agoSwitch proc_finish_wait() to use the process as argument instead of its
claudio [Mon, 22 Jul 2024 08:18:53 +0000 (08:18 +0000)]
Switch proc_finish_wait() to use the process as argument instead of its
ps_mainproc. dowait6() needs to stop using ps_mainproc and this is the
first step.
OK guenther@

3 months agoFor AMD SEV determine C-bit position and guest mode in locore0.
bluhm [Sun, 21 Jul 2024 19:41:31 +0000 (19:41 +0000)]
For AMD SEV determine C-bit position and guest mode in locore0.

Actually determine the C-bit position if we are running as a guest
with SEV enabled.  Configure pg_crypt, pg_frame and pg_lgframe
accordingly, using the physical address bit reduction provided by
cpuid.

from hshoexer@; OK mlarkin@

3 months agoPopulate hwcap and hwcap2 based on the sanitized values of the ID register
kettenis [Sun, 21 Jul 2024 18:57:31 +0000 (18:57 +0000)]
Populate hwcap and hwcap2 based on the sanitized values of the ID register
values and the feature bits that we recognize.

ok naddy@, jca@

3 months agoExport basic HWCAP bits to let applications detect Altivec & VSX on powerpc64
jca [Sun, 21 Jul 2024 16:49:26 +0000 (16:49 +0000)]
Export basic HWCAP bits to let applications detect Altivec & VSX on powerpc64

Input from miod@ and gkoehler@, tests & ok gkoehler@

3 months agoExport basic HWCAP bits to let applications detect Altivec on powerpc
jca [Sun, 21 Jul 2024 16:46:56 +0000 (16:46 +0000)]
Export basic HWCAP bits to let applications detect Altivec on powerpc

Input from miod@ and gkoehler@, tests & ok gkoehler@

3 months agoA few manual ret-cleans. Seeing as these pertain to interrupt servicing,
deraadt [Sun, 21 Jul 2024 16:19:25 +0000 (16:19 +0000)]
A few manual ret-cleans.  Seeing as these pertain to interrupt servicing,
the stack utilization ends up near the the deep end of the stack where,
retcleans are useful. tested for a while in snaps
ok bluhm

3 months agoasn1time: indicate which comparison function failed
tb [Sun, 21 Jul 2024 13:25:11 +0000 (13:25 +0000)]
asn1time: indicate which comparison function failed

extracted from a diff by Kenjiro Nakayama

3 months agoAdd optimized character rendering case for 6 pixels wide fonts in
fcambus [Sun, 21 Jul 2024 13:18:15 +0000 (13:18 +0000)]
Add optimized character rendering case for 6 pixels wide fonts in
rasops32_putchar().

From jon (at) elytron (dot) openbsd (dot) amsterdam.

3 months agoAdd back a .
tb [Sun, 21 Jul 2024 09:24:07 +0000 (09:24 +0000)]
Add back a .

3 months agoUnify description of the obsolete ENGINE parameter
tb [Sun, 21 Jul 2024 08:36:43 +0000 (08:36 +0000)]
Unify description of the obsolete ENGINE parameter

This uses the same language in most manuals mentioning the obsolete
ENGINE parameters. Make it clear that it is always ignored and that
NULL should be passed. Always call it engine instead of a mix of e
pe, impl, eng.

3 months agoDrop ENGINE from EVP_PKEY_derive example
tb [Sun, 21 Jul 2024 08:25:33 +0000 (08:25 +0000)]
Drop ENGINE from EVP_PKEY_derive example

3 months agoGarbage collect ENGINE "use" from EVP_PKEY_decrypt() example
tb [Sun, 21 Jul 2024 08:10:17 +0000 (08:10 +0000)]
Garbage collect ENGINE "use" from EVP_PKEY_decrypt() example