FreeBSD/src bc2e0ac — contrib/kyua/cli cmd_debug.cpp, contrib/kyua/utils/cmdline options.hpp parser.cpp

kyua: Add "debug -x|--execute cmd" option

With execenv=jail specified, the "cmd" runs inside the test's jail.

Reviewed by:    ngie, markj
Differential Revision:  https://reviews.freebsd.org/D52642

(cherry picked from commit 8a21c17ccfecf0ee54becd46d3e08ccab76ca3d6)
DeltaFile
+81-1contrib/kyua/cli/cmd_debug.cpp
+24-0contrib/kyua/utils/process/child.cpp
+15-5contrib/kyua/utils/cmdline/parser.cpp
+17-3contrib/kyua/utils/cmdline/options.cpp
+20-0contrib/kyua/utils/process/child.ipp
+6-2contrib/kyua/utils/cmdline/options.hpp
+163-113 files not shown
+178-119 files

FreeBSD/src f616c8f — contrib/kyua/cli cmd_debug.cpp, contrib/kyua/engine scheduler.hpp scheduler.cpp

kyua: Make "debug -p" skip writing stdout/stderr to tmp files

Reviewed by:    kp, ngie
Differential Revision:  https://reviews.freebsd.org/D54363

(cherry picked from commit 350f319731897f741b516db99636e7ced071dfa4)
DeltaFile
+15-5contrib/kyua/engine/scheduler.cpp
+5-1contrib/kyua/engine/scheduler.hpp
+5-1contrib/kyua/cli/cmd_debug.cpp
+25-73 files

FreeBSD/src 5191f4e — contrib/kyua/cli cmd_debug.cpp

kyua: Fix prompt of "debug -p" command

(cherry picked from commit ecb58f931d45d6fe4e8b60a172415cc387657a6b)
DeltaFile
+2-2contrib/kyua/cli/cmd_debug.cpp
+2-21 files

FreeBSD/src 8668e7b — lib/atf/libatf-c++/tests/detail Makefile, lib/atf/libatf-c/tests/detail Makefile

atf: refer to `common.mk` using `SRCTOP`

This helps make the dependent Makefile (and the values contained within)
easier to catch when upgrading atf in the future.

MFC after:      1 week

(cherry picked from commit 36c4912749ab1d12692302386050e25ce8b1d9de)
DeltaFile
+1-1libexec/atf/atf-sh/Makefile
+1-1lib/atf/libatf-c/tests/detail/Makefile
+1-1lib/atf/libatf-c++/tests/detail/Makefile
+3-33 files

FreeBSD/src 5947c4b — lib/atf/libatf-c++/tests/detail Makefile, lib/atf/libatf-c/tests/detail Makefile

atf: refer to `common.mk` using `SRCTOP`

This helps make the dependent Makefile (and the values contained within)
easier to catch when upgrading atf in the future.

MFC after:      1 week

(cherry picked from commit 36c4912749ab1d12692302386050e25ce8b1d9de)
DeltaFile
+1-1libexec/atf/atf-sh/Makefile
+1-1lib/atf/libatf-c/tests/detail/Makefile
+1-1lib/atf/libatf-c++/tests/detail/Makefile
+3-33 files

FreeBSD/src bbd5aa3 — share/man/man5 src.conf.5

src.conf(5): regenerate after f6db138f97b7

MFC after:      2 weeks
MFC with:       f6db138f97b7 ("src.opts.mk: force the Dtrace tests ...")

(cherry picked from commit d90a75af95107782d18771c91b0bc8c74e6cc4f3)
DeltaFile
+5-1share/man/man5/src.conf.5
+5-11 files

FreeBSD/src b68410c — share/mk src.opts.mk

src.opts.mk: force the Dtrace tests off if ${MK_DTRACE} == no

Prior to this change Dtrace's tests could be enabled even if
`${MK_DTRACE}` == no. Allowing this doesn't make sense so remove the
tests if `${MK_DTRACE}` is also disabled.

MFC after:      2 weeks

(cherry picked from commit f6db138f97b78e641b07a7c3695ccf62b0f42f28)
DeltaFile
+1-0share/mk/src.opts.mk
+1-01 files

FreeBSD/src a8bd77d — share/man/man5 src.conf.5

