FreeBSD/src ffe47c4usr.bin/grep util.c

grep: periodic timer-based fflush instead of unconditional per-line flush

Replace the unconditional fflush(stdout) in grep_printline and
procmatches with a periodic timer that flushes at most once every
100ms.  This preserves interactive responsiveness (grep | tee,
grep | tail -f) while avoiding 1M+ write(2) syscalls when
processing large inputs.

The flush interval is tracked via clock_gettime(CLOCK_MONOTONIC)
and a static timespec.  --line-buffered continues to flush
immediately via setlinebuf(3), as before.

Benchmark on 1M lines (37MB output to file):
  unconditional fflush:  1.90s  (sys 1.22s)
  periodic 100ms timer:   0.49s  (sys 0.007s)

Reviewed by:            kevans
Differential Revision:  https://reviews.freebsd.org/D57528
DeltaFile
+29-4usr.bin/grep/util.c
+29-41 files

FreeBSD/src 8a13adfshare/man/man7 d.7

d.7: Correct a few typos in the manual page

- s/occurance/occurrence/
- s/Univeristy/University/

MFC after:      5 days
DeltaFile
+3-3share/man/man7/d.7
+3-31 files

FreeBSD/src 9e9303alib/libc/stdlib merge.c

libc: Guard mergesort() allocation size arithmetic

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2243
Reviewed by:    fuz
MFC after:      1 week

(cherry picked from commit 3501eec9dd39b527a46e82de53480968d283b90e)
DeltaFile
+11-5lib/libc/stdlib/merge.c
+11-51 files

FreeBSD/src 87466b1lib/msun/src s_rsqrtf.c s_rsqrtl.c

msun: Fix up for recent rsqrt[fl] functions

Paul Zimmermann (of Core-Math and MPFR fame) graciously tested
the recently committed rsqrt[fl]() functions.  He identified 127
incorrectly rounded values for rsqrtf() in round-to-nearest mode.
This patch fixes the rounding in RN.  Exhaustive testing now shows
that rsqrtf() is corrected rounded for RN.  He also tested rsqrt()
and rsqrtl() in the interval [1,4).  Both appear to be correctly
rounded.  Finally, the patch includes small changes to comments.

A concise list of changes is

* lib/msun/src/s_rsqrt.c:
  . Fix comments.

* lib/msun/src/s_rsqrtf.c
  . Fix comments.
  . Exhaustive testing by Paul Zimmermann found 127 incorrectly
    rounded values in round-to-nearests.  These gave have the

    [12 lines not shown]
DeltaFile
+22-15lib/msun/src/s_rsqrtf.c
+3-5lib/msun/src/s_rsqrtl.c
+2-2lib/msun/src/s_rsqrt.c
+27-223 files

FreeBSD/src 48a47c0lib/libc/stdlib qsort.3

qsort.3: Document mergesort() behaviour on size overflow

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2243
Reviewed by:    fuz
MFC after:      1 week

(cherry picked from commit 26a1180cd1521e4c438ac95a57b134e27ea0a72d)
DeltaFile
+11-3lib/libc/stdlib/qsort.3
+11-31 files

FreeBSD/src d7d2290tools/build depend-cleanup.sh

depend-cleanup.sh: rebuild strrchr.o on riscv64 if it came from strrchr.S

We have to switch back to the previous rule once the temporary
build fix has been replaced with a permanent fix.

PR:             295823
See also:       4996ebdb720042239a197ebec2d265cdfdf1bbf3
Reported by:    siva
MFC after:      1 week

(cherry picked from commit 93221c277608d2612511eaabbf2bfc1f4b4250f7)
DeltaFile
+5-2tools/build/depend-cleanup.sh
+5-21 files

FreeBSD/src 808241elib/libc/riscv/string Makefile.inc

libc/riscv64: temporarily unhook strrchr() from the build

A bug was discovered in the riscv64 assembly implementation of
this function.  Fall back to the generic implementation until a
fix can be developed.

PR:             295823
Reported by:    siva
MFC after:      1 week

