]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFV r298691:
delphij [Wed, 27 Apr 2016 07:46:38 +0000 (07:46 +0000)]
MFV r298691:

ntp 4.2.8p7.

Security: CVE-2016-1547, CVE-2016-1548, CVE-2016-1549, CVE-2016-1550
Security: CVE-2016-1551, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518
Security: CVE-2016-2519
Security: FreeBSD-SA-16:16.ntp
With hat: so

8 years agohyperv/hn: Add stat for # of chimney sending tries
sephe [Wed, 27 Apr 2016 06:49:16 +0000 (06:49 +0000)]
hyperv/hn: Add stat for # of chimney sending tries

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/vmbus: Mark sysctls MPSAFE
sephe [Wed, 27 Apr 2016 05:45:14 +0000 (05:45 +0000)]
hyperv/vmbus: Mark sysctls MPSAFE

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoVendor import of ntp-4.2.8p7.
delphij [Wed, 27 Apr 2016 05:37:54 +0000 (05:37 +0000)]
Vendor import of ntp-4.2.8p7.

8 years agohyperv/hn: Mark sysctls MPSAFE
sephe [Wed, 27 Apr 2016 05:18:04 +0000 (05:18 +0000)]
hyperv/hn: Mark sysctls MPSAFE

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Remove unapplied comment.
sephe [Wed, 27 Apr 2016 05:05:54 +0000 (05:05 +0000)]
hyperv/hn: Remove unapplied comment.

Chimney sending buffers are shared across channels.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Restart sending earlier once we gathered some free TX descs
sephe [Wed, 27 Apr 2016 04:51:28 +0000 (04:51 +0000)]
hyperv/hn: Restart sending earlier once we gathered some free TX descs

This greatly reduces the oqdrops under heavy workload.

For TCP send/recv test (10K concurrent connections):
oqdrops is reduced by 17% on sending side, and 57% on receiving side.

For nginx-1.8/wrk-4 1KB object test (10K concurrent connections,
4 requests/connection):
oqdrops is reduced by 44% on nginx side, and 10% on wrk side.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoFor pointers use NULL instead of 0.
araujo [Wed, 27 Apr 2016 03:06:53 +0000 (03:06 +0000)]
For pointers use NULL instead of 0.

Reviewed by: rpaulo
MFC after: 2 weeks.
Differential Revision: https://reviews.freebsd.org/D5946

8 years agoUse MIN() macro from sys/param.h.
araujo [Wed, 27 Apr 2016 02:44:10 +0000 (02:44 +0000)]
Use MIN() macro from sys/param.h.

MFC after: 2 weeks.

8 years agoUse MIN() macro from sys/param.h.
araujo [Wed, 27 Apr 2016 02:34:25 +0000 (02:34 +0000)]
Use MIN() macro from sys/param.h.

MFC after: 2 weeks.

8 years agoUse macro MIN() from sys/param.h.
araujo [Wed, 27 Apr 2016 02:26:31 +0000 (02:26 +0000)]
Use macro MIN() from sys/param.h.

MFC after: 2 weeks.

8 years agoDelay revmoing the last jail reference in prison_proc_free, and instead
jamie [Wed, 27 Apr 2016 02:25:21 +0000 (02:25 +0000)]
Delay revmoing the last jail reference in prison_proc_free, and instead
put it off into the pr_task.  This is similar to prison_free, and in fact
uses the same task even though they do something slightly different.

This resolves a LOR between the process lock and allprison_lock, which
came about in r298565.

PR: 48471

8 years agoUse MIN() macro from sys/param.h.
araujo [Wed, 27 Apr 2016 02:13:57 +0000 (02:13 +0000)]
Use MIN() macro from sys/param.h.

MFC after: 2 weeks.

8 years agoUse macro MIN() from sys/param.h.
araujo [Wed, 27 Apr 2016 02:02:44 +0000 (02:02 +0000)]
Use macro MIN() from sys/param.h.

MFC after: 2 weeks.

8 years agofsck_ffs: Revert partially the unsigned changes.
pfg [Wed, 27 Apr 2016 01:36:25 +0000 (01:36 +0000)]
fsck_ffs: Revert partially the unsigned changes.

