]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,
des [Sun, 24 Jan 2016 15:44:57 +0000 (15:44 +0000)]
MFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,
  r294320, r294322, r294324, r294330, r294469, r294494, r294466)

Reduce diffs to head in preparation for removing HPN and None.

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

8 years agoMFC r293073:
ngie [Sun, 24 Jan 2016 06:19:49 +0000 (06:19 +0000)]
MFC r293073:

- Use attach_md instead of hardcoding md(4) provider unit numbers
- Implement a gmirror_test_cleanup function, which in turn calls
  geom_test_cleanup to clean up all md(4) providers allocated in the test
  run.
- Remove duplicate logic in test scripts for removing md(4) providers.
- Don't create files in /tmp (outside the kyua sandbox); use the current
  directory instead

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

8 years agoMFC r293860
vangyzen [Sun, 24 Jan 2016 02:10:05 +0000 (02:10 +0000)]
MFC r293860

bsdinstall: Suggest the GPT+Active workaround on Dell T5810

The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Relnotes:   We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:   Dell Inc.

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

8 years agoMFC: r285732
allanjude [Sat, 23 Jan 2016 22:13:31 +0000 (22:13 +0000)]
MFC: r285732
  Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround

MFC: r287843
  Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list

Sponsored by: ScaleEngine Inc.

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

8 years agoMFC r294125:
ngie [Sat, 23 Jan 2016 21:04:34 +0000 (21:04 +0000)]
MFC r294125:

Test for EPROTOTYPE not EPROTONOSUPPORT

- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)

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

8 years agoMFC r293858
vangyzen [Sat, 23 Jan 2016 20:49:52 +0000 (20:49 +0000)]
MFC r293858

libthr: const-ify two variables

Make the default umutex and urwlock initializers const,
because they can be, and as a microoptimization.

Sponsored by: Dell Inc.

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

8 years agoMFC r294235:
ian [Sat, 23 Jan 2016 19:13:48 +0000 (19:13 +0000)]
MFC r294235:

  Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
  Previously the polarity was for TTL levels, which are the reverse of RS-232.

  Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
  value, the same as was recently added to uart(4), so that people using TTL
  level connections can request a logical inverting of the signal.

  Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
  capture modes and option bits.

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

8 years agoMFC 294366:
jhb [Sat, 23 Jan 2016 17:08:17 +0000 (17:08 +0000)]
MFC 294366:
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Sponsored by: Chelsio Communications

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

8 years agoMFC r289453:
trasz [Sat, 23 Jan 2016 15:48:14 +0000 (15:48 +0000)]
MFC r289453:

Add -w flag to iscsictl(8) utility, to make it wait for successfull
session establishment.  Scripting is kind of hard without it.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r294137:
kib [Sat, 23 Jan 2016 07:35:29 +0000 (07:35 +0000)]
MFC r294137:
Do not panic when the filesystem which carries the audit files, is unmounted
and audit is active.  Do not write to the suspended fs.

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

8 years agoMFC r293059:
kib [Sat, 23 Jan 2016 07:33:02 +0000 (07:33 +0000)]
MFC r293059:
Hide transient EBADF errors caused by the parallel revoke(2) or forced
unmount of devfs mounts, by restarting the failed syscall.

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

8 years agoMFC 292892:
jhb [Sat, 23 Jan 2016 01:21:11 +0000 (01:21 +0000)]
MFC 292892:
Call kern_thr_exit() instead of duplicating it.

This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.

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

8 years agoMFC 286974,291653:
jhb [Sat, 23 Jan 2016 01:02:28 +0000 (01:02 +0000)]
MFC 286974,291653:

286974:
Remove reference to non-existent kern_openat(9).

291653:
The cdevpriv_dtr_t typedef was not able to be used in a function prototype
like the various d_*_t typedefs since it declared a function pointer rather
than a function.  Add a new d_priv_dtor_t typedef that declares the function
and can be used as a function prototype.  The previous typedef wasn't
useful outside of the cdevpriv implementation, so retire it.

The name d_priv_dtor_t was chosen to be more consistent with cdev methods
since it is commonly used in place of d_close_t even though it is not a
direct pointer in struct cdevsw.

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

8 years agoMake it possible to override NO_INSTALLEXTRAKERNELS.
glebius [Fri, 22 Jan 2016 18:38:52 +0000 (18:38 +0000)]
Make it possible to override NO_INSTALLEXTRAKERNELS.

