x86: Harmonize GENERIC and MINIMAL
* Reorder MINIMAL so everything is in the same order as in GENERIC.
* Wherever comments diverged, except for the explanatory comment at
the top, copy the GENERIC version to MINIMAL.
* Add KDTRACE_FRAME to i386 GENERIC; it was already in MINIMAL, and
adding it to GENERIC seemed like the more correct move.
With these changes, MINIMAL is a strict subset of GENERIC, apart from
the identifier and the explanatory comment at the top.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57729
pfsync: remove invalid panic
When we undefer a packet (when the peer acks the state) it's possible
that we don't find a corresponding pfsync_deferral. We panic here, but
that's actually something that can happen in normal operation:
- if we have too many deferred packets already (in pfsync_defer())
- if the deferral timed out (in pfsync_defer_tmo())
Remove this panic and document the scenarios where it might occur.
MFC after: 2 weeks
Sponsored by: Orange Business Services
(cherry picked from commit 035e87247f845500b4672e10efb8f47fd2c0f2a2)
pfsync: remove invalid panic
When we undefer a packet (when the peer acks the state) it's possible
that we don't find a corresponding pfsync_deferral. We panic here, but
that's actually something that can happen in normal operation:
- if we have too many deferred packets already (in pfsync_defer())
- if the deferral timed out (in pfsync_defer_tmo())
Remove this panic and document the scenarios where it might occur.
MFC after: 2 weeks
Sponsored by: Orange Business Services
(cherry picked from commit 035e87247f845500b4672e10efb8f47fd2c0f2a2)
nfscl: Add support for flexible file layout striping
Commit 72e57bc26417 added support for striping to the pNFS
server configuration. This patch adds support for striping
to the NFS client.
For striped flexible file layouts, an extra structure
must be malloc()d for each stripe, since the number
of stripe servers can vary from one mirror to another.
This new structure is called nfsffs and a single one
of these structures is in the nfsffm structure so that
the non-striped layouts can avoid the additional malloc()'s.
This patch only affects NFSv4.1/4.2 mounts that use the
"pnfs" mount option against servers that support the
flexible file layout.
loader.efi: Fix a comment
Move a comment further up in the file. After the sethead() we need to
use efi_exit(), not after the performance measuring stuff.
Sponsored by: Netflix
edk2: Bring in some more files from edk2-stable202502
These are needed for memdisk support, so import them separately.
These are from 202502, like all the other files here.
Sponsored by: Netflix
qemu: Add tools to generate useful tables from FreeBSD sources
This generates a table of all the socket options with fixed types
so that programs like qemu can use those tables rather than having
to free code thigs.
Sponsored by: Netflix
vgrind: Tear down vgrind support
vgrind has been disconnected from the build for a while. Remove from
the build, and gc vgrid support in the few remaining places.
Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D57648
edk2: Fixup imported files line endings
Since these files were a direct commit, I don't have to fix the vendor
branch. Remove the DOS line endings. It doesn't matter one way or another,
but we should be consistent within the tree.
Sponsored by: Netflix
ipfw/nat64: Fix type confusion panic when using wrong NAT64 instance type
Add etlv type validation to ipfw_nat64clat() and ipfw_nat64stl() to
verify that the retrieved instance is actually a nat64clat instance
before use.
All NAT64 instance types share the same srvstate[] array but have
different struct layouts.
Without type validation, using the wrong instance type with
a handler causes type confusion and kernel panic.
Signed-off-by: Teddy Engel <engel.teddy at gmail.com>
PR: 292023
Reviewed by: pouria
Pull Request: https://github.com/freebsd/freebsd-src/pull/2259
librpcsec_gss: Fix an off-by-one in rpc_gss_get_principal_name()
Include an extra byte for the nul-terminator, otherwise we may end up
with an out-of-bounds write.
The corresponding bug in the kernel implementation was fixed by commit
e3081f7e3e2d ("kgssapi(4): Fix string overrun in Kerberos principal construction").
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D57738
acpi: Set 'acpi_sstate' closer to setting 'acpi_stype'
Makes on-going modifications for hibernate easier.
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
acpi: Button sleep/wake callbacks: Expose true argument types
This makes the interface composed of the
acpi_event_{power,sleep}_button_{sleep,wake}() functions more accurate
and clears the risk of calling them with a wrong object (such as a wrong
softc).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
acpi: Sleep/wake event handlers: Expose first argument's true type
This is for clarification and to slightly simplify code.
At present, the EVENTHANDLER(9) subsystem does not check that the first
argument to the event handler, registered via EVENTHANDLER_REGISTER(),
is of the right type with respect to the type declaration passed to
EVENTHANDLER_DECLARE(), so in that infrastructure no additional safety
is gained by this change.
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
acpi: Suffix acpi_sleep_enable() with '_locked'
For clarification. This function assumes that the acpi mutex is held,
contrary to acpi_sleep_disable().
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
power: Make POWER_STYPE_COUNT equal to POWER_STYPE_UNKNOWN
This avoids having to list POWER_STYPE_COUNT, which is semantically not
an allowed value, in 'switch' statements along with POWER_STYPE_UNKNOWN.
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
acpi: Constify thanks to AcpiGetHandle() taking a constant pathname
Make the ACPI interface's functions evaluate_object() and get_property()
take a constant pathname (by substituting ACPI_STRING with 'const char
*').
This allows to remove some __DECONST().
No functional change (intended).
Reviewed by: obiwac
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/OlCe2/freebsd-src/pull/8
kern: add a security knob to disable unprivileged access to kenv
We sometimes store sensitive things in the kenv that get zapped, but we
really shouldn't rely on that zapping to actually happen. Most
unprivileged processes don't really need to read from the kernel
environment in the first place, so add a knob that allows it to be
disabled.
Note that we consider jailed root to be unprivileged from this
perspective; they have their own meta/env concepts and we should
encourage users to take advantage of those for passing information to
jails.
"Hey we should do something about that": dch
Reviewed by: imp, ziaee, zlei (all slightly previous version)
Differential Revision: https://reviews.freebsd.org/D57697
amdsmu(4), acpi_spmc(4): Fix ordering of calls
The AMD SMU is supposed to be notified of suspension the SPMC has been,
and conversely on resume, as expressed in comments.
Fix the EVENTHANDLER(9) priorities used so that they match the
comments. Lower values indeed indicate higher priority in this
subsystem.
Reviewed by: obiwac
Fixes: 2c60fce365f4 ("amdsmu: Sleep entry/exit hints for PMFW")
Event: Halifax Hackathon 202606
Sponsored by: The FreeBSD Foundation
etcupdate: Recommend building when bootstrapping
Since building is no longer the default, add -b to the bootstrapping
examples as they are likely to be run with a tree that hasn't been
built.
MFC after: 1 week
Fixes: ddf6fad0295a ("etcupdate: Make nobuild the default")
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D57643
etcupdate: Warn if the tree hasn't been built
Warn the user before trying `make installetc` if etcupdate was invoked
without -b (or with -B) and it appears that `make buildetc` hasn't
already been run (which usually happens as part of `make buildworld`).
MFC after: 1 week
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D57504
RDMA: dma-mapping: use unsigned long for dma_attrs
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from: Linux commit 00085f1efa387a8ce100e3734920f7639c80caa3
Sponsored by: Chelsio Communications
OFED: Implement ib_process_cq_direct
This is largely pulled from the original Linux commit to add cq.c.
Note that irq_poll is still not supported, but polling should now be
possible whereas it wasn't really before.
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Obtained from: Linux commit 14d3a3b2498edadec344cb11e60e66091f5daf63
Sponsored by: Chelsio Communications
OFED: Use vmalloc() and vzalloc() in various places
This contains changes from the following Linux commits:
10313cbb9220 IPoIB: Allocate priv->tx_ring with vmalloc()
b1404069f644 IPoIB/cm: Use vmalloc() to allocate rx_rings
948579cd8c6e RDMA: Use vzalloc() to replace vmalloc()+memset(0)
Tested by: Wafa Hamzah <wafah at nvidia.com> (mlx5_ib)
Tested by: John Baldwin <jhb at FreeBSD.org> (iw_cxgbe)
Sponsored by: Chelsio Communications