]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agosfxge: convert nvram rw_finish method to use partition id
arybchik [Mon, 18 Jan 2016 06:14:43 +0000 (06:14 +0000)]
sfxge: convert nvram rw_finish method to use partition id

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

8 years agosfxge: convert nvram write method to use partition id
arybchik [Mon, 18 Jan 2016 06:13:09 +0000 (06:13 +0000)]
sfxge: convert nvram write method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4961

8 years ago[iwm] fix up the rate control setup code to initialise rates in the order
adrian [Mon, 18 Jan 2016 05:43:34 +0000 (05:43 +0000)]
[iwm] fix up the rate control setup code to initialise rates in the order
we want to use it.

The rate table was being initialised in low->high, but the link quality
table was being initialised high->low. So, when we did a lookup, we
would get the indexes wrong.

This started by a patch from dragonflybsd which reversed how the ni->in_ridx[]
array is being used; I'd rather it all be consistent.  So, this is consistent.

Inspired by: what I did to iwn(4) a while ago
Inspired by: DragonflyBSD; <imre@vdsz.com>

8 years agoAdd extra checks to make sure the size is valid. We may get an integer
andrew [Mon, 18 Jan 2016 00:07:04 +0000 (00:07 +0000)]
Add extra checks to make sure the size is valid. We may get an integer
underflow when we have small blocks of memory at the start and end of the
32-bit address range.

While here, only insert mappings pointing at a non-zero amount of memory.

Sponsored by: ABT Systems Ltd

8 years agoQuick exit after setting the clock control register.
jhibbits [Sun, 17 Jan 2016 23:03:21 +0000 (23:03 +0000)]
Quick exit after setting the clock control register.

Discussed with: ian

8 years agoMake PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
ian [Sun, 17 Jan 2016 21:19:45 +0000 (21:19 +0000)]
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.

8 years agoutimensat(2): Correct description of [EINVAL] error.
jilles [Sun, 17 Jan 2016 21:14:27 +0000 (21:14 +0000)]
utimensat(2): Correct description of [EINVAL] error.

MFC after: 4 days

8 years agoPrevent double free of control in common sendmsg path as sosend
dchagin [Sun, 17 Jan 2016 19:28:13 +0000 (19:28 +0000)]
Prevent double free of control in common sendmsg path as sosend
already freeing it.

8 years agoBring in initial libc and libstand support for RISC-V.
br [Sun, 17 Jan 2016 15:21:23 +0000 (15:21 +0000)]
Bring in initial libc and libstand support for RISC-V.

Reviewed by: andrew, emaste, kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D4943

8 years agoWhen cleaning up from failed adv locking and checking for write, do
kib [Sun, 17 Jan 2016 08:40:51 +0000 (08:40 +0000)]
When cleaning up from failed adv locking and checking for write, do
not call VOP_CLOSE() manually.  Instead, delegate the close to
fo_close() performed as part of the fdrop() on the file failed to
open.  For this, finish constructing file on error, in particular, set
f_vnode and f_ops.

Forcibly resetting f_ops to badfileops disabled additional cleanups
performed by fo_close() for some file types, in this case it was noted
that cdevpriv data was corrupted.  Since fo_close() call must be
enabled for some file types, it makes more sense to enable it for all
files opened through vn_open_cred().

In collaboration with: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAssert that the linkage between struct cdev_privdata and and struct
kib [Sun, 17 Jan 2016 08:34:35 +0000 (08:34 +0000)]
Assert that the linkage between struct cdev_privdata and and struct
file is consistent.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agosfxge: convert nvram erase method to use partition id
arybchik [Sun, 17 Jan 2016 05:12:37 +0000 (05:12 +0000)]
sfxge: convert nvram erase method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4957

8 years ago[PR 206224] bv_cnt is sometimes examined without holding the bufobj lock
rpokala [Sun, 17 Jan 2016 01:04:20 +0000 (01:04 +0000)]
[PR 206224] bv_cnt is sometimes examined without holding the bufobj lock

Add locking around access to bv_cnt which is currently being done unlocked

