]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands
avg [Fri, 27 Oct 2017 12:37:22 +0000 (12:37 +0000)]
MFV r325013,r325034: 640 number_to_scaled_string is duplicated in several commands

illumos/illumos-gate@0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e
https://github.com/illumos/illumos-gate/commit/0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e

https://www.illumos.org/issues/640
  du(1), df(1m), ls(1), and swap(1m) all include a copy (it appears literally
  copied) of the 'number_to_scaled_string' function in their source. This should
  be moved to a shared library and all 4 commands should use this instead.

FreeBSD note: of all libcmdutils functionality ZFS (and other illumos
contrib code) currently uses only nicenum() function (which is similar
to humanize_number but has some formatting differences).  For this
reason I decided to not port the whole library.  As a result, nicenum.c
from libcmdutils is compiled into libzfs and libzpool.  This is a bit
ugly, but works.  If one day we are forced to create libillumos, then
the file should be moved to that library.

Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Jason King <jason.brian.king@gmail.com>

MFC after: 2 weeks

6 years agofollow up to r325013, add libcmdutils.h to the vendor area
avg [Fri, 27 Oct 2017 11:26:36 +0000 (11:26 +0000)]
follow up to r325013, add libcmdutils.h to the vendor area

6 years agoRevert r325031. This breaks the build due to __FBSDID.
cy [Fri, 27 Oct 2017 05:04:29 +0000 (05:04 +0000)]
Revert r325031. This breaks the build due to __FBSDID.

Pointy hat to: cy

6 years agoEnsure all incude statements are kept together by moving the
cy [Fri, 27 Oct 2017 04:51:05 +0000 (04:51 +0000)]
Ensure all incude statements are kept together by moving the
sys/cdefs.h include appropriately.

MFC after: 1 week
X-MFC with: r325030

6 years agoRemove redundant sys/cdefs.h include.
cy [Fri, 27 Oct 2017 04:47:44 +0000 (04:47 +0000)]
Remove redundant sys/cdefs.h include.

MFC after: 1 week

6 years agoDiscard the correct thread event reported for a ptrace stop.
jhb [Fri, 27 Oct 2017 03:16:19 +0000 (03:16 +0000)]
Discard the correct thread event reported for a ptrace stop.

When multiple threads wish to report a tracing event to a debugger,
both threads call ptracestop() and one thread will win the race to be
the reporting thread (p->p_xthread).  The debugger uses PT_LWPINFO
with the process ID to determine which thread / LWP is reporting an
event and the details of that event.  This event is cleared as a side
effect of the subsequent ptrace event that resumed the process
(PT_CONTINUE, PT_STEP, etc.).  However, ptrace() was clearing the
event identified by the LWP ID passed to the resume request even if
that wasn't the 'p_xthread'.  This could result in clearing an event
that had not yet been observed by the debugger and leaving the
existing event for 'p_thread' pending so that it was reported a second
time.

Specifically, if the debugger stopped due to a software breakpoint in
one thread, but then switched to another thread that was used to
resume (e.g. if the user switched to a different thread and issued a
step), the resume request (PT_STEP) cleared a pending event (if any)
for the thread being stepped.  However, the process immediately
stopped and the first thread reported it's breakpoint event a second
time.  The debugger decremented the PC for "both" breakpoint events
which resulted in the PC now pointing into the middle of an
instruction (on x86) and a SIGILL fault when the process was resumed a
second time.

To fix, always clear the pending event for 'p_xthread' when resuming a
process.  ptrace() still honors the requested LWP ID when enabling
single-stepping (PT_STEP) or setting a different PC (PT_CONTINUE).

Reported by: GDB testsuite (gdb.threads/continue-pending-status.exp)
Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12794

6 years agoWe should be call adaerror() instead of cam_periph_error() always.
imp [Thu, 26 Oct 2017 22:53:55 +0000 (22:53 +0000)]
We should be call adaerror() instead of cam_periph_error() always.

Sponsored by: Netflix

6 years agoAlways send STANDBY IMMEDIATE when shutting down
imp [Thu, 26 Oct 2017 22:53:49 +0000 (22:53 +0000)]
Always send STANDBY IMMEDIATE when shutting down

To save SMART data and for a drive to understand that it's been nicely
shutdown, we need to send a STANDBY IMMEDIATE. Modify adaspindown to
use a local CCB on the stack. When we're panicing, used
xpt_polled_action rather than cam_periph_runccb so that we can SEND
IMMEDIATE after we've shutdown the scheduler.

Sponsored by: Netflix
Reviewed by: scottl@, gallatin@
Differential Revision: https://reviews.freebsd.org/D12799

6 years agoMake time we wait for a power cycle tunable.
imp [Thu, 26 Oct 2017 22:53:02 +0000 (22:53 +0000)]
Make time we wait for a power cycle tunable.

hw.ipmi.cycle_time is the time to wait for the power down phase of the
ipmi power cycle before falling back to either reboot or halt.

Sponsored by: Netflix

6 years agoVarious IPMI watchdog timer improvements
imp [Thu, 26 Oct 2017 22:52:51 +0000 (22:52 +0000)]
Various IPMI watchdog timer improvements

o Make hw.ipmi.on a tuneable
o Changes to keep shutdown from hanging indefinitately after the wd
  would normally have been disabled.
o Add support for setting pretimeout (which fires an interrupt
  some time before the actual watchdog expires)
o Allow refinement of the actions to take when the watchdog expires
o Allow special startup timeout to keep us from hanging in boot
  before watchdogd is started, but after we've loaded the kernel.

Obtained From: Netflix OCA Firmware

6 years agopf tests: Remove temporary files
kp [Thu, 26 Oct 2017 20:55:33 +0000 (20:55 +0000)]
pf tests: Remove temporary files

Remove the created_jails.lst and created_interfaces.lst files in the
cleanup code.

6 years agopf tests: Fragmentation (v6) test
kp [Thu, 26 Oct 2017 20:54:52 +0000 (20:54 +0000)]
pf tests: Fragmentation (v6) test

