b6999635 markj Feb. 24, 2021, 3:08 p.m.
iflib_rxeof() was counting everything twice.  This was introduced when
pfil hooks were added to the iflib receive path.  We want to count rx
packets/bytes before the pfil hooks are executed, so remove the counter
adjustments that are executed after.

PR:		253583
Reviewed by:	gallatin, erj
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D28900
e70eb402 nwhitehorn Feb. 24, 2021, 1:18 p.m.
This follows an earlier change (0b7472b3d8d2) for mounting the ESP from
systems set up through the installer and should be MFC'ed with it.
6f30ac99 kib Feb. 24, 2021, 7:55 a.m.
softdep_prealloc() must be called to ensure enough journal space is
available, before ffs_extwrite(). Also it must be done before taking
ffs_lock_ea(), because it calls ffs_syncvnode(), potentially dropping
the vnode lock.

Reviewed by:	mckusick
Tested by:	pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
5e198e76 kib Feb. 24, 2021, 7:55 a.m.
ffs_lock_ea is after the vnode lock, so vnode must not be relocked under
lock_ea. Move ffs_truncate() call in ffs_close_ea() after the lock_ea is
dropped, and only truncate to length zero, since this is the only mode
supported by ffs_truncate() for EAs. Previously code did truncation and
then write.

Zero the part of the ext area that is unused, if truncation is due but not
done because ea area is not zero-length.

Reviewed by:	mckusick
Tested by:	pho
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
c6d68ca8 kib Feb. 24, 2021, 7:54 a.m.
Use local var to shorten ap->a_vp expression.

Reviewed by:	mckusick
Tested by:	pho
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
49831462 kib Feb. 24, 2021, 7:54 a.m.
Do it in ffs_write(), where we can gracefuly handle relock and its
consequences. In particular, recheck the v_data to see if the vnode
reclamation ended, and return EBADF when we cannot proceed with the

Reviewed by:	mckusick
Reported by:	pho
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
cc9958bf kib Feb. 24, 2021, 7:54 a.m.
instead of DOINGSOFTDEP().  The softdep_prealloc() function does nothing
in SU case.

Note that the call should be safe with regard to the vnode relock,
because it is called with MNT_NOWAIT, which does not descend into fsync.

Reviewed by:	mckusick
Tested by:	pho
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
6e822e99 cy Feb. 24, 2021, 5:12 a.m.
77e1ccbee3ed6c837929e4e232fd07f95bfc8294 introduced parallel execution
of rc. It separated groups with line feeds (\n) and elements within
groups using spaces. This is a natural separation due to rcorder
using spaces and lines to separate elements within groups with groups
of services separated by line feeds.

77e1ccbee3ed6c837929e4e232fd07f95bfc8294 parses the output from rcorder
by setting $IFS. However it failed to reset $IFS to default ' \t\n'
prior to calling find_local_scripts_new(), causing find_local_scripts_new()
to fail parsing $local_startup for site-specific local rc scripts, i.e.
${LOCALBASE}/etc/rc.d. This caused daemons from ports and packages such
as postfix, dovecot, nut, and others in ${LOCALBASE} not to be started.

PR:		249192
MFC after:	3 week
X-MFC with:	77e1ccbee3ed6c837929e4e232fd07f95bfc8294
ec786886 rajeshasp Feb. 24, 2021, 5:01 a.m.
Approved by: vmaffione, gallatin

Differential Revision: https://reviews.freebsd.org/D28724

MFC after:	1 week
1af48800 nwhitehorn Feb. 24, 2021, 3:17 a.m.
These images only ever worked on Apple Powermacs, which are now a very
old platform, and did so only for a very loose definition of "worked"
(they booted on a small subset of supported machines). Moreover, all
the machines they *did* boot on also would boot from a memstick made
by dd'ing an CD image to a flash drive. Since a flash drive prepared
in this way would also boot all the newer systems we support, the
memstick images were strictly less functional than the CD images, even
for booting from memory sticks.
Reviewed by:	jhibbits
MFC after:	1 week
1d44514f markj Feb. 24, 2021, 2:17 a.m.
The tracker flags need to be loaded only after the tracker is removed
from its per-CPU queue.  Otherwise, readers may fail to synchronize with
pending writers attempting to propagate priority to active readers, and
readers and writers deadlock on each other.  This was observed in a
stable/12-based armv7 kernel where the compiler had reordered the load
of rmp_flags to before the stores updating the queue.

Reviewed by:	rlibby, scottl
Discussed with:	kib
Sponsored by:	Rubicon Communications, LLC ("Netgate")
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28821
6ab923cb markj Feb. 24, 2021, 12:14 a.m.
PR:		252194
Approved by:	so
Security:	CVE-2020-25580
Security:	FreeBSD-SA-21:03.pam_login_access
6d67af5f allanjude Feb. 23, 2021, 10:49 p.m.
This depends on another commit that has not landed yet, and broke the build

This reverts commit ba6e37e47f41484fc61cc034619267b82ddd056c.
4a5dfded allanjude Feb. 23, 2021, 10:48 p.m.
This reverts commit d2589dc3d56ce063b28b54df11c950c3758d9578.
9c4a8d24 melifaro Feb. 23, 2021, 10:40 p.m.
rib_action() guarantees valid rc filling IFF it returns without error.
Check rib_action() return code instead of checking rc fields.

PR:		253800
Reported by:	Frederic Denis <freebsdml@hecian.net>
MFC after:	immediately