FreeBSD/src 701d7belibexec/rc safe_eval.sh, libexec/rc/tests safe_eval_test.sh Makefile

Add test cases for safe_eval.sh

safe_set is the routine that does all the work.

In safe_set; if we replace one=`cmd arg` or two=$(cmd arg) add quotes
around the result eg. one="_cmd arg_"
Also lines containing `` or $() are too likely to result in syntax
errors, so just delete them.

Differential Revision:  https://reviews.freebsd.org/D56795
DeltaFile
+65-0libexec/rc/tests/safe_eval_test.sh
+7-1libexec/rc/tests/Makefile
+6-1libexec/rc/safe_eval.sh
+78-23 files

FreeBSD/src 32f8546sys/dev/qcom_tlmm qcom_tlmm.c

qcom_tlmm: remove annoying debugging

Yes this printf is for local debugging and not required at all on anything.

Pointed out by: andrew@
DeltaFile
+0-1sys/dev/qcom_tlmm/qcom_tlmm.c
+0-11 files

FreeBSD/src c391efcsys/dev/usb usbdevs, sys/dev/usb/serial u3g.c

u3g: Add Telit LM960A18 LTE modem

The patch in the PR failed to apply, so I manually applied the same
changes.

PR:             295231
Submitted by:   Mike Tancsa <mike at sentex.net>
Reviewed by:    emaste

(cherry picked from commit eacf4f50bfb19aa0278db5e8982d73c6d77ca24c)
DeltaFile
+2-0sys/dev/usb/serial/u3g.c
+2-0sys/dev/usb/usbdevs
+4-02 files

FreeBSD/src 22c054csys/sys elf_common.h

elf_common.h: Add SHT_LLVM_ADDRSIG

Reported by:    bz
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/sys/elf_common.h
+1-01 files

FreeBSD/src af5cdcdsys/dev/asmc asmc.c

Revert "asmc: fix asmc_key_dump() page fault on T2 MMIO backend"

This reverts commit 3abc07947c14f5c30e5328d56a2da8dbf8412ebf.

I'm not sure how this built locally for me but obviously failed
in CI; I'll go figure that out with the submitter and come back.
DeltaFile
+5-31sys/dev/asmc/asmc.c
+5-311 files

FreeBSD/src 2509ddeusr.sbin/freebsd-update freebsd-update.sh

freebsd-update: Skip /etc/ssl/cert.pem

We already run `certctl rehash` at the end, there is no point in asking
users upgrading from 15.0 to 15.1 to manually merge the trust store.

MFC after:      3 days
Reviewed by:    cperciva
Differential Revision:  https://reviews.freebsd.org/D57028
DeltaFile
+1-1usr.sbin/freebsd-update/freebsd-update.sh
+1-11 files

FreeBSD/src d705a51lib/libcasper/services/cap_net cap_net.c

cap_net: do not allow new limits to drop keys from the old ones

If the old limit had family/hosts/sockaddr set, the new limit must
have them too. Before, a missing key in the new limit was treated as
"allow any", which let a caller silently extend their limits.

Reported by:    Joshua Rogers of AISLE Research Team
Reviewed by:    markj
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D56991
DeltaFile
+31-0lib/libcasper/services/cap_net/cap_net.c
+31-01 files

FreeBSD/src 7807401sys/netinet tcp_timewait.c

tcp: Fix typo in RFC 6191 sysctl

Fixes:          2af70d7a3849 ("tcp: Make RFC 6191 support configurable")
MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Modirum MDPay
DeltaFile
+1-1sys/netinet/tcp_timewait.c
+1-11 files

FreeBSD/src 876a173lib/libc/gen nlist.3

nlist.3: Replace a.out(5) Xref with elf(5)

ELF support was added to nlist() in 1997, and a.out support was removed
in 2020.  The man page was not updated for either of these changes.

Fixes: 77909f597881 ("Initial elf nlist support, ...")
Fixes: 86cfa7e70b2b ("nlist: retire long-obsolete aout support")
Sponsored by: The FreeBSD Foundation
DeltaFile
+2-2lib/libc/gen/nlist.3
+2-21 files

FreeBSD/src 2af70d7share/man/man4 tcp.4, sys/netinet tcp_timewait.c tcp_var.h

tcp: Make RFC 6191 support configurable

Add a default-on per-VIMAGE sysctl for RFC 6191 connection recycling.
This makes it possible to merge the change to older branches where it
can be switched off by default to minimize risk.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Modirum MDPay
Reviewed by:    pouria, marius.h_lden.org, tuexen
Differential Revision:  https://reviews.freebsd.org/D57045
DeltaFile
+37-21sys/netinet/tcp_timewait.c
+10-1share/man/man4/tcp.4
+2-0sys/netinet/tcp_var.h
+49-223 files

FreeBSD/src 3abc079sys/dev/asmc asmc.c

