FreeBSD/src 5aac18d — usr.sbin/virtual_oss/virtual_oss main.c

virtual_oss(8): Fix cuse.ko check

There is no need at all to load the cuse module to just access the tool help.

kldload always checks for permissions first returning -EPERM if the user can't
load modules and -EEXIST if the user can, but the module is already loaded.

Approved by:            christos@
Differential Revision:  https://reviews.freebsd.org/D59844
MFC after:              2 weeks
DeltaFile
+5-2usr.sbin/virtual_oss/virtual_oss/main.c
+5-21 files

FreeBSD/src 75c0a83 — lib/libpfctl libpfctl.h libpfctl.c, sbin/pfctl pfctl_parser.h pfctl_osfp.c

pf: convert DIOCOSFPFLUSH DIOCOSFPGET DIOCOSFPADD to netlink

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+149-0sys/netpfil/pf/pf_nl.c
+134-0lib/libpfctl/libpfctl.c
+21-0sys/netpfil/pf/pf_nl.h
+5-6sbin/pfctl/pfctl_osfp.c
+4-0lib/libpfctl/libpfctl.h
+1-1sbin/pfctl/pfctl_parser.h
+314-71 files not shown
+315-87 files

FreeBSD/src 3c0846b — tests/sys/netpfil/pf Makefile osfp.sh

pf tests: basic osfp test

Load, list and clear the fingerprints.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+63-0tests/sys/netpfil/pf/osfp.sh
+1-0tests/sys/netpfil/pf/Makefile
+64-02 files

FreeBSD/src 219ce30 — lib/libpfctl libpfctl.h libpfctl.c, sbin/pfctl pfctl_table.c pfctl_radix.c

pf: convert DIOCRINADEFINE to netlink

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+94-0lib/libpfctl/libpfctl.c
+63-0sys/netpfil/pf/pf_nl.c
+0-29sbin/pfctl/pfctl_radix.c
+11-0sys/netpfil/pf/pf_nl.h
+2-2sbin/pfctl/pfctl_table.c
+3-0lib/libpfctl/libpfctl.h
+173-311 files not shown
+174-327 files

FreeBSD/src 754d2c6 — sys/conf NOTES

NOTES: Multiple schedulers can be compiled in at once

Mention that ULE is the default scheduler when multiple ones are
compiled in and how the tunable 'kern.sched.name' can be used to select
another one.

While here, regroup SCHED_ULE and SCHED_4BSD, as they control if the
respective scheduler instances are compiled in, putting SCHED_STATS
aside.

Reviewed by:    mchoo
Fixes:          75a66a92c92f ("- Add an option to compile in SCHED_STATS. ...")
Fixes:          1322760fd127 ("sys: enable both SCHED_ULE and SCHED_4BSD for some configs")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60014
DeltaFile
+10-7sys/conf/NOTES
+10-71 files

FreeBSD/src d972d83 — sys/conf NOTES, sys/x86/conf NOTES

NOTES: IPI_PREEMPTION: Fix documentation, applies to all architectures

Move its description into 'sys/conf/NOTES' and update it to match reality.

Reviewed by:    scheduler (mchoo)
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60013
DeltaFile
+0-7sys/x86/conf/NOTES
+6-0sys/conf/NOTES
+6-72 files

FreeBSD/src 406d665 — sys/conf options

sched: options: Regroup scheduler-related kernel options

This makes it easier to have a full list of them at a glance, and makes
for a natural place to add new ones.

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60010
DeltaFile
+8-6sys/conf/options
+8-61 files

FreeBSD/src 61ce736 — sys/conf NOTES

NOTES: SMP: Move PREEMPTION out of the debugging options section

It has been activated by default for more than 20 years.

Reviewed by:    mchoo, srcmgr (imp)
Fixes:          444ba945136b ("Switch the default scheduler to 4BSD...")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60012
DeltaFile
+5-4sys/conf/NOTES
+5-41 files

FreeBSD/src 7ce0ede — sys/i386/conf NOTES

i386 NOTES: Remove IPI_PREEMPTION remnant after move to x86 NOTES

Fixes:          1f38677ba40b ("x86 NOTES: Move shared options from amd/i386 NOTES to x86 NOTES")
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60011
DeltaFile
+0-3sys/i386/conf/NOTES
+0-31 files

FreeBSD/src 4672ad1 — sys/dev/usb/net usb_ethernet.c, sys/net80211 ieee80211_freebsd.c

SYSCTL(9): Retire SYSCTL_NODE_CHILDREN()

