FreeBSD/src c6fe17aetc/mtree BSD.usr.dist BSD.lib32.dist

mtree: Keep mtree files indented with spaces

The mtree tool indents directory entries with 4 spaces.

Reviewed by:    imp
Fixes:          9cab9fde5eda ("virtual_oss: Port to base")
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D53979

(cherry picked from commit 3d91a746380e81c2089d8beaae28438867ae6dbf)
DeltaFile
+2-2etc/mtree/BSD.usr.dist
+2-2etc/mtree/BSD.lib32.dist
+4-42 files

FreeBSD/src 791c531share/man/man4 ufintek.4, sys/dev/usb/serial ufintek.c

Fintek F81232 USB to serial driver

Driver for Feature Integration Technology Inc. (aka Fintek)
F81232 USB to serial driver.

Reviewed by:    thj,adrian,UB
Approved by:    adrian
Differential Revision:  https://reviews.freebsd.org/D53893
DeltaFile
+759-0sys/dev/usb/serial/ufintek.c
+118-0share/man/man4/ufintek.4
+37-0sys/modules/ufintek/Makefile
+914-03 files

FreeBSD/src 639e651sys/netpfil/pf if_pfsync.c

pfsync: fix incorrect unlock during destroy

During pfsync_clone_destroy() we clean up pending packets. This
may involve calling pfsync_undefer() or callout_drain(). We may not
hold the bucket lock during callout_drain(), but must hold it during
pfsync_undefer().

We incorrectly always released the lock, leading to assertion failures
during cleanup if there were pending deferred packets.

MFC after:      1 week
Sponsored by:   Orange Business Services
DeltaFile
+2-2sys/netpfil/pf/if_pfsync.c
+2-21 files

FreeBSD/src 7a283c4sbin/pfctl pfctl.c, tests/sys/netpfil/pf table.sh

pfctl: restore '-Tload -f pf.conf' functionality

Allow only tables to be loaded from a file, rather than everything (i.e.
including options, rules).

Add a test case for this.

PR:             291318
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+35-0tests/sys/netpfil/pf/table.sh
+2-1sbin/pfctl/pfctl.c
+37-12 files

FreeBSD/src d6f1acfsys/netpfil/pf pf.c

pf: use correct sized variables in pf_change_icmp()

We're updating 16-bits checksums here, so should use a 16-bit integer,
not a 32-bit one.
No functional change.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2sys/netpfil/pf/pf.c
+2-21 files

FreeBSD/src dc6f609usr.sbin/moused/msconvd msconvd.8

msconvd(8): Drop mentions of Bus/InPort mouse support in manual page

mse(4) was removed long ago.

MFC after:      1 month
DeltaFile
+2-19usr.sbin/moused/msconvd/msconvd.8
+2-191 files

FreeBSD/src 732b4aacddl/contrib/opensolaris/tools/ctf/cvt barrier.c barrier.h

ctfmerge: fix segfault when building on macOS

The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:             290958
Reported by:    wosch
MFC after:      2 weeks
Reviewed by:    imp, markj
Differential Revision:  https://reviews.freebsd.org/D54018
DeltaFile
+3-23cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c
+2-7cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h
+5-302 files

FreeBSD/src e3201cesys/dev/atkbdc psm.c

psm: Fix three finger tap on elantech v4 touchpads

Fix an issue where a three finger tap would generate additional events
when fingers moved slightly during the tap.

Signed-off-by:  Robert Wahlberg <freebsd at robertwahlberg.se>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1792
Reviewed by:    wulf
MFC after:      1 month
DeltaFile
+7-0sys/dev/atkbdc/psm.c
+7-01 files

FreeBSD/src 8d9a5d4sys/dev/evdev input.h input-event-codes.h

evdev: Sync event codes with Linux kernel 6.18

MFC after:      1 month
DeltaFile
+44-29sys/dev/evdev/input.h
+27-1sys/dev/evdev/input-event-codes.h
+71-302 files

