FreeBSD/src 131dc2b. MAINTAINERS

MAINTAINERS: Add myself to ufshci

Sponsored by:           Samsung Electronics
Reviewed By:            imp (mentor)
Differential Revision:  https://reviews.freebsd.org/D53253
DeltaFile
+1-0MAINTAINERS
+1-01 files

FreeBSD/src 6cfe0bcusr.bin/mkimg mkimg.c

mkimg: Add a -h option and improve usage output to be more expressive

Reviewed by:    imp, kp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D52906

(cherry picked from commit 6fa18fe74461497f9a557af806552d246159272e)
DeltaFile
+13-8usr.bin/mkimg/mkimg.c
+13-81 files

FreeBSD/src ff7a10dlib/libc/inet inet_net_pton.c inet_net_ntop.c, lib/libc/tests/net inet_net_test.cc Makefile

libc: Import OpenBSD's inet_net_{ntop,pton}

Our versions of these functions (originally taken from BIND) simply
don't work correctly for AF_INET6.  These were removed from BIND itself
quite a while ago, but OpenBSD has made several fixes in the mean time,
so import their code.

Add tests for both functions.

PR:             289198
Reported by:    Nico Sonack <nsonack at herrhotzenplotz.de>
MFC after:      1 week
Reviewed by:    des
Obtained from:  OpenBSD (lib/libc/net)
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52629

(cherry picked from commit 8f4a0d2f7b96099001dbc51e06114df1a0e6d291)
DeltaFile
+114-267lib/libc/inet/inet_net_pton.c
+333-0lib/libc/tests/net/inet_net_test.cc
+52-154lib/libc/inet/inet_net_ntop.c
+2-0lib/libc/tests/net/Makefile
+501-4214 files

FreeBSD/src c6a19aeusr.bin/tar Makefile

tar: Move to the utilities package

