]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoFix ICMPv6 Time Exceeded error message translation.
ae [Sat, 26 Nov 2016 10:04:05 +0000 (10:04 +0000)]
Fix ICMPv6 Time Exceeded error message translation.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

7 years agostyle(9) indent changes, no actual code change.
delphij [Sat, 26 Nov 2016 07:02:44 +0000 (07:02 +0000)]
style(9) indent changes, no actual code change.

MFC after: 2 weeks

7 years agoext2: avoid possible overflow when calculating malloc size.
pfg [Sat, 26 Nov 2016 02:06:33 +0000 (02:06 +0000)]
ext2: avoid possible overflow when calculating malloc size.

This is inspired on r308064 for case of reloading UFS.

MFC after: 1 week

7 years agonetipsec: fix build after 309144
emaste [Sat, 26 Nov 2016 00:59:01 +0000 (00:59 +0000)]
netipsec: fix build after 309144

Reported by: rakuco

7 years agoStop "nfsstat -z" from clearing counts of NFSv4 state structures.
rmacklem [Fri, 25 Nov 2016 23:28:09 +0000 (23:28 +0000)]
Stop "nfsstat -z" from clearing counts of NFSv4 state structures.

The "-z" option on nfsstats was erroneously zeroing out the counts
of NFSv4 state structures. These counts will normally go back down
to zero as state is released. When zeroed out by "-z", these counts
can go negative. This patch fixes this problem.

MFC after: 2 weeks

7 years agoAdd an isync to after mtsrin, required by the MPC750 errata
jhibbits [Fri, 25 Nov 2016 19:36:27 +0000 (19:36 +0000)]
Add an isync to after mtsrin, required by the MPC750 errata

MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr,
mtsrin, and mtmsr all require a isync after the instruction and before data
address translation uses any of the segment registers.  This should make FreeBSD
run correctly on the G3 again.

Reported by: Mark Millard
MFC after: 1 week

7 years agoUse explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr
emaste [Fri, 25 Nov 2016 18:57:14 +0000 (18:57 +0000)]
Use explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr

MAXPAGESIZE is not well defined by the GNU ld documentation.
Different linkers, and different versions of the same linker, use
different MAXPAGESIZE values. Current versions of GNU gold and LLVM's
lld use 4K. When set to 4K the kernel panics at boot due to an issue
with x86bios.

Here we want the kernel physaddr to be the amd64 superpage size, so use
that value (2MB) explicitly. With this change GNU gold and LLVM lld can
link a working amd64 kernel.

PR: 214718 (x86bios)
Differential Revision: https://reviews.freebsd.org/D8610

7 years agoBump FREEBSD_CC_VERSION again for r309147 and 309149.
dim [Fri, 25 Nov 2016 18:12:57 +0000 (18:12 +0000)]
Bump FREEBSD_CC_VERSION again for r309147 and 309149.

7 years agoPull in r283060 from upstream llvm trunk (by Hal Finkel):
dim [Fri, 25 Nov 2016 18:12:13 +0000 (18:12 +0000)]
Pull in r283060 from upstream llvm trunk (by Hal Finkel):

  [PowerPC] Refactor soft-float support, and enable PPC64 soft float

  This change enables soft-float for PowerPC64, and also makes
  soft-float disable all vector instruction sets for both 32-bit and
  64-bit modes. This latter part is necessary because the PPC backend
  canonicalizes many Altivec vector types to floating-point types, and
  so soft-float breaks scalarization support for many operations. Both
  for embedded targets and for operating-system kernels desiring
  soft-float support, it seems reasonable that disabling hardware
  floating-point also disables vector instructions (embedded targets
  without hardware floating point support are unlikely to have Altivec,
  etc. and operating system kernels desiring not to use floating-point
  registers to lower syscall cost are unlikely to want to use vector
  registers either). If someone needs this to work, we'll need to
  change the fact that we promote many Altivec operations to act on
  v4f32. To make it possible to disable Altivec when soft-float is
  enabled, hardware floating-point support needs to be expressed as a
  positive feature, like the others, and not a negative feature,
  because target features cannot have dependencies on the disabling of
  some other feature. So +soft-float has now become -hard-float.

  Fixes PR26970.

Pull in r283061 from upstream clang trunk (by Hal Finkel):

  [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float

  Enable soft-float support on PPC64, as the backend now supports it.
  Also, the backend now uses -hard-float instead of +soft-float, so set
  the target features accordingly.

  Fixes PR26970.

Reported by: Mark Millard
PR: 214433

7 years agoPermit timed sleeps for threads other than thread0 before timers are working.
jhb [Fri, 25 Nov 2016 18:02:43 +0000 (18:02 +0000)]
Permit timed sleeps for threads other than thread0 before timers are working.

The callout subsystem already handles early callouts and schedules
the first clock interrupt appropriately based on the currently pending
callouts.  The one nit to fix was that callouts scheduled via C_HARDCLOCK
during early boot could fire too early once timers were enabled as the
per-CPU base time is always zero until timers are initialized.  The change
in callout_when() handles this case by using the current uptime as the
base time of the callout during bootup if the per-CPU base time is zero.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Netflix

7 years agoPull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):
dim [Fri, 25 Nov 2016 18:01:32 +0000 (18:01 +0000)]
Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek):

  [PPC] Set SP after loading data from stack frame, if no red zone is
  present

  Follow-up to r280705: Make sure that the SP is only restored after
  all data is loaded from the stack frame, if there is no red zone.

  This completes the fix for
  https://llvm.org/bugs/show_bug.cgi?id=26519.

  Differential Revision: https://reviews.llvm.org/D24466

