Commit Graph

220724 Commits

Author SHA1 Message Date
Andriy Voskoboinyk
5dbc2ac93d iwi: add 12-14 2GHz channels into channel list.
Return full channel list via iwi_getradiocaps() method
(ieee80211_init_channels() was replaced with iwi_getradiocaps()
to be consistent with other drivers).

PR:				216923
Submitted and tested by:	ds@ukrhub.net (original patch)
MFC after:			5 days
2017-02-13 02:15:56 +00:00
Konstantin Belousov
04e89ffba8 Remove MPSAFE and ARGUSED annotations, ANSI-fy syscall handlers.
Discussed with:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-02-13 00:40:55 +00:00
Konstantin Belousov
995b8f4fb8 Style: wrap long line.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2017-02-13 00:39:43 +00:00
Sean Bruno
bcc537c59d Only trigger em_local_timer on queue index 0. This was causing continuous
em_local_timer() executions during normal operation and was very likely
to cause a lock up on igb(4) devices.

Submitted by:	Matt Macy (mmacy@nextbsd.org)
Reported by:	jtl
Reviewed by:	gallatin
Sponsored by:	Limelight Networks & Netflix
2017-02-12 23:06:41 +00:00
Konstantin Belousov
987ff18184 Consistently handle negative or wrapping offsets in the mmap(2) syscalls.
For regular files and posix shared memory, POSIX requires that
[offset, offset + size) range is legitimate.  At the maping time,
check that offset is not negative.  Allowing negative offsets might
expose the data that filesystem put into vm_object for internal use,
esp. due to OFF_TO_IDX() signess treatment.  Fault handler verifies
that the mapped range is valid, assuming that mmap(2) checked that
arithmetic gives no undefined results.

For device mappings, leave the semantic of negative offsets to the
driver.  Correct object page index calculation to not erronously
propagate sign.

In either case, disallow overflow of offset + size.

Update mmap(2) man page to explain the requirement of the range
validity, and behaviour when the range becomes invalid after mapping.

Reported and tested by:	royger (previous version)
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-02-12 21:05:44 +00:00
Konstantin Belousov
f2277b64ec Switch copyout_map() to use vm_mmap_object() instead of vm_mmap().
This is both a microoptimization and a move of the consumer to more
commonly used vm function.

Suggested and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-02-12 20:54:31 +00:00
Andriy Gapon
909bacfc59 remove l2_padding_needed statistic from zfs arc
It became obsolete when the Compressed ARC support was committed.

MFC after:	1 week
2017-02-12 19:45:30 +00:00
Andriy Gapon
e776c4054f check remaining space in zfs implementations of vptocnp
PR:		216939
Submitted by:	Iouri V. Ivliev <fbsd@any.com.ru>
MFC after:	1 week
2017-02-12 19:40:59 +00:00
Dmitry Chagin
abf20e9392 Fix r313284.
Members of the syscall argument structures are padded to a word size. So,
for COMPAT_LINUX32 we should convert user supplied system call arguments
which is 32-bit in that case to the array of register_t.

Reported by:	Oleg V. Nauman
MFC after:	1 week
2017-02-12 15:22:50 +00:00
Mateusz Guzik
c4a48867f1 lockmgr: implement fast path
The main lockmgr routine takes 8 arguments which makes it impossible to
tail-call it by the intermediate vop_stdlock/unlock routines.

The routine itself starts with an if-forest and reads from the lock itself
several times.

This slows things down both single- and multi-threaded. With the patch
single-threaded fstats go 4% up and multithreaded up to ~27%.

Note that there is still a lot of room for improvement.

Reviewed by:	kib
Tested by:	pho
2017-02-12 09:49:44 +00:00
Enji Cooper
ad68ac431b Use SRCTOP/OBJTOP relative paths where possible; use :H manipulation in lieu
of ../ elsewhere