Submitted by: ngie

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

8 years agoMFC r294554: MFV r294491: ntp 4.2.8p6.
delphij [Fri, 22 Jan 2016 15:55:21 +0000 (15:55 +0000)]
MFC r294554: MFV r294491: ntp 4.2.8p6.

Security: CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security: CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security: CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security: CVE-2015-8140, CVE-2015-8158
With hat: so

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

8 years agoMFC r293048,r293444:
ngie [Fri, 22 Jan 2016 07:23:50 +0000 (07:23 +0000)]
MFC r293048,r293444:

r293048:

- Use a temporary file for the temporary md(4) devices instead of
  hardcoding it
- Remove the temporary file in the cleanup routine

r293444:

- Move functions that might be used in class-specific cleanup functions
  (geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.

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

8 years agoRevert r294271:
pfg [Fri, 22 Jan 2016 03:25:06 +0000 (03:25 +0000)]
Revert r294271:
ext4: add support for reading sparse files

Our older GCC can't handle anonymous unions, so
ia64 and powerpc LINT kernels are now failing.

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

8 years agoMFC r294234: utimensat(2): Correct description of [EINVAL] error.
jilles [Thu, 21 Jan 2016 21:16:57 +0000 (21:16 +0000)]
MFC r294234: utimensat(2): Correct description of [EINVAL] error.

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

8 years agoMFC 294233:
dchagin [Thu, 21 Jan 2016 19:19:24 +0000 (19:19 +0000)]
MFC 294233:

Prevent double free of control in common sendmsg path as sosend
already freeing it.

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

8 years agoMFC 292953:
bz [Thu, 21 Jan 2016 14:11:01 +0000 (14:11 +0000)]
MFC 292953:

 This code is not in modules that need KPI stability so no need to use
 the wrapper functions as used in r252511 (head).  We can directly use
 the locking macros.

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

8 years agoMFC r292604:
bz [Thu, 21 Jan 2016 14:08:40 +0000 (14:08 +0000)]
MFC r292604:

 If vnets are torn down while ifconfig runs an ioctl to say, destroy an
 epair(4), we may hit if_detach_internal() without holding a lock and by
 the time we aquire it the interface might be gone.
 We should not panic() in this case as it is our fault for not holding
 the lock all the way. It is not ideal to return silently without error
 to user space, but other callers will all ignore the return values so
 do not change the entire KPI for little benefit for now.
 The ifp will be dealt with one way or another still.

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

8 years agoMFC r292603:
bz [Thu, 21 Jan 2016 14:06:16 +0000 (14:06 +0000)]
MFC r292603:

 If bootverbose is enabled every vnet startup and virtual interface
 creation will print extra lines on the console. We are generally not
 interested in this (repeated) information for each VNET. Thus only
 print it for the default VNET. Virtual interfaces on the base system
 will remain printing information, but e.g. each loopback in each vnet
 will no longer cause a "bpf attached" line.

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

8 years agoMFC r292602:
bz [Thu, 21 Jan 2016 14:04:02 +0000 (14:04 +0000)]
MFC r292602:

 Simplify bringup order by removing a SYSINIT making it a static list
 initialization.

Obtained from: p4 @180384,180385

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

8 years agoiicbus: Use device_delete_children() instead of explicit child removal
dumbbell [Thu, 21 Jan 2016 08:32:11 +0000 (08:32 +0000)]
iicbus: Use device_delete_children() instead of explicit child removal

If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.

By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.

While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.

Reviewed by: jhb, imp
Approved by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D3926

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

8 years agoiicbus: Remove trailing whitespaces
dumbbell [Thu, 21 Jan 2016 08:24:54 +0000 (08:24 +0000)]
iicbus: Remove trailing whitespaces

MFC of: r289656

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

8 years agoMFC r294126:
ngie [Thu, 21 Jan 2016 05:59:33 +0000 (05:59 +0000)]
MFC r294126:

Fix warnings with gcc 5.0

reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

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

8 years agoMFC r294127:
ngie [Thu, 21 Jan 2016 05:57:32 +0000 (05:57 +0000)]
MFC r294127:

Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6

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

8 years agoMFC r294183:
jamie [Thu, 21 Jan 2016 04:37:16 +0000 (04:37 +0000)]
MFC r294183:

  Clear errno before calling getpw*.

MFC r294196:

  Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
  handled by ifconfig, and it was doing it wrong when the paramater included
  extra ifconfig options.

PR: 205926

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

8 years agoMFC r294042: Add rotationrate to geom disk dumpconf
rpokala [Thu, 21 Jan 2016 03:05:03 +0000 (03:05 +0000)]
MFC r294042: Add rotationrate to geom disk dumpconf

Parse and report the nominal rotation rate reported by the drive.

Approved by: jhb

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

8 years agoMFC 292682:
jhb [Thu, 21 Jan 2016 01:25:28 +0000 (01:25 +0000)]
MFC 292682:
Fix remaining direct tests of the carry flag in the v86 %eflags via a
magic number to use V86_CY() instead.  These should have been fixed as
part of the cleanup in r226746 but were missed.

The md5 sums of the object files were unchanged, so there should be no
functional change.

PR: 205424
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>

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

8 years agoMFC: r294191
allanjude [Thu, 21 Jan 2016 01:15:40 +0000 (01:15 +0000)]
MFC: r294191
  Never 4k align the MBR bootpool because zfsldr can not deal with a gap

Sponsored by: ScaleEngine Inc.

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

8 years agoAdd strlcat and strlcpy to libstand on ia64. This is conceptually part
ian [Wed, 20 Jan 2016 22:05:49 +0000 (22:05 +0000)]
Add strlcat and strlcpy to libstand on ia64.  This is conceptually part
of the MFC done in r294342, but since ia64 is gone in -current this is a
direct commit to 10-stable to add the functions.

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

8 years agoLeave temporary ia64 loader.sym behind if the build fails
emaste [Wed, 20 Jan 2016 21:22:06 +0000 (21:22 +0000)]
Leave temporary ia64 loader.sym behind if the build fails

This facilitates investigation of the build failure, and is the same way
it's done for other architectures using EFI.

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

8 years agoMFC r276539: Update ELF headers to include additional defines
emaste [Wed, 20 Jan 2016 21:06:24 +0000 (21:06 +0000)]
MFC r276539: Update ELF headers to include additional defines

The elftoolchain project includes these additional defines for various
userland programs. Given that arch-specific defines are still interesting
in the context of userland programs reading or writing ELF metadata, they
should be included in top-level ELF headers.

Remove duplicate defines from ARM and MIPS elf headers.

Submitted by: will (initial version)
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r293856:
brooks [Wed, 20 Jan 2016 19:26:04 +0000 (19:26 +0000)]
MFC r293856:

Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR: 206178
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>

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

8 years agoMFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition
emaste [Wed, 20 Jan 2016 19:20:28 +0000 (19:20 +0000)]
MFC r288081: Add MIPS ELF section type SHT_MIPS_ABIFLAGS definition

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

8 years agoMFC r293855:
brooks [Wed, 20 Jan 2016 19:08:49 +0000 (19:08 +0000)]
MFC r293855:

Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR: 206177
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>

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

8 years agoMFC r288083, r288138: elfdump: report MIPS-specific ELF section types
emaste [Wed, 20 Jan 2016 17:40:11 +0000 (17:40 +0000)]
MFC r288083, r288138: elfdump: report MIPS-specific ELF section types

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

8 years agoMFC r293245: loader.efi style(9) cleanup
emaste [Wed, 20 Jan 2016 17:38:21 +0000 (17:38 +0000)]
MFC r293245: loader.efi style(9) cleanup

Submitted by: smh

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

8 years agoMFC r293234: Enable the beastie menu for the UEFI console
emaste [Wed, 20 Jan 2016 16:59:37 +0000 (16:59 +0000)]
MFC r293234: Enable the beastie menu for the UEFI console

As of r294445 [in stable/10] the UEFI console includes basic terminal
emulator support.

Relnotes: Yes

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

8 years agoMFC r293233: loader.efi: add terminal emulation support
emaste [Wed, 20 Jan 2016 16:53:38 +0000 (16:53 +0000)]
MFC r293233: loader.efi: add terminal emulation support

This is based on the vidconsole implementation.

Submitted by: Toomas Soome <tsoome@me.com>
Relnotes: Yes

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

8 years agoMFC r293281: Use standard name for ASCII LF and FF control codes
emaste [Wed, 20 Jan 2016 16:41:00 +0000 (16:41 +0000)]
MFC r293281: Use standard name for ASCII LF and FF control codes

PR: 205778

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

8 years agoMFC r277215, r277291, r277418, r280953 and r280954:
royger [Wed, 20 Jan 2016 13:23:02 +0000 (13:23 +0000)]
MFC r277215, r277291, r277418, r280953 and r280954:

loader: implement multiboot support for Xen Dom0

Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.

Sponsored by: Citrix Systems R&D

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

8 years agoMFC r294372
arybchik [Wed, 20 Jan 2016 09:00:42 +0000 (09:00 +0000)]
MFC r294372

sfxge: refresh version to note matching version of out-of-tree driver

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294310
arybchik [Wed, 20 Jan 2016 08:28:32 +0000 (08:28 +0000)]
MFC r294310

sfxge: improve error handling in ef10_ev_rx()

Ensure that checksum flags and L3/L4 fields are ignored
if lower level errors are reported in the event.

Remove checks for CRC0_ERR (bad iSCSI header CRC) and
CRC1_ERR (bad iSCSI payload or FCoE/FCoIP CRC) as they
are not used by any existing code.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294309
arybchik [Wed, 20 Jan 2016 08:26:58 +0000 (08:26 +0000)]
MFC r294309

sfxge: select whether to read current or backup partition in Medford A/B scheme

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294259
arybchik [Wed, 20 Jan 2016 08:25:41 +0000 (08:25 +0000)]
MFC r294259

sfxge: regenerate EF10 registers definition for Medford

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294257
arybchik [Wed, 20 Jan 2016 08:24:00 +0000 (08:24 +0000)]
MFC r294257

sfxge: regenerate siena_flash.h from FW sources

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294256
arybchik [Wed, 20 Jan 2016 08:21:07 +0000 (08:21 +0000)]
MFC r294256

sfxge: cleanup: remove extra empty lines

Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294255
arybchik [Wed, 20 Jan 2016 08:20:00 +0000 (08:20 +0000)]
MFC r294255

sfxge: highlight that descriptor cache sizes are configured using TLV now

Submitted by:   Tom Millington <tmillington at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294254
arybchik [Wed, 20 Jan 2016 08:18:43 +0000 (08:18 +0000)]
MFC r294254

sfxge: support RFID-selectable segments of dynamic configuration

tlv_partition_header has field *preset* to support RFID-selectable
segments of dynamic configuration

Submitted by:   Mateusz Wrzesinski <mwrzesinski at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294253
arybchik [Wed, 20 Jan 2016 08:17:28 +0000 (08:17 +0000)]
MFC r294253

sfxge: if supported by firmware, use enhanced SET_MAC command to only configure the MTU

This allows an MTU change to be requested on unpriviliged functions
without also setting all the other parameters supported by MC_CMD_SET_MAC.

The enhanced SET_MAC command was introduced in v4_7 firmware.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294094
arybchik [Wed, 20 Jan 2016 08:16:30 +0000 (08:16 +0000)]
MFC r294094

sfxge: check the RX DMA end padding configuration on Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294092
arybchik [Wed, 20 Jan 2016 08:14:42 +0000 (08:14 +0000)]
MFC r294092

sfxge: rename Huntington MAC methods to EF10 and use for Medford

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294091
arybchik [Wed, 20 Jan 2016 08:13:59 +0000 (08:13 +0000)]
MFC r294091

sfxge: rename common hunt PHY methods to ef10 and use for Medford

Leaving BIST methods for now as, though the Medford bootrom now has lots
of BIST support, production firmware doesn't appear to have been updated
yet.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294081
arybchik [Wed, 20 Jan 2016 08:13:10 +0000 (08:13 +0000)]
MFC r294081

sfxge: cleanup: simplify ef10_get_datapath_caps

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294079
arybchik [Wed, 20 Jan 2016 08:11:12 +0000 (08:11 +0000)]
MFC r294079

sfxge: Medford still needs fallback for no privilege mask

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294078
arybchik [Wed, 20 Jan 2016 08:08:44 +0000 (08:08 +0000)]
MFC r294078

sfxge: medford stores a single global copy of VPD

Not per PF copies as on Huntington.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294077
arybchik [Wed, 20 Jan 2016 08:07:30 +0000 (08:07 +0000)]
MFC r294077

sfxge: support FATSOv2

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294076
arybchik [Wed, 20 Jan 2016 08:05:56 +0000 (08:05 +0000)]
MFC r294076

sfxge: rework MCDI request completion

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r294075
arybchik [Wed, 20 Jan 2016 08:03:30 +0000 (08:03 +0000)]
MFC r294075

sfxge: rename hunt_link_state_t to ef10_link_state_t

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293902
arybchik [Wed, 20 Jan 2016 08:02:11 +0000 (08:02 +0000)]
MFC r293902

sfxge: cleanup: quieten efx_mcdi_read_resonse_header error reporting

The "mcdi_err_arg" probe still reports results of failed MCDI
commands, unless the caller invoked efx_mcdi_execute_quiet().

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293901,r294371
arybchik [Wed, 20 Jan 2016 08:01:21 +0000 (08:01 +0000)]
MFC r293901,r294371

sfxge: add accessors for license-related MCDI calls to common code

Add support for Huntington MCDI licensing interface to common code.
Ported from Linux net driver IOCTL functions with restructuring for
initial support for V3 licensing API.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293900
arybchik [Wed, 20 Jan 2016 07:59:04 +0000 (07:59 +0000)]
MFC r293900

sfxge: add table entries for License NVRAM partition

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293899
arybchik [Wed, 20 Jan 2016 07:57:18 +0000 (07:57 +0000)]
MFC r293899

sfxge: cleanup: adjust efx_mcdi_get_port_modes() comment for clarity

Fix an explanatory comment which did not explain very well.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293895
arybchik [Wed, 20 Jan 2016 07:53:26 +0000 (07:53 +0000)]
MFC r293895

sfxge: fix common code VPD iterator and duplicate tag verification

Fix efx_vpd_hunk_next() which has -- since its inception -- failed to
correctly iterate over the tags and keywords contained in the VPD data.
Only the first tag or keyword would be returned and the next call with
*contp == 1 would walk to the end of the data and finish.

This was spotted when fixing up errors spotted by Prefast code analysis
(which neglected to set all of the out parameters in all successful cases)

Also fix efx_vpd_verify() on Siena and EF10 which (as a side effect of
correctly iterating over all the tags and keywords) was failing as it
detected that both the static VPD and dynamic VPD storage contained an
RV keyword in the VPD-R tag.  This is intentional as the static VPD and
dynamic VPD are stored separately (firmware merges their contents and
computes a new RV keyword checksum for the data readable from the VPD
capability in PCIe configuration space).

Submitted by:   Andrew Lee <alee at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293892
arybchik [Wed, 20 Jan 2016 07:52:24 +0000 (07:52 +0000)]
MFC r293892

sfxge: use correct register definitions for setting interrupt moderation on Medford

The only value which has changed is the number of rows
(ER_DZ_EVQ_TMR_REG_ROWS is 2048 vs 1024 for FR_BZ_TIMER_COMMAND_REGP0_ROWS)
but that isn't used, so this shouldn't change behaviour.

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293891
arybchik [Wed, 20 Jan 2016 07:51:23 +0000 (07:51 +0000)]
MFC r293891

sfxge: support FATSOv2 in common code

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293890
arybchik [Wed, 20 Jan 2016 07:50:00 +0000 (07:50 +0000)]
MFC r293890

sfxge: rx_prefix_pktlen methods do not require EFSYS_OPT_RX_SCALE

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293889,r294080,r294093,r294201,r294249-r294252
arybchik [Wed, 20 Jan 2016 07:48:49 +0000 (07:48 +0000)]
MFC r293889,r294080,r294093,r294201,r294249-r294252

sfxge: convert nvram methods to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293888
arybchik [Wed, 20 Jan 2016 07:44:05 +0000 (07:44 +0000)]
MFC r293888

sfxge: rework MCDI start request

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r293887
arybchik [Wed, 20 Jan 2016 07:42:31 +0000 (07:42 +0000)]
MFC r293887

sfxge: add Medford NIC methods

Submitted by:   Mark Spender <mspender at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoRegen for r294368.
jhb [Wed, 20 Jan 2016 01:11:01 +0000 (01:11 +0000)]
Regen for r294368.

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

8 years agoMFC 289769,289822,290143,290144:
jhb [Wed, 20 Jan 2016 01:09:53 +0000 (01:09 +0000)]
MFC 289769,289822,290143,290144:
Rename remaining linux32 symbols from linux_* to linux32_*.

289769:
Rename remaining linux32 symbols such as linux_sysent[] and
linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
linux64.ko.  While here, add support for linux64 binaries to systrace.
- Update NOPROTO entries in amd64/linux/syscalls.master to match the
  main table to fix systrace build.
- Add a special case for union l_semun arguments to the systrace
  generation.
- The systrace_linux32 module now only builds the systrace_linux32.ko.
  module on amd64.
- Add a new systrace_linux module that builds on both i386 and amd64.
  For i386 it builds the existing systrace_linux.ko.  For amd64 it
  builds a systrace_linux.ko for 64-bit binaries.

289822:
Fix build for the KTR-enabled kernels.

290143:
Fix build with DEBUG defined.

290144:
Update for LINUX32 rename.  The assembler didn't complain about undefined
symbols but just used 0 after the rename.

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

8 years agoMFC r292337, r292552, r292553:
ian [Tue, 19 Jan 2016 23:36:49 +0000 (23:36 +0000)]
MFC r292337, r292552, r292553:

  Build mount_smbfs for arm.  Also sort the subdirs.

  Avoid unaligned memory accesses when encoding netbios names in libsmb.

  The current code for encoding a netbios name converts each byte to a 16-bit
  value and stores the result by casting a char* to u_short*, resulting in
  alignment faults on strict-alignment platforms.

  This change reimplements the encoding routine using only byte accesses to
  memory. There is no particular reason to work with 16-bit values just
  because the encoding process creates two bytes of output for every byte of
  input. Working a byte at at time also avoids endian problems for big-endian
  platforms.

  Make the building of libsmb and mount_smbfs unconditional, now that r292552
  has eliminated alignment and endian problems that were making it fail on
  some platforms.

PR:           180438
PR:           189415
Relnotes: Yes

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

8 years agoDefault __MAKE_SHELL to /bin/sh when generating aton_ether_subr.c via
ngie [Tue, 19 Jan 2016 23:18:49 +0000 (23:18 +0000)]
Default __MAKE_SHELL to /bin/sh when generating aton_ether_subr.c via
`gen_ether_subr`.

__MAKE_SHELL is only defined when installworld is run on stable/10,
which breaks workflows dealing with source trees mounted with noexec [*]

This is a direct commit to stable/10

Reported by: Mark Martinec <Mark.Martinec+freebsd@ijs.si>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r292888:
ian [Tue, 19 Jan 2016 21:42:19 +0000 (21:42 +0000)]
MFC r292888:

  Fix the error checking for the ubenv command.  This moves the check for an
  empty ldvar (which amounts to the varname string starting with '=') into
  the if block that manipulates ldvar, which avoids later referencing ldvar
  when it was never initialized.

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

8 years agoMFC r292584:
ian [Tue, 19 Jan 2016 21:39:21 +0000 (21:39 +0000)]
MFC r292584:

  Set env vars from values on the efi loader command line.

  Examine each cmdline arg and if it contains an '=' convert it to ascii and
  pass it to putenv(). This allows var=value settings to come in on the
  command line.

  This will allow overriding dhcp server-provided data in loader(8), as
  discussed in PR 202098

PR:           202098
Relnotes: Yes (this goes together with r294343)

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

8 years agoMFC r292583:
ian [Tue, 19 Jan 2016 21:35:09 +0000 (21:35 +0000)]
MFC r292583:

  Allow dhcp/bootp server-provided values to be overriden from environment
  variables in loader(8) and other libstand applications.

  Sometimes a dhcp server provides incorrect information along with the IP
  address. It would be useful to have a way to override this with
  locally-supplied information, such as command line parameters passed from a
  prior-stage bootloader. This change allows pre-existing env vars to take
  precedence over values delivered by the dhcp or bootp server.

  The bootp/dhcp code in libstand automatically creates environment variables
  from the data provided by the server (dhcp.root-path, dhcp.domain-name,
  etc). It also transcribes the values to some global variables such as
  'rootpath' and 'hostname'.

  This change does two things:

      When adding dhcp.* vars to the environment, don't replace existing
      vars/values.

      When setting the global vars rootpath and hostname, use the
      dhcp.root-path and dhcp.host-name env var values if they exist.

  This allows the platform-specific part of loader(8) to obtain override
  values in some platform-specific way and store them in the environment
  before opening the network device. The set of values that can be overriden
  is currently limited to just string options. The values that are delivered
  as binary data are things that probably shouldn't be overridden (IP,
  netmask, gateway, etc).

  The original patch this evolved from was submitted by martymac@

