]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoImport libucl 20160812
bapt [Sat, 1 Oct 2016 00:14:01 +0000 (00:14 +0000)]
Import libucl 20160812

7 years agoUpdate libucl to snapshot 20160812
bapt [Sat, 1 Oct 2016 00:11:09 +0000 (00:11 +0000)]
Update libucl to snapshot 20160812

7 years agoImport dma 20160929
bapt [Fri, 30 Sep 2016 23:38:26 +0000 (23:38 +0000)]
Import dma 20160929

MFC after: 1 week

7 years agocstyle fix of cd9660_open in libstand
tsoome [Fri, 30 Sep 2016 23:19:08 +0000 (23:19 +0000)]
cstyle fix of cd9660_open in libstand

rS306534 did create bad cstyle by my mistake, correcting it.

Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8103

7 years agoopen.2: Document Capsicum behavior
cem [Fri, 30 Sep 2016 23:01:37 +0000 (23:01 +0000)]
open.2: Document Capsicum behavior

Document open(2) and openat(2) behavior in Capsicum capability mode.

Reviewed by: ed (previous version), emaste, rwatson (previous version),
wblock
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D7947

7 years agocd9660_open should check for padding
tsoome [Fri, 30 Sep 2016 22:28:20 +0000 (22:28 +0000)]
cd9660_open should check for padding

The libstand cd9660 reader code must check for extents having padding.

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

7 years agoAdd dependency to evdev module
gonzo [Fri, 30 Sep 2016 21:14:42 +0000 (21:14 +0000)]
Add dependency to evdev module

7 years agoAdd dependency to evdev module (if required)
gonzo [Fri, 30 Sep 2016 21:13:19 +0000 (21:13 +0000)]
Add dependency to evdev module (if required)

7 years agoDeclare a module for evdev and add dependency to ukbd(4) and ums(4)
gonzo [Fri, 30 Sep 2016 21:04:56 +0000 (21:04 +0000)]
Declare a module for evdev and add dependency to ukbd(4) and ums(4)

Prepare for making evdev a module. "Pure" evdev device drivers (like
touchscreen) and evdev itself can be built as a modules regardless of
"options EVDEV" in kernel config. So if people does not require evdev
functionality in hybrid drivers like ums and ukbd they can, for instance,
kldload evdev and utouchscreen to run FreeBSD in kiosk mode.

7 years agocam_periph_ccbwait could return while ccb in progress
markj [Fri, 30 Sep 2016 21:00:09 +0000 (21:00 +0000)]
cam_periph_ccbwait could return while ccb in progress

In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb
pinfo.index and status fields to determine whether the ccb was done,
but these fields are updated without a contending lock and could glitch
into states that would be erroneously interpreted as done.  Instead,
have cam_periph_ccbwait look for the explicit result of the function
cam_periph_done.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: mav
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8020

7 years agoFix `sesutil fault` operation.
mav [Fri, 30 Sep 2016 20:35:12 +0000 (20:35 +0000)]
Fix `sesutil fault` operation.

Fault and ident bits are located in different control bytes, so previous
code was just doing nothing, writing into reserved bit.

MFC after: 1 week

7 years agolibm: remove unused variables for LDBL_MANT_DIG != 113
emaste [Fri, 30 Sep 2016 20:20:07 +0000 (20:20 +0000)]
libm: remove unused variables for LDBL_MANT_DIG != 113

Sponsored by: The FreeBSD Foundation

7 years agoAdd NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
sevan [Fri, 30 Sep 2016 20:06:05 +0000 (20:06 +0000)]
Add NetBSD 5.1.4, 5.2.2 & 7.0.1 releases to the tree.
Ammend the position of NetBSD 6.0.2 release in the tree as it came
after OpenBSD[1] & DragonFlyBSD[2] release according to the release
information.
The entries for the 6.0.5 & 6.1.5 releases were incorrect (fetched from
NetBSD CVS copy) and confirmed with history page[3]

[1] http://www.openbsd.org/53.html
[2] https://www.dragonflybsd.org/releases/
[3] http://netbsd.org/releases/formal.html#history

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D8099

7 years agoAdd librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.
adrian [Fri, 30 Sep 2016 19:59:56 +0000 (19:59 +0000)]
Add librss, a simple wrapper around RSS APIs so applications can begin auto-tuning.