Reported by:    Mark Millard
PR:             214433

7 years agoUpdate r309143 to prevent false sharing.
fabient [Fri, 25 Nov 2016 17:20:23 +0000 (17:20 +0000)]
Update r309143 to prevent false sharing.

Reported by: mjg
Approved by: so
MFC after: 1 month

7 years agoFix the TLB conflict abort value. This should be a no-op as we don't use
andrew [Fri, 25 Nov 2016 16:04:36 +0000 (16:04 +0000)]
Fix the TLB conflict abort value. This should be a no-op as we don't use
this value in the code.

7 years agoIPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.
fabient [Fri, 25 Nov 2016 14:44:49 +0000 (14:44 +0000)]
IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets.

Since the previous algorithm, based on bit shifting, does not scale
with large replay windows, the algorithm used here is based on
RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting.
The replay window will be fast to be updated, but will cost as many bits
in RAM as its size.

The previous implementation did not provide a lock on the replay window,
which may lead to replay issues.

Reviewed by: ae
Obtained from: emeric.poupon@stormshield.eu
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D8468

7 years agoIn a dual processor system (2*6 cores) during IPSec throughput tests,
fabient [Fri, 25 Nov 2016 13:49:33 +0000 (13:49 +0000)]
In a dual processor system (2*6 cores) during IPSec throughput tests,
we see a lot of contention on the arc4 lock, used to generate the IV
of the ESP output packets.

The idea of this patch is to split this mutex in order to reduce the
contention on this lock.

Reviewed by: delphij, markm, ache
Approved by: so
Obtained from: emeric.poupon@stormshield.eu
MFC after: 1 month
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D8130

7 years agoAdd WITH_LLD_AS_LD build knob
emaste [Fri, 25 Nov 2016 13:15:28 +0000 (13:15 +0000)]
Add WITH_LLD_AS_LD build knob

If set it installs LLD as /usr/bin/ld.  LLD (as of version 3.9) is not
capable of linking the world and kernel, but can self-host and link many
substantial applications. GNU ld continues to be used for the world and
kernel build, regardless of how this knob is set.

It is on by default for arm64, and off for all other CPU architectures.

Sponsored by: The FreeBSD Foundation

7 years agohyperv/vmbus: Add a simplified version of channel close.
sephe [Fri, 25 Nov 2016 09:13:10 +0000 (09:13 +0000)]
hyperv/vmbus: Add a simplified version of channel close.

So that the caller can know the channel close error and react accordingly.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8600

7 years agohyperv/vmbus: Propagate close error.
sephe [Fri, 25 Nov 2016 08:57:52 +0000 (08:57 +0000)]
hyperv/vmbus: Propagate close error.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8599

7 years agohyperv/vmbus: Always try disconnect/free bufring memory upon channel close
sephe [Fri, 25 Nov 2016 08:31:13 +0000 (08:31 +0000)]
hyperv/vmbus: Always try disconnect/free bufring memory upon channel close

While I'm here, minor wording and style changes.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8598

7 years agohyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.
sephe [Fri, 25 Nov 2016 07:41:42 +0000 (07:41 +0000)]
hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8570

7 years agohyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.
sephe [Fri, 25 Nov 2016 07:24:11 +0000 (07:24 +0000)]
hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.

So that the callers of vmbus_chan_open_br() could handle the passed in
bufring memory properly.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8569

7 years agohyperv/vmbus: No stranded bufring GPADL is allowed.
sephe [Fri, 25 Nov 2016 07:03:45 +0000 (07:03 +0000)]
hyperv/vmbus: No stranded bufring GPADL is allowed.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8568

7 years agohyperv/vmbus: GPADL disconnect error on a revoked channel is benign.
sephe [Fri, 25 Nov 2016 06:48:53 +0000 (06:48 +0000)]
hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8567

7 years agohyperv/vmbus: Don't close unopened channels.
sephe [Fri, 25 Nov 2016 06:12:18 +0000 (06:12 +0000)]
hyperv/vmbus: Don't close unopened channels.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8566

7 years agohyperv/vmbus: Fix sysctl tree leakage, if channel open fails.
sephe [Fri, 25 Nov 2016 06:01:45 +0000 (06:01 +0000)]
hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8565

7 years agohyperv/vmbus: Minor style changes.
sephe [Fri, 25 Nov 2016 05:46:15 +0000 (05:46 +0000)]
hyperv/vmbus: Minor style changes.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8564

7 years agohyperv/vmbus: Commit the GPADL id only after the connection succeeds.
sephe [Fri, 25 Nov 2016 05:35:29 +0000 (05:35 +0000)]
hyperv/vmbus: Commit the GPADL id only after the connection succeeds.

Minor style change.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8563

7 years agohyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined
dexuan [Fri, 25 Nov 2016 04:35:40 +0000 (04:35 +0000)]
hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined

vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at
least shouldn't break build.

Reviewed by: sephe
Approved by: sephe (mentor)
MFC after: 3 days
Sponsored by: Microsoft

7 years agoCorrect lld llvm-tblgen dependency file name
emaste [Fri, 25 Nov 2016 01:24:35 +0000 (01:24 +0000)]
Correct lld llvm-tblgen dependency file name

7 years agoUpgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
dim [Thu, 24 Nov 2016 22:55:24 +0000 (22:55 +0000)]
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
release, and add lld 3.9.0.  Also completely revamp the build system for
clang, llvm, lldb and their related tools.

Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11
support to build; see UPDATING for more information.

Release notes for llvm, clang and lld are available here:
<http://llvm.org/releases/3.9.0/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/clang/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.9.0/tools/lld/docs/ReleaseNotes.html>

Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan
Beich for their help.

Relnotes: yes
MFC after: 1 month

7 years agoMerge ^/head r309118 through r309122.
dim [Thu, 24 Nov 2016 22:33:18 +0000 (22:33 +0000)]
Merge ^/head r309118 through r309122.

7 years agoAdd UPDATING entry for clang/llvm 3.9.0 import.
dim [Thu, 24 Nov 2016 22:18:55 +0000 (22:18 +0000)]
Add UPDATING entry for clang/llvm 3.9.0 import.

7 years agovirtio_console: handle short writes to an Unix domain socket gracefully.
jceel [Thu, 24 Nov 2016 22:16:18 +0000 (22:16 +0000)]
virtio_console: handle short writes to an Unix domain socket gracefully.

writev() can do a short write.  Retrying it results in a very convoluted
and complex code, so we iterate over iovec and do regular stream_write()
instead.

Approved by: trasz
Sponsored by: iXsystems, Inc.

7 years agoAllow opening virtio-console ports from the host side before guest
jceel [Thu, 24 Nov 2016 21:53:42 +0000 (21:53 +0000)]
Allow opening virtio-console ports from the host side before guest
enumerates them.

Approved by: trasz
Sponsored by: iXsystems, Inc.

7 years agovirtio_pci: fix announcement of MSI-X interrupts for queues
avg [Thu, 24 Nov 2016 21:32:04 +0000 (21:32 +0000)]
virtio_pci: fix announcement of MSI-X interrupts for queues

Queues that do not need interrupts - for instance, output queues - do
not have a corresponding entry in vtpci_msix_vq_interrupts.
So, it was wrong to increment a pointer into that array when iterating
over such a queue.

I ran into this bug while trying to use virtio_console(4) that allocates
a lot of queues with every other being an output queue without an
interrupt handler (if MultiplePorts feature is negotiated).

MFC after: 2 weeks

7 years agoMerge ^/head r309106 through r309117.
dim [Thu, 24 Nov 2016 21:14:22 +0000 (21:14 +0000)]
Merge ^/head r309106 through r309117.

7 years agoIn preparation for merging back to head, bump __FreeBSD_version,
dim [Thu, 24 Nov 2016 21:12:43 +0000 (21:12 +0000)]
In preparation for merging back to head, bump __FreeBSD_version,
FREEBSD_CC_VERSION and set date in ObsoleteFiles.inc.

7 years agovirtio_console: correctly determine presense of payload and its length
avg [Thu, 24 Nov 2016 21:12:32 +0000 (21:12 +0000)]
virtio_console: correctly determine presense of payload and its length

MFC after: 2 weeks

7 years agoFix the build post-r309017 for MPC85XX/MPC85XXSPE
jhibbits [Thu, 24 Nov 2016 20:31:46 +0000 (20:31 +0000)]
Fix the build post-r309017 for MPC85XX/MPC85XXSPE

r309017 removed two fields from struct vmmeter, which is embedded in struct
pcpu.  This caused the struct size to change, triggering the CTASSERT in
sys/pcpu.h.  Add the extra 8 bytes back in as padding.

7 years agoAdd the etherswitch(4) support for TI CPSW.
loos [Thu, 24 Nov 2016 20:14:43 +0000 (20:14 +0000)]
Add the etherswitch(4) support for TI CPSW.

Adds VLAN and port management abilities for etherswitchcfg(8).

The code is conditionally enabled for now, because it is not necessary on
single ethernet use cases.

Obtained from: pfSense
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years ago[bytgpio] Fix pc98 build by disabling bytgpio module for this platform
gonzo [Thu, 24 Nov 2016 20:08:17 +0000 (20:08 +0000)]
[bytgpio] Fix pc98 build by disabling bytgpio module for this platform

Reported by: dim

7 years agowait: avoid relocking the child if proc_to_reap returns 1
mjg [Thu, 24 Nov 2016 18:21:48 +0000 (18:21 +0000)]
wait: avoid relocking the child if proc_to_reap returns 1

proc_to_reap would always unlock. However, if it returned 1, kern_wait6
would immediately lock it again. Save the dance.

Reviewed by: kib

7 years agoAdd a warning against modifying this code without understanding it, and
des [Thu, 24 Nov 2016 14:50:21 +0000 (14:50 +0000)]
Add a warning against modifying this code without understanding it, and
an example of how not to make it more portable.  I've had this lying
around uncommitted since 2009...