PR: 206224
Reviewed by: imp
Approved by: jhb
MFC after: 1 week
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4931

8 years agoRemove leading slashes added to ObsoleteFiles.inc in r294113.
dim [Sun, 17 Jan 2016 00:52:28 +0000 (00:52 +0000)]
Remove leading slashes added to ObsoleteFiles.inc in r294113.

8 years agourtwn: add ROM structure for RTL8188EU
avos [Sun, 17 Jan 2016 00:52:21 +0000 (00:52 +0000)]
urtwn: add ROM structure for RTL8188EU

- Add the structure with already known fields offsets
  (some of them were taken from this driver,
  some (channel_plan, rf_* fields) - from TP-LINK official driver)
- Fix a typo / dehardcode a constant in RTL8192C ROM structure.

Tested with RTL8188EU, STA mode

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4274

8 years agoe5500 HWPMC is identical to e500mc, so add support check for it.
jhibbits [Sun, 17 Jan 2016 00:14:22 +0000 (00:14 +0000)]
e5500 HWPMC is identical to e500mc, so add support check for it.

8 years agoDon't bother checking an ip[46].addr netmask/prefixlen. This is already
jamie [Sat, 16 Jan 2016 22:32:57 +0000 (22:32 +0000)]
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
MFC after: 5 days

8 years agoPartially revert r294055.
jhibbits [Sat, 16 Jan 2016 21:24:12 +0000 (21:24 +0000)]
Partially revert r294055.

This part was a botched revert of a test change.

Spotted by: alc

8 years agoNever 4k align the MBR bootpool because zfsldr can not deal with a gap
allanjude [Sat, 16 Jan 2016 19:25:16 +0000 (19:25 +0000)]
Never 4k align the MBR bootpool because zfsldr can not deal with a gap

If the bootpool does not start at the first sector of the BSD partition
then zfsldr seeks to the wrong offset inside the ZFS vdev label, and is
unable to find zfsboot, so the system does not boot

If 4k alignment is requested, align the BSD partition in the MBR table,
and align the swap and data pool, but the bootpool must start at sector 1

While here, if 4k alignment is requested, disable MBR CHS alignment, as
this results in not-4k aligned partitions.

Reported by: Alex Wilkinson
MFC after: 5 days
Sponsored by: ScaleEngine Inc.

8 years agoClear errno before calling getpw*.
jamie [Sat, 16 Jan 2016 18:13:28 +0000 (18:13 +0000)]
Clear errno before calling getpw*.

8 years agoUse __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes
andrew [Sat, 16 Jan 2016 10:12:50 +0000 (10:12 +0000)]
Use __ARM_ARCH to decide when ARM_TP_ADDRESS needs to be set. This fixes
an issue with clang 3.8.0 where none of the __ARM_ARCH_*__ macros were
defined on some ARMv6 kernel configs.

Sponsored by: ABT Systems Ltd

8 years agoBusy the mount point which is the owner of the audit vnode, around
kib [Sat, 16 Jan 2016 10:06:33 +0000 (10:06 +0000)]
Busy the mount point which is the owner of the audit vnode, around
audit_record_write().  This is important so that VFS_STATFS() is not
done on the NULL or freed mp and the check for free space is
consistent with the vnode used for write.

Add vn_start_write() braces around VOP_FSYNC() calls on the audit vnode.

Move repeated code to fsync vnode and panic to the helper
audit_worker_sync_vp().

Reviewed by: rwatson
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoCompile for specific cortex model inside the RPi 2. It's closer to
imp [Sat, 16 Jan 2016 05:58:17 +0000 (05:58 +0000)]
Compile for specific cortex model inside the RPi 2. It's closer to
working, and might actually work...

8 years agoWe don't need at91_bs_tag. arm_base_bs_tag works now that we have
imp [Sat, 16 Jan 2016 05:47:34 +0000 (05:47 +0000)]
We don't need at91_bs_tag. arm_base_bs_tag works now that we have
better dynamic device mapping that didn't exit when we started this
port. Remove it, since everything works w/o it.

