Commit graph

305686 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
745c6c0431 Resurrect standalone command
While command(1) is now classified by POSIX as an intrinsic utility and
no longer required to exist as a standalone program, it turns out that
we still have a use for it (cf. env(1)), so resurrect it.

PR:		291879
Fixes:		4100bd6caa ("usr.bin: Remove intrinsic utilities")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D54341
2025-12-23 11:36:39 +01:00
Xin LI
ae12432049 MFV 762f11d98d: xz 5.8.2.
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
MFC after:	7 days
2025-12-23 00:24:13 -08:00
Wei Hu
d0a2bd2765 mana: support jumbo packet size
Remove the restriction of up to 4k packet size. Now the driver
supports up to MJUM16BYTES size packets as long as hardware
supporting it.

Tested on VMs in Azure.

Tested by:	whu
MFC after:	1 week
Sponsored by:	Microsoft
2025-12-23 07:00:38 +00:00
Wei Hu
44f656641c Hyper-V: hn: just call vf's ioctl when changing mtu
When changing mtu, if a vf is attached to the netvsc interface, just
calling its ioctl to change vf's mtu is good enough.

Tested by:	whu
MFC after:	3 days
Sponsored by:	Microsoft
2025-12-23 05:38:40 +00:00
Rick Macklem
b94e4c7037 RELNOTES: Add an entry for 8e3fd450cc and friends 2025-12-22 18:51:41 -08:00
Rick Macklem
60eb371c2b UPDATING: Add an entry for commit 9f49f436a9
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
2025-12-22 15:28:59 -08:00
Rick Macklem
e35191ccf3 nfs: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the final patch in the series that enables
the extension of NFSv4.2 to support POSIX draft ACLs.
At this time, only UFS mounted with the "acls" option
will work, and only for FreeBSD built with these patches.
Patches for client and server for the Linux kernel are
in the works.  (I'll admit my next little project is
cleaning the Linux patches up for submission for upstream.)

To make these changes really useful, the FreeBSD port
of OpenZFS needs to be patched to add POSIX draft ACL
support.  (Support for POSIX draft ACLs is already in
the Linux port of OpenZFS.)

Interopeability with NFSv4.2 clients and servers that
do not support this extension should not be a problem.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
2025-12-22 15:22:09 -08:00
Rick Macklem
9f49f436a9 nfs: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the fifth of several patches that implement the
above draft.

This one mostly adds an extra argument to two functions
in nfscommon.ko.  Unfortunately, these functions are
called in many places, so the changes are numerous, but
straightforward.

Since the internal KAPI between the NFS modules is changed
by this commit, all of nfscommon.ko, nfscl.ko and nfsd.ko
must be rebuilt from sources.

There should be no semantics change for the series at
this point.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
2025-12-22 13:51:15 -08:00
Poul-Henning Kamp
1b1fb628a1 Quirk Realtek RTL8153 to config#1 so if_cdce claims it. Works much better. 2025-12-22 21:24:42 +00:00
Alan Somers
f51e9d0e09 fusefs: Fix further intermittency in the BadServer.ShortWrite test case
Some checks are pending
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
After being unmounted, the mockfs server would occasionally read from
/dev/fuse again, if the main function didn't exit fast enough, getting
an ENODEV error.  Handle that appropriately.

Reported by:	Siva Mahadevan <me@svmhdvn.name>
Fixes:		d86025c1d4
MFC after:	1 week
Reviewed by:	Siva Mahadevan <me@svmhdvn.name>
Differential Revision: https://reviews.freebsd.org/D54331
2025-12-22 10:18:16 -07:00
Kristof Provost
4f35a84b32 atf_python: support setting interface mtu
Teach the vnet support code to set interface MTU. Some tests make use of
this, so have the framework handle it.

Adapt a few pf tests to use this.

Reviewed by:	melifaro
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D54333
2025-12-22 17:28:33 +01:00
Mark Johnston
3a4275a5f1 telnet: Remove usage of ALIGN
gcc doesn't like ALIGN() being applied to an array type.  Just use
__aligned instead.

