Commit Graph

214783 Commits

Author SHA1 Message Date
Enji Cooper
08dde4d421 Highball memory requirement (4GB) with common/{raise,safety}
Both test suites require more memory than my amd64 VM using
GENERIC-NODEBUG can provide and reliably panic it with OOM issues in
dtrace(4).

Some of the testcases fail, but this at least bypasses the panic behavior
on platforms that don't have enough resources

MFC after: 2 weeks
Discussed with: markj
Sponsored by: EMC / Isilon Storage Division
2016-08-10 03:10:34 +00:00
Glen Barber
256bf4121c Pass overrides to make(1) when building ports for arm/armv6
targets, similar to what is done for the run-autotools-fixup
override for non-arm targets.

MFC after:	3 days
Tested on:	12-CURRENT building 10-STABLE
Sponsored by:	The FreeBSD Foundation
2016-08-09 22:48:46 +00:00
John Baldwin
2a7f2aec96 Remove obsolete manpage that is not currently installed. 2016-08-09 22:10:40 +00:00
Jean-Sébastien Pédron
650b96935c sys/pcpu.h: Revert change introduced in r303890
`device_t` is not defined outside the kernel but this header is used by
eg. libkvm or vmstat(8). Thus, r303890 broke the build.

So let's restore `struct device` here until a longer term solution is
found.

Reported by:	Michael Butler <imb@protected-networks.net>, Jenkins
MFC after:	3 days
MFC with:	r303890
2016-08-09 21:45:47 +00:00
Pedro F. Giffuni
616dac55ef ancontrol(8): replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

Detected with devel/coccinelle following a hint from DragonFlyBSD.

MFC after:	1 month
2016-08-09 19:46:05 +00:00
Pedro F. Giffuni
e49b19c64b libpcap: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

Detected with devel/coccinelle following a hint from DragonFlyBSD.

MFC after:	1 month
2016-08-09 19:44:33 +00:00
Pedro F. Giffuni
a061aa46fe sys: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

Detected with devel/coccinelle following a hint from DragonFlyBSD.

MFC after:	1 month
2016-08-09 19:42:20 +00:00
Pedro F. Giffuni
f0be707d74 sys/dev: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

Detected with devel/coccinelle following a hint from DragonFlyBSD.

MFC after:	1 month
2016-08-09 19:41:46 +00:00
Jean-Sébastien Pédron
bd937497ea Consistently use device_t
Several files use the internal name of `struct device` instead of
`device_t` which is part of the public API. This patch changes all
`struct device *` to `device_t`.

The remaining occurrences of `struct device` are those referring to the
Linux or OpenBSD version of the structure, or the code is not built on
FreeBSD and it's unclear what to do.

Submitted by:	Matthew Macy <mmacy@nextbsd.org> (previous version)
Approved by:	emaste, jhibbits, sbruno
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D7447
2016-08-09 19:32:06 +00:00
Pedro F. Giffuni
8e60fa95cb libc/rpc: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma
can serve as a statement separator but this shouldn't be abused when
statements are meant to be standalone.

Detected with devel/coccinelle following a hint from DragonFlyBSD.

MFC after:	1 month
2016-08-09 19:20:53 +00:00
John Baldwin
75e2eb0501 Add a dmardump utility to dump the VT-d context tables.
This tool parses the ACPI DMAR table looking for DMA remapping devices.
For each device it walks the root table and any context tables
referenced to display mapping info for PCI devices.

Note that acpidump -t already parses the info in the ACPI DMAR tables
directly.  This tool examines some of the data structures the DMAR
remapping engines use to translate DMA requests.

Reviewed by:	kib, grehan
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7444
2016-08-09 19:06:05 +00:00
John Baldwin
264cd10809 Add additional constants.
- Add constants for the fields in the root-entry table address register,
  namely the root type type (RTT) and root table address (RTA) mask.
- Add macros for the bitmask of the domain ID field in the second word
  of context table entries as well as a helper macro (DMAR_CTX2_GET_DID)
  to extract the domain ID from a context table entry.