asmc: fix asmc_key_dump() page fault on T2 MMIO backend

asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ,
asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL
(MMIO backend is used instead), causing a page fault when
ASMC_DEBUG triggers asmc_dumpall() during attach.

Add an MMIO guard at the top of asmc_key_dump(): delegate to
asmc_key_dump_by_index() + asmc_key_read() for MMIO devices,
consistent with the rest of the T2 code paths.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D56748
DeltaFile
+31-5sys/dev/asmc/asmc.c
+31-51 files

FreeBSD/src f599387crypto/openssh config.h

openssh: Regen config.h to fix i386 SIZEOF_TIME_T

Fixes: 2574974648c6 ("OpenSSH: Update to 10.3p1")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-0crypto/openssh/config.h
+4-01 files

FreeBSD/src 0b0e5dacrypto/openssh freebsd-configure.sh

openssh: Fix SIZEOF_TIME_T in freebsd-configure.sh

Sponsored by:   The FreeBSD Foundation
Reviewed by:    jlduran
Differential Revision: https://reviews.freebsd.org/D57053
DeltaFile
+7-0crypto/openssh/freebsd-configure.sh
+7-01 files

FreeBSD/src 1987f9cusr.sbin/bhyve bhyve.8

bhyve.8: Fix formatting of -G's "w" prefix

"w" is a command modifier, not an argument. Use Cm.

Fixes:  2cdff9918e79 byhve: add option to specify IP address for gdb
MFC after:      3 days

(cherry picked from commit 7abddbb3cdeeff0d4d991aee52e92382e847e8a2)
DeltaFile
+4-4usr.sbin/bhyve/bhyve.8
+4-41 files

FreeBSD/src eb4d186usr.sbin/bhyve bhyve.8

bhyve.8: Fix formatting of -G's "w" prefix

"w" is a command modifier, not an argument. Use Cm.

Fixes:  2cdff9918e79 byhve: add option to specify IP address for gdb
MFC after:      3 days

(cherry picked from commit 7abddbb3cdeeff0d4d991aee52e92382e847e8a2)
DeltaFile
+4-4usr.sbin/bhyve/bhyve.8
+4-41 files

FreeBSD/src b5cd337sbin/mount mount.8, share/man/man4 p9fs.4

p9fs.4: Cross-reference mount(8)

MFC after:      3 days

(cherry picked from commit ae0fd05a333b0ab9e6f020b07a0e483e6f85538a)
DeltaFile
+3-2share/man/man4/p9fs.4
+2-1sbin/mount/mount.8
+5-32 files

FreeBSD/src 30f500eshare/man/man4 p9fs.4 Makefile

p9fs.4: MLINK to virtio_p9fs.4

Technically, virtio_p9fs is an emulated device that masquerades
as a p9fs mount, but it does not make sense to have two separate manual
pages.

Reviewed by:    bnovkov, dfr
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57013
DeltaFile
+3-2share/man/man4/p9fs.4
+1-0share/man/man4/Makefile
+4-22 files

FreeBSD/src 4f6c60csys/contrib/dev/iwlwifi zzz_fw_ports_fwget.sh

iwlwifi: firmware: reduce script to extract fwget information

Due to driver changes it is no longer feasible to extract the full
PCI ID / firmware / card type information in one go as we used to
be able to.
We have already changed the way we extract firmware information for
ports and marked the iwlwififw.4 man page as obsolete.

Reduce the script to simply extarct the fwget(8) information and,
compared to the old times, sort each section so diffs will be easier
to see in the future.  This was particular helpful this time to make
sure we do not lose entries with the change of technique.

We also keep the script in the best perl spirit to do the job but
not to win a price, especially given it seems we have to change
matters every (other) year.

Given we can no longer extract firmware information for the PCI IDs,
we need to "manually" check against the ports that names match.

    [6 lines not shown]
DeltaFile
+82-356sys/contrib/dev/iwlwifi/zzz_fw_ports_fwget.sh
+82-3561 files

FreeBSD/src ca67cfausr.sbin/fwget/pci pci_network_intel pci_network_realtek

fwget: update realtek and intel pci entries

For Realtek we only add new entries.

For Intel the old way of extracting IDs from the driver no longer
works.  The new list is shortened as we drop more specific entries
which were already covered by wildcard entries.  The new lists are
also sorted within the groups.
There are 4 entries the new driver no longer carries but are still
present in older versions, so we keep them manually.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+74-178usr.sbin/fwget/pci/pci_network_intel
+4-1usr.sbin/fwget/pci/pci_network_realtek
+78-1792 files

FreeBSD/src 56460a6sys/contrib/dev/rtw89 zzz_fw_ports_fwget.sh

rtw89: firmware: extend script to extract fwget entries

The so far so consistent (file)names got an outlier so add the
one character longer pattern as well to catch that.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+2-2sys/contrib/dev/rtw89/zzz_fw_ports_fwget.sh
+2-21 files