7 years agoMerge ^/head r308870 through r309105.
dim [Thu, 24 Nov 2016 14:39:04 +0000 (14:39 +0000)]
Merge ^/head r308870 through r309105.

7 years agoSync the rtwn(4) entry with the manpage.
brueffer [Thu, 24 Nov 2016 10:35:49 +0000 (10:35 +0000)]
Sync the rtwn(4) entry with the manpage.

7 years agoMFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback
avg [Thu, 24 Nov 2016 10:34:42 +0000 (10:34 +0000)]
MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback

illumos/illumos-gate@90f2c094b3822f4825f21cef2c2faf7d03b55139
https://github.com/illumos/illumos-gate/commit/90f2c094b3822f4825f21cef2c2faf7d03b55139

https://www.illumos.org/issues/7181
  zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths.
  dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup()
  before the setup is actually completed,
  thus an under-constructed zfsvfs becomes visible.
  Additionally, there is nothing to serialize the two call paths. As a result two
  threads can step on each other's toes.
  assertion failed: zilog->zl_clean_taskq == NULL, file:
  ../../common/fs/zfs/zil.c, line: 1772

  > $c
  vpanic()
  0xfffffffffbdf6928()
  zil_open+0x45(ffffff1bbc5dd000fffffffff7993880)
  zfsvfs_setup+0x84(ffffffb378d77000, 0)
  zfs_resume_fs+0x132(ffffffb378d77000ffffffb37ddcf000)
  zfs_ioc_rollback+0x96(ffffffb37ddcf000ffffff01dcdc4cd0ffffff01aa091000)
  zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368,
  ffffff0004b59e58)
  spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368ffffff0004b59e58)
  fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003,
  ffffff01ab318368ffffff0004b59e58)
  ioctl+0x9b(7, 5a19, 80465f8)
  sys_syscall32+0x1f7()

  > ffffff1bbc5dd000::print objset_t os_zil
  os_zil = 0xffffff1c053cf7c0
  > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after: 2 weeks

7 years agoMFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free
avg [Thu, 24 Nov 2016 10:29:21 +0000 (10:29 +0000)]
MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free
already free blocks

7199 dsl_dataset_rollback_sync may try to free already free blocks
7200 no blocks must be born in a txg after a snaphot is created

illumos/illumos-gate@bfaed0b91e57062c38bc16b4f89db3c8f0052a9b
https://github.com/illumos/illumos-gate/commit/bfaed0b91e57062c38bc16b4f89db3c8f0052a9b

https://www.illumos.org/issues/7199
  dsl_dataset_rollback_sync may try to free already freed blocks when it calls
  dsl_destroy_head_sync_impl to destroy a temporary clone.
  That happens if a snapshot to which we are rolling back and from which the
  clone is created has some ZIL records.

https://www.illumos.org/issues/7200
  No new blocks must be born in a dataset in the same TXG after a snapshot of the
  dataset is taken.
  Those blocks would have the same blk_birth as the dataset's ds_prev_snap_txg
  and as such they would be presumed to belong o the snapshot while in fact they
  do not.
  All the datasets must be clean before sync tasks are run, so the described
  scenario may happen only if one of the sync tasks dirties the dataset and
  another sync task takes its snapshot.
  Then, there will be another sync pass because of the dirty data and the new
  blocks will be born in the same TXG when the data is written out.
  It seems that almost all of the existing sync tasks modify only MOS and do not
  dirty any objsets.
  The only exception that I've been able to identify so far is the rollback which
  can modify an objset when it zeroes out the objset's ZIL.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Author: Andriy Gapon <andriy.gapon@clusterhq.com>

MFC after: 3 weeks

7 years agoMFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs
avg [Thu, 24 Nov 2016 10:21:22 +0000 (10:21 +0000)]
MFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs
and zfs_ioc_rename

illumos/illumos-gate@690041b9caf801816f2d0bac90bc7cecefb73523
https://github.com/illumos/illumos-gate/commit/690041b9caf801816f2d0bac90bc7cecefb73523

https://www.illumos.org/issues/7180
  If a filesystem is not unmounted while the rename is being performed, then, for
  example, a concurrect zfs rollback may call zfs_suspend_fs followed by
  zfs_resume_fs on the same filesystem.
  The latter takes the filesystem's name as an argument. If the filesystem name
  changes as a result of the rename, then dmu_objset_hold(osname, zfsvfs, &os)
  call in zfs_resume_fs would fail resulting in a kernel panic.
  So far I have been able to reproduce this problem on FreeBSD where zfs rename
  has -u option that skips the unmounting before doing the renaming.
  But I think that in theory the same problem can occur on illumos as well,
  because the unmounting is done in userland before invoking the rename ioctl and
  there could be a race with, e.g., zfs mount.
  panic: solaris assert: dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os) == 0 (0x2
  == 0x0), file: /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/
  zfs/zfs_vfsops.c, line: 2210
  KDB: stack backtrace:
  db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df30710
  vpanic() at vpanic+0x182/frame 0xfffffe004df30790
  panic() at panic+0x43/frame 0xfffffe004df307f0
  assfail3() at assfail3+0x2c/frame 0xfffffe004df30810
  zfs_resume_fs() at zfs_resume_fs+0xb9/frame 0xfffffe004df30860
  zfs_ioc_rollback() at zfs_ioc_rollback+0x61/frame 0xfffffe004df308a0
  zfsdev_ioctl() at zfsdev_ioctl+0x65c/frame 0xfffffe004df30940
  devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe004df309a0
  kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe004df30a00
  sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe004df30ae0
  amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df30bf0
  Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df30bf0

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