8 years agoBump .Dd for the content changes
ngie [Sat, 16 Jan 2016 05:35:42 +0000 (05:35 +0000)]
Bump .Dd for the content changes

8 years agoMove ohci files to their proper place in the tree for atmel.
imp [Sat, 16 Jan 2016 04:47:32 +0000 (04:47 +0000)]
Move ohci files to their proper place in the tree for atmel.
Fix when it is included (we don't have a at91rm9200 device).
From a similar patch in the PR, with tweaked names.

PR: 206229

8 years agoA fix to r292469: Iterate over the physical segments in descending rather
alc [Sat, 16 Jan 2016 04:41:40 +0000 (04:41 +0000)]
A fix to r292469: Iterate over the physical segments in descending rather
than ascending order in vm_phys_alloc_contig() so that, for example, a
sequence of contigmalloc(low=0, high=4GB) calls doesn't exhaust the supply
of low physical memory resulting in a later contigmalloc(low=0, high=1MB)
failure.

Reported by: cy
Tested by: cy
Sponsored by: EMC / Isilon Storage Division

8 years agoFix -Wunused warning with clang/gcc
ngie [Sat, 16 Jan 2016 02:19:56 +0000 (02:19 +0000)]
Fix -Wunused warning with clang/gcc

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

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix warnings with clang/gcc
ngie [Sat, 16 Jan 2016 02:18:36 +0000 (02:18 +0000)]
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

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division

8 years agoFix warnings with gcc 5.0
ngie [Sat, 16 Jan 2016 02:15:13 +0000 (02:15 +0000)]
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(..)

MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division

8 years agoTest for EPROTOTYPE not EPROTONOSUPPORT
ngie [Sat, 16 Jan 2016 02:02:50 +0000 (02:02 +0000)]
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)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing newline to message about requiring root privileges
ngie [Sat, 16 Jan 2016 01:37:17 +0000 (01:37 +0000)]
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

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

8 years agotrim-time? What was I thinking. run-time.
imp [Sat, 16 Jan 2016 01:30:55 +0000 (01:30 +0000)]
trim-time? What was I thinking. run-time.

Noticed by: Allan Jude

8 years agoAdd some clarifications.
imp [Sat, 16 Jan 2016 01:13:27 +0000 (01:13 +0000)]
Add some clarifications.

8 years agoImprove the sentence flow as well which has the happy benefit of
imp [Sat, 16 Jan 2016 00:45:48 +0000 (00:45 +0000)]
Improve the sentence flow as well which has the happy benefit of
making read-only modify a noun, a case where it unquestionably should
be hyphenated.

8 years agoAlthough not directly modifying a noun, read-only should be hyphenated
imp [Sat, 16 Jan 2016 00:43:10 +0000 (00:43 +0000)]
Although not directly modifying a noun, read-only should be hyphenated
in this context (or in any, really).

8 years agoRead-only is typically hyphenated. Move (read only) to a spot where it
imp [Sat, 16 Jan 2016 00:39:36 +0000 (00:39 +0000)]
Read-only is typically hyphenated. Move (read only) to a spot where it
modifies a noun and hyphenate.

8 years agoRead-only is hyphenated when it modifies a noun.
imp [Sat, 16 Jan 2016 00:37:27 +0000 (00:37 +0000)]
Read-only is hyphenated when it modifies a noun.

8 years agoUpdate mandoc to 20160116
bapt [Fri, 15 Jan 2016 23:28:12 +0000 (23:28 +0000)]
Update mandoc to 20160116

8 years agoRemove config.h imported by accident
bapt [Fri, 15 Jan 2016 23:16:04 +0000 (23:16 +0000)]
Remove config.h imported by accident

8 years ago- Add support for zip to lesspipe.sh
ak [Fri, 15 Jan 2016 23:13:01 +0000 (23:13 +0000)]
- Add support for zip to lesspipe.sh

Approved by: des

8 years agoImport mdocml CVS snapshot 20160116
bapt [Fri, 15 Jan 2016 23:08:59 +0000 (23:08 +0000)]
Import mdocml CVS snapshot 20160116