I've used this in a handful of RSS test applications.  It is just some
very simple functions to fetch the RSS configuration, query the per-bucket
CPU set, and mark sockets as local to an RSS bucket.  It should be sufficient
for both thread-based and process-based workloads.

(Yes, I wrote a manpage.)

This is based on some early RSS API and wrapper API work I did whilst
I was at Netflix.  Thanks to Netflix for the very original work that
spawned this; thanks to Peter Grehan for his feedback about RSS APIs
and thanks to Jack Vogel and Navdeep Parhar for the NIC-facing side of the
APIs.  These fed into the simple userland API I wrote up here.

Reviewed by: gallatin

7 years agoUpgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62
davidcs [Fri, 30 Sep 2016 19:21:02 +0000 (19:21 +0000)]
Upgrade Firmware/Bootloader/ResetSeq/Minidump to revision 5.4.62

MFC after:5 days

7 years agoRevert r306516 for now, it is incomplete on i386
cem [Fri, 30 Sep 2016 18:58:50 +0000 (18:58 +0000)]
Revert r306516 for now, it is incomplete on i386

Noted by: kib

7 years agonet80211: do not cancel scan when packet is sent.
avos [Fri, 30 Sep 2016 18:43:39 +0000 (18:43 +0000)]
net80211: do not cancel scan when packet is sent.

Restore pre-r300383 behavior when a frame is sent:
- stop scan;
- send frame;
- when beacon arrives and our bit in TIM is not set - restart the scan.

NOTE:
Ideally, this should introduce new interface (ieee80211_pause_anyscan());
however, since ieee80211_cancel_anyscan() is not used by drivers and only
called by ieee80211_start_pkt() the current patch overrides it's behavior
instead.

Tested with Intel 3945BG, STA mode

Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7979

7 years agoAdd myself to the list & note who is my mentor.
sevan [Fri, 30 Sep 2016 18:36:23 +0000 (18:36 +0000)]
Add myself to the list & note who is my mentor.

Approved by: bcr (mentor)

7 years agoReduce the cost of TLB invalidation on x86 by using per-CPU completion flags
cem [Fri, 30 Sep 2016 18:12:16 +0000 (18:12 +0000)]
Reduce the cost of TLB invalidation on x86 by using per-CPU completion flags

Reduce contention during TLB invalidation operations by using a per-CPU
completion flag, rather than a single atomically-updated variable.

On a Westmere system (2 sockets x 4 cores x 1 threads), dtrace measurements
show that smp_tlb_shootdown is about 50% faster with this patch; observations
with VTune show that the percentage of time spent in invlrng_single_page on an
interrupt (actually doing invalidation, rather than synchronization) increases
from 31% with the old mechanism to 71% with the new one.  (Running a basic file
server workload.)

Submitted by: Anton Rang <rang at acm.org>
Reviewed by: cem (earlier version), kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8041

7 years agoRevert commit
davidcs [Fri, 30 Sep 2016 18:08:16 +0000 (18:08 +0000)]
Revert commit
r306284 - Fixes for issues under high workloads

Will fix and recommit patch

7 years agoCompute two new metrics. Disk load, the average number of transactions
imp [Fri, 30 Sep 2016 17:49:04 +0000 (17:49 +0000)]
Compute two new metrics. Disk load, the average number of transactions
we have queued up normaliazed to the queue size. Also compute buckets
of latency to help compute, in userland, estimates of Median, P90, P95
and P99 values.

Sponsored by: Netflix, Inc

7 years agoRemove the GLOBAL queue lock which just adds unnecessary complexity to code
loos [Fri, 30 Sep 2016 17:30:39 +0000 (17:30 +0000)]
Remove the GLOBAL queue lock which just adds unnecessary complexity to code
(when used together with the individual tx and rx locks).

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agovfs: batch free vnodes in per-mnt lists
mjg [Fri, 30 Sep 2016 17:27:17 +0000 (17:27 +0000)]
vfs: batch free vnodes in per-mnt lists

Previously free vnodes would always by directly returned to the global
LRU list. With this change up to mnt_free_list_batch vnodes are collected
first.

syncer runs always return the batch regardless of its size.

While vnodes on per-mnt lists are not counted as free, they can be
returned in case of vnode shortage.

Reviewed by: kib
Tested by: pho

