Commit Graph

305362 Commits

Author SHA1 Message Date
Olivier Cochard 4756f5ff8f aq(4): Port to IfAPI
Direct access to struct ifnet members is not possible in FreeBSD 15;
accessors must be used.  These exist in all supported FreeBSD versions,
so we do not need to make this conditional.
2025-11-30 10:38:33 -05:00
Rozhuk Ivan 14eb7ec7b7 aq(4): Remove #include of user header <unistd.h>
pause() has 2 different definition in unistd.h and sys/systm.h
2025-11-30 10:38:33 -05:00
Ed Maste 493d26c58e sys: Import snapshot of Aquantia ACQ107 vendor driver
Obtained from https://github.com/Aquantia/aqtion-freebsd commit
c61d27b1d94af72c642deefa0595884481ea7377.

This is not using a vendor branch.  The formerly-upstream repo is
abandoned and I do not believe it will receive updates.  This initial
import serves as a snapshot of the vendor code, but from here we will
iterate on it in the tree as our own code.

Bug fixes, code cleanup, and build infrastructure will follow.

NetBSD and OpenBSD have derivatives of this driver (with additional
hardware support).  We can look to changes in those drivers, and the
Linux driver, to add support here.

Reviewed by:	adrian
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53813
2025-11-30 10:38:33 -05:00
Dag-Erling Smørgrav 029a09f180 sys/_types.h: Actually unbreak gcc build
Fixes:		19728f31ae ("sys/_types.h: Unbreak gcc build")
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53986
2025-11-30 11:31:09 +01:00
Warner Losh 02b72b1540 arm: Remove unused variable in dbg_arch_supported
Removed unused dbg_didr which had been used prior to f42421307b to
detect qemu unsupported debugger. I'm unsure how this slipped through my
testing.

Fixes: f42421307b
Sponsored by: Netflix
2025-11-29 02:47:49 -07:00
Minsoo Choo 57c0a337db libsys: remove armv6 hack
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo f3607f5a7f clang: remove armv6 comment
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo 53da09369c libc: remove ARMv5/6 from man page
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:38 -07:00
Minsoo Choo 3387a1bdba sys: update comment for removal of armv6
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:37 -07:00
Minsoo Choo f42421307b sys: remove armv6/6.1 support from debug monitor
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:36 -07:00
Minsoo Choo 42d704bfc4 sys: remove comment for armv5/6
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:36 -07:00
Minsoo Choo 96265d5ea9 release: match comment for if statement
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:35 -07:00
Minsoo Choo 37c650b4ee tools: remove WITH_LIBSOFT option
This is only used for armv6, which as been removed since FreeBSD 15.

Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:34 -07:00
Jose Luis Duran 3d91a74638 mtree: Keep mtree files indented with spaces
The mtree tool indents directory entries with 4 spaces.

Reviewed by:	imp
Fixes:		9cab9fde5e ("virtual_oss: Port to base")
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D53979
2025-11-29 00:12:39 +00:00
Robert Clausecker 233ddc56a7 unreachable.3: add missing brace in example
Reported by:	alc
Approved by:	markj (mentor)
MFC after:	1 month
Fixes:		b381d09802
See also:	D53967
2025-11-28 22:59:30 +01:00
Warner Losh 687ab0dc54 umass(4): Update to include pointers to quirks
umass(4), while much improved, still sometimes need quirks. Add a
pointer to usb_quirk(4) and usbconfig(8).

Sponsored by:		Netflix
2025-11-28 13:53:13 -07:00
Dag-Erling Smørgrav 19728f31ae sys/_types.h: Unbreak gcc build
We can't assume that <sys/cdefs.h> is in scope.

Fixes:		85ab981a8e ("sys/_types.h: define fallback __(u)intcap_t")
Reviewed by:	olce, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D53980
2025-11-28 20:47:22 +01:00
Dimitry Andric 9978553d01 Remove TableGen objects from libllvm, fixing bad option registrations
In 986e05bc2a I revamped the build for all the llvm subprojects. Among
others I added objects under contrib/llvm-project/llvm/lib/TableGen, but
I missed that upstream explicitly removes these when building the shared
llvm library:

https://github.com/llvm/llvm-project/blob/llvmorg-19.1.7/llvm/tools/llvm-shlib/CMakeLists.txt#L23

