FreeBSD/src 7d5e02bsys/netpfil/pf pf.c, tests/sys/netpfil/pf sctp.sh

pf: allow ICMP messages related to an SCTP state to pass

Much like we already do for TCP and UDP we should also parse SCTP-in-ICMP
messages to see if they apply to an SCTP connection we've already allowed. If so
we should allow the ICMP packet to pass, even if we'd otherwise block it.

Add a test case where we generate an 'ICMP unreachable - need to frag' packet
and check that it passes through pf.

MFC after:      2 weeks
Sponsored by:   Orange Business Services
Differential Revision:  https://reviews.freebsd.org/D48170
DeltaFile
+135-2sys/netpfil/pf/pf.c
+86-0tests/sys/netpfil/pf/sctp.sh
+221-22 files

FreeBSD/src 305c40dsys/netinet/tcp_stacks bbr.c

TCP BBR: simplify expression

There is no need to check partially for bbr->r_ctl.crte being NULL,
since this can't be true in this path.
No functional change intended.

Reviewed by:            rrs
CID:                    1523810
MFC after:              1 week
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D48312
DeltaFile
+1-1sys/netinet/tcp_stacks/bbr.c
+1-11 files

FreeBSD/src 41af5eesys/netinet/tcp_stacks rack.c

TCP RACK: remove code that cannot be reached

No functional change intended.

Reviewed by:            rrs
CID:                    1523797
MFC after:              1 week
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D48301
DeltaFile
+0-6sys/netinet/tcp_stacks/rack.c
+0-61 files

FreeBSD/src 5ada29asys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

inpcb: Fix the GENERIC-NODEBUG build

Fixes:  01f8ce83242d ("inpcb: Factor out parts of in6_pcbbind() and in_pcbbind_setup()")
(cherry picked from commit ffb3d384fc1d550a764def2c0cd034ac3a4f0b86)
DeltaFile
+1-2sys/netinet/in_pcb.c
+1-2sys/netinet6/in6_pcb.c
+2-42 files

FreeBSD/src 95a7aa8sys/compat/linuxkpi/common/include/net cfg80211.h

LinuxKPI: 802.11: implement wiphy_{,un}lock()

This will help us to get minimally better lock coverage in iwlwifi
though not yet against the LinuxKPI implementation which will likely
switch to this in the future.  At least the TODO() logging noise is
out of the way.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+3-2sys/compat/linuxkpi/common/include/net/cfg80211.h
+3-21 files

FreeBSD/src eecdd41sys/kern kern_sysctl.c, sys/sys priv.h

sysctl: Do not serialize requests when running as root

Bugs or unexpected behaviour can cause a user thread to block in a
sysctl handler for a long time.  "procstat -kka" is the most useful tool
to see why this might happen, but it can block on sysctlmemlock too.

Since the purpose of this lock is merely to ensure userspace can't wire
too much memory, don't require it for requests from privileged threads.

PR:             282994
Reviewed by:    kib, jhb
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47842

(cherry picked from commit 7d1d9cc440f800858b6ec8dfb5a41c853fc8c36d)
DeltaFile
+6-4sys/kern/kern_sysctl.c
+1-0sys/sys/priv.h
+7-42 files

FreeBSD/src 4e793a6sys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

inpcb: Factor out parts of in6_pcbbind() and in_pcbbind_setup()

A large portion of these functions just determines whether the inpcb can
bind to the address/port.  This portion has no side effects, so is a
good candidate to move into its own helper function.  This patch does
so, making the callers less complicated and reducing indentation.

While moving this code, also make some changes:
- Load socket options (SO_REUSEADDR etc.) only once.  There is nothing
  preventing another thread from toggling the socket options, so make
  this function easier to reason about by avoiding races.
- When checking whether the bind address is an interface address, make a
  separate sockaddr rather than temporarily modifying the one passed to
  in_pcbbind().

Reviewed by:    ae, glebius
MFC after:      1 month
Sponsored by:   Klara, Inc.
Sponsored by:   Stormshield

    [3 lines not shown]