Reviewed by:	kib
MFC after:	1 month
Sponsored by:	Chelsio Communications
2016-08-09 19:02:14 +00:00
John Baldwin
10012d5309 Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF.
Previously the loop in PCIIOCGETCONF would terminate as soon as it
found enough matches.  Now it will continue iterating through the
PCI device list and only terminate if it finds another matching device
for which it has no room to store a conf structure.  This means that
PCI_GETCONF_LAST_DEVICE is reliably returned when the number of
matching devices is equal to the number of slots in the matches
buffer.  For example, if a program requests the conf structure for a
single PCI function with a specified domain/bus/slot/function it will
now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS.

While here, simplify the loop conditional a bit more by explicitly
breaking out of the loop if copyout() fails and removing a redundant
i < pci_numdevs check.

Reviewed by:	vangyzen, imp
MFC after:	1 month
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7445
2016-08-09 17:57:11 +00:00
John Baldwin
ec55567ce6 Track the base absolute ID of ingress and egress queues.
Use this to map an absolute queue ID to a logical queue ID in interrupt
handlers.  For the regular cxgbe/cxl drivers this should be a no-op as
the base absolute ID should be zero.  VF devices have a non-zero base
absolute ID and require this change.  While here, export the absolute ID
of egress queues via a sysctl.

Reviewed by:	np
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D7446
2016-08-09 17:49:42 +00:00
Edward Tomasz Napierala
7ee3fef85a Remove some NULL checks after M_WAITOK allocations from sys/arm/.
MFC after:	1 month
2016-08-09 16:02:35 +00:00
Steven Kreuzer
1d01cb0d72 Write kern.randompid to /etc/sysctl.conf
PR:		211471
Reported by:	survo@protonmail.com
Reviewed by:	robak@
Approved by:	allanjude@
MFC after:	3 days
Differential Revision:	 https://reviews.freebsd.org/D7440
2016-08-09 15:57:37 +00:00
Edward Tomasz Napierala
75ae87ede1 Remove NULL checks after M_WAITOK allocations from nand(4).
MFC after:	1 month
2016-08-09 15:56:33 +00:00
Edward Tomasz Napierala
108c227330 Remove NULL checks after M_WAITOK allocations from sys/dev/ofw/.
MFC after:	1 month
2016-08-09 15:55:14 +00:00
Edward Tomasz Napierala
4466486fb6 Remove NULL check after M_WAITOK allocation from mpt(4).
MFC after:	1 month
2016-08-09 15:52:17 +00:00
Edward Tomasz Napierala
1691e8bfb1 Remove NULL checks after M_WAITOK allocations from msk(4).
MFC after:	1 month
2016-08-09 15:51:11 +00:00
Edward Tomasz Napierala
1680b6b1e0 Remove NULL checks after M_WAITOK allocations from tws(4).
MFC after:	1 month
2016-08-09 15:50:03 +00:00
Hans Petter Selasky
5f9e5b5e62 Fix for use after free.
Clear the device description to avoid use after free because the
bsddev is not destroyed when the mlx5en module is unloaded. Only when
the parent mlx5 module is unloaded the bsddev is destroyed. This fixes
a panic on listing sysctls which refer strings in the bsddev after the
mlx5en module has been unloaded.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-08-09 07:43:15 +00:00
Andriy Gapon
96762fe314 fix a zfs cross-device rename crash introduced in r303763
The problem was that 'zfsvfs' variable was not initialized if the error
was detected, but in the exit path the variable was dereferenced before
the error code was checked.

Reported by:	np
MFC after:	3 days
X-MFC with:	r303763
2016-08-09 06:11:24 +00:00
Sepherosa Ziehau
b5070c1829 hyperv/hn: Move gpa array out of netvsc_packet.
Prepare to deprecate the netvsc_packet.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7436
2016-08-09 04:50:20 +00:00
Stephen J. Kiernan
0ce1624d0e Move IPv4-specific jail functions to new file netinet/in_jail.c
_prison_check_ip4 renamed to prison_check_ip4_locked