Any value of uint16_t will be internally promoted to int so
changing them to an unsigned value doesn't help.

Missing revert value in suj_read().

X-MFC with: r298551

8 years agofsck_ffs: Revert partially the unsigned changes.
pfg [Wed, 27 Apr 2016 01:32:11 +0000 (01:32 +0000)]
fsck_ffs: Revert partially the unsigned changes.

Any value of uint16_t will be internally promoted to int so
changing them to an unsigned value doesn't help.

Make clear we want to use uint32_t for closedisk()

X-MFC with: r298551

8 years agoposix4_mib: Don't overrun facility_initialized array
cem [Wed, 27 Apr 2016 00:10:32 +0000 (00:10 +0000)]
posix4_mib: Don't overrun facility_initialized array

The facility_initialized and facility arrays are the same size and were
intended to be indexed the same.  I believe this mismatch was just a
typo/braino in r208731.

Reported by: Coverity
CID: 1017430
Sponsored by: EMC / Isilon Storage Division

8 years agosubr_mbpool: Don't free bogus pointer in error paths
cem [Tue, 26 Apr 2016 23:58:55 +0000 (23:58 +0000)]
subr_mbpool: Don't free bogus pointer in error paths

An mbpool is allocated with a contiguous array of mbpages.  Freeing an
individual mbpage has never been valid.  Don't do it.

This bug has been present since this code was introduced in r117624 (2003).

Reported by: Coverity
CID: 1009687
Sponsored by: EMC / Isilon Storage Division

8 years agonetipsec: Don't leak memory when deep copy fails
cem [Tue, 26 Apr 2016 23:23:44 +0000 (23:23 +0000)]
netipsec: Don't leak memory when deep copy fails

Reported by: Coverity
CID: 1331693
Sponsored by: EMC / Isilon Storage Division

8 years agoin_lltable_alloc and in6 copy: Don't leak LLE in error path
cem [Tue, 26 Apr 2016 23:13:48 +0000 (23:13 +0000)]
in_lltable_alloc and in6 copy: Don't leak LLE in error path

Fix a memory leak in error conditions introduced in r292978.

Reported by: Coverity
CIDs: 13470091347010
Sponsored by: EMC / Isilon Storage Division

8 years agoRefactor DTS files for Zynq-based SoCs
gonzo [Tue, 26 Apr 2016 23:09:47 +0000 (23:09 +0000)]
Refactor DTS files for Zynq-based SoCs

- Factor out common part to zynq-7000.dtsi
- Fix problem with Zynq interrupts by using interrupt "triples"
    in .dtsi file to differentiate between edge-triggered and
    level-triggered interrupts
- cgem driver now recognizes "status" property

Submitted by: Thomas Skibo <thomasskibo@yahoo.com>
Differential Revision: https://reviews.freebsd.org/D6095

8 years agotcp_usrreq: Free allocated buffer in relock case
cem [Tue, 26 Apr 2016 23:02:18 +0000 (23:02 +0000)]
tcp_usrreq: Free allocated buffer in relock case

The disgusting macro INP_WLOCK_RECHECK may early-return.  In
tcp_default_ctloutput() the TCP_CCALGOOPT case allocates memory before invoking
this macro, which may leak memory.

Add a _CLEANUP variant that takes a code argument to perform variable cleanup
in the early return path.  Use it to free the 'pbuf' allocated in
tcp_default_ctloutput().

I am not especially happy with this macro, but I reckon it's not any worse than
INP_WLOCK_RECHECK already was.

Reported by: Coverity
CID: 1350286
Sponsored by: EMC / Isilon Storage Division

8 years agog_part_bsd64: Delete duplicate/dead code
cem [Tue, 26 Apr 2016 22:32:33 +0000 (22:32 +0000)]
g_part_bsd64: Delete duplicate/dead code

RAW_PART is handled earlier in the loop.

Reported by: Coverity
CID: 1223201
Sponsored by: EMC / Isilon Storage Division

8 years agog_part_bsd64: Check for valid on-disk npartitions value
cem [Tue, 26 Apr 2016 22:30:54 +0000 (22:30 +0000)]
g_part_bsd64: Check for valid on-disk npartitions value

