FreeBSD/src fd52a9bcontrib/diff/src diff3.c, gnu/usr.bin/diff3 Makefile

diff3: Use a format string to quiet a compiler warning

And bump WARNS to 2
DeltaFile
+1-1contrib/diff/src/diff3.c
+1-1gnu/usr.bin/diff3/Makefile
+2-22 files

FreeBSD/src 08208cdbin/timeout timeout.c timeout.1

timeout: Clean up

* Annotate logv() and fix format string bug.

* Don't reinvent str2sig(3).

* Reorganize kill_self() so we unblock signals as late as possible, and
  use raise(2) instead of kill(2).

* Explicitly close unused pipe descriptors.

* Use correct type to collect result of read(2) and write(2).

* Compare return values to 0, not -1.

* Sort local variables according to style(9).

* Reduce unnecessary nesting.


    [8 lines not shown]
DeltaFile
+73-85bin/timeout/timeout.c
+1-1bin/timeout/timeout.1
+74-862 files

FreeBSD/src b253243usr.bin/diff/tests diff_test.sh

diff: Tweak recursion tests

The -r flag is not required to compare two directories; it is only
required to compare them recursively, i.e. descend into their common
subdirectories.  Adjust tests that use -r needlessly, and adjust the
dirloop test to verify that these two cases remain distinct.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55262
DeltaFile
+16-14usr.bin/diff/tests/diff_test.sh
+16-141 files

FreeBSD/src 790f1d1usr.bin/diff diff.c, usr.bin/diff/tests diff_test.sh

diff: Tweak range of -C and -U arguments

POSIX uses the terms “positive decimal integer” for -C and “non-negative
decimal integer” for -U, which translates into lower bounds of 1 for -C
and 0 for -U.

POSIX does not specify a minimum upper bound for either mode, but as of
5fc739eb5949 both our backends support context sizes up to and including
INT_MAX, so use that.

Having had the opportunity to consult the Unix System Test Suite, the
diff test cases found therein happen to precisely match these bounds.

While here, switch to using strtonum() to parse numerical arguments, and
try to be more consistent in how we report usage errors.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D55261
DeltaFile
+38-24usr.bin/diff/tests/diff_test.sh
+26-18usr.bin/diff/diff.c
+64-422 files

FreeBSD/src 596bf34sys/net bpf.c

bpf: don't call bpf_detachd() in bpf_setdlt()

The bpf_attachd() will perform bpf_detachd() itself.  Performing it twice
will lead to doing CK_LIST_REMOVE twice.

Reported & tested by:   bz
DeltaFile
+0-1sys/net/bpf.c
+0-11 files

FreeBSD/src d19fd2fsys/netinet ip_mroute.c raw_ip.c, sys/netinet6 ip6_mroute.c raw_ip6.c

ip_mroute: Make the routing socket private

I have some patches which make ip_mroute and ip6_mroute multi-FIB-aware.
This enables running per-FIB routing daemons, each of which has a
separate routing socket.

Several places in the network stack check whether multicast routing is
configured by checking whether the multicast routing socket is non-NULL.
This doesn't directly translate in my proposed scheme, as each FIB would
have its own socket.  I'd like to modify the ip(6)_mroute code to store
all state, including the socket, in a per-FIB structure.  So, take a
step towards that and 1) hide the socket, 2) add a boolean flag which
indicates whether a multicast router is registered.

Reviewed by:    pouria, zlei, glebius, adrian
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D55236
DeltaFile
+20-15sys/netinet6/ip6_mroute.c
+15-14sys/netinet/ip_mroute.c
+5-5sys/netinet/raw_ip.c
+4-4sys/netinet6/raw_ip6.c
+3-3sys/netinet6/ip6_mroute.h
+3-3sys/netinet/ip_mroute.h
+50-446 files not shown
+59-5012 files

FreeBSD/src 06d07d4share/man/man5 src.conf.5

src.conf.5: regenerate after switch to BSD diff3
DeltaFile
+5-12share/man/man5/src.conf.5
+5-121 files

FreeBSD/src 284a0aausr.bin/diff3/tests conflict-merge.out conflict-Em.out

diff3: add 3 missing files from the testsuite

Fixes:  2cfca8e710f260b8a1bb1ee5e1836a52e468ef4b
DeltaFile
+25-0usr.bin/diff3/tests/conflict-merge.out
+19-0usr.bin/diff3/tests/conflict-Em.out
+44-02 files

FreeBSD/src 4d5c434share/mk src.opts.mk

diff3: use bsd diff3 by default
DeltaFile
+1-1share/mk/src.opts.mk
+1-11 files

FreeBSD/src 605af06sys/dev/cxgbe t4_main.c