Test fragmentation handling (i.e. scrub fragment reassemble) code for
IPv6.

Two simple tests: Ping a host (jail) and test forwarding of fragmented
packets.

6 years agopf tests: destroy jails before destroying interfaces
kp [Thu, 26 Oct 2017 20:53:56 +0000 (20:53 +0000)]
pf tests: destroy jails before destroying interfaces

When cleaning up we must destroy the jails before we destroy the interfaces.
Otherwise we might try to destroy interfaces that belong to a jail, which won't
work and fail to completely clean up.

6 years agoIntroduce cnvlist_name() and cnvlist_type() functions.
oshogbo [Thu, 26 Oct 2017 20:44:42 +0000 (20:44 +0000)]
Introduce cnvlist_name() and cnvlist_type() functions.

Those function can be used when we are iterating over nvlist to reduce
amount of extra variables we need to declare.

MFC after: 1 month

6 years agoFix aio_suspend in 32-bit emulation
asomers [Thu, 26 Oct 2017 19:45:15 +0000 (19:45 +0000)]
Fix aio_suspend in 32-bit emulation

An off-by-one error has been present since the system call was first present
in 185878.  It additionally became a memory corruption bug after change
324941.  The failure is actually revealed by our existing AIO tests.
However, apparently nobody's been running those in 32-bit emulation mode.

Reported by: Coverity, cem
CID: 1382114
MFC after: 18 days
X-MFC-With: 324941
Sponsored by: Spectra Logic Corp

6 years agolibnv: Fix strict-aliasing violation with cookie
jilles [Thu, 26 Oct 2017 18:32:04 +0000 (18:32 +0000)]
libnv: Fix strict-aliasing violation with cookie

In rS323851, some casts were adjusted in calls to nvlist_next() and
nvlist_get_pararr() in order to make scan-build happy. I think these changes
just confused scan-build into not reporting the strict-aliasing violation.

For example, nvlist_xdescriptors() is causing nvlist_next() to write to its
local variable nvp of type nvpair_t * using the lvalue *cookiep of type
void *, which is not allowed. Given the APIs of nvlist_next(),
nvlist_get_parent() and nvlist_get_pararr(), one possible fix is to create a
local void *cookie in nvlist_xdescriptors() and other places, and to convert
the value to nvpair_t * when necessary. This patch implements that fix.

Reviewed by: oshogbo
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12760

6 years agoPartially revert r325011: restore Guid's default constructor
asomers [Thu, 26 Oct 2017 17:56:34 +0000 (17:56 +0000)]
Partially revert r325011: restore Guid's default constructor

Reported by: ohartmann
MFC after: 3 weeks
X-MFC-With: 325011
Sponsored by: Spectra Logic Corp

6 years agoAdd a 'place holder' arm struct efi_fb until a real one comes
imp [Thu, 26 Oct 2017 16:36:27 +0000 (16:36 +0000)]
Add a 'place holder' arm struct efi_fb until a real one comes
along. This allows the arm efi boot loader to compile again.

Sponsored by: Netflix

6 years ago640 number_to_scaled_string is duplicated in several commands
avg [Thu, 26 Oct 2017 16:20:47 +0000 (16:20 +0000)]
640 number_to_scaled_string is duplicated in several commands

illumos/illumos-gate@0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e
https://github.com/illumos/illumos-gate/commit/0a0551200ecbcd4f1b17560acaeeb7b6c8b0090e

https://www.illumos.org/issues/640
  du(1), df(1m), ls(1), and swap(1m) all include a copy (it appears literally
  copied) of the 'number_to_scaled_string' function in their source. This should
  be moved to a shared library and all 4 commands should use this instead.

Reviewed by: Sebastian Wiedenroth <wiedi@frubar.net>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Jason King <jason.brian.king@gmail.com>

6 years agoRemove now-empty directories
imp [Thu, 26 Oct 2017 16:02:38 +0000 (16:02 +0000)]
Remove now-empty directories

6 years agozfsd should be able to online an L2ARC that disappears and returns
asomers [Thu, 26 Oct 2017 15:28:18 +0000 (15:28 +0000)]
zfsd should be able to online an L2ARC that disappears and returns

Previously, this didn't work because L2ARC devices' labels don't contain
pool GUIDs.  Modify zfsd so that the pool GUID won't be required:

lib/libdevdctl/guid.h
Change INVALID_GUID from a uint64_t constant to a function that
returns an invalid Guid object.  Remove the void constructor.
Nothing uses it, and it violates RAII.

cddl/usr.sbin/zfsd/case_file.h
cddl/usr.sbin/zfsd/case_file.cc
Allow CaseFile::Find to match a CaseFile based on Vdev GUID alone.
In CaseFile::ReEvaluate, attempt to online devices even if the newly
arrived device has no pool GUID.

cddl/usr.sbin/zfsd/vdev_iterator.cc
Iterate through a pool's cache devices as well as its regular
devices.

Reported by: avg
Reviewed by: avg
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12791

6 years agoIf the user-provided password exceeds the maximum password length, don't
des [Thu, 26 Oct 2017 13:23:13 +0000 (13:23 +0000)]
If the user-provided password exceeds the maximum password length, don't
bother passing it to crypt().  It won't succeed and may allow an attacker
to confirm that the user exists.

Reported by: jkim@
MFC after: 1 week
Security: CVE-2016-6210

6 years agoMake gmountver(8) use direct dispatch.
trasz [Thu, 26 Oct 2017 10:18:31 +0000 (10:18 +0000)]
Make gmountver(8) use direct dispatch.

MFC after: 2 weeks

6 years agoFix Dummynet AQM packet marking function ecn_mark() and fq_codel /
truckman [Thu, 26 Oct 2017 10:11:35 +0000 (10:11 +0000)]
Fix Dummynet AQM packet marking function ecn_mark() and fq_codel /
fq_pie schedulers packet classification functions in layer2 (bridge mode).