This value is u32 on disk, but assigned to an int in memory.  After we do the
implicit conversion via assignment, check that the result is at least one[1]
(non-negative[2]).

1. The subsequent for-loop iterates from gpt_entries minus one, down, until
   reaching zero.  A negative or zero initial index results in undefined signed
   integer overflow.
2. It is also used to index into arrays later.

In practice, we expected non-malicious disks to contain small positive values.

Reported by: Coverity
CID: 1223202
Sponsored by: EMC / Isilon Storage Division

8 years agociss(4): Fix overrun of array
cem [Tue, 26 Apr 2016 22:01:07 +0000 (22:01 +0000)]
ciss(4): Fix overrun of array

The softc member 'ciss_logical' is an array of 'ciss_max_logical_bus' members.
Most of the time it is iterated correctly.  This patch fixes the two instances
where the driver iterated off the end of the array.

Reported by: Coverity
CID: 1305492
Sponsored by: EMC / Isilon Storage Division

8 years agoiscsi_initiator(4): Fix use-after-free, double-free
cem [Tue, 26 Apr 2016 21:44:08 +0000 (21:44 +0000)]
iscsi_initiator(4): Fix use-after-free, double-free

ism_stop() already destroys and frees 'sp', including a call to ic_destroy().
Don't dereference 'sp' after ism_stop() and don't invoke ic_destroy() on the
freed memory either.

Reported by: Coverity
CIDs: 10061091304861
Sponsored by: EMC / Isilon Storage Division

8 years agoUse crcopysafe in jail_attach.
jamie [Tue, 26 Apr 2016 21:19:12 +0000 (21:19 +0000)]
Use crcopysafe in jail_attach.

8 years agoAdd dtb/zynq to the list of extra modules required by Zedboard
gonzo [Tue, 26 Apr 2016 21:11:52 +0000 (21:11 +0000)]
Add dtb/zynq to the list of extra modules required by Zedboard

8 years agoAdd dtb/zynq to generate dtb files for Zynq-based boards
gonzo [Tue, 26 Apr 2016 21:11:01 +0000 (21:11 +0000)]
Add dtb/zynq to generate dtb files for Zynq-based boards

It seems that the only way to supply dtb to loader on Zynq-based
SoCs is to manually generate dtb and place it to pre-defined location
on SD card or TFTP server where loader can pick it up.  More modern
approach is to add modules/dtb/%soc% module and let installworld
target generate dtb and copy them to /boot/dtb/ where they can be
loaded by ubldr

8 years agoaacraid(4): Fix some mostly trivial buffer overruns
cem [Tue, 26 Apr 2016 20:59:21 +0000 (20:59 +0000)]
aacraid(4): Fix some mostly trivial buffer overruns

strcpy(3) emits a trailing nul byte, trampling fields after the intended
destination.  Instead, use strncpy(3), intentionally leaving these fields
not nul-terminated.

Reported by: Coverity
CIDs: 1031024130546313054941305545
Sponsored by: EMC / Isilon Storage Division

8 years agomsdosfs: Prevent buffer overflow when expanding win95 names
kp [Tue, 26 Apr 2016 20:36:32 +0000 (20:36 +0000)]
msdosfs: Prevent buffer overflow when expanding win95 names

In win2unixfn() we expand Windows 95 style long names. In some cases that
requires moving the data in the nbp->nb_buf buffer backwards to make room. That
code failed to check for overflows, leading to a stack overflow in win2unixfn().

We now check for this event, and mark the entire conversion as failed in that
case. This means we present the 8 character, dos style, name instead.

PR: 204643
Differential Revision: https://reviews.freebsd.org/D6015

8 years agoradix_mpath: Don't derefence a NULL pointer in for loop iteration
cem [Tue, 26 Apr 2016 20:27:17 +0000 (20:27 +0000)]
radix_mpath: Don't derefence a NULL pointer in for loop iteration

It seems rn_dupedkey may be NULL, because of the NULL check inside the loop.
(Also, the rt gets assigned from rn_dupedkey and NULL checked at top of loop.)
However, the for-loop update condition happens before the top-of-loop check and
dereferences 'rt' unconditionally.

