]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r257811 (by markj):
kib [Sat, 12 Mar 2016 17:12:00 +0000 (17:12 +0000)]
MFC r257811 (by markj):
Include rtld itself when iterating over loaded ELF objects in
dl_iterate_phdr(3).

MFC r294373:
Do not call callbacks for dl_iterate_phdr(3) with the rtld bind and
phdr locks locked.

MFC r294470 (by kan):
Fix initlist_add_object invocation parameters.

MFC r294936 (by kan):
Do not unlock rtld_phdr_lock over callback invocations.

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

8 years agoMFC r296348:
ae [Fri, 11 Mar 2016 09:41:46 +0000 (09:41 +0000)]
MFC r296348:
  Use correct size for malloc.

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

8 years agoMFC 296280:
jgh [Fri, 11 Mar 2016 01:39:28 +0000 (01:39 +0000)]
MFC 296280:

PR: 202971
Submitted by: adamw@FreeBSD.org
Reviewed by: bdrewery@
Approved by: wblock@
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5429

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

8 years agoMFC r296610:
smh [Thu, 10 Mar 2016 23:37:16 +0000 (23:37 +0000)]
MFC r296610:

ZFS send fails to transmit some holes

PR: 207714
Approved by: re (gjb)
Sponsored by: Multiplay

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

8 years agoMFC r296071
davidcs [Wed, 9 Mar 2016 21:30:21 +0000 (21:30 +0000)]
MFC r296071
Upgrade the firmware carried in driver and loaded during hardware
initialization (a.k.a STORM firmware) to version 7.13.1 (latest version)

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

8 years agoMFC r283869 (by araujo)
truckman [Wed, 9 Mar 2016 17:40:33 +0000 (17:40 +0000)]
MFC r283869 (by araujo)

Fix the wrong format, format specifies type 'int' but the argument has type
'long', it was spotted by clang.

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

8 years agoMFC r295966:
kib [Wed, 9 Mar 2016 10:21:13 +0000 (10:21 +0000)]
MFC r295966:
Return dst as the result from memcpy(9) on amd64.

PR: 207422

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

8 years agoMFC r296009:
kib [Wed, 9 Mar 2016 10:19:32 +0000 (10:19 +0000)]
MFC r296009:
In bpf_getdltlist(), do not call copyout(9) while holding bpf lock.
Copy the data into temprorary malloced buffer and drop the lock for
copyout.

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

8 years agoMFC r295998:
kib [Wed, 9 Mar 2016 10:09:51 +0000 (10:09 +0000)]
MFC r295998:
Remove references to Giant in the description of vrele(9).  Add notes
about vnode lock and sleeping.

MFC r296001:
Fix year.

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

8 years agoMFC r295967:
ae [Wed, 9 Mar 2016 10:01:28 +0000 (10:01 +0000)]
MFC r295967:
  Fix useless check. m_pkthdr.len should be equal to orglen.

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

8 years agoMFC r281920,r284247,r284248,r295651
vangyzen [Tue, 8 Mar 2016 20:24:12 +0000 (20:24 +0000)]
MFC r281920,r284247,r284248,r295651

ichsmb: Add PCI device IDs for Intel Sunrise Point-H,
Wellsburg, and Lynx-Point LP SMBus controllers.
Remove whitespace.

Sponsored by: Dell Inc.

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

8 years agoMFC r295675:
pfg [Tue, 8 Mar 2016 14:38:06 +0000 (14:38 +0000)]
MFC r295675:
Fix "naive" use of ftell(3).

Secure coding practices, FIO19-C.

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

8 years agoMFC r295672:
pfg [Mon, 7 Mar 2016 16:18:52 +0000 (16:18 +0000)]
MFC r295672:
crontab: ftruncate() with ftello() instead of ftell().

Obtained from: OpenBSD (CVS rev. 1.47)

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

8 years agoMFC r295671:
pfg [Mon, 7 Mar 2016 16:12:04 +0000 (16:12 +0000)]
MFC r295671:
cron: use (char *)NULL instead of (char *)0 in execle.

Obtained from: OpenBSD (CVS Rev 1.25)

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

8 years agoMFC r295861:
pfg [Mon, 7 Mar 2016 16:05:53 +0000 (16:05 +0000)]
MFC r295861:

ostiInitiatorIOCompleted(): wrong sizeof() argument.

Detected by: PVS Static Analysis
CID: 13316011331523

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

8 years agoMFC r295810:
pfg [Mon, 7 Mar 2016 15:52:51 +0000 (15:52 +0000)]
MFC r295810:
firewire: fix a mismatch introduced in r230558.

Found by: PVS Static Analysis
Reviewed by: sbruno

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

8 years agoSpell "maximum" correctly.
sbruno [Mon, 7 Mar 2016 13:43:23 +0000 (13:43 +0000)]
Spell "maximum" correctly.

noted by mav@

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

8 years agoTrim old entries.
hrs [Mon, 7 Mar 2016 10:59:28 +0000 (10:59 +0000)]
Trim old entries.

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

8 years ago- Use FPI and catalog resolution instead of system entities. This change
hrs [Mon, 7 Mar 2016 10:56:38 +0000 (10:56 +0000)]
- Use FPI and catalog resolution instead of system entities.  This change
  fixes build with a non-standard DOC_PREFIX, but it is still a temporal
  measure because some of them should be done by using XInclude,
  not by entity reference.

- Trim old entries and bump version numbers.

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

8 years agoMFC r295928:
hselasky [Mon, 7 Mar 2016 09:42:16 +0000 (09:42 +0000)]
MFC r295928:
Configure the correct bMaxPacketSize for control endpoints before
requesting the initial complete device descriptor and not as part of
the subsequent babble error recovery. Babble means that the received
USB packet was bigger than than configured maximum packet size. This
only affects enumeration of FULL speed USB devices which use a
bMaxPacketSize different from 8 bytes. This patch might help fix
enumeration of USB devices which exhibit USB I/O errors in dmesg
during boot.

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

8 years agoMFC r295923:
hselasky [Mon, 7 Mar 2016 09:37:07 +0000 (09:37 +0000)]
MFC r295923:
Be more verbose when truncating number of HID items.

Suggested by: Larry Rosenman <ler@lerctr.org>

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

