1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-27 23:56:05 +00:00
Commit Graph

241402 Commits

Author SHA1 Message Date
dtucker
9ba28ece4f Use $OBJ for temp file in maxstartups idempotence test.
Fixes test in -portable when run out-of-tree.
2025-09-26 04:40:45 +00:00
jsg
44fddded96 drm/amd/display: Allow RX6xxx & RX7700 to invoke amdgpu_irq_get/put
From Ivan Lipski
232e74984061eea9cb6bf9b67e3070435477048c in linux-6.12.y/6.12.49
29a2f430475357f760679b249f33e7282688e292 in mainline linux
2025-09-25 22:55:38 +00:00
dtucker
678edeed12 Check return codes of sshbuf functions. Fixes Coverity CIDs 405059 and
405061.
2025-09-25 22:17:29 +00:00
bluhm
c365191f90 Update libexpat to version 2.7.3.
Relevant for OpenBSD are security fixes #1046 #1048 #1059, other
changes #1043 #1062 #1056 #1057 #1058 #1045 #1041.  Library bump
is not necessary.  CVE-2025-59375 CVE-2024-8176

OK tb@
2025-09-25 19:05:10 +00:00
jsg
17b45a1106 avoid use-after-free in update_krl_from_file()
found with clang scan-build, ok dtucker@
2025-09-25 12:52:21 +00:00
mpi
bdcea57388 Move initializaion of UVM vnode descriptors into its own function.
ok claudio@
2025-09-25 09:05:47 +00:00
mvs
ba454d9751 Remove last callers of the 'lbolt' sleep channel.
When a process in a background group attempts TTY I/O, it is currently
put to sleep on 'lbolt'. This relies on the 1Hz wakeup() from schedcpu().
Replace ttysleep(tp, &lbolt, ...) with ttysleep_nsec(tp, &nowake,
..., SEC_TO_NSEC(1)) and remove unused 'lbolt' channel.

From Tim Leslie, ok claudio.
2025-09-25 08:46:50 +00:00
djm
15f5326ca8 fix some one-off leaks in ssh.c; ok dtucker@ 2025-09-25 07:05:11 +00:00
djm
11ed33cda0 fix some one-off leaks in ssh-keygen; ok dtucker@ 2025-09-25 07:04:38 +00:00
djm
f95df93522 fix some leaks in ssh-add; feedback/ok dtucker@ 2025-09-25 07:00:43 +00:00
djm
c1e3ab8ac6 fix some leaks; feedback/ok dtucker@ 2025-09-25 06:57:54 +00:00
djm
35fde25296 wait for the unprivileged sshd-auth process to exit before
closing the fd it uses to report log messages

This avoids a race where the child process notices the
fd was closed before exiting and spams the logs.

ok dtucker@
2025-09-25 06:45:50 +00:00
djm
2f224365fc add some functions to free various structs, including channels data
and packet state; ok dtucker@ tb@
2025-09-25 06:33:19 +00:00
djm
74bbcc763a fix leaks of config objects in mm_decode_activate_server_options
ok dtucker@ tb@
2025-09-25 06:31:42 +00:00
djm
a51a721120 clarify intent and avoid (harmess, defined behaviour) unsigned
underflow. ok tb@
2025-09-25 06:25:38 +00:00
jsg
16dc7391aa consistently use NULL for null pointer constants
found with sparse, ok djm@
2025-09-25 06:23:19 +00:00
jsg
db61ca07a5 remove unneeded externs
ok djm@
2025-09-25 02:15:39 +00:00
jsg
8ce79da910 remove prototype for removed ssh_packet_set_tos()
ok djm@
2025-09-25 02:12:16 +00:00
schwarze
a25aeda823 Fix a bug where formatting two compressed manual pages in row failed to
decompress the second one.  The problem was calling mparse*() functions
in the wrong order mparse_open -> mparse_reset -> mparse_readfd instead
of in the correct order mparse_reset -> mparse_open -> mparse_readfd:
mparse_reset() clears the gzip flag, mparse_open() sets it if the new
file is gzipped, and read_whole_file() called from mparse_readfd()
enables decompression if the flag is set.
To make the code easier to follow, call all of mparse_alloc(),
mparse_reset(), and mparse_free() from main() rather than hiding
mparse_reset() two levels down in the parse() subroutine.

