FreeBSD/src bc7f359. ObsoleteFiles.inc, etc/mtree BSD.usr.dist

mtree: Remove unused MANSUBDIRs

Approved by:    re (cperciva)
MFC after:      3 days
Fixes:          809504f331fd ("man: Kill off MANSUBDIRs")
Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D57029

(cherry picked from commit 1dc1b95163b9e5cf5cbd52c2b979568724746eac)
(cherry picked from commit 6146c5962e5cea6dbcd49f5992cf4e6192a513b9)
DeltaFile
+0-8etc/mtree/BSD.usr.dist
+1-0ObsoleteFiles.inc
+1-82 files

FreeBSD/src 6146c59. ObsoleteFiles.inc, etc/mtree BSD.usr.dist

mtree: Remove unused MANSUBDIRs

MFC after:      3 days
Fixes:          809504f331fd ("man: Kill off MANSUBDIRs")
Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D57029

(cherry picked from commit 1dc1b95163b9e5cf5cbd52c2b979568724746eac)
DeltaFile
+0-8etc/mtree/BSD.usr.dist
+1-0ObsoleteFiles.inc
+1-82 files

FreeBSD/src b9ee42drelease/tools ec2-small.conf

EC2: Don't enable firstboot_pkgs in small flavour

The EC2 "base" flavour installs the devel/py-awscli package at boot
time by default; we don't do this in the "small" flavour, so the
default behaviour was to update the FreeBSD-ports repository and
then do nothing with it.

Turn off firstboot_pkgs by default; if someone is using the "small"
flavour of AMIs and wants to install packages at instance launch
time, they simply need to add 'firstboot_pkgs_enable="YES"' to
/etc/rc.conf (which they must already be editing via user-data, in
order to provide the list of packages they want installed).

Approved by:    re (cperciva)
Sponsored by:   Amazon
MFC after:      3 days
MFC to:         stable/15
Relnotes:       EC2 "small" images now have firstboot_pkgs_enable="NO".


    [2 lines not shown]
DeltaFile
+1-1release/tools/ec2-small.conf
+1-11 files

FreeBSD/src df9f5d3lib/libc/gen timespec_getres.3 timespec_get.3

libc/timespec_get*.3: expose STANDARDS section

We now have .St -isoC-2023, so the STANDARDS section can go live.

Approved by:    re (cperciva)
Fixes:          9b5d724cad10087e34165199e55f15f2df744ed5
MFC after:      1 week

(cherry picked from commit aa92784fcb8a375231058d67f7ccaeaa3e42ed33)
(cherry picked from commit e2fb604d4ddd34207f08d1e1b17c554b6f967927)
DeltaFile
+6-6lib/libc/gen/timespec_getres.3
+5-5lib/libc/gen/timespec_get.3
+11-112 files

FreeBSD/src ae2840elib/libc/stdtime ctime.3

libc/ctime.3: timegm() is in C23.

Approved by:    re (cperciva)
See also:       D53951, https://wiki.freebsd.org/C23
MFC after:      1 week

(cherry picked from commit 68251761c77b2f5ff927cf19bba7d4efa88799de)
(cherry picked from commit e4bca1be11c5edad947d50ce86388bba73489f89)
DeltaFile
+4-3lib/libc/stdtime/ctime.3
+4-31 files

FreeBSD/src 78de09esys/netpfil/ipfw ip_fw_nat.c

ipfw: fix checksum after NAT

When checksum offloading is used, IPFW needs to fix the checksum
after libalias has done NAT. The ipfw_nat() function does so, but
only for mbufs without a receiving interface. However, if, for example,
the packet was sent inside a jail that used checksum offloading over
an epair, ipfw still needs to fix the checksum even though the mbuf
has set a receiving interface (epair).
This patch just removes the check whether a receiving interface is set.

Approved by:    re (cperciva)
PR:                     295057
Reviewed by:            tuexen
Differential Revision:  https://reviews.freebsd.org/D57091

(cherry picked from commit 81b47a7c604f1d563283759572fa7a1f9d4dc56f)
(cherry picked from commit 198379d2c29fae7300b650a96199e51a66b87364)
DeltaFile
+7-8sys/netpfil/ipfw/ip_fw_nat.c
+7-81 files

FreeBSD/src 7e92fb3share/man/man4 mac_do.4

mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit

Approved by:    re (cperciva)
MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 21df76d01fce35b0398cf38c31928c6f47111d55)
DeltaFile
+4-4share/man/man4/mac_do.4
+4-41 files

FreeBSD/src 4eb9693sys/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.

Approved by:    re (cperciva)
PR:             295333
Reported by:    Miguel Gomes <miguel.dias.gomes at protonmail.com>
Fixes:          1d24638d3e8 ("Fix LOCAL_PEERCRED in 32-bit compat mode")
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D57032