FreeBSD/src b6cad33share/man/man4 hgame.4 ps4dshock.4, sys/dev/hid ps4dshock.c hgame.c

hid: Make game controllers accessible to members of the game group

Their events have to be accessible by unprivileged users via e.g. libsdl.

MFC after:      1 month
DeltaFile
+8-1sys/dev/hid/ps4dshock.c
+4-3share/man/man4/hgame.4
+6-1sys/dev/hid/hgame.c
+4-1share/man/man4/ps4dshock.4
+4-1share/man/man4/xb360gp.4
+26-75 files

FreeBSD/src ecccc9dsys/dev/evdev evdev.c cdev.c

evdev: Allow setting of character device ownership and access mode

by device driver. That is required as game pad and joystick events have
to be accessible by ordinary users.

MFC after:      1 month
DeltaFile
+16-1sys/dev/evdev/evdev.c
+3-3sys/dev/evdev/cdev.c
+3-0sys/dev/evdev/evdev_private.h
+1-0sys/dev/evdev/evdev.h
+23-44 files

FreeBSD/src 882821bsys/kern kern_kexec.c

kexec: Change shutdown handler priority

The kexec shutdown handler should run after everything else, but before
the other platform shutdown handlers.  With (SHUTDOWN_PRI_DEFAULT - 150)
priority it would run before anything else, including all the device
shutdown handlers.  Change to (SHUTDOWN_PRI_LAST - 150) where it
belongs.

Sponsored by:   Hewlett Packard Enterprise
DeltaFile
+1-1sys/kern/kern_kexec.c
+1-11 files

FreeBSD/src f15e549sys/kern uipc_mqueue.c uipc_usrreq.c, sys/sys protosw.h mqueue.h

file: Add a fdclose method

Consider a program that creates a unix socket pair, transmits both
sockets from one to the other using an SCM_RIGHTS message, and then
closes both sockets without externalizing the message.  unp_gc() is
supposed to handle cleanup, but it is only triggered by uipc_detach(),
which runs when a unix socket is destroyed.  Because the two sockets are
internalized, their refcounts are positive, so uipc_detach() isn't
called.

As a result, a userspace program can create an unbounded amount of
garbage without triggering reclaim.  Let's trigger garbage collection
whenever a unix socket is close()d.  To implement this, add new a
fdclose file op and protocol op, and implement them accordingly.  Since
mqueuefs has a hack to hook into the file close path, convert it to use
the new op as well.

Now, userspace can't create garbage without triggering reclamation.


    [5 lines not shown]
DeltaFile
+28-31sys/kern/uipc_mqueue.c
+23-4sys/kern/uipc_usrreq.c
+12-0sys/kern/sys_socket.c
+2-6sys/kern/kern_descrip.c
+5-2sys/sys/protosw.h
+0-5sys/sys/mqueue.h
+70-482 files not shown
+74-498 files

FreeBSD/src f817011sys/netgraph ng_device.c

ng_device.c: improve compliance with style(9)

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1827

(cherry picked from commit bcdbeaeffccb65574ac06001888840d9a15f4edf)
DeltaFile
+34-29sys/netgraph/ng_device.c
+34-291 files

FreeBSD/src 57e4e7dsys/netgraph ng_device.c

ng_device: enable setting the device to non-blocking mode

Return success when FIONBIO or FIOASYNC ioctl are received in order to support
being set to non-blocking through fcntl(2). We return an error on FIOASYNC with
non-zero data argument since we do not support O_ASYNC.

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1827

(cherry picked from commit 9fadaee7ecce02ab11cfbb18ea63b9bf1fb11bfc)
DeltaFile
+34-7sys/netgraph/ng_device.c
+34-71 files

FreeBSD/src 626cf6cusr.sbin/bhyve net_backends.c bhyve.8

bhyve: add support for ng_device network backend

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>

