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
[OpenMP] Introduce the ompx_name clause for kernel naming
This adds support for the ompx_name clause that allows users to specify
custom kernel names for OpenMP target offloading regions. The clause
accepts a string literal and overrides the default compiler-generated
kernel names.
Example usage:
#pragma omp target ompx_name("my_kernel")
{ ... }
Kernel names need to be unique or they are diagnosed at compile or link
time as errors.
Co-Authored-By: Claude (claude-sonnet-4.5) <noreply at anthropic.com>
[docs] Minor edits to project governace docs (#203149)
s/non-private/public/
Pencil in the 2027 calendar year election dates, so they are posted well
in advance and we have a link anchor we can share.
initramfs-zfs should not try to copy directories
We had find only return files from the beginning for libgcc.so, but not
libfetch/libcurl. This oversight affected a user when vmware installed
its own libcurl.so.4 in a directory called libcurl.so.4, since our code
then tried to copy a directory, which fails.
Reviewed-by: Chris Longros <chris.longros at gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Suggested-by: Carsten Härle <carsten.haerle at straightec.de>
Signed-off-by: Richard Yao <richard at ryao.dev>
Closes #18582
Closes #18686
[llvm-cas] Fix validation test on Ubuntu / uutils v0.2.2, NFC (#205199)
Work around uutils/coreutils#9128 by implementing the 40 byte truncation
in Python. Otherwise, this test fails out of the box on Ubuntu 25.10.
GNU coreutils supports -s=arg, but Mac truncate does not. Resorting to
Python seemed like the cleanest solution. The next best idea was to use
subshells or other techniques to calculate the file size and subtract
40, but that seemed excessive.
[flang] Reduce FIR AA overhead for functions with one scope. (#204009)
Avoid overheads of collectScopedOrigins and
getDeclarationScope/DominanceInfo
when the values passed to FIR AA belong to a function with a single
dummy scope.
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
[CIR] DataMemberAttr: replace flat index with GEP-style path (#200854)
`DataMemberAttr` stored a single field index relative to the immediately containing class, which broke when the member is inherited: `int Derived::*p = &Derived::x` with `x` in Base produced a spurious `errorNYI` because Derived's CIR record doesn't directly hold `x`.
The attribute now stores a GEP-style `member_path` — a sequence of CIR field indices stepping from the pointer's class type down to the member, one level per inheritance hop. `lowerDataMemberConstant` walks the path accumulating element offsets to produce the Itanium ABI byte value.
`buildMemberPath` searches the `destClass` record tree for the target field (`findFieldMemberPath`). `CK_BaseToDerivedMemberPointer` and `CK_DerivedToBaseMemberPointer` return `{}` in ConstExprEmitter, delegating to the APValue path which builds the correct path via `buildMemberPath`. Virtual bases are not yet handled.
`CK_ReinterpretMemberPointer` remains `errorNYI` on this branch; a follow-up PR will add that separately.
[flang][Semantics] Do not require explicit interface checks for statement functions (#205023)
https://github.com/llvm/llvm-project/pull/198610 caused a regression,
where the
code path for explicit interface checks was also used for the statement
functions arg check. Refactor the code to avoid explicit interface
checks.
Fixes #203500
Assisted-by: AI
ZTS: remove send_delegation tests
These tests are doing the same tests as delegate/zfs_allow_send, and are
hard to follow and maintain. There's no need for them now, so drop them.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18672
ZTS: delegate: add test for send sub-permissions
Regular send and raw send are actually separate operations with separate
permissions. This adds a test to test the combinations properly using
the existing permission test infrastructure.
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18672