Reported by:	Jenkins
Reviewed by:	brooks
Fixes:		80203a27e9 ("Add sys/_align.h replacing machine/_align.h")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54290
2025-12-22 15:18:52 +00:00
Mark Johnston
da8ab13249 inotify: Avoid resetting the cookie
The IN_MOVED_FROM and _TO events only apply to names in a watched
directory, never to a watched directory itself.  So, the cookie value
there is always zero, and in particular we should not reset the
caller-provided cookie value, as it may be used later.

Add a regression test.

Reported by:	arrowd
MFC after:	1 week
2025-12-22 14:47:27 +00:00
Mark Johnston
15178d8ed2 pf: Fix state handling when ICMP packets are diverted
Commit 66f2f1c832 ("pf: handle divert packets") missed a case that I
happened to hit while testing something.

Add a regression test for the ICMP case, based on the existing test.
Fix a buglet in the existing test (missing whitespace after "[").

Reviewed by:	kp
Sponsored by:	OPNsense
Sponsored by:	Klara, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54321
2025-12-22 14:47:27 +00:00
Konstantin Belousov
183513d15f sys/netipsec: ensure sah stability during input callback processing
Citing ae: this fixes some rare panics, that are reported in
derived projects: `panic: esp_input_cb: Unexpected address family'.

Reported by:	ae
Tested by:	ae, Daniel Dubnikov <ddaniel@nvidia.com>
Reviewed by:	ae, Ariel Ehrenberg <aehrenberg@nvidia.com> (previous version)
Sponsored by:	NVidia networking
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D54325
2025-12-22 14:31:25 +02:00
Dimitry Andric
3b1126208f Remove debug crutch I accidentally left in
Fixes:		cf1eaaf41c
MFC after:	1 week
2025-12-22 12:49:42 +01:00
Dimitry Andric
cf1eaaf41c Reduce number of external symbols in libllvm, libclang and liblldb
Some checks are pending
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
In commit 2e47f35be5 libllvm, libclang and liblldb were converted into
private shared libraries. This allowed clang, lld, lldb, and other llvm
tools to be linked against these shared libraries, which makes them
smaller and avoids duplication.

However, upstream builds the shared libraries using several visibility
options, which reduces the number of external symbols, and makes the
libraries a bit smaller.

On my test machine:
* libprivatellvm.so goes from 75643 to 34706 symbols (~54% reduction)
* libprivateclang.so goes from 53250 to 33531 symbols (~37% reduction)
* libprivatelldb.so goes from 27242 to 18798 symbols (~31% reduction)

Note: to get the full benefit, a clean build is required. Incremental
builds should still work, but I didn't want to force a full rebuild on
everybody.

MFC after:	1 week
2025-12-22 10:31:40 +01:00
Guy Harris
88b04633c2 libpcap: fix resource leaks and set error messages
In finddevs_bpf() close the BPF device descriptor and free the device list
buffer before returning.

For ioctl() and malloc() errors, use pcapint_fmt_errmsg_for_errno() to
generate an error message.

Fix some comments.

(cherry picked from commit 6870404f35da32d63a0a8789edb010842dd6b208)
2025-12-21 18:23:28 -08:00
Gleb Smirnoff
129e15d499 ipfw: fix bpf tap point lookup
The trick I blindly used works for pointers to structs, but not for rule
numbers that can differ only by 1.

PR:	291854
Fixes:	3daae1ac1d
2025-12-21 18:23:14 -08:00
Gleb Smirnoff
b275907fa3 if_tuntap: use ifnet_rename_event instead of ifnet_arrival_event 2025-12-21 18:23:14 -08:00
Gleb Smirnoff
0bd0c3295a ng_ether: refactor to use interface EVENTHANDLER(9)s 2025-12-21 18:23:14 -08:00
Gleb Smirnoff
349fcf079c net: add ifnet_rename_event EVENTHANDLER(9) for interface renaming
and don't trigger ifnet_arrival_event and ifnet_departure_event for a
rename, as the interface isn't being detached from any protocol.  The
consumers of the arrival/departure events are divided into a few
categories:
- which indeed need to do the same actions as if interface was fully
  detached and attached: routing socket and netlink notifications to
  userland and the Linux sysfs.  All addressed by this commit.
- which build their logic based on an interface name, but should actually
  update their database on rename: packet filters.  This commit leaves
  them with the old behavior - emulate full detach & attach, but this
  should be improved.
- which shouldn't do anything on rename, not touched by the commit.
- ng_ether and if_tuntap, that are special and will be addressed by
  separate commits.
2025-12-21 18:23:14 -08:00
Gleb Smirnoff
e3d6cf8c3f pf: make eventhandler_tag's static
No functional change.
2025-12-21 18:23:14 -08:00
Gleb Smirnoff
77939d64f2 net: on interface detach purge multicast addresses after protocols
We first want to give a chance to all owners of multicast addresses to
free them and only then run through the list of remaining ones.  It might
be that no addresses remain there normally, but this needs to be analyzed
deeper.  For now restore the sequence that was before 0d469d2371 to fix
a possible use after free.

Fixes:	0d469d2371
2025-12-21 18:23:14 -08:00
Rick Macklem
0e724de9ed nfscl: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the fourth of several patches that implement the
above draft.

There should be no semantics change for the series at
this point.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
2025-12-21 18:05:04 -08:00
Rick Macklem
949cff4dce nfscommon: Add some support for POSIX draft ACLs
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the third of several patches that implement the
above draft.

There should be no semantics change for the series at
this point.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
2025-12-21 17:07:10 -08:00
Xin LI
762f11d98d Vendor import of xz 5.8.2 (trimmed) 2025-12-21 16:14:28 -08:00
Rick Macklem
8e3fd450cc nfsd: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the second of several patches that implement the
above draft.

The only semantics change would be if you have exported
a UFS file system mounted with the "acl" option.
In that case, you would see the acl attribute supported.
This is bogus, but will be handled in the next commit.

Fixes:	a35bbd5d9f ("nfscommon: Add some support for POSIX draft ACLs")
2025-12-21 16:08:05 -08:00
Rick Macklem
a35bbd5d9f nfscommon: Add some support for POSIX draft ACLs
An internet draft (expected to become an RFC someday)
https://datatracker.ietf.org/doc/draft-ietf-nfsv4-posix-acls
describes an extension to NFSv4.2 to handle POSIX draft ACLs.

This is the first of several patches that implement the
above draft.

This patch should not result in a semantics change.
2025-12-21 14:28:12 -08:00
Konstantin Belousov
95788a851d vm_fault_trap(): fix comments grammar
Submitted and reviewed by:	alc
Fixes:	22cce201da
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D54335
2025-12-22 00:05:14 +02:00
Kristof Provost
823ebd7c4f libpfctl: export a get states variant that takes a pfctl_handle
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-21 18:33:06 +01:00
Kristof Provost
622d7fa18d pf: fix pcounters array size
It's a 2 * 2 * 2, not 2 * 2 * 3. We only use PF_DROP and PF_PASS, so two
rows suffices.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-21 18:33:06 +01:00
Andrew Gallatin
4d692068f6 ktls: Capture initial tls seqno at time offload is initiated
Some drivers want the TLS seqno when offload starts. Capture this
for them by adding a union for initial_seqno, sharing space with
the TLS 1.0 next_seqno.

Reviewed by: jhb
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54275
MFC After: 1 month
2025-12-21 09:45:25 -05:00
Andrew Gallatin
43d7ee540e iflib: support for transmit side nic KTLS offload
This change adds support to iflib for drivers that want to do
transmit-side NIC ktls offload. This change does 2 things:

1) Extends the pkt info to include an optional mbuf pointer.

This gives drivers the ability to find the start of a TLS record if
they need to re-DMA part of the record to re-construct TLS state on
the NIC. This mbuf pointer is only passed when CSUM_SND_TAG is
present on the pkthdr. Note that I don't bother to inspect the send
tag on purpose; this will only be present for TLS offloaded or paced
connections

2) Allows the driver to specify how much ring padding is needed
   before the ring is considered to be full using the new isc_tx_pad
   field in if_softc_ctx.

This re-uses a field that was marked spare in 2019 via d49e83eac3.
Iflib initializes this to the previous value of 2 slots and allows the
driver to override it. The TXQ_AVAIL() macro has been adjusted to
subtract this padding, and uses of the macro have removed +2 from the
other side of the comparison. To avoid potential cache misses from
looking at the ifc_softc_ctx in TXQ_AVAIL(), the value is mirrored in
the txq (in an alignment hole).

Reviewed by: kbowling, kgalazka, sumit.saxena_broadcom.com, shurd
Sponsored by: Netflix
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D54274
2025-12-21 09:45:12 -05:00
Bjoern A. Zeeb
117306dc60 in6_ifattach: include sys/eventhandler.h to unbreak NOVIMAGE builds
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
LINT-NOVIMAGE fails to build due to a missing eventhandler.h include
which in hte VIMAGE case is likely leaked through some other header.
Add the #include to unbreak the build.

Fixes:	0d469d2371 (net: attach IPv4 and IPv6 stacks to an ...)
2025-12-20 22:47:40 +00:00
Justin Hibbits
27cb2610ef powerpc/intr: Minor cleanup
Use MTX_SYSINIT() instead of rolling our own.
2025-12-20 15:02:51 -05:00
Emmanuel Vadot
dd5a48f957 fwget: Add Navi 33 support
Tested on a RX7600

MFC After:	3 days
2025-12-20 19:49:51 +01:00
Dag-Erling Smørgrav
7f39d05b67 reboot: Fix halt -p behavior
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
The RB_HALT bit is always set when invoked as `halt`, so to maintain a
distinction between `halt` and `halt -p`, we must check the RB_POWEROFF
bit first.

PR:		291814
Fixes:		4453ec5b87 ("reboot: Default to a clean shutdown")
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D54320
2025-12-20 00:26:37 +01:00
Kyle Evans
a8c594d277 files.amd64: remove some lines duplicated from files.x86
These were added to files.x86 because they were duplicated in both
files.i386 and files.amd64, but they did not end up removed in the
latter.  Garbage collect them now.

Reviewed by:	jhibbits
Fixes:	b9c6fa339d ("files.x86: Pull in some more duplicate [...]")
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D54295
2025-12-19 16:17:30 -06:00
Bjoern A. Zeeb
34892a8e30 LinuxKPI: bitcount fix builds with gcc and older llvm
LLVM before 19 and gcc before 14 do not support __builtin_popcountg().
Use __const_bitcount<n> from sys/bitcount.h as a replacement in these
cases.  This should still allow drm-kmod to build where the size needs
to be known at compile-time.

Remove the conditional for gcc around the iwlwifi modules build,
which was collateral damage in all this.

Sponsored by:	The FreeBSD Foundation
Fixes:		7cbc4d8759, 5e0a4859f2
MFC after:	3 days
Reviewed by:	brooks, emaste (without the sys/modules/Makefile change)
Differential Revision: https://reviews.freebsd.org/D54297
2025-12-19 21:19:28 +00:00
Bjoern A. Zeeb
27aa23cee8 sys/bitcount.h: add __const_bitcount<n>
Add a version of __const_bitcount<n> which can be used to get the
numbers at compile-time when __builtin_popcountg() is not available
(see sys/compat/linuxkpi/common/include/linux/bitops.h for LLVM before
19 and gcc before 14).

Obtained from:	https://reviews.freebsd.org/D50995#1174884 by obiwac
Sponsored by:	The FreeBSD Foundation
Reviewed by:	brooks, emaste
Differential Revision: https://reviews.freebsd.org/D54301
2025-12-19 21:16:20 +00:00
Martin Matuska
546d3d08e5 zfs: merge openzfs/zfs@962e68865
Notable upstream pull request merges:
 #16307 1d43387dd zdb: Add -O option for -r to specify object-id
 #17965 a62c62120 ARC: Pre-convert zfs_arc_min_prefetch_ms
 #17970 d393166c5 ARC: Increase parallel eviction batching
 #17981 20f09eae4 ZIO: ZIO_STAGE_DDT_WRITE is a blocking stage
 #17983 ff47dd35e Fix ddtprune causing space leak
 #18015 86b064469 FreeBSD: Fix a potential null dereference
                  in zfs_freebsd_fsync() (already merged)
 #18020 ff47dd35e Ensure 64-bit `off_t` is used in user space
                  instead of `loff_t`
 #18028 09492e0f2 Reduce dataset buffers re-dirtying
 #18033 f72fd378c Defer async destroys on pool import
 #18043 3d76ba273 Improve async destroy processing timing
 #18044 46d6f1fe5 DDT: Move logs searches out of the lock
 #18047 ff5414406 DDT: Switch to using ZAP _by_dnode() interfaces
 #18048 3b1ff816b DDT: Add/use zap_lookup_length_uint64_by_dnode()
 #18055 22e89aca8 DDT: Fix compressed entry buffer size
 #18059 0550abd4b RAIDZ: Remove some excessive logging
 #18060 a83bb15fc Reduce minimal scrub/resilver times
 #18061 962e68865 Use reduced precision for scan times
 #18063 051a8c749 Bypass snprintf() in quota checks if no quotas set
 #18064 7ff329ac2 Fix rangelock test for growing block size

Obtained from:	OpenZFS
OpenZFS commit:	962e68865e
2025-12-19 21:45:10 +01:00
Jose Luis Duran
f8cee1f2c2
Import latest mtree from NetBSD
Merge commit 'eb2ccba0c11b405ac613c3046997765317cc8b5c'

PR:		192839
PR:		219467
MFC after:	1 week
2025-12-19 20:14:35 +00:00
Jose Luis Duran
eb2ccba0c1
Vendor import of NetBSD's mtree at 2025-12-19 2025-12-19 20:11:33 +00:00
Gleb Smirnoff
fe53a8a82c bpf: add missing IFT_BRIDGE in the write method
Fixes:	8774a990ee
2025-12-19 11:23:17 -08:00
Dag-Erling Smørgrav
4100bd6caa usr.bin: Remove intrinsic utilities
These utilities can only function correctly if implemented as shell
builtins and exist only because POSIX previously required them.  As of
POSIX 2024, they have all been reclassified as intrinsic utilities and
are no longer required to exist in PATH.  We can therefore retire them.
Cf. XBD 1.7, XRAT C.1.8, Austin Group bug 854.

Note that kill(1) is also considered an intrinsic utility (because
only the shell can interpret job IDs correctly), but we have a working
standalone implementation, which we will keep.

PR:		291686
Relnotes:	yes
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D54239
2025-12-19 18:15:40 +01:00
Timo Völker
c8b3b605ae tcp: fix checksum calculation bug
The new function in_delayed_cksum_o() was introduced to compute
the checksum in the case the mbuf chain does not start with the
IP header. The offset of the IP header is specified by the
parameter iph_offset.
If iph_offset was positive, the function computed an incorrect
checksum.

Reviewed by:		sobomax, tuexen
Fixes:			5feb38e378 ("netinet: provide "at offset" variant of the in_delayed_cksum() API")
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D54269
2025-12-19 17:50:20 +01:00
Michael Tuexen
8da838ac31 vtnet: improve consistency
Use sbuf_new_for_sysctl() instead of sbuf_new_auto() when exposing
the flags via sysctl.

MFC after:		1 week
2025-12-19 17:44:20 +01:00
Michael Tuexen
634d9c0d11 vtnet: expose features via sysctl tree
Right now the 64-bit flags field needs to be casted to a 32-bit field,
because clang warns if more than 32-bits are used.
Once clang is fixed, this restriction will be removed and more bits
will be added.

Reviewed by:		markj, Timo Völker
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D54288
2025-12-19 17:38:35 +01:00
Michael Tuexen
d2cb9cab84 printf.9: Support more than 32 bits in %b
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
This will be usable after clang has been extended to accept length
modifiers for %b when compiling kernel code.
But we need FreeBSD to support it first...

Reviewed by:		markj, Timo Völker
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D54286
2025-12-19 17:26:37 +01:00