zzz: Rewrite to use new power device
Previous script called acpiconf(8) (or apm(8) if ACPI wasn't supported,
although this was anyway redundant because APMIO just uses ACPI now).
Since a new generic power management interface was introduced, this isn't
sufficient, as this would only work for ACPI systems and for ACPI S3 suspend
(so no way to select suspend-to-idle). Rewrite in C to take advantage of the
new power interface.
We may want to add a switch to manually override the kern.power.suspend sysctl,
which is otherwise what the power device uses to decide which suspend type to
switch to (suspend-to-idle or firmware suspend), but this will require us to
amend the power interface.
Reviewed by: olce, imp, mhorne, ziaee
Tested by: mhorne
Approved by: olce, imp, mhorne, ziaee
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56918
padlock: Restore padlock_rng to the amd64 build
Revert 88a53301e19 and d1ca01059d5 . They removed padlock_rng from the
amd64 build under the mistaken belief that this device was available on
32-bit processors only. But it's also available on the 64-bit Via Nano,
Nano X2, and some Zhaoxin CPUs.
PR: 295517
Fixes: 88a53301e19 ("padlock.4: only install on i386")
Fixes: d1ca01059d5 ("padlock(4)/nehemiah: move i386-only entropy")
MFC after: 1 week
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D57215
deskutils/mate-utils: switch to GitHub source
Switch from MATE mirror to GitHub tarball using USE_GITHUB and
GH_ACCOUNT=mate-desktop, add autoreconf, mate-submodules GH_TUPLE,
autoconf-archive, yelp-tools, disable gtk-doc, and remove stale
API doc plist entries.
syslogd: fix memory leak in casper_ttymsg()
nvlist_take_string_array(9) takes ownership of the array and its
strings. casper_ttymsg() freed neither, leaking memory on every
F_CONSOLE and F_TTY message. On long-running systems with high
error-rate syslog traffic routed to /dev/console, syslogd.casper grew
to hundreds of MB.
Use nvlist_get_string_array(9) to borrow the array instead. Update
casper_wallmsg() similarly.
Approved by: src (des)
Closes: https://github.com/freebsd/freebsd-src/pull/2222
Fixes: 61a29eca550b ("syslogd: Log messages using libcasper")
MFC after: 3 days
MFC to: stable/15
PR: 295488
Reported by: Pat Maddox <pat at patmaddox.com>
Reviewed by: markj
[3 lines not shown]
Fix building with LLVM_BINUTILS_BOOSTRAP but without CLANG_BOOTSTRAP
Without this change I get various undefined symbol errors when trying to
link llvm-nm and llvm-objcopy during the cross-tools stage.
Test Plan: builds now
Reviewed by: dim, emaste
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56873
p9fs: Implement msize mount option and bump default to 128 KiB
QEMU warns when msize is <= 8192 due to degraded performance.
This change bumps our default msize to 128 KiB, matching the
Linux Kernel v5.15 and newer default. Linux supports even larger values,
but 128 KiB is a sensible default.
We also add a new 'msize' mount option to allow users to override
this value, and we validate it against our maximum supported MTU
(currently fixed by the UMA zone size).
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56496
p9fs: Refactor buffer allocations to avoid zeroing large payloads
Allocating large buffers with M_ZERO adds unnecessary overhead since
the data is immediately overwritten. This change embeds the tc and rc
p9_buffer structs directly into p9_req_t so we only zero the small
metadata headers. The actual data payload is allocated with M_NOWAIT.
Embedding the metadata headers by value also allows the p9fs_buf_zone
UMA items to be sized exactly to P9FS_MTU, ensuring they are nicely
aligned.
This also adds proper error handling to p9_get_request() to handle
UMA allocation failures.
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56495
bsd.sys.mk: suppress some clang warnings for C++ for >= 19
I just tried building with system clang on one of my Linux systems which
happens to be version 19, and these warning suppressions are needed for
that version too: same errors as in the original commit.
Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56874