DeltaFile
+145-117sys/netinet6/in6_pcb.c
+97-75sys/netinet/in_pcb.c
+242-1922 files

FreeBSD/src f1933edsys/kern kern_jail.c

jail: Handle jail removal in a dedicated thread

Otherwise a deadlock is possible: the system taskqueue thread removes a
prison and calls vnet_destroy(), vnet_vlan_uninit() destroys the if_vlan
cloner, the vlan_clone_destroy() callback calls taskqueue_drain() on the
thread taskqueue.

Fix the problem by introducing a new thread for jail removals.

Ideally, the taskqueue interface would let consumers define queues
without having to map them to threads, as that'd make it possible to
avoid such deadlocks without extra threads; for now, this is the only
solution.

Reviewed by:    jamie
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47991

(cherry picked from commit 8cf955f3f48a45db22a3cc3ad89a22b543fa38ce)
DeltaFile
+8-2sys/kern/kern_jail.c
+8-21 files

FreeBSD/src f9275f9sys/riscv/riscv trap.c

riscv: Permit spurious faults in kernel mode

Right now, pmap_enter() does not issue an sfence.vma after overwriting
an invalid PTE, so the kernel can trigger a page fault when accessing a
freshly created mapping.  In this case, pmap_fault() can handle the
exception, but we may panic before that.  Move the check; this is
consistent with arm64 and serves to ensure that we don't call vm_fault()
etc. from a context where that's not permitted.

Also fix a related bug: don't enable interrupts if they were disabled in
the context where the exception occurred.

Reviewed by:    br
Tested by:      br
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D47688

(cherry picked from commit c226f193515c8c0665610cb519fe381987f8ee24)
DeltaFile
+7-6sys/riscv/riscv/trap.c
+7-61 files

FreeBSD/src ba5834blib/libusb libusb10_hotplug.c

libusb: fix hotplug sigbus

When a hotplug callback has been registered, and the program using
libusb is calling libusb_exit then the thread handler is set to
NO_THREAD which result in the variable controlling the loop the be set
to 0, it does a last pass through device available without having done
a scan, which result in a sigbus after it tried to unregister all the
devices.

directly break the loop instead and cleanup the list of devices

this fixes the tests with LGPLed libusb's hotplugtest program

MFC After:      3 days
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D48298
DeltaFile
+12-9lib/libusb/libusb10_hotplug.c
+12-91 files

FreeBSD/src d633a7dbin/timeout timeout.c timeout.1

timeout(1): Add -v/--verbose option to show diagnosis info

The -v/--verbose option enables this utility to show diagnosis
info to stderr about any signal sent on timeout.

This implementation refers to GNU coreutils's timeout(1).

Reviewed by:    bapt, Alexander Ziaee (manpages)
Approved by:    bapt (src)
Obtained from:  DragonFlyBSD
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D48225
DeltaFile
+23-5bin/timeout/timeout.c
+4-2bin/timeout/timeout.1
+27-72 files

FreeBSD/src f57db79sys/modules/dtb/allwinner Makefile

modules: dtb: allwinner: Remove sun8i-h2-plus-orangepi-r1.dts

Remove sun8i-h2-plus-orangepi-r1.dts for now, latest update changed some
/delete-node/ places and this confuse our dtc.
DeltaFile
+0-1sys/modules/dtb/allwinner/Makefile
+0-11 files

FreeBSD/src 6145586share/man/man7 ascii.7

ascii(7): Correct the history section

The man page ascii(7) first appears in the first edition manual.

Reviewed by:    imp, Alexander Ziaee
Obtained from:  OpenBSD
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D48224
DeltaFile
+2-2share/man/man7/ascii.7
+2-21 files

FreeBSD/src 9e4acacbin/timeout timeout.1 timeout.c

timeout(1): Some minor tweaks and improvements

- Define exit status and macros and use them
- Improve the second kill logic by setting 'do_second_kill = false'
  after configuring the second kill