Instead, NULL-check before dereferencing.

If rn_dupedkey cannot in fact be NULL, or something else protects this, feel
free to revert this and add an ASSERT of some kind instead.

This was introduced in r191080 (2009) and moved around slightly in r293657.

Reported by: Coverity
CID: 1348482
Sponsored by: EMC / Isilon Storage Division

8 years agoPCI Enhanced Allocation: Annotate an intentional switch fallthrough
cem [Tue, 26 Apr 2016 20:06:35 +0000 (20:06 +0000)]
PCI Enhanced Allocation: Annotate an intentional switch fallthrough

This is a trivial follow-up to r296308.  Annotate the intentional fallthrough
to make it clear for future readers and linters.

Reported by: Coverity
CID: 1352716
Discussed with: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoosd(9): Change array pointer to array pointer type from void*
cem [Tue, 26 Apr 2016 19:57:35 +0000 (19:57 +0000)]
osd(9): Change array pointer to array pointer type from void*

This is a minor follow-up to r297422, prompted by a Coverity warning.  (It's
not a real defect, just a code smell.)  OSD slot array reservations are an
array of pointers (void **) but were cast to void* and back unnecessarily.
Keep the correct type from reservation to use.

osd.9 is updated to match, along with a few trivial igor fixes.

Reported by: Coverity
CID: 1353811
Sponsored by: EMC / Isilon Storage Division

8 years agoFix up r298368
ngie [Tue, 26 Apr 2016 19:21:35 +0000 (19:21 +0000)]
Fix up r298368

Remove the semicolon accidentally added after the new conditional that tests
that /dev/zero is opened successfully.

MFC after: 1 week
X-MFC with: r298368
Pointhat to: ngie
Reported by: Coverity
CID: 1354980
Sponsored by: EMC / Isilon Storage Division

8 years agoiwm(4): Don't dereference potentially NULL pointer before NULL check
cem [Tue, 26 Apr 2016 19:06:28 +0000 (19:06 +0000)]
iwm(4): Don't dereference potentially NULL pointer before NULL check

Introduced in r298594.  There is no path before the 'vap == NULL' check where
vap is not already dereferenced.

Reported by: Coverity
CID: 1354979
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove redundant word.
bhd [Tue, 26 Apr 2016 18:54:44 +0000 (18:54 +0000)]
Remove redundant word.

Reviewed by:  bjk, bcr
Differential Revision: https://reviews.freebsd.org/D6064

8 years agoemu10kx: Don't iterate beyond array bounds
cem [Tue, 26 Apr 2016 18:20:41 +0000 (18:20 +0000)]
emu10kx: Don't iterate beyond array bounds

Reported by: Coverity
CID: 1354978
Sponsored by: EMC / Isilon Storage Division

8 years agoRedo the changes to the SYSV IPC sysctl functions from r298585, so they
jamie [Tue, 26 Apr 2016 18:17:44 +0000 (18:17 +0000)]
Redo the changes to the SYSV IPC sysctl functions from r298585, so they
don't (mis)use sbufs.

PR: 48471

8 years agokgssapi: Don't leak memory in error cases
cem [Tue, 26 Apr 2016 18:11:45 +0000 (18:11 +0000)]
kgssapi: Don't leak memory in error cases

Reported by: Coverity
CIDs: 100704610070471007048
Sponsored by: EMC / Isilon Storage Division

8 years agoWITH_META_MODE: Allow buildkernel to create .meta files with curdir==objdir.
bdrewery [Tue, 26 Apr 2016 18:08:51 +0000 (18:08 +0000)]
WITH_META_MODE: Allow buildkernel to create .meta files with curdir==objdir.

Without this the incremental build was broken since .depend.* are not
generated with .MAKE.MODE=meta and .meta files were not created to
track dependencies.  Typically meta mode does not create .meta files
when building with curdir==objdir but the kernel build is special.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years ago[mips] correctly represent memory region allocations >> 2^^31
adrian [Tue, 26 Apr 2016 16:40:04 +0000 (16:40 +0000)]
[mips] correctly represent memory region allocations >> 2^^31

Without this, it'd get promoted incorrectly and fail allocation.