Bug found by Alejandro Colomar <alx@kernel.org> on Debian Sid
and reported on the GNU roff mailing list.
2025-09-24 21:27:21 +00:00
claudio
602ee88244 Bump version to 8.9 2025-09-24 15:51:15 +00:00
dv
b1d57029bf Fix vmctl reload and reset hanging due to missing imsg.
My recent changes to improve vmd(8)'s proc.{c,h} inadvertently broke
replies to vmctl when processing reload and reset commands. Restore
the IMSG_NONE enum value and use it explicitly in areas checking
for the zero value.

ok hshoexer@
2025-09-24 15:27:19 +00:00
claudio
05204b11e3 Remove more ibuf queue leftovers that are not superseded by
ibufq_new(3) API family.
OK tb@
2025-09-24 14:04:04 +00:00
claudio
3b2384bb59 In rib_dump_r() skip empty rib entries since they hold no information.
OK tb@
2025-09-24 13:27:18 +00:00
claudio
b04c635eec Make rib_remove() static and factor out the common code from
rib_dump_abort() and rib_dump_terminate() into rib_dump_free().
Collect an extra empty line while passing by.
OK tb@
2025-09-24 13:26:17 +00:00
schwarze
6a8d15d923 When sorting page names (without section numbers) in the mandoc database,
after sorting by name type in descending order (to put the most
important names first), use the same sort order that is conventional
in SEE ALSO sections: first case-insensitively in ascending alphabetic
order, and if that results in a tie because two names differ only in
case (like OSSL_TRACE_END and OSSL_trace_end, which are *different*
names that, in FreeBSD, are documented in the same manual page - why
am i unsurprised that such madness occurs with "OSSL" of all APIs?),
break the tie by sorting case-sensitively in ascending alphabetic order,
i.e. put capitals before lowercase letters, rather than allowing the
tie to result in a random order.

This very minor issue was found by Mark Johnston <markj@>
when he worked on reproducible builds in FreeBSD.
2025-09-24 13:08:34 +00:00
claudio
357c84252b Convert the trivial rib_empty() to a static inline function. 2025-09-24 12:52:57 +00:00
jsg
1e6abfcd09 spelling; ok dtucker@ 2025-09-24 00:51:28 +00:00
schwarze
a61ae78563 Minor cleanup in several of the FUSE manuals, including:
* clarify that dying from a signal is not considered a failure of fuse_loop(3)
* add many missing .Dv macros and a few missing .Pa and .Er macros
* remove future tense in several cases where it's pointless
* polish some capitalization and punctuation and fix a few typos
OK helg@
2025-09-23 09:28:28 +00:00
mpi
d4a733e3e9 Do not access VM spaces of exiting processes in sysctl(2).
Now that VM spaces are purged during exit1() w/o KERNEL_LOCK(), there is
no mechanim to grab a valid reference on the exiting process' `ps_vmspace' .

So extend existing checks for zombies to PS_EXITING processes to prevent
similar races.

Reported by gerhard@, ok claudio@
2025-09-23 08:00:48 +00:00
jmatthew
c9b8b88567 Add a 'mach fwsetup' command, which uses the EFI OsIndications feature
to reboot the machine into the firmware setup interface, if supported.

ok dlg@
2025-09-23 05:44:28 +00:00
jsg
279d57bfc1 remove duplicate virtual_stack_vars_rtx test
found with cppcheck, ok miod@
2025-09-23 04:55:05 +00:00
miod
932bc229c1 Revert 1.14 and disable delayed branch optimization while reenabling
basic block reordering.

Basic block span computation has been fixed, hopefully for good, in m88k.md
rev 1.16.

