FreeBSD/src bae5170sys/vm swap_pager.c

swap_pager: enhance meta_transfer comments

Clarify comments about what happens to source blocks in
swp_pager_meta_transfer.  No functional changes.

Reviewed by:    alc
Differential Revision:  https://reviews.freebsd.org/D46682
DeltaFile
+5-3sys/vm/swap_pager.c
+5-31 files

FreeBSD/src d84fcedsys/contrib/libnv nvlist.c

libnv: correct the calculation of the structure's size

Reported by:    Milosz Kaniewski <milosz.kaniewski at gmail.com>

(cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0)
(cherry picked from commit 056c50c48be3e3828ef740d2fcce988a545e52aa)
DeltaFile
+1-1sys/contrib/libnv/nvlist.c
+1-11 files

FreeBSD/src 056c50csys/contrib/libnv nvlist.c

libnv: correct the calculation of the structure's size

Reported by:    Milosz Kaniewski <milosz.kaniewski at gmail.com>

(cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0)
DeltaFile
+1-1sys/contrib/libnv/nvlist.c
+1-11 files

FreeBSD/src 4b273a7sys/ufs/ffs ffs_softdep.c

softdep_mount: report failure of the softdepflush thread creation

and do not hang waiting forever for an ack from non-existing thread.

PR:     281511
Reported and tested by: pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+9-1sys/ufs/ffs/ffs_softdep.c
+9-11 files

FreeBSD/src 8276c6esys/ufs/ffs ffs_softdep.c

softdep_mount: on journal start failure, report the mount point path

Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-1sys/ufs/ffs/ffs_softdep.c
+2-11 files

FreeBSD/src e3b7775usr.bin/procstat procstat_rlimit.c

procstat(1): make rlimit_param[] size assertion automatic

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46619
DeltaFile
+3-4usr.bin/procstat/procstat_rlimit.c
+3-41 files

FreeBSD/src 3a2a5d6lib/libsys getrlimit.2

getrlimit(2): document RLIMIT_UMTXP

Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D46619
DeltaFile
+3-0lib/libsys/getrlimit.2
+3-01 files

FreeBSD/src 4ccad54sys/vm swap_pager.c

swap_pager: avoid meta_transfer race

Function swp_pager_meta_transfer expects that after dropping and
reacquiring an object lock, the swap block it's processing still
exists, and has not been removed from the trie and freed.  Rewrite to
avoid depending on that, by scrubbing, removing and freeing it before
releasing the lock.

Reviewed by:    alc, markj
Differential Revision:  https://reviews.freebsd.org/D46629
DeltaFile
+26-13sys/vm/swap_pager.c
+26-131 files

FreeBSD/src f0bcebecontrib/pf/pflogd pflogd.h

pflogd: Define structures removed in libpcap-1.10.5

In libpcap-1.10.5, two structures that we rely on, pcap_timeval and
pcap_sf_pkthdr, were made private.

https://github.com/the-tcpdump-group/libpcap/commit/c2d8cbb977963be1f6cb07863e5bb59609e87fae

Temporarily define them here to fix the build.  kp and I will
investigate a permanent solution at EuroBSDCon in Dublin.

Reviewed by:    kp
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46676
DeltaFile
+13-0contrib/pf/pflogd/pflogd.h
+13-01 files

FreeBSD/src 77864b5sys/crypto/openssl/powerpc aesp8-ppc.S poly1305-ppc.S, sys/crypto/openssl/powerpc64 aesp8-ppc.S poly1305-ppc.S

sys/crypto/openssl: update powerpc* ASM

This change updates the crypto powerpc* ASM via the prescribed process
documented in `crypto/openssl/FREEBSD-upgrade`.

This change syncs the ASM with 3.0.15's generated ASM.

MFC after:      1 week
MFC with:       a7148ab39c03abd4d1a84997c70bf96f15dd2a09
MFC with:       cc717b574d7faa2e0b2de1a985076286cef74187
Differential Revision:  https://reviews.freebsd.org/D46604
DeltaFile
+94-49sys/crypto/openssl/powerpc/aesp8-ppc.S
+94-49sys/crypto/openssl/powerpc64/aesp8-ppc.S
+94-49sys/crypto/openssl/powerpc64le/aesp8-ppc.S
+32-32sys/crypto/openssl/powerpc64/poly1305-ppc.S
+32-32sys/crypto/openssl/powerpc64le/poly1305-ppc.S
+32-32sys/crypto/openssl/powerpc/poly1305-ppc.S
+378-2436 files