7 years agoFix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
loos [Fri, 30 Sep 2016 17:19:43 +0000 (17:19 +0000)]
Fix a typo in CPSW_DEBUG MACRO and then replace all the CPSWP_DEBUG() calls
with CPSW_DEBUG().

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoSort and remove unnecessary includes.
loos [Fri, 30 Sep 2016 17:16:02 +0000 (17:16 +0000)]
Sort and remove unnecessary includes.

No functional changes.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agovfs: remove the __bo_vnode field from struct vnode
mjg [Fri, 30 Sep 2016 17:11:03 +0000 (17:11 +0000)]
vfs: remove the __bo_vnode field from struct vnode

The pointer can be obtained using __containerof instead.

Reviewed by: kib

7 years agoFix blacklistd's state restoral at startup
lidl [Fri, 30 Sep 2016 16:35:30 +0000 (16:35 +0000)]
Fix blacklistd's state restoral at startup

The blacklistd daemon attempted to restore the filtering rules
before the database of blocked addresses was opened, so no rules
were being reloaded.  Now the rules are properly recreated when the
daemon is started with '-r'.

This bug was fixed locally, and then sent upstream to NetBSD.
This changeset is the import the NetBSD version of the change,
which added debugging output to alert about a null database.

Reviewed by: emaste
Obtained from: NetBSD
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoUpdate blacklistd.8 with changes from NetBSD
lidl [Fri, 30 Sep 2016 16:31:12 +0000 (16:31 +0000)]
Update blacklistd.8 with changes from NetBSD

Obtained from: NetBSD
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8079

7 years agoReword the statement.
kib [Fri, 30 Sep 2016 16:02:25 +0000 (16:02 +0000)]
Reword the statement.

Submitted by: wblock
MFC after: 3 days

7 years agoAdd an article.
kib [Fri, 30 Sep 2016 15:47:13 +0000 (15:47 +0000)]
Add an article.

Submitted by: wblock
MFC after: 3 days

7 years agoFix a cluster of bugs in list EFI environment variables:
imp [Fri, 30 Sep 2016 15:41:12 +0000 (15:41 +0000)]
Fix a cluster of bugs in list EFI environment variables:
1. Size returned for variable name is in bytes, not CHAR16 (the
   UEFI standard is unclear on this, where it is clear on the size of
   the variable).
2. Dynamically allocate the buffers so we can grow them if someone
   defines a super-long variable name.

These two fixes allow me to examine all the variables in my BIOS and
also removes the repeated printing of variables.

7 years agoRevert an accedintal commit.
andrew [Fri, 30 Sep 2016 14:00:23 +0000 (14:00 +0000)]
Revert an accedintal commit.

7 years agoprimes: trivially capsicumize
emaste [Fri, 30 Sep 2016 13:50:59 +0000 (13:50 +0000)]
primes: trivially capsicumize

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7982

7 years agoFix the spelling of Cortex.
andrew [Fri, 30 Sep 2016 13:47:52 +0000 (13:47 +0000)]
Fix the spelling of Cortex.

7 years agoxen/vchan: change license of header from Lesser GPL v2.1 to BSD
royger [Fri, 30 Sep 2016 13:41:24 +0000 (13:41 +0000)]
xen/vchan: change license of header from Lesser GPL v2.1 to BSD

This is a license change only commit, which can be found upstream in the Xen
tree as 937324f032f4f77866e80e39de0d697fa5131df1.

Sponsored by: Citrix Systems R&D

7 years agoral (rt2860): eliminate duplicate ieee80211_process_callback() call
avos [Fri, 30 Sep 2016 13:37:50 +0000 (13:37 +0000)]
ral (rt2860): eliminate duplicate ieee80211_process_callback() call
(left after r287197)

MFC after: 1 week

7 years agocrunchgen: do not strip crunched binary (it will be done by install)
emaste [Fri, 30 Sep 2016 13:16:04 +0000 (13:16 +0000)]
crunchgen: do not strip crunched binary (it will be done by install)

Reviewed by: adrian, imp (earlier)
Differential Revision: https://reviews.freebsd.org/D2003

7 years agoReinstate Xr macros that were accidentally removed in a previous
des [Fri, 30 Sep 2016 13:05:32 +0000 (13:05 +0000)]
Reinstate Xr macros that were accidentally removed in a previous
commit.  Add some missing cross-references to the SEE ALSO section.
Bump date now that there are content changes.

MFC after: 1 week

7 years agoMinor markup and wording fixes.
des [Fri, 30 Sep 2016 13:04:18 +0000 (13:04 +0000)]
Minor markup and wording fixes.