(cherry picked from commit 4996ebdb720042239a197ebec2d265cdfdf1bbf3)
DeltaFile
+1-2lib/libc/riscv/string/Makefile.inc
+1-21 files

FreeBSD/src 89234ffshare/man/man4 umass.4

umass.4: Correct a typo in the manual page

- s/Sotrage/Storage/

MFC after:      5 days
DeltaFile
+1-1share/man/man4/umass.4
+1-11 files

FreeBSD/src f257497sys/dev/acpica acpi_timer.c

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

- s/freqency/frequency/

MFC after:      3 days
DeltaFile
+1-1sys/dev/acpica/acpi_timer.c
+1-11 files

FreeBSD/src 58cf810sys/dev/clk clknode_if.m

clk: Fix a typo in a source code comment

- s/freqency/frequency/

MFC after:      3 days
DeltaFile
+1-1sys/dev/clk/clknode_if.m
+1-11 files

FreeBSD/src 0ea84e9sys/dev/et if_et.c

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

- s/Diable/Disable/

MFC after:      3 days
DeltaFile
+1-1sys/dev/et/if_et.c
+1-11 files

FreeBSD/src 6280a06sys/dev/qcom_clk qcom_clk_rcg2.c

qcom_clk: Fix a typo in a source code comment

- s/freqency/frequency/

MFC after:      3 days
DeltaFile
+1-1sys/dev/qcom_clk/qcom_clk_rcg2.c
+1-11 files

FreeBSD/src 54e4b9csys/dev/ufshci ufshci_ctrlr.c

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

- s/Diable/Disable/

MFC after:      3 days
DeltaFile
+1-1sys/dev/ufshci/ufshci_ctrlr.c
+1-11 files

FreeBSD/src dd8ba1fsys/dev/sdhci fsl_sdhci.c

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

- s/freqency/frequency/

MFC after:      3 days
DeltaFile
+1-1sys/dev/sdhci/fsl_sdhci.c
+1-11 files

FreeBSD/src 49ced8dsys/dev/aic7xxx aic79xx.c aic7xxx.seq

aic7xxx: Fix two typos in source code comments

- s/Diable/Disable/
- s/connonical/canonical/

MFC after:      3 days
DeltaFile
+1-1sys/dev/aic7xxx/aic79xx.c
+1-1sys/dev/aic7xxx/aic7xxx.seq
+2-22 files

FreeBSD/src 395d967sys/dev/mxge if_mxge.c

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

- s/deterimine/determine/

(cherry picked from commit 14e93e3e360718f2272028fbf99775df3c192e83)
DeltaFile
+1-1sys/dev/mxge/if_mxge.c
+1-11 files

FreeBSD/src 8cd4029sys/dev/mxge if_mxge.c

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

- s/deterimine/determine/

(cherry picked from commit 14e93e3e360718f2272028fbf99775df3c192e83)
DeltaFile
+1-1sys/dev/mxge/if_mxge.c
+1-11 files

FreeBSD/src adf2614sys/dev/mxge if_mxge.c

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

- s/deterimine/determine/

(cherry picked from commit 14e93e3e360718f2272028fbf99775df3c192e83)
DeltaFile
+1-1sys/dev/mxge/if_mxge.c
+1-11 files

FreeBSD/src 59b0df3sys/dev/ntsync linux_ntsync.c

linux_ntsync(9): check the file type before calling native ntsync(9)

Reported by:    Alex S <iwtcex at gmail.com>
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+36-0sys/dev/ntsync/linux_ntsync.c
+36-01 files

FreeBSD/src 64467d2sys/kern vfs_subr.c, sys/sys vnode.h mount.h

vnode: move VIRF_KNOTE to v_v2flag

The semantic of the flag has the natural march to the code scope that is
protected by the vnode lock.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56912
DeltaFile
+4-3sys/sys/vnode.h
+2-3sys/kern/vfs_subr.c
+2-2sys/sys/mount.h
+8-83 files

FreeBSD/src da6aa06sys/sys vnode.h rangelock.h

struct vnode: assign v_rl.resv1 as v_type and v_rl.resv2 as v_state

