102468 Commits

Author SHA1 Message Date
whu
c78f4c18f7 MFC r285785 Do not enable UDP checksum offloading when running on the
Hyper-V on Windows Server 2012 and earlier hosts.

Submitted by: whu
Reviewed by: royger
Approved by: royger
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D3217
2015-07-28 05:46:37 +00:00
jimharris
bc6d158afc MFC r285816:
nvme: ensure csts.rdy bit is cleared before returning from nvme_ctrlr_disable

Sponsored by:	Intel
2015-07-27 15:37:02 +00:00
jimharris
6f14ca5382 MFC r285815:
nvme: properly handle case where pci_alloc_msix does not alloc all vectors

Sponsored by:	Intel
2015-07-27 15:35:36 +00:00
jimharris
6e669fcd5f MFC r285767:
nvd: set d_delmaxsize to full capacity of NVMe namespace

  The NVMe specification has no ability to specify a maximum delete size
  that is less than the full capacity of the namespace - so just using the
  namespace size is the correct value here.

  This fixes reported issues where ZFS trim on init looked like it was
  hanging the system - previously the default I/O max size (128KB on
  Intel NVMe controllers) was used for delete operations which worked out
  to only about 8MB/s.  With this patch I can add an 800GB DC P3700
  drive to a ZFS pool in about 15-20 seconds.

Sponsored by:	Intel
2015-07-27 15:32:37 +00:00
rmacklem
9c93ec1f0b MFC: r285066
Alex Burlyga reported a POLA violation for the new NFS client as
compared to the old NFS client via email to the freebsd-fs@ mailing list.
For the new client, when multiple clients attempted to create a symbolic
link concurrently, more that one client would report success instead of
EEXIST. This was caused by code in the new client that mapped EEXIST to
OK assuming it was caused by a retried RPC request.
Since the old client did not do this, the patch defaults to the old
behaviour and permits the new behaviour to be enabled via a sysctl.
2015-07-27 00:28:51 +00:00
jhb
dc79e09c5b Partially revert r284034. In particular, revert the final change in this
MFC (281874).  It broke suspend and resume on several Thinkpads (though not
all) in 10 even though it works fine on the same laptops in HEAD.

PR:		201239
Reported by:	Kevin Oberman and several others
2015-07-25 00:14:02 +00:00
gjb
27addd8a72 - Reset stable/10 back to -PRERELEASE status now that releng/10.2
has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-23 23:35:20 +00:00
hrs
b037e0b55c MFC r282805:
- Remove ND6_IFF_IGNORELOOP.  This functionality was useless in practice
  because a link where looped back NS messages are permanently observed
  does not work with either NDP or ARP for IPv4.

- draft-ietf-6man-enhanced-dad is now RFC 7527.

Approved by:	re (gjb)
2015-07-23 19:58:56 +00:00
hrs
123cf5c769 MFC r279538:
Fix group membership of cloned interfaces when one is moved by
if_vmove().

In if_vmove(), if_detach_internal() and if_attach_internal() were
called in series to detach and reattach the interface.  When
detaching, if_delgroup() was called and the interface leaves all of
the group membership.  And then upon attachment, if_addgroup(ifp,
IFG_ALL) was called and it joined only "all" group again.

This had a problem. Normally, a cloned interface automatically joins
a group whose name is ifc_name of the cloner in addition to "all"
upon creation.  However, if_vmove() removed the membership and did
not restore upon attachment.

Approved by:	re (gjb)
2015-07-23 19:57:47 +00:00
hrs
1bf10917ef MFC r273992:
Fix a bug which prevented ND6_IFF_IFDISABLED flag from clearing when
the newly-added IPv6 address was /128.

Approved by:	re (gjb)
2015-07-23 19:54:42 +00:00
arybchik
d5e30036e4 MFC r285798
sfxge: added fallbacks for pre 4.2.1 firmware support