src.conf(5): regenerate after f6db138f97b7

MFC after:      2 weeks
MFC with:       f6db138f97b7 ("src.opts.mk: force the Dtrace tests ...")

(cherry picked from commit d90a75af95107782d18771c91b0bc8c74e6cc4f3)
DeltaFile
+5-1share/man/man5/src.conf.5
+5-11 files

FreeBSD/src c9f9c4f — sys/netinet6 ip6_forward.c

ip6_forward: Do not reference the nexthop

ip6_forward() looked the route up with NHR_REF and released the nexthop
before returning.  It runs in the network epoch and uses the nexthop
only until it returns: nd6_output_ifp() gets the interface, and
icmp6_redirect_output() runs before the return.  The epoch keeps the
nexthop valid that long, which ip6_tryforward() already relies on.

Every packet that takes this path wrote twice to the nexthop reference
count, which all CPUs forwarding to that nexthop share.  Forwarded
packets take it whenever IPsec has a security policy, and today also
whenever net.inet6.ip6.redirect is set, which is the default.

Look the nexthop up without a reference, and assert that the caller is
in the network epoch.

No functional change intended.

Reviewed by:            pouria

    [3 lines not shown]
DeltaFile
+9-12sys/netinet6/ip6_forward.c
+9-121 files

FreeBSD/src 6edecf5 — sys/dev/iwx if_iwxreg.h

iwx: drop #pragma directives

Differential Revision:  https://reviews.freebsd.org/D61822
DeltaFile
+1-4sys/dev/iwx/if_iwxreg.h
+1-41 files

FreeBSD/src aa38b28 — sys/dev/iwx if_iwx.c

add iwx_update_promisc()

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D61824
DeltaFile
+7-0sys/dev/iwx/if_iwx.c
+7-01 files

FreeBSD/src b28bab9 — sys/dev/iwx if_iwx.c

iwx: unbreak monitor mode support

A bunch of changes that turns it into a working mode (at least for me)

1) Call iwx_auth instead of iwx_run on -> RUN transition in monitor mode.
   That's how it is intended to work because we never transition to the
   AUTH state in this mode and current implementation of iwx_run just
   results in endless 'firmware error' -> 'restart' loop.
2) Use ic_curchan instead of ic_bsschan while initializing NIC state;
   the last one contains ANYC channel in monitor mode.
3) Do not print 'input_all returned -1' message - ieee80211_input_mimo_all
   always returns -1 in monitor mode.
4) Always set IEEE80211_RADIOTAP_F_FCS in radiotap flags while in monitor mode.
   While header documentation states it is controlled by IWX_MAC_FILTER_IN_CRC32
   flag in practice IWX_MAC_FILTER_IN_PROMISC appends it as well - and it is
   required since this is the only flag that allows to receive data and
   control frames. While it alone is enough I left other flags in place for
   smaller diff with other drivers.


    [6 lines not shown]
DeltaFile
+11-5sys/dev/iwx/if_iwx.c
+11-51 files

FreeBSD/src b6273b2 — share/misc organization.dot

organization.dot: update doceng

Checked in with ziaee@ about this.

Differential Revision: https://reviews.freebsd.org/D61820
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src 28631ce — share/misc organization.dot

organization.dot: update postmaster

Checked in with zi@ for the update.

Differential Revision:  https://reviews.freebsd.org/D61819
Reviewed by: zi
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src 01149c1 — share/misc organization.dot

organization.dot: update mirroradmin

Mirroradmin is now just clusteradm.

Differential Revision:  https://reviews.freebsd.org/D61817
Reviewed by: zi
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src e03a08f — share/misc organization.dot

organization.dot: update clusteradm

I checked with zi@ and others in clusteradm.

Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D61816
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src 4f1fda6 — share/misc organization.dot

organization.dot: update core secretary

I'm it for the time being.

Reviewed by:    jrm, olivier, imp, glebius
Differential Revision:  https://reviews.freebsd.org/D61815
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src cef5a74 — share/misc organization.dot

organization.dot: update bugmeister

checked in with linimon@ about what this should say.

Reviewed by:    ziaee
Differential Revision:  https://reviews.freebsd.org/D61814
DeltaFile
+1-1share/misc/organization.dot
+1-11 files