Use the avaliable space to introduce vnode-locked flag v_v2flag.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56912
DeltaFile
+8-2sys/sys/vnode.h
+4-0sys/sys/rangelock.h
+12-22 files

FreeBSD/src 3d50531sys/sys rangelock.h

sys/rangelock.h: explicitly enumerate padding at the end of the structure

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D56912
DeltaFile
+6-0sys/sys/rangelock.h
+6-01 files

FreeBSD/src 36b155asys/kern vfs_subr.c

vfs: work around the race between vget() and vnlru

Specifically, do not let vtryrecycle() to recycle a used vnode. It is
possible for a vnode to be vref-ed or vuse-ed lockless after it is held
by vhold_recycle_free(). Then, since vtryrecycle() does not recheck the
hold count, we might end up freeing vused vnode.

Since vget_finish() increments v_usecount after obtaining the vnode
lock, we would observe the hold reference anyway when the parallel
vget() is blocked waiting on the vnode lock.

PR:     281749
Reported and tested by: Steve Peurifoy <ssw01 at mathistry.net>, Vladimir Grebenshchikov <vova at zote.me>
Reviewed by:    olce
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57305
DeltaFile
+6-1sys/kern/vfs_subr.c
+6-11 files

FreeBSD/src 3eafe01libexec/rtld-elf/tests parse_integer_test.c Makefile

rtld-elf: add some tests for parse_integer()

Reviewed by:    des, dim
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57549
DeltaFile
+35-0libexec/rtld-elf/tests/parse_integer_test.c
+10-0libexec/rtld-elf/tests/Makefile
+45-02 files

FreeBSD/src 4249a9blibexec/rtld-elf rtld.c

rtld parse_integer(): support binary, octal, and hex C notations

Reviewed by:    des, dim
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D57549
DeltaFile
+34-9libexec/rtld-elf/rtld.c
+34-91 files

FreeBSD/src 69e2097lib/libc/posix1e acl_to_text_nfs4.c

acl_to_text_nfs4.c: Fix a snprintf() for large uid

Commit 6e7c10c79dea fixed a couple of snprintf()s for large
uid/gid numbers above 2Gig.  This patch fixes another one.

Reviewed by:    rmacklem
Differential Revision:  https://reviews.freebsd.org/D57561
DeltaFile
+1-1lib/libc/posix1e/acl_to_text_nfs4.c
+1-11 files

FreeBSD/src 33c8e68sys/dev/sound/usb uaudio.c, sys/dev/usb usbdevs

snd_uaudio: Support Roland UA-33

Apply the appropriate quirk. Also, introduce a new uaudio_vendor_audio
table, similar to uaudio_vendor_midi, which includes non-standard USB
audio devices. The Roland UA-33 needs this, bceause it comes with
bInterfaceClass = 0xff (vendor-specific), so snd_uaudio(4) doesn't
detect it.

PR:             294814
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    emaste
Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/24

(cherry picked from commit 549e740619873716b796a841a10f56fae3c3ad49)
DeltaFile
+10-0sys/dev/sound/usb/uaudio.c
+1-0sys/dev/usb/quirk/usb_quirk.c
+1-0sys/dev/usb/usbdevs
+12-03 files

FreeBSD/src 511d749sys/compat/linuxkpi/common/src linux_hdmi.c

LinuxKPI: sync linuxkpi_video with Linux 6.12

MFC after:      1 week
DeltaFile
+2-8sys/compat/linuxkpi/common/src/linux_hdmi.c
+2-81 files

FreeBSD/src de2a136usr.sbin/mixer mixer.c

mixer(8): Retire deprecated control values

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+0-21usr.sbin/mixer/mixer.c
+0-211 files

FreeBSD/src c9171aeusr.sbin/inetd inetd.8 inetd.c

inetd: Add missing argument to the -p flag description

While here, use the more specific "pidfile" consistently instead of
ambiguous "filename".

Reviewed by:    ziaee
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57531

(cherry picked from commit 75a94ae7d143a067a7a9eef2a1d2072fbd5044cf)
DeltaFile
+3-3usr.sbin/inetd/inetd.8
+1-1usr.sbin/inetd/inetd.c
+4-42 files