Dummynet AQM packet marking function ecn_mark() and fq_codel/fq_pie
schedulers packet classification functions (fq_codel_classify_flow()
and fq_pie_classify_flow()) assume mbuf is pointing at L3 (IP)
packet. However, this assumption is incorrect if ipfw/dummynet is
used to manage layer2 traffic (bridge mode) since mbuf will point
at L2 frame.  This patch solves this problem by identifying the
source of the frame/packet (L2 or L3) and adding ETHER_HDR_LEN
offset when converting an mbuf pointer to ip pointer if the traffic
is from layer2.  More specifically, in dummynet packet tagging
function, tag_mbuf(), iphdr_off is set to ETHER_HDR_LEN if the
traffic is from layer2 and set to zero otherwise. Whenever an access
to IP header is required, mtodo(m, dn_tag_get(m)->iphdr_off) is
used instead of mtod(m, struct ip *) to correctly convert mbuf
pointer to ip pointer in both L2 and L3 traffic.

Submitted by: lstewart
MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D12506

6 years agoMake gmountver(8) use G_PF_ACCEPT_UNMAPPED.
trasz [Thu, 26 Oct 2017 09:29:35 +0000 (09:29 +0000)]
Make gmountver(8) use G_PF_ACCEPT_UNMAPPED.

MFC after: 2 weeks

6 years agoFix typo and bump .Dd date.
imp [Wed, 25 Oct 2017 23:24:30 +0000 (23:24 +0000)]
Fix typo and bump .Dd date.

Noticed by: Richard Tector
Sponsored by: Netflix

6 years agoCleanup pieces missed in r315057 which made mandoc mandatory
bdrewery [Wed, 25 Oct 2017 21:46:39 +0000 (21:46 +0000)]
Cleanup pieces missed in r315057 which made mandoc mandatory

Sponsored by: Dell EMC Isilon

6 years agoFix native-xtools build to use a proper sysroot.
bdrewery [Wed, 25 Oct 2017 21:46:36 +0000 (21:46 +0000)]
Fix native-xtools build to use a proper sysroot.

This takes longer but should reliably produce working binaries.
The old version linked against system libraries and headers
which would be a problem if building a native-xtools against
a newer source than the host system.  With a proper sysroot made
first this is not a problem.

This also allows:
- NXBDIRS to be built in parallel
- NXBDIRS to be installed to NXBDESTDIR in parallel
- SYSTEM_COMPILER logic to work again.  Note that because this change
  is adding a sysroot phase the compiler may be built up to twice now.
  The first is the "cross-compiler" even though it is for the native
  architecture, but it is still built to ensure the latest compiler
  is used to generate the binaries, unless SYSTEM_COMPILER allows
  /usr/bin/cc to be used.  Then the target compiler is built
  which is actually a cross-compiler since it runs on native host
  but generates TARGET.TARGET_ARCH binaries.

Note this also changes the path used for the OBJDIR.  It used to use
/usr/obj/target.target_arch/nxb/<srcdir> for objects and
/usr/obj/target.target_arch/nxb-bin for installed files, but now uses
/usr/obj/nxb/target.target_arch/<srcdir> for objects and
/usr/obj/nxb/target.target_arch/<srcdir>/nxb-bin for installed files.
  - NXBDESTDIR can be specified for where to install or queried with
    `make -f Makefile.inc1 TARGET=... TARGET_ARCH=... -V NXBDESTDIR`

This could potentially be improved to reuse an existing sysroot.  The
problem is with building the SUBDIR_OVERRIDE list it needs to use a
different OBJDIR since it is building all statically.  We don't want to
pollute the existing 'buildworld' OBJDIR and cause confusion on the next
build.  Using a separate OBJDIR for the 'everything' phase mostly works
except for some things like linking in INTERNALLIBS that exist in the
other OBJDIR.

MFC after: 1 month
Sponsored by: Dell EMC Isilon

6 years agonative-xtools: Override proper NXBDESTDIR.
bdrewery [Wed, 25 Oct 2017 21:46:33 +0000 (21:46 +0000)]
native-xtools: Override proper NXBDESTDIR.

The new native-xtools uses 'make toolchain' so overriding DESTDIR
as a make argument may interfere with WORLDTMP handling.
The target also does a 'mkdir -p ${NXBDESTDIR}/usr', so we should
be modifying that rather than DESTDIR.

Note this causes the native-xtools binaries to be installed in
NANO_WORLDDIR/usr NANO_WORLDDIR/bin rather than NANO_WORLDDIR/nxb-bin/usr
and NANO_WORLDDIR/nxb-bin/bin.  This was the case before this change
as well.

MFC after: 2 weeks
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12782

6 years agoMETA_MODE: Follow-up r319593: Don't use host headers in a fresh new build.
bdrewery [Wed, 25 Oct 2017 21:46:30 +0000 (21:46 +0000)]
META_MODE: Follow-up r319593: Don't use host headers in a fresh new build.

Sponsored by: Dell EMC Isilon

6 years agoPrefix {TARGET,BUILD}_TRIPLE with LLVM_ to avoid Makefile.inc1 collision.
bdrewery [Wed, 25 Oct 2017 21:45:55 +0000 (21:45 +0000)]
Prefix {TARGET,BUILD}_TRIPLE with LLVM_ to avoid Makefile.inc1 collision.

The Makefile.inc1 TARGET_TRIPLE is for specifying which -target is used
during the build of world.

MFC after: 2 weeks
Reviewed by: dim, imp
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12792

6 years agoEvaluate packet size after the firewall had its chance in the ip6 fast path
kp [Wed, 25 Oct 2017 19:21:48 +0000 (19:21 +0000)]
Evaluate packet size after the firewall had its chance in the ip6 fast path

Defer the packet size check until after the firewall has had a look at it. This
means that the firewall now has the opportunity to (re-)fragment an oversized
packet.
This mirrors what the slow path does.

Reviewed by: ae
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12779

6 years agoloader.efi: Make framebuffer commands available for arm64
manu [Wed, 25 Oct 2017 18:55:04 +0000 (18:55 +0000)]
loader.efi: Make framebuffer commands available for arm64

