FreeBSD/src 0979bfbsys/dev/usb/net if_smsc.c

smsc: Add missing newline to PHY timeout error printf
DeltaFile
+1-1sys/dev/usb/net/if_smsc.c
+1-11 files

FreeBSD/src 2fef18fusr.sbin/certctl certctl.c certctl.8, usr.sbin/certctl/tests certctl_test.sh

certctl: Unstickify (un)trusted certificates

Ever since certctl was rewritten in C, the rehash command has reingested
TRUSTDESTDIR / UNTRUSTDESTDIR in addition to TRUSTPATH / UNTRUSTPATH.
This seemed like a good idea at the time but was, in retrospect, a
mistake, as it means a (un)trusted certificate remains (un)trusted
forever (or at least until it expires) even if it is removed from
(UN)TRUSTPATH.  Among other issues, it causes ports QA to fail for any
port that either installs certificates or depends on a port that does.

Although this behavior was undocumented, the change may surprise users
who have added certificates manually, so update the manual page to point
it out and add prominent warnings to the trust and untrust commands.

PR:             290078
MFC after:      1 week
Reviewed by:    kevans, bcr
Differential Revision:  https://reviews.freebsd.org/D56617
DeltaFile
+52-29usr.sbin/certctl/certctl.c
+13-2usr.sbin/certctl/certctl.8
+2-1usr.sbin/certctl/tests/certctl_test.sh
+67-323 files

FreeBSD/src c24b1d9lib/libpfctl libpfctl.c, sbin/pfctl pfctl.c

pfctl: handle errors from PFNL_CMD_GETSTATES

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+3-2sbin/pfctl/pfctl.c
+1-1lib/libpfctl/libpfctl.c
+4-32 files

FreeBSD/src a0e4c65sys/netpfil/pf pf_ioctl.c, tests/sys/netpfil/pf match.sh

pf: do not reject rules with colliding hashes

We insert rules in pf_krule_global solely for the benefit of the
'keepcounters' feature. Failing to insert (beause the rule hash
collides, or an identical rule already exists) would be worse than
restoring counts to the wrong rule (or failing to restore them at all).

PR:             282863, 294860, 294859, 294858
MFC after:      3 days
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D56745
DeltaFile
+36-0tests/sys/netpfil/pf/match.sh
+8-16sys/netpfil/pf/pf_ioctl.c
+44-162 files

FreeBSD/src 8334d46sys/kern sys_process.c

Fix typo in curthread
DeltaFile
+1-1sys/kern/sys_process.c
+1-11 files

FreeBSD/src 7619d14sys/dev/acpi_support acpi_panasonic.c

acpi_panasonic: acquire serial lock before calling hkey_sound_mute in shutdown

acpi_panasonic_shutdown() calls hkey_sound_mute() without holding
the ACPI serial lock. Every other call site holds
`ACPI_SERIAL_BEGIN(panasonic)` before calling it, as the locking
model is caller-owned.

This seems to affect the whole Panasonic Toughtbook lineup btw.

Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D56718
DeltaFile
+2-0sys/dev/acpi_support/acpi_panasonic.c
+2-01 files

FreeBSD/src fd386e7sbin/md5/tests md5_test.sh

md5: Don't generate test cases just to skip them

Don't waste time generating Perl test cases for algorithms that are not
supported in Perl mode only to skip them when they are run.

MFC after:      1 week
Reviewed by:    ngie
Differential Revision:  https://reviews.freebsd.org/D56687
DeltaFile
+6-6sbin/md5/tests/md5_test.sh
+6-61 files

FreeBSD/src 49e496dusr.bin/stat/tests stat_test.sh

stat: Set the timezone before testing -t flag

The test assumes UTC, which is what I use on my development systems and
clearly what is used on our CI runners.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D56836
DeltaFile
+2-2usr.bin/stat/tests/stat_test.sh
+2-21 files

FreeBSD/src 89c883csys/dev/mii miidevs smscphy.c

mii: Fix SMSC name

The LAN8700 / LAN8710 PHYs were Standard Microsystems Corporation (SMSC)
parts.  I presume SMC was chosen as an abbreviation, but the company
always used SMSC as its short name.

SMSC was acquired by Microchip in 2012.  I kept the pre-acquisition
name, as NetBSD (from where we obtained miidevs) uses SMSC.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D56819
DeltaFile
+4-4sys/dev/mii/miidevs
+2-2sys/dev/mii/smscphy.c
+6-62 files

FreeBSD/src adad686sys/kern sys_process.c

mac_veriexec_priv_check block proc_write_*regs*

Writing to /proc/$pid/regs can also be leveraged to mess with memory.

Only allow a trusted process to do so.

Sponsored by: Hewlett Packard Enterprise Development LP.

Reviewed by:    olce
Differential Revision:  https://reviews.freebsd.org/D56763
DeltaFile
+16-3sys/kern/sys_process.c
+16-31 files

FreeBSD/src bf2c6d2lib/libusb libusb10_hotplug.c libusb.h

