2b0cabbd delphij Aug. 8, 2019, 6:27 a.m.
- Use new zlib headers;
 - Removed z_alloc and z_free to use the common sys/dev/zlib version.
 - Replace z_compressBound with compressBound from zlib.

While there, limit LZMA CFLAGS to apply only for g_uzip_lzma.c.

PR:		229763
Submitted by:	Yoshihiro Ota <ota j email ne jp> (with changes,
		bugs are mine)
Differential Revision:	https://reviews.freebsd.org/D20271
cgit ViewVC
56e66ce8 alc Aug. 8, 2019, 6:26 a.m.
pmap's lock ensures that other operations on the pmap don't observe the
old mapping being broken before the new mapping is established.  However,
pmap_kextract() doesn't acquire the kernel pmap's lock, so it may observe
the broken mapping.  And, if it does, it returns an incorrect result.

This revision implements a lock-free solution to this problem in
pmap_update_entry() and pmap_kextract() because pmap_kextract() can't
acquire the kernel pmap's lock.

Reported by:	andrew, greg_unrelenting.technology
Reviewed by:	andrew, markj
Tested by:	greg_unrelenting.technology
X-MFC with:	r350579
Differential Revision:	https://reviews.freebsd.org/D21169
cgit ViewVC
47fec6f3 cem Aug. 8, 2019, 4:29 a.m.
For some inexplicable reason, C++ compilers reject the -Wno- flag, and also
(ab)use CWARNFLAGS.

Reported by:	imp
cgit ViewVC
be3ab187 cem Aug. 8, 2019, 3:27 a.m.
It is part of -Wformat, which is enabled by -Wall.  Empty format strings are
well defined and it is perfectly reasonable to expect them in a formatting
interface.
cgit ViewVC
937e8f20 jhibbits Aug. 8, 2019, 3:18 a.m.
Don't recalculate the VM page of the page table pages, just pass them down
to free.  Also, use the pmap's page zero function instead of bzero().
cgit ViewVC
ca05fff0 jhibbits Aug. 8, 2019, 3:16 a.m.
Summary:
autounmountd(8) uses doubles to handle mount time durations.  However,
it must convert to integer types, time_t in particular, to do anything
meaningful.  Additionally, even though it's a floating-point value in
seconds, the sub-seconds component is never used, so it's unnecessary.

Switching type to time_t fixes an assertion on powerpc64, which checks
that a sleep value that's not -1.0 is greater than 0.  On powerpc64, it
happens that the value of -1.0 gets loaded as a float (perhaps a bug in
gcc), but gets compared to a double.  This compares as false, so follows
through the 'sleep != -1.0' path, and fails the assert.  Since the
sub-second component isn't used in the double, just drop it and deal
with whole-integer seconds.

Reviewed by:	trasz
Differential Revision: https://reviews.freebsd.org/D21109
cgit ViewVC
7d0658ad cem Aug. 8, 2019, 1:37 a.m.
KDB is standard and the kdb_active variable is always available.  So,
de-conditionalize inclusion of sys/kdb.h in kern_sysctl.c.

Reported by:	Michael Butler <imb AT protected-networks.net>
X-MFC-With:	r350713
Sponsored by:	Dell EMC Isilon
cgit ViewVC
26a6feda lwhsu Aug. 8, 2019, 12:51 a.m.
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
088c17b4 cem Aug. 8, 2019, 12:42 a.m.
Implement `sysctl` in `ddb` by overriding `SYSCTL_OUT`.  When handling the
req, we install custom ddb in/out handlers.  The out handler prints straight
to the debugger, while the in handler ignores all input.  This is intended
to allow us to print just about any sysctl.

There is a known issue when used from ddb(4) entered via 'sysctl
debug.kdb.enter=1'.  The DDB mode does not quite prevent all lock
interactions, and it is possible for the recursive Giant lock to be unlocked
when the ddb(4) 'sysctl' command is used.  This may result in a panic on
return from ddb(4) via 'c' (continue).  Obviously, this is not a problem
when debugging already-paniced systems.

Submitted by:	Travis Lane (formerly: <travis.lane AT isilon.com>)
Reviewed by:	vangyzen (earlier version), Don Morris <dgmorris AT earthlink.net>
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D20219
cgit ViewVC
09b238e7 avg Aug. 7, 2019, 9:20 p.m.
I wronlgy expected that igor(1) checks spelling of all words.

MFC after:	1 week
cgit ViewVC
ce6c81b9 avg Aug. 7, 2019, 9:07 p.m.
While here:
- use Xr macro for a reference to sysrc(8)
- clarify that rc.shutdown invokes rc.d scripts with "faststop" argument

MFC after:	1 week
cgit ViewVC
84922a5d lwhsu Aug. 7, 2019, 9:02 p.m.
Reported by:	markj
Sponsored by:	The FreeBSD Foundation
cgit ViewVC
0bf48626 asomers Aug. 7, 2019, 8:28 p.m.
On FreeBSD 13.0, the fuse driver will always be known as fusefs. The
backwards compatibility symlink will still be used for stable/12 and
stable/11, though.

Reported by:	jhibbits
Reviewed by:	rgrimes, imp, cem
MFC after:	Never
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21181
cgit ViewVC
aa8d1268 dim Aug. 7, 2019, 8:13 p.m.
If the length of the source wide character string, passed in via the
"size_t n" parameter, is set to zero, the function should only return
the required length for the destination wide character string.  In this
case, it should *not* attempt to write to the destination, so the "dst"
parameter is permitted to be NULL.

However, when the internally called _collate_wxfrm() function returns an
error, such as when using the "C" locale, as a fallback wcscpy(3) or
wcsncpy(3) are used.  But if the input length is zero, wcsncpy(3) will
be called with a length of -1!  If the "dst" parameter is NULL, this
will immediately result in a segfault, or if "dst" is a valid pointer,
it will most likely result in unexpectedly overwritten memory.

Fix this by explicitly checking for an input length greater than zero,
before calling wcsncpy(3).

Note that a similar situation does not occur in strxfrm(3), the plain
character version of this function, as it uses strlcpy(3) for the error
case.  The strlcpy(3) function does not write to the destination if the
input length is zero.

MFC after:	1 week
cgit ViewVC
13a7c4d4 markj Aug. 7, 2019, 7:45 p.m.
MFC after:	3 days
cgit ViewVC