FreeBSD/src 7749de2share/man/man4 vt.4, sys/dev/vt vt_core.c

Add new kern.vt.slow_down tunable.

On a laptop with no other console devices than the screen, things
scroll of the screen faster than eye or camera can capture it.

This tunable slows the console down and makes it update synchronously,
so console output continues when timers or interrupts do not.

Differential Revision:  https://reviews.freebsd.org/D47710
DeltaFile
+11-0share/man/man4/vt.4
+9-0sys/dev/vt/vt_core.c
+20-02 files

FreeBSD/src e012d79sys/netpfil/ipfw ip_fw_table_algo.c

ipfw: fix order of memcpy arguments.

This fixes `ipfw table N lookup addr` command for MAC tables.

MFC after:      1 week
DeltaFile
+1-1sys/netpfil/ipfw/ip_fw_table_algo.c
+1-11 files

FreeBSD/src 253a1fasys/dev/mlx5 driver.h, sys/dev/mlx5/mlx5_core mlx5_eq.c

mlx5: Fix handling of port_module_event

Remove the array of port module status and instead save module status
and module number.

At boot, for each PCI function driver get event from fw about module
status. The event contains module number and module status. Driver
stores module number and module status..  When user (ifconfig) ask for
modules information, for each pci function driver first queries fw to
get module number of current pci function, then driver compares the
module number to the module number it stored before and if it matches
and module status is "plugged and enabled" then driver queries fw for
the eprom information of that module number and return it to the
caller.

In fact fw could have concluded that required module number of the
current pci function, but fw is not implemented this way. current
design of PRM/FW is that MCIA register handling is only aware of
modules, not the pci function->module connections.  FW is designed to

    [8 lines not shown]
DeltaFile
+5-5sys/dev/mlx5/mlx5_core/mlx5_eq.c
+2-1sys/dev/mlx5/driver.h
+7-62 files

FreeBSD/src 0d38b0bsys/dev/mlx5/mlx5_en mlx5_en_hw_tls.c

mlx5en: fix the sign of mlx5e_tls_st_init() error, convert from Linux to BSD

Sponsored by:   NVidia networking
MFC after:      1 week
DeltaFile
+2-2sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
+2-21 files

FreeBSD/src 7fbc896sys/vm vm_page.c

vm_page.c: remove transiently defined vm_page_free_toq_impl() prototype

Sponsored by:   The FreeBSD Foundation
DeltaFile
+0-1sys/vm/vm_page.c
+0-11 files

FreeBSD/src 64bf5a4sys/dev/mlx5/mlx5_en mlx5_en_hw_tls.c

mlx5_en: style function prototype

Sponsored by:   NVidia networking
MFC after:      2 weeks
DeltaFile
+1-2sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
+1-21 files

FreeBSD/src 81b38bcsys/dev/mlx5/mlx5_en mlx5_en_hw_tls.c en_hw_tls.h

mlx5e tls: Ensure all allocated tags have a hw context associated

Ensure all allocated tags have a hardware context associated.
The hardware context allocation is moved into the zone import
routine, as suggested by kib.  This is safe because these zone
allocations are always done in a sleepable context.

I have removed the now pointless num_resources tracking,
and added sysctls / tunables to control UMA zone limits
for these tls tags, as well as a tunable to let the
driver pre-allocate tags at boot.

MFC after:      2 weeks
DeltaFile
+94-38sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
+1-1sys/dev/mlx5/mlx5_en/en_hw_tls.h
+95-392 files

FreeBSD/src 33c11ceshare/man/man4 igc.4

igc.4: Remove non-existent timer tunables

These were removed in a40ecb6f7405 because they do not apply to igc
hardware which uses EITR for interval timing.

Sponsored by:   BBOX.io

(cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78)
DeltaFile
+0-15share/man/man4/igc.4
+0-151 files

FreeBSD/src 974d9c5sys/dev/ixgbe ixgbe_phy.c

ixgbe: Add support for 1Gbit Active DAC links

1Gbit also emperically works on Active DACs.

Sponsored by:   BBOX.io

(cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220)
DeltaFile
+2-1sys/dev/ixgbe/ixgbe_phy.c
+2-11 files

FreeBSD/src cb8d81ashare/man/man4 igc.4

igc.4: Remove non-existent timer tunables

These were removed in a40ecb6f7405 because they do not apply to igc
hardware which uses EITR for interval timing.

Sponsored by:   BBOX.io

(cherry picked from commit 8de007ad19dcda5bea9bac9fb2c140e4ed62ba78)
DeltaFile
+0-15share/man/man4/igc.4
+0-151 files

FreeBSD/src 6739fd9sys/dev/ixgbe ixgbe_phy.c

ixgbe: Add support for 1Gbit Active DAC links

1Gbit also emperically works on Active DACs.

Sponsored by:   BBOX.io

(cherry picked from commit e38f9257c3fac5cb5a62f62c424a976446ae1220)
DeltaFile
+2-1sys/dev/ixgbe/ixgbe_phy.c
+2-11 files