The delayed branch optimization is unfortunately still corrupting register
values by moving instructions which shouldn't, in complex enough code. Even
though the gcc testsuite passes, including the few tests which exercize
this, in gcc's own tree-cfg.c, the combination of the inlining of
update_modified_stmts() and delayed branching creates a code path where the
argument of one update_stmt_operands() call (via update_stmt_is_modified())
is overwritten with a load of the (declared noreturn, and it matters)
fancy_abort() message in the stmt_ann() diagnostic.

This can be reduced to a 127 line testcase, which will hopefully let me cut
my teeth further on this.

In the meantime, disabling this optimization allows gcc 4 to be self-hosting
again on m88k.
2025-09-22 19:04:00 +00:00
schwarze
08b90dfd30 Fix incorrent escaping of a backslash; found with mandoc -T lint.
While here, remove needless quoting of one .Sq argument, and quote
another .Sq argument, where quoting is indeed needed, in a less unusual way.
2025-09-22 17:18:40 +00:00
hshoexer
d8b9fe87b4 In wbinvd_on_all_cpus_acked() only request wbinvd from CPUs that
are actually running, i.e. CPUF_RUNNING is set.

Noted by deraadt@

ok claudio@ bluhm@
2025-09-22 13:19:03 +00:00
tb
f8c54f06bd libexpat: fix version line in expat.pc
The last expat update introduced whitespace between # and define, which
resulted in a bogus 'Version: ..' line in expat.pc. Teach the regex about
such whitespace. Unbreaks the build of graphics/rawtherapee.

ok matthieu
2025-09-22 08:24:53 +00:00
sashan
adfd21e9d9 Teach btrace(8) how to resolve addresses in callstacks to symbols.
Overall design comes from deraadt@. The calculation method of DSO
address in traced process virtual address space was suggested by
kettenis@.  Many others provided their feedback and ideas in earlier
versions of this change.

OK claudio@
2025-09-22 07:49:43 +00:00
job
ba3af0f64a For consistency, change a few err() -> errx()
OK tb@
2025-09-22 07:37:28 +00:00
jsg
d40a33f7df enable GuC submission on Meteor/Arrow Lake
GuC submission was disabled as it sometimes failed to initialise
on my Alder Lake machine (T14 Gen 3 Intel).  This continues to happen
on some boots.

However, not using GuC submission results in warnings and graphical
glitches on Meteor Lake (T14 Gen 5 Intel).  So instead of disabling
GuC submission for all platforms, disable it just for Alder Lake-P/N.
2025-09-22 07:00:01 +00:00
jsg
0485bf3761 change the ida_alloc_range() call in new_guc_id() from GFP_KERNEL to
GFP_ATOMIC so pool_get() will be called with PR_NOWAIT

Avoids 'non-zero mutex count: 1' panic when GuC submission is enabled
on gen 12 (Alder Lake, Meteor Lake).

