FreeBSD/src 8f41677. COPYRIGHT, sys/sys copyright.h

copyright: Happy New Year 2026!

We are now one quarter into the 21st century.
DeltaFile
+2-2sys/sys/copyright.h
+1-1COPYRIGHT
+3-32 files

FreeBSD/src aa611fatools/build depend-cleanup.sh

depend-cleanup.sh: Reduce repetition

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D54329
DeltaFile
+11-9tools/build/depend-cleanup.sh
+11-91 files

FreeBSD/src 1d52d5c. Makefile.inc1, share/man/man5 src.conf.5

depend-cleanup: Force a clean build when options change

Similar to the build epoch check, cache a list of source options in the
object tree, and force a clean build if the cached list does not match
the current list, after filtering out options which are known not to
affect the build (e.g. CLEAN, TESTS, WARNS).

This also adds a DEPEND_CLEANUP option (which defaults to yes unless
the CLEAN option is set) which can be used to skip depend-cleanup for
faster incremental builds.

MFC after:      1 week
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D52011
DeltaFile
+51-10tools/build/depend-cleanup.sh
+14-0share/man/man5/src.conf.5
+4-2Makefile.inc1
+5-0share/mk/src.opts.mk
+5-0tools/build/options/WITHOUT_DEPEND_CLEANUP
+79-125 files

FreeBSD/src 2c0e9a7. Makefile.inc1

Makefile.inc1: Make NO_INSTALLKERNEL less of a hack

Rather than adding a dummy entry which requires everyone to know to skip
it, introduce a new INSTALLEXTRAKERNELS which contains the set of
kernels to install as kernel.KERNCONF.

Reviewed by:    ivy
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54291
DeltaFile
+20-14Makefile.inc1
+20-141 files

FreeBSD/src 3904753contrib/file/src apprentice.c

Merge commit faa5141b9be4 from file git (by Christos Zoulas):

  PR/656: harry.sintonen: Fix bug in byte swapping that was caused by the change to make flags uint16_t and cont_level uint8_t.

This fixes using a magic.mgc built with a different endianness than
file(1) itself, e.g. when building powerpc64 on amd64.

PR:             292079
Fixes:          ae316d1d1cff ("MFV: file 5.46.")
MFC after:      3 days
DeltaFile
+2-3contrib/file/src/apprentice.c
+2-31 files

FreeBSD/src e8567desys/fs/nfsclient nfs_clvnops.c

nfscl: Fix handling of POSIX draft default ACLs

A POSIX draft default ACL may not exist.  As such,
an ACL with zero ACEs needs to be allowed.

This patch fixes acquisition of POSIX draft default
ACLs when they do not exist on the directory.

Fixes:  a35bbd5d9f5f ("nfscommon: Add some support for POSIX draft ACLs")
DeltaFile
+2-1sys/fs/nfsclient/nfs_clvnops.c
+2-11 files

FreeBSD/src ab5ec8cusr.sbin/nfsd nfsd.8

nfsd.8: Add a short paragraph w.r.t. NFSv3 vs NFSv4 setup

The nfsd can be configured to support NFSv3, NFSv4 or both
of them.

This patch adds a short paragraph to nfsd.8 to explain this.

This is a content change.

(cherry picked from commit 4f184fd35d81bbd85284d47d2a65aeece67e87d4)
DeltaFile
+60-2usr.sbin/nfsd/nfsd.8
+60-21 files

FreeBSD/src 785d429usr.sbin/nfsd nfsd.8

nfsd.8: Add a short paragraph w.r.t. NFSv3 vs NFSv4 setup

The nfsd can be configured to support NFSv3, NFSv4 or both
of them.

This patch adds a short paragraph to nfsd.8 to explain this.

This is a content change.

(cherry picked from commit 4f184fd35d81bbd85284d47d2a65aeece67e87d4)
DeltaFile
+60-2usr.sbin/nfsd/nfsd.8
+60-21 files

FreeBSD/src 4fecc8esbin/pfctl parse.y

pfctl: remove duplicate "va" entry

It turns out we'd already added this a few years ago, so didn't need to
add it again.

Fixes:          190c1f3d9326
Reported by:    Seth Hoffert <seth.hoffert at gmail.com>
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+0-1sbin/pfctl/parse.y
+0-11 files

FreeBSD/src 4a15a35sys/arm/allwinner aw_rtc.c