FreeBSD/src 0a5443dshare/man/man4 Makefile

man4: Add a comment about Hardware Notes

The Hardware Notes for each release are generated automatically from a
template file and the HARDWARE sections of driver man pages.  When man
pages for new drivers are added here, they should usually be added to
the release notes template file.

Suggested by:   bz
Sponsored by:   Amazon
DeltaFile
+5-0share/man/man4/Makefile
+5-01 files

FreeBSD/src 61ed574lib/libc/tests/string memccpy_test.c

lib/libc/tests/string: improve memccpy "bounds" unit test

The purpose of the "bounds" test is to check that the function does not
overread the array bounds.  The old unit test, copied from the strlcpy()
one, always ensured that we see the character c memccpy() is looking for
in the source array before the array ends.  While this is correct for
strlcpy(), memccpy()'s specification does not guarantee that c is
present within the given size limit.

The updated test handles this case better, ensuring that the source
array ends early if c is not supposed to be present.

Reported by:    getz
Approved by:    emaste
See also:       D46052
Event:          GSoC 2024
Differential Revision:  https://reviews.freebsd.org/D46051
DeltaFile
+37-13lib/libc/tests/string/memccpy_test.c
+37-131 files

FreeBSD/src ecb75belib/libpcap config.h Makefile

libpcap: Add changes missed in update to 1.10.5

Fixes:          afdbf109c6 (libpcap: Update to 1.10.5)
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-2lib/libpcap/config.h
+0-1lib/libpcap/Makefile
+2-32 files

FreeBSD/src 407a9cc. ObsoleteFiles.inc

ObsoleteFiles.inc: Update after libpcap upgrade from 1.10.4 to 1.10.5

Sponsored by:   The FreeBSD Foundation
DeltaFile
+5-0ObsoleteFiles.inc
+5-01 files

FreeBSD/src afdbf10contrib/libpcap configure CMakeLists.txt

libpcap: Update to 1.10.5

Changes:        https://git.tcpdump.org/libpcap/blob/bbcbc9174df3298a854daee2b3e666a4b6e5383a:/CHANGES
Reviewed by:    emaste
Obtained from:  https://www.tcpdump.org/release/libpcap-1.10.5.tar.gz
Sponsored by:   The FreeBSD Foundation

DeltaFile
+4,828-4,793contrib/libpcap/configure
+621-398contrib/libpcap/CMakeLists.txt
+502-211contrib/libpcap/install-sh
+402-254contrib/libpcap/pcap-linux.c
+426-158contrib/libpcap/gencode.c
+504-0contrib/libpcap/pcap-haiku.c
+7,283-5,814149 files not shown
+12,003-9,202155 files

FreeBSD/src 2022efalibarchive archive_read_support_format_tar.c archive_entry.c, libarchive/test test_read_format_huge_rpm.rpm.uu test_pax_filename_encoding.c

Update vendor/libarchive to 3.7.5

Security fixes:
 #2158 rpm: calculate huge header sizes correctly
 #2160 util: fix out of boundary access in mktemp functions
 #2168 uu: stop processing if lines are too long
 #2174 lzop: prevent integer overflow
 #2172 rar4: protect copy_from_lzss_window_to_unp() (CVE-2024-20696)
 #2175 unzip: unify EOF handling
 #2179 rar4: fix out of boundary access with large files
 #2203 rar4: fix OOB access with unicode filenames
 #2210 rar4: add boundary checks to rgb filter
 #2248 rar4: fix OOB in delta filter
 #2249 rar4: fix OOB in audio filter
 #2256 fix multiple vulnerabilities identified by SAST
 #2258 cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
 #2265 rar5: clear 'data ready' cache on window buffer reallocs
 #2269 rar4: fix CVE-2024-26256 (CVE-2024-26256)


    [12 lines not shown]
DeltaFile
+1,383-756libarchive/archive_read_support_format_tar.c
+201-95libarchive/archive_entry.c
+244-0libarchive/test/test_read_format_huge_rpm.rpm.uu
+152-0libarchive/test/test_pax_filename_encoding.c
+149-0libarchive/test/test_read_format_tar_pax_large_attr.tar.Z.uu
+135-0libarchive/test/test_archive_string_conversion.c
+2,264-851111 files not shown
+4,232-1,296117 files