PR:           202098
Relnotes: Yes

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

8 years agoMFC r292234, r292527:
ian [Tue, 19 Jan 2016 21:27:25 +0000 (21:27 +0000)]
MFC r292234, r292527:

  Add strlcat() and strlcpy() to libstand and libstand32.

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

8 years agoMFC r291164, r291876, r292227:
ian [Tue, 19 Jan 2016 21:21:59 +0000 (21:21 +0000)]
MFC r291164, r291876, r292227:

  Print more detailed info about the disk and partition chosen for booting.
  No behavioral changes, just cosmetics.

  Remove stray unescaped `%` in `Booting from ...` informational message.

  Enhance the "ubenv import" command to allow importing a u-boot env var
  directly into a loader (and thus kernel) env var.

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

8 years agoMFC 292669:
jhb [Tue, 19 Jan 2016 21:08:31 +0000 (21:08 +0000)]
MFC 292669:
Add accessor methods to fetch the BAR holding the MSI-X table and PBA.

While here, explicitly note the requirement that the BAR(s) must be
allocated prior to calling pci_alloc_msix().

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

8 years agoMFC 292410,292443,293977:
jhb [Tue, 19 Jan 2016 19:04:56 +0000 (19:04 +0000)]
MFC 292410,292443,293977:
Exit cleanly if malloc() fails to allocate a buffer for a copy of the
current MBR.

