]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
7 years agoMFC: r316782
rmacklem [Thu, 27 Apr 2017 21:27:20 +0000 (21:27 +0000)]
MFC: r316782
Add call to svcpool_close() for the NFSv4 callback pool (svcpool_nfscbd).

A function called svcpool_close() was added to the server side krpc by
r313735, so that a pool could be closed without destroying the data structures.
This little patch adds a call to it for the callback pool (svcpool_nfscbd),
so that the nfscbd daemon can be killed/restarted and continue to work
correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317524 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315237 (kib): Hide kev_iovlen() definition under #ifdef KTRACE
emaste [Thu, 27 Apr 2017 18:21:38 +0000 (18:21 +0000)]
MFC r315237 (kib): Hide kev_iovlen() definition under #ifdef KTRACE

Fixes build of kernel configs without KTRACE.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@317513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r317196:
kib [Thu, 27 Apr 2017 12:15:15 +0000 (12:15 +0000)]
MFC r317196:
Write-combine framebuffer writes through user-space mappings, if possible.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316777 (by cem)
truckman [Thu, 27 Apr 2017 07:32:07 +0000 (07:32 +0000)]
MFC r316777 (by cem)

dummynet: Use strlcpy to appease static checkers

Some dummynet modules used strcpy() to copy from a larger buffer
(dn_aqm->name) to a smaller buffer (dn_extra_parms->name).  It happens that
the lengths of the strings in the dn_aqm buffers were always hardcoded to be
smaller than the dn_extra_parms buffer ("CODEL", "PIE").

Use strlcpy() instead, to appease static checkers.  No functional change.

Reported by: Coverity
CIDs: 13561631356165
Sponsored by: Dell EMC Isilon

git-svn-id: svn://svn.freebsd.org/base/stable/10@317489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 317353
sephe [Thu, 27 Apr 2017 02:17:45 +0000 (02:17 +0000)]
MFC 317353

    hyperv/hn: Use channel0, i.e. TX ring0, for TCP SYN/SYN|ACK.

    Hyper-V hot channel effect:
    Operation latency on hot channel is only _half_ of the operation
    latency on cold channels.

    This commit takes the advantage of the above Hyper-V host channel
    effect, and can reduce more than 75% latency and more than 50%
    latency stdev, i.e. lower and more stable/predictable latency,
    for various types of web server workloads.

    Sponsored by:   Microsoft

git-svn-id: svn://svn.freebsd.org/base/stable/10@317482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316745
rmacklem [Wed, 26 Apr 2017 23:24:05 +0000 (23:24 +0000)]
MFC: r316745
Fix the NFS client for "text file modified, process killed" mmap'd case.

When an mmap'd text file is written and then executed immediately
afterwards, it was possible that the modify time would change after the
text file was executing, resulting in the process executing the file
being killed. This was usually only observed when the file system's
times were set to higher resolution, but could have occurred for any
time resolution.
This patch adds a VOP_SET_TEXT() to the NFS client which flushed all
dirty pages to the NFS server and then makes sure that n_mtime is up
to date to avoid this from occurring.
Thanks go to kib@ and pho@ for their help with developing this patch.

The call to ncl_flush() has been removed. If r316532 is merged into stable/10,
this call needs to go back into nfs_set_text().

git-svn-id: svn://svn.freebsd.org/base/stable/10@317476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316719
rmacklem [Wed, 26 Apr 2017 23:01:49 +0000 (23:01 +0000)]
MFC: r316719
Don't throw away Open state when a NFSv4.1 client recovery fails.

If the ExchangeID/CreateSession operations done by an NFSv4.1 client
after the server crashes/reboots fails, it is possible that some process/thread
is waiting for an open_owner lock. If the client state is free'd, this
can cause a crash.
This would not normally happen, but has been observed on a mount of the
AmazonEFS service.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316717
rmacklem [Wed, 26 Apr 2017 22:53:29 +0000 (22:53 +0000)]
MFC: r316717
During a server crash recovery, fix the NFSv4.1 client for a NFSERR_BADSESSION
during recovery.

If the NFSv4.1 client gets a NFSv4.1 NFSERR_BADSESSION reply to an Open/Lock
operation while recovering from the server crash/reboot, allow the opens
to be retained for a subsequent recovery attempt. Since NFSv4.1 servers
should only reply NFSERR_BADSESSION after a crash/reboot that has lost
state, this case should almost never happen.
However, for the AmazonEFS file service, this has been observed when
the client does a fresh TCP connection for RPCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316694
rmacklem [Wed, 26 Apr 2017 22:40:08 +0000 (22:40 +0000)]
MFC: r316694
Fix a crash during unmount of an NFSv4.1 mount.

Larry Rosenman reported a crash on freebsd-current@ which was caused by
a premature release of the krpc backchannel socket structure.
I believe this was caused by a race between the SVC_RELEASE() in clnt_vc.c
and the xprt_unregister() in the higher layer (clnt_rc.c), which tried
to lock the mutex in the xprt structure and crashed.
This patch fixes this by removing the xprt_unregister() in the clnt_vc
layer and allowing this to always be done by the clnt_rc (higher reconnect
layer).

