Commit Graph

309054 Commits

Author SHA1 Message Date
Ricardo Branco 4f9f09d951 compat/linprocfs: Add some entries to /proc/sys/fs and /proc/sys/kernel
Add following sys/fs entries to linprocfs(4):
* proc/sys/fs/file-max
* proc/sys/fs/file-nr
* proc/sys/fs/nr_open
* proc/sys/fs/overflowuid
* proc/sys/fs/overflowgid
* proc/sys/fs/suid_dumpable
* proc/sys/fs/protected_hardlinks
Also, add /proc/sys/kernel/threads-max

Signed-off-by:	Ricardo Branco <rbranco@suse.de>
PR:		294713
Reviewed by:	markj, pouria
Pull-Request:	https://github.com/freebsd/freebsd-src/pull/2159
2026-04-26 21:23:23 +03:30
Lexi Winter b7daab8be1 apm: Only install rc script on i386
The apm(8) rc script only works on i386, but it's installed on all
platforms.  Only install it on i386, which avoids creating a useless
FreeBSD-apm package on other platforms.

While here, build the acpi package on i386.

MFC after:	2 weeks
Reviewed by:	imp
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D56629
2026-04-26 17:47:27 +01:00
Dag-Erling Smørgrav 4dd97955e6 libpkgconf: Fix paths
${LOCALBASE:U} evaluates to exactly the same thing as ${LOCALBASE}.
Presumably what was meant was ${LOCALBASE:U/usr/local}.

Fixes:		b8352da33f ("pkgconf: import into the base system")
Reviewed by:	khorben
Differential Revision:	https://reviews.freebsd.org/D56642
2026-04-26 15:41:47 +02:00
Timo Völker 28932dc425 tuntap: add SIOCGIFCAP and SIOCSIFCAP ioctls
Add SIOCGIFCAP ioctl-command for tun/tap character device to be used
by bhyve for offloading in the future.
Add SIOCSIFCAP for symmetry.

Reviewed by:		markj, pouria, tuexen
MFC after:		1 week
Event:			Wiesbaden Hackathon 2026
Differential Revision:	https://reviews.freebsd.org/D51289
2026-04-26 11:48:36 +02:00
Timo Völker 1bfd392b9e vtnet: remove loader tunable fixup_needs_csum
Removes the deprecated loader tunable fixup_needs_csum. Removes also
the sysctl counter rx_csum_bad_offset that is no longer in use.

Reviewed by:		tuexen
Event:			Wiesbaden Hackathon 2026
Differential Revision:	https://reviews.freebsd.org/D55588
2026-04-26 11:42:38 +02:00
Warner Losh 1f72d525fc Revert "nda: Filter non-storage nvme drives"
This reverts commit b40205855e. There's an
aparent path lifetime issue in it that needs to be investigated.

Sponsored by:		Netflix
2026-04-25 21:16:05 -06:00
Konstantin Belousov 85a04bea5a conf/std.nodebug: disable DEBUG_LOCKS
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2026-04-26 05:18:58 +03:00
Mark Johnston e3b8e55e71 netbsd-tests: Fix the mmap_truncate_signal test
Add a volatile qualifier in the loop which triggers SIGBUS, as otherwise
the compiler is smart enough to elide it, replacing it with a check for
page != 0.

MFC after:	1 week
2026-04-26 01:56:14 +00:00
Mark Johnston a02d794f5a nullfs: Clear inotify flags during reclaim
The inotify flags are copied from the lower vnode into the nullfs vnode
so that the INOTIFY() macro will invoke VOP_INOTIFY on the nullfs vnode;
this is then bypassed to the lower vnode.  However, when a nullfs vnode
is reclaimed we should clear these flags, as the vnode is now doomed and
no longer forwards VOPs to the lower vnode.

Add regression tests.  Remove a test in vn_inotify_revoke() which is no
longer needed after this change.

PR:		292495
Reviewed by:	kib
Reported by:	Jed Laundry <jlaundry@jlaundry.com>
Fixes:		f1f230439f ("vfs: Initial revision of inotify")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56639
2026-04-26 01:56:14 +00:00
Mark Johnston bea1741147 tests/ipfw: Make tests run more reliably in parallel
- Don't use /dev/null as the pidfile for inetd, that doesn't work
  properly.  Create a pidfile in the per-test scratch directory.