cxgbe(4): Show correct range of tids in sysctl_tids

The highest valid tid has to be adjusted for the hi-pri filter region.

MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+1-1sys/dev/cxgbe/t4_main.c
+1-11 files

FreeBSD/src be7e4dcsys/dev/nvme nvme_private.h

nvme: Use size_t for payload size

Using uint32_t here can cause spurious compiler warnings.  I assume it
was done to constrain the range; use a KASSERT instead.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55279
DeltaFile
+3-1sys/dev/nvme/nvme_private.h
+3-11 files

FreeBSD/src 10ac741sys/sys elf_common.h

elf_common.h: Add some AArch32 relocations

Reviewed by:    mmel
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55268
DeltaFile
+13-0sys/sys/elf_common.h
+13-01 files

FreeBSD/src 4cf6925sys/kern kern_ktrace.c

ktrace: do not enqueue request if the process' ktrioparams are freed

(cherry picked from commit 6bb3f208617b58a54e2204eb31bae3f9a86117a7)
DeltaFile
+8-2sys/kern/kern_ktrace.c
+8-21 files

FreeBSD/src 9349f96etc/mtree BSD.usr.dist

BSD.usr.dist: remove obsolete usr/share/examples/drivers entry

In base 8f0a6a9aadb1f, usr/share/examples/drivers was cleaned up,
because it contained unmaintained scripts. The directory itself is
cleaned up by ObsoleteFiles.inc, but there was still an entry in
BSD.usr.dist that re-created the directory. Remove it.

Fixes:          8f0a6a9aadb1
MFC after:      3 days

(cherry picked from commit ac2f284258e4c6d5867aa6a411bd44df349fe416)
DeltaFile
+0-2etc/mtree/BSD.usr.dist
+0-21 files

FreeBSD/src c44a485etc/mtree BSD.usr.dist

BSD.usr.dist: remove obsolete usr/share/examples/drivers entry

In base 8f0a6a9aadb1f, usr/share/examples/drivers was cleaned up,
because it contained unmaintained scripts. The directory itself is
cleaned up by ObsoleteFiles.inc, but there was still an entry in
BSD.usr.dist that re-created the directory. Remove it.

Fixes:          8f0a6a9aadb1
MFC after:      3 days

(cherry picked from commit ac2f284258e4c6d5867aa6a411bd44df349fe416)
DeltaFile
+0-2etc/mtree/BSD.usr.dist
+0-21 files

FreeBSD/src 6265f30lib/libsys/arm Makefile.sys

libsys/arm: include ARM EABI unwind bits into libsys

libsys required ARM EABI unwind symbols like __aeabi_unwind_cpp_pr0.
These symbols are normally provided by libc, but if a binary does
not link libc, the symbol ends up not being resolved.

Among other problems, this prevented gcc14 and newer from building
on arm.

Add the relevant symbols as hidden symbols into libsys to avoid this
problem.

(this patch was posted by jrtc27 who has asked me to move it along)

PR:             292539
Tested by:      fuz, Mark Millard <marklmi26-fbsd at yahoo.com>
Reviewed by:    mmel
Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55255
DeltaFile
+5-0lib/libsys/arm/Makefile.sys
+5-01 files

FreeBSD/src 1782bc9lib/libc/arm/aeabi aeabi_unwind_cpp.c

libc/arm: use __builtin_trap() instead of abort() in aeabi_unwind stubs

This avoids a dependency on the abort symbol in libsys.

PR:             292539
Reviewed by:    mmel
Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55255
DeltaFile
+6-6lib/libc/arm/aeabi/aeabi_unwind_cpp.c
+6-61 files

FreeBSD/src 8efcc64lib/libc/stdlib reallocarray.3, share/man/man3 stdbit.3

Summary: *.3: misc man page fixes