Move IPv6-specific jail functions to new file netinet6/in6_jail.c
_prison_check_ip6 renamed to prison_check_ip6_locked

Add appropriate prototypes to sys/sys/jail.h

Adjust kern_jail.c to call prison_check_ip4_locked and
prison_check_ip6_locked accordingly.

Add netinet/in_jail.c and netinet6/in6_jail.c to the list of files that
need to be built when INET and INET6, respectively, are configured in the
kernel configuration file.

Reviewed by:	jtl
Approved by:	sjg (mentor)
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D6799
2016-08-09 02:16:21 +00:00
Adrian Chadd
603e05dbcb [ar9300] don't program a negative readytime. 2016-08-09 01:05:29 +00:00
John Baldwin
a56745092c Reserve an adapter flag IS_VF to mark VF devices vs PF devices.
Sponsored by:	Chelsio Communications
2016-08-08 21:45:39 +00:00
John Baldwin
8f6690d385 Fix a typo. 2016-08-08 21:28:02 +00:00
Mark Johnston
434ac8b6b7 Handle races with listening socket close when connecting a unix socket.
If the listening socket is closed while sonewconn() is executing, the
nascent child socket is aborted, which results in recursion on the
unp_link lock when the child's pru_detach method is invoked. Fix this
by using a flag to mark such sockets, and skip a part of the socket's
teardown during detach.

Reported by:	Raviprakash Darbha <rdarbha@juniper.net>
Tested by:	pho
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D7398
2016-08-08 20:25:04 +00:00
Sean Bruno
2f632dbb0b Avoid panic from ng_uncallout when unpluggin ethernet cable with active
PPTP VPN connection.

Submitted by:	Michael Zhilin <mizhka@gmail.com>
Reviewed by:	ngie
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D7209
2016-08-08 19:31:01 +00:00
Sean Bruno
f7c7398485 Fixup ixl(4) options parsing to actually compile when using RSS/PCBGROUP
in GENERIC.

Fixup #ifdef RSS code blocks so that they build and add/delete variables
that were missesd during the creation of this code.

This code is untested and should have a big red warning on it.

Reported by:	npn@
MFC after:	2 days
2016-08-08 18:57:50 +00:00
Andrey V. Elsukov
b055e3be51 Fix formatting of setfib opcode.
Zero fib is correct value and it conflicts with IP_FW_TARG.
Use bprint_uint_arg() only when opcode contains IP_FW_TARG,
otherwise just print numeric value with cleared high-order bit.

MFC after:	3 days
2016-08-08 18:30:50 +00:00
Bryan Drewery
6597f1f81f make world: Allow installworld to be ran in parallel.
This has been safe for a while.

Sponsored by:	EMC / Isilon Storage Division
2016-08-08 18:13:03 +00:00
Andrey V. Elsukov
78724b5251 Fix constructing of setdscp opcode with tablearg keyword.
setdscp's argument can have zero value that conflicts with IP_FW_TARG value.
Always set high-order bit if parser doesn't find tablearg keyword.

MFC after:	3 days
2016-08-08 18:10:30 +00:00
Bryan Drewery
2af16ec8f2 Revert r298434 which should be fixed by r301287, r301394, and r301403.
PR:	208703, 208963
2016-08-08 17:59:59 +00:00
John Baldwin
f21e85a0ce Add timer_settime tests using SIGEV_THREAD.
Note that these tests should work fine on NetBSD and other systems as
SIGEV_THREAD is POSIX.

Differential Revision:	https://reviews.freebsd.org/D7121
2016-08-08 17:57:25 +00:00
Hans Petter Selasky
57d5dd7907 Switch to the new block based LRO input function for the mlx5en
driver. This change significantly increases the overall RX aggregation
ratio for heavily loaded networks handling 10-80 thousand simultaneous
connections.

Remove the turbo LRO code and all references to it which has now been
superceeded by the tcp_lro_queue_mbuf() function.

Tested by:	Netflix
Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-08-08 16:22:16 +00:00
Ryan Stone
f57637a47b Don't enqueue NULL on a drbr
In one corner case in the bxe TX path, a NULL mbuf could be enqueued onto
a drbr queue.  This could case a KASSERT to fire with INVARIANTS enabled,
or the processing of packets from the queue to be prematurely ended later
on.