aw_rtc: bump settime() delays

There are delay loops, checking the BUSY status bit, before writing to
the date or time registers. Each iteration contains a 1usec delay, for a
maximum of 70 iterations.

This is frequently not enough on the D1 platform, where the message is
emitted:

  rtc0: could not set date, RTC busy

Bump the loop delay to 10usecs each, and the maximum number of
iterations to 150, for a maximum delay of 1.5msecs between each write of
the register.

In my testing this seems to be adequate.

The loop variable is renamed for clarity/simplicity.


    [6 lines not shown]
DeltaFile
+12-11sys/arm/allwinner/aw_rtc.c
+12-111 files

FreeBSD/src 96c7e70lib/libpfctl libpfctl.c, sbin/pfctl pfctl_radix.c

pf: convert DIOCRCLRASTATS to netlink

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+60-18lib/libpfctl/libpfctl.c
+40-0sys/netpfil/pf/pf_nl.c
+7-1sbin/pfctl/pfctl_radix.c
+2-0sys/netpfil/pf/pf_nl.h
+109-194 files

FreeBSD/src 2eec2bctests/sys/netpfil/pf nat.sh

pf tests: avoid cleanup failures on skipped tests

If we skip the nat:binat_* tests (e.g. because pf.ko isn't loaded) the
inetd_tester.pid file isn't created. We still run the cleanup function,
which tries to use this file to clean up the test environment. This
results in 'broken: Test case cleanup did not terminate successfully'.
Avoid this by checking if the pid file exists before using it.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2tests/sys/netpfil/pf/nat.sh
+2-21 files

FreeBSD/src c2e7a52lib/libpfctl libpfctl.c libpfctl.h, sbin/pfctl pfctl_radix.c

pf: move DIOCRCLRASTATS into libpfctl

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+25-0lib/libpfctl/libpfctl.c
+1-17sbin/pfctl/pfctl_radix.c
+2-0lib/libpfctl/libpfctl.h
+28-173 files

FreeBSD/src 190c1f3sbin/pfctl parse.y

pfctl: allow network programs select DSCP_VA for network ToS

OK stsp@

Obtained from:  OpenBSD, phessler <phessler at openbsd.org>, f8a2f73b65
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+1-0sbin/pfctl/parse.y
+1-01 files

FreeBSD/src bcd9ea8sys/contrib/openzfs/include/os/freebsd/spl/sys cmn_err.h kmem.h, sys/contrib/openzfs/include/sys spa.h zfs_debug.h

zfs: rename several printf attribute declarations to __printf__

For kernel builds, we redefine `__printf__` to `__freebsd_kprintf__`, to
support FreeBSD kernel printf(9) extensions with clang.

In OpenZFS various printf related functions are declared with
__attribute__((format(printf, X, Y))), so these won't work with the
above redefinition. With clang 21 and higher, this leads to errors
similar to:

    sys/contrib/openzfs/module/zfs/spa_misc.c:414:38: error: passing 'printf' format string where 'freebsd_kprintf' format string is expected [-Werror,-Wformat]
      414 |         (void) vsnprintf(buf, sizeof (buf), fmt, adx);
          |                                             ^

Since attribute names can always be spelled with leading and trailing
double underscores, rename these instances.

Note that in FreeBSD proper we usually use `__printflike` from
<sys/cdefs.h>, but that does not apply to OpenZFS.

    [4 lines not shown]
DeltaFile
+8-8sys/contrib/openzfs/include/os/freebsd/spl/sys/cmn_err.h
+2-2sys/contrib/openzfs/include/os/freebsd/spl/sys/kmem.h
+2-2sys/contrib/openzfs/include/sys/spa.h
+1-1sys/contrib/openzfs/include/sys/zfs_debug.h
+1-1sys/contrib/openzfs/include/sys/vdev.h
+14-145 files

FreeBSD/src 667259bcontrib/ncurses/progs infocmp.c

ncurses: avoid warnings about too-long initializer strings

Increase the size of `assoc::from` to 8 bytes, to avoid warnings from
clang 21 similar to:

    contrib/ncurses/progs/infocmp.c:702:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
      702 |     DATA("\033[2J", "ED2"),     /* clear page */
          |          ^~~~~~~~~
    contrib/ncurses/progs/infocmp.c:716:10: error: initializer-string for character array is too long, array size is 4 but initializer has size 5 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
      716 |     DATA("\033[!p", "DECSTR"),  /* soft reset */
          |          ^~~~~~~~~

Reviewed by:    markj
Obtained from:  https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20241207.patch.gz
MFC after:      3 days
Differential Revision: https://reviews.freebsd.org/D54371
DeltaFile
+1-1contrib/ncurses/progs/infocmp.c
+1-11 files

FreeBSD/src 710ec40sys/crypto/chacha20 chacha.c

crypto: avoid warnings about too-long initializer strings

Mark `sigma` and `tau` as `__non_string`, to avoid warnings from clang
21 similar to:

    sys/crypto/chacha20/chacha.c:53:31: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
       53 | static const char sigma[16] = "expand 32-byte k";
          |                               ^~~~~~~~~~~~~~~~~~
    sys/crypto/chacha20/chacha.c:54:29: error: initializer-string for character array is too long, array size is 16 but initializer has size 17 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
       54 | static const char tau[16] = "expand 16-byte k";
          |                             ^~~~~~~~~~~~~~~~~~

MFC after:      3 days
Reviewed by:    markj
Differential Revision: https://reviews.freebsd.org/D54364
DeltaFile
+2-2sys/crypto/chacha20/chacha.c
+2-21 files

FreeBSD/src 7685aaesys/vm vm_map.c vm_object.c

vm_object_coalesce(): return swap reservation back if overcharged

It is possible for both vm_map_insert() and vm_object_coalesce() to charge
both for the same region.  The issue is that vm_map_insert() must charge
in advance to ensure that the mapping would not exceed the swap limit,
but then the coalesce might decide to extend the object, and already
(partially) backs the mapped region.

Handle this by passing to vm_object_coalesce() exact information about
the charging mode of the extending range 'not charging', 'charged' using
flags instead of simple boolean.  In vm_object_coalesce(), detect
overcharge and undo it if needed.

Note that this relies on vm_object_coalesce() call being the last action
in vm_map_insert() before extending the previous map entry.

Reported and tested by: pho
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation

    [2 lines not shown]
DeltaFile
+30-14sys/vm/vm_map.c
+31-10sys/vm/vm_object.c
+7-1sys/vm/vm_object.h
+68-253 files

FreeBSD/src 353ba3bsys/vm vm_object.c

vm_object_coalesce(): do not account holes twice

alc wrote:
Suppose that the object is OBJ_ONEMAPPING and that we, in fact,
have a single mapping to it. Then, we punch a hole in that mapping.
vm_map_entry_delete() only subtracts from the object's charge when
we shrink the size of the object. Now, suppose that we perform
mmap(MAP_ANON) to reallocate some of the hole. Aren't we going to add to
the charge here, even though vm_map_entry_delete() never subtracted from
the charge for the hole that was created?

Only account the change in the charged object size that was added to it.

Noted by:       alc
Reviewed by:    alc, markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54263
DeltaFile
+7-4sys/vm/vm_object.c
+7-41 files

FreeBSD/src e7053d9sys/vm vm_object.c

vm_object_coalesce(): simplify common expression

Add the next_end variable to replace commonly occuring the
next_pindex + next_size expression.

Suggested by:   alc
Reviewed by:    alc, markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54263
DeltaFile
+7-6sys/vm/vm_object.c
+7-61 files

FreeBSD/src efcb109sys/vm vm_object.c

vm_object_coalesce(): remove commented out code

Reviewed by:    alc, markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54263
DeltaFile
+1-12sys/vm/vm_object.c
+1-121 files

FreeBSD/src 8b4f1d7contrib/xz ChangeLog THANKS, contrib/xz/src/common my_landlock.h

MFV 762f11d98d5cd57ebbe85c36e9e86a557a91fe4e: xz 5.8.2.

(cherry picked from commit ae12432049e7873ab3912643ae5d08297b8cbc49)
DeltaFile
+1,586-0contrib/xz/ChangeLog
+226-208contrib/xz/THANKS
+34-45contrib/xz/src/liblzma/common/stream_decoder_mt.c
+72-0contrib/xz/src/xz/hardware.c
+44-1contrib/xz/src/common/my_landlock.h
+18-20contrib/xz/src/liblzma/api/lzma/container.h
+1,980-27427 files not shown
+2,088-34233 files

FreeBSD/src 07700b0contrib/xz ChangeLog THANKS, contrib/xz/src/common my_landlock.h

MFV 762f11d98d5cd57ebbe85c36e9e86a557a91fe4e: xz 5.8.2.

(cherry picked from commit ae12432049e7873ab3912643ae5d08297b8cbc49)
DeltaFile
+1,586-0contrib/xz/ChangeLog
+226-208contrib/xz/THANKS
+34-45contrib/xz/src/liblzma/common/stream_decoder_mt.c
+72-0contrib/xz/src/xz/hardware.c
+44-1contrib/xz/src/common/my_landlock.h
+18-20contrib/xz/src/liblzma/api/lzma/container.h
+1,980-27427 files not shown
+2,088-34233 files

FreeBSD/src 4e48e50contrib/xz ChangeLog THANKS, contrib/xz/src/common my_landlock.h

MFV 762f11d98d5cd57ebbe85c36e9e86a557a91fe4e: xz 5.8.2.

(cherry picked from commit ae12432049e7873ab3912643ae5d08297b8cbc49)
DeltaFile
+1,586-0contrib/xz/ChangeLog
+226-208contrib/xz/THANKS
+34-45contrib/xz/src/liblzma/common/stream_decoder_mt.c
+72-0contrib/xz/src/xz/hardware.c
+44-1contrib/xz/src/common/my_landlock.h
+18-20contrib/xz/src/liblzma/api/lzma/container.h
+1,980-27427 files not shown
+2,088-34233 files

FreeBSD/src 68c94c3sys/contrib/openzfs/include/os/freebsd/linux compiler.h

Remove __deprecated definition from OpenZFS compiler.h

Since it is now provided by <sys/cdefs.h>.

Direct commit to stable/13, since OpenZFS compiler.h has been
substantially changed in newer branches.
DeltaFile
+0-1sys/contrib/openzfs/include/os/freebsd/linux/compiler.h
+0-11 files

FreeBSD/src 9622effsys/compat/linuxkpi/common/include/linux compiler.h, sys/sys cdefs.h

cdefs: Add __deprecated

Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.

LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).