This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-12 08:36:47 +00:00
Xin LI
c8c6d70e30 Vendor import of libpcap 1.8.1. 2017-02-12 07:04:44 +00:00
Ermal Luçi
c10c5b1eba Committed without approval from mentor.
Reported by:	gnn
2017-02-12 06:56:33 +00:00
Ian Lepore
8148f4f3d5 Enable usb low and full speed devices connected to the imx6 root hubs.
This enables the PHY circuitry for UTMI+ level 2 and 3, and sets the
flag to tell the ehci code that the root hub has a transaction translator
in it.  For imx6 we can use the standard ehci_get_port_speed_portsc()
function to find out what speed device is connected to the port.
2017-02-12 00:52:22 +00:00
Baptiste Daroussin
f59f9337b6 Remove spaces at end of line
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:45:50 +00:00
Baptiste Daroussin
dae6dcb78a Remove useless Li macro
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:45:10 +00:00
Baptiste Daroussin
25748e92e0 Use correct date format
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:44:37 +00:00
Baptiste Daroussin
042e4ab355 Escape Sm to avoid confusion with Sm macro
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:43:12 +00:00
Baptiste Daroussin
d51868a30a Properly use .An macro before Authors name
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:42:33 +00:00
Baptiste Daroussin
0e630e32be Add missing section in manpage reference
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:41:38 +00:00
Baptiste Daroussin
b7dd44ebcf Remove spaces at EOL and sort correctly the SEE ALSO section
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:40:57 +00:00
Baptiste Daroussin
de5d5e9997 Remove empty space at EOL and escept Ed
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:39:56 +00:00
Baptiste Daroussin
42ced26621 Remove useless .Pp after the .Sh macro and remove empty line
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:39:14 +00:00
Baptiste Daroussin
e7e1f7e394 Escape No to avoid confusion with the No macro
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:38:28 +00:00
Baptiste Daroussin
686e56957e Add missing section after .Xr reference
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:37:48 +00:00
Baptiste Daroussin
d10807ecab Add missing -width after -Bl -tag
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:36:52 +00:00
Baptiste Daroussin
95a27780e2 Escape Ss to avoid confusion by mdoc parser with the Ss macro
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:14:28 +00:00
Baptiste Daroussin
33bf6c45fb Remove empty Li
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:09:50 +00:00
Baptiste Daroussin
ce08d4900c Remove space at and of line
Reported by:	make manlint
MFC after:	2 days
2017-02-11 23:06:53 +00:00
Enji Cooper
374d7f62e0 Revert r313565 -- :mmap__bad_arguments passes again after r313655
PR:		216976
Sponsored by:	Dell EMC Isilon
2017-02-11 20:31:57 +00:00
Enji Cooper
32fbf9b347 Use SRCTOP to define .include with usr.bin/Makefile.inc
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:27:53 +00:00
Konstantin Belousov
1c2ad3e962 Change type of the prot parameter for kern_vm_mmap() from vm_prot_t to int.
This makes the code to pass whole word of the mmap(2) syscall argument
prot to the syscall helper kern_vm_mmap(), which can validate all
bits.  The change provides temporal fix for sys/vm/mmap_test
mmap__bad_arguments, which was broken after r313352.

PR:	216976
Reported and tested by:	ngie
Sponsored by:	The FreeBSD Foundation
2017-02-11 20:27:39 +00:00
Enji Cooper
272a2acfef Use SRCTOP to refer to awk source in contrib/awk and remove unnecessary AWKSRC prefix
for maketab.c

The former simplifies pathing in make/displayed output, whereas the latter was just
unnecessarily superfluous since .PATH referenced the path to maketab.c earlier on in
the Makefile.

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:27:06 +00:00
Enji Cooper
15212f7a83 Use SRCTOP instead of .CURDIR relative paths with ".."
This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:19:04 +00:00
Enji Cooper
ebbfcada38 Use SRCTOP instead of .CURDIR relative paths with ".."
This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:18:24 +00:00
Enji Cooper
99b33ca4ec Manipulate OBJDIR with :H when referencing dso directory
This reduces path lengths, etc in memory with make by a minimal value

