FreeBSD/src 554cf9dsys/compat/linuxkpi/common/src linux_80211.c

linuxkpi 802.11: Free entire mbuf chain on failure

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Fixes: 0936c648ad0ee ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Fixes: c816f64e66a0d ("LinuxKPI: 802.11: plug mbuf leak")
Differential Revision: https://reviews.freebsd.org/D57477

(cherry picked from commit 232021fd093c6e65beee5c0b4281091902022d08)
DeltaFile
+2-2sys/compat/linuxkpi/common/src/linux_80211.c
+2-21 files

FreeBSD/src f8e499fsys/netpfil/ipfw ip_fw_nat.c

ipfw nat: Add assertion that mbuf is not a chain

Discarding m_free's return value will result in an mbuf leak if the mbuf
was in a chain.

In general we should use m_freem if the mbuf may be in a chain, or
assert that the return was NULL.  There will not be a chain here due to
m_megapullup, so add an assert.

Reviewed by:    ae
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57479

(cherry picked from commit b16c731b0191d6c47de46a3c6057b0c5ec0dd420)
DeltaFile
+3-2sys/netpfil/ipfw/ip_fw_nat.c
+3-21 files

FreeBSD/src de8a68dsys/netipsec ipsec_output.c

ipsec: Free entire mbuf chain on failure

Reviewed by:    kib
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57475

(cherry picked from commit 85195c0c7f8a2926f0ba131178d9231bc33c81b5)
DeltaFile
+1-1sys/netipsec/ipsec_output.c
+1-11 files

FreeBSD/src 32d229dsys/dev/tsec if_tsec.c

if_tsec: Free entire mbuf chain on failure

Reviewed by:    bz
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57478

(cherry picked from commit 39e2fe23238f4d49cd6f2c3ce9d0d9c1c3bcbedd)
DeltaFile
+1-1sys/dev/tsec/if_tsec.c
+1-11 files

FreeBSD/src 242c9c8sys/kern vfs_inotify.c, tests/sys/kern inotify_test.c

inotify: Unconditionally generate IN_IGNORED events for files/dirs

The implementation previously only generated an IN_IGNORED event for a
deleted watched file if the watch explicitly requested IN_DELETE_SELF.
This is not correct, IN_IGNORED should always be raised when the watched
subject is deleted.  Adjust the implementation of inotify_log_one()
accordingly.

This also fixes a problem where a deleted watched file's watch
would not be removed if IN_DELETE_SELF was not in the watch's event
mask, in which case the unlinked vnode would linger until the inotify
descriptor itself is closed.

Add a regression test.

Reported by:    jrtc27
Reviewed by:    jrtc27
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D58050

    [2 lines not shown]
DeltaFile
+23-12sys/kern/vfs_inotify.c
+24-0tests/sys/kern/inotify_test.c
+47-122 files

FreeBSD/src 1ad156fsys/kern vfs_inotify.c

inotify: Ensure that "allocfail" is initialized in inotify_log_one()

Fixes:  b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")

(cherry picked from commit f370bf9fafce82851bedb2b88bc21ec6ca0182df)
DeltaFile
+1-2sys/kern/vfs_inotify.c
+1-21 files

FreeBSD/src 3defe81sys/ofed/drivers/infiniband/core ib_addr.c

infiniband/core/ib_addr.c: fix typo

We should exit the net epoch instead of acquiring one more entry.

Reported by:    Wafa Hamzah <wafah at nvidia.com>
Reviewed by:    jhb
Sponsored by:   Nvidia networking
Fixes:  4726b80d9379 ("OFED: Various changes from Linux 4.20")
Differential revision:  https://reviews.freebsd.org/D58127
DeltaFile
+2-2sys/ofed/drivers/infiniband/core/ib_addr.c
+2-21 files

FreeBSD/src a00f807usr.bin/vtfontcvt vtfontcvt.c

vtfontcvt: Return error from write_fnt_source

Previously write_fnt_source always returned 0, silently discarding
errors.  Return rv so that errors set vtfontcvt's shell exit
appropriately.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit f05fb5157ba1291ee5019bacece8d1e98ea95b35)
DeltaFile
+1-1usr.bin/vtfontcvt/vtfontcvt.c
+1-11 files

FreeBSD/src 6756f09sys/conf newvers.sh

newvers.sh: Avoid spurious -dirty in git revision

If git is installed and .git exists but git rev-parse failed to report a
hash we previously produced just "-dirty" as the git revision.  Gate the
git commit count and -dirty check on the rev-parse passing.

Reviewed by:    jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57995

(cherry picked from commit 465a3b7adc008c068741594f6c922ede98924f39)
(cherry picked from commit 45da2c1e1d202ab190f156dd63403be79fb11e94)
DeltaFile
+15-13sys/conf/newvers.sh
+15-131 files

FreeBSD/src 45da2c1sys/conf newvers.sh

newvers.sh: Avoid spurious -dirty in git revision