FreeBSD/src 7dfe3d0 — share/misc organization.dot

organization.dot: update core to core.14 members

Update this to core.14 members.

Reviewed by:    ziaee, jrm, olivier, imp, glebius, allanjude, bcr
Differential Revision:  https://reviews.freebsd.org/D61813
DeltaFile
+1-2share/misc/organization.dot
+1-21 files

FreeBSD/src 2bfa4de — share/mk src.opts.mk

src.opts.mk: force the Dtrace tests off if ${MK_DTRACE} == no

Prior to this change Dtrace's tests could be enabled even if
`${MK_DTRACE}` == no. Allowing this doesn't make sense so remove the
tests if `${MK_DTRACE}` is also disabled.

MFC after:      2 weeks

(cherry picked from commit f6db138f97b78e641b07a7c3695ccf62b0f42f28)
DeltaFile
+1-0share/mk/src.opts.mk
+1-01 files

FreeBSD/src 3795cef — sys/powerpc/powerpc altivec.c

powerpc: fix the VSCR save and restore on little endian

VSCR was saved and restored through stvewx/lvewx at byte 12 of a
16 byte slot. Which element those instructions move at a given address
depends on the byte order, so on little-endian kernels they touched VR
bits 0-31 instead of the 96-127 where mfvscr/mtvscr keep VSCR: every
context switch and signal reset VSCR to 0, losing NJ and SAT.
Replicate the word into all four elements first so that the element
choice no longer matters.

VSCR[NJ] set with mtvscr read back as 0 after a usleep on a
little-endian kernel; it is preserved now.

Reviewed by:    adrian, jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61525

(cherry picked from commit 27b4bb447eababd60da777065a813d2379050850)
DeltaFile
+20-2sys/powerpc/powerpc/altivec.c
+20-21 files

FreeBSD/src 76eb059 — sys/powerpc/powerpc exec_machdep.c

powerpc: don't drop FPU and VMX ownership in grab_mcontext()

grab_mcontext() saved the FP and vector registers with save_fpu() and
save_vec(), which drop ownership: PCPU(fputhread) becomes NULL while
PCB_FPU stays set and the thread keeps using the unit. A later
cpu_update_pcb(), at fork(2) or thr_new(2), then skipped the save,
since save_fpu_nodrop() only saves for the thread that owns the unit,
and the child got the registers as they were at the getcontext() or
signal rather than at the fork. Use the nodrop variants.

A child forked after getcontext() saw the parent's f14 as it was at
the getcontext(); it sees the current value now.

Reviewed by:    adrian, jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D60837

(cherry picked from commit 8a79b6398f06f31947a2dada576c5f489c69d498)
DeltaFile
+2-2sys/powerpc/powerpc/exec_machdep.c
+2-21 files

FreeBSD/src 8103f9c — sys/powerpc/powerpc exec_machdep.c

powerpc64: don't reserve the red zone on the alternate signal stack

A 64-bit signal frame is 1552 bytes; rounded up and with the 512 byte
red zone added it needs 2096 bytes, more than MINSIGSTKSZ (2048), so a
handler on a minimum size alternate stack had its frame start 48 bytes
below the stack. The red zone only exists below the interrupted code's
stack pointer, so skip it only when the frame goes on that stack.

A handler on a MINSIGSTKSZ alternate stack overwrote the 48 bytes below
it; the frame stays within the stack now.

Reviewed by:    jhibbits
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D61519

(cherry picked from commit 34005cb7d5caeee3f3073cbc2adc3b2841ef54d7)
DeltaFile
+9-5sys/powerpc/powerpc/exec_machdep.c
+9-51 files

FreeBSD/src e40785b — contrib/netbsd-tests/lib/libpthread t_name.c, lib/libthr/tests Makefile

libthr: Enable the thread name test

Adapt NetBSD's thread naming tests to run it on FreeBSD.
Account for differences in `pthread_setname_np()` and the absence
of thread naming attributes on FreeBSD.

MFC after:      1 week
Reviewed by:    ngie, kib
Differential Revision:  https://reviews.freebsd.org/D61609
DeltaFile
+31-0contrib/netbsd-tests/lib/libpthread/t_name.c
+1-1lib/libthr/tests/Makefile
+32-12 files