Sponsored by:	Dell EMC Isilon
2017-02-11 20:14:50 +00:00
Enji Cooper
a2cddb3b25 Use SRCTOP/OBJTOP and simplify output using :H instead of "../" for directory
entries

This simplifies pathing in make/displayed output

MFC after:	1 week
Sponsored by:	Dell EMC Isilon
2017-02-11 20:12:54 +00:00
Conrad Meyer
ae9dddfc09 pciconf(8): Replace an assert with errx
The condition can be hit with simple user input, so it isn't an invariant.
Just error out.

PR:		217003
Reported by:	Vladislav V. Prodan <admin at support.od.ua>
Sponsored by:	Dell EMC Isilon
2017-02-11 18:04:43 +00:00
Ryan Stone
5ede40dcf2 Don't zero out srtt after excess retransmits
If the TCP stack has retransmitted more than 1/4 of the total
number of retransmits before a connection drop, it decides that
its current RTT estimate is hopelessly out of date and decides
to recalculate it from scratch starting with the next ACK.

Unfortunately, it implements this by zeroing out the current RTT
estimate.  Drop this hack entirely, as it makes it significantly more
difficult to debug connection issues.  Instead check for excessive
retransmits at the point where srtt is updated from an ACK being
received.  If we've exceeded 1/4 of the maximum retransmits,
discard the previous srtt estimate and replace it with the latest
rtt measurement.

Differential Revision:	https://reviews.freebsd.org/D9519
Reviewed by:	gnn
Sponsored by:	Dell EMC Isilon
2017-02-11 17:05:08 +00:00
Toomas Soome
c05d666747 loader: implement MEDIA_FILEPATH_DP support in efipart
The efipart rework did break the ARM systems as the new code is
using more exact filters to sort the devices and we need to
add support for MEDIA_FILEPATH_DP device paths.

PR:		216940
Reported by:	karl@denninger.net
Reviewed by:	allanjude, manu
Approved by:	allanjude (mentor)
Differential Revision:	https://reviews.freebsd.org/D9520
2017-02-11 15:25:49 +00:00
Adrian Chadd
07569d5533 [net80211] add a sysctl that forces a vap restart.
Well, vap restart really does "all restart" for now, which will be a good
way of debugging firmware restart issues.
2017-02-11 05:33:49 +00:00
Mahdi Mokhtari
701dacac99 Adding myself to committers-ports.dot and calendar.freebsd
Submitted by:	mmokhi
Approved by:	feld, mat (mentors)
Differential Revision:	https://reviews.freebsd.org/D9528
2017-02-11 05:19:45 +00:00
Ed Maste
157cf55949 Remove sys/boot/pc98 accidentally restored in r313575
Reported by:	rpokala
2017-02-11 02:45:54 +00:00
Ed Maste
78b11a5903 makefs: make the buffer functions look exactly like the kernel ones
From NetBSD christos Sat Jan 26 00:19:39 2013 +0000

make the buffer functions look exactly like the kernel ones and add other
cruft to make the kernel files compile.

ffs.c 1.54
ffs/buf.c 1.13
ffs/buf.h 1.3
ffs/ffs_alloc.c 1.21
ffs/ffs_balloc.c 1.15

Reviewed by:	marcel, ngie
Obtained from:	NetBSD
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8404
2017-02-11 02:33:48 +00:00
Ian Lepore
9fc7a59f2a Stop including sys/types.h from arm's machine/atomic.h, fix the places
where atomic.h was being included without ensuring that types.h (via
param.h) was included first, as required by atomic(9).
2017-02-11 01:07:46 +00:00
Martin Matuska
333b68ab52 MFV r313569:313569:313569:
Sync libarchive with vendor

Vendor bugfixes:
cpio reader sanity fix (OSS-Fuzz 504)
WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552)
mtree reader time parsing fix (OSS-Fuzz 538)
XAR reader memleak fix (OSS-Fuzz 551)