It does not provide value over the pre-existing SYSCTL_STATIC_CHILDREN()
macro, which is widely used in the tree, whereas SYSCTL_NODE_CHILDREN()
is not.

Reviewed by:    markj
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D60009
DeltaFile
+0-3sys/sys/sysctl.h
+1-1sys/net80211/ieee80211_freebsd.c
+1-1sys/dev/usb/net/usb_ethernet.c
+2-53 files

FreeBSD/src 736d730 — sys/cam/scsi scsi_cd.c

cam/cd: avoid integer divide fault in cdstart()

If something goes very badly (e.g. forcibly removing a medium while
the OS tries to start it), this could end up in params.blksize being 0
(and params.disksize 1).  Avoid an integer divide fault, panicking the
kernel, by bailing out before.

MFC after:      3 days

(cherry picked from commit 34ae0f7834d1bd6bb765d1c12e57e01e32b3e060)
DeltaFile
+10-0sys/cam/scsi/scsi_cd.c
+10-01 files

FreeBSD/src 90745f0 — sys/cam/scsi scsi_cd.c

cam/cd: avoid integer divide fault in cdstart()

If something goes very badly (e.g. forcibly removing a medium while
the OS tries to start it), this could end up in params.blksize being 0
(and params.disksize 1).  Avoid an integer divide fault, panicking the
kernel, by bailing out before.

MFC after:      3 days

(cherry picked from commit 34ae0f7834d1bd6bb765d1c12e57e01e32b3e060)
DeltaFile
+10-0sys/cam/scsi/scsi_cd.c
+10-01 files

FreeBSD/src 050683b — sys/dev/aq aq_main.c

aq: Report partial initialization failures to iflib

Stop initialization when hardware setup, ring initialization/start, or
datapath start fails. Run the existing best-effort stop/cache/reset
cleanup and report the failure through iflib_init_failed(). Do not keep
configuring later rings or publish the interface as running.

Reviewed by:    nprice
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59853
DeltaFile
+15-4sys/dev/aq/aq_main.c
+15-41 files

FreeBSD/src 4993c10 — sys/dev/aq aq_hw_llh.h aq_ring.c

aq: Invalidate the descriptor cache after stopping all rings

Atlantic controllers can retain receive descriptors and their data
addresses after their rings are disabled. Reusing or releasing those
mappings without invalidating the device cache has caused observed
IOMMU and SMMU faults in the referenced Linux reports (7a1bb49461b1,
ed4d81c4b3f2 and 7526183cfdbe).

Move global cache invalidation out of the per-ring stop routine. Disable
every ring first, toggle invalidation once, and wait for its completion
indication. Exclude Atlantic A0, as in the upstream workaround. Report
a completion timeout rather than silently discarding it.

Reviewed by:    nprice
MFC after:      2 weeks
Sponsored by:   BBOX.io
Differential Revision:  https://reviews.freebsd.org/D59852
DeltaFile
+25-0sys/dev/aq/aq_hw.c
+9-0sys/dev/aq/aq_hw_llh.c
+5-0sys/dev/aq/aq_hw_llh_internal.h
+0-4sys/dev/aq/aq_ring.c
+4-0sys/dev/aq/aq_main.c
+3-0sys/dev/aq/aq_hw_llh.h
+46-41 files not shown
+48-47 files

FreeBSD/src 6429199 — sys/powerpc/pseries phyp_llan.c

llan: byte swap the receive queue entries

The receive queue of a PAPR logical LAN is filled in by the hypervisor, so
its fields are big endian, but llan_intr() read the offset and the length of
each frame natively.  On a little endian kernel the length of a 134 byte
frame reads as 0x86000000, and ether_input() discards the mbuf because m_len
is not even large enough for an ethernet header.  No frame is ever received.

Reproduced on a POWER9 pseries guest with a spapr-vlan interface.  Before:

  llan0: discard frame w/o leading ethernet header (len -2046820352
      pkt len -2046820352)
  llan0 1500 <Link#1> 52:54:00:12:34:56  123  118  0  5838733312  7  0

that is 118 input errors out of 123 packets, dhclient(8) never completes and
ping(8) loses every packet, although transmit works because the transmit
path passes the lengths in hcall registers rather than through memory.
Afterwards the interface gets a DHCP lease and ping reports no loss.


    [3 lines not shown]
DeltaFile
+4-4sys/powerpc/pseries/phyp_llan.c
+4-41 files