In 2e47f35be5 I converted libllvm to a shared library. From that point
onwards, some of the global command line option objects registered in
llvm/lib/TableGen/Main.cpp conflict with similar objects in tools like
llvm-cov, llvm-as, etc.

This results in an error when running these tools: "CommandLine Error:
Option 'o' registered more than once!", followed by a fatal exit.

Fix this by removing the TableGen objects from libllvm. Note that we no
longer install any of the tblgen binaries, these are only used during
buildworld, and then in a statically linked form.

PR:		291233
MFC after:	3 days
2025-11-28 19:14:15 +01:00
Robert Clausecker b381d09802 stddef.h: add unreachable() for C23 compliance
unreachable() is a hint to the compiler that it is unreachable.
Add a new man page unreachable(3) to document this macro.

Reviewed by:	imp
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53967
2025-11-28 16:56:49 +01:00
Robert Clausecker 04d000a378 jemalloc: avoid clash with C23 unreachable() macro
Summary: This avoids a clash with the new macro in <stddef.h>
introduced in D53967

Reviewed by:	imp
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53968
2025-11-28 16:55:05 +01:00
Robert Clausecker f0e541118c uchar.h: add char8_t
A type similar to char16 and char32_t, for compliance with C23.
The related type atomic_char8_t is added to stdatomic.h.
As char8_t is always unsigned char, I've skipped adding __char8_t.
This can be added, too, if desired.

Reviewed by:	imp
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53952
2025-11-28 16:19:53 +01:00
Robert Clausecker 5da388c633 time.h: add timegm() to the C23 namespace
This function is part of ISO/IEC 9899:2024 (C23) and was forgotten in D47856.

Reviewed by:	imp
Approved by:	markj (mentor)
See also:	D47856
Fixes:		59677aecb6
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53951
2025-11-28 16:19:40 +01:00
Aymeric Wibo e966eb4039 acpi: Fix typos in sysctl descriptions
Reviewed by:	thj, emaste
Approved by:	thj
Sponsored by:	The FreeBSD Foundation
2025-11-28 14:42:57 +00:00
Aymeric Wibo eeaa865edb acpi: Fix setting sleep state sysctls to NONE
This restores the functionality as it was pre-97d152698f48.