MFC after: 1 week

7 years agoAfter perusal of the documentation and some experimentation, I found a
des [Fri, 30 Sep 2016 11:05:29 +0000 (11:05 +0000)]
After perusal of the documentation and some experimentation, I found a
version that works with both groff and mandoc.

Hat tip to: kib
MFC after: 1 week

7 years agoAdd support for RPI2 to the armv6 GENERIC kernel.
manu [Fri, 30 Sep 2016 10:46:27 +0000 (10:46 +0000)]
Add support for RPI2 to the armv6 GENERIC kernel.

7 years agoRemove the duplicate ukbd device from the armv6 GENERIC
andrew [Fri, 30 Sep 2016 10:22:50 +0000 (10:22 +0000)]
Remove the duplicate ukbd device from the armv6 GENERIC

Sponsored by: ABT Systems Ltd

7 years agoRPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC.
manu [Fri, 30 Sep 2016 10:21:04 +0000 (10:21 +0000)]
RPI2: Add support for MULTIDELAY, this is needed for inclusion into GENERIC.

7 years agoAdd support for Tegra to the armv6 GENERIC kernel.
andrew [Fri, 30 Sep 2016 10:20:53 +0000 (10:20 +0000)]
Add support for Tegra to the armv6 GENERIC kernel.

Reviewed by: imp, mmel
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D8084

7 years agobcm2835_cpufreq: Only attach driver if we correcly match on the machine
manu [Fri, 30 Sep 2016 10:00:57 +0000 (10:00 +0000)]
bcm2835_cpufreq: Only attach driver if we correcly match on the machine
compatible string.

7 years agoFormat the table correctly, using cell separators instead of relying
des [Fri, 30 Sep 2016 09:23:29 +0000 (09:23 +0000)]
Format the table correctly, using cell separators instead of relying
on *roff or mandoc to guess where one cell ends and the next begins.

MFC after: 1 week

7 years agoMove the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
hselasky [Fri, 30 Sep 2016 08:23:06 +0000 (08:23 +0000)]
Move the ConnectX-3 and ConnectX-2 driver from sys/ofed into sys/dev/mlx4
like other PCI network drivers. The sys/ofed directory is now mainly
reserved for generic infiniband code, with exception of the mthca driver.

- Add new manual page, mlx4en(4), describing how to configure and load
mlx4en.

- All relevant driver C-files are now prefixed mlx4, mlx4_en and
mlx4_ib respectivly to avoid object filename collisions when compiling
the kernel. This also fixes an issue with proper dependency file
generation for the C-files in question.

- Device mlxen is now device mlx4en and depends on device mlx4, see
mlx4en(4). Only the network device name remains unchanged.

- The mlx4 and mlx4en modules are now built by default on i386 and
amd64 targets. Only building the mlx4ib module depends on
WITH_OFED=YES .

Sponsored by: Mellanox Technologies

7 years agohyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status
sephe [Fri, 30 Sep 2016 06:58:45 +0000 (06:58 +0000)]
hyperv/hn: Add stubs for OFFLOAD_CURRENT_CONFIG and NETWORK_CHANGE status

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

7 years agohyperv/vmbus: Add missing vmbus_if.c to module build.
sephe [Fri, 30 Sep 2016 06:49:39 +0000 (06:49 +0000)]
hyperv/vmbus: Add missing vmbus_if.c to module build.

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

7 years agohyperv/hn: Fix detach and attach error handling.
sephe [Fri, 30 Sep 2016 06:30:16 +0000 (06:30 +0000)]
hyperv/hn: Fix detach and attach error handling.

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

7 years agohyperv/hn: If synthetic parts are detached, don't touch them.
sephe [Fri, 30 Sep 2016 06:21:00 +0000 (06:21 +0000)]
hyperv/hn: If synthetic parts are detached, don't touch them.

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

7 years agox86/ioapic: Fix destination cpu for Hyper-V
sephe [Fri, 30 Sep 2016 06:08:21 +0000 (06:08 +0000)]
x86/ioapic: Fix destination cpu for Hyper-V

On Hyper-V:
- Stick to the first cpu for all I/O APIC pins.
- And don't allow destination cpu changes.

Reviewed by: jhb
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7949