FreeBSD/src 53edaad — sys/fs/cd9660 cd9660_vfsops.c, sys/fs/ext2fs ext2_vfsops.c

filesystems: use g_vfs_close_unlocked(9)

As result, we lock the devvp vnode around calls to VOP_FSYNC() on
unmount. For instance, the vn_fsync_buf() implementation of fsync()
needs exclusive lock on the vnode to guarantee that all dirty buffers
are indeed synced.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+3-12sys/fs/ext2fs/ext2_vfsops.c
+3-8sys/fs/udf/udf_vfsops.c
+3-8sys/fs/cd9660/cd9660_vfsops.c
+2-5sys/ufs/ffs/ffs_vfsops.c
+2-5sys/fs/msdosfs/msdosfs_vfsops.c
+13-385 files

FreeBSD/src e40c72c — sys/fs/nullfs null_vfsops.c, sys/kern vfs_subr.c vfs_mount.c

VFS: style

Wrap long lines, related to the nullfs mounts over regular files and
sockets type checks.  Also fix indent.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+6-3sys/kern/vfs_cache.c
+4-2sys/kern/vfs_mount.c
+2-1sys/fs/nullfs/null_vfsops.c
+1-1sys/kern/vfs_subr.c
+13-74 files

FreeBSD/src 30ad844 — sys/kern vnode_if.src vfs_subr.c

VFS: require locked vnode for fsync()

Stop exempting devfs nodes.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+8-12sys/kern/vfs_subr.c
+1-1sys/kern/vnode_if.src
+9-132 files

FreeBSD/src 87962e0 — sys/geom geom_vfs.h geom_vfs.c

g_vfs_close_unlocked(9): wrapper around g_vfs_close(9)

that locks both bo vnode and topology.

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D59932
DeltaFile
+13-0sys/geom/geom_vfs.c
+3-1sys/geom/geom_vfs.h
+16-12 files

FreeBSD/src fc544d3 — usr.sbin/makefs makefs.8, usr.sbin/makefs/cd9660 cd9660_eltorito.c

makefs: Remove unused "mac68k" support

Obtained from:  OpenBSD 4f3c7809d4013a2eb3e75fc5e7bd2d8ae1f41843
DeltaFile
+2-4usr.sbin/makefs/cd9660/cd9660_eltorito.c
+0-1usr.sbin/makefs/makefs.8
+2-52 files

FreeBSD/src dd16a5f — sys/kern kern_lockf.c

lockf: Do not block in vfs_busy()

A race is possible otherwise: vfs_busy() may return after an unmounted
filesystem has been removed from the global mount list.  That is,
vfs_busy() will block until vfs_mount_destroy() sets MNTK_REFEXPIRE, and
at that point the mountpoint has been removed from the mountlist, so
TAILQ_FOREACH can return an invalid value.

Simply do not block if the mountpoint is being unmounted.

Reviewed by:    kib
Fixes:          eca39864f702 ("Add sysctl KERN_LOCKF")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59982
DeltaFile
+1-1sys/kern/kern_lockf.c
+1-11 files

FreeBSD/src c14281f — tests/sys/kern unix_connectat.c

tests/sys/kern: skip unix_connectat fdescfs cases when fdescfs is missing

unix_connectat's fdescfs cases call mount_fdescfs(), which skipped on ENODEV.
nmount(2) never returns ENODEV: vfs_donmount() remaps the ENODEV from a failed
fdescfs module load to EINVAL with errmsg "Invalid fstype", so the skip never
fired and the cases failed on kernels without fdescfs.

Approved by:    ngie, asomers
Sponsored by:   Netflix
Differential Revision:  https://reviews.freebsd.org/D59227
DeltaFile
+1-3tests/sys/kern/unix_connectat.c
+1-31 files

FreeBSD/src 884b961 — usr.sbin/makefs makefs.h ffs.c

makefs: Make target filesystem inodes 64 bits

Obtained from:  NetBSD 2501d4dfda92, 7022656d8ab2
DeltaFile
+2-2usr.sbin/makefs/ffs.c
+1-1usr.sbin/makefs/makefs.h
+3-32 files

FreeBSD/src 742e58d — sys/vm vm_page.c

vm_page: Fix the error path in vm_page_alloc_contig_domain()

If we are inserting a run of pages into a VM object and fail at some
point due to a memory allocation failure, we have to free all of the
pages in the run.  We do that by resetting some fields and calling
vm_page_free_toq() on each page; this removes the page from the object
and frees it back to the buddy allocator.