Revert "libusb: change callback register handler to int"

This reverts commit ce9ced951a0b9d004a3b007d4ac6e9087a1301a2.

We should handle backward compatibility before introducing this patch as
people may rely on old ABI.
DeltaFile
+18-32lib/libusb/libusb10_hotplug.c
+3-2lib/libusb/libusb.h
+0-2lib/libusb/libusb10.h
+0-1lib/libusb/libusb10.c
+21-374 files

FreeBSD/src 0627136lib/libusb libusb10.c

libusb: fix incorrect status type when completion on cancel the events

Reviewed by:    lwhsu, markj
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51736
DeltaFile
+2-2lib/libusb/libusb10.c
+2-21 files

FreeBSD/src ce9ced9lib/libusb libusb10_hotplug.c libusb.h

libusb: change callback register handler to int

libusb upstream uses int for register handler. This causes some library
user (like pyusb) to assume that we have int in all implementations and
therefore provides a 4 byte storage only. This causes Segmentation
fault as we will right the pointer.

Reviewed by:    adrian
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54211
DeltaFile
+32-18lib/libusb/libusb10_hotplug.c
+2-3lib/libusb/libusb.h
+2-0lib/libusb/libusb10.h
+1-0lib/libusb/libusb10.c
+37-214 files

FreeBSD/src efc0cedsys/modules/ath10k Makefile, sys/modules/ath11k Makefile

ath{10,11,12}k: Add missing header in Makefile

Reviewed by:    bz
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56693
DeltaFile
+2-0sys/modules/ath10k/Makefile
+2-0sys/modules/ath11k/Makefile
+2-0sys/modules/ath12k/Makefile
+6-03 files

FreeBSD/src 2610029lib/libusb libusb.h

libusb: Add libusb_endpoint_transfer_type enum

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
DeltaFile
+7-0lib/libusb/libusb.h
+7-01 files

FreeBSD/src 5f901e1lib/libifconfig libifconfig_bridge.c

libifconfig: Skip bridge VLAN config for span members

bridge(4) doesn't support BRDGGIFVLANSET for span members, which
means if a span interface is configured, libifconfig will fail to
fetch bridge members.  Skip this for IFBIF_SPAN members.

PR:     292634
MFC after:      3 days
Reported by:    Emrion <kmachine at free.fr>
Reviewed by:    pouria, zlei
Approved by:    re (cperciva)
Sponsored by:   https://www.patreon.com/bsdivy
Differential Revision:  https://reviews.freebsd.org/D56694

(cherry picked from commit 454322c08b8aa181939c8d920472f03cfd591032)
(cherry picked from commit 0a919e2a9265b5cdaeb2c5d51c29791b4eb7335c)
DeltaFile
+5-0lib/libifconfig/libifconfig_bridge.c
+5-01 files

FreeBSD/src 9f2ad7csbin/init init.c init.8

init: allow to specify a custom path for rc(8)

This is useful for testing alternative service managers
without modifying /etc/rc

MFC After:      1 weeks
Reviewed by:    kib
Differential Revision:  https://reviews.freebsd.org/D56828
DeltaFile
+15-3sbin/init/init.c
+9-1sbin/init/init.8
+24-42 files

FreeBSD/src c8167ebsys/dev/virtio/network if_vtnet.c if_vtnetvar.h

Revert "virtio_net: Use bus_dma for command/ack buffers"

This reverts commit b5bad6df467cc95bea641afe674c55cd5b9f1510.

Revert until we can fix reported issues
DeltaFile
+58-278sys/dev/virtio/network/if_vtnet.c
+0-6sys/dev/virtio/network/if_vtnetvar.h
+58-2842 files

FreeBSD/src dc00f11sys/dev/virtio/network if_vtnet.c if_vtnetvar.h

Revert "virtio_net: Use bus_dma for rxq/txq buffers"

This reverts commit c16c95192f01237a876eb7bc336e3bbda9310171.

Revert until we can fix reported issues
DeltaFile
+17-258sys/dev/virtio/network/if_vtnet.c
+0-10sys/dev/virtio/network/if_vtnetvar.h
+17-2682 files

FreeBSD/src bf6d00asys/netpfil/pf if_pfsync.c

pfsync: reject invalid SCTP states

SCTP states should always have a src scrub object associated with them.
Crafted pfsync packets might not have this, leading to us derferencing a
NULL pointer on cleanup.

Validate the pfsync state insertion packet to make sure this is correct.

PR:             294989
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+7-0sys/netpfil/pf/if_pfsync.c
+7-01 files

FreeBSD/src 9fe189csys/netpfil/pf pf.c

pf: improve ASCONF chunk validation

When processing an ASCONF chunk we failed to verify that the chunk
length was at least 8 bytes. As a result we might end up passing a
negative length to pf_multihome_scan(). Fortunately this merely meant
the function did nothing, but we should discard such invalid packets, so
explicitly check for this.