MFC after: 2 weeks

7 years agoMFV r308989: 6428 set canmount=off on unmounted filesystem tries to
avg [Thu, 24 Nov 2016 10:11:09 +0000 (10:11 +0000)]
MFV r308989: 6428 set canmount=off on unmounted filesystem tries to
unmount children

This is a cosmetic and bookkeeping change as the actual change is
already in FreeBSD.
See r297521, r304520, r308985.

7 years agoFix path for per-user nsmb.conf file
martymac [Thu, 24 Nov 2016 10:04:20 +0000 (10:04 +0000)]
Fix path for per-user nsmb.conf file

~/nsmb.conf, as erroneously introduced by r214387, is never used. Fix the man
page to specify that ~/.nsmbrc is used instead.

PR: 210652
Submitted by: ganael.laplanche@corp.ovh.com
Approved by: gjb (doceng@)

7 years agofirewire: initialize tag label to -1 in fw_xfer_alloc()
avg [Thu, 24 Nov 2016 09:47:56 +0000 (09:47 +0000)]
firewire: initialize tag label to -1 in fw_xfer_alloc()

Zero can be confused for a potentially valid value.
For example, if I load and unload sbp driver I get a lot of messages
like the following:

fw_tl_free: the xfer is not in the queue (tlabel=0, flag=0x0)
send: dst=0x00 tl=0x00 rt=0 tcode=0x0 pri=0x0 src=0x000
recv: dst=0x01 tl=0x21 rt=1 tcode=0x1 pri=0x0 src=0xffc0
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe04464407e0
fw_tl_free() at fw_tl_free+0x18d/frame 0xfffffe0446440820
fw_xfer_unload() at fw_xfer_unload+0xca/frame 0xfffffe0446440840
fw_xferlist_remove() at fw_xferlist_remove+0x2f/frame 0xfffffe0446440870
sbp_detach() at sbp_detach+0x1e0/frame 0xfffffe04464408e0
device_detach() at device_detach+0x80/frame 0xfffffe0446440900
devclass_driver_deleted() at devclass_driver_deleted+0x6a/frame 0xfffffe0446440940
devclass_delete_driver() at devclass_delete_driver+0x7d/frame 0xfffffe0446440980
driver_module_handler() at driver_module_handler+0xff/frame 0xfffffe04464409d0
module_unload() at module_unload+0x32/frame 0xfffffe04464409f0
linker_file_unload() at linker_file_unload+0x24b/frame 0xfffffe0446440a40
kern_kldunload() at kern_kldunload+0xbc/frame 0xfffffe0446440a70
amd64_syscall() at amd64_syscall+0x314/frame 0xfffffe0446440bf0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0446440bf0

MFC after: 2 weeks

7 years agofwohci: report whether PhysicalUpperBound register is implemented
avg [Thu, 24 Nov 2016 09:43:42 +0000 (09:43 +0000)]
fwohci: report whether PhysicalUpperBound register is implemented

Please see section 5.15 of 1394 OHCI Specification.
If the register is not implemented, then the physical response unit is
limited to the first 4GB of the physical memory.
In that case the non-cooperative debugging over firewire (using /dev/fwmem)
can not be expected to work if a target has more RAM than that.
The method is described in gdb.4 and the Developer's Handbook.

It seems that most of the consumer hardware does not implement
PhysicalUpperBound register.

MFC after: 1 week

7 years agofurther fix zfs_lock() diagnostics
avg [Thu, 24 Nov 2016 09:00:51 +0000 (09:00 +0000)]
further fix zfs_lock() diagnostics

It was very wrong to look at the vnode and znode internals without
having locked the vnode first.

Reported by: pho
Tested by: pho
MFC after: 1 week
X-MFC with: r308887

7 years agohyperv/hn: Fix primary channel revocation
sephe [Thu, 24 Nov 2016 07:35:16 +0000 (07:35 +0000)]
hyperv/hn: Fix primary channel revocation

Since hypervisor will not drain the TX bufring, once the channels are
revoked:
- Setup vmbus orphan handler properly.
- Make sure that suspension will not wait the TX bufring draining
  forever.
- GC the pending TX descs on detach path, before freeing the busdma
  stuffs.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8559

7 years agoEnable the SPI1 and SPI2 node for Olimex A20 SOM EVB.
manu [Thu, 24 Nov 2016 06:43:11 +0000 (06:43 +0000)]
Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB.
This was missed in r309079.

7 years agohyperv/vmbus: Fix the multi-channel revoking on vmbus side.
sephe [Thu, 24 Nov 2016 06:01:29 +0000 (06:01 +0000)]
hyperv/vmbus: Fix the multi-channel revoking on vmbus side.

- Reference count the sub-channel when channel offer message is
  processed, so that immediate rescind message on the same channel
  will not race sub-channel open on driver side.