FreeBSD/src 92adaa5sys/conf files, sys/dev/gpio acpi_gpiobus.c gpiobus.c

gpiobus(4): Add an acpi variant of gpiobus

This currently only implements the address space handler and attempts to
configure pins with flags obtained from ACPI.

Reviewed by:    wulf
MFC after:      1 month
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1359
DeltaFile
+311-0sys/dev/gpio/acpi_gpiobus.c
+2-4sys/dev/gpio/gpiobus.c
+3-0sys/modules/gpio/gpiobus/Makefile
+2-0sys/dev/gpio/gpiobusvar.h
+1-0sys/conf/files
+319-45 files

FreeBSD/src 641fbfctests/sys/netpfil/pf divert-to.sh if_enc.sh

pf tests: Do not handle ipfw presence

Initially, it was added to cover a conflicting case of ipfw and pf used
together. But there are more drawbacks than benefits:
- A half of these tests are always skipped. That leads to
  misunderstanding, while the test suite strives to avoid ambiguous
  situations.
- Handling enabled ipfw on the test level is tedious, error-prone, and
  less maintainable.
- CI and similar parties already know how to deal with ipfw for the test
  suite, like making it open by default. Extra complexity is not needed.

In addition, ipfw+pf use cases are not officially supported.

Reviewed by:    kp, markj
Approved by:    kp (mentor), markj (mentor)
Differential Revision:  https://reviews.freebsd.org/D46655
DeltaFile
+30-173tests/sys/netpfil/pf/divert-to.sh
+7-49tests/sys/netpfil/pf/if_enc.sh
+37-2222 files

FreeBSD/src 251d93eusr.bin/fetch fetch.c

MFC: fetch(1): suppress "Not Modified" in quiet mode

"fetch -qi" should skip printing "Not Modified" for successful
http(s) request. Still print it by default (v_level == 1).

(cherry picked from commit 7a6309fdc79427b0a7a5c3876daba150d946ae22)
DeltaFile
+6-5usr.bin/fetch/fetch.c
+6-51 files

FreeBSD/src 0481321usr.bin/fetch fetch.c

MFC: fetch(1): suppress "Not Modified" in quiet mode

"fetch -qi" should skip printing "Not Modified" for successful
http(s) request. Still print it by default (v_level == 1).

(cherry picked from commit 7a6309fdc79427b0a7a5c3876daba150d946ae22)
DeltaFile
+6-5usr.bin/fetch/fetch.c
+6-51 files

FreeBSD/src 696922flibexec/flua/libfreebsd Makefile.inc Makefile, libexec/flua/libfreebsd/kenv kenv.c freebsd.kenv.3lua

flua: add freebsd.kenv, kenv(2) bindings

Add bindings for kenv(2) right now only get() has been created
it allows do dump into a key/value table the kernel environement if
no argument is passed, or it returns the value associated to the
provided key.

Reviewed by:    imp, kevans, markj
Accepted by:    imp, kevans
Differential Revision:  https://reviews.freebsd.org/D46654
DeltaFile
+96-0libexec/flua/libfreebsd/kenv/kenv.c
+44-0libexec/flua/libfreebsd/kenv/freebsd.kenv.3lua
+5-0libexec/flua/libfreebsd/kenv/Makefile
+2-0libexec/flua/libfreebsd/Makefile.inc
+1-0libexec/flua/libfreebsd/Makefile
+148-05 files

FreeBSD/src 50a0397sys/powerpc/ps3 ps3-hvcall.S ps3-hv-asm.awk

ps3: add elfv2 support

ps3 are broken since we moved to clang/elfv2.  Fix this by updating the
hypercall glue to the new ABI.

Signed-off-by: Chattrapat Sangmanee <aomsin27 at hotmail.co.th>
Reviewed by:    jhibbits
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1413
DeltaFile
+218-218sys/powerpc/ps3/ps3-hvcall.S
+12-6sys/powerpc/ps3/ps3-hv-asm.awk
+230-2242 files

FreeBSD/src afd0963sys/sys kassert.h

kassert: Further remove KASAN integration from DEBUG_POISON_POINTER