Submitted by:	Matt Joras (matt.joras AT isilon.com)
Reviewed by:	davidcs
MFC after:	3 days
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D7041
2016-08-08 16:19:24 +00:00
Michael Tuexen
d6e73fa13d Fix the sending of FORWARD-TSN and I-FORWARD-TSN chunks. The
last SID/SSN pair wasn't filled in.
Thanks to Julian Cordes for providing a packetdrill script
triggering the issue and making me aware of the bug.

MFC after:	3 days
2016-08-08 13:52:18 +00:00
Ed Schouten
a0d3a7a158 Import vDSO-related source files from the CloudABI repository.
CloudABI executables that are emulated on Mac OS X do not invoke system
calls through "syscall". Instead, they make use of a vDSO that is
provided by the emulator that provides symbols for all of the system
call routines. The emulator can implement these any way it likes.

At some point in time we want to do this for native execution as well,
so that CloudABI executables are entirely oblivious of how system calls
need to be performed. They will simply call into functions and let that
deal with all of the details.

These source files can be used to generate a simple vDSO that does
nothing more than invoke "syscall". All we need to do now is map it into
the processes.

Obtained from:	https://github.com/NuxiNL/cloudabi
2016-08-08 13:15:37 +00:00
Dag-Erling Smørgrav
144a80bd9a Try to check whether each key file exists before adding it, and bail out
if we didn't find any of them.  This reduces log spam about key files for
deprecated algorithms, which we look for but don't generate.

PR:		208254
MFC after:	3 days
2016-08-08 10:46:18 +00:00
Michael Tuexen
9c5ca6f247 Fix a locking issue found by stress testing with tsctp.
The inp read lock neeeds to be held when considering control->do_not_ref_stcb.
MFC after:	3 days
2016-08-08 08:20:10 +00:00
Enji Cooper
bfa4e93d35 Remove vestigal references to __alpha__
Replace alpha reference in getconf(1) with amd64 [*]

MFC after:	1 week
PR:	 	211300 [*]
Submitted by:	Sevan Janiyan <venture37@geeklan.co.uk> [*]
Sponsored by:	EMC / Isilon Storage Division
2016-08-08 07:19:30 +00:00
Sepherosa Ziehau
f077729dbd hyperv/ic: Pass the channel callback to hv_util_attach()
The saved channel callback in util softc is actually never used.

MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7424
2016-08-08 06:18:54 +00:00
Sepherosa Ziehau
9b6306f287 hyperv/ic: Expose the receive buffer length for callers to use.
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7423
2016-08-08 06:11:28 +00:00
Sepherosa Ziehau
f5207880ba hyperv/ic: Remove never used second parameter of hv_negotiate_version()
MFC after:	1 week
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D7422
2016-08-08 05:57:38 +00:00
Sepherosa Ziehau
e6aeff0c0a etherswitch: Unbreak LINT build
Sponsored by:	Microsoft
2016-08-08 05:57:04 +00:00
Michael Tuexen
124d851acf Consistently check for unsent data on the stream queues.
MFC after:	3 days
2016-08-07 23:04:46 +00:00
Ed Schouten
df31593d00 Sync in the latest CloudABI constants and data types.
The only change is the addition of AT_SYSINFO_EHDR, which can be used
for providing a vDSO.

Obtained from:	https://github.com/NuxiNL/cloudabi
2016-08-07 21:23:55 +00:00
Justin Hibbits
080286e983 Set EN_MAS7_UPDATE HID0 bit for e500 core.
Without enabling this bit, tlbre and tlbsx don't update the MAS7 register,
resulting in garbage in the register after a read (rather, the previous setting
of it for a tlbwe).  This can result in mmu_booke_mapdev_attr() thinking
mappings that should match actually don't, because tlb1_read_entry() can't
determine the correct address of a given entry.

MFC after:	11-RELEASE
2016-08-07 19:09:56 +00:00