PR: 205322
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>

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

8 years agoMFC r294102:
dim [Tue, 19 Jan 2016 18:35:22 +0000 (18:35 +0000)]
MFC r294102:

MFV r294101: 6527 Possible access beyond end of string in zpool comment

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Gordon Ross <gwr@nexenta.com>

illumos/illumos-gate@2bd7a8d078223b122d65fea49bb8641f858b1409

This fixes erroneous double increments of the 'check' variable in a loop
in spa_prop_validate().  I ran into this in the clang380-import branch,
where clang 3.8.0 warns about it.  (It is already fixed there.)

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

8 years agoMFC r294128:
ngie [Tue, 19 Jan 2016 01:41:19 +0000 (01:41 +0000)]
MFC r294128:

Fix -Wunused warning with clang/gcc

- Get rid of unused argc/argv variables in main
- Bump WARNS to 6

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

8 years agoMFC r294103:
ngie [Tue, 19 Jan 2016 01:38:06 +0000 (01:38 +0000)]
MFC r294103:

- Check for accf_filter before running the tests, otherwise it will always
  fail at subtest 9/11
- Use strncpy instead of strcpy with afa.af_name

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

8 years agoMFC r294123:
ngie [Tue, 19 Jan 2016 01:35:16 +0000 (01:35 +0000)]
MFC r294123:

