FreeBSD/src 6e74b60bin/uuidgen uuidgen.1

uuidgen(1): Add EXAMPLES to manual page

Approved by:            manpages@ (gbe@)
Reviewed by:            gbe@, pauamma
Differential Revision:  https://reviews.freebsd.org/D43494
DeltaFile
+24-0bin/uuidgen/uuidgen.1
+24-01 files

FreeBSD/src c8d6c93sys/fs/unionfs union_vnops.c

unionfs_lookup(): fix wild accesses to vnode private data

There are a few spots in which unionfs_lookup() accesses unionfs vnode
private data without holding the corresponding vnode lock or interlock.

Reviewed by:            kib, olce
Differential Revision:  https://reviews.freebsd.org/D44601

(cherry picked from commit b18029bc59d2ed6b0eeeb233189cf713b34b467c)
DeltaFile
+15-7sys/fs/unionfs/union_vnops.c
+15-71 files

FreeBSD/src 1799750bin/cp utils.c cp.c

cp: Clarify an obscure comment.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D44805

(cherry picked from commit 64d6925d1901637125f9f739282e72c992657dc8)

cp: Additional sanity check.

Once we've successfully opened the file we've been asked to copy, check
that it's of the same type as FTS told us it was.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    allanjude, markj
Differential Revision:  https://reviews.freebsd.org/D44806


    [8 lines not shown]
DeltaFile
+21-8bin/cp/utils.c
+9-4bin/cp/cp.c
+30-122 files

FreeBSD/src 44101ebusr.bin/xinstall xinstall.c install.1, usr.bin/xinstall/tests install_test.sh

install: Always use a temporary file.

Previously, we would only use a temporary file if explicitly asked to
with the `-S` option, and even then, only if the target file already
existed.  This meant that an outside observer looking for the target
file might see a partial file, and might see the file disappear and
then reappear.

With this patch, we always use a temporary file, ensuring atomicity.
The downside is slightly increased disk usage.  The upside is never
having to worry about, for instance, cron jobs randomly failing if
they happen to run simultaneously with `make installworld`.

The `-S` option is retained, partly for compatibility, and partly
to control the use of `fsync(2)`, which has a non-negligible cost
(approximately 10% increase in wall time for `make installworld`).

MFC after:      1 week
Sponsored by:   Klara, Inc.

    [52 lines not shown]
DeltaFile
+122-285usr.bin/xinstall/xinstall.c
+12-19usr.bin/xinstall/install.1
+8-0usr.bin/xinstall/tests/install_test.sh
+142-3043 files

FreeBSD/src 82c8a5fsys/fs/nullfs null_vfsops.c

nullfs: Show correct exported flag.

MFC after:      3 days
Reviewed by:    allanjude, kib
Differential Revision:  https://reviews.freebsd.org/D44773

(cherry picked from commit 2b258dd17caf329bc549f93d9858b74109a479d7)
DeltaFile
+4-3sys/fs/nullfs/null_vfsops.c
+4-31 files

FreeBSD/src 1d06b45sys/fs/devfs devfs_vfsops.c, sys/fs/fdescfs fdesc_vfsops.c

Fix MNT_IGNORE for devfs, fdescfs and nullfs

The MNT_IGNORE flag can be used to mark certain filesystem mounts so
that utilities such as df(1) and mount(8) can filter out those mounts by
default. This can be used, for instance, to reduce the noise from
running container workloads inside jails which often have at least three
and sometimes as many as ten mounts per container.

The flag is supplied by the nmount(2) system call and is recorded so
that it can be reported by statfs(2). Unfortunately several filesystems
override the default behaviour and mask out the flag, defeating its
purpose. This change preserves the MNT_IGNORE flag for those filesystems
so that it can be reported correctly.

MFC after:      1 week

(cherry picked from commit b5c4616582cebdcf4dee909a3c2f5b113c4ae59e)
DeltaFile
+1-1sys/fs/devfs/devfs_vfsops.c
+1-1sys/fs/fdescfs/fdesc_vfsops.c
+1-1sys/fs/nullfs/null_vfsops.c
+3-33 files

FreeBSD/src 90499f6sys/net if_arp.h, sys/netinet if_ether.c

Support ARP for 802 networks