- Use atf_check to validate results from setup commands.

MFC after:	1 week
2026-04-26 01:56:13 +00:00
Greg Lehey 1316cf5094 Fix reversion introduced in commit 32b0dfb326
Noted by: mckusick
2026-04-26 11:45:11 +10:00
Christos Longros cd06f79e29 build: use pax tar format for make dist
Automake's default tar formats (v7 pre-1.18, ustar since) impose path
length limits that drop several long test filenames from the release
tarball when `make dist` runs. Pax format has no such limit and is
read by GNU tar 1.14+ and libarchive/bsdtar.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Closes: #17276
Closes: #18465
2026-04-25 15:24:38 -07:00
Ryan Moeller 2a9a70a2af include: Remove duplicate lzc_send_space prototype
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan.moeller@klarasystems.com>
Closes #18463
2026-04-25 15:07:16 -07:00
Tony Hutter 2d7ed99145 CI: curl fallback, print killed tests, FreeBSD URL
- We've seen occasional 'ERROR 502: Bad Gateway' from the runner trying
to download an image with axel.  Axel can open multiple connections for
a faster download, so maybe that's causing problems.  This commit adds
in a fallback to curl if the axel download doesn't work.

- Update merge_summary.awk to print out killed tests in the summary.
We've seen cases where the summary page was red but there were no test
failures printed.  This is because one of the VMs had too may
killed tests, which caused the total test time to run too long and
caused the runner to timeout qemu-6-test.sh. When the runner kills off
qemu-6-tests.sh, it means we never generate the nice summary page
for that VM listing the killed off tests.  This commit parses the
partial test logs for killed off tests and includes them in the
merge_summary.awk output.

- Print an error message in the summary page if one of the VMs
didn't complete ZTS.  This helps draw attention to a VM crash.

- FreeBSD sometimes has broken links to their CI image. When that
happens, select the newest nightly snapshot image as an alternative.
This is needed right now, since the current images in the FreeBSD 16
"current/" directory are returning 404 errors.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #18460
2026-04-25 14:44:58 -07:00
Christos Longros 4a58ab8ce2 zfs.4: document five missing module parameters
Add entries for module parameters that are exposed via
ZFS_MODULE_PARAM but not covered in zfs.4:

  zfs_active_allocator          (charp,  module/zfs/metaslab.c)
  zfs_compressed_arc_enabled    (int,    module/zfs/arc.c)
  zfs_arc_no_grow_shift         (uint,   module/os/freebsd/zfs/arc_os.c)
  zfs_scan_blkstats             (int,    module/zfs/dsl_scan.c)
  zfs_snapshot_history_enabled  (int,    module/zfs/dsl_dataset.c)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Christos Longros <chris.longros@gmail.com>
Closes #18456
2026-04-25 14:39:43 -07:00
Ahmad Khalifa d1854272b6 vt_core: make sure the driver's functions exist
These are NULL if they're not implemented. Make sure all the functions
we need are there before doing anything.

Also invert the first if statment to lessen the indentation a bit.

Reported by:	Quentin Thébault <quentin.thebault@defenso.fr>
MFC after:	3 days
2026-04-26 00:35:08 +03:00
Ahmad Khalifa e72c59315e vt_core: delay the shutdown splash event handler
Even though the functions are currently executed in the correct order,
there's no garuntee that this will always be the case.

Reported by:	kevans
Discussed with:	kevans
Fixes:		4b862c713a
MFC after:	3 days
2026-04-26 00:35:07 +03:00
Zhenlei Huang ba7f47d47d ifnet: if_detach(): Fix races with vmove operations
The rationality is that the driver private data holds a strong reference
to the interface, and the detach operation shall never fail. Given the
vmove operation, if_vmove_loan(), if_vmove_reclaim() or vnet_if_return()
is not atomic and spans multiple steps, acquire ifnet_detach_sxlock only
for if_detach_internal() and if_vmove() is not sufficient. It is possible
that the thread running if_detach() sees stale vnet, or the vmoving is
in progress, then if_unlink_ifnet() will fail.

Fix that by extending coverage of ifnet_detach_sxlock a bit to also
cover if_unlink_ifnet(), so that the entire detach and vmove operation
is serialized.

Given it is an error when the if_unlink_ifnet() fails, and if_detach()
is a public KPI, prefer panic() over assertion on failure, to indicate
explicitly that bad thing happens. That shall also prevent potential
corrupted status of the interface, which is a bit hard to diagnose.