- Drop the above reference when sub-channel is closed, this closely
  mimics the hypervisor's reaction when primary channel is closed
  on the VM side.  No drivers use sub-channel after primary channel
  is closed.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8546

7 years agoshare/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386
dexuan [Thu, 24 Nov 2016 05:52:28 +0000 (05:52 +0000)]
share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386

We shouldn't install them on the architectures not supported by Hyper-V.

And, hv_ata_pci_disengage.4.gz should be removed from all architectures:
1) It should have only applied to Hyper-V;
2) For Hyper-V platforms (amd64 and i386), the related driver was removed by
r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016),
because now we have a better mechanism to disble the ata driver for hard
disks when the VM runs on Hyper-V.

Reviewed by: sephe, andrew, jhb
Approved by: sephe (mentor)
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8572

7 years agohyperv/vmbus: Fix the primary channel revoking on vmbus side.
sephe [Thu, 24 Nov 2016 05:18:45 +0000 (05:18 +0000)]
hyperv/vmbus: Fix the primary channel revoking on vmbus side.

Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and
vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked
primary channels.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8545

7 years agohyperv/vmbus: Implement orphan support for transaction API
sephe [Thu, 24 Nov 2016 04:58:13 +0000 (04:58 +0000)]
hyperv/vmbus: Implement orphan support for transaction API

It will be used to fix the primary channel revocation support.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8525

7 years agoEnable the SCL and SDA i2c line for DDC.
manu [Thu, 24 Nov 2016 01:24:26 +0000 (01:24 +0000)]
Enable the SCL and SDA i2c line for DDC.
This is an undocumented register that we need to set if we do not want to
rely on u-boot or other bootloader.

7 years agoAdd new device IDs
shurd [Thu, 24 Nov 2016 00:49:00 +0000 (00:49 +0000)]
Add new device IDs

Add device IDs for new hardware, sort the device IDs, add comment
regarding fragice NPAR/VF detection.

Approved by: davidch
MFC after: 6 days
Sponsored by: Broadcom Limited