Submitted by: Mori Hiroki <yamori813@yahoo.co.jp>
Reviewed by: imp

8 years agoFix the parameter type according to method declaration.
br [Tue, 26 Apr 2016 16:02:13 +0000 (16:02 +0000)]
Fix the parameter type according to method declaration.
This fixes compilation on riscv with GCC 5.2.0

8 years agoBuild fix. Add howmany() and nitems() macros to bootloader kernel shim.
hselasky [Tue, 26 Apr 2016 15:41:31 +0000 (15:41 +0000)]
Build fix. Add howmany() and nitems() macros to bootloader kernel shim.

8 years agosys: extend use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 15:38:17 +0000 (15:38 +0000)]
sys: extend use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoMark the unused period argument __unused.
bz [Tue, 26 Apr 2016 15:34:00 +0000 (15:34 +0000)]
Mark the unused period argument __unused.

Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: DARPA/AFRL

8 years agoAdd function needed for linking USB test application.
hselasky [Tue, 26 Apr 2016 15:33:53 +0000 (15:33 +0000)]
Add function needed for linking USB test application.

8 years agosys/dev: extend use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 15:03:15 +0000 (15:03 +0000)]
sys/dev: extend use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agosys/boot: make use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 14:51:58 +0000 (14:51 +0000)]
sys/boot: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoAdd GEOM::physpath documentation to devd.conf(5)
asomers [Tue, 26 Apr 2016 14:48:58 +0000 (14:48 +0000)]
Add GEOM::physpath documentation to devd.conf(5)

Suggested by: trasz
Reviewed by: trasz
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6063

8 years agosys/arm: make use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 14:47:52 +0000 (14:47 +0000)]
sys/arm: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agosys/powerpc: make use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 14:44:49 +0000 (14:44 +0000)]
sys/powerpc: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoRework the list of all pmaps: embed the list link into pmap.
br [Tue, 26 Apr 2016 14:38:18 +0000 (14:38 +0000)]
Rework the list of all pmaps: embed the list link into pmap.

8 years agoed(1): switch two statements so we check the index before dereferencing.
pfg [Tue, 26 Apr 2016 14:31:48 +0000 (14:31 +0000)]
ed(1): switch two statements so we check the index before dereferencing.

This is related to r270256 but was missed in that occasion.

MFC after: 3 days

8 years agoDisable ACPI on arm64 ad it has only had minimal testing and is causing
andrew [Tue, 26 Apr 2016 14:21:39 +0000 (14:21 +0000)]
Disable ACPI on arm64 ad it has only had minimal testing and is causing
boot issues when booting with FDT. It is planned to re-enable this at a
later date.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoo Add device tree files and kernel configuration files
br [Tue, 26 Apr 2016 13:22:08 +0000 (13:22 +0000)]
o Add device tree files and kernel configuration files
  for RISC-V cpus synthesized on FPGA hardware.
o Include new files to the build.

8 years agoStop including machine/fdt.h from the fdt uart code, it's unneeded.
andrew [Tue, 26 Apr 2016 13:16:45 +0000 (13:16 +0000)]
Stop including machine/fdt.h from the fdt uart code, it's unneeded.

Sponsored by: ABT Systems Ltd

8 years agoAdd the non-standard "IO interrupt" vector used by lowRISC.
br [Tue, 26 Apr 2016 12:56:44 +0000 (12:56 +0000)]
Add the non-standard "IO interrupt" vector used by lowRISC.
For now they provide UART irq only.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoAdd the implementation of basic bus_space_read/write functions.
br [Tue, 26 Apr 2016 12:45:01 +0000 (12:45 +0000)]
Add the implementation of basic bus_space_read/write functions.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoFix calculation of LCD CH1 SCLK1 output frequency when SCLK2 /2 is used
jmcneill [Tue, 26 Apr 2016 12:36:12 +0000 (12:36 +0000)]
Fix calculation of LCD CH1 SCLK1 output frequency when SCLK2 /2 is used
as source.

PR: 208680
Reported by: David Binderman <dcb314@hotmail.com>

8 years agoAdd the implementation of OF_decode_addr().
br [Tue, 26 Apr 2016 12:33:25 +0000 (12:33 +0000)]
Add the implementation of OF_decode_addr().