8 years agoMFC r295608:
hselasky [Mon, 7 Mar 2016 09:35:20 +0000 (09:35 +0000)]
MFC r295608:
Fix variable assignment inside if-clause in the smsc driver.
Found by D5245 / PVS.

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

8 years agoMFC r296392: Set bhsdi_target_transfer_tag to reserved value, which is
mav [Mon, 7 Mar 2016 09:00:27 +0000 (09:00 +0000)]
MFC r296392: Set bhsdi_target_transfer_tag to reserved value, which is
0xffffffff.

This should be a purely cosmetic change.

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

8 years agoMFC r295562: Don't check CmdSN for initial login request.
mav [Mon, 7 Mar 2016 08:59:06 +0000 (08:59 +0000)]
MFC r295562: Don't check CmdSN for initial login request.

This fixes connection errors for some initiators not starting CmdSN
from zero.

While there, fix wrong status details reported for couple errors.

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

8 years agoMFC r295324: Add error check to not leak logs with syntax errors in case
mav [Mon, 7 Mar 2016 08:57:51 +0000 (08:57 +0000)]
MFC r295324: Add error check to not leak logs with syntax errors in case
of failed `zpool history`.

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

8 years agoMFC r296419 (by kib):
dim [Mon, 7 Mar 2016 07:54:48 +0000 (07:54 +0000)]
MFC r296419 (by kib):

In the link_elf_obj.c, handle sections of type SHT_AMD64_UNWIND same
as SHT_PROGBITS.  This is needed after the clang 3.8 import, which
generates that type for .eh_frame section, which had SHT_PROGBITS type
before.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
PR: 207729
Tested by: dim (previous version)
Sponsored by: The FreeBSD Foundation

MFC r296428:

Since kernel modules can now contain sections of type SHT_AMD64_UNWIND,
the boot loader should not skip over these anymore while loading images.
Otherwise the kernel can still panic when it doesn't find the .eh_frame
section belonging to the .rela.eh_frame section.

Unfortunately this will require installing boot loaders from sys/boot
before attempting to boot with a new kernel.

Reviewed by: kib

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

8 years agoMFC r295901:
dim [Mon, 7 Mar 2016 07:49:01 +0000 (07:49 +0000)]
MFC r295901:

Fix a problem in ld, causing it to sometimes print messages similar to
"invalid string offset 65521 >= 27261 for section `.strtab'". for object
files produced by recent versions of clang.

In BFD's elf_create_symbuf() function, the size of the symbol buffer
('ssymbuf') is not calculated correctly, and the initial value for the
'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
members.

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

8 years agoMFC r295844:
dim [Mon, 7 Mar 2016 07:46:17 +0000 (07:46 +0000)]
MFC r295844:

Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).

Currently, zfs(8) and zpool(8) print "invalid type '(null)'" or similar
messages, if you pass in invalid types, sources or column names for "zfs
get", "zfs list" and "zpool get".  This is because the commands use
getsubopt(3), and in case of failure, they print 'value', which is NULL
when sub options don't match.

They should print 'suboptarg' instead, which is the documented way to
get at the non-matching sub option value.

Reviewed by: smh
Differential Revision: https://reviews.freebsd.org/D5365

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

8 years agoMFC r295836:
kp [Sun, 6 Mar 2016 08:52:03 +0000 (08:52 +0000)]
MFC r295836:
ifconfig(8): can't use 'name' or 'description' when creating interface with auto numbering

If one does 'ifconfig tap create name blah', it will return error because the
'name' command doesn't properly populate the request sent to ioctl(...). The
'description' command has the same bug, and is also fixed with this patch.

If one does 'ifconfig tap create mtu 9000 name blah', it DOES work, but 'tap0'
(or other sequence number) is echoed, instead of the expected 'blah'. (assuming
the name change actually succeeded)

PR:     206876
Submitted by:       Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Differential Revision:      https://reviews.freebsd.org/D5341

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

8 years agoMFC:
dwmalone [Sun, 6 Mar 2016 08:40:21 +0000 (08:40 +0000)]
MFC:
r295924: Make sure that hash-based db files fsync befor closing/syncing.
r295925: We no longer need O_SYNC pwd_mkd
r295465: We no longer need O_SYNC on services_mkdb
r295800: We no longer need O_SYNC on cap_mkdb

This should improve the performance of building db files.

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

8 years agoMFC r295276: Add defines for WRITE_UNCORRECTABLE ATA command, and improve
rpokala [Sun, 6 Mar 2016 02:33:02 +0000 (02:33 +0000)]
MFC r295276: Add defines for WRITE_UNCORRECTABLE ATA command, and improve
command logging

Add #defines for ATA_WRITE_UNCORRECTABLE48 and its features. Update the
decoding in ATACAM to recognize the new values. Also improve command
decoding for a few other commands (SMART, NOP, SET_FEATURES). Bring the
decoding in ata(4) up to parity with ATACAM.

Sponsored by: Panasas, Inc.

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

8 years ago- Reset stable/10 back to -PRERELEASE status now that releng/10.3
marius [Fri, 4 Mar 2016 01:29:09 +0000 (01:29 +0000)]
- Reset stable/10 back to -PRERELEASE status now that releng/10.3
  has been branched.
- Update __FreeBSD_version to reflect the new -STABLE branch.

Approved by: re (implicit)

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

8 years agoRe-enable SSLv2 support to restore ABI.
jkim [Fri, 4 Mar 2016 00:40:15 +0000 (00:40 +0000)]
Re-enable SSLv2 support to restore ABI.

Excerpt from CHANGES:

    Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via
    the version-flexible SSLv23_method() will need to explicitly call
    either of:

SSL_CTX_clear_options(ctx, SSL_OP_NO_SSLv2);
    or
SSL_clear_options(ssl, SSL_OP_NO_SSLv2);

    as appropriate.  Even if either of those is used, or the application
    explicitly uses the version-specific SSLv2_method() or its client and
    server variants, SSLv2 ciphers vulnerable to exhaustive search key
    recovery have been removed.  Specifically, the SSLv2 40-bit EXPORT
    ciphers, and SSLv2 56-bit DES are no longer available.

Approved by: re (marius, gjb), so (delphij)

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

8 years agoMFC 285730
gnn [Thu, 3 Mar 2016 23:25:31 +0000 (23:25 +0000)]
MFC 285730
Only report the lack of ALTQ support if pfctl is using verbose (-v) mode.