Add missing newline to message about requiring root privileges

This will help ensure that scripts/parsers don't get confused when the message
is printed out

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

8 years agoMFC r293715:
ngie [Tue, 19 Jan 2016 01:30:22 +0000 (01:30 +0000)]
MFC r293715:

Fix a mismerge from NetBSD in r162194 with `xdr_rpcb_entry_list_ptr(..)`

This fixes the potential NULL pointer dereference properly, and also fixes
memory leaks encountered in the process of iterating through `*rp`.

Found by: Valgrind
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>

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

8 years agoMFC: 293459,293643
gnn [Mon, 18 Jan 2016 21:24:28 +0000 (21:24 +0000)]
MFC: 293459,293643

Add netmap support for bhyve

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

8 years agoMFC 292409:
jhb [Mon, 18 Jan 2016 20:44:29 +0000 (20:44 +0000)]
MFC 292409:
It seems certain Intel GPUs use GPIO bitbanging over a child device
instead of GMBUS access for I2C transfers.  The GMBUS driver falls back
to this mode when a transfer times out.  However, the first transfer to
timeout was sending the request back to itself resulting in an panic due
to recursing on a lock.  Fix it to forward the request on to the proper
device.  This appears to have been accidentally changed in r277487.

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

8 years agoMFC 291225:
jhb [Mon, 18 Jan 2016 19:52:20 +0000 (19:52 +0000)]
MFC 291225:
Add a new -B flag for use with list mode (-l) that lists details about
bridges.  Currently this includes information about what resources a
bridge decodes on the upstream side for use by downstream devices including
bus numbers, I/O port resources, and memory resources.  Windows and bus
ranges are enumerated for both PCI-PCI bridges and PCI-CardBus bridges.

