FreeBSD/src 565b058lib/libmagic Makefile

MFC: libmagic: Add swap.c and magic.h to SRCS.

(cherry picked from commit 8929675e11c0c64ff96a2441082794980c9c6b2e)
DeltaFile
+4-2lib/libmagic/Makefile
+4-21 files

FreeBSD/src 2ae59e2contrib/file aclocal.m4 configure, contrib/file/magic/Magdir atari

MFC: MFV: file 5.48

(cherry picked from commit 7af41682a96bf7058b82665c33bb9b1bfa079c17)
DeltaFile
+419-140contrib/file/configure
+297-130contrib/file/aclocal.m4
+233-0contrib/file/magic/Magdir/atari
+115-77contrib/file/src/softmagic.c
+178-0contrib/file/src/landlock.c
+51-113contrib/file/src/apprentice.c
+1,293-46076 files not shown
+2,759-89282 files

FreeBSD/src 981bb14sbin/fsck_msdosfs boot.c

MFC: fsck_msdosfs: avoid signed integer overflow in readboot()

(cherry picked from commit 18094609d301540526d3d57e92705bc989d29986)
DeltaFile
+7-14sbin/fsck_msdosfs/boot.c
+7-141 files

FreeBSD/src 0011a18sbin/fsck_msdosfs dir.c

MFC: fsck_msdosfs: fix 32-bit overflow computing the LOST.DIR offset

(cherry picked from commit d3c5464fee7b178a39c189363e48806a11fd3da4)
DeltaFile
+2-2sbin/fsck_msdosfs/dir.c
+2-21 files

FreeBSD/src 8a702ccsbin/fsck_msdosfs fat.c

MFC: fsck_msdosfs: fix status accounting for lost cluster chains

(cherry picked from commit 6cf0d6c3b5777e053074200ff99dc4b750e62b96)
DeltaFile
+32-9sbin/fsck_msdosfs/fat.c
+32-91 files

FreeBSD/src 2643ff9sbin/fsck_msdosfs/tests Makefile fsck_msdosfs_large_test.sh

MFC: fsck_msdosfs: add a test for reconnecting on volumes larger than 4 GiB

MFC after:      1 week

(cherry picked from commit 37aec55d0a7165960f686e5277f030ab3d44cf45)
DeltaFile
+241-0sbin/fsck_msdosfs/tests/fsck_msdosfs_large_test.sh
+2-1sbin/fsck_msdosfs/tests/Makefile
+243-12 files

FreeBSD/src 741eb8asbin/fsck_msdosfs ext.h fat.c

MFC: fsck_msdosfs: fix memory leaks in checkfilesys()

(cherry picked from commit 6d49b0c0e7b8b77d8043593356e712307e894743)
DeltaFile
+4-1sbin/fsck_msdosfs/check.c
+1-1sbin/fsck_msdosfs/fat.c
+1-0sbin/fsck_msdosfs/ext.h
+6-23 files

FreeBSD/src 79e284asbin/fsck_msdosfs/tests Makefile fsck_msdosfs_boot_test.sh

MFC: fsck_msdosfs: add tests for the 32-bit boot block field decoding

(cherry picked from commit c4f458da4411872df4968e02ca292389df462b7b)
DeltaFile
+214-0sbin/fsck_msdosfs/tests/fsck_msdosfs_boot_test.sh
+2-1sbin/fsck_msdosfs/tests/Makefile
+216-12 files

FreeBSD/src 9af3236etc/mtree BSD.tests.dist, sbin/fsck_msdosfs Makefile

MFC: fsck_msdosfs: add tests for lost cluster chain repair accounting

(cherry picked from commit bbaf254293f7e19fa7b0f9ed1da21c7a43126d79)
DeltaFile
+261-0sbin/fsck_msdosfs/tests/fsck_msdosfs_test.sh
+5-0sbin/fsck_msdosfs/Makefile
+5-0sbin/fsck_msdosfs/tests/Makefile
+3-1etc/mtree/BSD.tests.dist
+274-14 files

FreeBSD/src 37ba8a2sbin/fsck_msdosfs boot.c

MFC: fsck_msdosfs: avoid signed integer overflow in readboot()

(cherry picked from commit 18094609d301540526d3d57e92705bc989d29986)
DeltaFile
+7-14sbin/fsck_msdosfs/boot.c
+7-141 files

FreeBSD/src 33bba26sbin/fsck_msdosfs fat.c

MFC: fsck_msdosfs: fix status accounting for lost cluster chains

(cherry picked from commit 6cf0d6c3b5777e053074200ff99dc4b750e62b96)
DeltaFile
+32-9sbin/fsck_msdosfs/fat.c
+32-91 files

FreeBSD/src d3f8718sbin/fsck_msdosfs dir.c

MFC: fsck_msdosfs: fix 32-bit overflow computing the LOST.DIR offset

(cherry picked from commit d3c5464fee7b178a39c189363e48806a11fd3da4)
DeltaFile
+2-2sbin/fsck_msdosfs/dir.c
+2-21 files

FreeBSD/src c2e12dbsbin/fsck_msdosfs ext.h fat.c