8 years ago- Match directory extraction message with Infozip [1]
ak [Fri, 15 Jan 2016 23:04:36 +0000 (23:04 +0000)]
- Match directory extraction message with Infozip [1]
- Add comment explaining masks in check_binary()

Obtained from: NetBSD [1]
Approved by: des

8 years ago- Extract common code from extract()/extract_stdout() to extract2fd()
ak [Fri, 15 Jan 2016 22:58:23 +0000 (22:58 +0000)]
- Extract common code from extract()/extract_stdout() to extract2fd()
- Update information about central directory handling

Obtained from: NetBSD
Approved by: des

8 years agoFAST_DEPEND: Fix incremental builds leading to kernel panics.
bdrewery [Fri, 15 Jan 2016 22:08:58 +0000 (22:08 +0000)]
FAST_DEPEND: Fix incremental builds leading to kernel panics.

This fixes .depend.genassym.o not being included.  genassym.o depends on
all of the system headers and when rebuilt regenerates assym.s which
lists offsets for critial .S files to utilize.  By having a struct in a
system header change its offsets and not have generassym.o be rebuilt,
this would lead to panics.

The flaw in the initial commit was seeing ${OBJS} in ${SYSTEM_OBJS} and
assuming it had all of ${SRCS} in it.  This is not the case though.  The
older mkdep code splits out all of the various SRC lists for generating
the .depend file.  It also includes ${GEN_CFILES}, which had genassym.c
and was the only significant file lacking from ${SYSTEM_OBJS} upon inspection,
since it is not linked in.  Rather than duplicate the likely
soon-to-be-removed mkdep lists, just add genassym.o to the DEPENDOBJS
list.  Using ${SRCS} as bsd.dep.mk does would be nice but there are many
files in the build that are only added to ${OBJS} and not ${SRCS}, such
as bf_enc.o derived from bf_enc.S for i386.

Sponsored by: EMC / Isilon Storage Division
Reported by: dhw (several panics on current@)
Pointyhat to: bdrewery

8 years agoFAST_DEPEND: Rework optimization for r290524.
bdrewery [Fri, 15 Jan 2016 22:08:51 +0000 (22:08 +0000)]
FAST_DEPEND: Rework optimization for r290524.

The .MAKEFLAGS check inside of the .for loop is extremely slow for some
reason.  Just moving it out of the loop trimmed -V lookup time from 11
seconds to 1 second in the kernel obj directory.

Sponsored by: EMC / Isilon Storage Division

8 years ago- Check for accf_filter before running the tests, otherwise it will always
ngie [Fri, 15 Jan 2016 21:59:18 +0000 (21:59 +0000)]
- 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

8 years agoMFV r294101: 6527 Possible access beyond end of string in zpool comment
dim [Fri, 15 Jan 2016 21:45:53 +0000 (21:45 +0000)]
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.)

MFC after: 3 days

8 years agoAdd mmu format info into ARM vmcore.
skra [Fri, 15 Jan 2016 18:53:06 +0000 (18:53 +0000)]
Add mmu format info into ARM vmcore.
Fix kvatop translation for 64K pages.

Reviewed by: jhb
Approved by: kib (mentor)
Differential Revision:    https://reviews.freebsd.org/D4942

8 years agoReduce diffs to upstream by adding a couple comment blocks and moving the
ian [Fri, 15 Jan 2016 18:27:34 +0000 (18:27 +0000)]
Reduce diffs to upstream by adding a couple comment blocks and moving the
parse_boot_param() function to the end of the file.

8 years agoUnbreak NOIP builds after r294084.
bz [Fri, 15 Jan 2016 16:45:36 +0000 (16:45 +0000)]
Unbreak NOIP builds after r294084.