git-svn-id: svn://svn.freebsd.org/base/stable/10@317473 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r317169:
gjb [Wed, 26 Apr 2017 16:27:20 +0000 (16:27 +0000)]
MFC r317169:
 Trim trailing '/release/..' when setting _OBJDIR so arm64/aarch64
 boot1.efifat is properly located when creating virtual machine images.

 Note, the underlying issue has no direct impact against stable/10,
 as arm64/aarch64 virtual machine images are not created for 10-STABLE.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@317442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316810, r316814, r316816, r316991:
cy [Wed, 26 Apr 2017 02:37:25 +0000 (02:37 +0000)]
MFC r316810, r316814, r316816, r316991:

Keep state incorrectly assumes keep frags. This is counter to the
ipfilter man pages. This also currently restricts keep frags to only when
keep state is used, which is redundant because keep state currently
assumes keep frags. This commit fixes this.

To the user this change means that to maintain the current behaviour
one must add keep frags to any ipfilter keep state rule (as documented
in the man pages).

This patch also allows the flexability to specify and use keep frags
separate from keep state, as documented in an example in ipf.conf.5,
instead of the currently broken behaviour.

MFC suggested by: rgrimes
Relnotes: yes

git-svn-id: svn://svn.freebsd.org/base/stable/10@317434 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316692
rmacklem [Wed, 26 Apr 2017 00:03:03 +0000 (00:03 +0000)]
MFC: r316692
Set initial values for nfsstatfs in the NFSv4 client.

The AmazonEFS NFSv4.1 server does not support the FILES_FREE and FILES_TOTAL
attributes. As such, an NFSv4.1 mount to the server would return garbage
for these values. This patch initializes the fields of the nfsstatfs structure,
so that "df" and friends will at least return consistent bogus values.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316669
rmacklem [Tue, 25 Apr 2017 20:34:56 +0000 (20:34 +0000)]
MFC: r316669
Avoid starvation of the server crash recovery thread for the NFSv4 client.

This patch gives a requestor of the exclusive lock on the client state
in the NFSv4 client priority over shared lock requestors. This avoids
the server crash recovery thread being starved out by other threads doing
RPCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317423 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316667
rmacklem [Tue, 25 Apr 2017 19:48:25 +0000 (19:48 +0000)]
MFC: r316667
Fix the NFSv4 client hndling of a stale write verifier in the Commit operation.

When the NFSv4 client Commit operation encountered a stale write verifier,
it erroneously mapped that to EIO. This could have caused recently written
data to be lost when a server crashes/reboots between an UNSTABLE write
and the subsequent commit. This patch fixes this.
The bug was only for the NFSv4 client and did not affect NFSv3.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316666
rmacklem [Tue, 25 Apr 2017 19:35:13 +0000 (19:35 +0000)]
MFC: r316666
Fix the NFSv4.1 client for NFSERR_BADSESSION recovery via ReclaimComplete.

For the ReclaimComplete operation, the RPC layer should not loop on
NFSERR_BADSESSION. If it does, the recovery thread (nfscl) can get stuck
looping and will not do a recovery.
This patch fixes it so it does not loop. This bug only affects NFSv4.1 and
only when a server reboots.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317419 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316698:
kib [Tue, 25 Apr 2017 13:17:34 +0000 (13:17 +0000)]
MFC r316698:
Remove debugging printf.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r316655
rmacklem [Tue, 25 Apr 2017 12:07:04 +0000 (12:07 +0000)]
MFC: r316655
Fix parsing failure for NFSv4 Setattr operation for failed case.

If an operation that preceeds a Setattr in an NFSv4 compound fails,
there is no bitmap of attributes to parse. Without this patch, the
parsing would fail and return EBADRPC instead of the correct failure
error. This could break recovery from a server crash/reboot.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r310491
rmacklem [Tue, 25 Apr 2017 11:36:25 +0000 (11:36 +0000)]
MFC: r310491
Fix NFSv4.1 client recovery from NFS4ERR_BAD_SESSION errors.

For most NFSv4.1 servers, a NFS4ERR_BAD_SESSION error is a rare failure
that indicates that the server has lost session/open/lock state.
However, recent testing by cperciva@ against the AmazonEFS server found
several problems with client recovery from this due to it generating this
failure frequently.
Briefly, the problems fixed are:
- If all session slots were in use at the time of the failure, some processes
  would continue to loop waiting for a slot on the old session forever.
- If an RPC that doesn't use open/lock state failed with NFS4ERR_BAD_SESSION,
  it would fail the RPC/syscall instead of initiating recovery and then
  looping to retry the RPC.
- If a successful reply to an RPC for an old session wasn't processed
  until after a new session was created for a NFS4ERR_BAD_SESSION error,
  it would erroneously update the new session and corrupt it.
- The use of the first element of the session list in the nfs mount
  structure (which is always the current metadata session) was slightly
  racey. With changes for the above problems it became more racey, so all
  uses of this head pointer was wrapped with a NFSLOCKMNT()/NFSUNLOCKMNT().
- Although the kernel malloc() usually allocates more bytes than requested
  and, as such, this wouldn't have caused problems, the allocation of a
  session structure was 1 byte smaller than it should have been.
  (Null termination byte for the string not included in byte count.)