MFC: fsck_msdosfs: fix memory leaks in checkfilesys()

(cherry picked from commit 6d49b0c0e7b8b77d8043593356e712307e894743)
DeltaFile
+4-1sbin/fsck_msdosfs/check.c
+1-1sbin/fsck_msdosfs/fat.c
+1-0sbin/fsck_msdosfs/ext.h
+6-23 files

FreeBSD/src fb2c070sbin/fsck_msdosfs/tests Makefile fsck_msdosfs_large_test.sh

MFC: fsck_msdosfs: add a test for reconnecting on volumes larger than 4 GiB

MFC after:      1 week

(cherry picked from commit 37aec55d0a7165960f686e5277f030ab3d44cf45)
DeltaFile
+241-0sbin/fsck_msdosfs/tests/fsck_msdosfs_large_test.sh
+2-1sbin/fsck_msdosfs/tests/Makefile
+243-12 files

FreeBSD/src 99af5f3sbin/fsck_msdosfs/tests Makefile fsck_msdosfs_boot_test.sh

MFC: fsck_msdosfs: add tests for the 32-bit boot block field decoding

(cherry picked from commit c4f458da4411872df4968e02ca292389df462b7b)
DeltaFile
+214-0sbin/fsck_msdosfs/tests/fsck_msdosfs_boot_test.sh
+2-1sbin/fsck_msdosfs/tests/Makefile
+216-12 files

FreeBSD/src 5693123etc/mtree BSD.tests.dist, sbin/fsck_msdosfs Makefile

MFC: fsck_msdosfs: add tests for lost cluster chain repair accounting

(cherry picked from commit bbaf254293f7e19fa7b0f9ed1da21c7a43126d79)
DeltaFile
+261-0sbin/fsck_msdosfs/tests/fsck_msdosfs_test.sh
+5-0sbin/fsck_msdosfs/Makefile
+5-0sbin/fsck_msdosfs/tests/Makefile
+2-0etc/mtree/BSD.tests.dist
+273-04 files

FreeBSD/src 1922ceflib/libmagic Makefile

MFC: libmagic: Add swap.c and magic.h to SRCS.

(cherry picked from commit 8929675e11c0c64ff96a2441082794980c9c6b2e)
DeltaFile
+4-2lib/libmagic/Makefile
+4-21 files

FreeBSD/src 811f6b4contrib/file aclocal.m4 configure, contrib/file/magic/Magdir atari

MFC: MFV: file 5.48

(cherry picked from commit 7af41682a96bf7058b82665c33bb9b1bfa079c17)
DeltaFile
+419-140contrib/file/configure
+297-130contrib/file/aclocal.m4
+233-0contrib/file/magic/Magdir/atari
+115-77contrib/file/src/softmagic.c
+178-0contrib/file/src/landlock.c
+51-113contrib/file/src/apprentice.c
+1,293-46076 files not shown
+2,759-89282 files

FreeBSD/src b2a270dlib/libjail jail.c, usr.sbin/jail/tests jail_basic_test.sh

libjail: fix fetching mac.label for multiple jails

When doing a basic `jls -n`, jls(8) will jailparam_get() the mac.label
for every jail on the system using the same set of jailparams, and thus
the same jp_value.  We only init the mac_t the first time, so the first
jail would populate it with `?` from /etc/mac.conf and the resulting
jail_get(2) would clobber it with the empty string, then a second jail
would try to pass the empty string to the kernel and fail because it
must have a non-zero length.

Fix it by invoking jps_get() every time.  Drop some comments to note
that jps_get() will be invoked with zero || garbage from previous call,
and be sure that we don't leak our previous mac_t.  There aren't any
other jps_get implementations at this time, so this shouldn't cause any
unexpected problems.

Reported by:    ivy
Reviewed by:    jamie
Differential Revision:  https://reviews.freebsd.org/D57280
DeltaFile
+25-6lib/libjail/jail.c
+4-1usr.sbin/jail/tests/jail_basic_test.sh
+29-72 files

FreeBSD/src f2a2e02sys/compat/linuxkpi/common/include/linux file.h cleanup.h

linuxkpi: Define `DEFINE_CLASS()` and `CLASS()`

`DEFINE_CLASS()` is in fact named `LINUXKPI_DEFINE_CLASS()` because it
conflicts with `DEFINE_CLASS()` defined in <sys/kobj.h>.

This macro defines a type and a pair of constructor/destructor
functions.

They are to be used by `CLASS()`: this one declares a variable,
initialise it with the constructor and set the `__cleanup()` attribute
to call the destructor once the variable goes out of scope.

The DRM drivers generic code started to use `CLASS()` in Linux 6.13. It
requires the `fd` class to be defined in <linux/file.h>.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57583
DeltaFile
+26-0sys/compat/linuxkpi/common/include/linux/cleanup.h
+2-0sys/compat/linuxkpi/common/include/linux/file.h
+28-02 files

FreeBSD/src 33595d4sys/compat/linuxkpi/common/include/linux pci.h, sys/compat/linuxkpi/common/src linux_pci.c

