tests/fibs_test: unskip udp_dontroute6 testcase
This test now consistently passes (300+ consecutive runs).
Approved by: lwhsu (mentor)
Signed-off-by: Siva Mahadevan <me at svmhdvn.name>
PR: 244172
Sponsored by: The FreeBSD Foundation
(cherry picked from commit e93e57d3da2ea54598b5db01cc12a3acd656faba)
pkg-stage: Improve symlink creation
Invoke ln with -n and -f. In normal use it doesn't matter, but during
development this might be run in a partially populated leftover tree.
Reviewed by: ivy
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52883
fusefs: better handling for low-memory conditions
Under conditions of low memory, getblk can fail. fusefs was not
handling those failures very systematically. It was always using
PCATCH, which appears to have been originally copy/pasted from the NFS
client code, but isn't always appropriate:
* During fuse_vnode_setsize_immediate, which can be called from many
different VOPs and from the vn_delayed_setsize mechanism, remove
PCATCH. Some of these callers cannot tolerate allocate failure.
* In fuse_inval_buf_range, don't assume that getblk will always succeed.
* When calling fuse_inval_buf_range from VOP_ALLOCATE,
VOP_COPY_FILE_RANGE, or VOP_WRITE (with IO_DIRECT), return EINTR if
the allocation fails.
* When calling fuse_inval_buf_range from VOP_DEALLOCATE, remove PCATCH.
This VOP must not fail with EINTR.
[8 lines not shown]
makeman.lua: Downgrade `make showconfig` error to warning
The sh-based makeman silently ignored errors from `make showconfig`.
Ignore errors also from makeman.lua (but emit a warning).
We may want to revisit this in the future, but want makeman.lua to
behave identically for now.
PR: 294822
Reviewed by: kevans
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56663
tests/netgraph: Add a test for races between if_detach() and vnet_if_return()
A ng_eiface(4) or physical interface does not involve the cloner hence
the detaching is a bit different with epair(4). Add more tests to cover
that.
PR: 292993
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56609
tests: Temporarily skip two testcases
The changes [1] and [2] made to CURRENT introduce races between ifnet
detach and vmove operations. That requires extra effort to fix. They
are not MFCed to stable branches so the latter are not affected.
Temporarily skip two affected tests on CURRENT right now.
[1] 0bf42a0a05b9 bpf: virtualize bpf_iflist
[2] a4d766caf711 bpf: add a crutch to support if_vmove
PR: 292993
Discussed with: kp
tests/net/if_clone_test: Add a test for races between if_detach() and if_vmove_reclaim()
Ideally we shall have tests for all possible races. It is races between
if_detach(), if_vmove_loan(), if_vmove_reclaim() and vnet_if_return().
Well that requires too many tests and it appears to be less valuable to
have them all. So focus on potential in future regressions related to
recent fixes [1] and [2] only.
[1] ee9456ce3753 ifnet: Fix races in if_vmove_reclaim()
[2] ba7f47d47dc1 ifnet: if_detach(): Fix races with vmove operations
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D56606
mixer(8): Deprecate some unintuitive control values
This is a follow-up to cc7479d7dc9b ("mixer(8): Improve mute and recsrc
controls"). These deprecated values will be completely removed on
2026-06-15.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: 0mp
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/21
kgss: de-virtualize kgss_gssd_handle
The RPC client is more of a class rather than an instance. RPCs from
different VNETs are served by the same client. This makes the kgss layer
fully transparent to VIMAGE and not even required to be aware of it.
It is responsibility of the rpcsec_gss module to have curvnet set on the
calling thread when doing RPC calls via kgssapi.
This change should enable proper operation of an NFS server with gssd(8)
in a VIMAGE jail.
PR: 294501
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D56562
(cherry picked from commit 4602d45eb3b1d33e0ea0d97c4d18033af95d7fca)
kgss: remove unnecessary CURVNET_SET() and kgss_gssd_handle checks
These RPC methods correctly acquire the kgss_gssd_handle later with call
to kgss_gssd_client().
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D56561
(cherry picked from commit 2bd2f267f344c51c66fc18d963df8cec78db34c1)
kgss: remove KGSS_VNET_* macros family
The original idea was that something else than VNET(9) might be used for
kgss in jails, but that is very unlikely to happen.
Mechanical change done with sed+grep. No functional change.
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D56560
(cherry picked from commit 50c5715159f172103f68fa90e5423a45aea2a626)
qcom_tlmm: add i2c pull up strength config option
The X1E and others have a separate configuration bit to increase the
pull-up drive strength for i2c busses.
Add the plumbing; it doesn't do anything just yet.
Differential Revision: https://reviews.freebsd.org/D56351
qcom_tlmm: prepare for supporting multiple TLMM platforms
* Create a set of callbacks implementing the hardware specific
GPIO bus operations
* Migrate the IPQ4018 TLMM setup code into qcom_tlmm_ip4018.c
Differential Revision: https://reviews.freebsd.org/D56349
arm64: Ditch arm64-specific unsound PCPU optimisation
The current arm64 PCPU implementation uses a global register asm
variable to use x18, which we reserve with -ffixed-x18, from C. Inside a
critical_enter() or sched_pin(), it is vital that any PCPU reads use the
right PCPU pointer, as often the whole point of the critical_enter() or
sched_pin() is to ensure consistent PCPU use (e.g. for SMR it relies on
zpcpu giving the same SMR state). critical_enter() and sched_pin() both
include atomic_interrupt_fence(), i.e. asm volatile("" ::: "memory"),
barriers to ensure that memory accesses don't get moved by the compiler
outside the critical section, which on most architectures will also
order the read of the PCPU pointer itself (whether due to the read being
another asm volatile statement, or due to using a segment-relative
memory access as on x86). However, this approach on arm64 is in no sense
a memory access, and therefore the register access is not ordered with
respect to the the critical_enter() or sched_pin(), or more specifically
the curthread->td_critnest++ / curthread->td_pinned++ within.
In practice upstream today this works out ok because the read of x18 is
[113 lines not shown]
linux: Ignore sigaction(2) flags SA_UNSUPPORTED and SA_EXPOSE_TAGBITS
SA_UNSUPPORTED was introduced in Linux 5.11 to probe support
for other flags such as SA_EXPOSE_TAGBITS, introduced
at the same time. Ignore both.
Signed-off-by: Ricardo Branco <rbranco at suse.de>
PR: 289285
Reviewed by: pouria, kib
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2163
arm64: Stop using cpu_tlb_flushID in kexec
It will be removed soon & replaces with pmap_s1_invalidate_all_kernel.
This allows us to handle errata that cpu_tlb_flushID is missing
workarounds for.
Sponsored by: Arm Ltd
virtio_net: Use bus_dma for command/ack buffers
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.
The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55564
libgcc_s: Add a linker script to link to libgcc
When using outline atomics on arm64 the compiler will create a call to
a function that performs the atomic operation. This allows us to use
the fastest operation depending on the hardware.
As these functions are implemented in libgcc create a linker script
so libraries that link against libgcc_s will include libgcc to pull
them in.
Reviewed by: imp, jhb
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D45268
virtio_net: Use bus_dma for rxq/txq buffers
While the majority of virtio platforms will be fully coherent, some may
require cache maintenance or other specific device memory handling (eg for
secure partitioning). Using bus_dma allows for these usecases.
The virtio buffers are marked as coherent; this should ensure that sync
calls are no-ops in the common cases.
Reviewed by: andrew
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55492