tar(1) is not a core runtime utility; in particular, nothing in
/etc/rc.d/* requires it.  Move it to utilities, which is also
where cpio(1) lives.

This removes the dependency from runtime to libarchive.

MFC after:      3 days
Reviewed by:    manu, emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53059

(cherry picked from commit c0f17d637a4ab1e5dcae6b931623b7b0ee5bece2)
DeltaFile
+0-1usr.bin/tar/Makefile
+0-11 files

FreeBSD/src 6889792usr.bin/ncurses Makefile

ncurses: Move utilities to the ncurses package

MFC after:      3 days
Reviewed by:    manu, kevans
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53163

(cherry picked from commit 09a49cd49b4fecfb31b2b6677a938ef847289055)
DeltaFile
+1-1usr.bin/ncurses/Makefile
+1-11 files

FreeBSD/src ef82bdc. Makefile.inc1

Makefile: Don't allow install{world,kernel} with pkgbase

Using these targets on a pkgbase system will cause the installed system
to become out of sync with the package database, which is almost certain
to cause issues the next time pkg(8) is used.

To prevent users doing this accidentally, disallow install* if we detect
that FreeBSD-runtime is installed in the target.  The check can be
overridden with DESTDIR=/ for users who are sure they want to do this.

MFC after:      3 days
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D52879

(cherry picked from commit 74a6bb524e5b9ad654a9acc5da5c195f406717b5)
DeltaFile
+31-8Makefile.inc1
+31-81 files

FreeBSD/src da0e0f7share/mk bsd.man.mk

bsd.man.mk: Support MANGROUPS.yes

Similar to SUBDIR and CONFGROUPS, this allows the use of
MANGROUPS.${MK_FOO}, simplifying Makefile logic for optional
manpages.

MFC after:      3 seconds
Reviewed by:    emaste
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D53126

(cherry picked from commit e757a92282fcd064c82cf2685dde4730743fc425)
DeltaFile
+8-0share/mk/bsd.man.mk
+8-01 files

FreeBSD/src fa240b7release/packages/ucl caroot.ucl

packages: Update the METALOG when (un)installing the caroot package

There may be other issues here but this change certainly seems to
be necessary.

PR:     290394
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D53263
DeltaFile
+2-2release/packages/ucl/caroot.ucl
+2-21 files

FreeBSD/src f7ccf05etc/mtree BSD.include.dist

mtree: Remove stray an (Aironet) directory

Reviewed by:    imp
Fixes:  663b174b5b53 ("an: Remove driver")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53265
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files

FreeBSD/src f942a74etc/mtree BSD.include.dist

mtree: Remove stray wi directory

Reviewed by:    imp, emaste
Fixes:  a21def4d568f ("pccard: Remove wi(4) driver")
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53264
DeltaFile
+0-2etc/mtree/BSD.include.dist
+0-21 files

FreeBSD/src 3b6d4c6sys/fs/nfs nfs_commonsubs.c nfsproto.h, sys/fs/nfsclient nfs_clvnops.c nfs_clrpcops.c

nfs: Add support for the NFSv4 archive attribute

The archive attribute (UF_ARCHIVE) is listed as deprecated
in RFC8881.  However, the Windows NFSv4.1 client folk disagree
with this and say they need support for it.

This patch adds support for it, in a manner similar to what
is done for UF_SYSTEM and UF_HIDDEN.

MFC after:      2 weeks
DeltaFile
+21-3sys/fs/nfs/nfs_commonsubs.c
+11-1sys/fs/nfsserver/nfs_nfsdserv.c
+7-4sys/fs/nfsserver/nfs_nfsdport.c
+6-2sys/fs/nfsclient/nfs_clvnops.c
+4-0sys/fs/nfs/nfsproto.h
+3-0sys/fs/nfsclient/nfs_clrpcops.c
+52-106 files

FreeBSD/src f138688sys/netpfil/pf pf.c pf_lb.c, tests/sys/netpfil/pf rdr.sh

pf: fix 'no rdr'

Ensure we always have a non-NULL rule pointer (ctx.rm).
It might have gotten set to NULL by pf_get_translation().

While here also restore the previous rdr behaviour be re-adding the incorrectly
removed 'break' in pf_match_translation_rule.

Approved by:    re (cperciva)
PR:             290177
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D53191

(cherry picked from commit cb36bfee25b71d1223b8fb1237fcf823d514b50e)
(cherry picked from commit 536b07512c4b931b9d0d3d609c3ac925f55e3ec9)
DeltaFile
+51-0tests/sys/netpfil/pf/rdr.sh
+1-0sys/netpfil/pf/pf.c
+1-0sys/netpfil/pf/pf_lb.c
+53-03 files

FreeBSD/src 0948c4dlib/libc/stdtime strptime.c strptime.3

libc: Add "Z" as TZ designator for strptime.

ISO 8601 allows use of "Z" as the time zone designator. Update the
strptime parser to allow this usage.

While we are at it, update the manpage to reflect that both UTC and Z
are now valid options.

Approved by:    re (cperciva)
Reviewed by:    des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53083

(cherry picked from commit 79e57ea662d92ffcbe7d65854a284aefac6a332d)
(cherry picked from commit 3d368c699b73cc1dff3ca27d29d19666741d9ff8)
DeltaFile
+2-1lib/libc/stdtime/strptime.c
+1-1lib/libc/stdtime/strptime.3
+3-22 files

FreeBSD/src b1faa50sys/kern imgact_elf.c

imgact_elf: Check note body sizes

In parse_notes we validate that the note name fits within the note
buffer, but we do not do the same for the note data, so there is some
potential for an OOB read in the note handler.  Add a bounds check.

Approved by:    re (cperciva)
Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    kib, emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53063

(cherry picked from commit c86af2cc4cd12fb0174843b22d737c3b5b5d55d0)
(cherry picked from commit 09ae918e1f00572f9045283c281cf2d210ece491)
DeltaFile
+4-4sys/kern/imgact_elf.c
+4-41 files

FreeBSD/src 95f60a3sys/contrib/libnv bsd_nvpair.c

libnv: Fix a length check in nvpair_unpack_string_array()

A string array is represented by a set of nul-terminated strings
concatenated together.  For each string, we check to see if there's a
nul terminator at the end, taking care to avoid going past the end of
the buffer.  However, the code fails to handle the possibility that
size == 0 at the end of an iteration, leading to underflow.

Fix the length check.

Approved by:    re (cperciva)
Reported by:    Ilja van Sprundel <ivansprundel at ioactive.com>
Reviewed by:    emaste
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53069

(cherry picked from commit 937693fc9e4ff4045cc674a14902f0d53e84ec98)
(cherry picked from commit c47f9af4771bc7de2ebed4c91628c1f9a7f86a2c)
DeltaFile
+4-4sys/contrib/libnv/bsd_nvpair.c
+4-41 files

FreeBSD/src eaafcf8sys/netpfil/ipfw ip_fw_nat.c

ipfw: Check for errors from sooptcopyin() and sooptcopyout()

Note, it looks like this code may be unused since commit 4a77657cbc01
("ipfw: migrate ipfw to 32-bit size rule numbers").  In particular, it
looks like the ipfw_nat_*_ptr pointers are unused now.

Approved by:    re (cperciva)
Reviewed by:    ae
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53068

(cherry picked from commit 2df39ce5d4a8836ef5fd3c2666f48041042eff42)
(cherry picked from commit 302c4c540e449e3fec02e27742f7572039347f66)
DeltaFile
+7-5sys/netpfil/ipfw/ip_fw_nat.c
+7-51 files

FreeBSD/src 945500csys/kern kern_exec.c

exec: Check for errors when mapping the shared object

In the non-ASLR case, there is no check for an error from
vm_map_fixed().  Restore it, it was dropped in commit 939f0b6323e0a.
This bug could result in a refcount leak of the object used to map the
VDSO page.

Approved by:    re (cperciva)
Reviewed by:    kib
Reported by:    Ilja Van Sprundel <ivansprundel at ioactive.com>
MFC after:      1 week
Fixes:  939f0b6323e0 ("Implement shared page address randomization")
Differential Revision:  https://reviews.freebsd.org/D53065

(cherry picked from commit 7117c86fcb7ebee4483097cefa9b143de8d78ee0)
(cherry picked from commit 6a5f0dc705c4401454d4fcd61e7301b992bfea13)
DeltaFile
+1-1sys/kern/kern_exec.c
+1-11 files

FreeBSD/src 90cbdfausr.sbin/bsdinstall Makefile

bsdinstall: Use pkgbase release URL for BETA/RC

Approved by:    re (cperciva)
PR:             290238
Reviewed by:    ivy
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53214

(cherry picked from commit 604b6458f3f327206a56da7ba80c2df7965a0761)
DeltaFile
+2-1usr.sbin/bsdinstall/Makefile
+2-11 files

FreeBSD/src 34e7a57krb5/include autoconf.h

krb5: Include <features.h> on Linux so __GLIBC__ can be checked

__GLIBC__ is not pre-defined by the toolchain, it comes from features.h,
so we need to make sure that's included by this point.

Fixes:  4dd2b869cd07 ("krb5: Fix -Wint-conversion when bootstrapping on GNU/Linux")
DeltaFile
+3-0krb5/include/autoconf.h
+3-01 files

FreeBSD/src 6941587share/man/man5 src.conf.5, share/mk src.opts.mk

src.opts.mk: Enable LLDB for 32-bit arm

It was previously disabled when we built for older 32-bit arm targets
which lack 64-bit atomics.  As we now support armv7 at a minimum there
is no need to disable LLDB.

Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52668
DeltaFile
+3-3share/man/man5/src.conf.5
+1-1share/mk/src.opts.mk
+4-42 files

FreeBSD/src 4dd2b86krb5/include autoconf.h

krb5: Fix -Wint-conversion when bootstrapping on GNU/Linux

This shows up in GitHub Actions as a warning, and some compilers can
default to it being an error.
DeltaFile
+5-0krb5/include/autoconf.h
+5-01 files

FreeBSD/src 536b075sys/netpfil/pf pf.c pf_lb.c, tests/sys/netpfil/pf rdr.sh

pf: fix 'no rdr'

Ensure we always have a non-NULL rule pointer (ctx.rm).
It might have gotten set to NULL by pf_get_translation().

While here also restore the previous rdr behaviour be re-adding the incorrectly
removed 'break' in pf_match_translation_rule.

PR:             290177
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D53191

(cherry picked from commit cb36bfee25b71d1223b8fb1237fcf823d514b50e)
DeltaFile
+51-0tests/sys/netpfil/pf/rdr.sh
+1-0sys/netpfil/pf/pf.c
+1-0sys/netpfil/pf/pf_lb.c
+53-03 files

FreeBSD/src c108844share/man/man5 src.conf.5

src.conf.5: Regen

after recent MFCs:
9d0b660e6949 ("jemalloc: Fix activating debug on WITHOUT_MALLOC_PRODUCTION")
ac5378d93ce0 ("Add build option for the ia32 loader")

Sponsored by:   The FreeBSD Foundation
DeltaFile
+14-4share/man/man5/src.conf.5
+14-41 files

FreeBSD/src 2836993sys/dev/random random_harvestq.c, sys/dev/random/fenestrasX fx_pool.c

random: garbage collect the RANDOM_PURE_OCTEON entropy source

It was used for Octeon MIPS and all producers have been removed
from the source tree.

Reviewed by: emaste
Differential Revision:  https://reviews.freebsd.org/D53146
DeltaFile
+0-3sys/dev/random/fenestrasX/fx_pool.c
+1-2sys/dev/random/random_harvestq.c
+1-2sys/sys/random.h
+2-73 files

FreeBSD/src 74cd979release Makefile

release: Add pkg .conf to METALOG on dvd

We're correctly recording all of the packages in the dvd METALOG file,
but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then
users won't be able to install them very easily.

Approved by:    re (cperciva)
Reviewed by:    markj
Reported by:    Lars Tunkrans
MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D53199

(cherry picked from commit 2b5c62494df95cdb844b5f6f852412f2178f66dd)
(cherry picked from commit 52ea1ca18a0674e5085d6d0ddbc3c13bf0850429)
DeltaFile
+2-0release/Makefile
+2-01 files

FreeBSD/src 6f1622drelease/pkg_repos release-dvd.conf

Revert "release: Switch back to latest packages for now"

We now have 15.x quarterly package sets for both amd64 and arm64.

This reverts commit dc5aae134a44d18921e179355e9b93a7eff534ed.

Approved by:    re (cperciva)
DeltaFile
+1-1release/pkg_repos/release-dvd.conf
+1-11 files

FreeBSD/src 06e48a8release/tools vmimage.subr

vmimage.subr: Fix when/where we fix up METALOG

We only need to check for unMETALOGed directories and sort the METALOG
file if we're using it, i.e. if we're doing a NO_ROOT build.  This
non-NO_ROOT builds by no longer bogusly writing to /METALOG*.

We only need to add databases (spwd.db etc) to METALOG if we're doing
a pkgbase-enabled NO_ROOT build; but we should always do this before
creating the filesystem, not only if we installed extra packages (in
vm_extra_install_packages, where that code was erroneously placed).
This fixes non-cloud VM images, which in 15.0-BETA2 shipped without
password databases.

Approved by:    re (cperciva)
Reviewed by:    ivy
MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D53194


    [2 lines not shown]
DeltaFile
+35-31release/tools/vmimage.subr
+35-311 files

FreeBSD/src 7492142usr.sbin/bsdinstall/scripts jail

bsdinstall: jail: Fix DISTMENU items

The menu was incorrectly using the fourth column (distname) instead of
the first (dist) of the MANIFEST.

The actual file name is on the first column of the MANIFEST file.
Remove the .txz part of the name to build the menu options.

Reviewed by:    jamie
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D53177
DeltaFile
+1-1usr.sbin/bsdinstall/scripts/jail
+1-11 files

FreeBSD/src 52ea1carelease Makefile

release: Add pkg .conf to METALOG on dvd

We're correctly recording all of the packages in the dvd METALOG file,
but if we don't record ./packages/repos/FreeBSD_install_cdrom.conf then
users won't be able to install them very easily.

Reviewed by:    markj
Reported by:    Lars Tunkrans
MFC after:      3 days
Sponsored by:   https://www.patreon.com/cperciva
Differential Revision:  https://reviews.freebsd.org/D53199

(cherry picked from commit 2b5c62494df95cdb844b5f6f852412f2178f66dd)
DeltaFile
+2-0release/Makefile
+2-01 files

FreeBSD/src 34943c3share/mk bsd.opts.mk src.opts.mk

src.opts.mk: Remove REPRODUCIBLE_BUILD from the default list

It was added to the list in bsd.opts.mk in commit 4f81c42fbd76, so
should have been removed here.

Sponsored by:   The FreeBSD Foundation
Sponsored by:   Klara, Inc.

(cherry picked from commit b2f5dc591ef2547ee2e9b68e58a263cd34948db1)
(cherry picked from commit 7626ba028089b97b5bb204b5203ee8fa24f63c48)

PR:             290427
DeltaFile
+1-1share/mk/bsd.opts.mk
+0-1share/mk/src.opts.mk
+1-22 files