]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

7 years agoUse right piece of code for FreeBSD.
br [Wed, 28 Sep 2016 08:45:42 +0000 (08:45 +0000)]
Use right piece of code for FreeBSD.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agocam/ata: Allow drivers to veto ATA disk attachment.
sephe [Wed, 28 Sep 2016 08:35:05 +0000 (08:35 +0000)]
cam/ata: Allow drivers to veto ATA disk attachment.

This eventhandler is mainly used by VMs, e.g. Hyper-V, whose disk
controllers share the disks with the simulated ATA 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 agoIncrease timeouts for geli tests. It takes 2-3x more time to proceed the
br [Wed, 28 Sep 2016 08:11:00 +0000 (08:11 +0000)]
Increase timeouts for geli tests. It takes 2-3x more time to proceed the
tests on MIPS64EB in QEMU.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agohyperv/hn: Flatten RX filter configuration.
sephe [Wed, 28 Sep 2016 05:12:09 +0000 (05:12 +0000)]
hyperv/hn: Flatten RX filter configuration.

This paves way for more fixes.

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

7 years agohyperv/hn: Reorder the comment a little bit.
sephe [Wed, 28 Sep 2016 05:01:53 +0000 (05:01 +0000)]
hyperv/hn: Reorder the comment a little bit.

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

7 years agohyperv/hn: Reorganize the synthetic parts detach.
sephe [Wed, 28 Sep 2016 04:45:00 +0000 (04:45 +0000)]
hyperv/hn: Reorganize the synthetic parts detach.

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

7 years agohyperv/hn: Suspend and resume the backend properly upon MTU change.
sephe [Wed, 28 Sep 2016 04:34:21 +0000 (04:34 +0000)]
hyperv/hn: Suspend and resume the backend properly upon MTU change.

Suspend:
- Prevent the backend from being touched on TX path.
- Clear the RNDIS RX filter, and wait for RX to drain.
- Make sure that NVS see the chimney sending buffer and RXBUF
  disconnection, before unlink these buffers from the channel.

Resume:
- Reconfigure the RNDIS filter.
- Allow TX path to work on the backend.
- Kick start the TX eof task, in case the OACTIVE is set.

This fixes various panics, when the interface has traffic and MTU
is being changed.

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

7 years agohyperv/vmbus: Add function to drain channel interrupt task.
sephe [Wed, 28 Sep 2016 04:25:25 +0000 (04:25 +0000)]
hyperv/vmbus: Add function to drain channel interrupt task.

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

7 years agoFix a typo.
loos [Wed, 28 Sep 2016 04:22:06 +0000 (04:22 +0000)]
Fix a typo.

Pointy hat to: loos

7 years agohyperv/vmbus: Add functions to test RX/TX bufring emptiness
sephe [Wed, 28 Sep 2016 04:08:20 +0000 (04:08 +0000)]
hyperv/vmbus: Add functions to test RX/TX bufring emptiness

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

7 years agoimport unbound 1.5.10
des [Tue, 27 Sep 2016 21:11:07 +0000 (21:11 +0000)]
import unbound 1.5.10

7 years agoloader command interpreter should reset command_errmsg
tsoome [Tue, 27 Sep 2016 20:40:44 +0000 (20:40 +0000)]
loader command interpreter should reset command_errmsg

The command interpreter does leave command_errmsg as is after printing its
content, assuming the next command will reset it in bf_command(). However,
in case the forth native word is defined as builtin, the bf_command is not
used and forth words will also end up the command_errmsg content printed.

Since command_errmsg is pointer to actual error message, which can be static
read only string, we can not just set *command_errmsg = '\0', instead we need
to reset the pointer itself.

Illumos issue: https://www.illumos.org/issues/7405

Reported by: Igor Kozhukhov.
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D8032

7 years agolibcompiler_rt: move file list to Makefile.inc for reuse elsewhere
emaste [Tue, 27 Sep 2016 18:55:45 +0000 (18:55 +0000)]
libcompiler_rt: move file list to Makefile.inc for reuse elsewhere

Also switch to the style used in the clang390-import branch to reduce
future conflicts.

Reviewed by: dim
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8039

7 years agoAdd a sysctl to control the interrupt pacing on AM335x integrated switch.
loos [Tue, 27 Sep 2016 18:19:29 +0000 (18:19 +0000)]
Add a sysctl to control the interrupt pacing on AM335x integrated switch.

The hardware can be set to limit the number of interrupts from 2 to 63
interrupts per ms.

To keep the compatibility with the TI documentation the sysctl take the
interval between the interrupts pulses: 16~500 us.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoAdd a WITHOUT_DIALOG src.conf(5) knob
emaste [Tue, 27 Sep 2016 18:08:38 +0000 (18:08 +0000)]
Add a WITHOUT_DIALOG src.conf(5) knob

It also turns off dependencies (bsdinstall, bsdconfig, dpv, tzsetup).

