09065637 andrew Oct. 12, 2021, 12:16 p.m.
There is no need to read the domain on arm64 when there is only one
in the ACPI tables. This can also happen when the table is missing
as it is unneeded.

Reported by:	dch
Sponsored by:	The FreeBSD Foundation
08580603 kevans Oct. 12, 2021, 7:44 a.m.
7259ca31 kevans Oct. 12, 2021, 7:43 a.m.
This gives the vfs layer a chance to provide handling for EVFILT_VNODE,
for instance.  Change pipe_specops to use the default vop_kqfilter to
accommodate fifoops that don't specify the method (i.e. all in-tree).

Based on a patch by Jan Kokemüller.

PR:		225934
Reviewed by:	kib, markj (both pre-KASSERT)
Differential Revision:	https://reviews.freebsd.org/D32271
fc22fe5c pho Oct. 12, 2021, 6:45 a.m.
120b20bd rmacklem Oct. 12, 2021, 4:58 a.m.
Without this patch, it is possible for a process doing an NFSv4
Open/create of a file to block to allow another process
to acquire the exclusive lock on the clientID when holding
a shared lock on the clientID.  As such, both processes
deadlock, with one wanting the exclusive lock, while the
other holds the shared lock.  This deadlock is unlikely to occur
unless delegations are in use on the NFSv4 mount.

This patch fixes the problem by not deferring to the process
waiting for the exclusive lock when a shared lock (reference cnt)
is already held by the process.

This problem was detected during a recent NFSv4 interoperability
testing event held by the IETF working group.

MFC after:	1 week
2d827c06 lwhsu Oct. 11, 2021, 9:40 p.m.
This case panics the machine fairly often and we should run
stress tests separately.

Sponsored by:	The FreeBSD Foundation
cdccd11b imp Oct. 11, 2021, 6:59 p.m.
sys/sysctl.h moved struct thread forward declaration under #ifdef
_KERNEL and so this header fails when included from userland. Add a
forward declaration here.

Fixes:	     		99eefc727eba
Sponsored by:		Netflix
c05b382e imp Oct. 11, 2021, 5:49 p.m.
This reverts commit e8f26e5dc859a8fbc663e108421f657325ca3054.

Although the change worked locally, it's breaking something in the CI
build for the riscv64 build (which makes no sense it would only break
that since we're building host tools to bootstrap at that point).

Sponsored by:		Netflix
99eefc72 imp Oct. 11, 2021, 5:20 p.m.
Remove unused struct ctlname. It is unused. Move struct thread to
inside #if _KERNEL.

Sponsored by:		Netflix
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D32457
56ee5c55 imp Oct. 11, 2021, 5:20 p.m.
sys/sysctl.h only needs u_int and size_t from sys/types.h. When the
sysctl interface was designed, having one more more prerequisites
(especially sys/types.h) was the norm. Times have changed, and to make
things more portable, make sys/types.h optional. We do this by including
sys/_types.h, defining size_t if needed, and changing u_int to 'unsigned
int' in a prototype for userland builds. For kernel builds, sys/types.h
is still required.

Sponsored by:		Netflix
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D31827
e8f26e5d imp Oct. 11, 2021, 5:20 p.m.
There's no need to disable shared libraries when building the bootstrap
tools. This was added on 2000 (commit ad879ce9552c) when the perl
bootstrap was added (libperl and miniperl) and saved a fair amount of
time (perl took a long time to build on 2000-era hardware).

For many years now, however, we rarely build any libraries when
bootstrapping. Even when we do, the optimization saves at most a few
seconds when upgrading since the libraries built have been small. Shared
libraries are more robust accross versions that static libraries due to
creaping dependencies (we aren't crossing versions of share libraries,
though, just using what's on the host). In addition, linux and macos
have been building like this for some time because static binaries on
those systems are difficult to impossible.

Sponsored by:		Netflix
Reviewed by:		arichardson, bapt
Differential Revision:	https://reviews.freebsd.org/D32443
98dae405 kib Oct. 11, 2021, 5:09 p.m.
These calls do operate on vnodes only, not file contents.
This is useful for e.g. the xdg-document-portal fuse filesystem.

Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32438
8da27052 pstef Oct. 11, 2021, 5:02 p.m.
Some strftime(3) conversion specifications will generate strings encoded
with the current locale, not necessarily UTF8. As per xo_format.5, use
the h string modifier so that libxo interprets it appropriately.

Reviewed by:	eugen, philip
Differential Revision:	https://reviews.freebsd.org/D32437
902cde5d pstef Oct. 11, 2021, 5:01 p.m.
This reverts commits 8e67c427b5 (unbreak for 8-bit locales), 0ca58ca151
(correction after r351413), and f424ec1b80 (fix style after r351459).

A simpler fix can be done by using the h modifier for strings that are
encoded with the current locale.

Reviewed by:	eugen, philip
Differential Revision:	https://reviews.freebsd.org/D32437
4f556830 pstef Oct. 11, 2021, 4:57 p.m.
Reported by:	kib
Fixes:		bf8f6ffcb66a