7 years ago[rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one
gonzo [Thu, 24 Nov 2016 00:45:52 +0000 (00:45 +0000)]
[rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one

Now that BCM283x source are buildable with SMP option it cam be moved to
GENERIC SMP config. SMP itself does not work on RPi3 yet due to lack of
PSCI monitor which is work in progress at the moment

7 years ago[rpi3] Fix SMP build for FreeBSD/arm64
gonzo [Thu, 24 Nov 2016 00:39:17 +0000 (00:39 +0000)]
[rpi3] Fix SMP build for FreeBSD/arm64

7 years agoFix version string
shurd [Thu, 24 Nov 2016 00:15:32 +0000 (00:15 +0000)]
Fix version string

This is no longer on github, but in FreeBSD base.

Approved by: davidch
MFC after: 6 days
Sponsored by: Broadcom Limited

7 years agortwn.4: fix hostapd(8) man page section.
avos [Wed, 23 Nov 2016 22:57:47 +0000 (22:57 +0000)]
rtwn.4: fix hostapd(8) man page section.

7 years agoAdd tunable to disable destructive dtrace
gnn [Wed, 23 Nov 2016 22:50:20 +0000 (22:50 +0000)]
Add tunable to disable destructive dtrace

Submitted by: Joerg Pernfuss <code.jpe@gmail.com>
Reviewed by: rstone, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8624

7 years agoFix _mips_rtld_bind() to handle ELF filters.
jhb [Wed, 23 Nov 2016 20:21:53 +0000 (20:21 +0000)]
Fix _mips_rtld_bind() to handle ELF filters.

MIPS does not use the common _rtld_bind() to handle runtime binding.
Instead, it uses a private _mips_rtld_bind().  Update _mips_rtld_bind()
to include the changes made to _rtld_bind() in r216695 and r218476 to
support upgrading the read-locked rtld_bind_lock to a write lock when
an object with a filter is encountered.

While here, add a 'where' variable to track the location of the fixup
in the GOT to make the code flow more closely match _rtld_bind().

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D8625

7 years agocache: ensure that the number of bucket locks does not exceed hash size
mjg [Wed, 23 Nov 2016 19:50:12 +0000 (19:50 +0000)]
cache: ensure that the number of bucket locks does not exceed hash size

The size can be changed by side effect of modifying kern.maxvnodes.

Since numbucketlocks was not modified, setting a sufficiently low value
would give more locks than actual buckets, which would then lead to
corruption.

Force the number of buckets to be not smaller.

Note this should not matter for real world cases.

Reported and tested by: pho

7 years agoFix various mdoc issues reported by mandoc -Tlint.
brueffer [Wed, 23 Nov 2016 19:19:11 +0000 (19:19 +0000)]
Fix various mdoc issues reported by mandoc -Tlint.

7 years agoFix various mdoc issues reported by mandoc -Tlint.
brueffer [Wed, 23 Nov 2016 18:45:15 +0000 (18:45 +0000)]
Fix various mdoc issues reported by mandoc -Tlint.

7 years agoEnable UEXT related nodes for Olimex A20 SOM
manu [Wed, 23 Nov 2016 18:31:34 +0000 (18:31 +0000)]
Enable UEXT related nodes for Olimex A20 SOM

UEXT are Universal EXTension connector from Olimex. They embed i2c, spi
and uart pins along power in one connector and are found on most,
if not all, Olimex boards.
The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on
those two connectors.

Patch has been applied upstream, in the meantime add the nodes to our custom
DTS.

7 years agoTest that the emac device is enabled in probe function
manu [Wed, 23 Nov 2016 18:07:44 +0000 (18:07 +0000)]
Test that the emac device is enabled in probe function

MFC after: 3 days

7 years agoRelease laundered vnode pages to the head of the inactive queue.
markj [Wed, 23 Nov 2016 17:53:07 +0000 (17:53 +0000)]
Release laundered vnode pages to the head of the inactive queue.

The swap pager enqueues laundered pages near the head of the inactive queue
to avoid another trip through LRU before reclamation. This change adds
support for this behaviour to the vnode pager and makes use of it in UFS and
ext2fs. Some ioflag handling is consolidated into a common subroutine so
that this support can be easily extended to other filesystems which make use
of the buffer cache. No changes are needed for ZFS since its putpages
routine always undirties the pages before returning, and the laundry
thread requeues the pages appropriately in this case.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D8589

7 years agoFix comment typo.
brueffer [Wed, 23 Nov 2016 16:54:27 +0000 (16:54 +0000)]
Fix comment typo.

PR: 208484
Submitted by: madpilot
MFC after: 1 week

7 years ago- Add myself (misha) as a ports committer
misha [Wed, 23 Nov 2016 14:15:51 +0000 (14:15 +0000)]
- Add myself (misha) as a ports committer
- Update mentor/mentee relationships

Approved by: jpaetzel (mentor)

7 years agoSplit MALTA board config to big and little endian versions.
br [Wed, 23 Nov 2016 11:56:22 +0000 (11:56 +0000)]
Split MALTA board config to big and little endian versions.

This fixes compilation after r308807 ("Pass MACHINE_ARCH on
command line for MIPS kernels.")

Sponsored by: DARPA, AFRL

7 years agoIncrease pcpu size to 512 so it become both denominator
br [Wed, 23 Nov 2016 11:30:40 +0000 (11:30 +0000)]
Increase pcpu size to 512 so it become both denominator
of PAGE_SIZE and aligned to CACHE_LINE_SIZE.

This fixes CTASSERT.

Sponsored by: DARPA, AFRL

7 years agoRemove debugging code.
des [Wed, 23 Nov 2016 10:52:19 +0000 (10:52 +0000)]
Remove debugging code.

7 years agoMark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and
andrew [Wed, 23 Nov 2016 09:38:10 +0000 (09:38 +0000)]
Mark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and
the kernel is using FDT.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoRemove the unneeded ofw_cpu_reg function signature, it's not used in this
andrew [Wed, 23 Nov 2016 09:33:47 +0000 (09:33 +0000)]
Remove the unneeded ofw_cpu_reg function signature, it's not used in this
file.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agohyperv/vmbus: Merge free/active locks.
sephe [Wed, 23 Nov 2016 08:30:02 +0000 (08:30 +0000)]
hyperv/vmbus: Merge free/active locks.

These functions are only used by management stuffs, so there are
no needs to introduce extra complexity.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8524

7 years agoThis little BSD licensed library has been kicking around for years.
julian [Wed, 23 Nov 2016 07:57:52 +0000 (07:57 +0000)]
This little BSD licensed library has been kicking around for years.
It allows one to trivially convert an absolute path to a relative path
and the reverse. The test programs themselves are very useful in scripts
but the real use comes shortly with the -r and -a arguments to ln.
These are sometimes known as the --relative and --absolute flags and
can force a symlink to be relative when you only have an absolue path.
Another place these are sometimes used is to add -a and -r args to 'realpath'.
Incredibly useful in Makefiles.

I was going to just add the files in with 'ln' but a library makes more sense.
The test programs may come out in their own right some day for scripting.

released under a BSD 2-clause:
 * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved.
 * Copyright (c) 1999 Tama Communications Corporation. All rights reserved.

The test directry does not conform to any framework.
Not connected to build.
doc people may want to play with the manual pages.

Obtained from:  https://www.tamacom.com/pathconvert.html  Shigio Yamaguchi.
MFC after: 1 month
Relnotes:       yes
Sponsored by:   Panzura, Tama Communications Corporation

7 years agohyperv/vmbus: Set a mark on the revoked channel.
sephe [Wed, 23 Nov 2016 05:03:44 +0000 (05:03 +0000)]
hyperv/vmbus: Set a mark on the revoked channel.

This will be used to fix device detach DEVMETHOD for revoked primary
channel.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8522

7 years agoDo not attempt to disable/release clock if it had not been enabled.
manu [Wed, 23 Nov 2016 01:44:28 +0000 (01:44 +0000)]
Do not attempt to disable/release clock if it had not been enabled.
While here fix a style(9) issue.

MFC after: 1 week

7 years agoAdd missing break to switch statement
shurd [Wed, 23 Nov 2016 00:26:31 +0000 (00:26 +0000)]
Add missing break to switch statement

Minimal impact, would allow selection of LR media when KR is connected.

Reported by: Coverity
Approved by: davidch
MFC after: 7 days
Sponsored by: Broadcom Limited

7 years agoAllocate a struct ifreq rather than using a (wrong) computed size for
brooks [Tue, 22 Nov 2016 22:45:15 +0000 (22:45 +0000)]
Allocate a struct ifreq rather than using a (wrong) computed size for
the BIOCSETIF ioctl.

The kernel always copies an entire struct ifreq and IPv4 addresses will
always fit in an ifreq.

On systems with pointers larger than 64-bits, the computed size will be
less than the size of struct ifreq, potentially resulting in the kernel
attempting to copyin memory from outside the allocation.

Reviewed by: jhb
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8445

7 years agoopen(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW.
jilles [Tue, 22 Nov 2016 22:30:55 +0000 (22:30 +0000)]
open(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW.

We return [EMLINK] instead of [ELOOP] when trying to open a symlink with
O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code
like cmp -h and xz takes advantage of this.

PR: 214633
Reviewed by: kib, imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8586

7 years agoPass the correct size argument to ioctl(DIOCGSECTORSIZE)
phk [Tue, 22 Nov 2016 22:10:58 +0000 (22:10 +0000)]
Pass the correct size argument to ioctl(DIOCGSECTORSIZE)

7 years agoAdd the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers.
andrew [Tue, 22 Nov 2016 19:31:32 +0000 (19:31 +0000)]
Add the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoAdd myself (dab) as a src committer and vangyzen as my mentor.
dab [Tue, 22 Nov 2016 18:32:20 +0000 (18:32 +0000)]
Add myself (dab) as a src committer and vangyzen as my mentor.

Approved by: vangyzen (mentor)

7 years agoRevert r306186 ("Adjust the sopt_val pointer on bigendian systems").
br [Tue, 22 Nov 2016 18:31:43 +0000 (18:31 +0000)]
Revert r306186 ("Adjust the sopt_val pointer on bigendian systems").

This logic doesn't work with bigger sopt_valsize (e.g. when ipfw
passing 2048 bytes rule).

Reported by: adrian
Sponsored by: DARPA, AFRL

7 years agoRemove PG_CACHED-related fields from struct vmmeter, because they are no
alc [Tue, 22 Nov 2016 18:13:46 +0000 (18:13 +0000)]
Remove PG_CACHED-related fields from struct vmmeter, because they are no
longer used.  More precisely, they are always zero because the code that
decremented and incremented them no longer exists.

Bump __FreeBSD_version to mark this change.

Reviewed by: kib, markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8583

7 years agoOnly build acpi_timer.c on x86, it fails on arm64 as it attempts to access
andrew [Tue, 22 Nov 2016 18:13:04 +0000 (18:13 +0000)]
Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access
an invalid address. It is also unneeded on arm64 as we use the ARM Generic
Timer driver.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years ago[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you...
adrian [Tue, 22 Nov 2016 17:36:16 +0000 (17:36 +0000)]
[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this."

TODO:

* drink real coffee before committing in the morning, or there's a high
  risk of more obviously self-evident commits being turned into attempts
  at humour.

Reported by: cem, Coverity CID 1366219

7 years agoremove unnecessary vm includes from setproctitle
emaste [Tue, 22 Nov 2016 16:00:18 +0000 (16:00 +0000)]
remove unnecessary vm includes from setproctitle

vm headers were needed only for the PS_STRINGS fallback, which was
removed in r297888.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoRefactor fetch_connect() and fetch_bind() to improve readability and avoid
des [Tue, 22 Nov 2016 13:30:07 +0000 (13:30 +0000)]
Refactor fetch_connect() and fetch_bind() to improve readability and avoid
repeating the same DNS lookups.

MFC after: 3 weeks

7 years agoOn error, bread(9) zeroes buffer pointer, do not dereference it.
kib [Tue, 22 Nov 2016 13:24:57 +0000 (13:24 +0000)]
On error, bread(9) zeroes buffer pointer, do not dereference it.
See r294954 for the bread(9) change and r297401 for similar cd9660 fix.

Reported and tested by: Joshua Kinard <kumba@gentoo.org>
PR: 214705
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agorevert r304520, set canmount=on is not supposed to mount the filesystem
avg [Tue, 22 Nov 2016 11:44:30 +0000 (11:44 +0000)]
revert r304520, set canmount=on is not supposed to mount the filesystem

Not sure where I got the idea that it should.

See https://github.com/openzfs/openzfs/pull/218

Reported by: mahrens
Pointyhat to: avg
MFC after: 5 days

7 years agoUse buffer pager for NFS.
kib [Tue, 22 Nov 2016 10:58:24 +0000 (10:58 +0000)]
Use buffer pager for NFS.

The pager, due to its construction, implements clustering for the
page-ins.  In particular, buildworld load demonstrates reduction of
the READ RPCs from 39k down to 24k.  No change in real or CPU time was
observed.

Discussed with, and measured by: bde
No objections from: rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

7 years agoMinor cleanup, remove unneeded XXX comments and unused re-define.
kib [Tue, 22 Nov 2016 10:24:59 +0000 (10:24 +0000)]
Minor cleanup, remove unneeded XXX comments and unused re-define.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week