8 years agoDo not include fdt.h on RISC-V.
br [Tue, 26 Apr 2016 12:31:23 +0000 (12:31 +0000)]
Do not include fdt.h on RISC-V.

8 years agoAdd support for RISC-V.
br [Tue, 26 Apr 2016 12:29:47 +0000 (12:29 +0000)]
Add support for RISC-V.

8 years agoAdd support for 8-bit eMMC.
jmcneill [Tue, 26 Apr 2016 12:02:36 +0000 (12:02 +0000)]
Add support for 8-bit eMMC.

Set MMC_CAP_4_BIT_DATA and MMC_CAP_8_BIT_DATA based on the "bus-width"
DT property and reduce maximum bus frequency from 52MHz to 50MHz to match
the capabilities of the clock provider.

Tested on a BananaPi BPI-M3 (A83T).

8 years agoMove arm's devmap to some generic place, so it can be used
br [Tue, 26 Apr 2016 11:53:37 +0000 (11:53 +0000)]
Move arm's devmap to some generic place, so it can be used
by other architectures.

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

8 years agoStop using sbrk in csh. This is a legacy interface and its use within csh
andrew [Tue, 26 Apr 2016 11:39:32 +0000 (11:39 +0000)]
Stop using sbrk in csh. This is a legacy interface and its use within csh
is invalid. It is used to find the size of allocated memory. As malloc may
allocate memory with mmap it will fail to take this memory into account.

Obtained from: brooks

8 years agoConvert A10 interrupt controller to INTRNG
manu [Tue, 26 Apr 2016 11:15:48 +0000 (11:15 +0000)]
Convert A10 interrupt controller to INTRNG

Reviewed by: skra
Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D5573

8 years agoRemove unportable calls to basename().
ed [Tue, 26 Apr 2016 10:04:06 +0000 (10:04 +0000)]
Remove unportable calls to basename().

The POSIX version of basename() doesn't use a 'const char *' argument;
the function may overwrite its input buffer. Instead of copying the
input string, let's just simplify this code by using our getprogname()
function that already returns the name of the application in the right
format.

Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D6094

8 years agohyperv/hn: Change description to "Hyper-V Network Interface"
sephe [Tue, 26 Apr 2016 06:50:41 +0000 (06:50 +0000)]
hyperv/hn: Change description to "Hyper-V Network Interface"

This is consistent w/ other Hyper-V devices.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoRelax TOC offsets checking somewhat, allowing offset pointing to
sobomax [Tue, 26 Apr 2016 06:50:38 +0000 (06:50 +0000)]
Relax TOC offsets checking somewhat, allowing offset pointing to
the next byte past EOF to denote zero-block(s) at the very end of
the file.

8 years agohyperv/stor: Set description properly in probe devmethod
sephe [Tue, 26 Apr 2016 06:41:36 +0000 (06:41 +0000)]
hyperv/stor: Set description properly in probe devmethod

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/channel: Git rid of the sub-channel creation callback
sephe [Tue, 26 Apr 2016 05:21:27 +0000 (05:21 +0000)]
hyperv/channel: Git rid of the sub-channel creation callback

It is no longer used.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Avoid sub-channel creation callback.
sephe [Tue, 26 Apr 2016 05:15:15 +0000 (05:15 +0000)]
hyperv/stor: Avoid sub-channel creation callback.

Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/hn: Avoid sub-channel creation callback.
sephe [Tue, 26 Apr 2016 05:08:55 +0000 (05:08 +0000)]
hyperv/hn: Avoid sub-channel creation callback.

Since the sub-channel offers are synchronized, we can do our own
channel setup without using the sub-channel creation callback.

This paves the way to whack the sub-channel creation callback.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Synchronize sub-channel offers
sephe [Tue, 26 Apr 2016 05:00:40 +0000 (05:00 +0000)]
hyperv/stor: Synchronize sub-channel offers

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv/stor: Remove the useless hs_open_multi_channel
sephe [Tue, 26 Apr 2016 04:48:57 +0000 (04:48 +0000)]
hyperv/stor: Remove the useless hs_open_multi_channel