MFC after:      1 week
Reported by:    Mark Johnston
Sponsored by:   Orange Business Services

(cherry picked from commit bea1c2fcd7839fd90a8ce96d6dc6a033779bc3c2)
DeltaFile
+7-0sys/netpfil/pf/pf.c
+7-01 files

FreeBSD/src 730fb48sys/netpfil/pf pf.c

pf: improve ASCONF chunk validation

When processing an ASCONF chunk we failed to verify that the chunk
length was at least 8 bytes. As a result we might end up passing a
negative length to pf_multihome_scan(). Fortunately this merely meant
the function did nothing, but we should discard such invalid packets, so
explicitly check for this.

MFC after:      1 week
Reported by:    Mark Johnston
Sponsored by:   Orange Business Services

(cherry picked from commit bea1c2fcd7839fd90a8ce96d6dc6a033779bc3c2)
DeltaFile
+7-0sys/netpfil/pf/pf.c
+7-01 files

FreeBSD/src 6f84579sys/kern vfs_export.c vfs_subr.c, sys/sys mount.h

nfs_pub: move from vfs_subr.c to vfs_export.c

nfs_pub is used only in vfs_export.c.

Reviewed by:    kib, rmacklem
Differential Revision:  https://reviews.freebsd.org/D56777
DeltaFile
+3-0sys/kern/vfs_export.c
+0-3sys/kern/vfs_subr.c
+0-1sys/sys/mount.h
+3-43 files

FreeBSD/src 89b9793usr.sbin/bsdinstall Makefile FreeBSD-base.conf.in

bsdinstall: Always use pkg.FreeBSD.org

The FreeBSD-base bits are accessible via pkg.FreeBSD.org, even for
releases, so there is no need to point at pkgbase.FreeBSD.org.

MFC after:      3 days
DeltaFile
+1-5usr.sbin/bsdinstall/Makefile
+1-1usr.sbin/bsdinstall/FreeBSD-base.conf.in
+2-62 files

FreeBSD/src 8e8d878release/packages create-sets.sh

packages: Make create-sets.sh more robust during release

Commit d1c176fedfc9 made create-sets.sh exit when it encounters an
error, instead of creating an empty repository.  However, this turns
out to cause some issues:

1. A package not having any sets is considered an error, but during
   the release build, we stuff a 'pkg' package into the repository
   which doesn't have any sets, which causes a failure.  Avoid this
   by simply ignoring the pkg package.

2. No error was printed in this case, which made the problem hard
   to diagnose.  Add an explicit error message.

3. A similar problem occurred running on a repository which already
   contained sets, which is not usually done during the build, but
   is not necessarly an inappropriate thing to do.  Fix this one by
   ignoring set packages when looking for sets.


    [11 lines not shown]
DeltaFile
+48-4release/packages/create-sets.sh
+48-41 files

FreeBSD/src 03e9e83sys/fs/nfsserver nfs_nfsdserv.c

nfs_nfsdserv.c: Clip number of callback slots

The client tells the server how many callback slots
it can handle in the callback session.  However, the
NFSv4.1/4.2 server can only handle a maximum of
NFSV4_SLOTS slots.  This patch clips the client's
value to that, to avoid using too high a slot#
for a callback.

Fortunately, I do not know of an extant client that
specifies a value greater than NFSV4_SLOTS, so this
patch is not really needed, as yet.  Also, the client
rarely uses a slot# above 0 when doing callbacks.

MFC after:      2 weeks
DeltaFile
+8-0sys/fs/nfsserver/nfs_nfsdserv.c
+8-01 files

FreeBSD/src eb3b130. libsmart.c freebsd_dev.c

Import smart revision 1.0.2

The smart command allows the user to monitor the various information
reported by Self-Monitoring, Analysis and Reporting Technology (SMART)
present on most ATA, SCSI, and NVMe storage media.
DeltaFile
+1,359-0libsmart.c
+828-0freebsd_dev.c
+334-0smart.c
+245-0smart.8
+174-0libsmart.h
+158-0libsmart_desc.c
+3,098-06 files not shown
+3,379-012 files

FreeBSD/src 658bb99sys/compat/linuxkpi/common/include/linux module.h

linuxkpi: Implement `module_*()` APIs as static functions

This fixes an "unused variable" warning when building DRM drivers.

Reviewed by:    emaste
MFC after:      3 days
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D56780
DeltaFile
+8-3sys/compat/linuxkpi/common/include/linux/module.h
+8-31 files

FreeBSD/src c295f02share/man/man9 zone.9

zone.9: Add a missing newline

MFC after:      3 days
DeltaFile
+1-0share/man/man9/zone.9
+1-01 files

FreeBSD/src 41b0393tests/sys/kern execve_overflow.c Makefile

tests: Add a simple regression test for an execve overflow bug

MFC after:      2 weeks
DeltaFile
+46-0tests/sys/kern/execve_overflow.c
+1-0tests/sys/kern/Makefile
+47-02 files