Driver must be able to start against older firmware that is missing
recently added MCDI calls, otherwise firmware upgrade will not be
possible.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    re (gjb)
2015-07-23 15:08:21 +00:00
brueffer
d85d061a9a MFC: r285628
Actually recognize all Intel Lynx Point devices we have device IDs for.

PR:		195851
Submitted by:	ftigeot@wolfpond.org
Approved by:	re (gjb)
2015-07-23 13:22:13 +00:00
scottl
ab97a72940 Merge driver for PMC Sierra's range of SAS/SATA HBAs.
Submitted by:   Achim Leubner <Achim.Leubner@pmcs.com>
Approved by: re
2015-07-23 05:26:09 +00:00
hiren
141df3ac09 MFC r284941:
Avoid a situation where we do not set persist timer after a zero window
condition.
If you send a 0-length packet, but there is data is the socket buffer, and
neither the rexmt or persist timer is already set, then activate the persist
timer.

PR:		192599
Approved by:	re (delphij)
2015-07-22 15:05:45 +00:00
delphij
457165363e Fix resource exhaustion due to sessions stuck in LAST_ACK state.
Security:	CVE-2015-5358
Security:	SA-15:13.tcp
Submitted by:	Jonathan Looney (Juniper SIRT)
Approved by:	re (so blanket)
2015-07-21 23:42:17 +00:00
hiren
e21e1ce198 Partial MFC of r285528 as full RSS support is not available in FreeBSD 10.
Expose full 32bit RSS hash from card regardless of whether RSS is defined or
not. When doing multiqueue, we are all setup to have full 32bit RSS hash from
the card. We do not need to hide that under "ifdef RSS" and should expose that
by default so others like lagg(4) can use that and avoid hashing the traffic by
themselves.

Approved by:	    re (gjb)
Sponsored by:	    Limelight Networks
2015-07-21 19:41:39 +00:00
pkelsey
04fd70b7f2 MFC r285567:
Check TCP timestamp option flag so that the automatic receive buffer
scaling code does not use an uninitialized timestamp echo reply value
from the stack when timestamps are not enabled.

Approved by: re (gjb)
2015-07-21 18:38:31 +00:00
markj
84c91edd53 MFC r285663, r285664, r285667:
Ensure that locstat_nsecs() has no effect when lockstat probes are not
enabled or when the profiled lock carries the LO_NOPROFILE flag.

PR:		201642, 201517
Approved by:	re (gjb)
Tested by:	Jason Unovitch
2015-07-21 17:16:37 +00:00
allanjude
10c80a84da MFC: r285594
New partition flag for gpart, writes the 0xee partition in the pmbr in the second slot, rather than the first.
	Works around Lenovo legacy GPT boot issue

PR:		184910
Approved by:	re (gjb), marcel
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3140
2015-07-21 15:50:14 +00:00
kib
90d01ac9ea Revert r284178 and r284256.
Approved by:	re (gjb)
2015-07-21 15:06:22 +00:00
royger
0dafb147a9 MFC: r284296
xen-blk{front/back}: remove broken FreeBSD extensions

Approved by: re (gjb)
2015-07-21 07:22:18 +00:00
royger
1266acc975 MFC: r285089
netfront: preserve configuration across migrations

Approved by: re (gjb)
2015-07-21 07:20:02 +00:00
hiren
2fc2987135 Fix a typo in r285668. Replace hw.ixgbe.* with correct hw.ix.* for a couple of
sysctls.

Approved by:	re (gjb)
Sponsored by:	Limelight Networks
2015-07-21 00:31:13 +00:00
allanjude
e644fa27a1 MFC: r277949:
New function smbios_match to detect BIOS versions during boot

MFC: r277957:
	Fix order of functions in smbios.c (corrects r277949)

MFC: r281138:
	SMBIOS support for EFI