If git is installed and .git exists but git rev-parse failed to report a
hash we previously produced just "-dirty" as the git revision.  Gate the
git commit count and -dirty check on the rev-parse passing.

Reviewed by:    jlduran
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57995

(cherry picked from commit 465a3b7adc008c068741594f6c922ede98924f39)
DeltaFile
+15-13sys/conf/newvers.sh
+15-131 files

FreeBSD/src 0b95429sys/dev/usb/quirk usb_quirk.c

usb/quirks: More USB mass storage quirk sorting
DeltaFile
+2-2sys/dev/usb/quirk/usb_quirk.c
+2-21 files

FreeBSD/src 3e123besys/kern vfs_inotify.c, sys/sys inotify.h

inotify: Fix comment typos

MFC after:      1 week
DeltaFile
+1-1sys/kern/vfs_inotify.c
+1-1sys/sys/inotify.h
+2-22 files

FreeBSD/src 836a76atests/sys/kern inotify_test.c

tests/inotify: Make an error message more useful

MFC after:      3 days
DeltaFile
+2-1tests/sys/kern/inotify_test.c
+2-11 files

FreeBSD/src 7bf11a2sys/kern subr_epoch.c

epoch: Fix epoch_drain_callbacks()

This function is supposed to wait until all pending callbacks have been
executed.  This is useful in some contexts where we tear down some
context (like a VNET jail and its associated UMA zones) synchronously,
and we want to make sure that all pending asynchronous callbacks (which
may free objects to said UMA zones) have run first.

The implementation schedules a callback on each CPU and waits for them
all to run.  This assumes that, on a given CPU, callbacks are executed
in the order that they are pushed.  This assumption depends on the
implementation of epoch_call_task() and ck_epoch_poll_deferred(), and it
is not true in general.

Callbacks are pushed onto a per-CPU stack in LIFO order.
ck_epoch_poll_deferred() first pulls out the callbacks from epoch - 2,
which are always safe to execute, and in so doing reorders them such
that the oldest callback as at the top of the stack, so in this case,
epoch_call_task() will execute them in order.  However,

    [22 lines not shown]
DeltaFile
+30-20sys/kern/subr_epoch.c
+30-201 files

FreeBSD/src f370bf9sys/kern vfs_inotify.c

inotify: Ensure that "allocfail" is initialized in inotify_log_one()

Fixes:  b70997c8c75a ("inotify: Unconditionally generate IN_IGNORED events for files/dirs")
DeltaFile
+1-2sys/kern/vfs_inotify.c
+1-21 files

FreeBSD/src a585906sys/kern subr_taskqueue.c subr_gtaskqueue.c, sys/sys taskqueue.h

taskqueue: Avoid unbounded epoch read sections

The taskqueue thread loop tries to avoid entering and exiting net epoch
read sections for every task.  This reduces the overhead of net epoch
integration, but the implementation wasn't bounding the length of the
read section, so a busy taskqueue thread could hold an epoch open for an
unbounded period.  This is easy to achieve with the epair task, for
instance.

Bound the number of tasks that we'll execute without observing the
global epoch, and provide a sysctl to control it.  Let the default bound
be eight.

Reviewed by:    glebius
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D58031
DeltaFile
+26-8sys/kern/subr_taskqueue.c
+12-8sys/kern/subr_gtaskqueue.c
+2-0sys/sys/taskqueue.h
+40-163 files

FreeBSD/src de6193csys/kern sys_timerfd.c

timefd: Correct the required rights for timerfd_gettime()

Reviewed by:    jfree
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58084
DeltaFile
+1-1sys/kern/sys_timerfd.c
+1-11 files

FreeBSD/src e1ab351sys/dev/netmap netmap_bdg.c

netmap: Don't assume that user-provided strings are nul-terminated

MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-0sys/dev/netmap/netmap_bdg.c
+4-01 files

FreeBSD/src 28f617dcontrib/tzcode zic.c localtime.c

tzcode: Update to 2026c

MFC after:      1 week
DeltaFile
+181-170contrib/tzcode/zic.c
+44-34contrib/tzcode/localtime.c
+70-7contrib/tzcode/NEWS
+10-56contrib/tzcode/zdump.c
+23-27contrib/tzcode/tz-link.html
+17-28contrib/tzcode/Makefile
+345-3229 files not shown
+414-37915 files

FreeBSD/src e2d5644share/man/man4 hrfkill.4 hidbus.4, sys/conf NOTES

hrfkill: Add driver to report RFKILL button press

This driver only reports the RFKILL button presses.

This is needed for the "airplane" key on some Framework laptops.

Reviewed by:    wulf, ziaee
Event:          Halifax Hackathon 202606
Location:       vishwin@'s car
Co-authored-by: Daniel Shaefer
Sponsored by:   Framework Computer Inc
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57838
DeltaFile
+111-0sys/dev/hid/hrfkill.c
+82-0share/man/man4/hrfkill.4
+8-0sys/modules/hid/hrfkill/Makefile
+2-0sys/dev/hid/hid.h
+1-0share/man/man4/hidbus.4
+1-0sys/conf/NOTES
+205-03 files not shown
+208-09 files