MFC after:	1 week
2017-02-11 01:00:58 +00:00
Martin Matuska
638a0d360a Update vendor/libarchive to git b3bd0b81a1a06909f766dea8be4072ef81de62b8
Vendor bugfixes:
cpio reader sanity fix (OSS-Fuzz 504)
WARC reader sanity fixes (OSS-Fuzz 511, 526, 532, 552)
mtree reader time parsing fix (OSS-Fuzz 538)
XAR reader memleak fix (OSS-Fuzz 551)
2017-02-10 23:12:38 +00:00
Kenneth D. Merry
28ef82eb7b Change the isp(4) driver to not adjust the tag type for REQUEST SENSE.
The isp(4) driver was changing the tag type for REQUEST SENSE
commands to Head of Queue, when the CAM CCB flag
CAM_TAG_ACTION_VALID was NOT set.  CAM_TAG_ACTION_VALID is set
when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE
and when the target has tagged queueing turned on.

In most cases when CAM_TAG_ACTION_VALID is not set, it is because
the target is not doing tagged queueing.  In those cases, trying to
send a Head of Queue tag may cause problems.  Instead, default to
sending a simple tag.

IBM tape drives claim to support tagged queueing in their standard
Inquiry data, but have the DQue bit set in the control mode page
(mode page 10).  CAM correctly detects that these drives do not
support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag
on CCBs sent down to the drives.

This caused the isp(4) driver to go down the path of setting the
tag action to a default value, and for Request Sense commands only,
set the tag action to Head of Queue.

If an IBM tape drive does get a Head of Queue tag, it rejects it with
Invalid Message Error (0x49,0x00).  (The Qlogic firmware translates that
to a Transport Error, which the driver translates to an Unrecoverable
HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible
to get a good response from a REQUEST SENSE to an FC-attached IBM
tape drive with the isp(4) driver.

IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150
with 4470 firmware) also have a bug in that sending a command with a
non-simple tag attribute breaks the tape drive's Command Reference
Number (CRN) accounting and causes it to ignore all subsequent
commands because it and the initiator disagree about the next
expected CRN.  The drives do reject the initial command with a head
of queue tag with an Invalid Message Error (0x49,0x00), but after that
they ignore any subsequent commands.  IBM confirmed that it is a bug,
and sent me test firmware that fixes the bug.  However tape drives in
the field will still exhibit the bug until they are upgraded.

Request Sense is not often sent to targets because most errors are
reported automatically through autosense in Fibre Channel and other
modern transports.  ("Modern" meaning post SCSI-2.)  So this is not
an error that would crop up frequently.  But Request Sense is useful on
tape devices to report status information, aside from error reporting.

This problem is less serious without FC-Tape features turned on,
specifically precise delivery of commands (which enables Command
Reference Numbers), enabled on the target and initiator.  Without
FC-Tape features turned on, the target would return an error and
things would continue on.

And it also does not cause problems for targets that do tagged
queueing, because in those cases the isp(4) driver just uses the
tag type that is specified in the CCB, assuming the
CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple
tag action if it isn't an ordered or head of queue tag.

sys/dev/isp/isp.c:
	In isp_start(), don't try to send Request Sense commands
	with the Head of Queue tag attribute if the CCB doesn't
	have a valid tag action.  The tag action likely isn't valid
	because the target doesn't support tagged queueing.

Sponsored by:	Spectra Logic
MFC after:	3 days
2017-02-10 22:02:45 +00:00
John Baldwin
bb9b710477 Regenerate all the system call tables to drop "created from" lines.
One of the ibcs2 files contains some actual changes (new headers) as
it hasn't been regenerated after older changes to makesyscalls.sh.
2017-02-10 19:45:02 +00:00
Enji Cooper
28e5919804 Expect :mmap__bad_arguments to fail
Some recent changes to vm related to mmap(2) have broken the prot checks that
would result with an EINVAL with this case

I suspect r313352 is the root-cause the issue

PR:		216976
Sponsored by:	Dell EMC Isilon
2017-02-10 19:31:09 +00:00