]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoSort mlx5tool correctly in usr.sbin/Makefile
emaste [Wed, 16 May 2018 02:51:30 +0000 (02:51 +0000)]
Sort mlx5tool correctly in usr.sbin/Makefile

6 years agoClarify that boot_mute / boot -m mutes kernel console only
emaste [Wed, 16 May 2018 02:15:18 +0000 (02:15 +0000)]
Clarify that boot_mute / boot -m mutes kernel console only

Perhaps RB_MUTE could mute user startup (rc) output as well, but right
now it mutes only kernel console output, so make the documentation match
reality.

PR: 228193
Sponsored by: The FreeBSD Foundation

6 years agointel-ucode-split: list platform ids based on processor_flags
emaste [Wed, 16 May 2018 01:55:52 +0000 (01:55 +0000)]
intel-ucode-split: list platform ids based on processor_flags

The Intel CPU "Platform Id" is a 3-bit integer reported by a given MSR.
Intel microcode updates have an 8-bit field to indicate Platform Id
compatibility - one bit in the mask for each of the possible Platform Id
values.  To simplify interpretation, report the Platform Id mask also as
a list.

6 years agointel-ucode-split: exit on unknown ucode header version
emaste [Wed, 16 May 2018 01:41:36 +0000 (01:41 +0000)]
intel-ucode-split: exit on unknown ucode header version

6 years agoRegen src.conf.5 after r333658
emaste [Wed, 16 May 2018 01:34:36 +0000 (01:34 +0000)]
Regen src.conf.5 after r333658

6 years agoForce WITHOUT_FREEBSD_UPDATE when WITHOUT_PORTSNAP is set
emaste [Wed, 16 May 2018 01:33:48 +0000 (01:33 +0000)]
Force WITHOUT_FREEBSD_UPDATE when WITHOUT_PORTSNAP is set

freebsd-update depends on phttpget from portsnap. We could move phttpget
out of portsnap and build it as long as WITHOUT_FREEBSD_UPDATE and
WITHOUT_PORTSNAP are not both set, but for now just make the dependency
explicit.

PR: 228220
Reported by: Dries Michiels
Sponsored by: The FreeBSD Foundation

6 years agointel-ucode-split: add a -v verbose flag
emaste [Wed, 16 May 2018 01:08:11 +0000 (01:08 +0000)]
intel-ucode-split: add a -v verbose flag

And be quiet by default.

Sponsored by: The FreeBSD Foundation

6 years agoUnhook DEBUG_BUFRING from INVARIANTS
gallatin [Tue, 15 May 2018 23:55:38 +0000 (23:55 +0000)]
Unhook DEBUG_BUFRING from INVARIANTS

Some of the DEBUG_BUFRING checks are racy, and can lead to
spurious assertions when run under high load.  Unhook these
from INVARIANTS until the author can fix or remove them.

Reviewed by: mmacy
Sponsored by: Netflix

6 years agoFix stale dependencies on libcasper libraries.
bdrewery [Tue, 15 May 2018 23:46:49 +0000 (23:46 +0000)]
Fix stale dependencies on libcasper libraries.

Libcasper and its modules have no static libraries so don't define
paths to them.  This fixes LIBADD automatically adding DPADD
entries for casper.

Reported by: sbruno
Sponsored by: Dell EMC Isilon

6 years agocxgbe(4): Add support for two more flash parts.
np [Tue, 15 May 2018 22:26:09 +0000 (22:26 +0000)]
cxgbe(4): Add support for two more flash parts.

Obtained from: Chelsio Communications
MFC after: 2 days
Sponsored by: Chelsio Communications

6 years agoHold the reference count until the CCB is released
imp [Tue, 15 May 2018 22:22:10 +0000 (22:22 +0000)]
Hold the reference count until the CCB is released

When a disk disappears and the periph is invalidated, any I/Os that
are pending with the controller can cause a crash when they
complete. Move to holding the softc reference count taken in dastart()
until the I/O is complete rather than only until xpt_action()
returns. (This approach was suggested by Ken Merry.) This extends
the method used in da to ada, nda, and mda.

Sponsored by: Netflix
Submitted by: Chuck Silvers

6 years agocxgbe(4): Claim some more T5 and T6 boards.
np [Tue, 15 May 2018 21:54:59 +0000 (21:54 +0000)]
cxgbe(4): Claim some more T5 and T6 boards.

MFC after: 2 days
Sponsored by: Chelsio Communications

