freebsd32_setcred: Copy all of the setcred fields individually
This is the more typical style used in compat syscalls. Modern
compilers are smart enough to coalesce multiple member assignments
into a bulk copy.
Reviewed by: olce, brooks
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D53757
(cherry picked from commit f7ab908244e50c8c8edf314424c860e34ea3d7e9)
freebsd32_setcred: Copy all of the setcred fields individually
This is the more typical style used in compat syscalls. Modern
compilers are smart enough to coalesce multiple member assignments
into a bulk copy.
Reviewed by: olce, brooks
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D53757
(cherry picked from commit f7ab908244e50c8c8edf314424c860e34ea3d7e9)
setcred: Move initial copyin of struct setcred out to per-ABI syscall
This is the more typical approach used in the tree for system calls
with per-ABI structure layouts.
Reviewed by: olce, brooks
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D53756
(cherry picked from commit 6292eecfd95c78abc1ab14f20ceaa507ab9c636a)
MAC: Use the current thread's user ABI to determine the layout of struct mac
This removes mac_label_copyin32() as mac_label_copyin() can now handle
both native and 32-bit struct mac objects.
Reviewed by: olce, brooks
Obtained from: CheriBSD
Sponsored by: AFRL, DARPA
Differential Revision: https://reviews.freebsd.org/D53755
(cherry picked from commit 134d00bd2c910cc7cc21c11fba093ff82bbb9344)
cxgbe tom: Send auxiliary TLS work requests as raw WR mbufs
In particular, the work request to update the TCB state when switching
from plain TCP to TLS is now queued on the connection's offload
transmit queue rather than over the per-port control queue.
This also handles an unlikely edge case that a connection does not
have sufficient credits to transmit other work requests synchronously
such as programming the key in on-card memory or altering TCB fields.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D47763
(cherry picked from commit d869395ac4bd248da7c5bdc67afb19ca89fbeeee)
cxgbe tom: Support sending "raw" WR mbufs on plain TCP and TLS sockets
This is intended to support control work requests that manipulate
connection state but do not transmit data. Raw WRs are transmitted
immediately if possible, otherwise they are queued to an mbufq in the
toe pcb until sufficient credits are available. Raw WRs take
precendence over transmitting socket data.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D47761
(cherry picked from commit e2a2a7581c9663a08b8d92a34040d6fcdfc20816)
cxgbe tom: Halve the size of offload transmit software descriptors
Use bitfields to pack tx_credits and plen into a single 32-bit word.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D47759
(cherry picked from commit 5a38857684907c52982787dbac2c5e5c8abfd4f8)
[GOFF] Add emission of debug sections
This PR adds the definition of the debug sections for emission into
GOFF files. Currently, there is no debugger available which supports
all the sections. However, they all must defined to avoid regression
in LIT test cases.
cross-build make.py: Permit specifying cross toolchains by a package name
Add a --cross-toolchain option whose value is a package name. This is
currently only supported with brew on macOS. A sample invocation is
`--cross-toolchain=llvm at 19`.
Differential Revision: https://reviews.freebsd.org/D51741
(cherry picked from commit 81fc74fd26da2f75c3010595db7a706c3e28d95b)
cross-build make.py: Handle lld brew packages on macOS
Homebrew uses separate packages for llvm and lld starting with llvm19.
To handle this case automatically, pass the binary_name to
default_cross_toolchain() and only use the automatic path for a given
binary if the binary is found in the path (not just if the directory
exists). Add a second clause for ld.lld that looks for a lld package
if lld wasn't found in the llvm directory.
Note that manually specifying the path cannot use a single
--cross-bindir option. Instead, XLD must be manually set in addition
to --cross-bindir when requesting a specific version.
Reviewed by: arichardson
Differential Revision: https://reviews.freebsd.org/D51653
(cherry picked from commit e68d702b3a1fc52145e70d861db89a0f20bfc3a0)
pci_iov: Support dynamic subordinate bus growth during VF creation
Certain SR-IOV devices enumerate Virtual Functions (VFs) on a different
PCIe bus than their parent Physical Function (PF). In such cases, the
default subordinate bus range assigned by BIOS may be insufficient to cover
all VFs.
This patch dynamically expands the subordinate bus range by:
- Allocating additional bus numbers using bus_alloc_resource() when VFs are
initialized
- Releasing the reserved bus range during VF deletion via
bus_release_resource()
Reviewed by: jhb
(cherry picked from commit f7951799877c16cb901be1acc8d6643f0693cec4)
tools/boot/rootgen: Remove stray zfsboot1 from ZFS + MBR + UEFI function
This was copy-pasted from the ZFS + MBF + BIOS function, but without
the corresponding code to extract zfsboot1 from /boot/zfsboot via
dd(1). It's also not necessary since UEFI booting doesn't make use of
BSD label boot blocks (note the lack of any -b option to mkimg when
generating the BSD partition in mk_nogeli_mbr_ufs_uefi()).
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D51544
(cherry picked from commit e958bc1c13377767d9b2cf87d072d923aa3d482a)
cxgbe nic TLS: Fix requests with 8 bytes of immediate data padding
Requests whose immediate data do not end on a 16-byte boundary are
padded with zeroes before the next WR command. Since ULP commands are
8 byte aligned, if there are more than 8 bytes of padding, the
immediate data is padded with zeroes up to an 8 byte boundary and the
last 8 bytes contain a ULP NOOP command.
In the case of exactly 8 bytes of padding, the result should be that
no zeroes are inserted, only the ULP NOOP. However, the code was
actually inserting 8 bytes of zero padding followed by the ULP NOOP
causing the following real command to be misaligned. Fix this by
skipping the zero padding if there exactly 8 padding bytes.
Reported by: Sony Arpita Das @ Chelsio
Sponsored by: Chelsio Communications
(cherry picked from commit 2befd06588325c541d400fcc4915a1adfd1c7d17)
kyua: Don't pass NULL to unique_ptr constructors
This is ambiguous when NULL is defined to an integral constant.
Instead, use the more iodiomatic pattern of {} to construct a default
pointer.
Reviewed by: olce
Differential Revision: https://reviews.freebsd.org/D50090
(cherry picked from commit 26d4ac7a2725c0ab2d536c402fc0185fe7afed85)
kyua: Switch from std::auto_ptr<> to std::unique_ptr<>
A few places were assigning auto_ptr<>s depending on the ownership
handoff. These now use an explicit std::move() as required by
unique_ptr<>.
Reviewed by: ngie, emaste
Differential Revision: https://reviews.freebsd.org/D49790
(cherry picked from commit b392a90ba4e5ea07d8a88a834fd102191d1967bf)
Revert "[RISCV] Support RISCV BitInt larger than 128 (#175515)" (#178311)
This reverts commit e3156c531da5aa4ec604605ed4e19638879d773c.
We need to resolve a crash on trunk and LLVM 22. Reverting makes it
easier to backport.
Fixes #176637.
ctladm: portlist -i lists target and initiator names rather than addresses
Sponsored by: Chelsio Communications
(cherry picked from commit 8206fcc5ef82a0e0518ed5e3a011ef38893b3eb6)