Reviewed by:    markj
MFC after:      1 month
Sponsored by:   Defenso
Differential Revision:  https://reviews.freebsd.org/D52542
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1880

(cherry picked from commit 1aad95345237424918e5f6b18464df4dbc2aa1d8)
DeltaFile
+18-1usr.sbin/bhyve/net_backends.c
+18-1usr.sbin/bhyve/bhyve.8
+36-22 files

FreeBSD/src e1834bcsys/netgraph ng_device.c

ng_device: add kqueue support

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>

Sponsored by:   Defenso
Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D52541
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1880

(cherry picked from commit a505b80b2f038409300cd05e2ea95822942404e2)
DeltaFile
+123-3sys/netgraph/ng_device.c
+123-31 files

FreeBSD/src 0db8e36krb5/util/ss Makefile

krb5: Use sh to run mk_cmds

Otherwise etcupdate apparently can fail if its private object directory
under /var/db is in a filesystem mounted noexec.  We shouldn't be
building this target at all, but for now, just apply this workaround.

PR:             291043
Reviewed by:    ivy, cy, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D53861

(cherry picked from commit 673924122470463dfb9089e12b1b4496783a77b8)
DeltaFile
+1-1krb5/util/ss/Makefile
+1-11 files

FreeBSD/src 10a1541sys/netgraph ng_device.c

ng_device: replace dependency on vnode.h with fcntl.h

Update to current convention of using fcntl.h O_* flags instead of vnode.h IO_*
ones, as explained in sys/fs/devfs/devfs_vnops.c.

Signed-off-by: Quentin Thébault <quentin.thebault at defenso.fr>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1827

(cherry picked from commit 593d432e5852a254eeef83a8b1762492bb08668e)
DeltaFile
+2-2sys/netgraph/ng_device.c
+2-21 files

FreeBSD/src c782957sys/kern kern_jaildesc.c

jail: Make jaildesc_ops const

No functional change intended.

MFC after:      1 week

(cherry picked from commit e22cc773f1a926fed3558c51bf0dd7890af26a2b)
DeltaFile
+1-1sys/kern/kern_jaildesc.c
+1-11 files

FreeBSD/src 3bba28csys/tools/gdb freebsd.py pcpu.py

gdb: Fix some PEP 8 violations

Silence some warnings in my editor.  No functional change intended.

MFC after:      1 week

(cherry picked from commit 32605b159f3fea3a5d4710055681650f3de9ea68)
DeltaFile
+3-0sys/tools/gdb/freebsd.py
+3-0sys/tools/gdb/pcpu.py
+2-1sys/tools/gdb/vnet.py
+2-0sys/tools/gdb/acttrace.py
+10-14 files

FreeBSD/src 17fd778cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid tst.vfork.d, cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise tst.raise1.d tst.raise2.d

dtrace tests: Update names after the syscall::exit probe was renamed

MFC after:      1 week
Fixes:  e7e964cb2ebd ("syscalls: normalize _exit(2) declerations")
DeltaFile
+1-1cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.vfork.d
+1-1cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
+1-1cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
+1-1cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d
+4-44 files

FreeBSD/src dfd35cdcddl/contrib/opensolaris/lib/libdtrace/sparc dt_isadep.c regs.d

libdtrace: remove sparc code

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1907
DeltaFile
+0-338cddl/contrib/opensolaris/lib/libdtrace/sparc/dt_isadep.c
+0-120cddl/contrib/opensolaris/lib/libdtrace/sparc/regs.d
+0-4582 files

FreeBSD/src d11ff7fcddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace exception.lst, cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety tst.vahole.d

opensolaris: remove references to sparc

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1907
DeltaFile
+3-14cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c
+0-13cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c
+0-9cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/prov.h
+0-4cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.vahole.d
+0-4cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c
+0-1cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst
+3-456 files

FreeBSD/src 507cfc4cddl/contrib/opensolaris/cmd/dtrace dtrace.1