Reviewed by: dteske
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7969

7 years agoIndicate that this is a locally administered MAC address.
araujo [Tue, 27 Sep 2016 17:37:23 +0000 (17:37 +0000)]
Indicate that this is a locally administered MAC address.

Submitted by: lidl
Differential Revision: https://reviews.freebsd.org/D7903

7 years agoAllow up to 6 arguments only on MIPS.
br [Tue, 27 Sep 2016 13:46:00 +0000 (13:46 +0000)]
Allow up to 6 arguments only on MIPS.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoEditing fixes for r306257, documentation for trapcap.
kib [Tue, 27 Sep 2016 11:31:53 +0000 (11:31 +0000)]
Editing fixes for r306257, documentation for trapcap.

Suggested by: wblock
Discussed with: jilles
Reviewed by: cem (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D8023

7 years agoMark SSP broken on MIPS.
br [Tue, 27 Sep 2016 09:44:30 +0000 (09:44 +0000)]
Mark SSP broken on MIPS.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years ago- Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
kevlo [Tue, 27 Sep 2016 08:47:02 +0000 (08:47 +0000)]
- Prefer if_addrhead (FreeBSD) to if_addrlist (BSD compat) naming for the
  interface address list
- Update IFF_RENAMING macro descriptions

7 years agoRemove a comment about the size of the ifnet structure.
kevlo [Tue, 27 Sep 2016 08:11:09 +0000 (08:11 +0000)]
Remove a comment about the size of the ifnet structure.

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

7 years agohyperv/vmbus: Add dynamic device add and remove support
sephe [Tue, 27 Sep 2016 06:30:24 +0000 (06:30 +0000)]
hyperv/vmbus: Add dynamic device add and remove support

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

7 years agopci: Clear the MEM/PORT_EN bit when updating PCI BAR
sephe [Tue, 27 Sep 2016 06:00:10 +0000 (06:00 +0000)]
pci: Clear the MEM/PORT_EN bit when updating PCI BAR

It's unsafe to update the BAR when the related EN bit is set.

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

7 years agoAdd NXP/Freescale DIU driver for PowerPC SoCs
jhibbits [Tue, 27 Sep 2016 00:53:41 +0000 (00:53 +0000)]
Add NXP/Freescale DIU driver for PowerPC SoCs

Summary:
This enables some features of the DIU, using a static configuration,
specified either via a 'edid' property on the 'display' FDT node, or a
'video-mode' environment variable (bootarg).  'video-mode' was chosen because it
matches u-boot's naming, so it can be set with:

setenv bootargs video-mode=${video-mode}

at the u-boot CLI.

Mouse cursor is not supported currently, as a hardware cursor is not supported
by framebuffer VT yet.  Currently it only supports a 32bpp ARGB (actually BGRA)
format, and only a single composite plane, at up to 1280x1024.

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

7 years agoDocument hw.psm.elantech_support in psm(4)
gonzo [Mon, 26 Sep 2016 22:08:35 +0000 (22:08 +0000)]
Document hw.psm.elantech_support in psm(4)

PR:             205690
Submitted by:   Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:      1 week

7 years agoAdd Elantech trackpad to the list of known models
gonzo [Mon, 26 Sep 2016 22:07:45 +0000 (22:07 +0000)]
Add Elantech trackpad to the list of known models

PR:             205690
Submitted by:   Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after:      1 week

7 years agoAdd Elantech trackpad support
gonzo [Mon, 26 Sep 2016 22:06:19 +0000 (22:06 +0000)]
Add Elantech trackpad support

Elantech trackpads are found in some laptops like the Asus UX31E. They
are "synaptics compatible" but use a slightly different protocol.

Elantech hardware support is not enabled by default and just like
Synaptic or TrackPoint devices it should be enabled by setting
tunable, in this case hw.psm.elantech_support, to non-zero value

PR: 205690
Submitted by: Vladimir Kondratyev <wulf@cicgroup.ru>
MFC after: 1 week

7 years agoIncrease timeout from 300 (default) to 600 seconds.
br [Mon, 26 Sep 2016 20:13:33 +0000 (20:13 +0000)]
Increase timeout from 300 (default) to 600 seconds.
It takes 6-7 minutes to proceed the test on MIPS64EB.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoHandle TLB shootdown IPI during the EFI runtime calls, on SandyBridge
kib [Mon, 26 Sep 2016 17:25:25 +0000 (17:25 +0000)]
Handle TLB shootdown IPI during the EFI runtime calls, on SandyBridge
and IvyBridge machines, which support PCID but do not have INVPCID
instruction.

MFC after: 1 week

7 years agoFor machines which support PCID but not have INVPCID instruction,
kib [Mon, 26 Sep 2016 17:22:44 +0000 (17:22 +0000)]
For machines which support PCID but not have INVPCID instruction,
i.e. SandyBridge and IvyBridge, correct a race between pmap_activate()
and invltlb_pcid_handler().

Reported by and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 week