summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r317196:kib2017-04-271-0/+3
| | | | Write-combine framebuffer writes through user-space mappings, if possible.
* MFC r316777 (by cem)truckman2017-04-272-2/+2
| | | | | | | | | | | | | | | 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: 1356163, 1356165 Sponsored by: Dell EMC Isilon
* MFC 317353sephe2017-04-271-12/+90
| | | | | | | | | | | | | | | 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
* MFC: r316745rmacklem2017-04-261-0/+32
| | | | | | | | | | | | | | | | | | 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().
* MFC: r316719rmacklem2017-04-261-9/+3
| | | | | | | | | | | 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.
* MFC: r316717rmacklem2017-04-261-9/+8
| | | | | | | | | | | | | 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.
* MFC: r316694rmacklem2017-04-262-6/+1
| | | | | | | | | | | | | 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).
* MFC r317169:gjb2017-04-261-0/+1
| | | | | | | | | | 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
* MFC r316810, r316814, r316816, r316991:cy2017-04-263-2/+12
| | | | | | | | | | | | | | | | | | 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
* MFC: r316692rmacklem2017-04-261-0/+8
| | | | | | | | | 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.
* MFC: r316669rmacklem2017-04-251-1/+11
| | | | | | | | | 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.
* MFC: r316667rmacklem2017-04-251-1/+1
| | | | | | | | | | 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.
* MFC: r316666rmacklem2017-04-251-1/+1
| | | | | | | | | | 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.
* MFC r316698:kib2017-04-251-8/+11
| | | | Remove debugging printf.
* MFC: r316655rmacklem2017-04-251-1/+1
| | | | | | | | | 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.
* MFC: r310491rmacklem2017-04-2511-181/+360
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* MFC r316768:brooks2017-04-241-0/+4
| | | | | | | | | | 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
* MFC r316766:brooks2017-04-241-2/+2
| | | | | | | | | | | | | | | | 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
* Partial MFC r316676 and the required r313045smh2017-04-246-67/+103
| | | | | | | | | | | | | | | | | | 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
* MFC r315913: Add brackets to fix incorrect macro expansion.mav2017-04-241-1/+1
|
* MFC r315908: Unify initiator and target DMA setup and command sending.mav2017-04-247-332/+114
| | | | The code is so alike that it is pointless to keep it separate.
* MFC r315870: isp field in struct isp_pcmd is also unused.mav2017-04-241-1/+0
|
* MFC r315869: Remove write-only crn field from struct isp_pcmd.mav2017-04-242-3/+0
|
* MFC r315708: Cleanup response queue processing.mav2017-04-244-318/+153
|
* MFC r316677: Do not register in CTL portal groups without portals.mav2017-04-242-6/+18
| | | | | | 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.
* MFC r317186kp2017-04-232-0/+6
| | | | | | | | | | | | | | | | | | 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>
* MFC r316652: Fix few minor issues found by Clang Analyzer.mav2017-04-232-2/+2
|
* MFC r316653: Fix few minor issues found by Clang Analyzer.mav2017-04-232-4/+10
|
* MFC r316993, r316994, r316997 as follows:cy2017-04-232-0/+10
| | | | | | | | | | | | | | | | | | | | | | 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
* MFC: r314694rgrimes2017-04-221-1/+9
| | | | | | | | Make vmrun.sh passthrough -u and -w to bhybe PR: 214273 Submitted by: Martin Birgmeier <la5lb...@aon.at> Approved by: grehan (mentor)
* MFC: r314691rgrimes2017-04-221-0/+8
| | | | | | Document 3 more src/ directories Approved by: grehan (mentor)
* Document EN-17:01 through EN-17:05, SA-16:39 through SA-17:03gjb2017-04-212-0/+36
| | | | Sponsored by: The FreeBSD Foundation
* MFC r316852:kib2017-04-211-4/+7
| | | | | | In fsck_ffs pass1, prevent the inosused variable from wrapping. PR: 218592
* MFC r317139 for real.cy2017-04-211-1/+1
| | | | | | | | Restore prototype accidently removed by r316811. Also remove $NetBSD$ accidentally added. Reported by: hps, lwhsu Pointy hat to: cy
* MFC r316811, r317139:cy2017-04-211-1/+5
| | | | | | | Add missing free()'s after calls to randomize(). PR: NetBSD PR/50559 Obtained from: Netbsd radix_ipf.c r1.6
* MFC r316809:cy2017-04-211-1/+1
| | | | | | | | | | | | 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().
* MFC r316183davidcs2017-04-204-148905/+148310
| | | | Upgrade firmware and other related files to version 5.4.64
* MFC r316739:kib2017-04-191-6/+3
| | | | Fix reporting of _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX.
* MFC 316813,316815sephe2017-04-192-2/+2
| | | | | | | | | | | | | | 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
* MFC 316515,316812sephe2017-04-194-0/+1201
| | | | | | | | | | | | | | | | | 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
* MFC r316747davidcs2017-04-191-1/+1
| | | | Fix rss_ind_table entry for num_funcs > 1
* MFC r316720davidcs2017-04-192-13/+17
| | | | | | | | 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()
* MFC r316485davidcs2017-04-1997-0/+226248
| | | | | Add 25/40/100Gigabit Ethernet Driver version v1.3.0 for Cavium Inc's. Qlogic 45000 Series Adapters
* MFC 317107sephe2017-04-191-12/+19
| | | | | | | hyperv: Use kmem_malloc for hypercall memory due to NX bit change. Reported by: dexuan@ Sponsored by: Microsoft
* MFC r316310davidcs2017-04-191-1/+2
| | | | | | 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).
* MFC r316309davidcs2017-04-194-5/+151
| | | | Add support for optional Soft LRO
* MFC r285117asomers2017-04-181-7/+12
| | | | | | | | | | | | | | | | 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
* MFC r316716:ae2017-04-181-3/+6
| | | | | | | | | | | | 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
* MFC r316956:bapt2017-04-171-7/+13
| | | | Update pci_vendors to 2017.04.03
* MFC r316427, r316428: Add Log directory and SATA NCQ Send and Receive Log.mav2017-04-161-5/+22
| | | | Those are used at least by Linux guests to detect queued TRIM support.
OpenPOWER on IntegriCloud