FreeBSD/src f2f50c8usr.bin/sockstat main.c

sockstat: fix SCTP support

Provide a name for SCTP sockets.

Fixes:          8b2b62b49d88 ("sockstat: consolidate unix(4) protocols in the array of protocols")
DeltaFile
+2-0usr.bin/sockstat/main.c
+2-01 files

FreeBSD/src 920518csys/dev/fdt fdt_common.c fdt_common.h

FDT: implement fdt_ether_get_addr()

Introduce fdt_ether_get_addr() in fdt_common.c/h that tries standard
DT properties in the correct order and falls back to a random address
when needed. This should be used by ethernet drivers instead of open-coding
the same logic.

MFC after:      2 weeks

Reviewed by:    mhorne, adrian, bz, jrtc27
Differential Revision:  https://reviews.freebsd.org/D58104
DeltaFile
+40-0sys/dev/fdt/fdt_common.c
+4-0sys/dev/fdt/fdt_common.h
+44-02 files

FreeBSD/src e16857eshare/man/man5 src.conf.5, tools/build/options WITH_CCACHE_BUILD

src.conf(5): Suggest using ccache4

We have separate ports for Ccache 3 and 4.  Suggest both, rather than
only the Ccache 3 port.  Rearrange the text somewhat to avoid an
excessively ragged edge on a standard 80-column terminal.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58005

(cherry picked from commit a2545f68f64b4cfcc13ca2d372c8b9fef1c6331e)
DeltaFile
+7-10tools/build/options/WITH_CCACHE_BUILD
+10-6share/man/man5/src.conf.5
+17-162 files

FreeBSD/src b775479share/man/man5 src.conf.5, tools/build/options WITH_CCACHE_BUILD

src.conf(5): Suggest using ccache4

We have separate ports for Ccache 3 and 4.  Suggest both, rather than
only the Ccache 3 port.  Rearrange the text somewhat to avoid an
excessively ragged edge on a standard 80-column terminal.

MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D58005

(cherry picked from commit a2545f68f64b4cfcc13ca2d372c8b9fef1c6331e)
DeltaFile
+8-11share/man/man5/src.conf.5
+7-10tools/build/options/WITH_CCACHE_BUILD
+15-212 files

FreeBSD/src cd2c145share/mk bsd.compiler.mk, tools/build/options WITH_CCACHE_BUILD

share/mk: Add sccache suport for WITH_CCACHE_BUILD option

By setting CCACHE_NAME=sccache , sccache can be used as an alternative
for ccache.

Reviewed by:    emaste, jhb
Event:          Kitchener-Waterloo Hackathon 202506
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49417

(cherry picked from commit 10cb3979a9bde6c8e441e3ba4aa5fd09963c484f)
DeltaFile
+11-1share/mk/bsd.compiler.mk
+7-0tools/build/options/WITH_CCACHE_BUILD
+18-12 files

FreeBSD/src 60382b4lib/libfetch common.c http.c

libfetch: Reduce copying

Reduce the amount of copying we do when performing buffered reads.

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D58113
DeltaFile
+29-16lib/libfetch/common.c
+18-23lib/libfetch/http.c
+12-11lib/libfetch/ftp.c
+2-0lib/libfetch/common.h
+61-504 files

FreeBSD/src d4e0e1flib/libfetch common.h common.c

libfetch: Make fetch_ref an inline

Make fetch_ref() an inline and provide a fetch_deref().

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D57944
DeltaFile
+12-1lib/libfetch/common.h
+0-11lib/libfetch/common.c
+1-1lib/libfetch/ftp.c
+13-133 files

FreeBSD/src 3dddfe2usr.bin/fetch fetch.c fetch.1

fetch: Stop setting an alarm

Now that fetchTimeout works reliably, setting an alarm is not only no
longer necessary but counterproductive, as it will trigger even if the
connection is not actually stalled but merely slow.

While here, improve the wording of the manual page's description of the
various options for setting a timeout.

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D57911
DeltaFile
+9-24usr.bin/fetch/fetch.c
+6-4usr.bin/fetch/fetch.1
+15-282 files

FreeBSD/src 27b4117lib/libfetch fetch.3

libfetch: Document fetchTimeout

Document the global fetchTimeout variable, now that it works reliably.

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D57910
DeltaFile
+16-2lib/libfetch/fetch.3
+16-21 files