To simplify the implementation, all enumeration is done by reading the
appropriate config space registers directly rather than querying the
bridge driver in the kernel via new ioctls.  This does result in a few
limitations.

First, an unimplemented window in a PCI-PCI bridge cannot be accurately
detected as accurate detection requires writing to the window base
register.  That is not safe for pciconf(8).  Instead, this assumes that
any window where both the base and limit read as all zeroes is
unimplemented.

Second, the PCI-PCI bridge driver in a tree has a few quirks for
PCI-PCI bridges that use subtractive decoding but do not indicate that
via the progif config register.  The list of quirks is duplicated in
pciconf's source.

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

8 years agoMFC r288303: MFV r288243: nc from OpenBSD 5.8.
delphij [Mon, 18 Jan 2016 19:42:05 +0000 (19:42 +0000)]
MFC r288303: MFV r288243: nc from OpenBSD 5.8.

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

8 years agoMFC r293190: MFV r293125: less v481.
delphij [Mon, 18 Jan 2016 19:13:54 +0000 (19:13 +0000)]
MFC r293190: MFV r293125: less v481.

Relnotes: yes

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

8 years agoMFC r289873:
tuexen [Mon, 18 Jan 2016 18:50:26 +0000 (18:50 +0000)]
MFC r289873:
Add support to systat to display SCTP statistics.
MFC r289874:
Bump date in man page.

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