8 years agosfxge: check the RX DMA end padding configuration on Medford
arybchik [Fri, 15 Jan 2016 15:20:26 +0000 (15:20 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4952

8 years agosfxge: convert nvram read method to use partition id
arybchik [Fri, 15 Jan 2016 15:19:18 +0000 (15:19 +0000)]
sfxge: convert nvram read method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4951

8 years agosfxge: rename Huntington MAC methods to EF10 and use for Medford
arybchik [Fri, 15 Jan 2016 15:17:44 +0000 (15:17 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4950

8 years agosfxge: rename common hunt PHY methods to ef10 and use for Medford
arybchik [Fri, 15 Jan 2016 15:12:30 +0000 (15:12 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4949

8 years agoxenbus: add a comment with the names of the generated accessors
royger [Fri, 15 Jan 2016 14:34:31 +0000 (14:34 +0000)]
xenbus: add a comment with the names of the generated accessors

For easy grepping.

Sponsored by: Citrix Systems R&D

8 years agoClean up original route path selection logic a bit.
melifaro [Fri, 15 Jan 2016 13:47:11 +0000 (13:47 +0000)]
Clean up original route path selection logic a bit.

NULL pointer dereference claimed by Coverity was possible
  if one (or several) next-hops for had their weights set to 0.

CID: 1348482

8 years agoUse the recently added "make_dev_s()" function to solve old race setting the
hselasky [Fri, 15 Jan 2016 12:09:15 +0000 (12:09 +0000)]
Use the recently added "make_dev_s()" function to solve old race setting the
si_drv1 field in "struct cdev" when creating new character devices.

8 years agoRemove the commented out sc device from the i.MX kernels, they both use
andrew [Fri, 15 Jan 2016 11:40:41 +0000 (11:40 +0000)]
Remove the commented out sc device from the i.MX kernels, they both use
vt(4).

8 years agoImplement support for PCI suspend, resume and shutdown events in the
hselasky [Fri, 15 Jan 2016 11:18:58 +0000 (11:18 +0000)]
Implement support for PCI suspend, resume and shutdown events in the
LinuxKPI. Fix a few spaces to tabs. Bump the FreeBSD version to force
recompilation of existing KMODs.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoMake nfscl_getmyip() use new routing KPI.
melifaro [Fri, 15 Jan 2016 09:05:14 +0000 (09:05 +0000)]
Make nfscl_getmyip() use new routing KPI.

* Use standard IPv6 SAS instead of rt->rt_ifa address.
* Make address lookup work for IPv6 LLA.
* Save address into buffer provided by caller instead of using static vars.

Discussed with: rmacklem

8 years agosfxge: cleanup: simplify ef10_get_datapath_caps
arybchik [Fri, 15 Jan 2016 06:30:46 +0000 (06:30 +0000)]
sfxge: cleanup: simplify ef10_get_datapath_caps

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4938

8 years agosfxge: convert nvram rw_start method to use partition id
arybchik [Fri, 15 Jan 2016 06:28:58 +0000 (06:28 +0000)]
sfxge: convert nvram rw_start method to use partition id

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4937

8 years agosfxge: Medford still needs fallback for no privilege mask
arybchik [Fri, 15 Jan 2016 06:27:51 +0000 (06:27 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4936

8 years agosfxge: medford stores a single global copy of VPD
arybchik [Fri, 15 Jan 2016 06:26:37 +0000 (06:26 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4935

8 years agosfxge: support FATSOv2
arybchik [Fri, 15 Jan 2016 06:25:26 +0000 (06:25 +0000)]
sfxge: support FATSOv2

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4934

8 years agosfxge: rework MCDI request completion
arybchik [Fri, 15 Jan 2016 06:23:04 +0000 (06:23 +0000)]
sfxge: rework MCDI request completion

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4933

8 years agosfxge: rename hunt_link_state_t to ef10_link_state_t
arybchik [Fri, 15 Jan 2016 06:21:39 +0000 (06:21 +0000)]
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.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4932

8 years agoConnect the ZFS boot environment menu to the UEFI loader
allanjude [Fri, 15 Jan 2016 05:45:45 +0000 (05:45 +0000)]
Connect the ZFS boot environment menu to the UEFI loader

MFC after: 3 days
Sponsored by: ScaleEngine Inc.

8 years agoMove init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader
allanjude [Fri, 15 Jan 2016 05:45:10 +0000 (05:45 +0000)]
Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader

While here, add a filter to ignore special datasets

MFC after: 3 days
Sponsored by: ScaleEngine Inc.

8 years agoAdd EFI ZFS boot support
smh [Fri, 15 Jan 2016 02:33:47 +0000 (02:33 +0000)]
Add EFI ZFS boot support

This builds on the modular EFI loader support added r294060 adding a
module to provide ZFS boot support on EFI systems.

It should be noted that EFI uses a fixed size memory block for all
allocations performed by the loader so it may be necessary to tune this
size.

For example when building an image which uses mfs_root e.g. mfsbsd, adding
the following to /etc/make.conf would be needed to prevent EFI from running
out of memory when loading the mfs_root image.
EFI_STAGING_SIZE=128

Submitted by: Eric McCorkle
MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoioat(4): Add support for 'fence' bit with DMA_FENCE flag
cem [Fri, 15 Jan 2016 01:34:43 +0000 (01:34 +0000)]
ioat(4): Add support for 'fence' bit with DMA_FENCE flag

Some classes of IOAT hardware prefetch reads.  DMA operations that
depend on the result of prior DMA operations must use the DMA_FENCE flag
to prevent stale reads.

(E.g., I've hit this personally on Broadwell-EP.  The Broadwell-DE has a
different IOAT unit that is documented to not pipeline DMA operations.)

Sponsored by: EMC / Isilon Storage Division

8 years agoModularise EFI boot loader
smh [Fri, 15 Jan 2016 01:22:36 +0000 (01:22 +0000)]
Modularise EFI boot loader

Make EFI boot loader modular in preparation for adding ZFS support.

This is a partial commit of the D4515.

Submitted by: Eric McCorkle
Reviewed by: emaste (in part)
MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4515

8 years agoEnsure boot fsread correctly probes all partitions
smh [Fri, 15 Jan 2016 01:06:37 +0000 (01:06 +0000)]
Ensure boot fsread correctly probes all partitions

The boot code fsread was caching the result of meta data request and
reusing it even for calls with inode = 0, which is used to partitions
trigger a probe.

The result was that success was incorrectly returned for all partition
probes after the first valid success, even for partitions which are not
UFS.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoMake common boot file_loadraw name parameter const
smh [Fri, 15 Jan 2016 00:55:36 +0000 (00:55 +0000)]
Make common boot file_loadraw name parameter const

Fix compiler warnings about dropping const qualifier by changing file_loadraw
name param to const, and updating method to make that the case (it was
abusing the variable).

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoFix a bug in INIT handling on accepted 1-to-1 style sockets when the
tuexen [Fri, 15 Jan 2016 00:26:15 +0000 (00:26 +0000)]
Fix a bug in INIT handling on accepted 1-to-1 style sockets when the
listener is closed.
This fix allows the following packetdrill test to pass:
// Setup a connected, blocking 1-to-1 style socket
+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
// Check the handshake with en empty(!) cookie
+0.0 bind(3, ..., ...) = 0
+0.0 listen(3, 1) = 0
+0.0 < sctp: INIT[flgs=0, tag=1, a_rwnd=1500, os=1, is=1, tsn=1]
+0.0 > sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=..., os=..., is=..., tsn=1, ...]
+0.0 < sctp: COOKIE_ECHO[flgs=0, len=..., val=...]
+0.0 > sctp: COOKIE_ACK[flgs=0]
+0.0 accept(3, ..., ...) = 4
+0.0 close(3) = 0
// Inject an INIT chunk and expect an INIT-ACK
+0.0 < sctp: INIT[flgs=0, tag=3, a_rwnd=1500, os=1, is=1, tsn=1]
+0.0 > sctp: INIT_ACK[flgs=0, tag=..., a_rwnd=..., os=..., is=..., tsn=..., ...]

MFC after: 3 days

8 years agoAdjust VM_MAX_KERNEL_ADDRESS to the max address, not the minimum next.
jhibbits [Thu, 14 Jan 2016 23:22:43 +0000 (23:22 +0000)]
Adjust VM_MAX_KERNEL_ADDRESS to the max address, not the minimum next.

VM_MAX_KERNEL_ADDERESS is the maximum KVA address.  0xf8000000 is the start of
device mapping space.  Since several conditional checks use '<=' against
VM_MAX_KERNEL_ADDRESS, bad things could feasibly happen.

8 years agoFix OpenSSH client information leak.
glebius [Thu, 14 Jan 2016 22:40:46 +0000 (22:40 +0000)]
Fix OpenSSH client information leak.

Security: SA-16:07.openssh
Security: CVE-2016-0777

8 years agoMake it possible to specify the path to userboot.so with the -b flag.
jmallett [Thu, 14 Jan 2016 22:07:35 +0000 (22:07 +0000)]
Make it possible to specify the path to userboot.so with the -b flag.

Reviewed by: neel

8 years agoAdd rotationrate to geom disk dumpconf
rpokala [Thu, 14 Jan 2016 21:52:21 +0000 (21:52 +0000)]
Add rotationrate to geom disk dumpconf

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

Reviewed by: sbruno, jhb
Approved by: jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4483
Requested by: Kevin Bowling < kevin.bowling @ kev009.com >

8 years agoRemove unused reg param from fdt_fixup_memory
smh [Thu, 14 Jan 2016 21:39:10 +0000 (21:39 +0000)]
Remove unused reg param from fdt_fixup_memory

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoPrevent bogus compiler in ZFS boot code
smh [Thu, 14 Jan 2016 21:31:26 +0000 (21:31 +0000)]
Prevent bogus compiler in ZFS boot code

Silence a bogus compiler warning about indexing past the end of dn_bonus.

The ZFS code ensures this is not possible but the compiler can't determine
this so added an additional check to prevent this warning.

Sponsored by: Multiplay

8 years agoRemove aiod_timeout.
jhb [Thu, 14 Jan 2016 21:28:56 +0000 (21:28 +0000)]
Remove aiod_timeout.

It hasn't been used since the AIO code was made MPSAFE 10 years ago.

Reviewed by: kib
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4946

8 years agoImprovements to the MDXFileChunk() template function:
jtl [Thu, 14 Jan 2016 21:08:23 +0000 (21:08 +0000)]
Improvements to the MDXFileChunk() template function:
- Remove unneeded fstat()/lseek() calls.
- Return NULL and set errno to EINVAL on negative length.
- Fix small style problems and expand variable names.

After this change, it is possible to use this code for some irregular
files. For example, 'md5 /dev/md0' should now succeed.

Differential Revision: https://reviews.freebsd.org/D4748
Suggested by: bde
Reviewed by: bde, allanjude, delphij

8 years agoRename aiod_bio taskqueue to aiod_kick.
jhb [Thu, 14 Jan 2016 20:51:48 +0000 (20:51 +0000)]
Rename aiod_bio taskqueue to aiod_kick.

This taskqueue is not used to handle bio requests.  It is only used to
run aio_kick_nowait() to spin up new aio daemon processes.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D4904

8 years agoFix order of last two arguments of mtx_init
gonzo [Thu, 14 Jan 2016 20:25:22 +0000 (20:25 +0000)]
Fix order of last two arguments of mtx_init

Spotted by: jmcneill@NetBSD.org

8 years agoFix the handling of the "PDC write transfer length" erratum for at91. The
ian [Thu, 14 Jan 2016 19:33:13 +0000 (19:33 +0000)]
Fix the handling of the "PDC write transfer length" erratum for at91.  The
problem affects revision 1xx hardware as well as later versions.  Also, the
recommended workaround is to set the PDC count register for a 12-byte
transfer when the actual size is less than that, but there is no need to
extend or zero-out the data buffer, because the blklen register contains
the real transfer size and only that many bytes will be transferred.

Also add a sysctl to turn debugging printfs on or off on the fly.

8 years agoSet -mlong-calls where needed to get a static clang and lldb 3.8.0
andrew [Thu, 14 Jan 2016 19:00:13 +0000 (19:00 +0000)]
Set -mlong-calls where needed to get a static clang and lldb 3.8.0
linking. These are too large for a branch instruction to branch from an
earlier point in the code to somewhere later.

This will also allow these to be build with Thumb-2 when we get this
infrastructure.

Reviewed by: dim
Differential Revision: https://reviews.freebsd.org/D4855

8 years agoOnly build EFI components on supported compilers
smh [Thu, 14 Jan 2016 18:53:54 +0000 (18:53 +0000)]
Only build EFI components on supported compilers

As the in-tree GCC does not support __attribute__((ms_abi)) EFI can only
be built with Clang.

The EFI loader and boot1 validated this, but unused libefi was still built
causing issues under GCC after warnings where enabled by r293724.

Disable building all of EFI when the selected compiler is GCC.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay

8 years agoRevert r293903
smh [Thu, 14 Jan 2016 18:46:57 +0000 (18:46 +0000)]
Revert r293903

Revert r293903 as EFI shouldn't be built on this platform that the this
was reported on.

Sponsored by: Multiplay

8 years agoFix race condition involving ZFS remove events
asomers [Thu, 14 Jan 2016 18:19:05 +0000 (18:19 +0000)]
Fix race condition involving ZFS remove events

When a ZFS drive disappears, ZFS sends a resource.fs.zfs.removed event to
userland. A userland program like zfsd(8) can use that event, for example to
activate a hotspare. The current code contains a race condition: vdev_geom
will sent the sysevent _before_ spa.c would update the vdev's status,
causing userland processes to see pool state that does not reflect the
device removal. This change moves the sysevent to spa.c, closing the race.

Reviewed by: delphij, Sean Eric Fagan
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4902

8 years agoFix spelling of IPMI
ngie [Thu, 14 Jan 2016 18:04:49 +0000 (18:04 +0000)]
Fix spelling of IPMI

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate .Dd, missed in r294011
bjk [Thu, 14 Jan 2016 17:16:47 +0000 (17:16 +0000)]
Update .Dd, missed in r294011

8 years agoWrap overlong comment lines.
trasz [Thu, 14 Jan 2016 16:55:07 +0000 (16:55 +0000)]
Wrap overlong comment lines.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix the code to retry mount attempt in mountcritlocal if there are
trasz [Thu, 14 Jan 2016 16:53:17 +0000 (16:53 +0000)]
Fix the code to retry mount attempt in mountcritlocal if there are
any root mount holds.  The previous one used a wrong conditional - the
"err=$?" assignment resets "$?" to 0.

Submitted by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix panic in IP redirect. Panic was introduced in r293466.
melifaro [Thu, 14 Jan 2016 16:31:00 +0000 (16:31 +0000)]
Fix panic in IP redirect. Panic was introduced in r293466.

Found by: Yamagi Burmeister <lists at yamagi.org>>

8 years agoDocument how to enter the debugger here. I'm sure there's some better
imp [Thu, 14 Jan 2016 16:23:07 +0000 (16:23 +0000)]
Document how to enter the debugger here. I'm sure there's some better
canonical place, and the nit-pickers are welcome to move this
information there with a cross reference.

Differential Review: https://reviews.freebsd.org/D4860

8 years agoFix building with GCC since PAGE_MASK is signed on i386.
jhb [Thu, 14 Jan 2016 15:51:13 +0000 (15:51 +0000)]
Fix building with GCC since PAGE_MASK is signed on i386.

Reviewed by: ngie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D4772

8 years agoAdjust previous fix to conform to the existing style in this file.
jhb [Thu, 14 Jan 2016 15:49:24 +0000 (15:49 +0000)]
Adjust previous fix to conform to the existing style in this file.

8 years agoMake ng_netflow(9) use new routing KPI.
melifaro [Thu, 14 Jan 2016 13:14:12 +0000 (13:14 +0000)]
Make ng_netflow(9) use new routing KPI.

Netflow module is supposed to store (along with fields like
  gateway address and interface index) matched netmask for each record.
  This (currently) requires returning individual route entries, instead
  of optimized next-hop structure. Given that, use control-plane
  rib_lookup_info() function to avoid accessing rtentries directly.
While rib_lookup_info() might be slower, than fibX_lookup() flavours,
  it is more scalable than rtalloc1_fib(), because rtentry mutex is
  not acquired.