7 years agolinuxkpi: Fix PCI BAR lazy allocation support.
sephe [Fri, 30 Sep 2016 05:51:11 +0000 (05:51 +0000)]
linuxkpi: Fix PCI BAR lazy allocation support.

FreeBSD supports lazy allocation of PCI BAR, that is, when a device
driver's attach method is invoked, even if the device's PCI BAR
address wasn't initialized, the invocation of bus_alloc_resource_any()
(the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() ->
pci_reserve_map() -> pci_write_bar()) would allocate a proper address
for the PCI BAR and write this 'lazy allocated' address into the PCI
BAR.

This model works fine for native FreeBSD device drivers, but _not_ for
device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c
and ofed/drivers/net/mlx4/main.c.  Both of them use
pci_request_regions(), which doesn't work properly with the PCI BAR
lazy allocation, because pci_resource_type() -> _pci_get_rle() always
returns NULL, so pci_request_regions() doesn't have the opportunity to
invoke bus_alloc_resource_any().  We now use pci_find_bar() in
pci_resource_type(), which is able to locate all available PCI BARs
even if some of them will be lazy allocated.

Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8071

7 years agoALLWINNER: ahci_devclass is local variable, don't export it.
mmel [Fri, 30 Sep 2016 05:30:16 +0000 (05:30 +0000)]
ALLWINNER: ahci_devclass is local variable, don't export it.

7 years agoAdd new USB ID.
hselasky [Fri, 30 Sep 2016 05:28:11 +0000 (05:28 +0000)]
Add new USB ID.

While at it remove some whitespaces.

Submitted by: Jose Luis Duran <jlduran@gmail.com>
PR: 213110
MFC after: 1 week

7 years agoTEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
mmel [Fri, 30 Sep 2016 05:25:15 +0000 (05:25 +0000)]
TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
 - use DEFINE_CLASS_0() for driver classes
 - unify driver names
 - cleanup driver definitions and bindings

7 years agoReplace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN
gonzo [Fri, 30 Sep 2016 03:03:42 +0000 (03:03 +0000)]
Replace explicit TUNABLE_INT to sysctl with CTLFLAG_TUN

- Replace tunables-only hw.psm.synaptics_support, hw.psm.trackpoint_support,
    and hw.psm.elantech_support with respective sysctls declared with
    CTLFLAG_TUN. It simplifies checking them in userland, also makes them
    easier to get discovered by user
- Get rid of debug.psm.loglevel and hw.psm.tap_enabled TUNABLE_INT
    declaration by adding CTLFLAG_TUN to read/write sysctls that were
    already declared for these tunables.

Suggested by: jhb

7 years agoUse the cell-index property as the unit number if available.
jhibbits [Fri, 30 Sep 2016 02:48:40 +0000 (02:48 +0000)]
Use the cell-index property as the unit number if available.

Summary:
NXP/Freescale, among others, includes an optional cell-index property
on nodes to denote the SoC block number of the node.  This can be useful if, for
example, a node is disabled or nonexistent in the fdt, or the blocks are not
organized in address-sorted order.  For instance, on the P1022, DMA2 is located
at CCSR offset 0xC000, while DMA1 is located at 0x21000.

Reviewed By: jmcneill

Differential Revision: https://reviews.freebsd.org/D8054

7 years agocxgbe(4): Claim the T6 -DBG card.
np [Fri, 30 Sep 2016 00:16:54 +0000 (00:16 +0000)]
cxgbe(4): Claim the T6 -DBG card.

7 years agoThis adds a sysctl which allows you to disable the TCP hostcache. This is handy
hiren [Fri, 30 Sep 2016 00:10:57 +0000 (00:10 +0000)]
This adds a sysctl which allows you to disable the TCP hostcache. This is handy
during testing of network related changes where cached entries may pollute your
results, or during known congestion events where you don't want to unfairly
penalize hosts.

Prior to r232346 this would have meant you would break any connection with a sub
1500 MTU, as the hostcache was authoritative. All entries as they stand today
should simply be used to pre populate values for efficiency.

Submitted by: Jason Wolfe (j at nitrology dot com)
Reviewed by: rwatson, sbruno, rrs , bz (earlier version)
MFC after: 2 weeks
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D6198

7 years agoProvide kern.maxphys sysctl, which returns MAXPHYS. Naming matches NetBSD.
glebius [Thu, 29 Sep 2016 23:07:28 +0000 (23:07 +0000)]
Provide kern.maxphys sysctl, which returns MAXPHYS.  Naming matches NetBSD.