This fixes the sub-channel offer race after Hyper-V device probe/attach
is moved to vmbus SYSINIT/attach.

MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years ago[iwm] implement suspend/resume through ieee80211_{suspend,resume}_all
adrian [Tue, 26 Apr 2016 04:40:59 +0000 (04:40 +0000)]
[iwm] implement suspend/resume through ieee80211_{suspend,resume}_all

This allows wifi to associate correctly after a suspend/resume cycle.

Yes, I'm using this now day to day.

Tested:

* Intel 7260AC, STA mode

8 years ago[iwm] add extra transmit setup/completion logging so I can see what's going on.
adrian [Tue, 26 Apr 2016 03:24:28 +0000 (03:24 +0000)]
[iwm] add extra transmit setup/completion logging so I can see what's going on.

I'm seeing 5GHz association work but data not work until the rate drops,
so I need way more information about what's being programmed into the
transmit descriptors.

Tested:

* 7260AC, STA mode

8 years agoddb: Make use of our roundup() macro when available.
pfg [Tue, 26 Apr 2016 01:52:35 +0000 (01:52 +0000)]
ddb: Make use of our roundup() macro when available.

8 years agoext2fs: make use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 01:41:15 +0000 (01:41 +0000)]
ext2fs: make use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

MFC after: 2 weeks

8 years ago[ath] add LDPC capability support and LDPC RX support.
adrian [Tue, 26 Apr 2016 01:37:03 +0000 (01:37 +0000)]
[ath] add LDPC capability support and LDPC RX support.

This enables LDPC receive support for the AR9300 chips that support it.
It'll announce LDPC support via net80211.

Tested:

* AR9380, STA mode
* AR9331, (to verify the HAL didn't attach it to a chip which
  doesn't support LDPC.)

TODO:

* Add in net80211 machinery to make this configurable at runtime.

8 years ago[ath] obey the STBC flag setting in iv_flags_ht
adrian [Tue, 26 Apr 2016 01:34:21 +0000 (01:34 +0000)]
[ath] obey the STBC flag setting in iv_flags_ht

Add support for the FHT_STBC_TX flag in iv_flags_ht, so it'll now obey
the per-vap ifconfig stbctx flag.

This means that we can do STBC TX on one vap and not another VAP.
(As well as STBC RX on said vap; that changes the HTCAP announcement.)

8 years ago[ifconfig] add STBC TX/RX configuration
adrian [Tue, 26 Apr 2016 01:30:29 +0000 (01:30 +0000)]
[ifconfig] add STBC TX/RX configuration

This adds the ability to view and configure the STBC parameter for
both transmit and receive.

Whilst here, fix a typo for AMSDU.

TODO:

* manpage update

8 years ago[net80211] add the STBC ioctl support.
adrian [Tue, 26 Apr 2016 01:29:26 +0000 (01:29 +0000)]
[net80211] add the STBC ioctl support.

This adds configurable STBC TX and RX support.

8 years ago[net80211] add STBC capability flags to iv_flags_ht.
adrian [Tue, 26 Apr 2016 01:29:03 +0000 (01:29 +0000)]
[net80211] add STBC capability flags to iv_flags_ht.

This is in preparation for exposing configuring STBC flags up to ifconfig
so STBC TX/RX can be configured at runtime.

* Set the FHT_STBC flags for TX/RX if the HT capabilitiex exist
* Clear the RX STBC HT capability flag when creating a HTCAP IE, so
  we only announce it if it's configured in the FHT flags.

Tested:

* AR9331 (carambola2), AP/STA modes

8 years ago[net80211] add an ioctl for LDPC configuration.
adrian [Tue, 26 Apr 2016 01:26:11 +0000 (01:26 +0000)]
[net80211] add an ioctl for LDPC configuration.

8 years agolibcuse: make more use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 01:20:16 +0000 (01:20 +0000)]
libcuse: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agolibstand: make more use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 01:19:36 +0000 (01:19 +0000)]
libstand: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agolibc: make more use of the howmany() macro when available.
pfg [Tue, 26 Apr 2016 01:17:05 +0000 (01:17 +0000)]
libc: make more use of the howmany() macro when available.

