0281f88e kib Feb. 12, 2021, 1:02 a.m.
as it is done in other places.  Header files might need options defined
for correct operation.

Reviewed by:	chs, mckusick
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
cgit
b2c4ca8d kevans Feb. 12, 2021, 12:58 a.m.
- One (1) spurious whitespace.
- One (1) occurrence of "random(3) bad, arc4random(3)" good.
- Three (3) writes that will never be seen.

The latter two points are complaints from clang-analyze. Switching to
arc4random(3) is decidedly a good idea because we weren't doing any kind
of PRNG seeding anyways. The discarded assignments are arguably good
for future-proofing, but it's better to improve the S/N ratio from
clang-analyze.

Reviewed by:	bapt, manu
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28525
cgit
18418e19 kevans Feb. 12, 2021, 12:58 a.m.
This is limited to bootstrap/add because some real pkg(8) commands
have -r flags with an incompatible meaning/usage, e.g., pkg-audit.
pkg(7) will still commence the search as it has, but it will ignore any
repo objects without the given name so that overrides and whatnot still
work as expected.

The use of it for add is noted in the manpage; notably, that the
signature config for that repository will be used over global config if
it's specified. i.e., pkg(7) should assume that the given pkg did come
from that repository and treat it appropriately.

Reviewed by:	bapt, manu
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28524
cgit
bf80e08e jkim Feb. 11, 2021, 11:41 p.m.
80f31432 jkim Feb. 11, 2021, 11:40 p.m.
Note araujo tried to fix it in r298241 but he only touched generated
files for bootstrap.  This commit properly fixes the problem.
cgit
34e67bb5 jkim Feb. 11, 2021, 11:31 p.m.
Note araujo tried to fix it in r298241 but he only touched generated
files for bootstrap.  This commit properly fixes the problem.
cgit
7fe2f504 imp Feb. 11, 2021, 11:09 p.m.
Move the check for efi variables being supported to after parsing the args. This
allows '-h' to produce both as a normal user as well as on all systems.
cgit
145bf6c0 melifaro Feb. 11, 2021, 11:08 p.m.
Traditionally *BSD routing stack required to supply some
 interface data for blackhole/reject routes. This lead to
 varieties of hacks in routing daemons when inserting such routes.
With the recent routeing stack changes, gateway sockaddr without
 RTF_GATEWAY started to be treated differently, purely as link
 identifier.

This change broke net/bird, which installs blackhole routes with
 127.0.0.1 gateway without RTF_GATEWAY flags.

Fix this by automatically constructing necessary gateway data at
 rtsock level if RTF_REJECT/RTF_BLACKHOLE is set.

Reported by:	Marek Zarychta <zarychtam at plan-b.pwste.edu.pl>
Reviewed by:	donner
MFC after:	1 week
cgit
e6405c8c jhb Feb. 11, 2021, 10:06 p.m.
I had missed merging this fixup into
447b3557a9cc5f00a301be8404339f21a9a0faa8 before pushing it.

Pointy hat to:	jhb
MFC after:	2 weeks
cgit
47769bc5 jhb Feb. 11, 2021, 9:52 p.m.
Previously, iscsi_poll() just panicked.  This meant if you got a panic
on a box when using the iSCSI initiator, the attempt to shutdown would
trigger a nested panic and never write out a core.  Now, CCB's sent to
iSCSI devices (such as the sychronize-cache request in dashutdown())
just fail with a timeout during a panic shutdown.

Reviewed by:	scottl, mav
MFC after:	2 weeks
Sponsored by:	Chelsio
Differential Revision:	https://reviews.freebsd.org/D28455
cgit
e07ac3f2 jhb Feb. 11, 2021, 9:52 p.m.
If a disk's SIM doesn't support polling, then it can't be used to
store crashdumps.  Leave d_dump NULL in that case so that dumpon(8)
fails gracefully rather than having dumps fail at crash time.

Reviewed by:	scottl, mav, imp
MFC after:	2 weeks
Sponsored by:	Chelsio
Differential Revision:	https://reviews.freebsd.org/D28454
cgit
447b3557 jhb Feb. 11, 2021, 9:52 p.m.
Some CAM sim drivers do not support polling (notably iscsi(4)).
Rather than using a no-op poll routine that always times out requests,
permit a SIM to set a NULL poll callback.  cam_periph_runccb() will
fail polled requests non-pollable sims immediately as if they had
timed out.

Reviewed by:	scottl, mav (earlier version)
Reviewed by:	imp
MFC after:	2 weeks
Sponsored by:	Chelsio
Differential Revision:	https://reviews.freebsd.org/D28453
cgit
6d2a10d9 kp Feb. 11, 2021, 3:12 p.m.
Widen the ifnet_detach_sxlock to cover the entire vnet sysuninit code.
This ensures that we can't end up having the vnet_sysuninit free the UDP
pcb while the detach code is running and trying to purge the UDP pcb.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D28530
cgit
6462113b gjb Feb. 11, 2021, 3:46 p.m.
Add PBUILD_FLAGS and UNAME_r overrides to extra_chroot_setup()
to fix building ports for 14-CURRENT builds on 13.x.

MFC after:	3 days
MFC with:	c511a5ab53ba335dc85f7ac93843872eb5763602
Sponsored by:	Rubicon Communications, LLC ("Netgate")
cgit
29ed5385 markj Feb. 11, 2021, 3:16 p.m.
Since commit 8fa6abb6f4f64f ("Expose clang's alignment builtins and use
them for roundup2/rounddown2"), clang emits warnings for several
alignment operations in these drivers because the operation is a no-op.
The compiler is arguably being too strict here, but in the meantime
let's silence the warnings by conditionally compiling the alignment
operations.

Reviewed by:	arichardson, hselasky
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D28576
cgit