FreeBSD/src 1905ce3sys/cddl/contrib/opensolaris/uts/common/sys dtrace_impl.h

dtrace: Remove an unused typedef

No functional change intended.

MFC after:      1 week
DeltaFile
+0-4sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h
+0-41 files

FreeBSD/src fdeb273sys/cddl/dev/dtrace/amd64 dtrace_isa.c, sys/cddl/dev/fbt fbt.c

dtrace: Add some more annotations for KMSAN

- Don't allow FBT and kinst to instrument the KMSAN runtime.
- When fetching data from the traced thread's stack, mark it as
  initialized.  It may well be uninitialized, but as dtrace permits
  arbitrary inspection of kernel memory, it isn't very useful to raise
  KMSAN reports.
- Mark data copied in from userspace as initialized, as we do for
  copyin() etc. using interceptors.

MFC after:      2 weeks
DeltaFile
+45-10sys/cddl/dev/dtrace/amd64/dtrace_isa.c
+7-0sys/cddl/dev/fbt/fbt.c
+7-0sys/cddl/dev/kinst/kinst.c
+59-103 files

FreeBSD/src e0bf7bcsys/netpfil/pf pf.c

pf: reduce indentation level in pf_dummynet_route()

Reverse the first if() in pf_dummynet_route() to avoid an unneeded level of
indendation.

No functional change.

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

FreeBSD/src 1538da1usr.sbin/makefs makefs.8

makefs.8: Remove a warning about makefs -t zfs being experimental

This should have been done with commit d9fe71828797 but was missed.

Fixes:  d9fe71828797 ("makefs: Remove the warning printed when makefs -t zfs is used")
MFC after:      3 days

(cherry picked from commit e19c607ff9b2b5d55664fd13e5fd9814e3279ffd)
DeltaFile
+0-3usr.sbin/makefs/makefs.8
+0-31 files

FreeBSD/src 3126ebasys/dev/usb usbdevs, sys/dev/usb/input ukbd.c

ukbd: Enable ukbd_apple_swap for all Apple ISO keyboards

Key code swapping between [<>] and [^°] key is enabled for all Apple ISO
type keyboards.  Before, swapping was enabled when the Eject key was
detected in HID usage.  This did not correlate well with the swapped
keys presence.

usbdevs file is extended by several Apple keyboard models to support ISO
model identification.

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1506

(cherry picked from commit 541e7a98b762916cd951a64dd7e77efd51dfa8dc)
DeltaFile
+66-6sys/dev/usb/input/ukbd.c
+42-0sys/dev/usb/usbdevs
+108-62 files

FreeBSD/src a525cdcsys/netinet6 in6_pcb.h in6_pcb.c

inpcb: Constify address parameters to in6 pcb lookup routines

No functional change intended.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield

(cherry picked from commit 52ef944b0f6f1df8eebe1cb877c6aadb1c247da0)
DeltaFile
+8-14sys/netinet6/in6_pcb.h
+8-8sys/netinet6/in6_pcb.c
+16-222 files

FreeBSD/src 0e29038share/man/man4 pf.4, share/man/man5 pf.conf.5

pf: Add a sysctl to limit work done for rdr source port rewriting

It was pointed out that the current approach of exhaustively searching
for a free source port might be very time consuming.  Limit the amount
of work that we might do before giving up.

Reviewed by:    kp
Reported by:    Eirik Øverby <ltning-freebsd at anduin.net>
MFC after:      3 months
Sponsored by:   Klara, Inc.
Sponsored by:   Modirum
Differential Revision:  https://reviews.freebsd.org/D46495

(cherry picked from commit 339a1977c32414f3d23733504955245ca6f3802d)
DeltaFile
+16-2sys/netpfil/pf/pf_lb.c
+5-1share/man/man5/pf.conf.5
+5-0share/man/man4/pf.4
+26-33 files

FreeBSD/src 9e67981sys/netinet6 in6.h in6.c

in6: Constify some sockaddr conversion functions

No functional change intended.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield

(cherry picked from commit 3bb15ffc4ab4bfcd4c1bd700a64b3b5ed95389c3)
DeltaFile
+3-3sys/netinet6/in6.h
+2-2sys/netinet6/in6.c
+5-52 files

FreeBSD/src c769f45sbin/gvinum gvinum.8

gvinum: Postpone removal to FreeBSD 15

It was not removed for FreeBSD 14.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit a5f7047f28654aa297c57a9d24f6d1408641b975)
DeltaFile
+1-1sbin/gvinum/gvinum.8
+1-11 files

FreeBSD/src 6643965lib/libc/gen getentropy.c

getentropy: restore unistd.h include

It is needed for SSP support.

Reported by: netchild, Shawn Webb
Fixes: 62dab3d016ab ("getentropy: Remove fallback code")
Sponsored by: The FreeBSD Foundation
DeltaFile
+1-0lib/libc/gen/getentropy.c
+1-01 files