Fixes:  47112d359b36 ("kassert: Remove KASAN marking from DEBUG_POISON_POINTER")
DeltaFile
+1-5sys/sys/kassert.h
+1-51 files

FreeBSD/src 47112d3sys/sys kassert.h

kassert: Remove KASAN marking from DEBUG_POISON_POINTER

While this approach works for trapping reads of an uninitialized
pointer, it means that any attempt to store to the variable triggers a
KASAN report, which is not what we want.  Simply remove the kasan_mark()
call.  KMSAN will catch these kinds of bugs automatically anyway.

Reported by:    syzbot+c5e279db5763b58e8d69 at syzkaller.appspotmail.com
MFC after:      1 week
DeltaFile
+1-3sys/sys/kassert.h
+1-31 files

FreeBSD/src 50982d2sys/net80211 ieee80211.h

net80211: add MMIC element ID (for management frame protected group action frames)

* add the MMIC element ID
* add a comment showing the source of this table from the 802.11-2016
  specification.

Differential Revision: https://reviews.freebsd.org/D46505
DeltaFile
+3-0sys/net80211/ieee80211.h
+3-01 files

FreeBSD/src 3e52b26sys/net80211 ieee80211.h

net80211: fix fast BSS transition element ID name

This is a straight up typo!

Differential Revision: https://reviews.freebsd.org/D46504
DeltaFile
+1-1sys/net80211/ieee80211.h
+1-11 files

FreeBSD/src 4269d1alibexec/rc rc.subr

rc.subr: fix typo "save_dot" -> "safe_dot"

Reviewed by:    sjg
Approved by:    kp
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46644
DeltaFile
+1-1libexec/rc/rc.subr
+1-11 files

FreeBSD/src fd1d666sys/kern subr_pctrie.c, sys/sys pctrie.h

pctrie: create iterator

Define a pctrie iterator type. A pctrie iterator is a wrapper around a
pctrie that remembers a position in the trie where the last search
left off, and where a new search can resume. When the next search is
for an item very near in the trie to where the last search left off,
iter-based search is faster because instead of starting from the root,
the search usually only has to back up one or two steps up the
root-to-last-search path to find the branch that leads to the new
search target.

Every kind of lookup (plain, lookup_ge, lookup_le) that can begin with
the trie root can begin with an iterator instead. An iterator can also
do a relative search ("look for the item 4 greater than the last item
I found") because it remembers where that last search ended. It can
also search within limits ("look for the item bigger than this one,
but it has to be less than 100"), which can save time when the next
item beyond the limits and that is known before we actually know what
that item it is. An iterator can also be used to remove an item that

    [10 lines not shown]
DeltaFile
+365-44sys/kern/subr_pctrie.c
+128-6sys/sys/pctrie.h
+493-502 files

FreeBSD/src 40d0f17sys/arm64/freescale/imx imx8mp_ccm.c imx8mp_ccm.h, sys/conf files.arm64

imx8mp: Add clock tree

Add clock tree for imx8mp SOC. This provides clocks sufficient for
several sub systems to work including USB and SD/MMC.

Reviewed by:    manu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46642
DeltaFile
+693-0sys/arm64/freescale/imx/imx8mp_ccm.c
+456-0sys/arm64/freescale/imx/imx8mp_ccm.h
+1-0sys/conf/files.arm64
+1,150-03 files

FreeBSD/src be9fefasys/arm64/freescale/imx imx_ccm.c imx_ccm.h, sys/conf files.arm64

imx_ccm: Rearrange clock control module driver

Rearrange the IMX clock control module driver so it is more straight
forward to support clock trees from other SOCs in the family.

Move the existing imx8mq_ccm driver to a more generic imx_ccm (based on
rk_cru) and update the previous driver to sub class imx_ccm.

Reviewed by:    manu
Sponsored by:   The FreeBSD Foundations
Differential Revision: https://reviews.freebsd.org/D46641
DeltaFile
+237-0sys/arm64/freescale/imx/imx_ccm.c
+224-0sys/arm64/freescale/imx/imx_ccm.h
+0-210sys/arm64/freescale/imx/imx_ccm_clk.h
+17-180sys/arm64/freescale/imx/imx8mq_ccm.c
+1-0sys/conf/files.arm64
+479-3905 files