763db589 cy Feb. 26, 2021, 6:03 a.m.
Fix another bug in 77e1ccbee3ed6c837929e4e232fd07f95bfc8294. $IFS
should be fully restored for its other users.

PR:		249192
Reported by:	jkim
MFC after:	3 weeks
X-MFC with:	77e1ccbee3ed6c837929e4e232fd07f95bfc8294
589e4c1d jamie Feb. 26, 2021, 4:10 a.m.
do_jail_attach() now only uses the PD_XXX flags that refer to lock
status, so make sure that something else like PD_KILL doesn't slip

Add a KASSERT() in prison_deref() to catch any further PD_KILL misuse.
108a9384 jamie Feb. 26, 2021, 3:52 a.m.
I had locked allprison_lock without immediately setting PD_LIST_LOCKED.
1fc92877 mhorne Feb. 26, 2021, 1:43 a.m.
The sio(4) driver was removed entirely in 2019, commit 71f0077631fa.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D28929
a9bd2281 mav Feb. 26, 2021, 12:48 a.m.
There is no such thing as LUN without backend, at least for years.

MFC after:	1 week
aac25e22 markj Feb. 25, 2021, 11:49 p.m.
The purpose of these checks is to ensure that the address of the
next-level page table page is valid, since nothing is synchronizing with
a concurrent update of the large map and large map PTPs are freed to the
system.  However, if PG_PS is set, there is no next level.

Reported by:	rpokala
Reviewed by:	kib
Tested by:	rpokala
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28922
90972f04 jhb Feb. 25, 2021, 11 p.m.
I missed updating this counter when rebasing the changes in
9c64fc40290e08f6dc6b75aa04084b04e48a61af after the switch to
COUNTER_U64_DEFINE_EARLY in 1755b2b9891bb1bfa7a58383ef5126821f7e46e3.

Fixes:		9c64fc40290e Add Chacha20-Poly1305 as a KTLS cipher suite.
Sponsored by:	Netflix
5f1b1f18 kp Feb. 25, 2021, 8:51 p.m.
A sequence of overlapping IPv4 fragments could crash the kernel in
pf due to an assertion.

Reported by:	Alexander Bluhm
Obtained from:	OpenBSD
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
d2eb5dbd bapt Feb. 25, 2021, 9:49 p.m.
All variable were not properly expanded

Submitted by:	cy (initial version)
e6b81352 bapt Feb. 25, 2021, 9:47 p.m.
Submitted by:	cy
547739cc adrian Feb. 25, 2021, 9:14 p.m.
Some changes back in ye olde times somewhere has changed the default
block size the flash device exposes.  So, the default geom redboot
FIS probing (to find the partition table structure in flash!)
is no longer finding it.

So, force it to probe at the last 64k of flash regardless of the
underlying flash block size.


* Ubiquiti Routerstation pro, boots -HEAD MIPS
5001c579 bdragon Feb. 25, 2021, 8:50 p.m.
In uart_phyp_get(), when the internal buffer is empty, we make a
hypercall to retrieve up to 16 bytes of input data from the
hypervisor. As this is specified to be returned in BE format, we need
to do a 64-bit byte swap on the first and second half of the data.

If the buffer being passed in was insufficient to return the fetched
data, we store the remainder in the internal buffer and use it to
satisfy the following calls to uart_phyp_get() until it is drained.

However, in this case, we were accidentally byteswapping the internal
buffer again.

Move the byteswapping code to just after the hypercall so it only gets
swapped when we're filling the buffer.

Fixes arrow keys in qemu on pseries, among other console oddities.

Sponsored by:	Tag1 Consulting, Inc.
MFC after:	3 days
d7671ad8 rlibby Feb. 25, 2021, 8:11 p.m.
We were unlocking the vm object before reading the backing_object field.
In the meantime, the object could be freed and reused.  This could cause
us to go off the rails in the object chain traversal, failing to unlock
the rest of the objects in the original chain and corrupting the lock
state of the victim chain.

Reviewed by:	bdrewery, kib, markj, vangyzen
MFC after:	3 days
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D28926
f1ab7999 cy Feb. 25, 2021, 7:47 p.m.
77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced a bug whereby
rc scripts in etc/rc.d and $local_startup failed to parse output
from called commands because IFS was set to " " instead of the
default " \t\n". This caused parsing of output that contains any
whitespace character, such as tabs and newlines, not matching just a
space to fail.

PR:		249192
MFC after:	3 weeks
X-MFC with:	77e1ccbee3ed6c837929e4e232fd07f95bfc8294
2ae79aa3 freqlabs Feb. 25, 2021, 7:16 p.m.
The alias links were missed when this feature was introduced to the
FreeBSD build system in 10f57cb98fd61b2669640a84aa73ad118601f281.

Reviewed by:	mm
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D28925