]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge ^/head r296007 through r296368.
dim [Thu, 3 Mar 2016 23:15:46 +0000 (23:15 +0000)]
Merge ^/head r296007 through r296368.

8 years agoRegenerate llvm and clang manpages.
dim [Thu, 3 Mar 2016 23:09:57 +0000 (23:09 +0000)]
Regenerate llvm and clang manpages.

8 years agoUpdate llvm and clang to 3.8.0 release.
dim [Thu, 3 Mar 2016 22:50:52 +0000 (22:50 +0000)]
Update llvm and clang to 3.8.0 release.

8 years agoAdd support for resetting the PHY via GPIO.
jmcneill [Thu, 3 Mar 2016 22:26:36 +0000 (22:26 +0000)]
Add support for resetting the PHY via GPIO.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: andrew, jmcneill
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5505

8 years agoAdd support for Allwinner A31 RTC controller.
jmcneill [Thu, 3 Mar 2016 22:19:39 +0000 (22:19 +0000)]
Add support for Allwinner A31 RTC controller.

Very similar to the A10 RTC controller with a few register offsets changed
and a different location for the LOSC switch status.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Reviewed by: jmcneill
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5500

8 years agozyd, run, ural: do not corrupt MAC address
avos [Thu, 3 Mar 2016 20:06:16 +0000 (20:06 +0000)]
zyd, run, ural: do not corrupt MAC address

Do not use ic_macaddr as a storage for current BSSID;
it may be reused in vap creation procedure;
similar to r288619.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5513

8 years agonet80211: drop <smth> -> INIT state transition warning (STA mode only)
avos [Thu, 3 Mar 2016 19:53:46 +0000 (19:53 +0000)]
net80211: drop <smth> -> INIT state transition warning (STA mode only)

This warning is irrelevant, since user can execute
'ifconfig wlan0 down' (or turn off card via rfkill switch) at any time.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5511

8 years agoFix ixl with RSS
smh [Thu, 3 Mar 2016 19:49:37 +0000 (19:49 +0000)]
Fix ixl with RSS

Fix compilation of ixl when RSS option is set, broken by r295946

MFC after: 3 weeks
X-MFC-With: r295946
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D5428

8 years agoDEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install.
bdrewery [Thu, 3 Mar 2016 18:08:58 +0000 (18:08 +0000)]
DEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install.

Currently the base.txz distribution does not get the BSD.debug.dist mtree
extracted into it.  So if you start from that and then try to build a 3rd-party
application outside of buildworld it will by-default try installing the
debug files into a missing directory if they are being installed into /usr/lib.

Check for the existence before forcing the directory to be created rather than
the older way of running a shell command with test -d || mkdir -p always.

