mvs [Tue, 20 Aug 2024 07:44:36 +0000 (07:44 +0000)]
Unlock sysctl_audio().
It is the only KERN_AUDIO_RECORD. `audio_record_enable' is atomically
accessed integer.
Reasonable from deraadt
dtucker [Tue, 20 Aug 2024 07:41:35 +0000 (07:41 +0000)]
Remove duplicate curve25519-sha256 kex. curve25519-sha256@libssh.org
is the pre-standardization name for the same thing, so remove it
as a duplicate. Speeds up test by a tiny amount.
dtucker [Tue, 20 Aug 2024 07:27:25 +0000 (07:27 +0000)]
Unnest rekey param parsing test and use ssh not sshd. ssh uses the same
parsing code, now has "-G" to dump its config and is slightly faster
to start up. This speeds up the test slightly (~5%) in the common case
but should help more during instrumented tests, eg under valgrind, where
startup costs are magnified.
sf [Tue, 20 Aug 2024 07:04:29 +0000 (07:04 +0000)]
virtio_mmio: Return early if no device
If there is no device, don't write to any registers.
ok jan@
jsg [Tue, 20 Aug 2024 05:52:04 +0000 (05:52 +0000)]
another FXE -> FXe
ok miod@
jsg [Tue, 20 Aug 2024 05:36:38 +0000 (05:36 +0000)]
add (), | has higher precedence than ?:
ok mglocker@
deraadt [Tue, 20 Aug 2024 05:22:05 +0000 (05:22 +0000)]
nasty whitespace
djm [Tue, 20 Aug 2024 03:48:30 +0000 (03:48 +0000)]
place shielded keys (i.e. keys at rest in RAM) into memory allocated
using mmap(3) with MAP_CONCEAL set. This prevents exposure of the
key material in coredumps, etc (this is in addition to other measures
we take in this area).
ok deraadt@
dlg [Tue, 20 Aug 2024 00:09:12 +0000 (00:09 +0000)]
rework rge tx start and completion to better bus_dmamap_sync tx descriptors
ok patrick@
thanks to kettenis@ for reminding me how computers work again.
millert [Mon, 19 Aug 2024 15:08:21 +0000 (15:08 +0000)]
Fix CVE-2024-43688, buffer underflow for very large step values
In get_number(), reject values that are so large that they are
interpreted as negative numbers. In set_range(), step values smaller
than one or larger than the "stop" value are ignored. This prevents
bit_nset() from being called with out-of-range values.
Bug found by Dave G. of Supernetworks.
deraadt [Mon, 19 Aug 2024 14:46:41 +0000 (14:46 +0000)]
whitespaces
deraadt [Mon, 19 Aug 2024 14:24:24 +0000 (14:24 +0000)]
now that suspend operations are done as quiesce, we can try to use
the MXT_T7_POWER_MODE_DEEP_SLEEP operation.
jsg [Mon, 19 Aug 2024 13:01:47 +0000 (13:01 +0000)]
correctly indent a line
job [Mon, 19 Aug 2024 12:44:33 +0000 (12:44 +0000)]
Prepare for releasing version 9.2
jsg [Mon, 19 Aug 2024 11:18:29 +0000 (11:18 +0000)]
correct vm_fault_gtt() merge error in rev 1.19
fixes panic when starting X on x40 (855GM gen 2)
problem with 945GM (gen 3) and G41 (gen 4) reported by semarie@
kettenis [Mon, 19 Aug 2024 09:26:58 +0000 (09:26 +0000)]
Use M_WAITOK where we can; this includes during autoconf where the only
realistic option is to panic if we're doing smallish allocations and run
out of memory.
ok deraadt@
nicm [Mon, 19 Aug 2024 08:31:36 +0000 (08:31 +0000)]
Allow REP to work with Unicode characters, GitHub issue 3687.
nicm [Mon, 19 Aug 2024 08:29:16 +0000 (08:29 +0000)]
Both terminators \007 and \033\\ leave the index pointing to the final
character of the terminator, so correct the size calculation to always
add one. GitHub issue 4082.
jsg [Mon, 19 Aug 2024 08:22:30 +0000 (08:22 +0000)]
avoid NULL deref if malloc fails
ok stsp@
jsg [Mon, 19 Aug 2024 08:07:16 +0000 (08:07 +0000)]
avoid uninitialised var use introduced in rev 1.63
found by smatch, ok bluhm@
florian [Mon, 19 Aug 2024 07:28:22 +0000 (07:28 +0000)]
Get rid of inet_aton(3).
inet_aton(3) is not a good interface to figure out if something looks
like an IP address and a reverse DNS lookup should be performed.
The modern way to do this is to chain getaddrinfo(3) with
getnameinfo(3). As a bonus this gives us reverse lookup for IPv6, too.
OK kn
jmc [Mon, 19 Aug 2024 07:28:00 +0000 (07:28 +0000)]
add missing apostrophe;
jmc [Mon, 19 Aug 2024 07:23:26 +0000 (07:23 +0000)]
robert burns: to a mouse
-The best laid schemes o' mice an' men gang aft a-gley{,}:\
+The best laid schemes o' mice an' men gang aft agley{,}:\
most sources i've checked use "best-laid", but not all, so i've erred
on the side of caution;
jmc [Mon, 19 Aug 2024 07:12:57 +0000 (07:12 +0000)]
catharine howard -> catherine howard;
jmc [Mon, 19 Aug 2024 06:54:13 +0000 (06:54 +0000)]
opration -> operation;
jmc [Mon, 19 Aug 2024 06:53:44 +0000 (06:53 +0000)]
promitto: promise, not primise
jmc [Mon, 19 Aug 2024 06:52:16 +0000 (06:52 +0000)]
fix double space;
florian [Mon, 19 Aug 2024 06:00:18 +0000 (06:00 +0000)]
Replace inet_aton / gethostbyname with getaddrinfo.
test & OK jmatthew
florian [Mon, 19 Aug 2024 05:58:41 +0000 (05:58 +0000)]
Replace too flexible inet_aton(3) with getaddrinfo(3).
0xdecafbad will no longer work as an IPv4 address, sorry.
OK bluhm
jsg [Mon, 19 Aug 2024 03:08:27 +0000 (03:08 +0000)]
test malloc return against NULL not 0
deraadt [Mon, 19 Aug 2024 01:43:23 +0000 (01:43 +0000)]
move ed/tests files to regress/bin/ed, where they are used
deraadt [Mon, 19 Aug 2024 01:04:10 +0000 (01:04 +0000)]
file not needed
deraadt [Mon, 19 Aug 2024 01:03:12 +0000 (01:03 +0000)]
spelling error, fixed by "snj", 21 years ago in some other repository
deraadt [Mon, 19 Aug 2024 00:58:09 +0000 (00:58 +0000)]
21 years ago someone called "jsm" modified another version of this which is
also being distributed, with commit message "Fix capitalisation of compass directions."
Seems sensible.
deraadt [Mon, 19 Aug 2024 00:52:04 +0000 (00:52 +0000)]
fix a spelling error found by Ceri Davis 18 years ago.
deraadt [Mon, 19 Aug 2024 00:03:12 +0000 (00:03 +0000)]
pvbus_activate does nothing except call config_activate_children
(4 possible cases). it does not need to exist. encoding NULL
into the cfattach structure does the same thing.
deraadt [Mon, 19 Aug 2024 00:01:40 +0000 (00:01 +0000)]
call activate functions of children in the correct place.
deraadt [Sun, 18 Aug 2024 22:06:40 +0000 (22:06 +0000)]
whitespaces
bluhm [Sun, 18 Aug 2024 21:04:29 +0000 (21:04 +0000)]
Use define to test bounce buffer in amd64 bus dma.
To debug bounce buffers easily on non-SEV hardware, introduce a
define FORCE_BOUNCE_BUFFER that activates them. Default is off,
no functional change.
OK miod@
deraadt [Sun, 18 Aug 2024 20:28:41 +0000 (20:28 +0000)]
oops, forgot variable
tb [Sun, 18 Aug 2024 20:24:11 +0000 (20:24 +0000)]
Use OPENSSL_config() instead of OPENSSL_load_builtin_modules()
deraadt [Sun, 18 Aug 2024 20:14:49 +0000 (20:14 +0000)]
fix comment
deraadt [Sun, 18 Aug 2024 20:08:58 +0000 (20:08 +0000)]
fix comment
deraadt [Sun, 18 Aug 2024 19:58:35 +0000 (19:58 +0000)]
whitespace
phessler [Sun, 18 Aug 2024 19:44:10 +0000 (19:44 +0000)]
unregister softraid sensors when the volumes are removed
From Sven M. Hallberg
tested and OK phessler@
OK mvs@
tb [Sun, 18 Aug 2024 17:50:10 +0000 (17:50 +0000)]
conf_def.c: shuffle things into a slightly more sensible
Reduces upcoming diffs and avoids annoying prototypes.
deraadt [Sun, 18 Aug 2024 15:50:47 +0000 (15:50 +0000)]
don't need to put config_activate_children inside cfattach, because
NULL means the same
ok kettenis
deraadt [Sun, 18 Aug 2024 15:09:49 +0000 (15:09 +0000)]
Driver was not calling the child activate functions in the correct way.
There is a child -- wsmouse, which has an activate function, so this
is another oversight...
deraadt [Sun, 18 Aug 2024 15:03:01 +0000 (15:03 +0000)]
For DVACT_RESUME, let the children know we are ready *after* calling
our own wakeup(). The wakeup() won't result in anything running now
because DVACT_RESUME is running in "cold !=0, interrupts blocked,
scheduler stopped", but it is idiomatically incorrect to inform your
children you are ready before you are ready.
phessler [Sun, 18 Aug 2024 14:58:47 +0000 (14:58 +0000)]
add qwz firmware
deraadt [Sun, 18 Aug 2024 14:42:56 +0000 (14:42 +0000)]
Most audio drivers were incorrectly (or not at all) informing their children
about suspend/resume related events, and they all have audio.c as a child,
which definately needs to know!
ok ratchov
deraadt [Sun, 18 Aug 2024 14:35:14 +0000 (14:35 +0000)]
there are azalia that will fail to attach. in the activate function for
DVACT_QUIESCE, this was handled by doing nothing. however, the other
DVACT methods were still trying to touch the device. This needs to
bail out earlier.
ok ratchov
kettenis [Sun, 18 Aug 2024 11:10:10 +0000 (11:10 +0000)]
Add Meteor Lake support.
ok jsg@
kettenis [Sun, 18 Aug 2024 11:08:47 +0000 (11:08 +0000)]
Don't short-circuit interrupt handling when the sc_dying flag is set. Just
don't forward reports to the child drivers instead. This fixes an issue
with hardware that sends an interrupt in response to a reset request when
a level-triggered interrupt is used. In that case the interrupt would
just keep triggering when we issue a reset when we resume (when sc_dying
is set) since we didn't clear the interrupt condition by reading from the
device.
ok mlarkin@, deraadt@
tb [Sun, 18 Aug 2024 11:04:55 +0000 (11:04 +0000)]
Remove documentation for X509_REQ_[gs]et_extension_nids
These functions have been disabled for a while and they will be removed
in the next major bump.
kettenis [Sun, 18 Aug 2024 10:50:22 +0000 (10:50 +0000)]
Some machines have more than one DCP, so apldcp(4) can attach multiple
times. So make the task pool private to each instance to avoid
initializing the pool again, which would panic the kernel.
ok tobhe@
tb [Sun, 18 Aug 2024 10:02:10 +0000 (10:02 +0000)]
Drop OpenSSL 3.0 interop testing infrastructure
The openssl 3.0 port was removed nearly a year ago shortly after the 7.4
release.
tb [Sun, 18 Aug 2024 09:14:17 +0000 (09:14 +0000)]
Add support for openssl32 in interop test
mpi [Sun, 18 Aug 2024 08:23:58 +0000 (08:23 +0000)]
Get rid of intermediate copy before passing events to userland.
From Christian Ludwig with some tweaks.
mpi [Sun, 18 Aug 2024 08:18:49 +0000 (08:18 +0000)]
Do not cache pages belonging to memory ranges with a `use' count.
Such pages belong to the DMA or ISA memory ranges and caching them
accelerate their exhaustion. On amd64, at least, the kernel relies
on having low pages available at any time and cannot recover from
their exhaustion.
Should prevent livelocks reported by jsg@ and tb@ on amd64.
ok deraadt@
mpi [Sun, 18 Aug 2024 08:01:03 +0000 (08:01 +0000)]
Remove outdated comment about UVM_PLA_WAITOK and the pagedaemon.
ok miod@, mlarkin@
stsp [Sun, 18 Aug 2024 07:34:45 +0000 (07:34 +0000)]
plug a memory leak in qwx(4) by freeing vifs when the interface goes down
deraadt [Sun, 18 Aug 2024 03:25:04 +0000 (03:25 +0000)]
add missing child activate handling, found due to idiom inspection
tested by phessler, input from kettenis
deraadt [Sun, 18 Aug 2024 02:59:51 +0000 (02:59 +0000)]
Upon resume, run usb_attach_roothub() in DVACT_WAKEUP rather than DVACT_RESUME.
The usb root hub is a software construct, not actual hardware, and the code
has a potential to reach sleeping points (which won't work because DVACT_RESUME
runs cold).
deraadt [Sun, 18 Aug 2024 02:53:08 +0000 (02:53 +0000)]
If FADT indicates FADT_POWER_S0_IDLE_CAPABLE, print "S0ix" instead
of "S0" on the acpi: sleep states line. (In my view, this flag-bit
announces that the hardware vendor + bios vendor + microsoft have agreed
this machine has enough "features" that S0 suspend is about as good or
better than S3, for various criteria).
ok kettenis mlarkin
guenther [Sun, 18 Aug 2024 02:25:51 +0000 (02:25 +0000)]
Use struct __sFILE instead of FILE in thread locking callback
declarations to reduce <stdio.h> pollution. Declare __isthreaded
in thread_private.h where it's really needed.
ok deraadt@
guenther [Sun, 18 Aug 2024 02:22:29 +0000 (02:22 +0000)]
Adjust locale/rune*.h files so <stdio.h> and <wchar.h> get pulled
into fewer files that don't need them.
ok deraadt@
guenther [Sun, 18 Aug 2024 02:20:29 +0000 (02:20 +0000)]
Pull in <stdio.h> (for snprintf()) directly instead of
assuming some local .h will pull it in
ok deraadt@
mlarkin [Sat, 17 Aug 2024 20:50:06 +0000 (20:50 +0000)]
Use 'int ch' instead of 'char ch' in one place for getopt.
Forgot one change during an earlier commit; use 'int ch' to make builds
complete without warning on arm64.
ok dv
denis [Sat, 17 Aug 2024 15:42:20 +0000 (15:42 +0000)]
Replace homemade copy_of() with strdup()
OK tb@
deraadt [Sat, 17 Aug 2024 15:10:00 +0000 (15:10 +0000)]
icc_detach was not listed in cfattach
mpi [Sat, 17 Aug 2024 13:35:01 +0000 (13:35 +0000)]
Use km_alloc(9) to allocate USPACE instead of uvm_pglistalloc(9).
ok miod@
kettenis [Sat, 17 Aug 2024 10:41:24 +0000 (10:41 +0000)]
Skip the FADT check on OpenBSD. Without it the GPU (and display) will
remain on in suspend-to-idle on some machines. There is a comment
warning that this is risky, but let's find out how risky thus really is.
ok deraadt@
kettenis [Sat, 17 Aug 2024 10:38:21 +0000 (10:38 +0000)]
The amdgpu(4) code uses separate code paths for suspend and hibernate.
Use the ACPI sleep state to determine which path to go down into. This
fixes (un)hibernate again after the fix for S0/S3 broke it.
Using the ACPI sleep state for this is not ideal. If we ever want to
support amdgpu(4) on architectures without ACPI, we'll need a different
solution.
ok jsg@
kettenis [Sat, 17 Aug 2024 10:33:56 +0000 (10:33 +0000)]
Linux doesn't consider S4 to be a suspend target state.
ok jsg@
denis [Sat, 17 Aug 2024 09:52:11 +0000 (09:52 +0000)]
Allow PPP interface to run in an rdomain and get a default route installed in the same routing domain
Input and OK claudio@
phessler [Sat, 17 Aug 2024 09:48:31 +0000 (09:48 +0000)]
effectively revert revision 1.7.
The original reason was some corner cases around COPY relocations, which
caused problems for miniperl which directly modified environ and accessed
environ via libc functions.
This causes duplicate symbols for environ/__progname in some (poorly written)
apps, but is allowed on most other architectures.
Since the time this was added other arm architecture changes mean that we
don't need it, so remove it.
debugged with kettenis@ and jca@
tested and OK guenther@
tb [Sat, 17 Aug 2024 09:19:04 +0000 (09:19 +0000)]
Zap a trailing comma to appease mandoc -Tlint
tb [Sat, 17 Aug 2024 09:17:27 +0000 (09:17 +0000)]
sync
tb [Sat, 17 Aug 2024 09:16:37 +0000 (09:16 +0000)]
Remove docs of various X509_TRUST "functionality" that no longer exists
Some macros are still exposed, but apart from the loss of a very nice way
of saying "this is completely misdesigned, overengineered and not properly
thought through" the only thing we would have learned from it is that this
stuff is "probably useless".
florian [Sat, 17 Aug 2024 09:07:33 +0000 (09:07 +0000)]
Since we are not using a pid file the manuals render a bit strange.
Pointed out by tb
miod [Sat, 17 Aug 2024 08:45:22 +0000 (08:45 +0000)]
Checkpoint of work-in-progress attempt to support the FireGL-UX board. This
particular sti(4) device relies upon undocumented callbacks from the kernel,
and will default to iodc code otherwise.
The device now initializes correctly, but writes to the frame buffer memory
freeze the system due to bad interaction with the ROM even though it is
disabled at the PCI level - unfortunately I'm currently out of hair to pull
at the moment to make any progress on this.
No functional change intended for other sti(4) devices.
miod [Sat, 17 Aug 2024 08:41:25 +0000 (08:41 +0000)]
Correct capitalization of FXe and use decimal version numbering for
rom features, to match what dmesg reports.
djm [Sat, 17 Aug 2024 08:35:04 +0000 (08:35 +0000)]
mention that
ed25519 is the default key type generated and
clarify that rsa-sha2-512 is the default signature scheme when RSA
is in use. Based on GHPR505 from SebastianRzk
djm [Sat, 17 Aug 2024 08:23:04 +0000 (08:23 +0000)]
fix minor memory leak in Subsystem option parsing;
from Antonio Larrosa via GHPR515
stsp [Sat, 17 Aug 2024 08:12:46 +0000 (08:12 +0000)]
enable qwx(4) ext irqs earlier for suspend/resume
Enable ext IRQs like the Linux driver does it, not later. I did this
differently due to problems in early development that have since
been fixed.
Fixes an interrupt storm during resume which prevents things like
key installation from working, leaving the network link dead.
djm [Sat, 17 Aug 2024 08:09:50 +0000 (08:09 +0000)]
fix swapping of source and destination addresses in some sshd log messages
jsg [Sat, 17 Aug 2024 07:02:13 +0000 (07:02 +0000)]
avoid uninitialised var use in nfs_serv.c error paths
some functions have a nfsmout label with code that assumes NDINIT has
been called
nfsrv_rename has two NDINIT calls, the nfsmout code assumes both are
setup but is only jumped to when none/one is setup
found with llvm scan-build
checked by deraadt@ beck@, ok miod@
yasuoka [Sat, 17 Aug 2024 03:28:22 +0000 (03:28 +0000)]
Fix some memory leaks in the RADIUS part.
ok tobhe
deraadt [Sat, 17 Aug 2024 02:35:00 +0000 (02:35 +0000)]
whitespace
deraadt [Sat, 17 Aug 2024 02:31:15 +0000 (02:31 +0000)]
perusing drivers on other systems, there appears to be some cynism about
how this chip comes out of D3 and when the RESET register is touched.
Some systems were still wasn't resuming reliabily, but adding these
delays has eliminated resume-hangs.
ok kettenis mlarkin
deraadt [Sat, 17 Aug 2024 02:28:45 +0000 (02:28 +0000)]
The dwiic_init() routine is used at startup to read various chip
registers, make some decisions, and then program other registers. After
a resume, it is pointless, and potentially incorrect to read such registers
again, which a BIOS or something may not have initialized, and we are
better off using the remembered soft-state to init cleanly. So craft a
custom block of chip restoration, and do it while the chip is stopped hard.
ok kettenis mlarkin
deraadt [Sat, 17 Aug 2024 02:24:03 +0000 (02:24 +0000)]
dwiic_activate did not inform sub-devices with config_activate_children()
calls from the correct places, so their DVACT_QUIESCE and DVACT_WAKEUP
were incorrect, and led to those sub-drivers (ihidev and imt) racing
against dwiic hardware re-initialization.
ok kettenis mlarkin
deraadt [Sat, 17 Aug 2024 02:14:20 +0000 (02:14 +0000)]
dwiic resume is almost exclusively a "hardware state restore", and
not a "restart transaction", so the job should get done at DVACT_RESUME
time.
ok kettenis mlarkin
jsg [Sat, 17 Aug 2024 01:55:03 +0000 (01:55 +0000)]
skip Controller Save State (CSS) and Controller Restore State (CRS)
on AMD 17h/1xh xHCI
avoids problem with resume after CRS was introduced in xhci.c rev 1.133
uhub0: device problem, disabling port 2
uhub1: device problem, disabling port 1
reported by brynet@ and reproduced on t495, ok kettenis@
guenther [Fri, 16 Aug 2024 23:09:25 +0000 (23:09 +0000)]
Cast to unsigned char after or'ing in the meta bit, so the compiler
doesn't complain when it's implicitly converted to plain char in an
assignment, and to make sure it's not negative when used as an array index.
ok miod@
guenther [Fri, 16 Aug 2024 22:58:54 +0000 (22:58 +0000)]
Delete duplicated x{m,re}alloc() declarations and add argument types
to a function pointer definition.
ok miod@
guenther [Fri, 16 Aug 2024 22:57:44 +0000 (22:57 +0000)]
Delete bogus test of array being NULL
ok miod@
guenther [Fri, 16 Aug 2024 22:57:03 +0000 (22:57 +0000)]
strn?casecmp() config bits were incomplete. We have them so
just delete the bogus declarations. Also, getopt() is in <unistd.h>
so pull that in during the remapping of it.
ok miod@
guenther [Fri, 16 Aug 2024 22:53:32 +0000 (22:53 +0000)]
Fix precedence lossage reported by clang that results in
bad buffer size.
ok miod@