- Minor style tweaks
- Reorder options in the man page, as well as the usage help
- Reorder the exit status in the man page
- Enhance the HISTORY section in the man page (obtained from NetBSD)

Reviewed by:    bapt, Alexander Ziaee (manpages)
Approved by:    bapt (src)
Obtained from:  DragonFlyBSD
Differential Revision:  https://reviews.freebsd.org/D47866

(cherry picked from commit 06690044dac183ea1d93c2ae227e261da3bdca2a)
DeltaFile
+38-25bin/timeout/timeout.1
+22-16bin/timeout/timeout.c
+60-412 files

FreeBSD/src 85671celib/libthr/thread thr_sig.c

check_cancel: when in_sigsuspend, send SIGCANCEL unconditionally

PR:     283101

(cherry picked from commit 9f78c837d94f73f1485e2ce012a8e64197dae9d5)
DeltaFile
+5-3lib/libthr/thread/thr_sig.c
+5-31 files

FreeBSD/src 60b5e18lib/libthr/thread thr_private.h

libthr: move dlerror_msg into zeroed part of struct thread

(cherry picked from commit 86f6ff9ff00e2ba4d4cd5b7a94d57b1c3f85ff98)
DeltaFile
+5-5lib/libthr/thread/thr_private.h
+5-51 files

FreeBSD/src 06a8084lib/libthr/thread thr_sig.c

thr_sig.c: style

(cherry picked from commit e32308efa215868d98036c30f73c98ebf67e03d4)
DeltaFile
+10-12lib/libthr/thread/thr_sig.c
+10-121 files

FreeBSD/src d51ecbalib/libthr/thread thr_cancel.c

thr_cancel.c: style

(cherry picked from commit 3282e368e00460de500e5cfcf1c33b597199aaf8)
DeltaFile
+4-4lib/libthr/thread/thr_cancel.c
+4-41 files

FreeBSD/src 2f645d5lib/libthr/thread thr_cancel.c, share/man/man3 pthread_testcancel.3

pthread_setcancelstate(3): make it async-signal-safe

(cherry picked from commit 030f48f78f96e0cdb30c960e1a11e5ae01d0eee8)
DeltaFile
+6-6lib/libthr/thread/thr_cancel.c
+6-0share/man/man3/pthread_testcancel.3
+12-62 files

FreeBSD/src 20f173flib/libthr/thread thr_cancel.c

thr_cancel.c: use testcancel() instead of manually expanding it

(cherry picked from commit a944e6d5c0c27c2a533486062497a40d8f0ae543)
DeltaFile
+2-3lib/libthr/thread/thr_cancel.c
+2-31 files

FreeBSD/src a0da8a5lib/libgcc_s/arm Symbol.map

Export additional __aeabi_ symbols from arm's libgcc_s

Some programs depend on these symbols, when they are compiled for armv6
or armv7. Closes #1560 (slightly changed due to sorting of the symbols).

PR:             271087
Reported by:    fuz
Submitted by:   jfc at mit.edu
MFC after:      1 week

(cherry picked from commit caab831338f4eeaa7455e981478be9fd414b7969)
DeltaFile
+26-1lib/libgcc_s/arm/Symbol.map
+26-11 files

FreeBSD/src f27d1eclib/libgcc_s/arm Symbol.map

Export additional __aeabi_ symbols from arm's libgcc_s

Some programs depend on these symbols, when they are compiled for armv6
or armv7. Closes #1560 (slightly changed due to sorting of the symbols).

PR:             271087
Reported by:    fuz
Submitted by:   jfc at mit.edu
MFC after:      1 week

(cherry picked from commit caab831338f4eeaa7455e981478be9fd414b7969)
DeltaFile
+26-1lib/libgcc_s/arm/Symbol.map
+26-11 files

FreeBSD/src 62e841csys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/common dmtbinfo3.c