7 years agoAdd dtb module for Jetson-TK1 board
gonzo [Thu, 29 Sep 2016 22:01:09 +0000 (22:01 +0000)]
Add dtb module for Jetson-TK1 board

7 years agoFix bug introduced in r274300.
ae [Thu, 29 Sep 2016 19:57:37 +0000 (19:57 +0000)]
Fix bug introduced in r274300.

In icmp6_reflect() use original source address of erroneous packet as
destination address for source selection algorithm when original
destination address is not one of our own.

Reported by: Mark Kamichoff <prox at prolixium com>
Tested by: Mark Kamichoff <prox at prolixium com>
MFC after: 1 week

7 years agoProperly preserve ip_tos bits for IPv4 packets
lidl [Thu, 29 Sep 2016 19:45:24 +0000 (19:45 +0000)]
Properly preserve ip_tos bits for IPv4 packets

Restructure code slightly to save ip_tos bits earlier.  Fix the bug
where the ip_tos field is zeroed out before assigning to the iptos
variable. Restore the ip_tos and ip_ver fields only if they have
been zeroed during the pseudo-header checksum calculation.

Reviewed by: cem, gnn, hiren
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D8053

7 years agoUpgrade to Unbound 1.5.10.
des [Thu, 29 Sep 2016 18:24:29 +0000 (18:24 +0000)]
Upgrade to Unbound 1.5.10.

7 years agoAdd #ifdef _KERNEL around send_holes_without_birth_time sysctl.
mav [Thu, 29 Sep 2016 17:48:53 +0000 (17:48 +0000)]
Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.

Reported by: avg@

7 years agoUse SV_ABI_ERRNO to set the syscall return value. The Linuxulator will
andrew [Thu, 29 Sep 2016 17:13:17 +0000 (17:13 +0000)]
Use SV_ABI_ERRNO to set the syscall return value. The Linuxulator will
need this.

Submitted by: Grégory Soutadé <soutade@gmail.com>
Differential Revision: https://reviews.freebsd.org/D7976

7 years agoSet hardware stats flag to avoid double counting the number of incoming bytes.
hselasky [Thu, 29 Sep 2016 16:36:32 +0000 (16:36 +0000)]
Set hardware stats flag to avoid double counting the number of incoming bytes.

Found by: Ben RUBSON <ben.rubson@gmail.com>
Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoSet hardware stats flag to avoid double counting the number of incoming bytes.
hselasky [Thu, 29 Sep 2016 16:35:52 +0000 (16:35 +0000)]
Set hardware stats flag to avoid double counting the number of incoming bytes.

Found by: Ben RUBSON <ben.rubson@gmail.com>
Sponsored by: Mellanox Technologies
MFC after: 1 week

7 years agoAllow reading the following sysctl MIBs in capability mode:
allanjude [Thu, 29 Sep 2016 16:29:49 +0000 (16:29 +0000)]
Allow reading the following sysctl MIBs in capability mode:
kern.hostname, kern.domainname, and kern.hostuuid

This allows sandboxed applications to read these sysctls

Submitted by: cem (original version)
Reviewed by: cem, jonathan, rwatson (original version)
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D8015

7 years agoThe IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
hselasky [Thu, 29 Sep 2016 14:35:32 +0000 (14:35 +0000)]
The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX
are not bitmasks. Fix return value of pci_resource_flags() to reflect
this change.

MFC after: 1 week
Sponsored by: Mellanox Technologies

7 years agosysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS)
avos [Thu, 29 Sep 2016 14:14:39 +0000 (14:14 +0000)]
sysctl.9: add missing underscore (SYSCTL_HANDLERARGS -> SYSCTL_HANDLER_ARGS)

7 years agoRemove an extra etter.
eadler [Thu, 29 Sep 2016 14:01:06 +0000 (14:01 +0000)]
Remove an extra etter.

7 years agoRemove a a duplicated word.
eadler [Thu, 29 Sep 2016 13:59:14 +0000 (13:59 +0000)]
Remove a a duplicated word.

7 years agoTEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition...
mmel [Thu, 29 Sep 2016 13:54:09 +0000 (13:54 +0000)]
TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class definition static.

7 years agoSSP is broken on all mips.
imp [Thu, 29 Sep 2016 13:38:14 +0000 (13:38 +0000)]
SSP is broken on all mips.