8 years agoMFC 290728:
jhb [Mon, 18 Jan 2016 18:27:21 +0000 (18:27 +0000)]
MFC 290728:
Export various helper variables describing the layout and size of
certain kernel structures for use by debuggers. This mostly aids
in examining cores from a kernel without debug symbols as a debugger
can infer these values if debug symbols are available.

One set of variables describes the layout of 'struct linker_file' to
walk the list of loaded kernel modules.

A second set of variables describes the layout of 'struct proc' and
'struct thread' to walk the list of processes in the kernel and the
threads in each process.

The 'pcb_size' variable is used to index into the stoppcbs[] array.

The 'vm_maxuser_address' is used to distinguish kernel virtual addresses
from user addresses. This doesn't have to be perfect, and
'vm_maxuser_address' is a cheap and simple way to differentiate kernel
pointers from simple values like TIDs and PIDs.

While here, annotate the fields in struct pcb used by kgdb on amd64
and i386 to note that their ABI should be preserved.  Annotations for
other platforms will be added in the future.

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

8 years agoMFC r292573
asomers [Mon, 18 Jan 2016 16:41:26 +0000 (16:41 +0000)]
MFC r292573

Fix "mount -a" for NFS and ZFS filesystems with shared mountpoints

sbin/mount.c
Check whether an fstab entry has the same fstype as a mounted
filesystem before declaring it to be mounted. This will allow NFS
filesystems that share a mountpoint with a local filesystem to be
automatically mounted at boot.

This is not such an unusual situation. For example, if somebody uses
the standard installer with a ZFS root, he'll get a /usr/home
filesystem, even though he may choose to mount /usr/home over NFS.

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

8 years agoMFC r281058: Remove whitespace.
emaste [Mon, 18 Jan 2016 16:09:58 +0000 (16:09 +0000)]
MFC r281058: Remove whitespace.

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

8 years agoMFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errors
emaste [Mon, 18 Jan 2016 15:55:25 +0000 (15:55 +0000)]
MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errors

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

8 years agoMFC r293343: Move amd64 metadata.h to x86 and share with i386
emaste [Mon, 18 Jan 2016 15:52:07 +0000 (15:52 +0000)]
MFC r293343: Move amd64 metadata.h to x86 and share with i386

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

8 years agoMFC r281381: Use explicitly sized types in EFI module metadata
emaste [Mon, 18 Jan 2016 15:43:00 +0000 (15:43 +0000)]
MFC r281381: Use explicitly sized types in EFI module metadata

This will allow the same metadata struct to be used on all platforms.

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