6 years agoAdd a tool to split Intel microcode into one file per Platform Id
emaste [Tue, 15 May 2018 21:51:29 +0000 (21:51 +0000)]
Add a tool to split Intel microcode into one file per Platform Id

Intel now releases microcode updates in files named after
<family>-<model>-<stepping>.  In some cases a single file may include
microcode for multiple Platform Ids for the same family, model, and
stepping.  Our current microcode update tooling (/usr/sbin/cpucontrol)
only processes the first microcode update in the file.

This tool splits combined files into individual files with one microcode
update each, named as
<family>-<model>-<stepping>.<platform_id_mask>.

Adding this to tools/ for experimentation and testing.  In the future
we'll want to have cpucontrol or other tooling work directly with the
Intel-provided microcode files.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15433

6 years agoHold the reference count until the CCB is released
imp [Tue, 15 May 2018 21:25:35 +0000 (21:25 +0000)]
Hold the reference count until the CCB is released

When a disk disappears and the periph is invalidated, any I/Os that
are pending with the controller can cause a crash when they
complete. Move to holding the softc reference count taken in dastart()
until the I/O is complete rather than only until xpt_action()
returns. (This approach was suggested by Ken Merry.)

Sponsored by: Netflix
Submitted by: Chuck Silvers
Differential Revision: https://reviews.freebsd.org/D15435

6 years ago- If present, take advantage of the R/W cache of eMMC revision 1.5 and
marius [Tue, 15 May 2018 21:15:09 +0000 (21:15 +0000)]
- If present, take advantage of the R/W cache of eMMC revision 1.5 and
  later devices. These caches work akin to the ones found in HDDs/SSDs
  that ada(4)/da(4) also enable if existent, but likewise increase the
  likelihood of data loss in case of a sudden power outage etc. On the
  other hand, write performance is up to twice as high for e. g. 1 GiB
  files depending on the actual chip and transfer mode employed.
  For maximum data integrity, the usage of eMMC caches can be disabled
  via the hw.mmcsd.cache tunable.
- Get rid of the NOP mmcsd_open().