Sponsored by:           Netflix
Reviewed by:            jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D46137

(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/compiler.h
+1-0sys/sys/cdefs.h
+3-02 files

FreeBSD/src c7826c8sys/sys cdefs.h

cdefs: Add __deprecated1 which accepts a message as an argument

This message will be included in any warning issued by the compiler
for use of the deprecated function.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47701

(cherry picked from commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f)
DeltaFile
+1-0sys/sys/cdefs.h
+1-01 files

FreeBSD/src cd2a65asys/sys cdefs.h

sys/cdefs.h: add __noexcept and __noexcept_if

These macros provide the C++11 noexcept and noexcept(...) keywords if
we're compiling in a C++11 environment.  Otherwise, they expand to an
empty string.

This will be used to add the required noexcept specifier to several libc
functions as required in C++11.

MFC after:      2 weeks

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1085

(cherry picked from commit 02b0d4b688cc4deb14cb6e7534a2a4958e48b753)
DeltaFile
+11-0sys/sys/cdefs.h
+11-01 files

FreeBSD/src 85e0cdesys/sys cdefs.h

cdefs: Add __deprecated1 which accepts a message as an argument

This message will be included in any warning issued by the compiler
for use of the deprecated function.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D47701

(cherry picked from commit 6da04bcff9efedeae7d4046553002b9e3b2bc24f)
DeltaFile
+1-0sys/sys/cdefs.h
+1-01 files

FreeBSD/src 4ff445dsys/compat/linuxkpi/common/include/linux compiler.h, sys/sys cdefs.h

cdefs: Add __deprecated

Add __deprecated decorator. This is for a deprecated interface. copystr
is tagged with this today in copy(9), but don't actually provide it or
use it. copystr is a #define so adding it will have to wait.

LinuxKPI was defining this away completely in compiler.h. Since this is
shared between Linux KPI consumers and OpenZFS, if it's already defined,
use the FreeBSD sys/cdefs.h version, otherwise define it away. For
OpenZFS this will retain it, while for Linux KPI it will tend to drop it
(I think always, but I didn't look at everything).

Sponsored by:           Netflix
Reviewed by:            jhb, emaste
Differential Revision:  https://reviews.freebsd.org/D46137

(cherry picked from commit 16672453f12586703f1c51d909bd1900691bf884)
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/compiler.h
+1-0sys/sys/cdefs.h
+3-02 files