A stopgap was committed by glebius@ in 34dfccc64f ("acpi: in
acpi_stype_sysctl() use same logic as in acpi_sleep_state_sysctl()").

PR:		290651
Reviewed by:	thj, emaste
Approved by:	thj
Fixes:	97d152698f ("acpi: Use sleep types defined in sys/power.h")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D53909
2025-11-28 14:42:54 +00:00
Christos Margiolis e5d50a679a sound: Retire snd_mixer->busy
Does not really serve any real purpose. It gets set on mixer_open() and
unset on mixer_close(), so it essentially tells us whether the mixer is
open or not.

mixer_close() uses it to return EBADF in case the mixer is not busied,
as in, the mixer has not been open()'d yet. This is redundant. The other
place where this is used is to decide whether to serve an ioctl issued
by userland, in which case it won't if, again, the mixer has not been
busied (i.e., opened). Again, seems redundant.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53859
2025-11-28 15:35:56 +01:00
Dag-Erling Smørgrav 6facc476f3 bus: Apply consistent style to prototypes
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
2025-11-28 10:17:17 +01:00
Dag-Erling Smørgrav 330d4437f2 bus: Add device_has_children predicate
Add a device_has_children() function which can be used to check if a
device has children without allocating a list of them which we aren't
going to use, or even counting them.

Also modify device_get_children() so it can be used to query the count
without allocating a list.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D53918
2025-11-28 10:17:09 +01:00
Navdeep Parhar 34d66b0c96 cxgbe(4): Delete leftovers from $FreeBSD$ removal
No functional change.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2025-11-27 19:33:48 -08:00
Navdeep Parhar dcab3c4f49 Export t4_tom's symbols for other offload modules
This allows iw_cxgbe.ko, cxgbei.ko, nvmf_che.ko, etc. to be loaded when
debug.link_elf_leak_locals and debug.link_elf_obj_leak_locals are
disabled.

PR:		291250
MFC after:	1 week
Sponsored by:	Chelsio Communications
2025-11-27 19:33:27 -08:00
Ed Maste 6901376f59 kgssapi: Remove broken MOD_UNLOAD code
The module panicked at unload with "recursing but non-recursive rw".
There is a comment that "Unloading of the kgssapi module is not
currently supported" and the MOD_UNLOAD case falls through to returning
EOPNOTSUPP anyway.  Just #if 0 the code in the unload path, leaving it
as a hint in case someone implements unload support later on.

PR:		291249
Reviewed by:	rmacklem
Fixes: ad704a34bc ("Use syscall_helper_register(9) rather than syscall_register().")
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53949
2025-11-27 20:29:55 -05:00
Joseph Mingrone 6049f1bc21 git-arc: Fix failure to call arc() function
As of b3e53f9fff, git-arc attempted to call the internal shell
function, arc(), using env(1).  However, because env(1) does not call
shell functions, it actually attempted to run the arc utility.  This led
to errors:

    % git arc create -r xxx HEAD
    env: arc: No such file or directory
    git-arc: could not create Phabricator diff

This change removes the unnecessary use of env(1), so the arc() function
is correctly called.

Reviewed by:	markj
Fixes:		b3e53f9fff ("git-arc: Don't require devel/arcanist")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D53972
2025-11-27 20:53:56 -04:00
Colin Percival a3b0902d73 pkg: Move FreeBSD-base to pkg.freebsd.org
Rather than fetching packages directly from the CDN which currently
backs pkgbase.freebsd.org, requests will go to pkg.freebsd.org mirrors
and be 302ed to the correct servers.  This adds ~70 seconds to the
process of installing or upgrading a pkgbase system; it also orphans
systems with 15.0-{PRERELEASE,ALPHA*,BETA*} installed since they are
expecting to see pkgbase files signed with the pkg keys, not the new
pkgbase signing keys.

Reviewed by:	dch, philip
MFC after:	immediately (for 15.0-RELEASE)
With hat:	re
Requested by:	clusteradm, core
Differential Revision:	https://reviews.freebsd.org/D53964
2025-11-27 14:13:52 -08:00
Olivier Certner 7521dc5dce exports.5: Typo: "auomatically" => "automatically"
Fixes:          9d975e47d5 ("exports.5: Clarify that exported dirs should be local mount points")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
2025-11-27 21:35:31 +01:00
Konstantin Belousov e60861eb41 bsd.lib.mk: document INTERNALLIB and PRIVATELIB
Reviewed by:	des, dim, emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D53948
2025-11-27 21:53:19 +02:00
Dag-Erling Smørgrav 257da67d28 git-arc: Fix existence check
Fixes:		b3e53f9fff ("git-arc: Don't require devel/arcanist")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53942
2025-11-27 20:49:08 +01:00
Dag-Erling Smørgrav b3e53f9fff git-arc: Don't require devel/arcanist
Instead of invoking just “arc”, which requires devel/arcanist, which
conflicts with archivers/arc, invoke the underlying script installed by
devel/arcanist-lib.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53942
2025-11-27 19:07:15 +01:00
Brooks Davis 4e22cd3bf0 add types: (u)int64ptr_t
This type represents an integer value of at least 64 bits which is
capable of being cast to and from pointer types.  It is intended to
replace various spellings of (u)int64_t there the value is expected to
hold a pointer.  This is common in Linux code to allow 32-bit and 64-bit
structures to be the same and used other places including OpenZFS.  With
the introduction of CHERI this no longer works, but we need to preserve
the ABI for integer pointer targets.  Rather than adding ifdefs in every
case, we introduce a new type.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53823
2025-11-27 14:54:56 +00:00
Brooks Davis 6ebbfe723b sys/_types.h: add __intptr_t to __mbstate_t
Extend __mbstate_t to include an intptr_t to ensure it can hold a
pointer if required.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53822
2025-11-27 14:54:56 +00:00
Brooks Davis 528e70a12c sys/_types.h: add void * to __max_align_t
Add a pointer member to __max_align_t as pointers may have different
alignment requirements than long long or long double.

Reviewed by:	kib
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53821
2025-11-27 14:54:56 +00:00
Brooks Davis 85ab981a8e sys/_types.h: define fallback __(u)intcap_t
__intcap_t and __uintcap_t are new primative types in CHERI-aware ABIs
that are used to define (u)intptr_t.  To allow coexistance of integer
pointers and hybrid code, define them to __(u)intptr_t when they are
not otherwise available.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53820
2025-11-27 14:54:56 +00:00
Brooks Davis 96e05e2d1d sys/_types.h: define __(u)int(f)ptr_t for CHERI
On pure-capability ABIs, uintptr_t and variants are capabilities and
defined to the new primative type __uintcap_t and variants.  This is
required to allow pointers (capabilities) to round trip through
uintptr_t as required by the C standard.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53819
2025-11-27 14:54:56 +00:00
Brooks Davis 6aaba75383 sys/_types.h: centralize __vm_offset_t and __vm_size_t definitions
Use __ptraddr_t to define __vm_offset_t and __size_t for __vm_size_t
rather than per-pointer-size definitions.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53818
2025-11-27 14:54:56 +00:00
Brooks Davis dca634d154 new type: ptraddr_t
ptraddr_t is an unsigned integer type that can hold the address of any
pointer.  It differes from uintptr_t in that it does not carry
provenance which is useful for CHERI in that it can disambigurate the
provenance of uintptr_t expressions.  It differes from size_t in that
some segmented architecture (not supported by FreeBSD) may have a size_t
that does not hold an address.

ptraddr_t is not yet standardized, but is currently proposed for
inclusion in C++2Y.

Prefer the compiler defined __PTRADDR_TYPE__ defintion where available
as this a new type and we don't need to worry about historical values.
Fall back to __size_t where unavailable.

Reviewed by:	kib, markj
Effort:		CHERI upstreaming
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D53817
2025-11-27 14:54:55 +00:00
Kristof Provost 39cbfc78b5 pf tests: pflog:{rdr_action,state_max} disable IPv6
Turn off IPv6 on all interfaces to avoid having multicast listener
reports generated that might turn up in out pflog output, disrupting
the test.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-11-27 11:43:54 +01:00
Kristof Provost 685d5860ac pf tests: explicitly set the source address in killstate:v6
We've seen failures due to pft_ping.py selecting the wrong source address.
Explicitly use 2001:db8::1 as source, to match the tests's expectations.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-11-27 11:43:53 +01:00
Kristof Provost 8cf099b4fc pf tests: fix syncookie:loopback_v6
Use 'no_dad' when assigning a v6 address, because otherwise we may try
to use it before it becomes usable.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-11-27 11:43:53 +01:00
Kristof Provost a82347584b pf tests: fix killstate:v6
Allow neighbor discovery/advertisement packets, but don't create state
for them. This ensures that the destination jail can respond to our
echo requests, and that we don't create extra states that would confuse
the test.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-11-27 11:43:53 +01:00
Olivier Certner d9e734d650 exterrvar.h: style(9): Fix two small nits
- Use tabs before '\'.
- Comment for '#else' must be the negation of the initial '#if''s test.

No functional change.

Sponsored by:   The FreeBSD Foundation
2025-11-27 11:07:15 +01:00
Olivier Certner 000d5b52c1 setcred(2): Fix a panic on too many groups from latest commit
kern_setcred_copyin_supp_groups() is documented to always set
'sc_supp_groups', but did not do it if there are more supplementary
groups than 'ngroups_max'.  Also, that case was omitted from the herald
comment.  Add it there, also including it as a case where
'sc_supp_groups_nb' is reset to 0 as a security measure.

Initially, kern_setcred_copyin_supp_groups() had the usual property that
nothing had to be freed on it returning an error, but was then converted
to relying on the caller to free() even on error, and this part was
missed during the conversion.  The benefits of this unusual convention
are that we can zero or NULLify groups-related attributes in advance,
preventing inadvertent use of stale data (defensive security measure),
and we can avoid some small code duplication (no need to have two same
calls to free()).  This makes sense as kern_setcred_copyin_supp_groups()
is meant to be a private sub-routine of user_setcred() only.  While
here, rename kern_setcred_copyin_supp_groups() =>
user_setcred_copyin_supp_groups().

Reported by:    pho
Fixes:          4cd93df95e ("setcred(): Remove an optimization for when cr_groups[0] was the egid")
Sponsored by:   The FreeBSD Foundation
2025-11-27 11:05:50 +01:00
Ruslan Bukin 06a4a092e6 riscv: include Xilinx PCIe controller driver.
This is used on Codasip Prime.

Sponsonred by: CHERI Research Centre
2025-11-27 08:59:38 +00:00