Move framebuffer.{c,h} to sys/boot/efi/loader and add the efifb
related metadata and pass it to the kernel

Reviewed by: imp, andrew
Differential Revision: https://reviews.freebsd.org/D12757

6 years agoEnable i386 build of the Cavium LiquidIO driver (lio) module.
sbruno [Wed, 25 Oct 2017 17:49:17 +0000 (17:49 +0000)]
Enable i386 build of the Cavium LiquidIO driver (lio) module.

Submitted by: pkanneganti@cavium.com (Prasad V Kanneganti)
MFC after: 1 week
Sponsored by: Cavium Networks
Differential Revision: https://reviews.freebsd.org/D12415

6 years agoAdd a test for sending a signal while stepping a thread via PT_STEP.
jhb [Wed, 25 Oct 2017 17:23:33 +0000 (17:23 +0000)]
Add a test for sending a signal while stepping a thread via PT_STEP.

MFC after: 1 week

6 years agoMake drain_output() use bufobj_wwait().
markj [Wed, 25 Oct 2017 17:20:18 +0000 (17:20 +0000)]
Make drain_output() use bufobj_wwait().

No functional change intended.

Reviewed by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12790

6 years agoFix zpool_read_all_labels when vfs.aio.enable_unsafe=0
asomers [Wed, 25 Oct 2017 16:01:19 +0000 (16:01 +0000)]
Fix zpool_read_all_labels when vfs.aio.enable_unsafe=0

Previously, zpool_read_all_labels was trying to do 256KB reads, which are
greater than the default MAXPHYS and therefore must go through the slow,
unsafe AIO path.  Shrink these reads to 112KB so they can use the safe, fast
AIO path instead.

MFC after: 1 week
X-MFC-With: 324568
Sponsored by: Spectra Logic Corp

6 years agoImplement IPMI support for RB_POWRECYCLE
imp [Wed, 25 Oct 2017 15:30:53 +0000 (15:30 +0000)]
Implement IPMI support for RB_POWRECYCLE

Some BMCs support power cycling the chassis via the chassis control
command 2 subcommand 2 (ipmitool called it 'chassis power cycle').  If
the BMC supports the chassis device, register a shutdown_final handler
that sends the power cycle command if request and waits up to 10s for
it to take effect. To minimize stack strain, we preallocate a ipmi
request in the softc. At the moment, we're verbose about what we're
doing.

Sponsored by: Netflix

6 years agoHandle RB_POWERCYCLE in ada driver
imp [Wed, 25 Oct 2017 15:30:48 +0000 (15:30 +0000)]
Handle RB_POWERCYCLE in ada driver

Allow the disks to be spun down when doing a POWERCYCLE as well as
POWEROFF.

Sponsored by: Netflix

6 years agoHandle RB_POWERCYCLE in the MI part of the kernel
imp [Wed, 25 Oct 2017 15:30:44 +0000 (15:30 +0000)]
Handle RB_POWERCYCLE in the MI part of the kernel

Signal init with SIGWINCH in shutdown_nice for RB_POWERCYCLE.

Sponsored by: Netflix

6 years agoImplement power cycle in init.
imp [Wed, 25 Oct 2017 15:30:40 +0000 (15:30 +0000)]
Implement power cycle in init.

If SIGWINCH is received, then halt with power cycle.

Sponsored by: Netflix

6 years agoAdd power cycle support to reboot/halt as -c.
imp [Wed, 25 Oct 2017 15:30:35 +0000 (15:30 +0000)]
Add power cycle support to reboot/halt as -c.

When -c is specified, the system will be power cycled if the
underlying hardware supports it. Otherwise the system will be halted
or rebooted depending on which command was used.

Sponsored by: Netflix

6 years agoAdd power cycle support (-c) to shutdown.
imp [Wed, 25 Oct 2017 15:30:30 +0000 (15:30 +0000)]
Add power cycle support (-c) to shutdown.

Sponsored by: Netflix

6 years agoRB_POWERCYCLE needs to be handled like RB_POWEROFF for decoding.
imp [Wed, 25 Oct 2017 15:30:25 +0000 (15:30 +0000)]
RB_POWERCYCLE needs to be handled like RB_POWEROFF for decoding.

Sponsored by: Netflix

6 years agoDefine RB_POWERCYCLE
imp [Wed, 25 Oct 2017 15:30:20 +0000 (15:30 +0000)]
Define RB_POWERCYCLE

RB_POWERCYCLE instructs the platform to power off and then power back
on a short time later, if that's possible. Otherwise, degrade to the
RB_POWEROFF behavior.

Sponsored by: Netflix

6 years agoRemove sys/boot/arm/at91 and ixp425
imp [Wed, 25 Oct 2017 15:28:05 +0000 (15:28 +0000)]
Remove sys/boot/arm/at91 and ixp425

Remove at91 bootloader. It only worked on AT91RM9200, and only
specific boards that were all EOLd 10 years ago.

Remove ixp425. It doesn't build anymore and is for boards that were
EOLd 8 years ago.

Sponsored by: Netflix