This is used by 802.3 Ethernet.  (Also be used by 802.4 Token Bus and
802.5 Token Ring, but we don't support those.)

This was accidentally removed along with FDDI support in commit
0437c8e3b198, presumably because comments implied it was used only by
FDDI or Token Ring.

Fixes: 0437c8e3b198 ("Remove support for FDDI networks.")
Reviewed-by: emaste
Signed-off-by: Denny Page <dennypage at me.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1166
(cherry picked from commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b)
(cherry picked from commit d776dd5fbd484acdf00f6df55583e9aa53226859)
DeltaFile
+4-0sys/netinet/if_ether.c
+1-1sys/net/if_arp.h
+5-12 files

FreeBSD/src d776dd5sys/net if_arp.h, sys/netinet if_ether.c

Support ARP for 802 networks

This is used by 802.3 Ethernet.  (Also be used by 802.4 Token Bus and
802.5 Token Ring, but we don't support those.)

This was accidentally removed along with FDDI support in commit
0437c8e3b198, presumably because comments implied it was used only by
FDDI or Token Ring.

Fixes: 0437c8e3b198 ("Remove support for FDDI networks.")
Reviewed-by: emaste
Signed-off-by: Denny Page <dennypage at me.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1166
(cherry picked from commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b)
DeltaFile
+4-0sys/netinet/if_ether.c
+1-1sys/net/if_arp.h
+5-12 files

FreeBSD/src 8c81694sys/compat/linux linux_socket.c

linux: ignore setsockopt(IPV6_RECVERR)

Under Linux, the socket options IP_RECVERR and IPV6_RECVERR are used to
receive socket errors via a dedicated 'error queue' which can be
retrieved via recvmsg().  FreeBSD does not support this functionality.

For IPv4, the sysctl compat.linux.ignore_ip_recverr can be set to 1 to
silently ignore attempts to set IP_RECVERR and return success to the
application, which is wrong, but is required for (among other things)
a functional DNS client in recent versions of glibc.

Add support for ignoring IPV6_RECVERR, controlled by the same sysctl.
This fixes DNS in Linux when using IPv6 resolvers.

Reviewed by: imp, Jose Luis Duran
Pull Request: https://github.com/freebsd/freebsd-src/pull/1118

(cherry picked from commit ca63710d3668cf6f3cb4faf065d8b4eeffa028ad)
DeltaFile
+13-0sys/compat/linux/linux_socket.c
+13-01 files

FreeBSD/src 9718d4asys/dev/sound/pci hdspe.c hdspe.h

snd_hdspe(4): Recognize newer firmware's PCI vendor id.

At least for HDSPe RayDAT cards, newer firmware comes with RME's own PCI
vendor id instead of the Xilinx one. Other HDSPe cards are probably also
affected. Update snd_hdspe(4) to recognize both the old Xilinx and the
new RME vendor ids.

Differential Revision:  https://reviews.freebsd.org/D44978
MFC after: 1 day
DeltaFile
+2-1sys/dev/sound/pci/hdspe.c
+1-0sys/dev/sound/pci/hdspe.h
+3-12 files

FreeBSD/src 302d0accontrib/less ch.c

MFV: less: Do not trust st_size if it equals zero

This is a smaller version of upstream
1fafd968b48e5cea6c85f126d77071a8de707a55 to address the
issue that less not being able to operate on files
residing in pseudo-filesystems that advertize a zero
size value.

PR:             bin/276133

(cherry picked from commit cae336280b0d7ad3d49788c5fc0986f91328eb50)
DeltaFile
+2-11contrib/less/ch.c
+2-111 files

FreeBSD/src 5132cb4contrib/less ch.c

MFV: less: Do not trust st_size if it equals zero

This is a smaller version of upstream
1fafd968b48e5cea6c85f126d77071a8de707a55 to address the
issue that less not being able to operate on files
residing in pseudo-filesystems that advertize a zero
size value.

PR:             bin/276133

(cherry picked from commit cae336280b0d7ad3d49788c5fc0986f91328eb50)
DeltaFile
+2-11contrib/less/ch.c
+2-111 files

FreeBSD/src 5da0bdbsys/dev/iicbus ds1307.c

ds1307(4): Fix a typo in a source code comment

- s/slighly/slightly/

(cherry picked from commit fa3b320668ba6068014337bbbb05dbd39ac8dfb6)
DeltaFile
+1-1sys/dev/iicbus/ds1307.c
+1-11 files

FreeBSD/src 3f82081sys/i386/include atomic.h

i386: Fix a typo in a source code comment

- s/slighly/slightly/

(cherry picked from commit e6c45f377d5b3bc28fc51a67c40dfa45c2087895)
DeltaFile
+1-1sys/i386/include/atomic.h
+1-11 files

FreeBSD/src 4f8ee76sys/dev/iicbus/rtc ds1307.c

ds1307(4): Fix a typo in a source code comment

- s/slighly/slightly/

(cherry picked from commit fa3b320668ba6068014337bbbb05dbd39ac8dfb6)
DeltaFile
+1-1sys/dev/iicbus/rtc/ds1307.c
+1-11 files

FreeBSD/src 8ca6066sys/i386/include atomic.h

i386: Fix a typo in a source code comment

- s/slighly/slightly/

(cherry picked from commit e6c45f377d5b3bc28fc51a67c40dfa45c2087895)
DeltaFile
+1-1sys/i386/include/atomic.h
+1-11 files

FreeBSD/src a36b9f2lib/libpmc/pmu-events/arch/x86/amdzen4 data-fabric.json cache.json

libpmc: Import AMD Zen 4 PMU events

MFC after:      1 week

(cherry picked from commit 278d6950943a9fec2bddb037b547c04a847c54ba)
DeltaFile
+1,090-0lib/libpmc/pmu-events/arch/x86/amdzen4/data-fabric.json
+828-0lib/libpmc/pmu-events/arch/x86/amdzen4/cache.json
+818-0lib/libpmc/pmu-events/arch/x86/amdzen4/floating-point.json
+418-0lib/libpmc/pmu-events/arch/x86/amdzen4/recommended.json
+174-0lib/libpmc/pmu-events/arch/x86/amdzen4/memory.json
+138-0lib/libpmc/pmu-events/arch/x86/amdzen4/other.json
+3,466-05 files not shown
+3,871-111 files

FreeBSD/src 75f1323lib/libpmc/pmu-events/arch/x86/amdzen4 data-fabric.json cache.json

libpmc: Import AMD Zen 4 PMU events

MFC after:      1 week

(cherry picked from commit 278d6950943a9fec2bddb037b547c04a847c54ba)
DeltaFile
+1,090-0lib/libpmc/pmu-events/arch/x86/amdzen4/data-fabric.json
+828-0lib/libpmc/pmu-events/arch/x86/amdzen4/cache.json
+818-0lib/libpmc/pmu-events/arch/x86/amdzen4/floating-point.json
+418-0lib/libpmc/pmu-events/arch/x86/amdzen4/recommended.json
+174-0lib/libpmc/pmu-events/arch/x86/amdzen4/memory.json
+138-0lib/libpmc/pmu-events/arch/x86/amdzen4/other.json
+3,466-05 files not shown
+3,871-111 files

FreeBSD/src 4ba444dsys/rpc clnt_vc.c

krpc: Ref cnt the client structures for TLS upcalls

A crash occurred during testing, where the client structures had
already been free'd when the upcall thread tried to lock them.

This patch acquires a reference count on both of the structures
and these are released when the upcall is done, so that the
structures cannot be free'd prematurely.  This happened because
the testing is done over a very slow vpn.

Found during a IETF bakeathon testing event this week.

MFC after:      5 days
DeltaFile
+8-2sys/rpc/clnt_vc.c
+8-21 files

FreeBSD/src d5ad60blib/libgcc_s Symbol.map Versions.def

libgcc_s: expose __divmoddi4 on i386

GCC has used this for some time (since 7.0) and apparently we were
getting away with using the hidden symbol, but when linking with
--no-undefined-version we get an error unless it's properly exported.
(For anyone who wonders at the assymetry, __udivmoddi4 is indeed much
older and was introduced with GCC 3.0.)

MFC after:      3 days
Reviewed by:    dim
Differential Revision:  https://reviews.freebsd.org/D44878

(cherry picked from commit 44e89340fe349abc020732958c6debd12b5adf2c)
DeltaFile
+6-0lib/libgcc_s/Symbol.map
+3-0lib/libgcc_s/Versions.def
+9-02 files

FreeBSD/src 8ceac8eusr.bin/script script.c script.1

script: handle terminal resize on SIGWINCH

Add a -w flag to forward terminal resize events on to the child, which
can be useful in some circumstances to avoid terminal corruption.

Reviewed by:    des
Co-authored-by: Xavier Beaudouin <xavier.beaudouin at klarasystems.com>
Sponsored by:   Modirum MDPay
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D44167
DeltaFile
+54-8usr.bin/script/script.c
+4-1usr.bin/script/script.1
+58-92 files

FreeBSD/src 4459abeusr.bin/script script.c

script: minor style improvements

Fix some nits pointed out by checkstyle9.pl in advance of functional
changes to script(1).

Reviewed by:    des
Sponsored by:   Modirum MDPay
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D44167
DeltaFile
+10-8usr.bin/script/script.c
+10-81 files

FreeBSD/src 7b390cbbin/date date.c

date: Fix tests by initializing timespec structure

The tests related to nanosecond support were failing on amd64 due to
uninitialized timespec structure.

Fixes:          eeb04a736cb9 date: Add support for nanoseconds
Reviewed by:    markj
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D44975
DeltaFile
+2-0bin/date/date.c
+2-01 files

FreeBSD/src d6f77d3libarchive archive_write_set_passphrase.c archive_write_add_filter_zstd.c, libarchive/test test_write_disk_appledouble.c test_read_format_xar_doublelink.c

Update vendor/libarchive to 3.7.4

Security fixes:
 #2135 rar: Fix OOB in rar e8 filter (CVE-2024-26256)
 #2145 zip: Fix out of boundary access

Important bugfixes:
 #2131 7zip: Limit amount of properties
 #2110 bsdtar: Fix error handling around strtol() usages
 #2116 passphrase: Never allow empty passwords
 #2124 rar: Fix "File CRC Error" when extracting specific rar4 archives
 #2123 xar: Avoid infinite link loop
 #2108 zip: Update AppleDouble support for directories
 #2071 zstd: Implement core detection

Obained from:           libarchive
Libarchive commit:      313aa1fa10b657de791e3202c168a6c833bc3543
DeltaFile
+84-0libarchive/test/test_write_disk_appledouble.c
+29-34tar/bsdtar.c
+55-0libarchive/test/test_read_format_xar_doublelink.c
+18-17libarchive/archive_write_set_passphrase.c
+27-0libarchive/test/test_write_disk_appledouble_zip.zip.uu
+22-1libarchive/archive_write_add_filter_zstd.c
+235-5242 files not shown
+436-13548 files

FreeBSD/src 5626f9eshare/man/man9 style.9

style.9: Document the existence of tools/build/checkstyle9.pl

MFC after:      3 days
Sponsored by:   Klara, Inc.
DeltaFile
+5-1share/man/man9/style.9
+5-11 files

FreeBSD/src eeb04a7bin/date date.c date.1, bin/date/tests format_string_test.sh

date: Add support for nanoseconds

This patch introduces support for a conversion specification for
nanoseconds.

The format of %N is meant to be compatible with that of GNU date.

The nanoseconds conversion specification is implemented directly in
date(1) instead of libc (in strftime(3)) to avoid introducing
non-standard functions to libc at this time and modifying struct tm.

Apart from introducing the nanoseconds conversion specification, this
patch brings the following changes:

- The "ns" format for ISO 8061 dates is now unlocked. E.g., date -Ins
  prints:
      2024-04-22T12:20:28,763742224+02:00
- The -r flag when fed a file is now aware of the nanosecond part of the last
  modification time.

    [9 lines not shown]
DeltaFile
+105-27bin/date/date.c
+22-6bin/date/date.1
+15-2bin/date/tests/format_string_test.sh
+142-353 files

FreeBSD/src 9b10aa4tools/test/stress2/misc rdwr.sh

stress2: More detailed error reporting
DeltaFile
+33-17tools/test/stress2/misc/rdwr.sh
+33-171 files

FreeBSD/src 6251027sys/fs/nfsclient nfs_clrpcops.c

nfscl: Do not use nfso_own for delayed nfsrpc_doclose()

When an initial attempt to close an NFSv4 lock returns NFSERR_DELAY,
the open structure is put on a list for delayed closing.  When this
is done, the nfso_own field is set to NULL, so it cannot be used by
nfsrpc_doclose().

Without this patch, the NFSv4 client can crash when a NFSv4 server
replies NFSERR_DELAY to a Close operation.  Fortunately, most extant
NFSv4 servers do not do this.  This patch avoids the crash for any
that do return NFSERR_DELAY for Close.

Found during a IETF bakeathon testing event this week.

MFC after:      5 days
DeltaFile
+14-6sys/fs/nfsclient/nfs_clrpcops.c
+14-61 files

FreeBSD/src f0e59ecsys/cam/ctl ctl_cmd_table.c

CTL: READ(6) should be allowed on CD devices

DOS ASPI drivers use this, with this change applied it is possible to
load a DOS ASPI CDROM driver and run the Windows 98 installer.

Signed-off-by: HP van Braam <hp at tmm.cx>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1202
DeltaFile
+1-0sys/cam/ctl/ctl_cmd_table.c
+1-01 files

FreeBSD/src ce3b53fsbin/nvmecontrol nvmecontrol.8

nvmecontrol: Flesh out nvmecontrol format information

The format command takes a number of different parameters. Include a
brief summary of what the values mean, though since the driver's support
for metadata is at best weak, 0's are almost always used for values
other than -f format. Add an example that ties it all together.

Sponsored by:           Netflix
Reviewed by:            pauamma at gundo.com, chuck
Differential Revision:  https://reviews.freebsd.org/D44958
DeltaFile
+70-11sbin/nvmecontrol/nvmecontrol.8
+70-111 files