lualoader: add be-list and be-switch commands
This is useful for driving BE changes from the loader command prompt,
rather than having to use the menu. Note that the active carousel in
the boot environment carousel doesn't currently reflect a switch in
boot environments done this way- I'm considering this only a minor bug,
as you probably can't or won't go back to the menu if you're using these
commands.
Reviewed by: imp (previous version)
libarchive: Clean up the build configuration
* Move settings duplicated in libarchive, bsdcat, bsdcpio, bsdtar, and
bsdunzip into libarchive's Makefile.inc.
* Drop some CFLAGS that merely duplicated some of the contents of our
platform configuration header.
MFC after: 1 week
Reviewed by: mm
Differential Revision: https://reviews.freebsd.org/D57307
assert.h: style(9): Space after #define, between #endif and comment
style(9) still allows TAB after #define but this is a historical
artifact and by far the minority of uses cases. Going forward, we would
like to promote the use of a single space, as it allows alignment to
survive line prefixing (such as in diffs).
style(9) also has prescribed a single space between '#else' or '#endif'
and a comment recalling the guard since 2002.
So, commit 157c184689ea ("assert.h: Remove leading tabs for whitespace
consistency") was good, and in line with rules about whitespace changes
(since the file was heavily modified by surrounding commits).
This commit is thus basically a revert of 439710cf003b ("assert.h:
Revert "Remove leading tabs for whitespace consistency"), which extended
replacing spaces with TABs in the code introduced in the meantime (after
commit 157c184689ea).
[4 lines not shown]
defaultroute: Fix dual-stack and IPv6-only handling
Since IPv6-only setups are becoming more common, and IPv6
connectivity is often sufficient for tasks such as DNS
resolution and NTP time synchronization, update defaultroute
rc.d script to support IPv6-only environments.
Reviewed by: pouria, ae
Differential Revision: https://reviews.freebsd.org/D56797
Revert "defaultroute: Fix dual-stack and IPv6-only handling"
This reverts commit 5b5a836e72ec2614def23409674822c907cf3740.
Despite using arcpatch for this commit, I attributed the wrong
author of the patch.
defaultroute: Fix dual-stack and IPv6-only handling
Since IPv6-only setups are becoming more common, and IPv6
connectivity is often sufficient for tasks such as DNS
resolution and NTP time synchronization, update defaultroute
rc.d script to support IPv6-only environments.
Reviewed by: pouria, ae
Differential Revision: https://reviews.freebsd.org/D56797
Merge commit 63c29df8eceb from llvm git (by Dmitry Polukhin):
[Serialization] Fix assertion on re-deserialized friend template spec… (#200566)
…ialization in PCH (#198133)
A friend function-template specialization declared inside a class
template is serialized into a PCH. When the class template is later
instantiated while loading the PCH, the friend specialization can be
deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
-> VisitFunctionDecl for the same specialization) at the same time as
the canonical copy, producing two redeclarations of the same
specialization in the template's specialization set.
ASTDeclReader::VisitFunctionDecl asserted that this collision could only
happen when merging declarations from different modules. Since
38b3d87bd384, friend functions defined inside dependent class templates
are loaded eagerly, so the collision can now also occur within a single
PCH/AST file (non-modules build), tripping the assertion:
[18 lines not shown]
Merge commit 63c29df8eceb from llvm git (by Dmitry Polukhin):
[Serialization] Fix assertion on re-deserialized friend template spec… (#200566)
…ialization in PCH (#198133)
A friend function-template specialization declared inside a class
template is serialized into a PCH. When the class template is later
instantiated while loading the PCH, the friend specialization can be
deserialized re-entrantly (VisitFriendDecl -> VisitFunctionDecl -> ...
-> VisitFunctionDecl for the same specialization) at the same time as
the canonical copy, producing two redeclarations of the same
specialization in the template's specialization set.
ASTDeclReader::VisitFunctionDecl asserted that this collision could only
happen when merging declarations from different modules. Since
38b3d87bd384, friend functions defined inside dependent class templates
are loaded eagerly, so the collision can now also occur within a single
PCH/AST file (non-modules build), tripping the assertion:
[18 lines not shown]
pci: bcm2838: cleanup on attach failure to fix devmatch panic
Specifically on the RPi CM4, we currently don't set the controller up
right and it never moves into the ready state (we don't observe the link
active bit). Failure to cleanup here actually results in a panic not
long after, due to a use-after-free in the rman bits. Further down in
pci_host_generic, we have some rman stashed in the softc that are
initialized and placed onto the rman tailq, then the softc is later
freed without an rman_fini() to pull them off of the tailq properly.
Note that PCIe on this board won't come up at boot without something
plugged in, so it currently can't be booted with an empty slot with the
intent to hotplug a supported card. Some issues with controller startup
have been observed with Broadcom NICs in the wild, but no problems have
been observed with other NICs and a variety of different PCIe cards.
Shout-out to Vince <git at darkain.com> for the extensive debugging and
analysis to arrive at this conclusion.
[2 lines not shown]
pci: pci_host_generic: provide cleanup methods outside of detach
If device_attach() fails, we're expected to actually cleanup after
ourselves because device_detach() will not be called. Factor out the
cleanup bits that don't rely on attach having actually succeeded so
that we can cleanup properly in bcm2838_pci.
Reviewed by: andrew, imp
Differential Revision: https://reviews.freebsd.org/D56896
kern: ofw: provide ofw_bus_destroy_iinfo to teardown interrupt-map
For symmetry with ofw_bus_setup_iinfo, the next commits will use it to
properly cleanup on failure in bcm2838_pci.
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D56895
amd64/machdep.c: explicitly include sys/uio.h
Some kernel configurations result in struct uio being only
forward-declared.
This is direct commit to stable/15.
Sponsored by: The FreeBSD Foundation
nfsd: Add support for striped Flexible File layout
Without this patch, the NFSv4.1/4.2 pNFS server configuration
did not support striping. This was mainly because the Linux
client driver did not support it either. The Linux client
driver for Flexible File layout does now support striping.
(Linux kernel version 6.18 or newer)
As such, this patch adds striping support. The configuration
is currently just two new sysctls called
vfs.nfsd.pnfsstripeunit - Size (in bytes) of a stripe
vfs.nfsd.pnfsstripecnt - # of DSs to stripe across
A setting of 0 for the first sysctl and 1 for the second
disables striping. A patch that allows use of a different
striping configuration for each exported MDS file system
is planned for the future.
The pnfsdscopymr may be broken by this patch, but since
no one reported that they were actually using a pNFS server
[12 lines not shown]
bsdinstall: Use libarchive secure flags for extract
This doesn't really matter, as we trust that the installer tarballs are
not malicious, but it doesn't hurt to set these flags.
Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57274
(cherry picked from commit f9f46294d6af2a937afa74938bd4bb6826cbb921)
linuxkpi: Make pm_qos.h self-contained
Include <linux/types.h> for `false`. This is needed by amdgpu somewhere
between Linux 6.12 and 6.15.
Reviewed by: Minsoo Choo <minsoo at minsoo.io>, bz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57415