FreeBSD/src ff22dcclib/libsysdecode mktables

libsysdecode: Teach mktables to handle enums

While here, clean up and simplify the existing code.

MFC after:      1 week
Reviewed by:    glebius, jhb
Differential Revision:  https://reviews.freebsd.org/D57993

(cherry picked from commit 8b197806dcdff5673dd4f77a97bf46035d14db2a)
DeltaFile
+40-21lib/libsysdecode/mktables
+40-211 files

FreeBSD/src 3d4f965lib/libsysdecode mktables

libsysdecode: Fix shutdownhow table

MFC after:      1 week
Fixes:          c3276e02beab ("sockets: make shutdown(2) how argument a enum")
Reviewed by:    glebius
Differential Revision:  https://reviews.freebsd.org/D57915

(cherry picked from commit 402a6574886a90b8025777b3b2c960c88677462d)
DeltaFile
+1-1lib/libsysdecode/mktables
+1-11 files

FreeBSD/src 2479b69. zic.c NEWS

Import tzcode 2026c
DeltaFile
+181-170zic.c
+70-7NEWS
+44-31localtime.c
+10-56zdump.c
+23-27tz-link.html
+17-28Makefile
+345-31913 files not shown
+438-39419 files

FreeBSD/src 1364d8fsys/kern kern_sendfile.c sys_generic.c, sys/sys syscallsubr.h

kern_writefile(): fix several regressions

sendfile(): for trailers uio, set uio_rw to UIO_WRITE instead of checking it
kern_filewrite(): remove unused argument offset
kern_writev(): the check should compare cnt against zero, not uio_resid

Reported by:    markj
Fixes:  dfad790c8cca ("sendfile: stop abusing kern_writev()")
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-6sys/kern/kern_sendfile.c
+3-3sys/kern/sys_generic.c
+1-1sys/sys/syscallsubr.h
+6-103 files

FreeBSD/src cd7b650share/man/man4 fwisound.4, sys/conf files

fwisound: add Apple FireWire audio driver

Expose audio capture from Apple FireWire devices as a standard
pcm(4)/dsp(4) device via the newpcm framework.

(adrian: I've tested this on an isight camera and looped
it back to USB speakers via "sox -t oss /dev/dsp3 -t oss /dev/dsp4")

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58109
DeltaFile
+609-0sys/dev/firewire/fwisound.c
+233-0sys/dev/firewire/fwisound_pcm.c
+112-0sys/dev/firewire/fwisound.h
+96-0share/man/man4/fwisound.4
+12-0sys/modules/firewire/fwisound/Makefile
+2-0sys/conf/files
+1,064-03 files not shown
+1,067-09 files

FreeBSD/src d128ddfsys/dev/firewire fwcam.c

fwcam: retry ISO enable after re-powering camera

Some IIDC cameras power down the sensor when inactive (e.g. lens
cover closed) and reject ISO enable with EIO. Re-power the camera
and retry once before failing.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58101
DeltaFile
+16-1sys/dev/firewire/fwcam.c
+16-11 files

FreeBSD/src 56d4deesys/dev/firewire fwcam.c

fwcam: defer ISO streaming to first read

Moved ISO start to first usage. Opening the device now
only validates state and increments the open count, allowing info
queries and mode changes without starting the camera. ISO streaming
begins on demand when userland first reads frame data.
This avoid the camera led to turn-on at attach.

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58100
DeltaFile
+10-14sys/dev/firewire/fwcam.c
+10-141 files

FreeBSD/src fa65155sys/compat/linux linux_socket.c

linux: Fix sockopt copyout

The Linux getsockopt did not check the size of the provided buffer when
copying out the value, leading to buffer overflows (e.g., for TCP_INFO).

Fix is to use the smaller of the option value size and the provided
buffer.

(cherry picked from commit 471fdd91d9156aeab026dc420fb97d97be872d65)
DeltaFile
+14-3sys/compat/linux/linux_socket.c
+14-31 files

FreeBSD/src 687f618sys/compat/linux linux_misc.c linux_misc.h

linux: Add support for PR_SET_VMA to prctl(2)

Implement dummy support for PR_SET_VMA with PR_SET_VMA_ANON_NAME in
prctl(2).  This prevents applications from receiving EINVAL when
attempting to name anonymous memory regions.

(cherry picked from commit a64148e21bb4ac976345cbedbd32942f97f07cc1)
DeltaFile
+7-0sys/compat/linux/linux_misc.c
+2-0sys/compat/linux/linux_misc.h
+9-02 files

FreeBSD/src 750d429sys/kern vfs_cache.c

vfs cache: further massage some commentary
DeltaFile
+13-5sys/kern/vfs_cache.c
+13-51 files