FreeBSD/src 848f360lib/libfetch common.c

libfetch: Apply timeout to connection attempts

Mark the socket non-blocking before connecting and poll for completion,
applying fetchTimeout if set.

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D57909
DeltaFile
+42-7lib/libfetch/common.c
+42-71 files

FreeBSD/src a197827lib/libfetch common.c http.c

libfetch: Add read buffering

Previously, we would read FTP control connection messages and HTTP
reponse headers one character at a time.  Now, we read as much as will
fit in our buffer and look for a newline.  If there is data left over,
it will be reused by the next fetch_getln() call.  This also requires
the addition of a fetch_bufread() which takes the buffer into account,
otherwise the start of the HTTP response body will be stuck in the
buffer after we read the last line of the header.

This should noticeably improve HTTP performance, especially for small
transfers.

MFC after:      1 week
Reviewed by:    op
Differential Revision:  https://reviews.freebsd.org/D57907
DeltaFile
+87-22lib/libfetch/common.c
+24-41lib/libfetch/http.c
+4-7lib/libfetch/ftp.c
+3-1lib/libfetch/common.h
+118-714 files

FreeBSD/src 32c341blib/libfetch common.c common.h

libfetch: Overhaul socket read / write

* Make fetch_ssl_read() and fetch_ssl_write() behave more like read(2)
  and write(2), and drop fetch_socket_read() in favor of read(2).

* Don't request POLLERR, it's implied.

* Don't needlessly set errno, it's relatively costly.

* Always check for EAGAIN from writev(2), otherwise we will abort on a
  short write instead of proceeding to poll(2).

* Always check for EAGAIN from poll(2) even though it can't happen on
  FreeBSD; POSIX says it can, and it might in the future.

* Rewrite fetch_read() and fetch_writev() to be more similar to each
  other.  The main difference is that a partial read is treated as
  success while a partial write is treated as failure.


    [4 lines not shown]
DeltaFile
+131-87lib/libfetch/common.c
+2-2lib/libfetch/common.h
+133-892 files

FreeBSD/src 9fc14dbusr.bin/tail tail.c

tail: Allow repetitive or contraditory options

Unlike its GNU counterpart, our tail(1) has always errored out if given
repetitive or contradictory options, even prior to Keith Bostic's 1991
reimplementation.  There is no good reason to continue to do so, not
even tradition, since many other commands (including head(1)) simply
apply the rightmost option in cases like this.

MFC after:      1 week
Reviewed by:    allanjude, markj
Differential Revision:  https://reviews.freebsd.org/D58192
DeltaFile
+0-2usr.bin/tail/tail.c
+0-21 files

FreeBSD/src 2a5e58csys/kern sys_procdesc.c kern_sig.c, sys/sys event.h procdesc.h

procdesc: add NOTE_PDSIGCHLD

The note type wakes up when there is something for pdwait(2) to report
on the process descriptor.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58123
DeltaFile
+21-4sys/kern/sys_procdesc.c
+6-3sys/sys/event.h
+2-0sys/kern/kern_sig.c
+1-0sys/sys/procdesc.h
+30-74 files

FreeBSD/src 0f1718esys/kern sys_procdesc.c

pdwait(2): make debugging events functional

We need to wake up the pdwait(2) waiters when procdesc event is
reported.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58172
DeltaFile
+1-0sys/kern/sys_procdesc.c
+1-01 files

FreeBSD/src 4cd67a0lib/libsys kqueue.2

kqueue.2: document NOTE_PDSIGCHLD

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58123
DeltaFile
+9-1lib/libsys/kqueue.2
+9-11 files

FreeBSD/src f6ee1d2sys/kern kern_thread.c

kern_thread: Fix i386 p_emuldata KBI assertion

On amd64 there was 4 bytes of padding between the 20-byte p_comm and
(for LP64) 8-byte p_sysent, so the addition of p_execblock just caused
that padding to be eaten up. However, on i386, there was no such
padding, and so the addition of p_execblock rippled through to
p_emuldata.

Fixes:  e1a84b7708c2 ("execve_block(): a mechanism for mutual exclusion with execve() on the process")
DeltaFile
+1-1sys/kern/kern_thread.c
+1-11 files

FreeBSD/src 88711f1lib/libc/gen strtofflags.c, sys/fs/tmpfs tmpfs_subr.c