acpica: Import ACPICA 20241212
DeltaFile
+16-28sys/contrib/dev/acpica/components/parser/psobject.c
+14-11sys/contrib/dev/acpica/include/actbl1.h
+16-0sys/contrib/dev/acpica/changes.txt
+8-1sys/contrib/dev/acpica/components/dispatcher/dsutils.c
+8-0sys/contrib/dev/acpica/components/namespace/nsaccess.c
+1-1sys/contrib/dev/acpica/common/dmtbinfo3.c
+63-413 files not shown
+65-449 files

FreeBSD/src 1a259adsys/contrib/dev/acpica changes.txt, sys/contrib/dev/acpica/common dmtbdump3.c

acpica: Merge ACPICA 20240927
DeltaFile
+13-0sys/contrib/dev/acpica/changes.txt
+1-1sys/contrib/dev/acpica/common/dmtbdump3.c
+1-1sys/contrib/dev/acpica/include/acpixf.h
+15-23 files

FreeBSD/src 92f570csys/contrib/dev/acpica/common dmtbdump1.c, sys/contrib/dev/acpica/compiler dttemplate.h aslrestype2d.c

acpica: Import ACPICA 20240827
DeltaFile
+96-72sys/contrib/dev/acpica/compiler/dttemplate.h
+157-0sys/contrib/dev/acpica/compiler/aslrestype2d.c
+141-15sys/contrib/dev/acpica/common/dmtbdump1.c
+156-0sys/contrib/dev/acpica/compiler/aslrestype2w.c
+156-0sys/contrib/dev/acpica/compiler/aslrestype2q.c
+144-5sys/contrib/dev/acpica/compiler/dttable1.c
+850-9249 files not shown
+1,548-25655 files

FreeBSD/src 804fe26sys/contrib/dev/acpica/common dmtbdump2.c dmtbinfo2.c, sys/contrib/dev/acpica/compiler dttable2.c dttemplate.h

acpica: Import ACPICA 20240321
DeltaFile
+295-254sys/contrib/dev/acpica/include/actbl2.h
+68-412sys/contrib/dev/acpica/common/dmtbdump2.c
+81-397sys/contrib/dev/acpica/compiler/dttable2.c
+106-202sys/contrib/dev/acpica/common/dmtbinfo2.c
+4-190sys/contrib/dev/acpica/common/dmtable.c
+61-118sys/contrib/dev/acpica/compiler/dttemplate.h
+615-1,573352 files not shown
+1,154-2,051358 files

FreeBSD/src e9255dasys/netinet ip_carp.c, sys/netpfil/pf pf_nl.c pflow.c

pf: netlink KPI use cleanup

- use nlf_p_empty instead of declaring own empty array
- don't declare _IN() macro when we don't parse a header

Reviewed by:            kp
Differential Revision:  https://reviews.freebsd.org/D48306
DeltaFile
+11-38sys/netpfil/pf/pf_nl.c
+3-12sys/netpfil/pf/pflow.c
+1-6sys/netinet/ip_carp.c
+15-563 files

FreeBSD/src 98a2c01. changes.txt, source/components/dispatcher dsutils.c

Import ACPICA 20241212
DeltaFile
+16-28source/components/parser/psobject.c
+14-11source/include/actbl1.h
+16-0changes.txt
+8-1source/components/dispatcher/dsutils.c
+2-1source/tools/acpixtract/acpixtract.c
+1-1source/include/acpixf.h
+57-423 files not shown
+59-459 files

FreeBSD/src ae8106e. changes.txt, source/common dmtbdump3.c

Import ACPICA 20240927
DeltaFile
+13-0changes.txt
+1-1source/common/dmtbdump3.c
+1-1source/include/acpixf.h
+15-23 files

FreeBSD/src e690145source/common dmtbdump1.c, source/compiler dttemplate.h aslrestype2d.c

Import ACPICA 20240827
DeltaFile
+101-75source/compiler/dttemplate.h
+157-0source/compiler/aslrestype2d.c
+156-0source/compiler/aslrestype2q.c
+141-15source/common/dmtbdump1.c
+156-0source/compiler/aslrestype2w.c
+144-5source/compiler/dttable1.c
+855-9556 files not shown
+1,591-26862 files