add nprice to committers-src
Approved by: adrian (mentor)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D59860
Signed-off-by: Nick Price <nprice at FreeBSD.org>
hastd: Use fixed-length protocol names
All communication between hastd nodes and internally between hastd and
its worker children passes through the same pair of send / receive
functions. The receive function uses recv(2) with the MSG_WAITALL flag,
which in theory means we should never get a short read. However, when
handing off a socket to a worker child, we also pass a variable-length
string identifying the type of socket we're passing, and reading this
string relies on a short read. This used to work because the arrival of
the descriptor would interrupt the recv(2) call, but this bug was fixed
when the AF_UNIX code was rewritten a while ago and hastd has been
broken ever since.
Fixing the length of the protocol name to four characters including the
terminating null solves the short-read bug by never requiring a short
read (nothing else in hastd requires one).
Note that this issue appears to have been reported independently first
by Alessandro Sagratini in PR 292322 and then by Martin Vidovic in
[11 lines not shown]
hastd: Ensure nvpair padding is initialized
The proto-libnv implementation embedded in hastd pads names and values
out to the nearest multiple of eight bytes, but leaves the padding
uninitialized, leaking up to 14 bytes of recycled heap per pair in a
message.
While here, switch from bcopy() to memcpy().
MFC after: 3 days
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D59343
(cherry picked from commit 911bda7cffbf358c4e83ea05cfe980d429aff61c)
tests: Fix graid3 insert tests
The script was passing the wrong device name to `graid3 insert` and
didn't notice that the command was failing.
MFC after: 1 week
Event: EuroBSDcon 2026 DevSummit
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D59564
(cherry picked from commit 4cc85d1f00fa1938923fe8d6fc2934593d4303b4)
graid3: Restore lock acquisition
The lock acquisition in g_raid3_ctl_insert() was improperly dropped a
while ago, making it impossible to add or replace a device in an
existing graid3. This went unnoticed because the tests are broken.
MFC after: 1 week
Fixes: fcf69f3dbce6 ("Consistently use gctl_get_provider instead of home-grown variants.")
Event: EuroBSDcon 2026 DevSummit
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D59563
(cherry picked from commit 9094f86b57a7e4b356cae83f35c8d41c842b42a2)
hastd: Ensure nvpair padding is initialized
The proto-libnv implementation embedded in hastd pads names and values
out to the nearest multiple of eight bytes, but leaves the padding
uninitialized, leaking up to 14 bytes of recycled heap per pair in a
message.
While here, switch from bcopy() to memcpy().
MFC after: 3 days
Reviewed by: kevans, emaste
Differential Revision: https://reviews.freebsd.org/D59343
(cherry picked from commit 911bda7cffbf358c4e83ea05cfe980d429aff61c)
hastd: Use fixed-length protocol names
All communication between hastd nodes and internally between hastd and
its worker children passes through the same pair of send / receive
functions. The receive function uses recv(2) with the MSG_WAITALL flag,
which in theory means we should never get a short read. However, when
handing off a socket to a worker child, we also pass a variable-length
string identifying the type of socket we're passing, and reading this
string relies on a short read. This used to work because the arrival of
the descriptor would interrupt the recv(2) call, but this bug was fixed
when the AF_UNIX code was rewritten a while ago and hastd has been
broken ever since.
Fixing the length of the protocol name to four characters including the
terminating null solves the short-read bug by never requiring a short
read (nothing else in hastd requires one).
Note that this issue appears to have been reported independently first
by Alessandro Sagratini in PR 292322 and then by Martin Vidovic in
[11 lines not shown]
tests: Fix graid3 insert tests
The script was passing the wrong device name to `graid3 insert` and
didn't notice that the command was failing.
MFC after: 1 week
Event: EuroBSDcon 2026 DevSummit
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D59564
(cherry picked from commit 4cc85d1f00fa1938923fe8d6fc2934593d4303b4)
graid3: Restore lock acquisition
The lock acquisition in g_raid3_ctl_insert() was improperly dropped a
while ago, making it impossible to add or replace a device in an
existing graid3. This went unnoticed because the tests are broken.
MFC after: 1 week
Fixes: fcf69f3dbce6 ("Consistently use gctl_get_provider instead of home-grown variants.")
Event: EuroBSDcon 2026 DevSummit
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D59563
(cherry picked from commit 9094f86b57a7e4b356cae83f35c8d41c842b42a2)
kern.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):
Fix -Wformat diagnostic after #190965 (#193704)
Fixes libunwind compiler diagnostic when building with clang after
034d4dcad6396d1241e8262e69871b8d61da7e4f:
```
In file included from libunwind/src/libunwind.cpp:31:
In file included from libunwind/src/UnwindCursor.hpp:52:
libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
338 | "function starting at 0x%llX",
| ~~~~
| %lX
339 | compactEncoding, functionStart);
| ^~~~~~~~~~~~~
libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
215 | #define _LIBUNWIND_DEBUG_LOG(msg, ...) _LIBUNWIND_LOG(msg, __VA_ARGS__)
| ~~~ ^~~~~~~~~~~
libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'
[23 lines not shown]
kern.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit bcd0d76d4882dd8d19a49c050411b5c58a0deb74)
bsd.sys.mk: make clang 23 -Wunused-but-set-global non-fatal
This warning triggers in a few places in contributed code, and would
therefore be annoying to fix. Use -Wno-error= to at least show the
warnings so there is some incentive to submit them upstream.
MFC after: 3 days
(cherry picked from commit d577b4ed588c0f259d7298188233b17dc0435dd4)
Merge commit 1f332ae4f1b3 from llvm-project (by Alexander Kornienko):
Fix -Wformat diagnostic after #190965 (#193704)
Fixes libunwind compiler diagnostic when building with clang after
034d4dcad6396d1241e8262e69871b8d61da7e4f:
```
In file included from libunwind/src/libunwind.cpp:31:
In file included from libunwind/src/UnwindCursor.hpp:52:
libunwind/src/CompactUnwinder.hpp:339:46: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
338 | "function starting at 0x%llX",
| ~~~~
| %lX
339 | compactEncoding, functionStart);
| ^~~~~~~~~~~~~
libunwind/src/config.h:215:63: note: expanded from macro '_LIBUNWIND_DEBUG_LOG'
215 | #define _LIBUNWIND_DEBUG_LOG(msg, ...) _LIBUNWIND_LOG(msg, __VA_ARGS__)
| ~~~ ^~~~~~~~~~~
libunwind/src/config.h:181:45: note: expanded from macro '_LIBUNWIND_LOG'
[23 lines not shown]
Fix statement with no effect in linuxkpi's xarray.h
When compiling the kernel with gcc 14, errors similar to the following
are emitted:
sys/dev/cxgbe/iw_cxgbe/ev.c: In function 'c4iw_ev_handler':
sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
132 | flags == 0; \
sys/dev/cxgbe/iw_cxgbe/ev.c:274:17: note: in expansion of macro 'xa_unlock_irqrestore'
274 | xa_unlock_irqrestore(&dev->cqs, flag);
| ^~~~~~~~~~~~~~~~~~~~
sys/compat/linuxkpi/common/include/linux/xarray.h:132:23: error: statement with no effect [-Werror=unused-value]
132 | flags == 0; \
sys/dev/cxgbe/iw_cxgbe/ev.c:283:17: note: in expansion of macro 'xa_unlock_irqrestore'
283 | xa_unlock_irqrestore(&dev->cqs, flag);
| ^~~~~~~~~~~~~~~~~~~~
It looks like the intent of the "flags == 0" statement was to make the
'flags' macro argument not unused, but it still results in a warning.
[5 lines not shown]
ec2-desktop: Don't enable firstboot_pkgs
We don't have any packages to install by default when the instance
first boots, so (as with the "small" flavour) don't enable the
firstboot_pkgs script. If someone wants to launch a desktop with
packages autoinstalled at first boot, they can enable the script at
the same time as they provide the list of packages.
Sponsored by: Amazon
ec2-desktop: Fix shell expansion in ec2_setpass
Using a backtick inside a backtick-expansion isn't a good idea; switch
instead to using $( ... ).
Fixes: a9710349513f ("EC2: Add desktop flavour")
Sponsored by: Amazon
acpidump: Add decoding of the MSDM table
Add support for dumping the Microsoft Data Management (MSDM) table,
which contains the Windows product key embedded in firmware by the OEM.
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D59662
bhyvectl: support querying VM pid
Extend bhyvectl(8) to support querying VM pid using the
`--get-vm-pid` flag.
This is useful in monitor mode when the VM pid differs
from the main bhyve(8) process run by the user. Knowing the VM pid
is necessary, for example, to query process resource usage or
trigger ACPI shutdown with SIGTERM.
Of course, it could be obtained by matching the monitor process
children by the process title, but it's a little more complex
and fragile than it could be.
Implement that by adding the "get_vm_pid" IPC command,
and using it to implement `bhyvectl --get-vm-pid`, which
prints the VM PID.
When the VM PID is not known, ESRCH is returned.
[4 lines not shown]