Revert "chflags: Add a new UF_DONTCACHE flag"

This reverts commit 74654ba3b1b3bcf6ba8870a54310accbb6adbf0b.

Apparently it breaks cross building from Linux for some
reason.  I'll admit I didn't even know we supported cross
building from Linux.
DeltaFile
+1-3lib/libc/gen/strtofflags.c
+1-1sys/fs/tmpfs/tmpfs_subr.c
+1-1sys/ufs/ufs/ufs_vnops.c
+0-1sys/sys/stat.h
+3-64 files

FreeBSD/src 3734034sys/net iflib.c

iflib: Add a missing CURVNET_RESTORE() in the error path

Signed-off-by:  Peter Ganzhorn <peter.ganzhorn at gmail.com>
Reviewed by:    zlei
Fixes:          6d49b41ee84b iflib: Add pfil hooks
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2150

(cherry picked from commit f49f61f19463c21125bb1215cf8e0530f52953e3)
(cherry picked from commit d11419ed37a61a4896381f91fd942c4fff2e66dd)
DeltaFile
+3-1sys/net/iflib.c
+3-11 files

FreeBSD/src c3f6c65share/man/man9 sbintime.9 Makefile

Add sbintime.9 manual page

sbintime.9 is a manual page that documents the usage of sbintime_t and
its helper functions.

MFC after:      1 week
Reviewed by:    ziaee, markj
Differential Revision:  https://reviews.freebsd.org/D57931
DeltaFile
+171-0share/man/man9/sbintime.9
+14-0share/man/man9/Makefile
+3-2share/man/man9/callout.9
+2-1share/man/man9/microtime.9
+190-34 files

FreeBSD/src 4830670bin/chflags chflags.1

chflags.1: Document the new UF_DONTCACHE flag

Commit 74654ba3b1b3 added and new chflags(1) flag called
"udontcache" or "dontcache".  This patch documents this flag.

This is a content change.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58181
DeltaFile
+3-1bin/chflags/chflags.1
+3-11 files

FreeBSD/src 74654balib/libc/gen strtofflags.c, sys/fs/tmpfs tmpfs_subr.c

chflags: Add a new UF_DONTCACHE flag