PR:		292993
Reviewed by:	glebius
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D56374
2026-04-26 03:56:07 +08:00
Pierre Pronchery e0b74e7b17 Revert "packages: Register pkgconf"
This reverts commit 970cef9f65.

I made a mistake when rebasing 1342eb5a832fa10e689a29faab3acb6054e4778c;
I did not mean to re-introduce this one.
2026-04-25 21:23:23 +02:00
Pierre Pronchery 1342eb5a83 pkgconf: fix the build with GCC 14
Building pkgconf with GCC 14 currently fails with:
no option '-Wincompatible-pointer-types-discards-qualifiers'

This relaxes warnings for libpkgconf, pkgconf(1), and bomtool(1) until
the improvements are published upstream (see PR #444).

Co-authored-by:	ngie
Approved by:	ngie
Sponsored by:	The FreeBSD Foundation
Event:		Wiesbaden Hackathon 202604
Differential Revision:	https://reviews.freebsd.org/D56591
2026-04-25 21:13:57 +02:00
Pierre Pronchery 970cef9f65 packages: Register pkgconf
This should fix the creation of the new packages introduced by the
import of pkgconf into the base system.

Fixes:			b8352da33f ("pkgconf: import into the base system")
Sponsored by:		The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D56589
2026-04-25 21:03:34 +02:00
Dag-Erling Smørgrav 3e6a26df1f ident: Fix typo in manual page
Fixes:		394f6b1b0a ("ident: Clean up")
2026-04-25 20:07:53 +02:00
Dimitry Andric 7f207b6443 Revert "Tentative fix for powerpc boot1.chrp linking problem."
This reverts base 4822a2cf99. The change
in base aa0bc7cca1 already fixed the
original issue, which is that newer versions of lld complain "section
'.text' address (0x38000) is smaller than image base (0x10000000);
specify --image-base".

Reported by:	ivy
PR:		292067
MFC after:	1 month
2026-04-25 19:06:55 +02:00
Dimitry Andric b6d823e390 Fix up builds on Linux hosts after llvm 21.1.8 merge
This is because contrib/llvm-project/llvm/lib/Support/Unix/Threading.inc
attempts to use pthread_get_name_np(3) and pthread_set_name_np(3), which
are not defined on Linux.

Reported by:	ivy
PR:		292067
MFC after:	1 month
2026-04-25 17:21:28 +02:00
Paarth Shirsat 4137c673fa loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables
Describe how the LoaderEnv and NextLoaderEnv variables can be used.

PR:			293054
Reviewed by:		imp
Sponsored by:		Wiesbaden Hackathon 202604
Differential Revision:	https://reviews.freebsd.org/D56633
2026-04-25 15:12:04 +00:00
Paarth Shirsat ed82c433ef Revert "loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables"
This reverts commit cf7d4b04e9.

I attributed the wrong author of the patch.
2026-04-25 15:08:17 +00:00
Bill Blake cf7d4b04e9 loader.efi(8): Document LoaderEnv and NextLoaderEnv EFI variables
Describe how the LoaderEnv and NextLoaderEnv variables can be used.

PR:			293054
Reviewed by:		imp
Sponsored by:		Wiesbaden Hackathon 202604
Differential Revision:	https://reviews.freebsd.org/D56633
2026-04-25 15:01:43 +00:00
Lars Engels 1566386b90 bsdinstall: fix root password prompt with backslashes
Use "read -r" to set the root password in "bsdinstall rootpass" to
prevent issues with passwords containing one or more backslash
characters.

PR:		294781
Discussed with: tuexen, crest
Approved by:	khorben
MFC after:	3 days
Event:		Wiesbaden Hackathon 202604
2026-04-25 16:41:24 +02:00
Dimitry Andric 8f95b8b190 Bump __FreeBSD_version for llvm 21.1.8 merge
PR:		292067
MFC after:	1 month
2026-04-25 16:14:23 +02:00
Dimitry Andric 3cbf898fb4 Add a comment to llvm's OptParser.td, so dependent files get rebuilt.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:23 +02:00
Dimitry Andric 20450c2e79 Merge commit b0d2b57f7e47 from llvm git (by Phoebe Wang):
[Headers][X86] Remove more duplicated typedefs (#153820)

  They are defined in mmintrin.h

This fixes a -Werror warning in openzfs, which compiles for C99, and C99
does not allow for typedef redefinitions.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:23 +02:00
Dimitry Andric 4fc1fdd206 Merge commit c1d26c3c2510 from llvm git (by Nikolas Klauser):
[libc++] Fix iostream size ABI break (#185839)

  In #124103 we changed the size of various iostream objects, which turns
  out to be ABI breaking when compiling non-PIE code.

  This ABI break is safe to fix, since for any programs allocating more
  memory for the iostream objects, the remaining bytes are simply unused
  now.

  Fixes #185724

This fixes the ABI break that causes programs that use the standard
streams to terminate in various interesting ways, usually by throwing an
unexpected std::bad_cast exception.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 5ac874516b Merge commit 787ba2426148 from llvm git (by Matheus Izvekov):
[clang] create local instantiation scope for matching template template parameters (#183219)

  This fixes a bug where a partial substitution from the enclosing scope
  is used to prepopulate an unrelated template argument deduction.

  Fixes #181166

This fixes an expected error when building the devel/catch port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 0f15398d12 Fixup mismerge in __cxx03/__type_traits/add_[lr]value_reference.h.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 1dfe63e4f7 Merge commit d803c61aca0d from llvm git (by Corentin Jabot):
[Clang] Fix a regression introduced by #147046 (#150893)

  Static functions have an implicit object argument during deduction.

This fixes an assertion while compiling the devel/corrade port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:22 +02:00
Dimitry Andric 3fd796204f Merge commit 924f773f5e26 from llvm git (by Younan Zhang):
[Clang] Don't diagnose missing members when looking at the instantiating class template (#180725)

  The perfect matching patch revealed another bug where recursive
  instantiations could lead to the escape of SFINAE errors, as shown in
  the issue.

  Fixes https://github.com/llvm/llvm-project/issues/179118

This fixes compile errors in the www/qt5-webengine port.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric b99d02027a Remove usr/include/c++/v1/__fwd/get.h from ObsoleteFiles.inc.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 17f1a5e638 libcxx-compat: fix llvmorg-21-init-12415-g3a86e0bd29f3:
[libc++] Optimize std::getline (#121346)

  ```
  -----------------------------------------------
  Benchmark                   old             new
  -----------------------------------------------
  BM_getline_string        318 ns         32.4 ns
  ```

Move the __bump_stream() lamda in <istream> to a separate function, so
this will compile with clang 18 and lower, in C++03 mode and earlier.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 987ac31018 libcxx-compat: fix llvmorg-21-init-18351-gfcc09b6f0267:
[libc++] Fix std::make_exception_ptr interaction with ObjC (#135386)

  Clang treats throwing/catching ObjC types differently from C++ types,
  and omitting the `throw` in `std::make_exception_ptr` breaks ObjC
  invariants about how types are thrown/caught.

  Fixes #135089

  Co-authored-by: Louis Dionne <ldionne.2@gmail.com>

Only use lambdas when in !defined(_LIBCPP_CXX03_LANG), so this will
compile with clang 18 and lower, in C++03 mode and earlier.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:21 +02:00
Dimitry Andric 5465db314a libcxx-compat: revert llvmorg-21-init-8400-g703cfe745b96:
[libc++] Replace __libcpp_popcount by __builtin_popcountg (#133937)

  `__libcpp_popcount` was previously used as a fallback for `__builtin_popcountg` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_popcountg` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely  replace all instances of `__libcpp_popcount` with `__builtin_popcountg` and eliminate the fallback logic.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric 035396ceda libcxx-compat: revert llvmorg-21-init-10154-ge43e8ec7afbd:
[libc++] Remove dead implementation of is_nothrow_convertible and merge the remaining code into is_convertible.h (#137717)

  We can use the `__is_nothrow_convertible` builtin unconditionally now,
  which makes the implementation very simple, so there isn't much of a
  need to keep a separate header around.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric a114ece3e6 libcxx-compat: revert llvmorg-19-init-5639-ga10aa4485e83:
[libc++] Simplify the implementation of remove_reference (#85207)

  GCC 13 introduced the type trait `__remove_reference`. We can simplify
  the implementation of `remove_reference` a bit by using it.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric bb6713d38c libcxx-compat: revert llvmorg-21-init-15984-g650b451d0065:
[libc++] Simplify the implementation of pointer_traits a bit (#142260)

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:20 +02:00
Dimitry Andric 821fc643b3 libcxx-compat: revert llvmorg-21-init-9130-g9e3982d9ae81:
[libc++] Replace __libcpp_{ctz, clz} with __builtin_{ctzg, clzg} (#133920)

  `__libcpp_{ctz, clz}` were previously used as fallbacks for `__builtin_{ctzg, clzg}` to ensure compatibility with older compilers (Clang 18 and earlier), as `__builtin_{ctzg, clzg}` became available in Clang 19. Now that support for Clang 18 has been officially dropped in #130142, we can now safely  replace all instances of `__libcpp_{ctz, clz}` with `__count{l,r}_zero` (which internally call `__builtin_{ctzg, clzg}` and eliminate the fallback logic.

  Closes #131179.

This is part of making libc++ 21 build with clang 18.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:19 +02:00
Dimitry Andric 7351d001fc Merge llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project release/21.x llvmorg-21.1.8-0-g2078da43e25a,
a.k.a. 21.1.8 release.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:13 +02:00
Dimitry Andric 4822a2cf99 Tentative fix for powerpc boot1.chrp linking problem.
PR:		292067
MFC after:	1 month
2026-04-25 16:14:12 +02:00
Dimitry Andric 48c35ae6eb Merge commit 598f21e9fcf7 from llvm git (by zhijian lin):
[PowerPC] need to set CallFrameSize for the pass  PPCReduceCRLogicals when insert a new block (#151017)

  In the [ [CodeGen] Store call frame size in
  MachineBasicBlock](https://reviews.llvm.org/D156113), it mentions When a
  basic block has been split in the middle of a call sequence. the call
  frame size may not be zero, it need to set the setCallFrameSize for the
  new MachineBasicBlock. but in the function `splitMBB(BlockSplitInfo
  &BSI)` in the llvm/lib/Target/PowerPC/PPCReduceCRLogicals.cpp , it do
  not setCallFrameSzie for the new MachineBasicBlock `NewMBB`, we will
  setCallFrameSzie in the patch.

  the patch fix the crash mention in
  https://github.com/llvm/llvm-project/pull/144594#issuecomment-2993736654

This fixes "error in backend: Found 1 machine code errors" while
crypto/openssh/packet.c for PowerPC64.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:12 +02:00
Dimitry Andric 718e5874be llvm-libc-macros: work around gcc defining LDBL_MANT_DIG as 53 on i386
Otherwise, gcc will not be able to compile parts of libc++ 21 in -m32
mode, resulting in errors similar to:

    In file included from /usr/src/contrib/llvm-project/libc/shared/str_to_float.h:13,
                     from /usr/src/contrib/llvm-project/libcxx/src/include/from_chars_floating_point.h:14,
                     from /usr/src/contrib/llvm-project/libcxx/src/charconv.cpp:12:
    /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h: In function 'void __llvm_libc::internal::set_implicit_bit(__llvm_libc::fputil::FPBits<T>&) [with T = long double]':
    /usr/src/contrib/llvm-project/libc/src/__support/str_to_float.h:77:10: error: 'struct __llvm_libc::fputil::FPBits<long double>' has no member named 'set_implicit_bit'
       77 |   result.set_implicit_bit(result.get_biased_exponent() != 0);
          |          ^~~~~~~~~~~~~~~~

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric f7bcd8d8c9 libcxx-compat: revert llvmorg-21-init-17684-gae9990ed9651:
[libc++] Remove dead code from <type_traits> (#143854)

  Since we've upgraded to GCC 15 now, we can remove a bunch of dead code
  from `<type_traits>`.

This is part of making libc++ 21 build with GCC 14.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00
Dimitry Andric ad1f6ee5d7 libcxx-compat: revert llvmorg-21-init-19251-g0c3a2faa8505:
[libc++] Simplify the implementation of __libcpp_{,de}allocate (#147989)

  GCC 15 also supports `__buitin_operator_{new,delete}` now, so the
  `#else` cases are dead code. This patch inlines the calls to the wrapper
  functions and simplifies some surrounding code.

This is part of making libc++ 21 build with GCC 14.

PR:		292067
MFC after:	1 month
2026-04-25 16:14:11 +02:00