6 years agoMove BINDIR definition to defs.mk, and override where it isn't /boot
imp [Wed, 25 Oct 2017 15:27:58 +0000 (15:27 +0000)]
Move BINDIR definition to defs.mk, and override where it isn't /boot
(those files already do that so weren't changed).

Sponsored by: Netflix

6 years agoUse BOOTDIR consistently. We need to include bsd.init.mk early to make
imp [Wed, 25 Oct 2017 15:27:53 +0000 (15:27 +0000)]
Use BOOTDIR consistently. We need to include bsd.init.mk early to make
this happen. This will cause src.opts.mk to be included, so remove
that. This needs to propigate through the sys/boot tree.

Sponsored by: Netflix

6 years agoDo a chdir to SRCTOP/sys/boot before starting the run. This lets one
imp [Wed, 25 Oct 2017 15:27:48 +0000 (15:27 +0000)]
Do a chdir to SRCTOP/sys/boot before starting the run. This lets one
run this script from anywhere, but makes it only work on sys/boot.

Sponsored by: Netflix

6 years agoReport only the valid slots in the firmware log page.
imp [Wed, 25 Oct 2017 15:26:03 +0000 (15:26 +0000)]
Report only the valid slots in the firmware log page.

Printing the entire log page is causing confusion over available
slots. Report only those slots that are valid. In the case where the
firmware download isn't supported, assume that only the first slot is
valid (I have no hardware to test this assumption though)

Sponsored by: Netflix

6 years agoAdd nvme_controller_data argument to all print functions.
imp [Wed, 25 Oct 2017 15:25:55 +0000 (15:25 +0000)]
Add nvme_controller_data argument to all print functions.

It's desirable to access controler data to inform printing log pages
(such as limiting the printing to valid ranges).

Sponsored by: Netflix

6 years agoLimit top display of total swap size by the max swap size system can
kib [Wed, 25 Oct 2017 11:44:46 +0000 (11:44 +0000)]
Limit top display of total swap size by the max swap size system can
handle.

Keep both pagesize and the new swap_maxpages in the static variables
to save sysctl calls.

Submitted by: ota@j.email.ne.jp
PR: 223149
MFC after: 2 weeks

6 years agoFix a bug reported by Felix Weinrank using the libfuzzer on the
tuexen [Wed, 25 Oct 2017 09:12:22 +0000 (09:12 +0000)]
Fix a bug reported by Felix Weinrank using the libfuzzer on the
userland stack.

MFC after: 3 days

6 years agoAdd support for compressed kernel dumps.
markj [Wed, 25 Oct 2017 00:51:00 +0000 (00:51 +0000)]
Add support for compressed kernel dumps.

When using a kernel built with the GZIO config option, dumpon -z can be
used to configure gzip compression using the in-kernel copy of zlib.
This is useful on systems with large amounts of RAM, which require a
correspondingly large dump device. Recovery of compressed dumps is also
faster since fewer bytes need to be copied from the dump device.

Because we have no way of knowing the final size of a compressed dump
until it is written, the kernel will always attempt to dump when
compression is configured, regardless of the dump device size. If the
dump is aborted because we run out of space, an error is reported on
the console.

savecore(8) is modified to handle compressed dumps and save them to
vmcore.<index>.gz, as it does when given the -z option.

A new rc.conf variable, dumpon_flags, is added. Its value is added to
the boot-time dumpon(8) invocation that occurs when a dump device is
configured in rc.conf.

Reviewed by: cem (earlier version)
Discussed with: def, rgrimes
Relnotes: yes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11723

6 years agobnxt: add support for Flow control setting using sysctl
shurd [Tue, 24 Oct 2017 21:18:50 +0000 (21:18 +0000)]
bnxt: add support for Flow control setting using sysctl

Created sysctl node dev.bnxt.0.fc with following options.

A. dev.bnxt.0.fc.autoneg
B. dev.bnxt.0.fc.rx
C. dev.bnxt.0.fc.tx

Description:-
dev.bnxt.0.fc: flow ctrl
dev.bnxt.0.fc.autoneg: Enable or Disable Autoneg Flow Ctrl: 0 / 1
dev.bnxt.0.fc.rx: Enable or Disable Rx Flow Ctrl: 0 / 1
dev.bnxt.0.fc.tx: Enable or Disable Tx Flow Ctrl: 0 / 1

Submitted by: Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Reviewed by: shurd, sbruno
Approved by: sbruno (mentor)
Sponsored by: Broadcom Limited
Differential Revision: https://reviews.freebsd.org/D12599

6 years agoFix physical block number overflow in different places.
fsu [Tue, 24 Oct 2017 20:10:08 +0000 (20:10 +0000)]
Fix physical block number overflow in different places.

Approved by:    pfg (mentor)
MFC after:      6 months

6 years agoSet doreallocblks sysctl value to zero by default because of
fsu [Tue, 24 Oct 2017 19:16:25 +0000 (19:16 +0000)]
Set doreallocblks sysctl value to zero by default because of
possibility of filesystem corruption.

Approved by:    pfg (mentor)
MFC after:      2 weeks

6 years agoDo not free bufs in case of extents metadata blocks + remove unneeded asserts.
fsu [Tue, 24 Oct 2017 19:14:33 +0000 (19:14 +0000)]
Do not free bufs in case of extents metadata blocks + remove unneeded asserts.

Approved by:    pfg (mentor)
MFC after:      6 months

6 years agoMicro-optimize the handling of fictitious pages in vm_page_free_prep().
alc [Tue, 24 Oct 2017 17:14:53 +0000 (17:14 +0000)]
Micro-optimize the handling of fictitious pages in vm_page_free_prep().
A fictitious page is always wired, so there is no point in trying to
remove one from the page queues.

Completely remove one inaccurate comment from vm_page_free_prep() and
correct another.

Reviewed by: kib, markj
MFC after: 1 week

6 years agoExtract a set of pmcstat functions and interfaces to the new internal
br [Tue, 24 Oct 2017 16:28:00 +0000 (16:28 +0000)]
Extract a set of pmcstat functions and interfaces to the new internal
library -- libpmcstat.

This includes PMC logging module, symbols lookup functions,
ELF parsing, process management, PMC attachment, etc.

This allows to reuse code while building new hwpmc(4)-based applications.

Also add pmcstat_symbol_search_by_name() function that allows to find
mapped IP range for a given function name.

Reviewed by: kib
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12718

6 years agoFix a bug in handling special ABORT chunks.
tuexen [Tue, 24 Oct 2017 16:24:12 +0000 (16:24 +0000)]
Fix a bug in handling special ABORT chunks.
Thanks to Felix Weinrank for finding this issue using libfuzzer with
the userland stack.

MFC after: 3 days

6 years agoiscsi_shutdown_post: do nothing if panic-ing
avg [Tue, 24 Oct 2017 14:59:31 +0000 (14:59 +0000)]
iscsi_shutdown_post: do nothing if panic-ing

There is nothing that that routine should or could really do in that
context.

Reported by: Ben RUBSON <ben.rubson@gmail.com>
MFC after: 1 week

6 years agoBump man page revision dates for r324941
asomers [Tue, 24 Oct 2017 14:34:25 +0000 (14:34 +0000)]
Bump man page revision dates for r324941

Reported by: jhb
MFC after: 20 days
X-MFC-with: 324941
Sponsored by: Spectra Logic Corp

6 years agoFix a locking issue found by running AFL on the userland stack.
tuexen [Tue, 24 Oct 2017 14:28:56 +0000 (14:28 +0000)]
Fix a locking issue found by running AFL on the userland stack.
Thanks to Felix Weinrank for reporting the issue.

MFC after: 3 days

6 years agoRemove unneeded calls to access(2) from rtld(1); just call open(2) instead.
trasz [Tue, 24 Oct 2017 12:56:08 +0000 (12:56 +0000)]
Remove unneeded calls to access(2) from rtld(1); just call open(2) instead.
The result looks like this:

--- przed       2017-10-21 23:19:21.445034000 +0100
+++ po  2017-10-21 23:18:50.031865000 +0100
@@ -11,7 +11,6 @@ mmap(0x0,102,PROT_READ,MAP_PRIVATE,3,0x0)      = 343665418
 close(3)                                        = 0 (0x0)
 open("/usr/local/etc/libmap.d",O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC,0165) ERR#2 'No such file or directory'
 munmap(0x80067d000,102)                                 = 0 (0x0)
-access("/usr/local/lib/libintl.so.8",F_OK)      = 0 (0x0)
 openat(AT_FDCWD,"/usr/local/lib/libintl.so.8",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3)
 fstat(3,{ mode=-rw-r--r-- ,inode=642560,size=55188,blksize=32768 }) = 0 (0x0)
 mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366541824 (0x80067d000)
@@ -20,14 +19,13 @@ mmap(0x800877000,40960,PROT_READ|PROT_EXEC,MAP_PRIVATE
 mmap(0x800a81000,4096,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0xa000) = 34370752512 (0x800a81000)
 munmap(0x80067d000,4096)                        = 0 (0x0)
 close(3)                                        = 0 (0x0)
-access("/usr/local/lib/libc.so.7",F_OK)                 ERR#2 'No such file or directory'
+openat(AT_FDCWD,"/usr/local/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) ERR#2 'No such file or directory'
 openat(AT_FDCWD,"/var/run/ld-elf.so.hints",O_RDONLY|O_CLOEXEC,00) = 3 (0x3)
 read(3,"Ehnt\^A\0\0\0\M^@\0\0\0\M-2\0\0"...,128) = 128 (0x80)
 fstat(3,{ mode=-r--r--r-- ,inode=970684,size=306,blksize=32768 }) = 0 (0x0)
 lseek(3,0x80,SEEK_SET)                          = 128 (0x80)
 read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,178) = 178 (0xb2)
 close(3)                                        = 0 (0x0)
-access("/lib/libc.so.7",F_OK)                   = 0 (0x0)
 openat(AT_FDCWD,"/lib/libc.so.7",O_RDONLY|O_CLOEXEC|O_VERIFY,00) = 3 (0x3)
 fstat(3,{ mode=-r--r--r-- ,inode=1605239,size=1910320,blksize=32768 }) = 0 (0x0)
 mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366541824 (0x80067d000)

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12766

6 years agoReplace lseek(2)/read(2) pair with pread(2), removing yet another syscall
trasz [Tue, 24 Oct 2017 12:04:07 +0000 (12:04 +0000)]
Replace lseek(2)/read(2) pair with pread(2), removing yet another syscall
from the binary startup code.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL

6 years agoMake find_library() conform to style(9). No functional changes.
trasz [Tue, 24 Oct 2017 11:24:54 +0000 (11:24 +0000)]
Make find_library() conform to style(9).  No functional changes.

Suggested by: kib
MFC after: 2 weeks
Sponsored by: DARPA, AFRL

6 years agoReword the conditional; it was ugly, and adding another parameter,
trasz [Tue, 24 Oct 2017 11:16:38 +0000 (11:16 +0000)]
Reword the conditional; it was ugly, and adding another parameter,
which I'm going to do in a subsequent commit, would make it even uglier.
No functional changes.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL

6 years agoUse xmalloc and read(2) instead of mmap(2) to read in libmap.conf(5).
trasz [Tue, 24 Oct 2017 10:48:26 +0000 (10:48 +0000)]
Use xmalloc and read(2) instead of mmap(2) to read in libmap.conf(5).
This removes the need to call munmap(2) afterwards.

MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D12767

6 years agoAdd IPv6 support for O_TCPDATALEN opcode.
ae [Tue, 24 Oct 2017 08:39:05 +0000 (08:39 +0000)]
Add IPv6 support for O_TCPDATALEN opcode.

PR: 222746
MFC after: 1 week

6 years agocxgbe(4): Read the MPS buffer group map from the firmware as it could be
np [Tue, 24 Oct 2017 05:41:48 +0000 (05:41 +0000)]
cxgbe(4): Read the MPS buffer group map from the firmware as it could be
different from hardware defaults.  The congestion channel map, which is
still fixed, needs to be tracked separately now.  Change the congestion
setting for TOE rx queues to match the drivers on other OSes while here.

MFC after: 2 weeks
Sponsored by: Chelsio Communications

6 years agoTreat a 'current' value of 0 as unlimited as a failsfe.
imp [Tue, 24 Oct 2017 02:25:42 +0000 (02:25 +0000)]
Treat a 'current' value of 0 as unlimited as a failsfe.

When limiting I/O, a value of 0 makes no sense as a limit. No progress
can be made. Trade the possibility that someone might be doing
something clever to achieve ultra-low I/O limits vs the damage of not
ever making progress on an I/O in favor of making progress. Now the
machine won't be useless if this accidentally gets requested.

Sponsored by: Netflix

6 years agoRemove artificial restriction on lio_listio's operation count
asomers [Mon, 23 Oct 2017 23:12:01 +0000 (23:12 +0000)]
Remove artificial restriction on lio_listio's operation count

In r322258 I made p1003_1b.aio_listio_max a tunable. However, further
investigation shows that there was never any good reason for that limit to
exist in the first place. It's used in two completely different ways:

* To size a UMA zone, which globally limits the number of concurrent
  aio_suspend calls.

* To artifically limit the number of operations in a single lio_listio call.
  There doesn't seem to be any memory allocation associated with this limit.

This change does two things:

* Properly names aio_suspend's UMA zone, and sizes it based on a new constant.

* Eliminates the artifical restriction on lio_listio. Instead, lio_listio
  calls will now be limited by the more generous max_aio_queue_per_proc. The
  old p1003_1b.aio_listio_max is now an alias for
  vfs.aio.max_aio_queue_per_proc, so sysconf(3) will still work with
  _SC_AIO_LISTIO_MAX.

Reported by: bde
Reviewed by: jhb
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12120

6 years agoFix the error message when creating a zpool on a too-small device
asomers [Mon, 23 Oct 2017 23:05:29 +0000 (23:05 +0000)]
Fix the error message when creating a zpool on a too-small device

Don't check for SPA_MINDEVSIZE in vdev_geom_attach when opening by path.
It's redundant with the check in vdev_open, and failing to attach here
results in the wrong error message being printed.  However, still check for
it in some other situations:

* When opening by guids, so we don't get bogged down reading from slow
  devices like floppy drives.
* In vdev_geom_read_pool_label for the same reason, because we iterate over
  all providers.
* If the caller requests that we verify the guid, because then we'll have to
  read from the device before vdev_open verifies the size.

PR: 222227
Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Reviewed by: avg, mav
MFC after: 3 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D12531

6 years agoAfter jemalloc was updated to version 5.0.0 in r319971, i386 executables
dim [Mon, 23 Oct 2017 21:31:04 +0000 (21:31 +0000)]
After jemalloc was updated to version 5.0.0 in r319971, i386 executables
linked with AddressSanitizer (even those linked on earlier versions of
FreeBSD, or with external versions of clang) started failing with errors
similar to:

  ==14688==AddressSanitizer CHECK failed:
  /usr/src/contrib/compiler-rt/lib/asan/asan_poisoning.cc:36
  "((AddrIsAlignedByGranularity(addr))) != (0)" (0x0, 0x0)

This is because AddressSanitizer expects all the TLS data in the program
to be aligned to at least 8 bytes.

Before the jemalloc 5.0.0 update, all the TLS data in the i386 version
of libc.so added up to 80 bytes (a multiple of 8), but 5.0.0 made this
grow to 2404 bytes (not a multiple of 8).  This is due to added caching
data in jemalloc's internal struct tsd_s.

To fix AddressSanitizer, ensure this struct is aligned to at least 16
bytes, which can be done unconditionally for all architectures.  (An
earlier version of the fix aligned the struct to 8 bytes, but only for
ILP32 architectures.  This was deemed unnecessarily complicated.)

PR: 221337
X-MFC-With: r319971

6 years agoSome cache related optimizations
shurd [Mon, 23 Oct 2017 20:50:08 +0000 (20:50 +0000)]
Some cache related optimizations

1. prefetch 128 bytes of mbufs.
2. Re-order filling the pkt_info so cache stalls happen at the end
3. Define empty prefetch2cachelines() macro when the function isn't present.

Provides small performance improvments on some hardware

Reviewed by: sbruno
Approved by: sbruno (mentor)
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D12447

6 years agouefi.8: mention use on (32-bit) arm
emaste [Mon, 23 Oct 2017 20:32:18 +0000 (20:32 +0000)]
uefi.8: mention use on (32-bit) arm

Sponsored by: The FreeBSD Foundation

6 years agoClean up trailing whitespace
ngie [Mon, 23 Oct 2017 16:55:22 +0000 (16:55 +0000)]
Clean up trailing whitespace

MFC after: 1 week

6 years agoRemove dead stores
ngie [Mon, 23 Oct 2017 16:54:30 +0000 (16:54 +0000)]
Remove dead stores

The return value of various snprintf calls was stored in `len` and not used
in many functions.

MFC after: 1 week
Reported by: clang-scanbuild

6 years agoExpand explanation of atomicity.
kib [Mon, 23 Oct 2017 16:14:55 +0000 (16:14 +0000)]
Expand explanation of atomicity.

Mention per-location total order, out of thin air, and torn writes
guarantees.  Mention C11 standard' memory model and one most important
FreeBSD additional requirement, that is aligned ordinary loads and
stores are atomic on processors.

The text is introductional and informal.  Reference the C11 and
C++1{1,4,7} standards for authorative description.

In collaboration with: alc
Sponsored by: The FreeBSD Foundation (kib)
MFC after: 1 week

6 years agoRemove resource_set_*() declarations from sys/bus.h.
markj [Mon, 23 Oct 2017 16:02:48 +0000 (16:02 +0000)]
Remove resource_set_*() declarations from sys/bus.h.

The corresponding definitions were removed in r78135.

PR: 223189
Submitted by: marc.priggemeyer@gmail.com
MFC after: 1 week

6 years agoMove clear_unrhdr to tmpfs_free_tmp.
mjoras [Mon, 23 Oct 2017 15:43:38 +0000 (15:43 +0000)]
Move clear_unrhdr to tmpfs_free_tmp.

Clearing the unr in tmpfs_unmount is not correct. In the case of
multiple references to the tmpfs mount (e.g. when there are lookup
threads using it) it will not be the one to finish tmpfs_free_tmp. In
those cases tmpfs_free_node_locked will be the final one to execute
tmpfs_free_tmp, and until then the unr must be valid.

Reported by: pho
Approved/reviewed by: rstone (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12749

6 years agoFix the VM_NRESERVLEVEL == 0 build.
markj [Mon, 23 Oct 2017 15:34:05 +0000 (15:34 +0000)]
Fix the VM_NRESERVLEVEL == 0 build.

Add VM_NRESERVLEVEL guards in the pmaps that implement transparent
superpage promotion using reservations.

Reviewed by: alc, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D12764

6 years agoFix an omission in a comment
ngie [Mon, 23 Oct 2017 07:56:56 +0000 (07:56 +0000)]
Fix an omission in a comment

Soft float API support applies to armv7 too after r324340

6 years agoBump WITNESS_PENDLIST to accomodate sleepq chain bump.
mjg [Mon, 23 Oct 2017 01:00:35 +0000 (01:00 +0000)]
Bump WITNESS_PENDLIST to accomodate sleepq chain bump.

Reported by: ngie

6 years agoUse preferred defined paths, rather than relative paths in fdt.
imp [Sun, 22 Oct 2017 22:52:27 +0000 (22:52 +0000)]
Use preferred defined paths, rather than relative paths in fdt.

Sponsored by: Netflix

6 years agoCreate a shell script to build sys/boot on all the architectures.
imp [Sun, 22 Oct 2017 22:52:23 +0000 (22:52 +0000)]
Create a shell script to build sys/boot on all the architectures.

One could run this from any directory, but it's designed to do
regression testing on sys/boot (it only tests on a subset of
architectures since all of them would take a lot longer and not help).
This will also ensure that future commits to sys/boot compile
everywhere.

Sponsored by: Netflix

6 years agoUse SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
imp [Sun, 22 Oct 2017 22:50:28 +0000 (22:50 +0000)]
Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.

Sponsored by: Netflix

6 years agoUse BOOTSRC here.
imp [Sun, 22 Oct 2017 22:50:23 +0000 (22:50 +0000)]
Use BOOTSRC here.

sponsored by: Netflix

6 years agoPrefer SRCTOP paths for bits we're grabbing from libc.
imp [Sun, 22 Oct 2017 22:50:19 +0000 (22:50 +0000)]
Prefer SRCTOP paths for bits we're grabbing from libc.

Sponsored by: Netflix

6 years agoMake at91 boot loader compile again.
imp [Sun, 22 Oct 2017 22:50:15 +0000 (22:50 +0000)]
Make at91 boot loader compile again.

No clue if it actually still works, but it might.

6 years agoEnd source directories with SRC rather than a hodgepodge of names
imp [Sun, 22 Oct 2017 22:50:08 +0000 (22:50 +0000)]
End source directories with SRC rather than a hodgepodge of names

BOOTDIR->BOOTSRC
FICLDIR->FICLSRC
LDR_MI->LDRSRC

This matches the patterns used in the rest of the system a bit vetter.

Suggested by: rgrimes@
Sponsored by: Netflix

6 years agoMove fdt and uboot defines into common uboot.mk.
imp [Sun, 22 Oct 2017 22:49:51 +0000 (22:49 +0000)]
Move fdt and uboot defines into common uboot.mk.

Sponsored by: Netflix

6 years agoMake the sleepq chain hash size configurable per-arch and bump on amd64.
mjg [Sun, 22 Oct 2017 20:43:50 +0000 (20:43 +0000)]
Make the sleepq chain hash size configurable per-arch and bump on amd64.

While here cache-align chains.

This shortens longest found chain during poudriere -j 80 from 32 to 16.

Pushing this higher up will probably require allocation on boot.

6 years agosdt: make all sdt probe sites test one variable
mjg [Sun, 22 Oct 2017 20:22:23 +0000 (20:22 +0000)]
sdt: make all sdt probe sites test one variable

This saves on cache misses at the expense of a slight grow of .text.

Note this is a bandaid for lack of hotpatching.

Discussed with: markj

6 years agoDelete declarations of struct pfs_bitmap, removed in r143841.
markj [Sun, 22 Oct 2017 20:22:11 +0000 (20:22 +0000)]
Delete declarations of struct pfs_bitmap, removed in r143841.

MFC after: 1 week

6 years agosdt: whack unused SDT_PROBE_ENABLED
mjg [Sun, 22 Oct 2017 20:14:48 +0000 (20:14 +0000)]
sdt: whack unused SDT_PROBE_ENABLED

6 years agolibc: Do not refer to _DefaultRuneLocale in ctype inlines
jilles [Sun, 22 Oct 2017 20:01:07 +0000 (20:01 +0000)]
libc: Do not refer to _DefaultRuneLocale in ctype inlines

Referring to _DefaultRuneLocale causes this >4KB structure to be copied to
all executables that use <ctype.h> inlines (except PIE executables).

This only affects the case where thread local storage is available.

_CurrentRuneLocale cannot be NULL, so the check can be removed entirely.

_DefaultRuneLocale needs to remain available for now since libc++ uses it.
The __isctype inline in include/_ctype.h also refers to _DefaultRuneLocale
and remains available because it may still be used by third party software.

Reviewed by: bdrewery, theraven
Differential Revision: https://reviews.freebsd.org/D10363

6 years agoAddress some miscellaneous issues in the CTF man page.
markj [Sun, 22 Oct 2017 19:17:25 +0000 (19:17 +0000)]
Address some miscellaneous issues in the CTF man page.

- Fix a number of typos.
- Replace some illumos-specific references.
- Note that a type definition of kind CTF_K_FUNCTION may be followed by
  a null type identifier in order to provide 4-byte alignment for the
  next type definition.

MFC after: 2 weeks

6 years agoMFV r323105 (partial): 8300 fix man page issues found by mandoc 1.14.1
markj [Sun, 22 Oct 2017 18:32:28 +0000 (18:32 +0000)]
MFV r323105 (partial): 8300 fix man page issues found by mandoc 1.14.1

illumos/illumos-gate@72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2
https://github.com/illumos/illumos-gate/commit/72d3dbb9ab4481606cb93caca98ba3b3a8eb6ce2

https://www.illumos.org/issues/8300
  Prior to integrating the mdocml update to 1.14.1, fix issues found by
  new version, especially the "new sentence, new line" style rule.

FreeBSD note: this revision merges only the changes to the CTF manual
page. The changes to the ZFS pages cannot be applied directly.

Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

Discussed with: avg
MFC after: 2 weeks