assertwaitok
pool_get
idr_alloc
ida_alloc_range
new_guc_id
assign_guc_id
pin_guc_id (takes submission_state.lock)
2025-09-22 06:25:43 +00:00
jsg
1f893436b6 drm/amdgpu: fix a memory leak in fence cleanup when unloading
From Alex Deucher
5539bc82cedadea42878025ff86117762f098a81 in linux-6.12.y/6.12.48
7838fb5f119191403560eca2e23613380c0e425e in mainline linux
2025-09-22 03:53:32 +00:00
jsg
76aa478937 drm/i915/power: fix size for for_each_set_bit() in abox iteration
From Jani Nikula
215ea32e1fba22e67e7e37add57fd2b94886dba1 in linux-6.12.y/6.12.48
cfa7b7659757f8d0fc4914429efa90d0d2577dd7 in mainline linux
2025-09-22 03:51:47 +00:00
jsg
01779fba6a drm/amd/display: use udelay rather than fsleep
From Alex Deucher
03653847b6ef6229ae6296c217b0f914f8b351a6 in linux-6.12.y/6.12.48
1d66c3f2b8c0b5c51f3f4fe29b362c9851190c5a in mainline linux
2025-09-22 03:50:05 +00:00
jsg
43a8fc1994 drm/amdgpu/vcn4: Fix IB parsing with multiple engine info packages
From David Rosca
6dc4eddeb7e6cca7e1ab32cafbda79d06e652d84 in linux-6.12.y/6.12.48
2b10cb58d7a3fd621ec9b2ba765a092e562ef998 in mainline linux
2025-09-22 03:48:40 +00:00
jsg
3b5f9ba2c1 drm/amdgpu/vcn: Allow limiting ctx to instance 0 for AV1 at any time
From David Rosca
c53a6447d1ab3f89f5e4e989ee79fcddb98782be in linux-6.12.y/6.12.48
3318f2d20ce48849855df5e190813826d0bc3653 in mainline linux
2025-09-22 03:45:30 +00:00
jsg
2505ec04ec drm/amdgpu: Add back JPEG to video caps for carrizo and newer
From David Rosca
8d7cc147124e5dc2bcf881436a2976e94c0fbe86 in linux-6.12.y/6.12.48
2036be31741b00f030530381643a8b35a5a42b5c in mainline linux
2025-09-22 03:43:38 +00:00
jsg
3582473378 Revert "drm/amd/display: Optimize cursor position updates"
From Aurabindo Pillai
86c7bcb6993ce81ecb322d164ba76d3dab29a62b in linux-6.12.y/6.12.48
a5d258a00b41143d9c64880eed35799d093c4782 in mainline linux
2025-09-22 03:42:05 +00:00
jsg
72cfc76821 drm/amd/display: Fix error pointers in amdgpu_dm_crtc_mem_type_changed
From Srinivasan Shanmugam
278d96bd0b4812e07eac8d82b1871d84bbd15e03 in linux-6.12.y/6.12.48
da29abe71e164f10917ea6da02f5d9c192ccdeb7 in mainline linux
2025-09-22 03:39:51 +00:00
jsg
b8f7c0a2d1 drm/i915/pmu: Fix zero delta busyness issue
From Umesh Nerlige Ramappa
996ab5ee7d72d53029f88ac55d6813e83efa405f in linux-6.12.y/6.12.48
cb5fab2afd906307876d79537ef0329033c40dd3 in mainline linux
2025-09-22 03:36:56 +00:00
kettenis
af74cd1213 Add a little bit of code to report the wakeup GPIO that triggered a resume.
ok stsp@, phessler@
2025-09-20 17:43:28 +00:00
helg
623648cde2 This patch addresses incompatibilities in the way that FUSE handles
terminating a FUSE session.

The primary change is:

The Linux libfuse implementation of fuse_loop(3) terminates either when
the kernel sends FUSE_DESTROY or, if fuse_set_signal_handlers(3) has
been called, when it catches one of SIGINT, SIGHUP, or SIGTERM.

The OpenBSD implementation behaves similarly when the file system is
unmounted with umount(8). However, it tries to unmount the file system
automatically when one of the above signals is caught. It should
instead just terminate and rely on fuse_unmount(3) being called later by
the FUSE file system daemon as part of its termination.

Additional changes:

- The FUSE file system daemon's destroy handler is the last operation
  called after the file system is unmounted. Before, it was incorrectly
  being called when FBT_DESTROY is received by fuse_loop(3). The destroy
  handler is now called in fuse_destroy(3).

- The file system is no longer unmounted when the device is closed.
  fuse_unmount(3) now closes the FUSE device before unmount(2) is called to
  prevent deadlocks due to the kernel trying to send FBT_DESTROY when
  fuse_loop(3) is no longer active and there listening for messages from
  the kernel.

  The side effect of this change is that if a FUSE file system daemon
  crashes, the FUSE device is automatically closed but the file system is not
  unmounted. It must be unmounted manually with umount(8).

- Man page updates to reflect this change and correct a few other minor
  errors.


OK claudio@
2025-09-20 15:01:23 +00:00