dtrace.1: remove sparc

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1907
DeltaFile
+1-5cddl/contrib/opensolaris/cmd/dtrace/dtrace.1
+1-51 files

FreeBSD/src d667cc7cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/arrays tst.uregsarray.d, cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid tst.br.s tst.branch.d

dtrace: remove sparc tests

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1907
DeltaFile
+0-132cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/usdt/tst.tailcall.ksh
+0-87cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.trapstat.ksh
+0-85cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/arrays/tst.uregsarray.d
+0-81cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/ustack/tst.helper.c
+0-81cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.br.s
+0-78cddl/contrib/opensolaris/cmd/dtrace/test/tst/sparc/pid/tst.branch.d
+0-54416 files not shown
+0-1,18522 files

FreeBSD/src 72b1141sys/kern kern_linker.c

linker: Avoid invoking eventhandlers on incompletely loaded files

We do not invoke the kld_load eventhandler until after the file is fully
linked, so don't invoke the kld_unload_try or kld_unload event handlers
unless the file is fully linked either.

In my case, the dtrace SDT kld_unload_try handler was running before
relocations were processed against the file, and that caused problems
when sdt_kld_unload_probes() accesses elements of a linker set.

Move the kld_unload handler invocation earlier, to after sysuninits have
been run.  This is a bit more consistent with the kld_load handler.

PR:             291238
Reviewed by:    imp, emaste, kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D53938
DeltaFile
+8-7sys/kern/kern_linker.c
+8-71 files

FreeBSD/src 5f529f9lib/libc/tests/stdbit Makefile

libc: Fix TESTSDIR for new stdbit tests

Otherwise the directory created by etc/mtree/BSD.tests.dist, which is
where these belong, and referred to by the generated Kyuafile for
/usr/tests/lib/libc (via stdbit's existence in TESTS_SUBDIRS), ends up
empty with no Kyuafile, which is an error for kyua.

Reported by:    kp
Fixes:          2fb8cbc6ef1b ("libc/tests: add stdbit test framework and unit tests")
DeltaFile
+2-0lib/libc/tests/stdbit/Makefile
+2-01 files

FreeBSD/src c1e033ccontrib/libarchive NEWS, contrib/libarchive/libarchive archive_read_disk_posix.c archive_write_set_format_xar.c

libarchive: merge from vendor branch

libarchive 3.8.4

Important bugfixes:
     #2787 bsdtar: Fix zero-length pattern issue
     #2797 lib: Fix regression introduced in libarchive 3.8.2
                when walking enterable but unreadable directories

Obtained from:  libarchive
Vendor commit:  d114ceee6de08a7a60ff1209492ba38bf9436f79
MFC after:      1 week
DeltaFile
+11-14contrib/libarchive/libarchive/archive_read_disk_posix.c
+12-7contrib/libarchive/tar/subst.c
+6-6contrib/libarchive/libarchive/archive_write_set_format_xar.c
+7-1contrib/libarchive/tar/test/test_option_s.c
+5-3contrib/libarchive/NEWS
+3-3contrib/libarchive/libarchive/test/test_write_disk_perms.c
+44-3411 files not shown
+63-5317 files

FreeBSD/src bf3359d. Makefile.am NEWS, libarchive archive_read_disk_posix.c archive_write_set_format_xar.c

Update vendor/libarchive to 3.8.4

Important bugfixes:
 #2787 bsdtar: Fix zero-length pattern issue
 #2797 lib: Fix regression introduced in libarchive 3.8.2
            when walking enterable but unreadable directories

Obtained from:  libarchive
Vendor commit:  d114ceee6de08a7a60ff1209492ba38bf9436f79
DeltaFile
+120-103Makefile.am
+11-14libarchive/archive_read_disk_posix.c
+12-7tar/subst.c
+6-6libarchive/archive_write_set_format_xar.c
+7-1tar/test/test_option_s.c
+5-3NEWS
+161-13416 files not shown
+191-16422 files