If the page is supposed to be wired, we reset the reference count, but
this was done incorrectly: the VPRC_OBJREF flag must be retained as the
page still belongs to an object.  Resetting it to zero will cause a
panic in vm_page_free_prep(): vm_page_free_object_prep() will subtract
VPRC_OBJREF from the refcount, causing underflow, and
vm_page_free_prep() subsequently calls panic() if the refcount is
non-zero.

Reviewed by:    alc, kib
Fixes:          fee2a2fa3983 ("Change synchonization rules for vm_page reference counting.")
MFC after:      1 week

    [2 lines not shown]
DeltaFile
+1-1sys/vm/vm_page.c
+1-11 files

FreeBSD/src b9811d1 — usr.sbin/makefs cd9660.c

cd9660: merge level 1 and 2 filename conversion

Merge the nearly identical level 1 and level 2 filename conversion
functions and add output buffer bounds checking.

Always NUL-terminate the converted filename, allowing the redundant
memset() in cd9660_translate_node_common() to be removed.

Signed-off-by: Manuel Einfalt <einfalt1 at proton.me>
Reviewed by: emaste
Pull request: https://github.com/freebsd/freebsd-src/pull/2443
DeltaFile
+42-101usr.sbin/makefs/cd9660.c
+42-1011 files

FreeBSD/src d2cce99 — tools/build/options WITHOUT_GCC_BOOTSTRAP WITHOUT_GCC

build/options: Remove old, obolsete GCC options

These aren't referenced in the tree anymore, so remove them from
here. This doesn't chanage src.conf.5, so I didn't commit that file.

Sponsored by:           Netflix
DeltaFile
+0-3tools/build/options/WITH_GCC_BOOTSTRAP
+0-3tools/build/options/WITH_GCC
+0-1tools/build/options/WITHOUT_GCC_BOOTSTRAP
+0-1tools/build/options/WITHOUT_GCC
+0-84 files

FreeBSD/src b99595c — sys/dev/nvme nvme.h nvme_ctrlr.c

nvme: derive CC.CSS from CAP.CSS instead of hardcoding the NVM set

CC.CSS was always writting zero, which is a reserved encoding on a
controller that does not support the NVM command set.
Select 111b on admin-only controllers and 110b when the
I/O command set mechanism is available.

Reviewed by:    ngie, imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59628
DeltaFile
+11-2sys/dev/nvme/nvme_ctrlr.c
+9-0sys/dev/nvme/nvme.h
+20-22 files

FreeBSD/src 2c41f7d — sbin/nvmecontrol identify.c format.c, sys/dev/nvme nvme_ns.c nvme.h

nvme: honor FLBAS Format Index Upper when selecting the LBA format

Added nvme_ns_data_format_index() in the nvme, nda, and nvmf
host paths as well as nvmecontrol and camdd.

Reviewed by:    imp, adrian
Differential Revision:  https://reviews.freebsd.org/D59627
DeltaFile
+18-0sys/dev/nvme/nvme.h
+2-2sys/dev/nvmf/host/nvmf_ns.c
+2-2sys/dev/nvme/nvme_ns.c
+1-1sbin/nvmecontrol/identify.c
+1-1sbin/nvmecontrol/format.c
+1-1sbin/nvmecontrol/devlist.c
+25-72 files not shown
+27-98 files

FreeBSD/src 2300044 — usr.bin/gh-bc/tests dc_tests.sh bc_tests.sh

gh-bc/tests: run tests in parallel

Helps to mitigate failures due to timeout in CI on emulated architectures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16565/testReport/usr.bin.gh-bc/

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59547

(cherry picked from commit 1b9aea382e31f1c72bdfefbe01db51dc7bd60952)
DeltaFile
+1-1usr.bin/gh-bc/tests/dc_tests.sh
+1-1usr.bin/gh-bc/tests/bc_tests.sh
+2-22 files

FreeBSD/src 7564bb7 — usr.bin/gh-bc/tests dc_tests.sh bc_tests.sh

gh-bc/tests: run tests in parallel

Helps to mitigate failures due to timeout in CI on emulated architectures:
https://ci.freebsd.org/job/FreeBSD-main-riscv64-test/16565/testReport/usr.bin.gh-bc/

MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D59547

(cherry picked from commit 1b9aea382e31f1c72bdfefbe01db51dc7bd60952)
DeltaFile
+1-1usr.bin/gh-bc/tests/dc_tests.sh
+1-1usr.bin/gh-bc/tests/bc_tests.sh
+2-22 files