6 years agoRestore style(9) conformance after r320844 (actually requested pre-
marius [Tue, 15 May 2018 21:07:11 +0000 (21:07 +0000)]
Restore style(9) conformance after r320844 (actually requested pre-
commit) and bring the r320844 additions in line with existing bits.

6 years agoEnd grace for the NFSv4 server if all mounts do ReclaimComplete.
rmacklem [Tue, 15 May 2018 20:28:50 +0000 (20:28 +0000)]
End grace for the NFSv4 server if all mounts do ReclaimComplete.

The NFSv4 protocol requires that the server only allow reclaim of state
and not issue any new open/lock state for a grace period after booting.
The NFSv4.0 protocol required this grace period to be greater than the
lease duration (over 2minutes). For NFSv4.1, the client tells the server
that it has done reclaiming state by doing a ReclaimComplete operation.
If all NFSv4 clients are NFSv4.1, the grace period can end once all the
clients have done ReclaimComplete, shortening the time period considerably.
This patch does this. If there are any NFSv4.0 mounts, the grace period
will still be over 2minutes.
This change is only an optimization and does not affect correct operation.

Tested by: andreas.nagy@frequentis.com
MFC after: 2 months

6 years agoUnwrap a line that no longer requires wrapping.
brooks [Tue, 15 May 2018 20:14:38 +0000 (20:14 +0000)]
Unwrap a line that no longer requires wrapping.

6 years agoRemove stray tabs from in_lltable_dump_entry().
brooks [Tue, 15 May 2018 20:13:00 +0000 (20:13 +0000)]
Remove stray tabs from in_lltable_dump_entry().

6 years agoUnwrap some not-so-long lines now that extra tabs been removed.
brooks [Tue, 15 May 2018 17:59:46 +0000 (17:59 +0000)]
Unwrap some not-so-long lines now that extra tabs been removed.

6 years agoRemove stray tabs in in6_lltable_dump_entry(). NFC.
brooks [Tue, 15 May 2018 17:57:46 +0000 (17:57 +0000)]
Remove stray tabs in in6_lltable_dump_entry().  NFC.

6 years agovmmdev: return EFAULT when trying to read beyond VM system memory max address
antoine [Tue, 15 May 2018 17:20:58 +0000 (17:20 +0000)]
vmmdev: return EFAULT when trying to read beyond VM system memory max address

Currently, when using dd(1) to take a VM memory image, the capture never ends,
reading zeroes when it's beyond VM system memory max address.
Return EFAULT when trying to read beyond VM system memory max address.

Reviewed by: imp, grehan, anish
Approved by: grehan
Differential Revision: https://reviews.freebsd.org/D15156

6 years agocalibrate lapic timer in native_lapic_setup
avg [Tue, 15 May 2018 16:56:30 +0000 (16:56 +0000)]
calibrate lapic timer in native_lapic_setup

The idea is to calibrate the LAPIC timer just once and only on boot,
given that [at present] the timer constants are global and shared
between all processors.

My primary motivation is to fix a panic that can happen when dynamically
switching to lapic timer.  The panic is caused by a recursion on
et_hw_mtx when printing the calibration results to console.  See the
review for the details of the panic.

Also, the code should become slightly simpler and easier to read.  The
previous code was racy too.  Multiple processors could start calibrating
the global constants concurrently, although that seems to have been
benign.

Reviewed by: kib, mav, jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D15422

6 years agoCheck that ifma_protospec != NULL in inm_lookup
shurd [Tue, 15 May 2018 16:54:41 +0000 (16:54 +0000)]
Check that ifma_protospec != NULL in inm_lookup

If ifma_protospec is NULL when inm_lookup() is called, there
is a dereference in a NULL struct pointer. This ensures that struct is
not NULL before comparing the address.

Reported by: dumbbell
Reviewed by: sbruno
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15440

6 years agoIncrease the number of pages we allocate in the arm64 early boot. We are
andrew [Tue, 15 May 2018 16:44:35 +0000 (16:44 +0000)]
Increase the number of pages we allocate in the arm64 early boot. We are
already close to the limit so increasing the kernel size may cause it to
fail to boot when it runs past the end of allocated memory.

Reported by: manu
Sponsored by: DARPA, AFRL

6 years agoAllow freebsd32 __sysctl(2) to return ENOMEM.
brooks [Tue, 15 May 2018 16:24:58 +0000 (16:24 +0000)]
Allow freebsd32 __sysctl(2) to return ENOMEM.

This is required by programs like sockstat that read variably sized
sysctls such as kern.file.  The normal path has no such restriction and
the restriction was added without comment along with initial support for
freebsd32 in 2002 (r100384).

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

6 years agoAdd new USB HID driver for Super Nintendo gamepads.
hselasky [Tue, 15 May 2018 15:36:34 +0000 (15:36 +0000)]
Add new USB HID driver for Super Nintendo gamepads.

Differential Revision: https://reviews.freebsd.org/D15385
Submitted by: johalun@gmail.com (Johannes Lundberg)
Sponsored by: Mellanox Technologies

6 years agoFix sysctl description.
trasz [Tue, 15 May 2018 15:11:52 +0000 (15:11 +0000)]
Fix sysctl description.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

6 years agoigb(4):
sbruno [Tue, 15 May 2018 13:30:59 +0000 (13:30 +0000)]
igb(4):
I210 restore functionality if pxeboot rom is enabled on this device.

r333345 attempted to determine if this code was needed or it was some kind
of work around for a problem.  Turns out, its definitely a work around for
hardware locking and synchronization that manifests itself if the option
Rom is enabled and is selected as a boot device (there was a PXE attempt).

Reviewed by: mmacy
Differential Revision: https://reviews.freebsd.org/D15439

6 years agoFix 'zpool create -t <tempname>'
avg [Tue, 15 May 2018 13:27:29 +0000 (13:27 +0000)]
Fix 'zpool create -t <tempname>'

Creating a pool with a temporary name fails when we also specify custom
dataset properties: this is because we mistakenly call
zfs_set_prop_nvlist() on the "real" pool name which, as expected,
cannot be found because the SPA is present in the namespace with the
temporary name.

Fix this by specifying the correct pool name when setting the dataset
properties.

Author: loli10K <ezomori.nozomu@gmail.com>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Obtained from: ZFS on Linux, zfsonlinux/zfs@4ceb8dd6fdfdde
MFC after: 1 week

6 years agoAdd support for setting type of service, TOS, for outgoing RDMA connections
hselasky [Tue, 15 May 2018 07:46:24 +0000 (07:46 +0000)]
Add support for setting type of service, TOS, for outgoing RDMA connections
in the krping kernel test utility.

MFC after: 3 days
Sponsored by: Mellanox Technologies

6 years agovq_getchain() can return -1 if some descriptor(s) are invalid and prints
araujo [Tue, 15 May 2018 05:55:29 +0000 (05:55 +0000)]
vq_getchain() can return -1 if some descriptor(s) are invalid and prints
a diagnostic message. So we do a sanity checking on the return value
of vq_getchain().

Spotted by: gcc49
Reviewed by: avg
MFC after: 4 weeks
Sponsored by: iXsystems Inc.
Differential Revision: https://reviews.freebsd.org/D15388

6 years agocxgbetool(8): Provide user interface for hashfilters, hardware NAT, and
np [Tue, 15 May 2018 04:31:11 +0000 (04:31 +0000)]
cxgbetool(8): Provide user interface for hashfilters, hardware NAT, and
other filtering related features that were recently added to the driver.

Sponsored by: Chelsio Communications

6 years agocxgbe(4): Filtering related features and fixes.
np [Tue, 15 May 2018 04:24:38 +0000 (04:24 +0000)]
cxgbe(4): Filtering related features and fixes.

- Driver support for hardware NAT.
- Driver support for swapmac action.
- Validate a request to create a hashfilter against the filter mask.
- Add a hashfilter config file for T5.

Sponsored by: Chelsio Communications

6 years agosubr_pidctrl: use standard 2-Clause FreeBSD license and disclaimer
emaste [Tue, 15 May 2018 00:50:09 +0000 (00:50 +0000)]
subr_pidctrl: use standard 2-Clause FreeBSD license and disclaimer

Approved by: jeff

6 years agoLet mmcsd_ioctl() ensure appropriate privileges via priv_check(9).
marius [Mon, 14 May 2018 21:57:45 +0000 (21:57 +0000)]
Let mmcsd_ioctl() ensure appropriate privileges via priv_check(9).

6 years agoThe broken DDR52 support of Intel Bay Trail eMMC controllers rumored
marius [Mon, 14 May 2018 21:46:06 +0000 (21:46 +0000)]
The broken DDR52 support of Intel Bay Trail eMMC controllers rumored
in the commit log of r321385 has been confirmed via the public VLI54
erratum. Thus, stop advertising DDR52 for these controllers.
Note that this change should hardly make a difference in practice as
eMMC chips from the same era as these SoCs most likely support HS200
at least, probably even up to HS400ES.

6 years agoReplace rmlock with epoch in lagg
shurd [Mon, 14 May 2018 20:06:49 +0000 (20:06 +0000)]
Replace rmlock with epoch in lagg

Use the new epoch based reclamation API. Now the hot paths will not
block at all, and the sx lock is used for the softc data.  This fixes LORs
reported where the rwlock was obtained when the sxlock was held.

Submitted by: mmacy
Reported by: Harry Schmalzbauer <freebsd@omnilan.de>
Reviewed by: sbruno
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D15355

6 years agoMake the common interrupt entry point labels local labels.
jhb [Mon, 14 May 2018 17:27:53 +0000 (17:27 +0000)]
Make the common interrupt entry point labels local labels.

Kernel debuggers depend on symbol names to find stack frames with a
trapframe rather than a normal stack frame.  The labels used for the
shared interrupt entry point for the PTI and non-PTI cases did not
match the existing patterns confusing debuggers.  Add the '.L' prefix
to mark these symbols as local so they are not visible in the symbol
table.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Chelsio Communications

6 years agosctp_get_mbuf_for_msg() should honor the allinone parameter.
tuexen [Mon, 14 May 2018 15:16:51 +0000 (15:16 +0000)]
sctp_get_mbuf_for_msg() should honor the allinone parameter.

When it is not required that the buffer is not a chain, return
a chain. This is based on a patch provided by Irene Ruengeler.

6 years agoEnsure that the MTU's used are multiple of 4.
tuexen [Mon, 14 May 2018 13:50:17 +0000 (13:50 +0000)]
Ensure that the MTU's used are multiple of 4.

The length of SCTP packets is always a multiple of 4. Therefore,
ensure that the MTUs used are also a multiple of 4.

Thanks to Irene Ruengeler for providing an earlier version of this
patch.

MFC after: 1 week

6 years agohwpmc: don't reference domain index with no memory backing it
mmacy [Mon, 14 May 2018 06:11:25 +0000 (06:11 +0000)]
hwpmc: don't reference domain index with no memory backing it

On multi-socket the domain will be correctly set for a given CPU
regardless of whether or not NUMA is enabled.

Approved by: sbruno

6 years agoHandle thread-local storage (TLS) segments correctly when
phil [Mon, 14 May 2018 05:21:18 +0000 (05:21 +0000)]
Handle thread-local storage (TLS) segments correctly when
copying (objcopy) and displaying (readelf) them.

PR: 227552
Submitted by: kaiw (maintainer)
Reported by: jachmann@unitix.org
Reviewed by: phil
MFC after: 1 day

6 years agoFinal fix for alignment issues with the page table first patched with
nwhitehorn [Mon, 14 May 2018 04:00:52 +0000 (04:00 +0000)]
Final fix for alignment issues with the page table first patched with
r333273 and partially reverted with r333594.

Older CPUs implement addition of offsets into the page table by a
bitwise OR rather than actual addition, which only works if the table is
aligned at a multiple of its own size (they also require it to be aligned
at a multiple of 256KB). Newer ones do not have that requirement, but it
hardly matters to enforce it anyway.

The original code was failing on newer systems with huge amounts of RAM
(> 512 GB), in which the page table was 4 GB in size. Because the
bootstrap memory allocator took its alignment parameter as an int, this
turned into a 0, removing any alignment constraint at all and making
the MMU fail. The first round of this patch (r333273) fixed this case by
aligning it at 256 KB, which broke older CPUs. Fix this instead by widening
the alignment parameter.

6 years agopmc: don't add pmc owner to list until setup is complete
mmacy [Mon, 14 May 2018 01:08:47 +0000 (01:08 +0000)]
pmc: don't add pmc owner to list until setup is complete

Once a pmc owner is added to the pmc_ss_owners list it is
visible for all to see. We don't want this to happen until
setup is complete.

Reported by: mjg
Approved by: sbruno

6 years agopmc: fix buildworld
mmacy [Mon, 14 May 2018 00:56:33 +0000 (00:56 +0000)]
pmc: fix buildworld

hid ck_queue.h from user

Approved by: sbruno

6 years agohwpmc: fix load/unload race and vm map LOR
mmacy [Mon, 14 May 2018 00:21:04 +0000 (00:21 +0000)]
hwpmc: fix load/unload race and vm map LOR

- fix load/unload race by allocating the per-domain list structure at boot

- fix long extant vm map LOR by replacing pmc_sx sx_slock with global_epoch
  to protect the liveness of elements of the pmc_ss_owners list

Reported by: pho
Approved by: sbruno

6 years agoepoch(9): allow sx locks to be held across epoch_wait()
mmacy [Mon, 14 May 2018 00:14:00 +0000 (00:14 +0000)]
epoch(9): allow sx locks to be held across epoch_wait()

The INVARIANTS checks in epoch_wait() were intended to
prevent the block handler from returning with locks held.
What it in fact did was preventing anything except Giant
from being held across it. Check that the number of locks
held has not changed instead.

Approved by: sbruno@

6 years agoRevert changes to hash table alignment in r333273, which booting on all G5
nwhitehorn [Sun, 13 May 2018 23:56:43 +0000 (23:56 +0000)]
Revert changes to hash table alignment in r333273, which booting on all G5
systems, pending further analysis.

6 years agoFix the eir_server_scope reply argument for NFSv4.1 ExchangeID.
rmacklem [Sun, 13 May 2018 23:38:01 +0000 (23:38 +0000)]
Fix the eir_server_scope reply argument for NFSv4.1 ExchangeID.

In the reply to an ExchangeID operation, the NFSv4.1 server returns a
"scope" value (eir_server_scope). If this value is the same, it indicates
that two servers share state, which is never the case for FreeBSD servers.
As such, the value needs to be unique and it was without this patch.
However, I just found out that it is not supposed to change when the
server reboots and without this patch, it did change.
This patch fixes eir_server_scope so that it does not change when the
server is rebooted.
The only affect not having this patch has is that Linux clients don't
reclaim opens and locks after a server reboot, which meant they lost
any byte range locks held before the server rebooted.
It only affects NFSv4.1 mounts and the FreeBSD NFSv4.1 client was not
affected by this bug.

MFC after: 1 week

6 years agoepoch(9): cleanups, additional debug checks, and add global_epoch
mmacy [Sun, 13 May 2018 23:24:48 +0000 (23:24 +0000)]
epoch(9): cleanups, additional debug checks, and add global_epoch

- GC the _nopreempt routines
    - to really benefit we'd need a separate routine
    - they're not currently in use
    - they complicate the API for no benefit at this time

- check that we're actually in a epoch section at exit

- handle epoch_call() early in boot

- Fix copyright declaration language

Approved by: sbruno@

6 years agoAdd epoch(9) man page
mmacy [Sun, 13 May 2018 23:16:04 +0000 (23:16 +0000)]
Add epoch(9) man page

Reviewed by: gallatin@
Approved by: sbruno@

6 years agoRegen after r333588
sevan [Sun, 13 May 2018 23:04:35 +0000 (23:04 +0000)]
Regen after r333588

6 years agoTypo
sevan [Sun, 13 May 2018 22:58:40 +0000 (22:58 +0000)]
Typo

Submitted by: jrm@
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D14836

6 years agoFix PMC_IN_TRAP_HANDLER() for i386 after the 4/4 split.
kib [Sun, 13 May 2018 20:10:02 +0000 (20:10 +0000)]
Fix PMC_IN_TRAP_HANDLER() for i386 after the 4/4 split.

Sponsored by: The FreeBSD Foundation

6 years agoFix directory blocks checksumming.
fsu [Sun, 13 May 2018 19:48:30 +0000 (19:48 +0000)]
Fix directory blocks checksumming.

Reviewed by:    pfg
MFC after:      3 months

Differential Revision:    https://reviews.freebsd.org/D15396

6 years agoFix on-disk inode checksum calculation logic.
fsu [Sun, 13 May 2018 19:29:35 +0000 (19:29 +0000)]
Fix on-disk inode checksum calculation logic.

Reviewed by:    pfg
MFC after:      3 months

Differential Revision:    https://reviews.freebsd.org/D15395

6 years agoFix EXT2FS_DEBUG definition usage.
fsu [Sun, 13 May 2018 19:19:10 +0000 (19:19 +0000)]
Fix EXT2FS_DEBUG definition usage.

Reviewed by:    pfg
MFC after:      3 months

Differential Revision:    https://reviews.freebsd.org/D15394

6 years agoGet rid of vm_pageout_page_queued().
markj [Sun, 13 May 2018 13:00:59 +0000 (13:00 +0000)]
Get rid of vm_pageout_page_queued().

vm_page_queue(), added in r333256, generalizes vm_pageout_page_queued(),
so use it instead.  No functional change intended.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D15402

6 years agoFix a slow leak of session structures in the NFSv4.1 server.
rmacklem [Sun, 13 May 2018 12:42:53 +0000 (12:42 +0000)]
Fix a slow leak of session structures in the NFSv4.1 server.

For a fairly rare case of a client doing an ExchangeID after a hard reboot,
the old confirmed clientid still exists, but some clients use a new
co_verifier. For this case, the server was not freeing up the sessions on
the old confirmed clientid.
This patch fixes this case. It also adds two LIST_INIT() macros, which are
actually no-ops, since the structure is malloc()d with M_ZERO so the pointer
is already set to NULL.
It should have minimal impact, since the only way I could exercise this
code path was by doing a hard power cycle (pulling the plus) on a machine
running Linux with a NFSv4.1 mount on the server.
Originally spotted during testing of the ESXi 6.5 client.

Tested by: andreas.nagy@frequentis.com
MFC after: 2 months

6 years agoThe NFSv4.1 server should return NFSERR_BACKCHANBUSY instead of NFS_OK.
rmacklem [Sun, 13 May 2018 12:29:09 +0000 (12:29 +0000)]
The NFSv4.1 server should return NFSERR_BACKCHANBUSY instead of NFS_OK.

When an NFSv4.1 session is busy due to a callback being in progress,
nfsrv_freesession() should return NFSERR_BACKCHANBUSY instead of NFS_OK.
The only effect this has is that the DestroySession operation will report
the failure for this case and this probably has little or no effect on a
client. Spotted by inspection and no failures related to this have been
reported.

MFC after: 2 months

6 years agoAdd implementations for clog(3), clogf(3), and clog(3).
kib [Sun, 13 May 2018 09:54:34 +0000 (09:54 +0000)]
Add implementations for clog(3), clogf(3), and clog(3).

PR: 216863
Submitted by: bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu>
MFC after: 2 weeks

6 years agoDetect and optimize reads from the hole on UFS.
kib [Sun, 13 May 2018 09:47:28 +0000 (09:47 +0000)]
Detect and optimize reads from the hole on UFS.

- Create getblkx(9) variant of getblk(9) which can return error.
- Add GB_NOSPARSE flag for getblk()/getblkx() which requests that BMAP
  was performed before the buffer is created, and EJUSTRETURN returned
  in case the requested block does not exist.
- Make ffs_read() use GB_NOSPARSE to avoid instantiating buffer (and
  allocating the pages for it), copying from zero_region instead.

The end result is less page allocations and buffer recycling when a
hole is read, which is important for some benchmarks.

Requested and reviewed by: jeff
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D14917

6 years agohwpmc/epoch - don't reference domain if NUMA is not set
mmacy [Sat, 12 May 2018 20:00:29 +0000 (20:00 +0000)]
hwpmc/epoch - don't reference domain if NUMA is not set

It appears that domain information is set correctly independent
of whether or not NUMA is defined. However, there is no memory
backing secondary domains leading to allocation failure.

Reported by: pho@, np@
Approved by: sbruno@

6 years agoIf the sole non-option command line argument is "none", remove any
des [Sat, 12 May 2018 18:07:53 +0000 (18:07 +0000)]
If the sole non-option command line argument is "none", remove any
pre-existing forwarder configuration and set Unbound up to recurse.

PR: 222902
MFC after: 1 week

6 years agoRename all Unbound binaries and man pages from unbound* to local-unbound*.
des [Sat, 12 May 2018 17:10:36 +0000 (17:10 +0000)]
Rename all Unbound binaries and man pages from unbound* to local-unbound*.

PR: 222902

6 years agoSupport If-Modified-Since for https as well as http.
des [Sat, 12 May 2018 17:04:40 +0000 (17:04 +0000)]
Support If-Modified-Since for https as well as http.

PR: 224426
Submitted by: zsnafzig@edu.uwaterloo.ca
MFC after: 1 week

6 years agoPreserve if-modified-since timestamps across redirects.
des [Sat, 12 May 2018 17:02:27 +0000 (17:02 +0000)]
Preserve if-modified-since timestamps across redirects.

PR: 224426
MFC after: 1 week

6 years agoDTrace aarch64: Avoid calling unwind_frame() in the probe context.
markj [Sat, 12 May 2018 15:35:26 +0000 (15:35 +0000)]
DTrace aarch64: Avoid calling unwind_frame() in the probe context.

unwind_frame() may be instrumented by FBT, leading to recursion into
dtrace_probe(). Manually inline unwind_frame() as we do with stack
unwinding code for other architectures.

Submitted by: Domagoj Stolfa
Reviewed by: manu
MFC after: 1 week
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D15359

6 years agocpucontrol: improve Intel microcode revision check
emaste [Sat, 12 May 2018 15:34:35 +0000 (15:34 +0000)]
cpucontrol: improve Intel microcode revision check

According to the Intel SDM (Volme 3, 9.11.7) the BIOS signature MSR
should be zeroed before executing cpuid (although in practice it does
not seem to matter).

PR: 192487
Submitted by: Dan Lukes
Reported by: Henrique de Moraes Holschuh
MFC after: 3 days

6 years agoUpgrade Unbound to 1.7.1.
des [Sat, 12 May 2018 15:20:39 +0000 (15:20 +0000)]
Upgrade Unbound to 1.7.1.

6 years agoUpgrade Unbound to 1.7.0. More to follow.
des [Sat, 12 May 2018 15:04:05 +0000 (15:04 +0000)]
Upgrade Unbound to 1.7.0.  More to follow.

6 years agoUpgrade Unbound to 1.6.8. More to follow.
des [Sat, 12 May 2018 14:57:42 +0000 (14:57 +0000)]
Upgrade Unbound to 1.6.8.  More to follow.

6 years agoNo reason to keep this around.
des [Sat, 12 May 2018 14:51:53 +0000 (14:51 +0000)]
No reason to keep this around.

6 years agoUpgrade Unbound to 1.6.7. More to follow.
des [Sat, 12 May 2018 14:51:18 +0000 (14:51 +0000)]
Upgrade Unbound to 1.6.7.  More to follow.

6 years agoUpgrade Unbound to 1.6.6. More to follow.
des [Sat, 12 May 2018 14:48:38 +0000 (14:48 +0000)]
Upgrade Unbound to 1.6.6.  More to follow.

6 years agoUpgrade Unbound to 1.6.5. More to follow.
des [Sat, 12 May 2018 14:39:41 +0000 (14:39 +0000)]
Upgrade Unbound to 1.6.5.  More to follow.

6 years agoUpgrade Unbound to 1.6.4. More to follow.
des [Sat, 12 May 2018 14:36:58 +0000 (14:36 +0000)]
Upgrade Unbound to 1.6.4.  More to follow.

6 years agoUpgrade Unbound to 1.6.3. More to follow.
des [Sat, 12 May 2018 14:19:14 +0000 (14:19 +0000)]
Upgrade Unbound to 1.6.3.  More to follow.

6 years agoUpgrade Unbound to 1.6.2. More to follow.
des [Sat, 12 May 2018 14:15:39 +0000 (14:15 +0000)]
Upgrade Unbound to 1.6.2.  More to follow.

6 years agoUpgrade Unbound to 1.6.1. More to follow.
des [Sat, 12 May 2018 14:04:48 +0000 (14:04 +0000)]
Upgrade Unbound to 1.6.1.  More to follow.

6 years agoUpgrade Unbound to 1.6.1. More to follow.
des [Sat, 12 May 2018 14:04:30 +0000 (14:04 +0000)]
Upgrade Unbound to 1.6.1.  More to follow.

6 years agoaw_mmc: Rework regulator handling
manu [Sat, 12 May 2018 13:14:01 +0000 (13:14 +0000)]
aw_mmc: Rework regulator handling

Don't enable regulator on attach but dealt with them on power_up/power_off
Only set the voltage for the signaling regulator since I don't have boards
that can change the supply voltage.
Enable 1.8v signaling voltage.

6 years agoaw_mmc: Do not fully init the controller in attach
manu [Sat, 12 May 2018 13:13:34 +0000 (13:13 +0000)]
aw_mmc: Do not fully init the controller in attach

Only do a reset of the controller at attach and init it at power_up.
We use to enable some interrupts in reset, only enable the interrupts
we are interested in when doing a request.
While here remove the regulators handling in power_on as it is very wrong
and will be dealt with in another commit.

Tested on: A31, A64

6 years agoaw_mmc: Remove hardware reset
manu [Sat, 12 May 2018 13:12:59 +0000 (13:12 +0000)]
aw_mmc: Remove hardware reset

From all the BSP (Board Source Package) source that I've looked at it seems
that it's never done, remove it.

Tested On: A31, A64

6 years agoaw_mmc: Read interrupt register value before writing to it
manu [Sat, 12 May 2018 13:12:26 +0000 (13:12 +0000)]
aw_mmc: Read interrupt register value before writing to it

Reported by: jmcneill

6 years agoUpgrade Unbound to 1.6.0. More to follow.
des [Sat, 12 May 2018 12:57:34 +0000 (12:57 +0000)]
Upgrade Unbound to 1.6.0.  More to follow.

6 years agoUpgrade LDNS to 1.7.0.
des [Sat, 12 May 2018 12:00:18 +0000 (12:00 +0000)]
Upgrade LDNS to 1.7.0.

I've been holding back on this because 1.7.0 requires OpenSSL 1.1.0 or
newer for full DANE support.  But we can't wait forever, and nothing in
base uses DANE anyway, so here we go.

6 years agoVendor import of Unbound 1.7.1.
des [Sat, 12 May 2018 11:56:52 +0000 (11:56 +0000)]
Vendor import of Unbound 1.7.1.

6 years agoVendor import of Unbound 1.7.0.
des [Sat, 12 May 2018 11:56:38 +0000 (11:56 +0000)]
Vendor import of Unbound 1.7.0.

6 years agoVendor import of Unbound 1.6.8.
des [Sat, 12 May 2018 11:56:13 +0000 (11:56 +0000)]
Vendor import of Unbound 1.6.8.

6 years agoVendor import of Unbound 1.6.7.
des [Sat, 12 May 2018 11:55:57 +0000 (11:55 +0000)]
Vendor import of Unbound 1.6.7.

6 years agoVendor import of Unbound 1.6.6.
des [Sat, 12 May 2018 11:55:17 +0000 (11:55 +0000)]
Vendor import of Unbound 1.6.6.

6 years agoVendor import of Unbound 1.6.5.
des [Sat, 12 May 2018 11:54:48 +0000 (11:54 +0000)]
Vendor import of Unbound 1.6.5.

6 years agoVendor import of Unbound 1.6.4.
des [Sat, 12 May 2018 11:54:35 +0000 (11:54 +0000)]
Vendor import of Unbound 1.6.4.

6 years agoVendor import of Unbound 1.6.3.
des [Sat, 12 May 2018 11:53:55 +0000 (11:53 +0000)]
Vendor import of Unbound 1.6.3.

6 years agoAdd a test for vm86(2), simple to use and diagnose.
kib [Sat, 12 May 2018 11:53:49 +0000 (11:53 +0000)]
Add a test for vm86(2), simple to use and diagnose.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

6 years agoVendor import of Unbound 1.6.2.
des [Sat, 12 May 2018 11:53:39 +0000 (11:53 +0000)]
Vendor import of Unbound 1.6.2.

6 years agoNuke auto-props.
des [Sat, 12 May 2018 11:52:12 +0000 (11:52 +0000)]
Nuke auto-props.

6 years agoVendor import of Unbound 1.6.1.
des [Sat, 12 May 2018 11:49:30 +0000 (11:49 +0000)]
Vendor import of Unbound 1.6.1.