There are probably still problems with a pNFS data server that fails
with NFS4ERR_BAD_SESSION, but I have no server that does this to test
against (the AmazonEFS server doesn't do pNFS), so I can't fix these yet.

Although this patch is fairly large, it should only affect the handling
of NFS4ERR_BAD_SESSION error replies from an NFSv4.1 server.
Thanks go to cperciva@ for the extension testing he did to help isolate/fix
these problems.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317404 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316768:
brooks [Mon, 24 Apr 2017 22:44:59 +0000 (22:44 +0000)]
MFC r316768:

Fix an out-of-bounds write when a zero-length buffer is passed.

Found with ttyname_test and CHERI bounds checking.

Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/10@317392 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316766:
brooks [Mon, 24 Apr 2017 21:41:04 +0000 (21:41 +0000)]
MFC r316766:

Correct an out of bounds read with HN_AUTOSCALE and very large numbers.

The maximum scale is 6 (K, M, G, T, P, E) (B is 0).

Overly large explict scales were checked correctly, but for sufficently
large numbers HN_AUTOSCALE would get to 7 resulting in an out of bounds
read.

Found with humanize_number_test and CHERI bounds checking.

Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/10@317387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoPartial MFC r316676 and the required r313045
smh [Mon, 24 Apr 2017 16:31:28 +0000 (16:31 +0000)]
Partial MFC r316676 and the required r313045

MFC r316676:

Use estimated RTT for receive buffer auto resizing instead of timestamps.
This is a partial MFC as stable/10 doesn't include the TCP stack
modularisation.

MFC r313045:

Add an mbuf to ipinfo_t translator to finish cleanup of mbuf passing to TCP
probes. This is a partial MFC (missing debug__output & debug__drop changes)
due to the massive amount of additional dtrace changes that would be
required for a full MFC.

Relnotes: Yes
Sponsored by: Multiplay

git-svn-id: svn://svn.freebsd.org/base/stable/10@317375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315913: Add brackets to fix incorrect macro expansion.
mav [Mon, 24 Apr 2017 11:22:06 +0000 (11:22 +0000)]
MFC r315913: Add brackets to fix incorrect macro expansion.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315908: Unify initiator and target DMA setup and command sending.
mav [Mon, 24 Apr 2017 11:21:32 +0000 (11:21 +0000)]
MFC r315908: Unify initiator and target DMA setup and command sending.

The code is so alike that it is pointless to keep it separate.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315870: isp field in struct isp_pcmd is also unused.
mav [Mon, 24 Apr 2017 11:20:55 +0000 (11:20 +0000)]
MFC r315870: isp field in struct isp_pcmd is also unused.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315869: Remove write-only crn field from struct isp_pcmd.
mav [Mon, 24 Apr 2017 11:20:21 +0000 (11:20 +0000)]
MFC r315869: Remove write-only crn field from struct isp_pcmd.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315708: Cleanup response queue processing.
mav [Mon, 24 Apr 2017 11:19:47 +0000 (11:19 +0000)]
MFC r315708: Cleanup response queue processing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316677: Do not register in CTL portal groups without portals.
mav [Mon, 24 Apr 2017 06:33:08 +0000 (06:33 +0000)]
MFC r316677: Do not register in CTL portal groups without portals.

From config synthax point of view such portal groups are not incorrect,
but they are useless since can not receive any connection.  And since
CTL port resource is very limited, it is good to save it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r317186
kp [Sun, 23 Apr 2017 08:59:57 +0000 (08:59 +0000)]
MFC r317186

pf: Fix possible incorrect IPv6 fragmentation

When forwarding pf tracks the size of the largest fragment in a fragmented
packet, and refragments based on this size.
It failed to ensure that this size was a multiple of 8 (as is required for all
but the last fragment), so it could end up generating incorrect fragments.

For example, if we received an 8 byte and 12 byte fragment pf would emit a first
fragment with 12 bytes of payload and the final fragment would claim to be at
offset 8 (not 12).

We now assert that the fragment size is a multiple of 8 in ip6_fragment(), so
other users won't make the same mistake.

Reported by:    Antonios Atlasis <aatlasis at secfu net>

git-svn-id: svn://svn.freebsd.org/base/stable/10@317335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316652: Fix few minor issues found by Clang Analyzer.
mav [Sun, 23 Apr 2017 07:37:14 +0000 (07:37 +0000)]
MFC r316652: Fix few minor issues found by Clang Analyzer.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316653: Fix few minor issues found by Clang Analyzer.
mav [Sun, 23 Apr 2017 07:35:51 +0000 (07:35 +0000)]
MFC r316653: Fix few minor issues found by Clang Analyzer.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316993, r316994, r316997 as follows:
cy [Sun, 23 Apr 2017 03:16:38 +0000 (03:16 +0000)]
MFC r316993, r316994, r316997 as follows:

r316993:

Fix CID 1372601 in ipfilter/lib/parsefields.c, possible NULL pointer
dereference should reallocarray() fail.

Reported by: Coverity CID 1372601

r316994:

Fix CID 1372600 in ipfilter/tools/ipf_y.y, possible NULL pointer
dereference should reallocarray() fail.

Reported by: Coverity CID 1372600

r316997:

Use warnx() to issue error message.

Reported by: cem

git-svn-id: svn://svn.freebsd.org/base/stable/10@317314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r314694
rgrimes [Sat, 22 Apr 2017 22:05:23 +0000 (22:05 +0000)]
MFC: r314694

  Make vmrun.sh passthrough -u and -w to bhybe

PR: 214273
Submitted by: Martin Birgmeier <la5lb...@aon.at>
Approved by: grehan (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@317303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r314691
rgrimes [Sat, 22 Apr 2017 21:57:26 +0000 (21:57 +0000)]
MFC: r314691

Document 3 more src/ directories

Approved by: grehan (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/10@317302 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoDocument EN-17:01 through EN-17:05, SA-16:39 through SA-17:03
gjb [Fri, 21 Apr 2017 19:41:33 +0000 (19:41 +0000)]
Document EN-17:01 through EN-17:05, SA-16:39 through SA-17:03

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@317266 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316852:
kib [Fri, 21 Apr 2017 10:16:34 +0000 (10:16 +0000)]
MFC r316852:
In fsck_ffs pass1, prevent the inosused variable from wrapping.

PR: 218592

git-svn-id: svn://svn.freebsd.org/base/stable/10@317250 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r317139 for real.
cy [Fri, 21 Apr 2017 02:11:44 +0000 (02:11 +0000)]
MFC r317139 for real.

Restore prototype accidently removed by r316811.  Also remove $NetBSD$
accidentally added.

Reported by:    hps, lwhsu
Pointy hat to: cy

git-svn-id: svn://svn.freebsd.org/base/stable/10@317243 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316811, r317139:
cy [Fri, 21 Apr 2017 02:02:52 +0000 (02:02 +0000)]
MFC r316811, r317139:

Add missing free()'s after calls to randomize().

PR: NetBSD PR/50559
Obtained from: Netbsd radix_ipf.c r1.6

git-svn-id: svn://svn.freebsd.org/base/stable/10@317242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316809:
cy [Fri, 21 Apr 2017 01:51:49 +0000 (01:51 +0000)]
MFC r316809:

Fix a use after free panic in ipfilter's fragment processing.
Memory is malloc'd, then a search for a match in the fragment table
is made and if the fragment matches, the wrong fragment table is
freed, causing a use after free panic. This commit fixes this.

A symptom of the problem is a kernel page fault in bcopy() called by
ipf_frag_lookup() at line 715 in ip_frag.c. Another symptom is a
kernel page fault in ipf_frag_delete() when called by ipf_frag_expire()
via ipf_slowtimer().

git-svn-id: svn://svn.freebsd.org/base/stable/10@317241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316183
davidcs [Thu, 20 Apr 2017 04:33:47 +0000 (04:33 +0000)]
MFC r316183
Upgrade firmware and other related files to version 5.4.64

git-svn-id: svn://svn.freebsd.org/base/stable/10@317183 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316739:
kib [Wed, 19 Apr 2017 10:57:57 +0000 (10:57 +0000)]
MFC r316739:
Fix reporting of _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317131 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 316813,316815
sephe [Wed, 19 Apr 2017 05:28:21 +0000 (05:28 +0000)]
MFC 316813,316815

316813
    hyperv/storvsc: Use ULL for 64bits value shift.

    Reported by:    PVS
    Sponsored by:   Microsoft

316815
    hyperv/kvp: Remove always false condition.

    Reported by:    PVS
    Sponsored by:   Microsoft

git-svn-id: svn://svn.freebsd.org/base/stable/10@317125 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 316515,316812
sephe [Wed, 19 Apr 2017 05:19:33 +0000 (05:19 +0000)]
MFC 316515,316812

316515
    hyperv/kbd: Add support for synthetic keyboard.

    Synthetic keyboard is the only supported keyboard on GEN2 Hyper-V.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D10196

316812
    hyperv/kbd: Remove unnecessary assignment.

    Reported by:    PVS
    Sponsored by:   Microsoft

git-svn-id: svn://svn.freebsd.org/base/stable/10@317124 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316747
davidcs [Wed, 19 Apr 2017 03:43:24 +0000 (03:43 +0000)]
MFC r316747
  Fix rss_ind_table entry for num_funcs > 1

git-svn-id: svn://svn.freebsd.org/base/stable/10@317123 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316720
davidcs [Wed, 19 Apr 2017 03:41:19 +0000 (03:41 +0000)]
MFC r316720
  Fix defects reported by Coverity
    1. Deadcode in ecore_init_cache_line_size(), qlnx_ioctl() and
     qlnx_clean_filters()
    2. ARRAY_VS_SINGLETON issue in qlnx_remove_all_mcast_mac() and
     qlnx_update_rx_prod()

git-svn-id: svn://svn.freebsd.org/base/stable/10@317122 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316485
davidcs [Wed, 19 Apr 2017 03:37:11 +0000 (03:37 +0000)]
MFC r316485
    Add 25/40/100Gigabit Ethernet Driver version v1.3.0 for Cavium Inc's.
    Qlogic 45000 Series Adapters

git-svn-id: svn://svn.freebsd.org/base/stable/10@317120 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 317107
sephe [Wed, 19 Apr 2017 03:06:27 +0000 (03:06 +0000)]
MFC 317107
    hyperv: Use kmem_malloc for hypercall memory due to NX bit change.

    Reported by:    dexuan@
    Sponsored by:   Microsoft

git-svn-id: svn://svn.freebsd.org/base/stable/10@317115 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316310
davidcs [Wed, 19 Apr 2017 02:59:26 +0000 (02:59 +0000)]
MFC r316310
Update man page for commit r316309 "Add support for optional Soft LRO".
The driver provides the ability to select either HW or Software LRO, when
LRO is enabled (default HW LRO).

git-svn-id: svn://svn.freebsd.org/base/stable/10@317112 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316309
davidcs [Wed, 19 Apr 2017 02:58:14 +0000 (02:58 +0000)]
MFC r316309
Add support for optional Soft LRO

git-svn-id: svn://svn.freebsd.org/base/stable/10@317111 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r285117
asomers [Tue, 18 Apr 2017 16:17:38 +0000 (16:17 +0000)]
MFC r285117

Make cleanup routines idempotent

cleanup routines can be executed at any point during the execution of the
body, including even before the body has done any real work.  In those
cases, cleanup routines should be careful to not raise spurious errors so
as to not "override" the actual result of the test case.

This is just general good coding style but is not a problem in practice
for these specific tests.  (The way I discovered the issue, though, was
due to a regression I introduced in Kyua itself while refactoring some
internals.)

MFC after:      1 week

git-svn-id: svn://svn.freebsd.org/base/stable/10@317093 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316716:
ae [Tue, 18 Apr 2017 09:22:06 +0000 (09:22 +0000)]
MFC r316716:
  Inherit IPv6 checksum offloading flags to vlan interfaces.

  if_vlan(4) interfaces inherit IPv4 checksum offloading flags from the
  parent when VLAN_HWCSUM and VLAN_HWTAGGING flags are present on the
  parent interface. Do the same for IPv6 checksum offloading flags.

  Reported by: Harry Schmalzbauer
  Reviewed by: np, gnn
  Differential Revision: https://reviews.freebsd.org/D10356

git-svn-id: svn://svn.freebsd.org/base/stable/10@317082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316956:
bapt [Mon, 17 Apr 2017 19:10:12 +0000 (19:10 +0000)]
MFC r316956:

Update pci_vendors to 2017.04.03

git-svn-id: svn://svn.freebsd.org/base/stable/10@317066 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316427, r316428: Add Log directory and SATA NCQ Send and Receive Log.
mav [Sun, 16 Apr 2017 06:00:14 +0000 (06:00 +0000)]
MFC r316427, r316428: Add Log directory and SATA NCQ Send and Receive Log.

Those are used at least by Linux guests to detect queued TRIM support.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315948:
dchagin [Sat, 15 Apr 2017 11:16:11 +0000 (11:16 +0000)]
MFC r315948:

Update tcsh to 6.20.00

MFC r315952:

Update tcsh to vendor git b605cb561d

Vendor changes:

1. PR/471: Daiki Ueno: Delay interpreting arginp until we've processed
our startup files (which can change the NLS environment).

2. Fix type of read in prompt confirmation (eg. rmstar) (David Kaspar).

3. Fix out of bounds read (Brooks Davis)
(reproduce by starting tcsh and hitting tab at the prompt).

4. Don't play pointer tricks that are undefined in modern c
(Brooks Davis).

git-svn-id: svn://svn.freebsd.org/base/stable/10@316958 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r314686: sh: Fix crash if a -T trap is taken during command substitution.
jilles [Fri, 14 Apr 2017 21:42:27 +0000 (21:42 +0000)]
MFC r314686: sh: Fix crash if a -T trap is taken during command substitution.

Code like  t=$(stat -f %m "$file")  segfaulted if -T was active and a trap
was taken while the shell was waiting for the child process to finish.

What happened was that the dotrap() call in waitforjob() was hit. This
re-entered command execution (including expand.c) at a point not expected by
expbackq(), and global state (unallocated stack string and argbackq) was
corrupted.

To fix this, change expbackq() to prepare for command execution to be
re-entered.

In stable/10, there is more global state that needs to be restored than in
stable/11 and head.

Reported by: bdrewery

git-svn-id: svn://svn.freebsd.org/base/stable/10@316942 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agofix mismerge in r316846, MFC of r315858
avg [Fri, 14 Apr 2017 16:40:10 +0000 (16:40 +0000)]
fix mismerge in r316846, MFC of r315858

git-svn-id: svn://svn.freebsd.org/base/stable/10@316857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315852: zfs: add zio_buf_alloc_nowait and use it in vdev_queue_aggregate
avg [Fri, 14 Apr 2017 15:09:30 +0000 (15:09 +0000)]
MFC r315852: zfs: add zio_buf_alloc_nowait and use it in vdev_queue_aggregate

git-svn-id: svn://svn.freebsd.org/base/stable/10@316850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315853: zfs_putpages: use TXG_WAIT
avg [Fri, 14 Apr 2017 15:07:55 +0000 (15:07 +0000)]
MFC r315853: zfs_putpages: use TXG_WAIT

git-svn-id: svn://svn.freebsd.org/base/stable/10@316848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315858: aacraid: rework r315083 for a clean build with and without AACRAID_DEBUG
avg [Fri, 14 Apr 2017 15:06:22 +0000 (15:06 +0000)]
MFC r315858: aacraid: rework r315083 for a clean build with and without AACRAID_DEBUG

git-svn-id: svn://svn.freebsd.org/base/stable/10@316846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315960: dtrace sched:::preempt should fire only when there is preemption
avg [Fri, 14 Apr 2017 14:45:44 +0000 (14:45 +0000)]
MFC r315960: dtrace sched:::preempt should fire only when there is preemption

git-svn-id: svn://svn.freebsd.org/base/stable/10@316843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315851: move thread switch tracing from mi_switch to sched_switch
avg [Fri, 14 Apr 2017 14:44:06 +0000 (14:44 +0000)]
MFC r315851: move thread switch tracing from mi_switch to sched_switch

git-svn-id: svn://svn.freebsd.org/base/stable/10@316841 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315078: uma: fix pages <-> items conversions at several places
avg [Fri, 14 Apr 2017 14:41:31 +0000 (14:41 +0000)]
MFC r315078: uma: fix pages <-> items conversions at several places

git-svn-id: svn://svn.freebsd.org/base/stable/10@316839 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r286583: Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva
avg [Fri, 14 Apr 2017 14:39:58 +0000 (14:39 +0000)]
MFC r286583: Avoid sign extension of value passed to kva_alloc from uma_zone_reserve_kva

On behalf of: zbb

git-svn-id: svn://svn.freebsd.org/base/stable/10@316838 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315077: uma: eliminate uk_slabsize field
avg [Fri, 14 Apr 2017 14:11:59 +0000 (14:11 +0000)]
MFC r315077: uma: eliminate uk_slabsize field

git-svn-id: svn://svn.freebsd.org/base/stable/10@316835 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316593:
brooks [Fri, 14 Apr 2017 00:15:34 +0000 (00:15 +0000)]
MFC r316593:

Point out that -F probably does not do what the user expects.

Users attempting to create images from mtree METALOG files created by
installworld often use -F when they should be passing the METALOG file
in place of a directory. This is often produces difficult to debug
error reports.

Reviewed by: emaste
Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/10@316800 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316066:
bdrewery [Thu, 13 Apr 2017 20:36:40 +0000 (20:36 +0000)]
MFC r316066:

  Release ccb if mode_buffer allocation fails.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316791 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315691:
bdrewery [Thu, 13 Apr 2017 20:34:02 +0000 (20:34 +0000)]
MFC r315691:

  Rename _cc to _gcc to be more clear.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316787 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315211:
bdrewery [Thu, 13 Apr 2017 20:32:34 +0000 (20:32 +0000)]
MFC r315211:

  hier(7): Fix entry location for /usr/share/vt.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316785 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r291310:
ian [Thu, 13 Apr 2017 19:48:45 +0000 (19:48 +0000)]
MFC r291310:

Stop building vers.c in include/ and only build the needed osreldate.h.

Because of how osreldate.h was being built with newvers.sh, which always
spat out a vers.c dependent on SVN or git, the meta mode build was
considering osreldate.h to depend on the current git or SVN index.  This
would lead to entire tree rebuilds when modifying git's index.  There's
no reason to be generating vers.c here so just skip it.

While here, in mk-osreldate.sh rename PARAM_H to proper PARAMFILE (which
newvers.sh already has a default for) and remove unneeded export.

Sponsored by: EMC / Isilon Storage Division

git-svn-id: svn://svn.freebsd.org/base/stable/10@316781 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r314671 (by cem):
dim [Thu, 13 Apr 2017 17:11:50 +0000 (17:11 +0000)]
MFC r314671 (by cem):

newfs_nandfs: Fix unaligned pointer warning

PR: 217532
Submitted by: Trond Endrestol <Trond.Endrestol at ximalas.info>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316772 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316617 (partial):
gjb [Thu, 13 Apr 2017 15:47:58 +0000 (15:47 +0000)]
MFC r316617 (partial):
- Use the 'conv=sync' dd(1) option to fix writing the u-boot.imx
  file to the md(4) device for IMX6-based boards.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@316765 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316695, MFV r316693:
pfg [Thu, 13 Apr 2017 15:40:57 +0000 (15:40 +0000)]
MFC r316695, MFV r316693:
8046 Let calloc() do the multiplication in libzfs_fru_refresh

https://github.com/illumos/illumos-gate/commit/5697e03e6e3e2697f56ae341c7c8ce79680d6a2e

https://www.illumos.org/issues/8046

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Pedro Giffuni <pfg@freebsd.org>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 316520
sephe [Mon, 10 Apr 2017 03:23:57 +0000 (03:23 +0000)]
MFC 316520

    hyperv/hn: Fixat RNDIS rxfilter after the successful RNDIS init.

    Under certain conditions on certain versions of Hyper-V, the RNDIS
    rxfilter is _not_ zero on the hypervisor side after the successful
    RNDIS initialization, which breaks the assumption of any following
    code (well, it breaks the RNDIS API contract actually).  Clear the
    RNDIS rxfilter explicitly, drain packets sneaking through, and drain
    the interrupt taskqueues scheduled due to the stealth packets.

    Reported by:    dexuan@
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D10230

git-svn-id: svn://svn.freebsd.org/base/stable/10@316672 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC 316519
sephe [Mon, 10 Apr 2017 03:09:12 +0000 (03:09 +0000)]
MFC 316519

    hyperv/storvsc: Fixup SRB status.

    This unbreaks GEN2 Hyper-V cd support.

    Submitted by:   Hongjiang Zhang <honzhan microsoft com>
    Reviewed by:    dexuan@
    Sponsored by:   Microsoft
    Differential Revision:  https://reviews.freebsd.org/D10212

git-svn-id: svn://svn.freebsd.org/base/stable/10@316671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316412: Add IDs for Intel Cougar Point USB 2.0 controller.
mav [Sun, 9 Apr 2017 06:44:31 +0000 (06:44 +0000)]
MFC r316412: Add IDs for Intel Cougar Point USB 2.0 controller.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316355
kp [Sat, 8 Apr 2017 09:49:21 +0000 (09:49 +0000)]
MFC r316355

pf: Fix leak of pf_state_keys

If we hit the state limit we returned from pf_create_state() without cleaning
up.

PR: 217997
Submitted by: Max <maximos@als.nnov.ru>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoDirect commit of fixes to stable/10, resolving PCI passthrough and initialization
sbruno [Thu, 6 Apr 2017 19:13:40 +0000 (19:13 +0000)]
Direct commit of fixes to stable/10, resolving PCI passthrough and initialization
issues when trying to passthrough a i340 (igb) to VMware.

While here, cleanup some bits of em(4) to DTRT as well.

PR: 218113
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r314946:
cy [Thu, 6 Apr 2017 06:11:04 +0000 (06:11 +0000)]
MFC r314946:

Configure leap-second smearing (always).

Leap-second smearing is an experimental option that may be specified in
ntp.conf(5) and the -x option on the command line to spread the effect
of a leap-second over an interval as specified by the leapsmearinterval
config file statement. Recommended values are between 7200 (2 hours) and
86400 (24 hours).

It is advised that leap-second smearing not be used for public NTP
servers (https://www.meinbergglobal.com/download/burnicki/Leap\
%20Second%20Smearing%20With%20NTP.pdf). It is also advised that NTP
clients not use a mix of NTP servers using leap-second smearing with
NTP servers not using leap-second smearing as that could cause
undefined client behaviour.

Leap-second smearing was committed to ports net/ntp and net/ntp-devel
by r426825 on 2016-11-22.

Suggested by: des

git-svn-id: svn://svn.freebsd.org/base/stable/10@316559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316368:
ngie [Thu, 6 Apr 2017 05:04:20 +0000 (05:04 +0000)]
MFC r316368:
r316368 (by jkim):

Fix typos to stop removing new files.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316555 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316497:
brooks [Wed, 5 Apr 2017 21:08:26 +0000 (21:08 +0000)]
MFC r316497:

Correct a kernel stack leak in 32-bit compat when vfc_name is short.

Don't zero unused pointer members again.

Per discussion with secteam we are not issuing an advisory for this
issue as we have no current evidence it leaks exploitable information.

Reviewed by: rwatson, glebius, delphij
Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/10@316543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315673, r315674: Make CAM SIM lock optional.
mav [Tue, 4 Apr 2017 18:01:35 +0000 (18:01 +0000)]
MFC r315673, r315674: Make CAM SIM lock optional.

For three years now CAM does not use SIM lock, but still enforces SIM to
use it.  Remove this requirement, allowing SIMs to have any locking they
prefer, if they pass no mutex to cam_sim_alloc().

git-svn-id: svn://svn.freebsd.org/base/stable/10@316499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r312404, r312519, r313277:
delphij [Mon, 3 Apr 2017 06:14:23 +0000 (06:14 +0000)]
MFC r312404, r312519, r313277:

Use S_ISREG instead of manual & (also it's better to compare the
result from & and the pattern instead of just assuming it's one bit
value).

Pointed out by Tianjie Mao <tjmao tjmao com>.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316442 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315619: pet manlint.
delphij [Mon, 3 Apr 2017 06:09:12 +0000 (06:09 +0000)]
MFC r315619: pet manlint.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315709: Switch from using periph_links to sim_links.
mav [Sun, 2 Apr 2017 11:00:18 +0000 (11:00 +0000)]
MFC r315709: Switch from using periph_links to sim_links.

periph_links field belongs to periph drivers and must not be used here.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316410 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315682, r315683: Remove some dead code left after r246713.
mav [Sun, 2 Apr 2017 10:59:30 +0000 (10:59 +0000)]
MFC r315682, r315683: Remove some dead code left after r246713.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316409 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315681: Improve command timeout handling.
mav [Sun, 2 Apr 2017 10:57:49 +0000 (10:57 +0000)]
MFC r315681: Improve command timeout handling.

Let firmware do its best first, and if it can't, try software recovery.
I would remove software timeout handler completely, but found bunch of
complains on command timeout on sparc64 mailing list few years ago, so
better be safe in case of interrupt loss.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316407 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315678: Remove questionable reqp->req_time access.
mav [Sun, 2 Apr 2017 10:56:09 +0000 (10:56 +0000)]
MFC r315678: Remove questionable reqp->req_time access.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315677: Clean/unify some macro usage.
mav [Sun, 2 Apr 2017 10:54:58 +0000 (10:54 +0000)]
MFC r315677: Clean/unify some macro usage.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316403 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315587, r315652: Remove some dead/useless code.
mav [Sun, 2 Apr 2017 10:53:37 +0000 (10:53 +0000)]
MFC r315587, r315652: Remove some dead/useless code.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315579, r315670: Add initial support for multiple MSI-X vectors.
mav [Sun, 2 Apr 2017 10:52:00 +0000 (10:52 +0000)]
MFC r315579, r315670: Add initial support for multiple MSI-X vectors.

For 24xx and above use 2 vectors (default and response queue).
For 26xx and above use 3 vectors (default, response and ATIO queues).
Due to global lock interrupt hardlers never run simultaneously now, but
at least this allows to save one regitster read per interrupt.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315947:
dim [Sat, 1 Apr 2017 11:24:34 +0000 (11:24 +0000)]
MFC r315947:

Import libcxxrt master 8a853717e61d5d55cbdf74d9d0a7545da5d5ff92.

Interesting fixes which were not already merged:
0c7c611 Merge C++ demangler bug fixes from ELF Tool Chain (#40)
2b208d9 __cxa_demangle_gnu3: demangle 'z' as '...', not 'ellipsis' (#41)

git-svn-id: svn://svn.freebsd.org/base/stable/10@316354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r313961 r316061
bapt [Sat, 1 Apr 2017 09:37:15 +0000 (09:37 +0000)]
MFC: r313961 r316061

Update pci_vendors to 2017-03-16

git-svn-id: svn://svn.freebsd.org/base/stable/10@316352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316060:
bapt [Sat, 1 Apr 2017 09:32:05 +0000 (09:32 +0000)]
MFC r316060:

Import tzdata 2017b

git-svn-id: svn://svn.freebsd.org/base/stable/10@316350 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC: r315912 (by eugen@) and r315935
bapt [Sat, 1 Apr 2017 09:29:47 +0000 (09:29 +0000)]
MFC: r315912 (by eugen@) and r315935

Properly initialise with content of pw.conf(5) that was mistakenly ignored.
Also, respect "defaultgroup" if specified there.

Add a regression test

PR: 217934
Submitted by: Victor Sudakov <vas@mpeks.tomsk.su>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315636,315876,316095:
mm [Fri, 31 Mar 2017 20:17:30 +0000 (20:17 +0000)]
MFC r315636,315876,316095:
Sync libarchive with vendor

Vendor changes/bugfixes (FreeBSD-related):
r315636:
  PR 867 (bsdcpio): show numeric uid/gid when names are not found
  PR 870 (seekable zip): accept files with valid ZIP64 EOCD headers
  PR 880 (pax): Fix handling of "size" pax header keyword
  PR 887 (crypto): Discard 3072 bytes instead of 1024 of first keystream
  OSS-Fuzz issue 806 (mtree): rework mtree_atol10 integer parser
  Break ACL read/write code into platform-specific source files

r315876:
  Store extended attributes with extattr_set_link() if no fd is provided
  Add extended attribute tests to libarchive and bsdtar
  Fix tar's test_option_acls
  Support the UF_HIDDEN file flag

r316095:
  Constify variables in several places
  Unify platform ACL code in a single source file
  Fix unused variable if compiling on FreeBSD without NFSv4 ACL support

git-svn-id: svn://svn.freebsd.org/base/stable/10@316338 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315516
truckman [Fri, 31 Mar 2017 06:33:20 +0000 (06:33 +0000)]
MFC r315516

Change several constants used by the PIE algorithm from unsigned to signed.

 - PIE_MAX_PROB is compared to variable of int64_t and the type promotion
   rules can cause the value of that variable to be treated as unsigned.
   If the value is actually negative, then the result of the comparsion
   is incorrect, causing the algorithm to perform poorly in some
   situations.  Changing the constant to be signed cause the comparision
   to work correctly.

 - PIE_SCALE is also compared to signed values.  Fortunately they are
   also compared to zero and negative values are discarded so this is
   more of a cosmetic fix.

 - PIE_DQ_THRESHOLD is only compared to unsigned values, but it is small
   enough that the automatic promotion to unsigned is harmless.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>

git-svn-id: svn://svn.freebsd.org/base/stable/10@316325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316106:
ngie [Fri, 31 Mar 2017 04:51:08 +0000 (04:51 +0000)]
MFC r316106:

Don't shadow read(2) definition with `read` argument in vdev_{create,probe}

This fixes several -Wshadow warnings introduced in r192194, but now errors
with gcc 6.3.0.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316107:
ngie [Fri, 31 Mar 2017 04:44:37 +0000 (04:44 +0000)]
MFC r316107:

Remove redundant declaration for `zfs_crc64_table`

zfssubr.c already defines this statically. Besides, zfsimpl.c defined it, but
didn't use it.

This fixes a -Wredundant-decls warning.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316321 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316108:
ngie [Fri, 31 Mar 2017 04:43:25 +0000 (04:43 +0000)]
MFC r316108:

Remove -Wunused-but-set variable, `tail` in `ls_getdir(..)`

This variable has been unused since its inception in r40106.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r316080,r316081,r316115:
ngie [Fri, 31 Mar 2017 04:42:00 +0000 (04:42 +0000)]
MFC r316080,r316081,r316115:

r316080:

Fix some localized style(9) issues and reword CAM_ERRBUF_SIZE description

The CAM_ERRBUF_SIZE description rewording fixes a typo by proxy.

r316081:

Use `sizeof(cam_errbuf)` instead of `CAM_ERRBUF_SIZE` in snprintf calls

Reindent snprintf calls' arguments to match style(9) guidelines with
respect to indentation.

r316115:

libcam: use __func__ instead of hardcoding the function name as `func_name`

Tested with: `cam_device_copy(NULL, NULL)` // ;)..

git-svn-id: svn://svn.freebsd.org/base/stable/10@316316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

7 years agoMFC r315732:
ed [Thu, 30 Mar 2017 15:05:58 +0000 (15:05 +0000)]
MFC r315732:

  Add forward declaration for struct vnode.

  The coredump() function provided by this header file has struct vnode *
  as an argument.

git-svn-id: svn://svn.freebsd.org/base/stable/10@316277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f