This internet draft (which is close to being an RFC)
specifies a new NFSv4.2 attribute which tells the NFSv4.2
client to not cache file data. (Similar to O_DIRECT, but
triggered by this attribute set on the file on the NFSv4.2
server and not by the application's open(2).)

https://datatracker.ietf.org/doc/draft-ietf-nfsv4-uncacheable-files/

This patch adds a new chflags(1) flag called UF_DONTCACHE to
implement this.

Patches for NFS and ZFS will be done separately.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58181
DeltaFile
+3-1lib/libc/gen/strtofflags.c
+1-1sys/fs/tmpfs/tmpfs_subr.c
+1-1sys/ufs/ufs/ufs_vnops.c
+1-0sys/sys/stat.h
+6-34 files

FreeBSD/src 87fb416usr.sbin/usbdump usbdump.c usbdump.8

usbdump: add -t to omit timestamps

Matches tcpdump naming, but without getting more intense as you add more
-t.  This slightly reduces the post-processing needed on usbdump output
to diff two transactions.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58196
DeltaFile
+22-13usr.sbin/usbdump/usbdump.c
+7-2usr.sbin/usbdump/usbdump.8
+29-152 files

FreeBSD/src ad91d47sbin/devd devd.conf, sys/netgraph/bluetooth/hci ng_hci_main.c

bluetooth: signal devd on netgraph device events

Currently, devd emits events for external adapters only.

Send Netgraph init/disconnect events to devd so the internal adapter's
state could be asserted from userland.

(adrian - indentation changes.)

Signed-off-by: Kirill Orlov (-k) <slowdive at me.com>
Reviewed-by: adrian, imp
Pull-Request: https://github.com/freebsd/freebsd-src/pull/2196
DeltaFile
+71-0sys/netgraph/bluetooth/hci/ng_hci_main.c
+15-0sbin/devd/devd.conf
+86-02 files

FreeBSD/src 4085d19share/man/man4 hidwacom.4 Makefile, sys/conf files

hidwacom: Add Wacom ExpressKey Remote driver

The Wacom ExpressKey Remote (ACK-411050) is a wireless button pad
with 18 programmable buttons and a touch ring, used as a companion
device with Wacom tablets.

It communicates via a USB wireless receiver (0x056a:0x0331) using a
vendor-specific HID report (ID 0x11).

This driver exposes the device via evdev:
  - 18 buttons: BTN_0–BTN_Z, BTN_BASE, BTN_BASE2
  - Touch ring position via ABS_WHEEL (0–71; reports 0 on release)
  - Pad activity marker via ABS_MISC (set to 15/PAD_DEVICE_ID when
    any input is active, 0 when idle that matches Linux wacom driver
    convention)
  - Remote serial number via MSC_SERIAL (for userland per-remote
    identification)

Battery level, charging state, and touch ring mode (3 LEDs, values 0–2)

    [11 lines not shown]
DeltaFile
+293-0sys/dev/hid/hidwacom.c
+87-0share/man/man4/hidwacom.4
+8-0sys/modules/hid/hidwacom/Makefile
+1-0sys/modules/hid/Makefile
+1-0sys/conf/files
+1-0share/man/man4/Makefile
+391-01 files not shown
+392-07 files

FreeBSD/src 7aa34e1sys/dev/rge if_rge.c

rge: fix multicast add/removal by using if_getdrvflags()

Using if_getflags() to check IFF_DRV_RUNNING is wrong;
if_getdrvflags() is required.  This issue resulted in the
multicast filter not being updated.

This was an oversight by me in my initial port.

Thanks to danilo@ for reporting it and Oleg <oleglelchuk at gmail.com>
for the fix.

PR: kern/295176
DeltaFile
+1-1sys/dev/rge/if_rge.c
+1-11 files

FreeBSD/src 23a6997share/man/man4 fwdv.4 Makefile, sys/conf NOTES

fwdv: add AV/C DV capture driver for FireWire camcorders

Add fwdv(4) driver for DV video capture from FireWire camcorders
using AV/C protocol and isochronous streaming.

Supports AV/C tape transport commands (play, stop, ff, rewind, pause,
record, eject) with NTSC/PAL auto-detection and read(2) interface
for frame capture.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58122
DeltaFile
+1,101-0sys/dev/firewire/fwdv.c
+195-0sys/dev/firewire/fwdv.h
+80-0share/man/man4/fwdv.4
+11-0sys/modules/firewire/fwdv/Makefile
+1-0share/man/man4/Makefile
+1-0sys/conf/NOTES
+1,389-02 files not shown
+1,391-08 files

FreeBSD/src d387a43sys/dev/iicbus/pmic/rockchip rk805.c rk808.c

rockchip: fix stack overflow in rk8xx_rtc

Presumably surfaced by -fstack-protector-strong, rk8xx_settime was
triggering SSP when ntpd set the time on the RockPro64, at the very
least.  A minor oops meant that the weeks mask was getting tossed into
the wrong field, and the mask was never populated.  The mask is 0x7 for
all three of these, thus overflowing the `data` array in settime by one
byte.

PR:             296719
Reported by:    jsm, "Tenkawa" on Discord
Reviewed by:    mmel
Differential Revision:  https://reviews.freebsd.org/D58182
DeltaFile
+2-1sys/dev/iicbus/pmic/rockchip/rk805.c
+2-1sys/dev/iicbus/pmic/rockchip/rk808.c
+2-1sys/dev/iicbus/pmic/rockchip/rk817.c
+6-33 files

FreeBSD/src f72cfef. ObsoleteFiles.inc

Add a few missed files to ObsoleteFiles.inc

There were still some left-over files under usr/tests/gnu/usr.bin/diff,
causing the directory to not be fully removed. Add these to OLD_FILES.

Fixes:          134a4c78d070
DeltaFile
+4-0ObsoleteFiles.inc
+4-01 files

FreeBSD/src 62e22d7share/man/man4 tcp_bblog.4 Makefile

tcp_bblog.4: Add a manual page for TCP Blackbox Logging

The tcp_bblog facility provides structured logging of TCP stack activity
for debugging and performance analysis. It is implemented in the kernel
and allows per-connection tracing of TCP events with low overhead.

Reviewed by:    tuexen, ziaee
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D56252
DeltaFile
+147-0share/man/man4/tcp_bblog.4
+1-0share/man/man4/Makefile
+148-02 files