PR: 194935
Submitted by: Jim Thompson
Approved by: re (gjb)

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

8 years agoMFC: r296025:
kp [Thu, 3 Mar 2016 07:16:35 +0000 (07:16 +0000)]
MFC: r296025:

pf: Fix possible out-of-bounds write

In the DIOCRSETADDRS ioctl() handler we allocate a table for struct pfr_addrs,
which is processed in pfr_set_addrs(). At the users request we also provide
feedback on the deleted addresses, by storing them after the new list
('bcopy(&ad, addr + size + i, sizeof(ad));' in pfr_set_addrs()).

This means we write outside the bounds of the buffer we've just allocated.
We need to look at pfrio_size2 instead (i.e. the size the user reserved for our
feedback). That'd allow a malicious user to specify a smaller pfrio_size2 than
pfrio_size though, in which case we'd still read outside of the allocated
buffer. Instead we allocate the largest of the two values.

Reported By:        Paul J Murphy <paul@inetstat.net>
PR:         207463
Approved by: re (marius)

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

8 years agoMerge OpenSSL 1.0.1s. This is a security update.
delphij [Wed, 2 Mar 2016 15:43:01 +0000 (15:43 +0000)]
Merge OpenSSL 1.0.1s.  This is a security update.

Relnotes: yes
Approved by: re (so@ implicit)

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

8 years agoMFC r295969:
ae [Wed, 2 Mar 2016 13:38:21 +0000 (13:38 +0000)]
MFC r295969:
  Fix bug in filling and handling ipfw's O_DSCP opcode.
  Due to integer overflow CS4 token was handled as BE.

  PR: 207459
Approved by: re (gjb)

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

8 years agoMFC r295995:
bdrewery [Wed, 2 Mar 2016 01:24:41 +0000 (01:24 +0000)]
MFC r295995:

  BDECFLAGS has not been available since r82604 removed
  /etc/defaults/make.conf.

Approved by: re (gjb)

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

8 years agoMFC [Hyper-V]: r296028
sephe [Tue, 1 Mar 2016 02:07:14 +0000 (02:07 +0000)]
MFC [Hyper-V]: r296028

hyperv: Wait 5 seconds for hyperv result, instead of 500ms

This addresses various devices (network, stoarge) attach failure.

Approved by: re (gjb)
Reported by:    Hongxiong Xian <v-hoxian microsoft com>
Tested by:      Hongxiong Xian <v-hoxian microsoft com>
Sponsored by:   Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D5435

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

8 years agoMFC r295944:
jimharris [Mon, 29 Feb 2016 15:45:43 +0000 (15:45 +0000)]
MFC r295944:

  nvme: fix intx handler to not dereference ioq during initialization

  This was a regression from r293328, which deferred allocation
  of the controller's ioq array until after interrupts are enabled
  during boot.

Approved by: re (gjb)
Sponsored by: Intel

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

8 years agoUpdate stable/10 to BETA3 in preparation for 10.3-BETA3 builds.
marius [Fri, 26 Feb 2016 00:10:52 +0000 (00:10 +0000)]
Update stable/10 to BETA3 in preparation for 10.3-BETA3 builds.

Approved by: re (implicit)

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

8 years agoMFC: r295906
marius [Fri, 26 Feb 2016 00:09:50 +0000 (00:09 +0000)]
MFC: r295906

Fix and clean up usage of DMA and TSO segments:
- At Intel it is believed that most of their products support "only"
  40 DMA segments so lower {EM,IGB}_MAX_SCATTER accordingly. Actually,
  40 is more than plenty to handle full size TSO packets so it doesn't
  make sense to further distinguish between MAC variants that really
  can do 64 DMA segments. Moreover, capping at 40 DMA segments limits
  the stack usage of {em,igb}_xmit() that - given the rare use of more
  than these - previously hardly was justifiable, while still being
  sufficient to avoid the problems seen with em(4) and EM_MAX_SCATTER
  set to 32.
- In igb(4), pass the actually supported TSO parameters up the stack.
  Previously, the defaults set in if_attach_internal() were applied,
  i. e. a maximum of 35 TSO segments, which made supporting more than
  these in the driver pointless. However, this might explain why no
  problems were seen with IGB_MAX_SCATTER at 64.
- In em(4), take the 5 m_pullup(9) invocations performed by em_xmit()
  in the TSO case into account when reporting TSO parameters upwards.
  In the worst case, each of these calls will add another mbuf and,
  thus, the requirement for an additional DMA segment. So for best
  performance, it doesn't make sense to advertize a maximum of TSO
  segments that typically will require defragmentation in em_xmit().
  Again, this leaves enough room to handle full size TSO packets.
- Drop TSO macros from if_lem.h given that corresponding MACS don't
  support TSO in the first place.

Reviewed by: erj, sbruno, jeffrey.e.pieper_intel.com
Approved by: re (gjb)

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

8 years agoMFC r295830
davidcs [Thu, 25 Feb 2016 22:07:32 +0000 (22:07 +0000)]
MFC r295830
Remove dead code. Code Cleanup. Improve clarity in debug messages

Approved by:re (marius)

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

8 years agoMFC r295823
davidcs [Thu, 25 Feb 2016 20:02:30 +0000 (20:02 +0000)]
MFC r295823

Modified the use of bxe_grc_dump() function so that it can be invoked directly
at any potential error path, where a fwdump is needed.
The fwdump (a.k.a grcdump) is stored in a driver buffer.
The sysctl grcdump_done indicates if a fwdump was taken and waiting to be retrieved.
The sysctl trigger_grcdump can be used to manually trigger a fwdump.

Approved by:re (marius)

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

8 years agoMFC r294854
davidcs [Thu, 25 Feb 2016 19:28:57 +0000 (19:28 +0000)]
MFC r294854
Upgrade FW to 5.4.56
Update driver version to 3.10.26

Approved by:re (marius)

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

8 years agoMFC r295273:
tuexen [Thu, 25 Feb 2016 19:21:46 +0000 (19:21 +0000)]
MFC r295273:
In FreeBSD 10 and higher the driver announces SCTP checksum offloading support
also for 82598, which doesn't support it.
The legacy code has a check for it, which was missed when the code for dealing with
CSUM_IP6_* was added. Add the same check for FreeBSD 10 and higher.

Approved by: re (marius)
Differential Revision: D5192

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