(cherry picked from commit 4cee16d471d47f4673e4d2c66f7a96d4e6d86ee9)
(cherry picked from commit 57fb48f8e2fca5f069e9bc3cf080608f602919a9)
DeltaFile
+3-1sys/kern/uipc_usrreq.c
+3-11 files

FreeBSD/src 8562c67sys/netinet tcp_subr.c

tcp: improve validation of received TCP over UDP packets

Approved by:    re (cperciva)
Reviewed by:            glebius, pouria
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D55410

(cherry picked from commit e1886559ea477add82a0a86cddf728f6778f1603)
(cherry picked from commit ede0f15e03e0a172493cd20d1dd2d88b1711156f)
DeltaFile
+17-5sys/netinet/tcp_subr.c
+17-51 files

FreeBSD/src fee6765sys/netinet sctp_syscalls.c

sctp: fix NOINET build

Approved by:    re (cperciva)
Reported by:            ngie
Fixes:                  454212b9718b ("sctp: fix so_proto when peeling off a socket")

(cherry picked from commit 6bd97e9e01ff159eef49b2521fdbe67d5db10d95)
(cherry picked from commit 9c440e552c4cc252fe150b5f0edef9b8cd75a72f)
DeltaFile
+20-1sys/netinet/sctp_syscalls.c
+20-11 files

FreeBSD/src 19114e8usr.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.

Approved by:    re (cperciva)
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ca67cfa5237f7ac537ca8611054b5af2098e2d86)
(cherry picked from commit 3f702b299aa1d7625ee0e520c827e73e355775c9)
DeltaFile
+74-178usr.sbin/fwget/pci/pci_network_intel
+4-1usr.sbin/fwget/pci/pci_network_realtek
+78-1792 files

FreeBSD/src 7ea10e9share/man/man4 iwlwifi.4 iwlwififw.4

man: iwlwifi/rtw88/rtw89: update man pages for Linux v7.0 based updates

For all:
- harmonize Copyright/license section according to style.9 and used
  SPDX only.
- mention that the current generation of the driver is based on
  Linux version 7.0.
- make linuxkpi.4 and linuxkpi_wlan.4 .Xr as the man pages do exist
  these days.

iwlwifi: update the card/chipset names supported (while we still can)
iwlwififw: leave a comment only that we can no longer update the
  man page and it will be removed in the future.
rtw88: update supported chipsets and add note to BUGS sections
rtw89: update supported chipsets and add note to BUGS sections

Approved by:    re (cperciva)
Sponsored by:   The FreeBSD Foundation
Reviewed by:    ziaee

    [4 lines not shown]
DeltaFile
+91-99share/man/man4/iwlwifi.4
+6-22share/man/man4/iwlwififw.4
+18-9share/man/man4/rtw88.4
+19-7share/man/man4/rtw89.4
+134-1374 files

FreeBSD/src d6bbb59sys/kern sys_process.c

ptrace: clear TDP_USERWR after transparent attach only on attach

Approved by:    re (cperciva)

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

FreeBSD/src e4130acsys/net pfvar.h

pf: switch to getmicro(up)time()

It is reported that micro(up)time() performs poorly in certain
virtualisation scenarios. Absolute accuracy isn't required here, so
switch to the slightly less accurate (as per the man page) get-variants.

PR:             295043
MFC after:      3 weeks
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2sys/net/pfvar.h
+2-21 files

FreeBSD/src 64327f7sys/netpfil/pf pf_nl.c

pf: fix incorrect table decoding in netlink

We used nla_p_table for pfr_table structures, but this netlink decoder
was intended for pfioc_table and decoded an extra field, outside
of pfr_table. This allowed userspace to write (slightly) outside of
pfr_table.

Use a separate nlattr_parser for pfr_table.

PR:             295218
Reported by:    Robert Morris <rtm at lcs.mit.edu>
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+8-1sys/netpfil/pf/pf_nl.c
+8-11 files

FreeBSD/src e4bca1blib/libc/stdtime ctime.3

libc/ctime.3: timegm() is in C23.

See also:       D53951, https://wiki.freebsd.org/C23
MFC after:      1 week

(cherry picked from commit 68251761c77b2f5ff927cf19bba7d4efa88799de)
DeltaFile
+4-3lib/libc/stdtime/ctime.3
+4-31 files

FreeBSD/src e2fb604lib/libc/gen timespec_getres.3 timespec_get.3

libc/timespec_get*.3: expose STANDARDS section

We now have .St -isoC-2023, so the STANDARDS section can go live.

Fixes:          9b5d724cad10087e34165199e55f15f2df744ed5
MFC after:      1 week

(cherry picked from commit aa92784fcb8a375231058d67f7ccaeaa3e42ed33)
DeltaFile
+6-6lib/libc/gen/timespec_getres.3
+5-5lib/libc/gen/timespec_get.3
+11-112 files

FreeBSD/src dcd2fedetc/mtree BSD.tests.dist

BSD.tests.dist: Add the new sys/mac/do directory