7 years agoTEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r3064...
mmel [Thu, 29 Sep 2016 12:54:27 +0000 (12:54 +0000)]
TEGRA: Return back kern_clocksource.c into tegra config file. It was removed in r306444 by mistake.

7 years agoTEGRA: Don't include files already included by system or arch configs.
mmel [Thu, 29 Sep 2016 12:25:04 +0000 (12:25 +0000)]
TEGRA: Don't include files already included by system or arch configs.

7 years agoFix an issue with accept_filter introduced with r261242:
jch [Thu, 29 Sep 2016 11:18:48 +0000 (11:18 +0000)]
Fix an issue with accept_filter introduced with r261242:

As a side effect of r261242 when using accept_filter the
first call to soisconnected() is done earlier in tcp_input()
instead of tcp_do_segment() context.  Restore the expected behaviour.

Note:  This call to soisconnected() seems to be extraneous in all
cases (with or without accept_filter).  Will be addressed in a
separate commit.

PR: 212920
Reported by: Alexey
Tested by:              Alexey, jch
Sponsored by:           Verisign, Inc.
MFC after: 1 week

7 years agoTEGRA: Add support for MULTIDELAY option.
mmel [Thu, 29 Sep 2016 11:13:51 +0000 (11:13 +0000)]
TEGRA: Add support for MULTIDELAY option.

7 years agoWhile draining a timeout task prevent the taskqueue_enqueue_timeout()
hselasky [Thu, 29 Sep 2016 10:38:20 +0000 (10:38 +0000)]
While draining a timeout task prevent the taskqueue_enqueue_timeout()
function from restarting the timer.

Commonly taskqueue_enqueue_timeout() is called from within the task
function itself without any checks for teardown. Then it can happen
the timer stays active after the return of taskqueue_drain_timeout(),
because the timeout and task is drained separately.

This patch factors out the teardown flag into the timeout task itself,
allowing existing code to stay as-is instead of applying a teardown
flag to each and every of the timeout task consumers.

Add assert to taskqueue_drain_timeout() which prevents parallel
execution on the same timeout task.

Update manual page documenting the return value of
taskqueue_enqueue_timeout().

Differential Revision: https://reviews.freebsd.org/D8012
Reviewed by: kib, trasz
MFC after: 1 week

7 years agoFix conversion from C++ std::string into C const char *.
br [Thu, 29 Sep 2016 09:16:02 +0000 (09:16 +0000)]
Fix conversion from C++ std::string into C const char *.
This fixes operation on MIPS64EB with GCC 4.2.1.

Reviewed by: jmmv
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D7952

7 years agoRemove struct platform_data, it was never used.
andrew [Thu, 29 Sep 2016 08:49:12 +0000 (08:49 +0000)]
Remove struct platform_data, it was never used.

Sponsored by: ABT Systems Ltd

7 years agoRPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC.
manu [Thu, 29 Sep 2016 06:54:02 +0000 (06:54 +0000)]
RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC.

Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D8063

7 years agoRPI-B: Add support for MULTIDELAY
manu [Thu, 29 Sep 2016 06:49:59 +0000 (06:49 +0000)]
RPI-B: Add support for MULTIDELAY

100 cycles per us seems accurate enough, at least it's better than the 200 value
that was used before.

Reviewed by: andrew, imp
Differential Revision: https://reviews.freebsd.org/D8062

7 years agocallsign isn't required anymore
eadler [Thu, 29 Sep 2016 06:19:45 +0000 (06:19 +0000)]
callsign isn't required anymore

7 years agoRemove the compatibility macro if_addrlist.
kevlo [Thu, 29 Sep 2016 05:37:45 +0000 (05:37 +0000)]
Remove the compatibility macro if_addrlist.

Since if_addrlist is used only for ipfilter(4), add a macro if_addrlist
in ip_compat.h.

Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D8059

7 years agohyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30
sephe [Thu, 29 Sep 2016 05:13:58 +0000 (05:13 +0000)]
hyperv/hn: Don't set HASHVAL pktinfo for NDIS < 6.30

This unbreaks packet sending on WS2008R2.

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

7 years agohyperv/hn: Consolidate hn_init() and hn_stop()
sephe [Thu, 29 Sep 2016 05:01:20 +0000 (05:01 +0000)]
hyperv/hn: Consolidate hn_init() and hn_stop()

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