Approved by:    markj (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D55249
DeltaFile
+1-1lib/libc/stdlib/reallocarray.3
+1-1share/man/man3/stdbit.3
+2-22 files

FreeBSD/src 2cfca8eusr.bin/diff3 diff3.c, usr.bin/diff3/tests diff3_test.sh passwd-Em.out

diff3: fix merge mode

Make the merge mode compatible with GNU diff3
Add tests for all the changes, those tests are extracted from the
etcupdate testsuite.

This version passes the etcupdate testsuite and the diffutils diff3
test suite.

MFC After:      1 week
DeltaFile
+25-26usr.bin/diff3/diff3.c
+42-3usr.bin/diff3/tests/diff3_test.sh
+16-0usr.bin/diff3/tests/passwd-Em.out
+15-1usr.bin/diff3/tests/Makefile
+15-0usr.bin/diff3/tests/passwd-test.txt
+12-0usr.bin/diff3/tests/passwd-new.txt
+125-309 files not shown
+168-3015 files

FreeBSD/src a8b8fectests/atf_python/sys/net vnet.py

atf_python/vnet: Make it possible to set the FIB of vnet interfaces

Reviewed by:    zlei, ngie
MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54972
DeltaFile
+15-1tests/atf_python/sys/net/vnet.py
+15-11 files

FreeBSD/src 585190dusr.sbin/ngctl write.c

ngctl: Check hook name length

Check the length of the hook name when copying it into the sockaddr.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55258
DeltaFile
+14-4usr.sbin/ngctl/write.c
+14-41 files

FreeBSD/src 59906a1usr.sbin/ngctl config.c

ngctl: Fix buffer overflow in config command

Keep track of our buffer length when assembling the argument list.

PR:             293075
MFC after:      1 week
Reviewed by:    zlei, markj
Differential Revision:  https://reviews.freebsd.org/D55259
DeltaFile
+14-8usr.sbin/ngctl/config.c
+14-81 files

FreeBSD/src 3cbdcabusr.sbin/ngctl main.c msg.c

ngctl: Modernize code somewhat

* Replace fgets(3) with getline(3)

* Replace select(2) with poll(2)

* Avoid needlessly copying text around

* Correct use of getopt(3)

* Pick some style and whitespace nits

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55257
DeltaFile
+110-125usr.sbin/ngctl/main.c
+16-23usr.sbin/ngctl/msg.c
+6-8usr.sbin/ngctl/list.c
+4-6usr.sbin/ngctl/write.c
+4-6usr.sbin/ngctl/status.c
+4-5usr.sbin/ngctl/config.c
+144-1739 files not shown
+164-21215 files

FreeBSD/src e7f86f8sys/kern kern_event.c

kqtimer_proc_continue(): correct calculation of 'now'

It must be sbinuptime(), this is how kc->next is set up.

PR:     293141
Noted and reviewed by:  markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55264
DeltaFile
+1-4sys/kern/kern_event.c
+1-41 files

FreeBSD/src 75a30easys/kern kern_event.c

filt_timerexpire_l(): re-insert restarted timer into head instead of tail

of the resumed timers list, so that kqtimer_proc_continue() does not
iterated into the same timer again.

PR:     293141
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
Differential revision:  https://reviews.freebsd.org/D55264
DeltaFile
+6-1sys/kern/kern_event.c
+6-11 files

FreeBSD/src bf149f2sys/kern subr_msan.c

kmsan: Implement __msan_test_shadow()

This is needed when building OpenZFS with KMSAN enabled, as the bundled
zstd uses it.

MFC after:      1 week
DeltaFile
+18-0sys/kern/subr_msan.c
+18-01 files

FreeBSD/src 394201clib/libarchive/tests functional_test.sh, usr.bin/bsdcat/tests functional_test.sh

tests: Simplify libarchive tests

The ATF tests work by first running the test program with an invalid
flag, which causes it to print an error message, a summary of options,
and a list of available test cases.  Switch to the new -l option which
simply prints the list, and simplify the awk script used to parse the
output.  No functional change.

MFC after:      1 week
DeltaFile
+2-2usr.bin/tar/tests/functional_test.sh
+1-1usr.bin/unzip/tests/functional_test.sh
+1-1lib/libarchive/tests/functional_test.sh
+1-1usr.bin/bsdcat/tests/functional_test.sh
+1-1usr.bin/cpio/tests/functional_test.sh
+6-65 files

FreeBSD/src 1e2eea5sys/dev/nvme nvme_private.h nvme_sysctl.c

nvme: Change fail_on_reset to bool

This is safe since sysctl_handle_bool() handles ints transparently.

Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.
Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D55263
DeltaFile
+1-1sys/dev/nvme/nvme_private.h
+1-1sys/dev/nvme/nvme_sysctl.c
+2-22 files

FreeBSD/src 8d442cfusr.bin/diff3 diff3.c

diff3: fix diff3 -A

for cases where file2 differs but file1 and file3 agrees, the code
stored the file2 and file3 line numbers in the de[] editing script
entries but used them as if they were file1 line numbers.

Reviewed by:            thj
Differential Revision:  https://reviews.freebsd.org/D55276
DeltaFile
+24-7usr.bin/diff3/diff3.c
+24-71 files

FreeBSD/src 36ceb55sys/x86/x86 cpu_machdep.c

x86_msr_op(9): consistently return the value read from MSR

If the operation is executed on more than one CPU, a random instance of
the read value is returned.

Reviewed by:    markj, olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D55045
DeltaFile
+15-4sys/x86/x86/cpu_machdep.c
+15-41 files