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
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
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
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")
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")
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
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
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
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
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
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)
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.
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
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")
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")
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")
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.
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
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
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 ...)
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
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
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
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
Notable upstream pull request merges:
#163071d43387dd zdb: Add -O option for -r to specify object-id
#17965a62c62120 ARC: Pre-convert zfs_arc_min_prefetch_ms
#17970d393166c5 ARC: Increase parallel eviction batching
#1798120f09eae4 ZIO: ZIO_STAGE_DDT_WRITE is a blocking stage
#17983ff47dd35e Fix ddtprune causing space leak
#1801586b064469 FreeBSD: Fix a potential null dereference
in zfs_freebsd_fsync() (already merged)
#18020ff47dd35e Ensure 64-bit `off_t` is used in user space
instead of `loff_t`
#1802809492e0f2 Reduce dataset buffers re-dirtying
#18033f72fd378c Defer async destroys on pool import
#180433d76ba273 Improve async destroy processing timing
#1804446d6f1fe5 DDT: Move logs searches out of the lock
#18047ff5414406 DDT: Switch to using ZAP _by_dnode() interfaces
#180483b1ff816b DDT: Add/use zap_lookup_length_uint64_by_dnode()
#1805522e89aca8 DDT: Fix compressed entry buffer size
#180590550abd4b RAIDZ: Remove some excessive logging
#18060a83bb15fc Reduce minimal scrub/resilver times
#18061962e68865 Use reduced precision for scan times
#18063051a8c749 Bypass snprintf() in quota checks if no quotas set
#180647ff329ac2 Fix rangelock test for growing block size
Obtained from: OpenZFS
OpenZFS commit: 962e68865e
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
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
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
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