8 years agoMFC r295323:
erj [Thu, 25 Feb 2016 19:15:06 +0000 (19:15 +0000)]
MFC r295323:
Update em(4) to 7.6.1; update igb(4) to 2.5.3.

Major changes:

- Add i219/i219(2) hardware support. (Found on Skylake generation and newer
  chipsets.)
- Further to the last Skylake support diff, this one also includes support for
  the Lewisburg chipset (i219(3)).

- Add a workaround to an igb hardware errata.
  All 1G server products need to have IPv6 extension header parsing turned off.
  This should be listed in the specification updates for current 1G server
  products, e.g. for i350 it's errata #37 in this document:
  http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ethernet-controller-i350-spec-update.pdf

- Avoton (i354) PHY errata workaround added

And a bunch of minor fixes, as well as #defines for things that the current
em(4)/igb(4) drivers don't implement.

MFC r287465:

igb(4): Update and fix HW errata
- HW errata workaround for IPv6 offload w/ extension headers
- Edited start of if_igb.c (Device IDs / #includes) to match ixgbe/ixl

Approved by: re (gjb)
Sponsored by: Intel Corporation

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

8 years agoMFC r295549:
tuexen [Thu, 25 Feb 2016 18:46:06 +0000 (18:46 +0000)]
MFC r295549:
Loopback addresses are 127.0.0.0/8, not 127.0.0.1/32.

MFC r295668:
Improve the teardown of the SCTP stack.

MFC r295670:
Whitespace changes.

MFC r295708:
Address a warning reported by D5245 / PVS.

MFC r295709:
Code cleanup which will silence a warning in PVS / D5245.

MFC r295710:
Add protection code for issues reported by PVS / D5245.

MFC r295771:
Fix reporting of mapped addressed in getpeername() and getsockname() for
IPv6 SCTP sockets.
This bugs were found because of an issue reported by PVS / D5245.

MFC r295772:
Add some protection code.

MFC r295773:
Add protection code.

MFC r295805:
Use the SCTP level pointer, not the interface level.

MFC r295929:
Don't leak an address in an error path.

Approved by: re (marius)

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

8 years agoMFH 295796 (based on)
araujo [Thu, 25 Feb 2016 15:33:55 +0000 (15:33 +0000)]
MFH 295796 (based on)
Fix regression introduced on 272446r. lagg(4) supports the protocol none,
where it disables any traffic without disabling the lagg(4) interface itself.

PR: 206478
Submitted by: Erin Clark <erin.clark.ix@gmail.com>
Reviewed by: rpokala, bapt
Approved by: re (glebius)
Differential Revision: https://reviews.freebsd.org/D5188

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

8 years agoMFC r294933,r294949,r294952,r294953,r294957,r294965,r294967,r294968,r295017,
bdrewery [Wed, 24 Feb 2016 22:30:22 +0000 (22:30 +0000)]
MFC r294933,r294949,r294952,r294953,r294957,r294965,r294967,r294968,r295017,
    r295026,r295027,r295029,r295030,r295649:

  r294933:
    Drop any previous fd when setting a new one.
  r294949:
    filemon_ioctl: Handle error from devfs_get_cdevpriv(9).
  r294952:
    filemon_ioctl: Lock the associated filemon handle before writing to it.
  r294953:
    filemon_comment has nothing to do with wrappers so move it out of
    filemon_wrapper.c.
  r294957:
    filemon_dtr: Lock the associated filemon handle before writing to it.
  r294965:
    filemon: Use process_exit EVENTHANDLER to capture process exit.
  r294967:
    filemon: Trace fork via process_fork event.
  r294968:
    Follow-up r294967: Mark flags unused.
  r295017:
    filemon: Use process_exec EVENTHANDLER to capture sys_execve.
  r295026:
    filemon_open: Don't record a process to trace here.
  r295027:
    filemon: Track the process pointer rather than a pid.
  r295029:
    Document the purpose and non-purpose of filemon(4).
  r295030:
    Note the double fork behavior with filemon.
  r295649:
    filemon: Fix panic when fork1() is called from kproc_create().

Approved by: re (marius)

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

8 years agoMFC 295636,295637:
jhb [Wed, 24 Feb 2016 22:01:45 +0000 (22:01 +0000)]
MFC 295636,295637:
Fix issues with tracing Linux/i386 binaries.

295636:
Sign extend the error value for failing Linux/i386 system calls.  This
restores the mapping of Linux errors to native FreeBSD errno values after
the refactoring in r288424.

295637:
Correct the ABI name for Linux/i386 binaries under FreeBSD/i386.

This allows truss to work for these binaries again after r288424.

Approved by: re (marius)

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

8 years agoMFC r295717:
kib [Wed, 24 Feb 2016 13:48:40 +0000 (13:48 +0000)]
MFC r295717:
After nullfs rmdir operation, reclaim the directory vnode which was
unlinked.  Otherwise the vnode stays cached, causing leak.  This is
similar to r292961 for regular files.

Approved by: re (marius)

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

8 years agoMFC r295914: MFV r295913:
delphij [Wed, 24 Feb 2016 05:40:03 +0000 (05:40 +0000)]
MFC r295914: MFV r295913:

Partially apply upstream changeset 6e06b1c8 (kientzle).

Limit filter recursion level to 25 (instead of infinite).  This fixes a
potential crash issue discovered by Alexander Cherepanov.

PR: 207362
Reported by: Robert Clausecker
Obtained from: libarchive github project
Approved by: re (marius)

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

8 years agoMFH: 285685
araujo [Wed, 24 Feb 2016 02:34:11 +0000 (02:34 +0000)]
MFH: 285685
Add support to the jail framework to be able to mount linsysfs(5) and linprocfs(5).

PR: 207179
Requested by: thomas@gibfest.dk
Reviewed by: jamie, bapt
Approved by: re (gjb)
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D5390

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

8 years agoMFC [Hyper-V]: r294553, r294700
sephe [Wed, 24 Feb 2016 01:30:50 +0000 (01:30 +0000)]
MFC [Hyper-V]: r294553, r294700

r294553

hyperv/vmbus: Lookup channel through id table

Vmbus event handler will need to find the channel by its relative
id, when software interrupt for event happens.  The original lookup
searches the channel list, which is not very efficient.  We now
create a table indexed by the channel relative id to speed up
the channel lookup.

Submitted by:           Hongjiang Zhang <honzhan microsoft com>
Reviewed by:            delphij, adrain, sephe, Dexuan Cui <decui microsoft com>
Approved by:            adrian (mentor)
Sponsored by:           Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4802

-------------

r294700

hyperv/hn: Partly rework transmission path

- Avoid unnecessary malloc/free on transmission path.
- busdma(9)-fy transmission path.
- Properly handle IFF_DRV_OACTIVE.  This should fix the network
  stalls reported by many.
- Properly setup TSO parameters.
- Properly handle bpf(4) tapping.  This 5 times the performance
  during TCP sending test, when there is one bpf(4) attached.
- Allow size of chimney sending be tuned on a running system.
  Default value still needs more test to determine.

Reviewed by:            adrian, delphij
Approved by:            adrian (mentor)
Sponsored by:           Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4972

Approved by: re (marius)
Sponsored by: Microsoft OSTC

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

8 years agoIn preparation for 10.3-RELEASE, temporarily revert the MFC of r291244
marius [Tue, 23 Feb 2016 01:09:35 +0000 (01:09 +0000)]
In preparation for 10.3-RELEASE, temporarily revert the MFC of r291244
done as part of r292895 on stable/10 as that change causes hangs with
ZFS and the cause on at least amd64 so far not understood.
Discussed with: kib
For further information see:
https://lists.freebsd.org/pipermail/freebsd-stable/2016-February/084045.html

PR: 207281
Approved by: re (gjb)

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

8 years agoMFC r295665:
bdrewery [Tue, 23 Feb 2016 00:45:27 +0000 (00:45 +0000)]
MFC r295665:

  Remove temporary hack from r294370 for SSH upgrades.

Approved by: re (marius)

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

8 years agoMFC r295737:
markj [Mon, 22 Feb 2016 20:20:10 +0000 (20:20 +0000)]
MFC r295737:
Use the _SAFE loop variant.

PR: 207146
Approved by: re (gjb, glebius)

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

8 years agoMFC r295574:
markj [Mon, 22 Feb 2016 20:18:10 +0000 (20:18 +0000)]
MFC r295574:
Clear the cookie pointer on error in tmpfs_readdir().

Approved by: re (glebius)

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

8 years agoRevert 295285 which was an MFC of the tryforward work (r290383,295282,295283)
gnn [Mon, 22 Feb 2016 19:17:59 +0000 (19:17 +0000)]
Revert 295285 which was an MFC of the tryforward work (r290383,295282,295283)

In the IPFW+NAT+divergent MTU case there is a bug in sening ICMP MTU updates.

Approved by: re (marius, gjb)
Sponsored by: Rubicon Communications (Netgate)

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

8 years agoMFC r286641 (from oshogbo):
garga [Mon, 22 Feb 2016 17:18:36 +0000 (17:18 +0000)]
MFC r286641 (from oshogbo):

Use correct src/dst ports when removing states.

Submitted by: Milosz Kaniewski <m.kaniewski@wheelsystems.com>,
UMEZAWA Takeshi <umezawa@iij.ad.jp> (orginal)
Reviewed by: glebius
Approved by: re (marius)
Obtained from: OpenBSD
Sponsored by: Rubicon Communications (Netgate)
Differential revision: https://reviews.freebsd.org/D5392

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

8 years agoMFC: r287299 [1]
marius [Mon, 22 Feb 2016 00:49:35 +0000 (00:49 +0000)]
MFC: r287299 [1]

Add a gop command to help diagnose VT efifb problems. The gop
command has the following sub-commands:
  list - list all possible modes (paged)
  get - return the current mode
  set <mode> - set the current mode to <mode>

MFC: r287317, r287422, r287475, r287489, r287538 [2]

Add support for the UGA draw protocol. This includes adding a
command called 'uga' to show whether UGA is implemented by the
firmware and what the settings are. It also includes filling
the efi_fb structure from the UGA information when GOP isn't
implemented by the firmware.

PR: 207313 [1], 202730 [2]
Approved by: re (gjb)

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

8 years agoMFC: r264565
marius [Sun, 21 Feb 2016 22:34:09 +0000 (22:34 +0000)]
MFC: r264565

Do not set M_BESTFIT if a strategy has already been provided.  This
fixes problems when using M_FIRSTFIT.

MFC: r280805

Add four new DDB commands to display vmem(9) statistics.

In particular, such DDB commands were added:
        show vmem <addr>
        show all vmem
        show vmemdump <addr>
        show all vmemdump

As possible usage, that allows to see KVA usage and fragmentation.

Approved by: re (gjb)

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

8 years agoMFH (r294326): fall back to standard / configured CA store
des [Sat, 20 Feb 2016 22:58:33 +0000 (22:58 +0000)]
MFH (r294326): fall back to standard / configured CA store

PR: 193871
Approved by: re (gjb)

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

8 years agoMFC r272785:
smh [Sat, 20 Feb 2016 10:56:46 +0000 (10:56 +0000)]
MFC r272785:

Null terminate boot config buffer

PR: 207070
Approved by: re (gjb)
Sponsored by: Multiplay

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

8 years agoMFC, r295417:
ken [Fri, 19 Feb 2016 17:14:34 +0000 (17:14 +0000)]
MFC, r295417:

  r295417 | ken | 2016-02-08 15:13:08 -0700 (Mon, 08 Feb 2016) | 9 lines

  Fix the SCSI Extended INQUIRY probe case when an error is returned
  and a retry is scheduled.

  Instead of leaving the device queue frozen, unfreeze the device queue so
  that the retry can happen.

  Sponsored by:   Spectra Logic

Approved by: re (gjb)

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

8 years agoMFC [Hyper-V]: r293719-r293722, r293869-r293871, r293873-r293875, r293877
sephe [Fri, 19 Feb 2016 02:03:14 +0000 (02:03 +0000)]
MFC [Hyper-V]: r293719-r293722, r293869-r293871, r293873-r293875, r293877

r293719 hyperv/hn: Implement LRO
r293720 hyperv/hn: Implement SIOC[SG]IFMEDIA support
r293721 hyperv/hn: Avoid mbuf cluster allocation, if the packet is small.
r293722 hyperv/hn: Removed unused netvsc_init()
r293869 hyperv/hn: Unbreak LINT-NOIP
r293870 hyperv: use x86 generic code to do the hypervisor detection
r293871 hyperv: remove unused vmbus definitions
r293873 hyperv: implement an event timer
r293874 hyperv: add interrupt counters
r293875 hyperv: set receive buffer size according to NVSP protocol version
r293877 Unbreak `make depend` with sys/modules/hyperv/vmbus after r293870

Approved by: re (glebius), adrian (mentor)
Sponsored by: Microsoft OSTC

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

8 years agoMFC r295616:
pfg [Wed, 17 Feb 2016 19:09:06 +0000 (19:09 +0000)]
MFC r295616:
ext2fs: Remove panics for rename() race conditions.

Sync with r84642 from UFS:

The panics are inappropriate because the IN_RENAME flag only fixes a
few of the huge number of race conditions that can result in the
source path becoming invalid even prior to the VOP_RENAME() call.

Approved by: re (glebius)

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

8 years agoMFC r295022:
jimharris [Wed, 17 Feb 2016 15:38:05 +0000 (15:38 +0000)]
MFC r295022:

  nvd: add hw.nvd.delete_max tunable

  The NVMe specification does not define a maximum or optimal delete
  size, so technically max delete size is min(full size of namespace,
  2^32 - 1 LBAs).  A single delete operation for a multi-TB NVMe
  namespace though may take much longer to complete than the nvme(4)
  I/O timeout period.  So choose a sensible default here that is still
  suitably large to minimize the number of overall delete operations.

  This also fixes possible uint32_t overflow on initial TRIM operation
  for zpool create operations for NVMe namespaces with >4G LBAs.

Approved by: re (glebius)
Sponsored by: Intel

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

8 years agoMFC r295532:
jimharris [Wed, 17 Feb 2016 15:36:02 +0000 (15:36 +0000)]
MFC r295532:

  nvme: avoid duplicate SET_NUM_QUEUES commands

  nvme(4) issues a SET_NUM_QUEUES command during device
  initialization to ensure enough I/O queues exists for each
  of the MSI-X vectors we have allocated.  The SET_NUM_QUEUES
  command is then issued again during nvme_ctrlr_start(), to
  ensure that is properly set after any controller reset.

  At least one NVMe drive exists which fails this second
  SET_NUM_QUEUES command during device initialization.  So
  change nvme_ctrlr_start() to only issue its SET_NUM_QUEUES
  command when it is coming out of a reset - avoiding the
  duplicate SET_NUM_QUEUES during device initialization.

Approved by: re (glebius)
Sponsored by: Intel

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

8 years agoMFH (r295536): fix double-free error when SSL connection fails
des [Wed, 17 Feb 2016 11:40:03 +0000 (11:40 +0000)]
MFH (r295536): fix double-free error when SSL connection fails

PR: 206774
Submitted by: Christian Heckendorf <heckendorfc@gmail.com>
Approved by: re (glebius)

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

8 years agoMFH (r295535): use insecure-lan-zones option instead of hardcoded list
des [Wed, 17 Feb 2016 11:38:43 +0000 (11:38 +0000)]
MFH (r295535): use insecure-lan-zones option instead of hardcoded list

Approved by: re (glebius)
Relnotes: yes

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

8 years agoMFH (r295533): remove broken unbound-control-setup script
des [Wed, 17 Feb 2016 11:36:45 +0000 (11:36 +0000)]
MFH (r295533): remove broken unbound-control-setup script

Approved by: re (glebius)
Relnotes: yes

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

8 years agoMFC r295455
bapt [Tue, 16 Feb 2016 22:37:24 +0000 (22:37 +0000)]
MFC r295455

Fix make universe when running with non POSIX/C locales using a locale sensitive
pattern

Approved by: re@ (gjb, marius)

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

8 years agoMFC 295418,295419:
jhb [Tue, 16 Feb 2016 21:36:48 +0000 (21:36 +0000)]
MFC 295418,295419:
Fix hangs or panics when misbehaved kernel threads return from their
main function.

295418:
Mark proc0 as a kernel process via the P_KTHREAD flag.

All other kernel processes have this flag set and all threads in proc0
(including thread0) have the similar TDP_KTHREAD flag set.

295419:
Call kthread_exit() rather than kproc_exit() for a premature kthread exit.

Kernel threads (and processes) are supposed to call kthread_exit() (or
kproc_exit()) to terminate.  However, the kernel includes a fallback in
fork_exit() to force a kthread exit if a kernel thread's "main" routine
returns.  This fallback was added back when the kernel only had processes
and was not updated to call kthread_exit() instead of kproc_exit() when
threads were added to the kernel.

This mistake was particularly exciting when the errant thread belonged to
proc0.  Due to the missing P_KTHREAD flag the fallback did not kick in
and instead tried to return to userland via whatever garbage was in the
trapframe.  With P_KTHREAD set it tried to terminate proc0 resulting in
other amusements.

PR: 204999
Approved by: re (glebius)

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

8 years agoMFC r295497: Update uefi.8 for ZFS and multi device boot support
emaste [Tue, 16 Feb 2016 03:50:56 +0000 (03:50 +0000)]
MFC r295497: Update uefi.8 for ZFS and multi device boot support

Approved by: re (gjb)

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

8 years agodrm/i915: Restore pci_enable_busmaster() call in the init path
dumbbell [Mon, 15 Feb 2016 07:35:40 +0000 (07:35 +0000)]
drm/i915: Restore pci_enable_busmaster() call in the init path

This fixes a GPU hang on i945GM.

While here, merge some minor fixes to DRM core and i915:
  * Remove obsolete drm_agp_*_memory() prototypes
  * Fix comment in drm_fops.c (outisde -> outside)
  * Fix some formatting issues in drm_stub.c (spaces -> tabs)

Approved by: re (marius)
MFC of: r288653, r288952, r293851
Submitted by: <s3erios@gmail.com>
Differential Revision: https://reviews.freebsd.org/D3413

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

8 years agoMFC r295495 - Update leapsecond file in non-chroot environments.
cy [Sun, 14 Feb 2016 23:04:52 +0000 (23:04 +0000)]
MFC r295495 - Update leapsecond file in non-chroot environments.

PR: 207095
Submitted by: madpilot
Approved by: re (marius)

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

8 years agoMFC r295496: Document boot1.efi's handling of /boot.config
emaste [Sun, 14 Feb 2016 22:31:38 +0000 (22:31 +0000)]
MFC r295496: Document boot1.efi's handling of /boot.config

Approved by: re (marius)

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

8 years agoMFC r294598:
kib [Sun, 14 Feb 2016 18:57:40 +0000 (18:57 +0000)]
MFC r294598:
In tty_dealloc(), clear the queues.

Approved by: re (marius)

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

8 years agoMFC r294596:
kib [Sun, 14 Feb 2016 18:17:58 +0000 (18:17 +0000)]
MFC r294596:
Limit the accesses to file' f_advice member to VREG vnodes only.
Recheck that f_advice is not NULL after lock is taken.

Approved by: re (marius)

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

8 years agoMFC r294595:
kib [Sun, 14 Feb 2016 17:21:19 +0000 (17:21 +0000)]
MFC r294595:
When devfs dirent is freed, a vnode might still keep a pointer to it,
apparently.  Interlock and clear the pointer to avoid free memory
dereference.

Approved by: re (marius)

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

8 years agoUpdate stable/10 to BETA2 in preparation for 10.3-BETA2 builds.
marius [Fri, 12 Feb 2016 00:03:39 +0000 (00:03 +0000)]
Update stable/10 to BETA2 in preparation for 10.3-BETA2 builds.

Approved by: re (implicit)

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

8 years agoMerge from current r294767,294769,295408
imp [Thu, 11 Feb 2016 23:43:27 +0000 (23:43 +0000)]
Merge from current    r294767,294769,295408

r294767: Parse command line arguments in loader.fi
r294769: Allow newlines to be treated as whitespace when parsing args
r295408: Implement -P command line option in for EFI booting.

Approved by: re@ (gjb@)

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

8 years agoMFC r295320, r295356 (Partial)
smh [Thu, 11 Feb 2016 22:33:47 +0000 (22:33 +0000)]
MFC r295320, r295356 (Partial)

Fix EFI multi device boot support

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoMFC r294768:
smh [Thu, 11 Feb 2016 17:57:42 +0000 (17:57 +0000)]
MFC r294768:

Process /boot/config and /boot.config during EFI boot

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoFix ia64 build failures in EFI platform
smh [Thu, 11 Feb 2016 17:56:09 +0000 (17:56 +0000)]
Fix ia64 build failures in EFI platform

The MFC of the recent EFI work to stable/10 caused build breakage
under ia64.

It was not apparent that there was EFI code outside the EFI tree as
this is not the case in HEAD, however in stable/10 there is for ia64.

This change does the following:
* Re-enables libefi for ia64 under gcc.
* Adds the ignore for unsupported pragma's when building libefi for ia64.
* Adds the missing parameter to efi_handle_lookup in the ia64 loader.

This is a direct commit as ia64 is no longer supported after 10.x

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoMFC 295174:
jhb [Thu, 11 Feb 2016 17:55:17 +0000 (17:55 +0000)]
MFC 295174:
- Note that devctl(8) will appear in 10.3 first.
- Add missing devctl_set_driver entry to namelist in devlist(3).

Approved by: re (gjb)

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

8 years agoMFC r294795
smh [Thu, 11 Feb 2016 17:34:26 +0000 (17:34 +0000)]
MFC r294795

ixgbe sysctl hardware defaults

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoMFC r295356 (Partial)
smh [Thu, 11 Feb 2016 17:31:17 +0000 (17:31 +0000)]
MFC r295356 (Partial)

Fix EFI platform build failures on arm.armeb

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoMFC r294734, r295093 & r295094 ixgbe fixes
smh [Thu, 11 Feb 2016 16:54:23 +0000 (16:54 +0000)]
MFC r294734, r295093 & r295094 ixgbe fixes

MFC r294734
Fix ixgbe compliation with DBG 1

MFC r295093
Configure ixgbe phy & gbic power

MFC r295094
Fix ixgbe flow control autoneg reporting

Approved by: re (marius)
Sponsored by: Multiplay

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

8 years agoMFC r295467
arybchik [Thu, 11 Feb 2016 16:39:30 +0000 (16:39 +0000)]
MFC r295467

sfxge: implement SIOCGI2C to read information from phy modules

The IOCTL is used by 'ifconfig -v' to show SFP+/QSFP+ information
including inventory information and dianostics (temperature, light
levels, voltage etc).

Reviewed by:    gnn,melifaro
Approved by:    re (gjb)
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoRevert sysctl description change introduced in r295008 to correctly
sbruno [Thu, 11 Feb 2016 16:35:16 +0000 (16:35 +0000)]
Revert sysctl description change introduced in r295008 to correctly
reflect the maximum number of queues supported (8) by this driver.

Submitted by: jwd
Reviewed by: erj
Approved by: re (gjb)
Sponsored by: Intel Corporation and Limelight Networks

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

8 years agoMFC r292674
sbruno [Thu, 11 Feb 2016 16:16:10 +0000 (16:16 +0000)]
MFC r292674
  Update ixgbe(4) to Intel FreeBSD Networking Group version 3.1.13-k.

MFC r292571 and r292697
  Add support for X552 and X550T.

MFC r293334
  Fix SFP module insertion post boot.

MFC r293338
  Fix VF handling of VLANs for Amazon Cloud.

Reviewed by: erj smh ngie jeffrey.e.pieper@intel.com
Approved by: re (marius)
Relnotes: Yes
Sponsored by: Intel Corporation and Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5117

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

8 years agoMFC: r295159, kill foreign VCS files.
sobomax [Thu, 11 Feb 2016 00:27:04 +0000 (00:27 +0000)]
MFC: r295159, kill foreign VCS files.

Approved by: re (marius)

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

8 years agoAdjust initialization of random(9) so it is usable earlier.
jhb [Wed, 10 Feb 2016 18:29:37 +0000 (18:29 +0000)]
Adjust initialization of random(9) so it is usable earlier.

A few existing SYSINITs expect the in-kernel PRNG (random(9)) to be
useable at SI_SUB_RANDOM / SI_ORDER_ANY.  However, the random(4) overhaul
merged for 10.0 performs all of its initialization at SI_SUB_DRIVERS
(since it is tied in with creating the /dev/random character device).

This has changed in HEAD where the random initialization is split such
that the in-kernel random(9) is initialized at SI_SUB_RANDOM and the
supporting bits for userland random(4) (such as /dev/random) are initialized
later.

However, the changes in HEAD are large and invasive.  Instead, this change
is being directly committed to stable/10.

This change moves most of the random(9)/random(4) initialization to
SI_SUB_RANDOM with the exception that the creation of the harvesting kernel
process and the /dev/random character device are deferred to new
SYSINITs that run at SI_SUB_DRIVERS.

This fixes the "random device not loaded; using insecure entropy" message
output during boot on some systems.

PR: 205800
Reviewed by: markm, so@
Approved by: so
Approved by: re (gjb)
Tested by: Mark Saad <nonesuch@longcount.org>

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

8 years agoCatch the EFI loader up to the latest ZFS Boot Environment Menu features
allanjude [Wed, 10 Feb 2016 17:49:22 +0000 (17:49 +0000)]
Catch the EFI loader up to the latest ZFS Boot Environment Menu features

MFC: r294072
  Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader

MFC: r294073
  Connect the ZFS boot environment menu to the UEFI loader

MFC: r295357
  Do not set vfs.root.mountfrom unnecessarily when initializing ZFS BE menu

Approved by: re (marius)
Relnotes: yes
Sponsored by: ScaleEngine Inc.

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

8 years agoMFC r289421, r293037, r294773, and r294884.
cy [Wed, 10 Feb 2016 07:16:17 +0000 (07:16 +0000)]
MFC r289421, r293037, r294773, and r294884.

ntp leap-leapseconds support.

r289421:

Add default leap-seconds file. This should help ntp networks get the
leap second date correct

Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
ftp://tycho.usno.navy.mil/pub/ntp/.

r293037:

Update leap-seconds to latest. This will satisfy the ntpd leap-second
version check.

r294773:

Add support for automatic leap-second file updates.

The working copy of leapfile resides in /var/dbntpd.leap-seconds.list.
/etc/ntp/leap-seconds (periodically updated from ftp://time.nist.gov/pub/
or ftp://tycho.usno.navy.mil/pub/ntp/) contains the master copy should
automatic leapfile updates be disabled (default).

Automatic leapfile updates are fetched from $ntp_leapfile_sources,
defaulting to https://www.ietf.org/timezones/data/leap-seconds.list,
within $ntp_leapfile_expiry_days (default 30 days) from leap-seconds
file expiry. Automatic updates can be enabled by setting
$daily_ntpd_leapfile_enable="YES" in periodic.conf. To avoid congesting
the ntp leapfile source the automatic update randomized by default but
can be disabled through daily_ntpd_avoid_congestion="NO" in
periodic.conf.

r294884:

Allow specification of fetch options for ntp leap-seconds fetch.

Approved by: re (gjb)

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

8 years agoMFC 287442,287537,288944:
jhb [Wed, 10 Feb 2016 00:08:51 +0000 (00:08 +0000)]
MFC 287442,287537,288944:
Fix corruption of coredumps due to procstat notes changing size during
coredump generation.  The changes in r287442 required some reworking
since the 'fo_fill_kinfo' file op does not exist in stable/10.

287442:
Detect badly behaved coredump note helpers

Coredump notes depend on being able to invoke dump routines twice; once
in a dry-run mode to get the size of the note, and another to actually
emit the note to the corefile.

When a note helper emits a different length section the second time
around than the length it requested the first time, the kernel produces
a corrupt coredump.

NT_PROCSTAT_FILES output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' fd table
via vn_fullpath.  As vnodes may move around during dump, this is racy.

So:

 - Detect badly behaved notes in putnote() and pad underfilled notes.

 - Add a fail point, debug.fail_point.fill_kinfo_vnode__random_path to
   exercise the NT_PROCSTAT_FILES corruption.  It simply picks random
   lengths to expand or truncate paths to in fo_fill_kinfo_vnode().

 - Add a sysctl, kern.coredump_pack_fileinfo, to allow users to
   disable kinfo packing for PROCSTAT_FILES notes.  This should avoid
   both FILES note corruption and truncation, even if filenames change,
   at the cost of about 1 kiB in padding bloat per open fd.  Document
   the new sysctl in core.5.

 - Fix note_procstat_files to self-limit in the 2nd pass.  Since
   sometimes this will result in a short write, pad up to our advertised
   size.  This addresses note corruption, at the risk of sometimes
   truncating the last several fd info entries.

 - Fix NT_PROCSTAT_FILES consumers libutil and libprocstat to grok the
   zero padding.

287537:
Follow-up to r287442: Move sysctl to compiled-once file

Avoid duplicate sysctl nodes.

288944:
Fix core corruption caused by race in note_procstat_vmmap

This fix is spiritually similar to r287442 and was discovered thanks to
the KASSERT added in that revision.

NT_PROCSTAT_VMMAP output length, when packing kinfo structs, is tied to
the length of filenames corresponding to vnodes in the process' vm map
via vn_fullpath.  As vnodes may move during coredump, this is racy.

We do not remove the race, only prevent it from causing coredump
corruption.

- Add a sysctl, kern.coredump_pack_vmmapinfo, to allow users to disable
  kinfo packing for PROCSTAT_VMMAP notes.  This avoids VMMAP corruption
  and truncation, even if names change, at the cost of up to PATH_MAX
  bytes per mapped object.  The new sysctl is documented in core.5.

- Fix note_procstat_vmmap to self-limit in the second pass.  This
  addresses corruption, at the cost of sometimes producing a truncated
  result.

- Fix PROCSTAT_VMMAP consumers libutil (and libprocstat, via copy-paste)
  to grok the new zero padding.

Approved by: re (gjb)

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

8 years agoMFC boot loader path and RBX constant deduplication
emaste [Tue, 9 Feb 2016 22:32:24 +0000 (22:32 +0000)]
MFC boot loader path and RBX constant deduplication

r294765 (imp)

Move all the separate copies of the same strings into paths.h. There's
nothing machine specific about these.

r294765 (imp)

RBX_ defines are in rbx.h, move it there.

r294847 (imp)

Remove static from these two. They slipped through the cracks.

r294925 (imp)

Fix mistake when transitioning to the new defines with ZFS loader. I
hate adding yet another define, but it is the lessor of the evil
choices available. Kill another evil by removing PATH_BOOT3 and
replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.

Approved by: re (gjb)

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