We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.

8 years agoUse MIN() instead of MAX() as the previous syntax was wrote in a weird and
araujo [Tue, 26 Apr 2016 00:29:00 +0000 (00:29 +0000)]
Use MIN() instead of MAX() as the previous syntax was wrote in a weird and
confused way: "prec > 9 ? 9 : prec".

Submitted by: pfg, ngie and luke <luke.tw@gmail.com>
MFC after: 2 weeks.

8 years agoFixes the comment to reflect the code.
loos [Mon, 25 Apr 2016 23:12:39 +0000 (23:12 +0000)]
Fixes the comment to reflect the code.

Sponsored by: Rubicon Communications (Netgate)

8 years agoFix the logic in r298585: shm_prison_cansee returns an errno, so is
jamie [Mon, 25 Apr 2016 22:30:10 +0000 (22:30 +0000)]
Fix the logic in r298585: shm_prison_cansee returns an errno, so is
the opposite of a boolean.

PR: 48471

8 years ago[iwm] restart the VAP if there's a firmware panic.
adrian [Mon, 25 Apr 2016 22:00:05 +0000 (22:00 +0000)]
[iwm] restart the VAP if there's a firmware panic.

Always print out the firmware panic info before restarting; don't
put it behind IWM_DEBUG.

Submitted by: bapt
Differential Revision: https://reviews.freebsd.org/D6081

8 years agodev/random: use our roundup() macro instead of re-implementing it.
pfg [Mon, 25 Apr 2016 21:14:32 +0000 (21:14 +0000)]
dev/random: use our roundup() macro instead of re-implementing it.

While here also use howmany() macro from sys/param.h
No functional change.

Reviewed by: markm (roundup replacement part)
Approved by: so

8 years agoRemove a variable and three lines of code which I should have removed as
gad [Mon, 25 Apr 2016 20:58:54 +0000 (20:58 +0000)]
Remove a variable and three lines of code which I should have removed as
part of revision 98776 back on June 24/2002.  Noticed by pfg@ trying
coccinelle for checking code.

MFC after: 3 weeks

8 years ago1. Removed -Wno-shift-negative-value from Makefile
davidcs [Mon, 25 Apr 2016 18:55:01 +0000 (18:55 +0000)]
1. Removed -Wno-shift-negative-value from Makefile
2. Fixed warning its absence caused in bxe_elink.c

MFC after:5 days

8 years agoIncrease DTRACE_FUNCNAMELEN from 128 to 192.
markj [Mon, 25 Apr 2016 18:44:11 +0000 (18:44 +0000)]
Increase DTRACE_FUNCNAMELEN from 128 to 192.

This allows for the long function components encountered in www/firefox.
This constant is part of DTrace's userland ABI, so this change may not be
MFC'ed.

PR: 207735

8 years agoAllow DOF sections with excessively long probe function components.
markj [Mon, 25 Apr 2016 18:40:57 +0000 (18:40 +0000)]
Allow DOF sections with excessively long probe function components.

Without this change, DTrace will refuse to load a DOF section if the
function component of any of its probes exceeds DTRACE_FUNCNAMELEN (128).
Probes in C++ programs can have very long function components. Rather than
rejecting all probes if a single probe exceeds the limit, simply skip the
invalid probe and emit a warning. This ensures that valid probes are
instantiated.

PR: 207735
MFC after: 2 weeks

8 years agoAdd a kern.dtrace.err_verbose sysctl to control dtrace_err_verbose.
markj [Mon, 25 Apr 2016 18:09:36 +0000 (18:09 +0000)]
Add a kern.dtrace.err_verbose sysctl to control dtrace_err_verbose.

When this flag is turned on, DOF and DIF validation errors are printed to
the kernel message buffer. This is useful for debugging.

Also remove the debug.dtrace.debug sysctl, which has no effect.

8 years agoUse the yield instruction in the arm64 cpu_spinwait. This instruction is
andrew [Mon, 25 Apr 2016 17:32:08 +0000 (17:32 +0000)]
Use the yield instruction in the arm64 cpu_spinwait. This instruction is
a hint to the hardware the software is not performing a task.

Sponsored by: ABT Systems Ltd