Reported by: HardenedBSD (https://github.com/HardenedBSD/secadm/issues/23)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5411

8 years agoFix dtrace probes (introduced in 287759): debug__input was used
gnn [Thu, 3 Mar 2016 17:46:38 +0000 (17:46 +0000)]
Fix dtrace probes (introduced in 287759): debug__input was used
for output and drop; connect didn't always fire a user probe
some probes were missing in fastpath

Submitted by: Hannes Mehnert
Sponsored by: REMS, EPSRC
Differential Revision: https://reviews.freebsd.org/D5525

8 years agoMFV r296350:
pfg [Thu, 3 Mar 2016 15:36:00 +0000 (15:36 +0000)]
MFV r296350:
Split each domain again after striping any trailing dot.

Reported by:  dumbbell
Obtained from: openresolv (53416cf1b4)

8 years agoAdd sunrpc compat define for xp_sock.
pfg [Thu, 3 Mar 2016 14:44:30 +0000 (14:44 +0000)]
Add sunrpc compat define for xp_sock.

SunRPC is using xp_sock in SVCXPRT, while TI-RPC is using
xp_fd. Add a compatibility define.

Illumos has something similar for the non-kernel case.

Obtained from: linux-nfs project (git 0d94036c3a0d4c24d22bf6a8c40ac6625d972c29)

8 years agoUse correct size for malloc.
ae [Thu, 3 Mar 2016 13:07:59 +0000 (13:07 +0000)]
Use correct size for malloc.

Obtained from: Yandex LLC
MFC after: 1 week

8 years agoAdd more functions to the LinuxKPI.
hselasky [Thu, 3 Mar 2016 09:56:04 +0000 (09:56 +0000)]
Add more functions to the LinuxKPI.

Define strnicmp as a function macro instead of a regular macro while
at it.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow for overlapping quirk device ranges. Prior to this patch only
hselasky [Thu, 3 Mar 2016 08:47:27 +0000 (08:47 +0000)]
Allow for overlapping quirk device ranges. Prior to this patch only
the first device entry matching the USB vendor, product and revision
would be searched for quirks. After this patch all device entries will
be searched for quirks.

MFC after: 1 week

8 years agoo -t comman line option added to the usage().
maxim [Thu, 3 Mar 2016 07:07:44 +0000 (07:07 +0000)]
o -t comman line option added to the usage().

8 years agoAdd missing atf dirs.
bdrewery [Thu, 3 Mar 2016 06:37:17 +0000 (06:37 +0000)]
Add missing atf dirs.

Sponsored by: EMC / Isilon Storage Division

8 years agoMove casper library entries to proper places.
bdrewery [Thu, 3 Mar 2016 06:22:51 +0000 (06:22 +0000)]
Move casper library entries to proper places.

Sponsored by: EMC / Isilon Storage Division

8 years agoReplace all resource occurrences of '0UL/~0UL' with '0/~0'.
jhibbits [Thu, 3 Mar 2016 05:07:35 +0000 (05:07 +0000)]
Replace all resource occurrences of '0UL/~0UL' with '0/~0'.

Summary:
The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a
32-bit platform, will leave the upper 32 bits as 0.  The maximum range of a
resource is 0xFFF.... (all bits of the full type set).  By dropping the 'ul'
suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit
platforms gets it to a type-independent 'unsigned max'.

Reviewed By: cem
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5255

8 years agofix tcpdebug: - assign to "flags" in each probe, not only debug-input
gnn [Thu, 3 Mar 2016 02:46:12 +0000 (02:46 +0000)]
fix tcpdebug: - assign to "flags" in each probe, not only debug-input
compute "len" in the same way in each probe

Submitted by: Hannes Mehnert
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D5524

8 years agoRestore support for decay time of -1 (no decay).
jasone [Thu, 3 Mar 2016 01:43:36 +0000 (01:43 +0000)]
Restore support for decay time of -1 (no decay).

8 years agocxgbe(4): First of many changes to reduce diffs with internal shared
np [Thu, 3 Mar 2016 01:41:53 +0000 (01:41 +0000)]
cxgbe(4): First of many changes to reduce diffs with internal shared
code:

- Rename some CamelCase variables.
- s/t4_link_start/t4_link_l1cfg/g
- Pull in t4_get_port_type_description.
- Move t4_wait_op_done to t4_hw.c.
- Flip the order of the RDMA stats.
- Remove unsused function t4_iq_start_stop.
- Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c

Obtained from: Chelsio Communications

8 years agoAdd a cast to prevent a compiler warning.
jasone [Thu, 3 Mar 2016 01:30:28 +0000 (01:30 +0000)]
Add a cast to prevent a compiler warning.

8 years agoLet rman_init() initialize the default rman range.
jhibbits [Thu, 3 Mar 2016 01:12:13 +0000 (01:12 +0000)]
Let rman_init() initialize the default rman range.

If rm_start and rm_end are both 0 on input to rman_init(), rman_init()
pre-initializes them to the default range.  No need to set it before.

8 years agoAnother convert to bus_alloc_resource_anywhere().
jhibbits [Thu, 3 Mar 2016 01:09:00 +0000 (01:09 +0000)]
Another convert to bus_alloc_resource_anywhere().

Depending on how cbus hands out resources, this could actually be
bus_alloc_resource_any() instead.

8 years agoAllocate the PCI BAR resource with bus_alloc_resource_any()
jhibbits [Thu, 3 Mar 2016 01:07:17 +0000 (01:07 +0000)]
Allocate the PCI BAR resource with bus_alloc_resource_any()

We don't support allocating any other range with PCI BARs.

8 years agosh: Remove a redundant STPUTC check.
jilles [Wed, 2 Mar 2016 22:52:54 +0000 (22:52 +0000)]
sh: Remove a redundant STPUTC check.

8 years agosh: Don't trust that signal descriptions fit within 49 bytes.
jilles [Wed, 2 Mar 2016 21:24:46 +0000 (21:24 +0000)]
sh: Don't trust that signal descriptions fit within 49 bytes.

8 years agoAdd guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS.
bdrewery [Wed, 2 Mar 2016 21:03:42 +0000 (21:03 +0000)]
Add guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS.

This was a regression in r295985.

bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some
others.

The code that is moving is planned to be removed once FAST_DEPEND is
default (and the only option) though since FAST_DEPEND doesn't use this.

Pointyhat to: bdrewery
Sponsored by: EMC / Isilon Storage Division

8 years agoFix meta2deps.sh tracking of dependencies inside .CURDIR.
bdrewery [Wed, 2 Mar 2016 20:06:24 +0000 (20:06 +0000)]
Fix meta2deps.sh tracking of dependencies inside .CURDIR.

An example of this is in share/i18n/csmapper.

Reviewed by: sjg
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove self-reference to destroy_dev_drain(9).
bdrewery [Wed, 2 Mar 2016 19:22:24 +0000 (19:22 +0000)]
Remove self-reference to destroy_dev_drain(9).

MFC after: 1 week

8 years agodaemon(8): Add -t option to set process title
cem [Wed, 2 Mar 2016 19:10:39 +0000 (19:10 +0000)]
daemon(8): Add -t option to set process title

The default process title is taken from the argv[0] value (any
particular hardlink name).  Add a -t option to override the default.

PR: 205016
Submitted by: Yuri <yuri@rawbw.com>
No objection from: freebsd-current@
Sponsored by: EMC / Isilon Storage Division

8 years agoIf callout_stop_safe() noted that the callout is currently executing,
kib [Wed, 2 Mar 2016 18:46:17 +0000 (18:46 +0000)]
If callout_stop_safe() noted that the callout is currently executing,
but next invocation is cancelled while migrating,
sleepq_check_timeout() needs to be informed that the callout is
stopped.  Otherwise the thread switches off CPU and never become
runnable, since running callout could have already raced with us,
while the migrating and cancelled callout could be one which is
expected to set TDP_TIMOFAIL flag for us.  This contradicts with the
expected behaviour of callout_stop() for other callers, which
e.g. decrement references from the callout callbacks.

Add a new flag CS_MIGRBLOCK requesting report of the situation as
'successfully stopped'.

Reviewed by: jhb (previous version)
Tested by: cognet, pho
PR: 200992
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D5221

8 years agoFix handling of DT_TEXTREL for an object with more than one read-only
kib [Wed, 2 Mar 2016 16:36:24 +0000 (16:36 +0000)]
Fix handling of DT_TEXTREL for an object with more than one read-only
segment.  According to gABI spec, presence of the tag indicates that
dynamic linker must be prepared to handle relocations against any
read-only segment, not only the segment which we, somewhat arbitrary,
declared the text.

For each read-only segment, add write permission before relocs are
processed, and return to the mapping mode requested by the phdr, after
relocs are done.

Reported, tested, and reviewed by: emaste
PR: 207631
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAdd gem5 support, so we attach there as well.
bz [Wed, 2 Mar 2016 15:26:55 +0000 (15:26 +0000)]
Add gem5 support, so we attach there as well.

Fix the boundary limit to end at the end of the region and not one beyond (1).

Diagnosed by: andrew (1)
Reviewed by: andrew, br
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5493

8 years agoForce re-routing PCI interrupts (this is for legacy INTx not MSI).
bz [Wed, 2 Mar 2016 15:20:42 +0000 (15:20 +0000)]
Force re-routing PCI interrupts (this is for legacy INTx not MSI).
Need this for gem5, but was not needed on real hadrware (yet) as it
was always MSI.

Reviewed by: andrew, jhb
Discovered by: andrew
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D5494

8 years agoThe cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
andrew [Wed, 2 Mar 2016 14:33:46 +0000 (14:33 +0000)]
The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S,
only define it when building for ARMv5 or prior.

Sponsored by: ABT Systems Ltd

8 years agoSupport for Enhanced Allocation in PCI
wma [Wed, 2 Mar 2016 09:54:58 +0000 (09:54 +0000)]
Support for Enhanced Allocation in PCI

    On some platforms, BAR entries are hardcoded and must not be accessed
    using standard method. Add functionality to identify this situation
    and configure the bus based on Enhanced Allocation structure.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5242

8 years agoImprove ThunderX PEM driver to work on pass2 revision
wma [Wed, 2 Mar 2016 08:39:59 +0000 (08:39 +0000)]
Improve ThunderX PEM driver to work on pass2 revision

    Things changed:
    * do not allocate 4GB of SLI space, because it's the waste of
      system resources. Allocate only small portions when needed.
    * provide own implementation of activate_resource which performs
      address translation between PCI bus and host PA address space.
      This is temporary solution, should be replaced by bus_map_resource
      once implemented.

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5294

8 years agohyperv/hn: Make # of rings configurable
sephe [Wed, 2 Mar 2016 05:24:55 +0000 (05:24 +0000)]
hyperv/hn: Make # of rings configurable

And since the host may not being able to allocate the # of rings
requested by us, save the # of rings allocated by the host in the
ring_inuse counters; use ring_inuse counters for run time operation.

This paves the way for the upcoming vRSS support.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse m_catpkt(9) to ensure that pkthdr fields are updated properly.
markj [Wed, 2 Mar 2016 05:05:02 +0000 (05:05 +0000)]
Use m_catpkt(9) to ensure that pkthdr fields are updated properly.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoSet tres to NULL to avoid a double free if the m_pullup() below fails.
markj [Wed, 2 Mar 2016 05:04:04 +0000 (05:04 +0000)]
Set tres to NULL to avoid a double free if the m_pullup() below fails.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoUse m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().
markj [Wed, 2 Mar 2016 05:01:58 +0000 (05:01 +0000)]
Use m_catpkt(9) to avoid a possible use-after-free in ieee80211_defrag().

m is not guaranteed to be valid after m_cat() returns. The effects of this
are most noticeable when INVARIANTS is enabled, since m's header length
field is given a value of 0xdeadc0de by the trash dtor.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoDocument m_catpkt(), and remove misinformation about m_cat(9).
markj [Wed, 2 Mar 2016 04:58:51 +0000 (04:58 +0000)]
Document m_catpkt(), and remove misinformation about m_cat(9).

Since m_cat() may copy data from the second mbuf chain into the last mbuf
of the first chain, it may free the first mbuf of the second chain. Thus,
the second chain is not guaranteed to be valid after m_cat() returns.

Reviewed by: glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5497

8 years agoFix a typo that prevented pw(8) from setting a user's UID to 0.
markj [Wed, 2 Mar 2016 04:56:36 +0000 (04:56 +0000)]
Fix a typo that prevented pw(8) from setting a user's UID to 0.

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

8 years agoRemove redundant NULL pointer comparison.
cy [Wed, 2 Mar 2016 03:28:57 +0000 (03:28 +0000)]
Remove redundant NULL pointer comparison.

Reported  by: PVS-Studio (V595) in D5245
Differential Revision: D5245

8 years agoReplace some more default range checks with RMAN_IS_DEFAULT_RANGE().
jhibbits [Wed, 2 Mar 2016 03:26:56 +0000 (03:26 +0000)]
Replace some more default range checks with RMAN_IS_DEFAULT_RANGE().

This is a follow-on to r295832.

8 years agohyperv/hn: Fix typo in comment
sephe [Wed, 2 Mar 2016 03:19:59 +0000 (03:19 +0000)]
hyperv/hn: Fix typo in comment

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Make read buffer per-channel
sephe [Wed, 2 Mar 2016 03:07:31 +0000 (03:07 +0000)]
hyperv/hn: Make read buffer per-channel

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reorganized by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoUse the m_extadd() function instead of deprecated MEXTADD().
jhibbits [Wed, 2 Mar 2016 02:29:35 +0000 (02:29 +0000)]
Use the m_extadd() function instead of deprecated MEXTADD().

Suggested by: glebius

8 years agoRemove some debug printfs
jhibbits [Wed, 2 Mar 2016 02:27:53 +0000 (02:27 +0000)]
Remove some debug printfs

8 years agohyperv/hn: Pass channel to hv_nv_on_receive_completion()
sephe [Wed, 2 Mar 2016 02:27:13 +0000 (02:27 +0000)]
hyperv/hn: Pass channel to hv_nv_on_receive_completion()

While I'm here, staticize this function.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Modified by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoFix regression in r296242 affecting several drivers. For EXT_NET_DRV,
glebius [Wed, 2 Mar 2016 02:12:01 +0000 (02:12 +0000)]
Fix regression in r296242 affecting several drivers. For EXT_NET_DRV,
EXT_MOD_TYPE, EXT_DISPOSABLE types we should first execute the free
callback, then free the mbuf, otherwise we will derefernce memory that
was just freed.

Reported and tested: jhibbits

8 years agohyperv/chan: Factor out the vcpu setting
sephe [Wed, 2 Mar 2016 01:40:47 +0000 (01:40 +0000)]
hyperv/chan: Factor out the vcpu setting

And use it for cpu0 assignment; it does not sound right to assume that
cpu0 maps to vcpu0.  And this factored out function will be exposed to
drivers, if driver specific CPU binding is needed, e.g. hn(4).

Move default cpu select after saving channel offer message. This makes
sure that all useful information of the channel has been setup.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5504

8 years agohyperv/chan: Function renaming; no functional change
sephe [Wed, 2 Mar 2016 01:33:30 +0000 (01:33 +0000)]
hyperv/chan: Function renaming; no functional change

The renamed function create a sysctl tree for channel, and many
non-statistics nodes exists, so don't claim it only adds sysctl
nodes for statistics.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5503

8 years agohyperv/chan: Add sysctl node to check whether monitor is allocated or not
sephe [Wed, 2 Mar 2016 01:26:05 +0000 (01:26 +0000)]
hyperv/chan: Add sysctl node to check whether monitor is allocated or not

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5502

8 years agoFix 2 bugs in the mpc85xx local bus controller driver.
jhibbits [Wed, 2 Mar 2016 00:18:05 +0000 (00:18 +0000)]
Fix 2 bugs in the mpc85xx local bus controller driver.

1) Include opt_platform.h to get QORIQ_DPAA.  Otherwise the definition of
OCP85XX_TGTIF_LBC is incorrect.
2) The child resources are already allocated, just activate them, instead of
incorrectly remapping the memory regions (resource lists for lbc consist of the
virtual address of the child's resources, not the physical address).

Sponsored by: Alex Perez/Inertial Computing

8 years agoRemove filemon->lock wrappers.
bdrewery [Wed, 2 Mar 2016 00:13:13 +0000 (00:13 +0000)]
Remove filemon->lock wrappers.

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

8 years agoCorrect a comment.
bdrewery [Tue, 1 Mar 2016 23:58:53 +0000 (23:58 +0000)]
Correct a comment.

8 years agoAdd support for Allwinner A31/A31s EHCI controller and USB PHY.
jmcneill [Tue, 1 Mar 2016 22:54:30 +0000 (22:54 +0000)]
Add support for Allwinner A31/A31s EHCI controller and USB PHY.

Reviewed by: andrew, Emmanuel Vadot <manu@bidouilliste.com>
Approved by: gonzo (mentor)
Differential Revision: https://reviews.freebsd.org/D5467

8 years agoUse SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.
jhb [Tue, 1 Mar 2016 22:51:44 +0000 (22:51 +0000)]
Use SCHEDULER_STOPPED() in cv_*wait*() instead of checking panicstr.

Reviewed by: kib
MFC after: 1 month
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D5516

8 years agoCCACHE_BUILD+META_MODE: Lookup and canonicalize the default CCACHE_DIR.
bdrewery [Tue, 1 Mar 2016 22:25:54 +0000 (22:25 +0000)]
CCACHE_BUILD+META_MODE: Lookup and canonicalize the default CCACHE_DIR.

This is done to prevent not having CCACHE_DIR causing meta mode with filemon to
see stat changes in the ccache dir and cause rebuilds.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Fix mapper files building during dirdeps.
bdrewery [Tue, 1 Mar 2016 22:25:49 +0000 (22:25 +0000)]
DIRDEPS_BUILD: Fix mapper files building during dirdeps.

Sponsored by: EMC / Isilon Storage Division

8 years ago- update portsnap(8) to direct users to pkg-version
jgh [Tue, 1 Mar 2016 22:13:20 +0000 (22:13 +0000)]
- update portsnap(8) to direct users to pkg-version

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

8 years agoMerge OpenSSL 1.0.2g.
jkim [Tue, 1 Mar 2016 22:08:28 +0000 (22:08 +0000)]
Merge OpenSSL 1.0.2g.

Relnotes: yes

8 years agombtowc(3): set errno to EILSEQ if an incomplete character is passed.
pfg [Tue, 1 Mar 2016 19:15:34 +0000 (19:15 +0000)]
mbtowc(3): set errno to EILSEQ if an incomplete character is passed.

According to POSIX, The mbtowc() function shall fail if:
[EILSEQ] An invalid character sequence is detected.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D5496

Obtained from: OpenBSD (Ingo Schwarze)
MFC after: 1 month

8 years agoRefactor the AIO subsystem to permit file-type-specific handling and
jhb [Tue, 1 Mar 2016 18:12:14 +0000 (18:12 +0000)]
Refactor the AIO subsystem to permit file-type-specific handling and
improve cancellation robustness.

Introduce a new file operation, fo_aio_queue, which is responsible for
queueing and completing an asynchronous I/O request for a given file.
The AIO subystem now exports library of routines to manipulate AIO
requests as well as the ability to run a handler function in the
"default" pool of AIO daemons to service a request.

A default implementation for file types which do not include an
fo_aio_queue method queues requests to the "default" pool invoking the
fo_read or fo_write methods as before.

The AIO subsystem permits file types to install a private "cancel"
routine when a request is queued to permit safe dequeueing and cleanup
of cancelled requests.

Sockets now use their own pool of AIO daemons and service per-socket
requests in FIFO order.  Socket requests will not block indefinitely
permitting timely cancellation of all requests.

Due to the now-tight coupling of the AIO subsystem with file types,
the AIO subsystem is now a standard part of all kernels.  The VFS_AIO
kernel option and aio.ko module are gone.

Many file types may block indefinitely in their fo_read or fo_write
callbacks resulting in a hung AIO daemon.  This can result in hung
user processes (when processes attempt to cancel all outstanding
requests during exit) or a hung system.  To protect against this, AIO
requests are only permitted for known "safe" files by default.  AIO
requests for all file types can be enabled by setting the new
vfs.aio.enable_usafe sysctl to a non-zero value.  The AIO tests have
been updated to skip operations on unsafe file types if the sysctl is
zero.

Currently, AIO requests on sockets and raw disks are considered safe
and are enabled by default.  aio_mlock() is also enabled by default.

Reviewed by: cem, jilles
Discussed with: kib (earlier version)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D5289

8 years agoImport OpenSSL 1.0.2g.
jkim [Tue, 1 Mar 2016 17:57:01 +0000 (17:57 +0000)]
Import OpenSSL 1.0.2g.

8 years agoRemove taskqueue_enqueue_fast().
jhb [Tue, 1 Mar 2016 17:47:32 +0000 (17:47 +0000)]
Remove taskqueue_enqueue_fast().

taskqueue_enqueue() was changed to support both fast and non-fast
taskqueues 10 years ago in r154167.  It has been a compat shim ever
since.  It's time for the compat shim to go.

Submitted by: Howard Su <howard0su@gmail.com>
Reviewed by: sephe
Differential Revision: https://reviews.freebsd.org/D5131

8 years agoRestore configuration for RISC-V.
br [Tue, 1 Mar 2016 17:43:06 +0000 (17:43 +0000)]
Restore configuration for RISC-V.

8 years agoOFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.
mmel [Tue, 1 Mar 2016 16:10:15 +0000 (16:10 +0000)]
OFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.

Reviewed by: ian, loos (paritaly)

8 years agoAdd two comments explaining the fine points of the hash
kib [Tue, 1 Mar 2016 15:21:01 +0000 (15:21 +0000)]
Add two comments explaining the fine points of the hash
implementation.

Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D5490

8 years agoRegenerate src.conf.5 after r296193 and r296264
emaste [Tue, 1 Mar 2016 14:30:35 +0000 (14:30 +0000)]
Regenerate src.conf.5 after r296193 and r296264

8 years agoGet memory ranges from FDT if no EFI API is available on ARM64
wma [Tue, 1 Mar 2016 12:50:24 +0000 (12:50 +0000)]
Get memory ranges from FDT if no EFI API is available on ARM64

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           andrew, wma
Differential revision: https://reviews.freebsd.org/D5408

8 years agoMake the memory size returned from fdt_get_mem_regions a 64-bit type. This
andrew [Tue, 1 Mar 2016 11:39:07 +0000 (11:39 +0000)]
Make the memory size returned from fdt_get_mem_regions a 64-bit type. This
is the physical memory size so may be larger than a u_long can hold, e.g.
on ARM with LPAE we could see an address space of up to 40 bits. On ARM
u_long is only 32 bits so the memory size will be truncated, possibly to
zero.

Reported by: bz
Sponsored by: ABT Systems Ltd

8 years agoFix section numbers for autofs(5), kbdcontrol(1), vidcontrol(1), quota(1),
trasz [Tue, 1 Mar 2016 11:36:10 +0000 (11:36 +0000)]
Fix section numbers for autofs(5), kbdcontrol(1), vidcontrol(1), quota(1),
and telnet(1) in the right place.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoConnect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.
trasz [Tue, 1 Mar 2016 11:34:44 +0000 (11:34 +0000)]
Connect pmc.haswellxeon(3) to the build; looks like it was missed in r279829.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove an alternative way for dealing with root interrupt controller
skra [Tue, 1 Mar 2016 11:27:58 +0000 (11:27 +0000)]
Remove an alternative way for dealing with root interrupt controller
which is not complete. Likely, it was forgotten and not removed before
committing.

8 years agoMark other parts of interrupt framework as INTR_SOLO option specific.
skra [Tue, 1 Mar 2016 10:57:29 +0000 (10:57 +0000)]
Mark other parts of interrupt framework as INTR_SOLO option specific.

Note that isrc_arg member of struct intr_irqsrc is used only for
INTR_SOLO and IPI filter. This should be remembered if IPI filters
and their arguments will be stored on another place.

This option could be unusable very soon, if interrupt controllers
implementations will not be implemented considering it.

8 years agoStop setting the memory size in the arm EFI and FDT code, we don't use it.
andrew [Tue, 1 Mar 2016 09:51:36 +0000 (09:51 +0000)]
Stop setting the memory size in the arm EFI and FDT code, we don't use it.

Sponsored by: ABT Systems Ltd

8 years agoMake the fdt_get_mem_regions memsize argument optional. It's only used in
andrew [Tue, 1 Mar 2016 09:45:27 +0000 (09:45 +0000)]
Make the fdt_get_mem_regions memsize argument optional. It's only used in
by a few callers.

Sponsored by: ABT Systems Ltd

8 years agoEnable SRE_EL2 on ARM64
wma [Tue, 1 Mar 2016 08:15:00 +0000 (08:15 +0000)]
Enable SRE_EL2 on ARM64

Enable system register access for EL2. Alpine-V2 is
the first device requiring this to be enabled.
It is also in-sync with Linux initialization code,
and compatible with Alpine-V2 uboot requirements.

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           wma
Differential revision: https://reviews.freebsd.org/D5394

8 years agoAdd uart 8250 device to GENERIC arm64 configuration
wma [Tue, 1 Mar 2016 07:06:36 +0000 (07:06 +0000)]
Add uart 8250 device to GENERIC arm64 configuration

Obtained from:         Semihalf
Submitted by:          Michal Stanek <mst@semihalf.com>
Sponsored by:          Annapurna Labs
Approved by:           cognet (mentor)
Reviewed by:           zbb, wma
Differential revision: https://reviews.freebsd.org/D5406

8 years agonet80211: eliminate copy-paste nearby ieee80211_check_rxseq()
avos [Tue, 1 Mar 2016 06:47:21 +0000 (06:47 +0000)]
net80211: eliminate copy-paste nearby ieee80211_check_rxseq()

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4043

8 years agohyperv/channel: Nuke useless stack variable
sephe [Tue, 1 Mar 2016 05:15:26 +0000 (05:15 +0000)]
hyperv/channel: Nuke useless stack variable

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5499

8 years agohyperv/hn: Set hash per-packet-info for each packet transmission
sephe [Tue, 1 Mar 2016 04:59:18 +0000 (04:59 +0000)]
hyperv/hn: Set hash per-packet-info for each packet transmission

So that the host could dispatch the TX done back to this TX ring's
owner channel

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5498

8 years agoAdd another compatibility check for QorIQ GPIO driver.
jhibbits [Tue, 1 Mar 2016 03:41:48 +0000 (03:41 +0000)]
Add another compatibility check for QorIQ GPIO driver.

Some MPC85xx GPIO controllers are compatible with QorIQ.

It may make more sense in the future to rename this and mpc85xx_gpio.c, as
mpc85xx_gpio.c appears to only be compatible with a few mpc85xx SoCs.  All other
MPC85xx SoCs use the same controller as QorIQ.

8 years agoCorrect the memory rman ranges to be to BUS_SPACE_MAXADDR
jhibbits [Tue, 1 Mar 2016 02:59:06 +0000 (02:59 +0000)]
Correct the memory rman ranges to be to BUS_SPACE_MAXADDR

Summary:
As part of the migration of rman_res_t to be typed to uintmax_t, memory ranges
must be clamped appropriately for the bus, to prevent completely bogus addresses
from being used.

This is extracted from D4544.

Reviewed By: cem
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5134

8 years agocxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.
np [Tue, 1 Mar 2016 02:36:50 +0000 (02:36 +0000)]
cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0.

These firmwares were obtained from the beta "Chelsio T5/T4 Unified Wire
v2.12.0.2 for Linux" release.  Changes since last release are listed in the
"Release Notes" accompanying the beta release and are copy-pasted here as well.

The plan is to have only GA'd firmwares in any -STABLE FreeBSD branch so I'll
MFC this (after 2 months) only if it ends up in a GA release.

================================================================================
================================================================================

22.1. T5 Firmware
+++++++++++++++++++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress
   queue was ignored.
 - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Fixed 40G link failures with some switches when auto-negotiation enabled.
 - Fixed to improve on link bring-up time.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where bogus d3hot bits were set causing traffic stall.
 - Fixed an issue where sometimes adapter was not seen after reboot.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.
 - Fixed an issue where link failed to come up after removing twinax cable and
   inserting optical module.

OFLD
 - Fixed a potential iSCSI data corruption issue by disabling RxFragEn flag.

FOiSCSI
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP was not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added new interface to program DCA settings in SGE contexts; allow 32-byte
   IQE size
 - Added PTP interface fw_ptp_ts to support PTP Frequeny and Offset adjustment.
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

OFLD:
 - WR opcode is returned to host in cqe error response.

================================================================================
================================================================================

22.2. T4 Firmware
+++++++++++++++++

Version : 1.15.28.0
Date    : 02/29/2016
================================================================================

FIXES
-----

BASE:
 - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where default ingress queue
   was ignored.
 - Fixed an issue in watchdog which was causing VM bring-up failure after
   reboot.
 - Per port buffer groups size doubled to improve performance.
 - Fixed an issue where iWARP was crashing in conjunction with traffic
   management.

FOiSCSI:
 - Fixed an issue in recovery path where connection was getting closed before
   recovery processing was done.
 - Fixed an issue in TCP port reuse.
 - Fixed an issue in recovery path when large number (>64) of iSCSI connections
   were in use.
 - Returned ENETUNREACH if IP had not been provisioned yet and driver tried to
   use given inerface.

ENHANCEMENTS
------------

BASE:
 - Added MPS raw interface.

ETH:
 - New mailbox command FW_DCB_IEEE_CMD api added for IEEE dcbx.

================================================================================

Obtained from: Chelsio Communications
MFC after: 2 months
Sponsored by: Chelsio Communications

8 years agoAdd VM_MEMATTR_CACHEABLE support for AIM, for parity with Book-E.
jhibbits [Tue, 1 Mar 2016 00:50:39 +0000 (00:50 +0000)]
Add VM_MEMATTR_CACHEABLE support for AIM, for parity with Book-E.

Not used right now, but may be in the future anyway.

8 years agoRemove UMA_ZONE_REFCNT feature, now unused.
glebius [Tue, 1 Mar 2016 00:33:32 +0000 (00:33 +0000)]
Remove UMA_ZONE_REFCNT feature, now unused.

Blessed by: jeff

8 years agoNew way to manage reference counting of mbuf external storage.
glebius [Tue, 1 Mar 2016 00:17:14 +0000 (00:17 +0000)]
New way to manage reference counting of mbuf external storage.

The m_ext.ext_cnt pointer becomes a union. It can now hold the refcount
value itself. To tell that m_ext.ext_flags flag EXT_FLAG_EMBREF is used.
The first mbuf to attach a cluster stores the refcount. The further mbufs
to reference the cluster point at refcount in the first mbuf. The first
mbuf is freed only when the last reference is freed.

The benefit over refcounts stored in separate slabs is that now refcounts
of different, unrelated mbufs do not share a cache line.

For EXT_EXTREF mbufs the zone_ext_refcnt is no longer needed, and m_extadd()
becomes void, making widely used M_EXTADD macro safe.

For EXT_SFBUF mbufs the sf_ext_ref() is removed, which was an optimization
exactly against the cache aliasing problem with regular refcounting.

Discussed with: rrs, rwatson, gnn, hiren, sbruno, np
Reviewed by: rrs
Differential Revision: https://reviews.freebsd.org/D5396
Sponsored by: Netflix

8 years agoFix !IEEE80211_DEBUG build.
glebius [Mon, 29 Feb 2016 23:09:31 +0000 (23:09 +0000)]
Fix !IEEE80211_DEBUG build.

8 years agoMerge byacc 20150711.
jkim [Mon, 29 Feb 2016 21:39:00 +0000 (21:39 +0000)]
Merge byacc 20150711.

8 years agonet80211: do not enforce promiscuous mode for AP scan
avos [Mon, 29 Feb 2016 21:17:39 +0000 (21:17 +0000)]
net80211: do not enforce promiscuous mode for AP scan

Drivers should set their own filters via ic_scan_start()/ic_scan_end()
callbacks; and we don't need frames other than beacons or probe responses.

(Note: this was a noop since r287197 due to promiscuous mode with bridge
workaround)

Tested with Intel 3945BG, RTL8188EU and WUSB54GC in HOSTAP mode.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5474

8 years agoFAST_DEPEND: Prefer .OBJDIR depend files.
bdrewery [Mon, 29 Feb 2016 21:10:47 +0000 (21:10 +0000)]
FAST_DEPEND: Prefer .OBJDIR depend files.

Sponsored by: EMC / Isilon Storage Division

8 years agonet80211: fix scanning after D5145 (PR 197498 related)
avos [Mon, 29 Feb 2016 21:09:09 +0000 (21:09 +0000)]
net80211: fix scanning after D5145 (PR 197498 related)

- In case, when we are doing <smth> -> INIT (FEXT_REINIT) -> <smth2>
state transition, cancel_scan() may be called in the first transition.
Reenqueue second state transition, so things will be executed in order.
- Discard any AUTH+ state transition request when INIT -> SCAN
transition is not done.
- Allow to track discarded state transitions via 'state' debugging
category.

Tested with:
 * RTL8188EU, HOSTAP mode.
 * RTL8188CUS, STA mode.
 * Intel 3945BG, IBSS and STA modes.

PR: 197498
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5482

8 years agoFix some whitespace nits in cxgbetool.c. No functional change.
np [Mon, 29 Feb 2016 21:04:06 +0000 (21:04 +0000)]
Fix some whitespace nits in cxgbetool.c.  No functional change.

8 years agonet80211: cleanup ieee80211_scan_sw.c
avos [Mon, 29 Feb 2016 21:03:54 +0000 (21:03 +0000)]
net80211: cleanup ieee80211_scan_sw.c

Make it look more consistently.
No functional changes.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5152

8 years agonet80211: refactor scan_signal()
avos [Mon, 29 Feb 2016 21:00:10 +0000 (21:00 +0000)]
net80211: refactor scan_signal()

- Pass scan state and additional internal flags as a parameters.
- Add locked version.

Tested with:
 * Intel 3945BG, STA mode.
 * RTL8188EU, STA mode.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5148