7 years agohyperv/hn: Move TX tasks' draining into hn_suspend().
sephe [Thu, 29 Sep 2016 04:53:21 +0000 (04:53 +0000)]
hyperv/hn: Move TX tasks' draining into hn_suspend().

This prepares to consolidate hn_stop() and netvsc_detach().

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

7 years agoAdd touchscreen support for the official 7" RPi touch display
gonzo [Thu, 29 Sep 2016 02:14:08 +0000 (02:14 +0000)]
Add touchscreen support for the official 7" RPi touch display

Technically touchscreen chip is FT5406 but all hardware
communication is performed by VideCore and only final results
are presented to ARM part through memory region shared between
VC and ARM.

evdev is used as userland interface. FT5406 supports up to
10 touchpoints, but for now driver emulates single touch device
because I do not have GUI bits to test this functionality.

Driver is not enabled in default config for RPI and RPI2

Tested with: evdev-dump, tslib

7 years agohyperv/storvsc: Fix the blkvsc disk attachment issues.
sephe [Thu, 29 Sep 2016 01:41:52 +0000 (01:41 +0000)]
hyperv/storvsc: Fix the blkvsc disk attachment issues.

- The original 'disengage' ATA controller model does not work properly
  for all possible disk configurations.  Use the newly added ATA disk
  veto eventhandler to fit into all possible disk configuration.
- If the 'invalid LUN' happens on blkvsc controllers, return
  CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under
  the blkvsc controllers.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Discussed with: mav
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7693

7 years agoMFV r306423: 7402 Create tunable to ignore hole_birth feature
mav [Thu, 29 Sep 2016 00:00:37 +0000 (00:00 +0000)]
MFV r306423: 7402 Create tunable to ignore hole_birth feature

Until we can resolve the numerous hole_birth bugs that have cropped up
recently, and come up with a way going forwards to protect users from
corruption, we should disable the hole_birth feature.  Using a tunable
allows those who are confident that their data is correct to continue to
take advantage of the feature.

Closes #188

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs...
mav [Wed, 28 Sep 2016 23:54:47 +0000 (23:54 +0000)]
MFV r306422: 7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs

dsl_dataset_space is looking at the ds_bp's fill count while
dmu_objset_write_ready() is concurrently modifying it. This fix adds an
rrwlock to protect the ds_bp.

Closes #180

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoportsnap: only move expected snapshot contents from snap/ to files/
emaste [Wed, 28 Sep 2016 21:22:51 +0000 (21:22 +0000)]
portsnap: only move expected snapshot contents from snap/ to files/

Previously it was possible to smuggle in addional files that would
be used by later portsnap runs. Now we only move those files expected
to be in the snapshot into files/ and require that there are no
unexpected files.

This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic
attacks against FreeBSD update components" anonymous gist.

Reported by: anonymous gist
Reviewed by: allanjude, delphij
MFC after: ASAP
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8052

7 years agolibm: simplify i387 subdir logic with make's :S substitution
emaste [Wed, 28 Sep 2016 17:44:03 +0000 (17:44 +0000)]
libm: simplify i387 subdir logic with make's :S substitution

7 years agolibm: fix some unused variable (rcsid) and dangling else warnings
emaste [Wed, 28 Sep 2016 14:48:34 +0000 (14:48 +0000)]
libm: fix some unused variable (rcsid) and dangling else warnings

s_{fabs,fmax,logb,scalb}{,f,l}.c may be built elsewhere with a higher
WARNS setting.

Reviewed by: ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8061

7 years agoUse SIGSEGV signal for memory protection failures from userspace on MIPS.
br [Wed, 28 Sep 2016 14:13:41 +0000 (14:13 +0000)]
Use SIGSEGV signal for memory protection failures from userspace on MIPS.
(same as ARMv8, RISC-V and other architectures do).
This makes mmap tests happy.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoRemove ifa_list, use ifa_link (structure field) instead.
kevlo [Wed, 28 Sep 2016 13:29:11 +0000 (13:29 +0000)]
Remove ifa_list, use ifa_link (structure field) instead.

While here, prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming
for the interface address list in sctp_bsd_addr.c

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D8051

7 years agoFill all the siginfo so we have si_value set as well.
br [Wed, 28 Sep 2016 12:23:46 +0000 (12:23 +0000)]
Fill all the siginfo so we have si_value set as well.
This fixes timer_create(2) tests.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5