324150d6 jrtc27 Jan. 2, 2022, 8:55 p.m.
The code here tries to be smart and zeroes out both di_db and di_ib with
a single bzero call, thereby overrunning the di_db subobject. This is
fine on most architectures, if a little dodgy. However, on CHERI, the
compiler can optionally restrict the bounds on pointers to subobjects to
just that subobject, in order to mitigate intra-object buffer overflows,
and this is enabled in CheriBSD's pure-capability kernels.

Instead, use separate bzero calls for each array, and let the compiler
optimise it as it sees fit; even if it's not generating inline zeroing
code, Clang will happily optimise two consecutive bzero's to a single
larger call.

Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D33651
cgit
5b13fa79 jrtc27 Jan. 2, 2022, 8:55 p.m.
Shortlinks occupy the space of both di_db and di_ib when used. However,
everywhere that wants to read or write a shortlink takes a pointer do
di_db and promptly runs off the end of it into di_ib. This is fine on
most architectures, if a little dodgy. However, on CHERI, the compiler
can optionally restrict the bounds on pointers to subobjects to just
that subobject, in order to mitigate intra-object buffer overflows, and
this is enabled in CheriBSD's pure-capability kernels.

Instead, clean this up by inserting a union such that a new di_shortlink
can be added with the right size and element type, avoiding the need to
cast and allowing the use of the DIP macro to access the field. This
also mirrors how the ext2fs code implements extents support, with the
exact same structure other than having a uint32_t i_data[] instead of a
char di_shortlink[].

Reviewed by:	mckusick, jhb
Differential Revision:	https://reviews.freebsd.org/D33650
cgit
04fd468d kib Jan. 2, 2022, 8:25 p.m.
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33721
cgit
642f77be kib Jan. 2, 2022, 7 p.m.
Sponsored by:	The FreeBSD Foundation
cgit
f1e7a532 dougm Jan. 2, 2022, 6:37 p.m.
A recent change introduced a one-off error into a test allowing
coalescing chunks into segments.  This fixes that error.

broke a check in _bus_dmamap_addseg on many architectures. This change makes it clear that it is not a particular range that is being boundary-checked, but the proposed union of the two adjacent ranges.
Reported by:	se
Reviewed by:	se
Fixes:	c606ab59e7f9 vm_extern: use standard address checkers everywhere
Differential Revision:	https://reviews.freebsd.org/D33715
cgit
1b90dfa5 gbe Jan. 2, 2022, 5:03 p.m.
- s/measurment/measurement/

MFC after:	3 days
cgit
79f38143 phk Jan. 2, 2022, 11:44 a.m.
bffefaf3 wma Jan. 2, 2022, 9:51 a.m.
Close file descriptor in the correct way if no counters
are built into the application.

Obtained from:		Stormshield
cgit
d28d74de wma Jan. 2, 2022, 7:59 a.m.
When comparing singed with unsigned the signed value is casted
to unsigned. Make this explicit as it might lead to compilation
warnings otherwise.

Obtained from:		Stormshield
cgit
4cc76d90 imp Jan. 2, 2022, 7:41 a.m.
Always make ofw_bus_if.h. While it's only used when option FDT is in the
kernel, it can always be generated. In theory we could omit it if option
FDT isn't present, but none of the rest of sys/modules does that. That
fine-grained control likely won't be reliable w/o a redesign of the
kernel/module config system.

Sponsored by:		Netflix
cgit
e0281204 imp Jan. 2, 2022, 7:30 a.m.
Expand on the terse comments for where each of these files is used.

Reviewed by:		emaste
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D33716
cgit
a115a4aa mckusick Jan. 2, 2022, 3:48 a.m.
Using 8 width is too wide for large numbers like 1379991K;
1330M is easier to read.

Submitted by: ota_j.email.ne.jp
Reviewed by:  mckusick
MFC after:    2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33495
cgit
dfa5a743 nwhitehorn Jan. 2, 2022, 12:34 a.m.
e9016c0b bz Jan. 1, 2022, 8:57 p.m.
Based on some feedback clarify the man page for
- how to load the driver currently
- status of the driver with respect to iwm(4)
and leave a comment to (automatically) add a full list of chipsets
to the man page.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	debdrup
Differential Revision: https://reviews.freebsd.org/D33713
cgit
18f20d5d bapt Jan. 1, 2022, 8:51 p.m.