Without that, 'make distributeworld' fails ('make buildworld' and 'make
installworld' do not need it).

Fixes:          cba191e291c1 ("MAC/do: Add basic tests on setting rules")
MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ad3d7666e00bb0261dd2b80f5f2d56ceeb84aba7)
DeltaFile
+2-0etc/mtree/BSD.tests.dist
+2-01 files

FreeBSD/src ad3d766etc/mtree BSD.tests.dist

BSD.tests.dist: Add the new sys/mac/do directory

Without that, 'make distributeworld' fails ('make buildworld' and 'make
installworld' do not need it).

Fixes:          cba191e291c1 ("MAC/do: Add basic tests on setting rules")
MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-0etc/mtree/BSD.tests.dist
+2-01 files

FreeBSD/src bc2055bsbin/devd snd.conf

sbin/devd/snd.conf: Add missing -n options to sysrc calls

Reviewed by:    christos
Fixes:          70e27ecba518 (virtual_oss: Introduce virtual_oss_default_control_device rc variable)
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/36
DeltaFile
+3-3sbin/devd/snd.conf
+3-31 files

FreeBSD/src f5433e7sys/kern vfs_mount.c

vfs_domount(): handle the case when vn_lock_pair() only locked once

Reviewed by:    jah, markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57035
DeltaFile
+6-2sys/kern/vfs_mount.c
+6-21 files

FreeBSD/src ace4a3esys/kern vfs_vnops.c, sys/sys vnode.h

vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock

It is not enough to check vp1 == vp2 to detect lock recursion, since
vnodes might share the locks.  This might happen for e.g. stacked
filesystems (nullfs and other), and for FFS snapshots.

Switch from checking vnode equiality to check v_vnlock equiality, and
recheck the condition after vnode relock since reclamation or otner
parallel operation might change the vnode locks under us.

Return a value (not really an error) indicating the case that vnodes
share the lock, to simplify the unlock in caller.

Reviewed by:    jah, markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57035
DeltaFile
+25-7sys/kern/vfs_vnops.c
+1-1sys/sys/vnode.h
+26-82 files

FreeBSD/src 03c410bshare/man/man9 copy.9

man: Stop referring to non-existing manpage strlcpy(9)

Reviewed by: ziaee, mhorne, kevans
DeltaFile
+3-2share/man/man9/copy.9
+3-21 files

FreeBSD/src 115256fsys/sys elf_common.h

elf_common.h: Add SHT_LLVM_ADDRSIG

Reported by:    bz
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 22c054c4cce719662d503685138433eb27d40001)
DeltaFile
+1-0sys/sys/elf_common.h
+1-01 files

FreeBSD/src a05c4fbtests/sys/mac Makefile, tests/sys/mac/do valid_configs.sh invalid_configs.sh

MAC/do: Add basic tests on setting rules

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit cba191e291c17b32247e12d6f94dcde56994bfe6)
DeltaFile
+135-0tests/sys/mac/do/valid_configs.sh
+86-0tests/sys/mac/do/invalid_configs.sh
+72-0tests/sys/mac/do/common.sh
+14-0tests/sys/mac/do/Makefile
+1-0tests/sys/mac/Makefile
+308-05 files

FreeBSD/src 51b48d3share/man/man4 mac_do.4

mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 21df76d01fce35b0398cf38c31928c6f47111d55)
DeltaFile
+4-4share/man/man4/mac_do.4
+4-41 files

FreeBSD/src cba191etests/sys/mac Makefile, tests/sys/mac/do valid_configs.sh invalid_configs.sh

MAC/do: Add basic tests on setting rules

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
DeltaFile
+135-0tests/sys/mac/do/valid_configs.sh
+86-0tests/sys/mac/do/invalid_configs.sh
+72-0tests/sys/mac/do/common.sh
+14-0tests/sys/mac/do/Makefile
+1-0tests/sys/mac/Makefile
+308-05 files

FreeBSD/src 21df76dshare/man/man4 mac_do.4

mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit

MFC after:      1 minute
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-4share/man/man4/mac_do.4
+4-41 files

FreeBSD/src 8532b4alibexec/rc/rc.d virtual_oss

rc: virtual_oss: Create a loopback device in the default configuration

The loopback device allows us to record desktop sound by reading from
it, or even use it as an input device, for example during a call.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/16
DeltaFile
+1-0libexec/rc/rc.d/virtual_oss
+1-01 files

FreeBSD/src 5f904cbusr.sbin/virtual_oss/virtual_oss main.c virtual_oss.8

virtual_oss(8): Create loopback devices with GID_AUDIO

Make sure the user is part of the audio group to avoid unintended
snooping of loopback audio by unprivileged users.

While here, retire voss_dsp_perm, since we don't use the same value
everywhere now.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull-Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/26
DeltaFile
+22-5usr.sbin/virtual_oss/virtual_oss/main.c
+3-1usr.sbin/virtual_oss/virtual_oss/virtual_oss.8
+25-62 files