r281138 makes changes to the new unified EFI loader (r280950), which has not been merged to stable/10 (and likely won't be).
These changes were manually applied to the amd64 EFI loader (sys/boot/amd64/efi).
The changes to sys/boot/amd64/efi are a direct commit.

Reviewed by:	stas
Approved by:	re (gjb), marcel
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3129
2015-07-20 22:14:55 +00:00
jpaetzel
91cc8a35f0 MFC 278040:
Prevent inlining txg_quiesce

This allows dtrace to monitor the calls to txg_quiesce which can be
really helpful.

Also standardize __noinline order for arc_kmem_reap_now.

Sponsored by:	Multiplay

Approved by:	re
2015-07-20 14:38:40 +00:00
hiren
a22599dcad Loader tunable fetching has been broken on stable/10 since ix(4) rewrite
introduced by r280182. FreeBSD-head doesn't need TUNABLE_INT() now with
SYSCTL_INT() but stable/10 still does.
Note: This is a direct commit to stable/10.

PR:		201644
Reviewed by:	erj
Approved by:	re (gjb)
Sponsored by:	Limelight Networks
2015-07-18 04:49:36 +00:00
gjb
752b1ca18b Update stable/10 to BETA2 in preparation for 10.2-BETA2 builds.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-17 00:00:04 +00:00
kib
dfb797a5f0 MFC r284207 (by alc):
Correct a type error in kmem_unback().

Requested by:	alc
Approved by:	re (gjb)
2015-07-16 15:13:17 +00:00
kib
83cf60b07d MFC r276439 (by alc):
Make the creation of the free lists dynamic, i.e., it is based on the
available physical memory at boot time. For amd64 systems with 64 GB
or more of physical memory, create free lists for managing pages with
physical addresses below 4 GB.

PR:	185727
Requested by:	alc
Approved by:	re (gjb)
2015-07-16 14:41:58 +00:00
ae
1392531c0f MFC r285204:
Fill the port and protocol information in the SADB_ACQUIRE message
  in case when security policy has it as required by RFC 2367.

  PR:		192774

Approved by:	re (delphij)
2015-07-15 21:09:38 +00:00
delphij
a0741a7553 MFC r285424 (ian):
Use the monotonic (uptime) counter rather than time-of-day to measure
elapsed time between ntp_adjtime() clock offset adjustments.  This
eliminates spurious frequency steering after a large clock step (such
as a 1970->2015 step on a system with no battery-backed clock hardware).

This problem was discovered after the import of ntpd 4.2.8, which does
things in a slightly different (but still correct) order than the 4.2.4
we had previously.  In particular, 4.2.4 would step the clock then
immediately after use ntp_adjtime() to set the frequency and offset to
zero, which captured the post-step time-of-day as a side effect.  In
4.2.8, ntpd sets frequency and offset to zero before any initial clock
step, capturing the time as 1970-ish, then when it next calls
ntp_adjtime() it's with a non-zero offset measurement. This non-zero
value gets multiplied by the apparent 45-year interval, which blows up
into a completely bogus frequency steer.  That gets clamped to 500ppm,
but that's still enough to make the clock drift so fast that ntpd has
to keep stepping it every few minutes to compensate.

Approved by:	re (gjb)
2015-07-15 19:11:43 +00:00
brueffer
7422eac7e1 MFC: r261495 by ed
Use right buffer to print to.

PR:		kern/176597
Submitted by:	Christoph Mallon <christoph mallon gmx de>
Approved by:	re (gjb)
2015-07-15 17:43:13 +00:00
pkelsey
bc26e9b8dc MFC r285190:
Fix if_loop so bpfwrite() can use it regardless of the state of
bd_hdrcmplt.  As if_loop does not use link-level headers, its behavior
when used by bpfwrite() should be the same regardless of the state of
bd_hdrcmplt.  Without this change, libpcap (and other BPF users that
work like it) fail when writing to loopback interfaces.

Approved by: re
2015-07-15 16:57:40 +00:00
brueffer
8ed5249cad MFC: r285006
Use the correct le*dec function to decode a 16bit type.

PR:		194228
Submitted by:	David Horwitt
Approved by:	re (marius)
2015-07-15 11:58:30 +00:00
brueffer
c846b28e60 MFC: r284931
Set the initial system time to a sane (as in: not end of 21st century)
value when booting on a PC with CMOS clock set to a year before 2000.

This uses 1980 (instead of 1970 as in the initial patch) as pivot year as
suggested by imp in the PR followup.

PR:		195703
Submitted by:	cs@soi.spb.ru
Reviewed by:	imp
Approved by:	re (gjb)
2015-07-13 11:58:08 +00:00
hselasky
e70b377190 MFC r285088:
Fix broken implementation of "kvasprintf()" function by adding missing
kmalloc() call. Make function global instead of static inline to fix
compiler warnings about passing variable argument lists to inline
functions.

Sponsored by:   Mellanox Technologies
Approved by:	re, gjb
2015-07-11 21:59:15 +00:00
kib
969c638bab MFC r284887:
Handle errors from background write of the cylinder group blocks.

MFC r284927:
Simplify code.

Approved by:	re (gjb)
2015-07-11 19:11:40 +00:00
gjb
42ea6b1b27 Fix two remaining issues with the arm UFS mount issue:
- Add the GEOM_PART_GPT option and enable MSDOSFS in the GUMSTIX
  kernel. [1]

- Add GEOM_LABEL to the PANDABOARD kernel, that should have been
  included included in r285132.  I confused the kernel configuration
  used for the WANDBOARD and PANDABOARD, which the former uses the
  IMX6 kernel configuration, along with the CUBOX-HUMMINGBOARD.

This is a direct commit to stable/10, as was r285132.

[1] I do not actually have the GUMSTIX board, but I suspect it will
    fail to boot in the same way as the others have been.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-10 22:10:00 +00:00
gjb
cb93732d0d Update stable/10 to BETA1 in preparation for 10.2-BETA1 builds.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2015-07-10 00:01:33 +00:00
loos
13177b16bb MFC r285138:
Install loader.rc with ARM u-boot loader (ubldr).

  loader.rc is the responsible to read and process loader.conf variables.

  This fix the issue of loader.conf being silently ignored.

Approved by:	re (gjb)
2015-07-08 23:50:04 +00:00
gjb
cee33caf0f MFC r273489 (cperciva):
Populate the GELI passphrase cache with the kern.geom.eli.passphrase
 variable (if any) provided in the boot environment.  Unset it from
 the kernel environment after doing this, so that the passphrase is
 no longer present in kernel memory once we enter userland.

 This will make it possible to provide a GELI passphrase via the boot
 loader.

 Note: head and stable/10 differ as a result of r273174, which renames
 the getenv(), setenv(), and unsetenv() functions with kern_getenv(),
 kern_setenv(), and kern_unsetenv(), which was reverted in the relevant
 parts of this change in 10-STABLE.

PR:		200448
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-08 09:54:17 +00:00
gjb
82385ff484 Revert r285249, pending further investigation on how the build
broke.

Approved by:	re (implicit)
Pointyhat:	gjb (self)
Sponsored by:	The FreeBSD Foundation
2015-07-07 20:36:48 +00:00
gjb
4b4ce39bb7 MFC r273489 (cperciva):
Populate the GELI passphrase cache with the kern.geom.eli.passphrase
 variable (if any) provided in the boot environment.  Unset it from
 the kernel environment after doing this, so that the passphrase is
 no longer present in kernel memory once we enter userland.

 This will make it possible to provide a GELI passphrase via the boot
 loader.

PR:		200448
Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-07 18:52:22 +00:00
whu
c6218b1955 MFC r284746 and r284889 TSO and checksum offloading support for Netvsc
driver on Hyper-V.

Submitted by: whu
Reviewed by: royger
Approved by: re
Relnotes: yes
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D2906
2015-07-07 04:15:22 +00:00
avg
998834455c MFC r284593: MFV r284412: 5911 ZFS "hangs" while deleting file
illumos/illumos-gate@46e1baa6cf
https://www.illumos.org/issues/5911
Sometimes ZFS appears to hang while deleting a file. It is actually
making slow progress at the file deletion, but other operations
(administrative and writes via the data path) "hang" until the file
removal completes, which can take a long time if the file has many
blocks. The deletion (or most of it) happens in a single txg, and the
sync thread spends most of its time reading indirect blocks...

Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Alek Pinchuk <alek@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

PR:	199775
Approved by:	re(kib)
2015-07-06 10:40:51 +00:00
marius
afd8ff0c41 MFC: r281337
Don't enable RX and TX before their initial configuration is done, i. e.
after setting up interrupt moderation but before turning interrupts on.
This matches what Realtek's r8168 Linux driver does as of version 8.039.00
and fixes problems with certain incarnations of certain MAC revisions
like the interface requiring an extra up/down-cycle after boot to start
working or DMA configuration not being adhered to.

PR:		193743, 197535
Approved by:	re (kib)
2015-07-05 20:16:38 +00:00
marius
882f03214b MFC: r281751
Refine the workaround for Intel HSD131 [1] added in r269052 (MFCed to
stable/10 in r269592):
- Use the full mask described by the erratum as with a sufficiently high
  number of these false-positives, the overflow bit (bit 62) additionally
  gets set [7].
- HSD131 has been brought into several other Haswell-derived CPUs including
  to the next generation, i. e. Intel Broadwell. Thus, also skip reporting of
  these benign errors by default on CPU models affected by HSM142, HSW131 and
  BDM48 [2 - 5], describing the HSD131 silicon bug for additional models.
  Also, Celeron 2955U with a CPU ID of 0x45 have been reported to be covered
  by this fault [6], with the specification update concerned with HSM142 [2]
  only referring to 0x3c and 0x46.

Submitted by:	David Froehlich [7]
Approved by:	re (kib)

http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-desktop-specification-update.pdf [1]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/4th-gen-core-family-mobile-specification-update.pdf [2]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/5th-gen-core-family-spec-update.pdf [3]
http://www.intel.de/content/dam/www/public/us/en/documents/specification-updates/core-m-processor-family-spec-update.pdf [4]
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e3-1200v3-spec-update.pdf [5]
https://lists.freebsd.org/pipermail/freebsd-hackers/2015-January/046878.html [6]
2015-07-05 19:32:10 +00:00
gjb
4d6a99d3a9 Add the GEOM_LABEL option to the BEAGLEBONE, GUMSTIX, and RPI-B
kernel configuration files, resolving an issue where the UFS and
MSDOSFS partitions would not mount as set in fstab(5).

This is a direct commit to stable/10, as the GEOM_LABEL option
is handled differently in head for arm/armv6.  The WANDBOARD
and PANDABOARD already have this kernel option entry via the IMX6
kernel configuration file, so do not need to be changed.

Approved by:	re (kib)
Sponsored by:	The FreeBSD Foundation
2015-07-04 14:50:32 +00:00
sjg
63c8b34326 Latest clang uses openat(2).
If the pathname is absolute or dirfd is AT_FDCWD we can
handle it exactly like open(2).
Otherwise we output an A record to indicate that the path of
an open directory needs to be used (earlier in the trace).

Also filemon_pid_check needs to hold proctree_lock
and use proc_realparent()

Differential Revision:  D2810
Reviewed by: jhb
Approved by: re
2015-07-03 20:43:31 +00:00
emaste
fda669645d MFC r269137 by marcel:
Add missing definition of ELF_MACHINE_OK, now used by gcore(1).

PR:	201204
2015-07-02 18:27:04 +00:00