FreeBSD/src 1b3698a — sys/arm64/arm64 pmap.c

arm64/pmap: Fix invalidate_icache condition in stage2 fault

pmap_stage2_fault is supposed to invalidate the icache if it is
accessing an executable page. Instead, the condition currently checks
whether execution is disallowed at any EL. Make it check whether
execution is allowed at any EL to match the intended behaviour.

Signed-off-by: Kajetan Puchalski <kajetan.puchalski at arm.com>
Reviewed by:    andrew
Sponsored by:   Arm Ltd
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2416
(cherry picked from commit 728d9f322935905c09236e8312b3268b6ff8691b)
DeltaFile
+1-1sys/arm64/arm64/pmap.c
+1-11 files

FreeBSD/src 374d678 — sys/amd64/amd64 pmap.c, sys/arm64/arm64 pmap.c

amd64/arm64 pmap: Remove KASSERTs that can never fail

In pmap_enter_largepage(), arm64's L1 block case twice asserts that
pmap_l0_to_l1() didn't return NULL, and amd64's 1G case asserts that
pmap_pml4e_to_pdpe() didn't.  Neither function ever returns NULL, so
these assertions can never fail.
DeltaFile
+0-2sys/arm64/arm64/pmap.c
+0-1sys/amd64/amd64/pmap.c
+0-32 files

FreeBSD/src bae776b — sys/kern uipc_shm.c

shm: Fix a shm object refcount leak in shm_rename(SHM_RENAME_EXCHANGE)

With RENAME_EXCHANGE we acquire an extra ref on the destination object
so that shm_remove() doesn't free it.  However, we failed to release
that ref if the rename fails.

Reported by:    Laam Alif at Ibteda Digital Library
Fixes:          9afb12bab41f ("Add an shm_rename syscall")
Reviewed by:    kib
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61806
DeltaFile
+2-0sys/kern/uipc_shm.c
+2-01 files

FreeBSD/src 795fc5b — sys/fs/tmpfs tmpfs_subr.c, sys/kern uipc_shm.c

vm_object: Fix synchronization between reinit and global list walks

Checking for OBJT_DEAD in vm_object_list_handler() is racy since pagers
may set the object type to OBJT_DEAD after having dropped and reacquired
the object lock.  dev_pager_dealloc() does this, for instance.  Check
for the OBJ_DEAD flag as well, as that is set earlier.  Fix one rare
case in the vnode pager where we freed an object without setting
OBJ_DEAD, and add an assertion to the zone destructor.

Try to minimize accesses of the object after dropping the object lock in
vm_object_list_handler().
Add a comment to warn others to think carefully before adding more
cases.

Fix shm_get_path() to reject dead objects.  Fix tmpfs to finish
initialization of the object under its lock; we cannot claim that the
object is thread-private since it lives on a global list.

Try to close races with _vm_object_allocate().  Update object->flags,

    [20 lines not shown]
DeltaFile
+30-22sys/vm/vm_object.c
+7-15sys/vm/swap_pager.c
+14-6sys/fs/tmpfs/tmpfs_subr.c
+13-2sys/vm/device_pager.c
+2-2sys/vm/vm_object.h
+1-1sys/kern/uipc_shm.c
+67-481 files not shown
+68-487 files

FreeBSD/src 2aa874b — sys/compat/linux linux_file.c

linux: Pass a valid thread pointer to linux_msg()

linux_msg() will dereference that pointer if a debugging flag is set.

Reported by:    Tianyi Chen <hi at tychen.cc>
Fixes:          3965de642c29 ("linux: Add inotify support")
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
DeltaFile
+4-5sys/compat/linux/linux_file.c
+4-51 files

FreeBSD/src 6186fe5 — sys/compat/freebsd32 freebsd32_misc.c

freebsd32: Fix the ffclock estimate conversions

The CP() arguments were reversed in both directions, so
ffclock_getestimate() copied out uninitialized stack memory and
ffclock_setestimate() installed it as the system estimate.

Add helper functions to do the conversion, implemented so as to make
such mistakes harder to make.

Fixes:          e3e811a3f824 ("freebsd32: add feed foward clock syscalls")
Reviewed by:    brooks
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D61774
DeltaFile
+38-20sys/compat/freebsd32/freebsd32_misc.c
+38-201 files