linuxkpi: Add `pci_map_rom()` and `pci_unmap_rom()`

They were already defined as macros in various places in DRM drivers,
aliasing the `vga_pci_map_bios()` and `vga_pci_unmap_bios()` functions.
Let's move them to linuxkpi and avoid copies everywhere.

Because they use the `vga_pci` code internally, `pci_map_rom()` checks
whether the given device is a video card. If it is not, it logs a "TODO"
and returns NULL.

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57573
DeltaFile
+27-0sys/compat/linuxkpi/common/src/linux_pci.c
+5-0sys/compat/linuxkpi/common/include/linux/pci.h
+32-02 files

FreeBSD/src fc0a5aesys/compat/linuxkpi/common/include/linux device.h

linuxkpi: Add device under parent, not under class

In `device_add()`, the function used to add the given device under its
class. This is used to build a sysctl tree. We ended up with devices or
"pseudo" devices (like the output connectors of a GPU). For example with
an output connector:

    sysctl sys.class.drm.card0-DP-1

This device should be added under its parent if it has one. With this
fix, the same output connector is now:

    sysctl sys.device.drmn1.card0.card0-DP-1

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55175
DeltaFile
+4-1sys/compat/linuxkpi/common/include/linux/device.h
+4-11 files

FreeBSD/src b8b2be5sys/compat/linuxkpi/common/include/linux jiffies.h

LinuxKPI: Added jiffies64_to_msecs for amdkfd compatibility

jiffies64_to_msecs is used by kfd_process.c in the amd/amdkfd driver
from Linux kernel 6.12.

Submitted by:   Sourojeet Adhikari
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58075
DeltaFile
+1-0sys/compat/linuxkpi/common/include/linux/jiffies.h
+1-01 files

FreeBSD/src 75b9d19sys/compat/linuxkpi/common/include/linux util_macros.h

linuxkpi: Define `for_each_if()`

This macro was moved from <drm/drm_util.h> to <linux/util_macros.h> in
Linux 6.15.

Submitted by:   Sourojeet Adhikari
Approved by:    adrian, bz, emaste, seuros
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57465
DeltaFile
+18-0sys/compat/linuxkpi/common/include/linux/util_macros.h
+18-01 files

FreeBSD/src 3716da9sys/compat/linuxkpi/common/include/linux sched.h, sys/sys param.h

LinuxKPI: Add tgid to task_struct under sched.h

The amdkfd driver requires the `tgid` to be a part of the `task_struct`.
This patch introduces the `tgid` member to `task_struct`.

Reviewed by:    bz
Sponsored By:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58228
DeltaFile
+1-1sys/sys/param.h
+1-0sys/compat/linuxkpi/common/include/linux/sched.h
+2-12 files

FreeBSD/src b31db8dsbin/ipfw ipfw.8

ipfw.8: more grammar fixes
DeltaFile
+3-3sbin/ipfw/ipfw.8
+3-31 files

FreeBSD/src b891252sbin/ipfw ipfw.8

ipfw.8: whitespace police
DeltaFile
+1-1sbin/ipfw/ipfw.8
+1-11 files

FreeBSD/src 055a726sbin/ipfw ipfw.8

ipfw.8: grammar
DeltaFile
+8-8sbin/ipfw/ipfw.8
+8-81 files

FreeBSD/src 5369f8elib/libpmc libpmc.c pmc.perf.3, sys/dev/hwpmc hwpmc_amd.c hwpmc_intel.c

hwpmc: add MPERF/APERF MSR support for AMD/Intel CPUs

Add support for reading the MPERF (MSR 0xE7) and APERF (MSR 0xE8)
model-specific registers on AMD/Intel CPUs through hwpmc(4). These
counters track maximum and actual performance frequency respectively,
and are used to compute effective CPU frequency scaling independent
of the nominal TSC rate. The name of the class was chosen as PERF
because later support for other PERF MSRs can be added to the same
class.

Extend libpmc(3) to expose the AMD/Intel MPERF/APERF counters added
to hwpmc(4) in the companion kernel change, so userland consumers
(pmcstat(8), etc.) can allocate and read these events by name.

Document the new PERF class and its MPERF/APERF counters in a new
pmc.perf.3 manual page, describing their semantics and how to read
them via pmc(3) and pmcstat(8).

Bump PMC_VERSION_MINOR.

    [6 lines not shown]
DeltaFile
+360-0sys/dev/hwpmc/hwpmc_perf.c
+132-0lib/libpmc/pmc.perf.3
+31-0lib/libpmc/libpmc.c
+28-0sys/dev/hwpmc/hwpmc_perf.h
+18-0sys/dev/hwpmc/hwpmc_intel.c
+16-0sys/dev/hwpmc/hwpmc_amd.c
+585-07 files not shown
+613-313 files

FreeBSD/src 7324487tools/boot universe.sh

universe.sh: don't overwrite no_zfs's build log

Give the WITHOUT_LOADER_BIOS_TEXTONLY build its own log file.
DeltaFile
+1-1tools/boot/universe.sh
+1-11 files