acpi: Tasks: Precisely report the maximum number of slots used
To this end, store the actual number of busy slots instead of the index
of the final slot selected (off by one), and fix races when updating
'acpi_tasks_hiwater'.
The race is that it could happen that a first thread enqueued a task at
a higher index than the current maximum, followed by a second one
enqueuing at some even higher index, with the first thread updating
'acpi_tasks_hiwater' while the second was exactly after the 'if (i >
acpi_tasks_hiwater)' but just before attempting the atomic_cmpset_int()
that updates 'acpi_task_hiwater', which then would fail silently (the
return value was ignored) leading to the real maximum not being
recorded.
Fix the race by simply testing the return value of atomic_cmpset_int()
and retrying. Use an explicit atomic_load_int() for the guard (that
compiles to a regular load, so this change is cosmetic).
[6 lines not shown]
dwc: fix DEBUG macro name
It conflicts with the general "DEBUG" macro defined as an option in LINT
builds. Since this is actually unused, just rename it to GMAC_DEBUG.
Reviewed by: manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44102
(cherry picked from commit fae39d8da9d5ddf4239fc2143522340c941f6612)
hwpmc: tidy pcd_finalize methods
Make them a little bit more consistent with one another in terms of what
is done:
- Add/reduce assertions to what is most useful: a loop to ensure
pcpu_fini freed everything
- Add PMCDBG trace entries
The exception is the dmc620/cmn600 classes, which behave a little
differently, so leave them untouched.
Reviewed by: jkoshy
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41270
(cherry picked from commit 90a6ea5ca0b1b578e265d2479511bd04347f9510)
mmc_fdt: handle broken-cd property
The documented properties [1] for card-detection are one of:
- cd-gpios
- non-removable
- broken-cd
In cd_setup() we handle the first two, but not the latter, resulting in
a silently undetected card on an affected system.
To work around this, force cd_disabled when broken-cd is specified, so
that the card detect helper function gets to run. A more complete
solution would implement some kind of polling mechanism to detect the
card's presence or removal.
Some variants of the Allwinner D1, such as the Lichee Rv, specify this
property in the mmc0 device node.
[1] sys/contrib/device-tree/Bindings/mmc/mmc-controller.yaml
[9 lines not shown]
amd64: use pc_is_full() helper function
This seems to have been missed in a few places. No functional change
intended.
Reviewed by: kib
MFC after: 1 week
Fixes: 4d90a5afc51b ("sys: Consolidate common implementation details...")
Differential Revision: https://reviews.freebsd.org/D45920
(cherry picked from commit e7f849e25bbca9a74c9d3a5b633f9cd01ba95a55)
acpi: Tasks: Ensure sane values for number of tasks and threads
Make sure that these are set to sane values even on silly tunables:
- There must be at least one thread to process the 'acpi_taskq'.
- Use the ACPI_MAX_TASKS default when a negative number of tasks was
specified. This avoids common pilot errors causing a bogus huge memory
allocation for acpi_tasks[].
Reviewed by: obiwac (older version)
Differential Revision: https://reviews.freebsd.org/D60373
acpi: Tasks: Use M_WAITOK to allocate the taskqueue
Memory failure at this point normally does not happen except if the
kernel is running on a machine with a too tiny amount of memory, in
which case it is likely to panic or to be unusable anyway. However,
letting it panic here with a NULL pointer dereference is not very
helpful. Instead, use M_WAITOK, hoping the memory allocator itself will
indicate the low memory condition if it cannot succeed (if it does not,
it should be changed to).
Reviewed by: obiwac
Differential revision: https://reviews.freebsd.org/D60379
net/asterisk{20,22}: Fix build with non-default options
With certain non-default build options, an error message is displayed,
but the build process itself does not terminate:
sed: 1: "s/^MAKE\s*=\s*//gp
": RE error: trailing backslash (\)
./build_tools/list_valid_installed_externals: line 12: --quiet: command not found
sed: 1: "s/^MAKE\s*=\s*//gp
": RE error: trailing backslash (\)
./build_tools/list_valid_installed_externals: line 12: --quiet: command not found
This may cause issues at runtime.
PR: 300741
Approved by: blanket (fix runtime)
Sponsored by: UNIS Labs
MFH: 2026Q4
(cherry picked from commit c64e227acc4a5349f186f44848f0dfb03252f72d)
net/asterisk2{0,2}: Prepare for new port net/asterisk24
- Move asterisk* from CONFLICTS_INSTALL to CONFLICTS - during the build
on a live system, linking is performed against libraries from the
installed version.
- Parametrize PKGNAMESUFFIX.
PR: 300741
Sponsored by: FLEX-IT LLC (Oleksandr Kryvulia)
Sponsored by: UNIS Labs (vvd)
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>
(cherry picked from commit b66f69d663dbf1531918011b01e70717ceac27a8)
sysutils/podman: Update to 5.8.10
Upstream 5.8.10 addresses CVE-2026-121885 in podman auto-update
restarting arbitrary systemd units via image labels (systemd-only, so
FreeBSD is not affected).
The quarterly branch was at 5.8.6 and had not followed the distfile to the
podman-container-tools GitHub account, so this merge carries the port
directory as it is on main. The containers-common dependency keeps the
package name the quarterly branch has.
Changelog: https://github.com/podman-container-tools/podman/releases/tag/v5.8.10
Reviewed by: dfr, dtxdf
Approved by: dfr (maintainer), dtxdf (mentor)
MFH: 2026Q4
Security: CVE-2026-121885
Differential Revision: https://reviews.freebsd.org/D61494
(cherry picked from commit 94c2904e7faf5a423c7502e39c5a471522ffccfb)