FreeBSD/src c364608lib/libc Makefile

libc: enable initial-exec (IE) as default thread-local storage model on arm

As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this
patch enables IE as default thread-local storage model in libc on arm.

Reviewed by:    kib
Approved by:    kp (mentor)
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D42445

(cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a)
DeltaFile
+0-4lib/libc/Makefile
+0-41 files

FreeBSD/src e10cca6libexec/rtld-elf/arm reloc.c

rtld/arm: fix initial-exec (IE) thread-local storage relocation

net/frr[89] revealed an interesting edge-case on arm when dynamically
linking a shared library that declares more than one static TLS variable
with at least one  using the "initial-exec" TLS model. In the case
of frr[89], this library was libfrr.so which essentially does the
following:

        #include <stdio.h>

        #include "lib.h"

        static __thread int *a
                __attribute__((tls_model("initial-exec")));

        void lib_test()
        {
                static __thread int b = -1;


    [37 lines not shown]
DeltaFile
+5-2libexec/rtld-elf/arm/reloc.c
+5-21 files

FreeBSD/src f424c4alib/libc Makefile

libc: enable initial-exec (IE) as default thread-local storage model on arm

As suggested by jrtc27@ in https://reviews.freebsd.org/D42415, this
patch enables IE as default thread-local storage model in libc on arm.

Reviewed by:    kib
Approved by:    kp (mentor)
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D42445

(cherry picked from commit 6e5b1ff71e01bd48172483cb6df921f84300ea3a)
DeltaFile
+0-4lib/libc/Makefile
+0-41 files

FreeBSD/src d39e0bdlibexec/rtld-elf/arm reloc.c

rtld/arm: fix initial-exec (IE) thread-local storage relocation

net/frr[89] revealed an interesting edge-case on arm when dynamically
linking a shared library that declares more than one static TLS variable
with at least one  using the "initial-exec" TLS model. In the case
of frr[89], this library was libfrr.so which essentially does the
following:

        #include <stdio.h>

        #include "lib.h"

        static __thread int *a
                __attribute__((tls_model("initial-exec")));

        void lib_test()
        {
                static __thread int b = -1;


    [37 lines not shown]
DeltaFile
+5-2libexec/rtld-elf/arm/reloc.c
+5-21 files

FreeBSD/src 07593d1sys/dev/efidev efirt.c

efirt: Fix the TDP_EFIRT assertion

Fixes:  a03957a706a0 ("efirt: mark dynamic region executing the RT code with the TDP_EFIRT flag")
DeltaFile
+1-1sys/dev/efidev/efirt.c
+1-11 files

FreeBSD/src 5d12db2sys/cddl/contrib/opensolaris/uts/common/dtrace dtrace.c, sys/cddl/dev/dtrace dtrace_load.c dtrace_ioctl.c

dtrace: Avoid excessive pcpu allocations

We were previously allocating MAXCPU structures for several purposes,
but this is generally unnecessary and is quite excessive, especially
after MAXCPU was bumped to 1024 on amd64 and arm64.  We already are
careful to allocate only as many per-CPU tracing buffers as are needed;
extend this to other allocations.

For example, in a 2-vCPU VM, the size of a consumer state structure
drops from 64KB to 128B.  The size of the per-consumer `dts_buffer` and
`dts_aggbuffer` arrays shrink similarly.  Ditto for pre-allocations of
local and global D variable storage space.

MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47667
DeltaFile
+30-36sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+2-2sys/cddl/dev/dtrace/dtrace_load.c
+1-1sys/cddl/dev/dtrace/dtrace_ioctl.c
+33-393 files

FreeBSD/src 4efe531sys/kern vfs_bio.c, sys/sys buf.h

buf: Add a runningbufclaim() helper

No functional change intended.

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47696
DeltaFile
+12-3sys/kern/vfs_bio.c
+4-7sys/ufs/ffs/ffs_snapshot.c
+4-4sys/vm/vnode_pager.c
+1-3sys/ufs/ffs/ffs_vfsops.c
+1-1sys/sys/buf.h
+22-185 files

FreeBSD/src cc3da19sys/cddl/dev/dtrace/amd64 dtrace_asm.S dtrace_subr.c

dtrace/amd64: Make invop providers usable with KMSAN enabled

- Use a fresh context when entering dtrace_invop() via a breakpoint
  exception.
- Mark the #BP trapframe as initialized.

MFC after:      2 weeks
DeltaFile
+8-0sys/cddl/dev/dtrace/amd64/dtrace_asm.S
+3-0sys/cddl/dev/dtrace/amd64/dtrace_subr.c
+11-02 files

FreeBSD/src 418d8f0sys/cddl/dev/dtrace/x86 dis_tables.c

dtrace: Address KMSAN warnings in dtrace_disx86

wbit was not being initialized in a couple of cases.

Reported by:    asomers
MFC after:      2 weeks
DeltaFile
+4-2sys/cddl/dev/dtrace/x86/dis_tables.c
+4-21 files