FreeBSD/src 8ad8643sys/ufs/ufs ufs_bmap.c

ufs: ufs_bmap_seekdata() needs mapped buffer for scan

PR:     295348
Reported and tested by:  Alastair Hogge <agh at riseup.net>
Reviewed by:    mckusick
Fixes:  bab04ddf1fd4 ("ufs: support unmapped bufs for indirect blocks in bmap")
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57036
DeltaFile
+7-4sys/ufs/ufs/ufs_bmap.c
+7-41 files

FreeBSD/src 436f47asys/x86/include specialreg.h

intelhfi: Add IA32_PM_ENABLE bit flag define

Reviewed by: Minsoo Choo <minsoo at minsoo.io>
Differential Revision: https://reviews.freebsd.org/D56919
DeltaFile
+3-0sys/x86/include/specialreg.h
+3-01 files

FreeBSD/src 56bc43fshare/man/man9 locking.9

locking.9: warn about using sleepable lock address as a sleep channel

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D57012
DeltaFile
+10-5share/man/man9/locking.9
+10-51 files

FreeBSD/src 7bdf2b5sys/fs/nullfs null_vfsops.c

nullfs: do not allow to mount a vnode over itself

This causes recursion in VFS that is not worth handling.

PR:     275570
Reported by:    Alex S <iwtcex at gmail.com>
Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57043
DeltaFile
+8-0sys/fs/nullfs/null_vfsops.c
+8-01 files

FreeBSD/src 363ea40bin/sh miscbltin.c, lib/libutil login_class.c

limits: Further RLIMIT_VMM cleanup

Teach limits(1), sh(1), and setclassresources(3) about RLIMIT_VMM.

Fixes:          1092ec8b3375 ("kern: Introduce RLIMIT_VMM")
Reviewed by:    bnovkov
Differential Revision:  https://reviews.freebsd.org/D57031
DeltaFile
+4-1bin/sh/miscbltin.c
+2-0usr.bin/limits/limits.c
+1-0lib/libutil/login_class.c
+7-13 files

FreeBSD/src 4cee16dsys/kern uipc_usrreq.c

linuxulator: fix SO_PEERCRED emulation after 1d24638d3e8

For Linux binaries, sopt->sopt_td may be null.  And there's also no
need to check it, since struct l_ucred has the same layout on 32-bit
systems as on 64-bit ones.

PR:             295333
Reported by:    Miguel Gomes <miguel.dias.gomes at protonmail.com>
Fixes:          1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode")
MFC after:      3 days
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D57032
DeltaFile
+3-1sys/kern/uipc_usrreq.c
+3-11 files

FreeBSD/src 2872268sbin/ipfw ipv6.c ipfw2.c, sbin/ipfw/tests test_add_rule.py

ipfw: treat ipv6 address with zero mask as 'any'

Make the behaviour similar for both IPv4 and IPv6. Also add
the corresponding tests.

PR:             294733
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56618
DeltaFile
+24-0sbin/ipfw/tests/test_add_rule.py
+7-4sbin/ipfw/ipv6.c
+4-3sbin/ipfw/ipfw2.c
+2-0tests/atf_python/sys/netpfil/ipfw/insns.py
+37-74 files

FreeBSD/src 763de19sys/fs/nfsserver nfs_nfsdstate.c

nfsd: Disable use of callbacks for NFSv4.0

Commit 71ac1ec5c9d9 disabled callbacks for the NFS
client for NFSv4.0.  This patch does the same for
the NFSv4.0 server.

The only use for callbacks for NFSv4.0 is delegations
and delegations rarely work well for NFSv4.0 anyhow.

Therefore, this patch disables callbacks for the
NFSv4.0 server.  This is the same behavior as
occurs when vfs.nfsd.issue_delegations is 0.

This change allowed the functions called
nfsrv_getclientipaddr() and nfsrv_getipnumber() to be
removed from the kernel.

(cherry picked from commit 457c621add0a531273ee27798c924c6aaeacc4c1)
DeltaFile
+38-235sys/fs/nfsserver/nfs_nfsdstate.c
+38-2351 files

FreeBSD/src bce6e0esys/kern sys_process.c

ptrace: clear TDP_USERWR after transparent attach only on attach

(cherry picked from commit cb31a266167c8bde3488fbdd6bf24c38b6f59977)
DeltaFile
+9-10sys/kern/sys_process.c
+9-101 files

FreeBSD/src c34ca8fsys/sys _decls.h cdefs.h, tools/build Makefile

sys/cdefs.h: move __BEGIN_DECLS/__END_DECLS into a helper sys/_decls.h

(cherry picked from commit ea72f6d5a8b9386a09e23fbdc933effb007ca899)
DeltaFile
+46-0sys/sys/_decls.h
+1-7sys/sys/cdefs.h
+1-0tools/build/Makefile
+48-73 files