Commit Graph

213273 Commits

Author SHA1 Message Date
Marcelo Araujo
a9254de740 Bump date on ifconfig(8) and vlan(4) to reflect the changes made
on revision r301496.
2016-06-08 04:18:57 +00:00
Kevin Lo
45cbcf9b83 Fix a style bug. 2016-06-08 02:39:10 +00:00
Kevin Lo
5c95ab023c - Replace the magic numbers with something more readable.
- Reset DMA indexes after disabling DMA.
2016-06-08 02:37:23 +00:00
Don Lewis
290dadbd56 Fix a (false positive?) Argument cannot be negative coverity defect.
Rather than guarding close(fd) with an fd >= 0 test and setting fd
to -1 when it is closed to avoid a potential double-close, just
move the close() call after the conditional "goto make_token".  This
moves the close() call totally outside the loop to avoid the
possibility of calling it twice.  This should also prevent a Coverity
warning about checking fd for validity after it was previously passed
to read().

Reported by:	Coverity
CID:		1355335
MFC after:	1 week
X-MFC with:	r299484
2016-06-08 02:14:05 +00:00
Mariusz Zaborski
b3a734483e Introduce the PD_CLOEXEC for pdfork(2).
Reviewed by:	mjg
2016-06-08 02:09:14 +00:00
Mariusz Zaborski
920be817aa Add flags to the Casper services.
CASPER_SERVICE_STDIO - Casper will not close the first three descriptors (stdin,
		       stdout and stderr) this can be helpful for debugging.
CASPER_SERVICE_FD - Capser will not close all other descriptors, this can
		    be useful for a filesystem service.
2016-06-08 02:03:53 +00:00
Pedro F. Giffuni
311219368a libsupc++: Fix typo in symbol map.
This went mostly unnoticed with the deprecation of the GNU toolchain
in tier 1 platforms. Fix it now for the rest.

PR:		169901
MFC after:	3 days
2016-06-08 00:29:48 +00:00
Pedro F. Giffuni
633785280d ext2fs: Stop dropping and reacquiring Giant around geom calls.
As in UFS r300366.
2016-06-07 21:40:42 +00:00
Conrad Meyer
75548271a9 Fix memory leaks in (a|)daregister introduced in r298002
In the case where cam_iosched_init() fails, the ada and da softcs were leaked.
Instead, free them.

Reported by:	Coverity
CID:		1356039
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:33:55 +00:00
Conrad Meyer
0d0338afc9 iflib: Improve cleanup on iflib_queues_alloc error path
Fix some memory leaks.  Some may remain.

Reported by:	Coverity
Discussed with:	mmacy
CIDs:		1356036, 1356037, 1356038
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:26:00 +00:00
Conrad Meyer
ab8316b8df nfs_clvfsops: Fix leading whitespace introduced in r299848
Replace spaces with tabs.  No functional change.

Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:16:01 +00:00
Andrew Turner
04ff877e4c Switch arm64 to use intrng by default. The old interrupt handling code can
still be used, however this is expected to be removed soon.

Obtained from:	ABT Systems Ltd
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2016-06-07 20:14:08 +00:00
Conrad Meyer
15634fd60c nfs_clvfsops: Prevent strdup of stack garbage with bogus mount specs
If strlen(hostp) was zero, the stack array 'nam' would never be initialized
before being strdup()ed.  Fix this by initializing it to the empty string.

It's possible some external condition makes this case impossible, in which
case, an assertion instead of this workaround is appropriate.

Introduced in r299848.

Reported by:	Coverity
CID:		1355336
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 20:00:20 +00:00
Conrad Meyer
16fb86ab35 iflib: Fix potential leak in iflib_if_transmit
Due to an accidental mismatch between allocation and release in the slow path
of iflib_if_transmit, if a caller passed 9-16 mbufs to the routine, the mbuf
array would be leaked.

Fix the mismatch by removing the magic numbers in favor of nitems() on the
stack array.  According to mmacy, this leak is unlikely.

Reported by:	Coverity
Discussed with:	mmacy
CID:		1356040
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 19:49:08 +00:00
Conrad Meyer
00ee4cd78a Fix a minor leak in ACPI thermal
Introduced in r301518.

Reported by:	Coverity
CID:		1356266
Sponsored by:	EMC / Isilon Storage Division
2016-06-07 19:08:13 +00:00
Andrew Turner
8a77146289 Start to clean MIDR values using the CPUID scheme. We don't need to know
the exact CPU we are running on to set the cpu functions. Relax the check
to ignore the CPU revision. Even so this may still be too specific.

Reviewed by:	mmel
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D6504
2016-06-07 18:50:36 +00:00
Pedro F. Giffuni
2e621997eb ext2fs: rearrange ext4_bmapext().
While here assign error a bit later.

Reviewed by:	Damjan Jovanovich
Obtained from:	NetBSD
2016-06-07 18:23:22 +00:00
Pedro F. Giffuni
96e9f46789 ext2fs(5): Cosmetic cleanups, mostly to the ext4 code.
Obtained from:	NetBSD
2016-06-07 17:08:34 +00:00
Takanori Watanabe
b32073c458 Disconnect LE socket when the HCI connection associated is disconnected. 2016-06-07 16:57:13 +00:00
Kurt Lidl
04a83165f2 Bump dates in blacklist related manpages
Reported by:	araujo
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:51:56 +00:00
Kurt Lidl
c0a3f8db90 Document BLACKLIST related build options
Reported by:	bdrewery
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:35:55 +00:00
Kurt Lidl
c0759dac0d Separate BLACKLIST vs BLACKLIST_SUPPORT properly
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:31:03 +00:00
Kurt Lidl
9349564fec Note blacklist support first appeared in FreeBSD 11
Reported by:	jbeich
Sponsored by:	The FreeBSD Foundation
2016-06-07 16:26:34 +00:00
Kurt Lidl
c0cc364181 Add blacklist support to sshd
Reviewed by:	rpaulo
Approved by:	rpaulo (earlier version of changes)
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5915
2016-06-07 16:18:09 +00:00
Pedro F. Giffuni
3707d4d3e3 ng_mppc(4): Bring netgraph(3) MPPC compression support.
Documentation change missing from r301549.
2016-06-07 15:20:53 +00:00
Pedro F. Giffuni
c3fb425204 ng_mppc(4): Bring netgraph(3) MPPC compression support.
Support for compression has been available from July 2007 but it
was never imported due to concerns with patents once held by
STAC/HiFn. The issues have clearly been resolved so bring it
in now.

Special thanks to Brett Glass for preserving the code and
pointing documentation for the expiration case.

Obtained from:	mav (through Brett Glass)
Relnotes:	yes
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D6739
2016-06-07 15:07:00 +00:00
Pedro F. Giffuni
43ce40e891 ext2fs: cleanup generation number management.
Ext2/3/4 manages generation numbers differently than UFS so adopt
some rules that should work well. When allocating a new inode,
make sure we generate a "good" random value specifically avoiding
zero.

Don't interfere with the numbers that are already generated in
the filesystem: ext2fs doesn't have the backwards compatibility
issues  where there were no generation numbers.

Reviewed by:	kevlo
MFC after:	1 week
2016-06-07 14:37:43 +00:00
Steven Kreuzer
537f1d275f Document 300779, Dummynet AQM version 0.2.1
Approved by:	re (gjb, implicit, relnotes)
2016-06-07 14:11:15 +00:00
Hans Petter Selasky
76a5241f2c Add SR-IOV guest support to the mlx5en driver.
This patch adds the missing pieces needed for device setup using the
mlx5en driver inside a virtual machine which is providing hardware
access through SR-IOV.

Sponsored by:	Mellanox Technologies
MFC after:	1 week
2016-06-07 13:58:52 +00:00
Hans Petter Selasky
d8571d3ea3 Fallback to arc4rand() in the LinuxKPI when read_random() returns
zero. This can happen for virtual machines.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
2016-06-07 13:10:13 +00:00
Svatopluk Kraus
c4263292fe Remove temporary solution for storing interrupt mapping data as
it's not needed after r301451 and follow-ups r301453, r301539.

This makes INTRNG clean of all additions related to various buses.
2016-06-07 09:03:27 +00:00
Navdeep Parhar
468646f716 cxgbe(4): A couple of fixes to set_sched_queue.
- Validate the scheduling class against the actual limit (which is chip
  specific) instead of a magic number.

- Return an error if an attempt is made to manipulate the tx queues of a
  VI that hasn't been initialized.

Sponsored by:	Chelsio Communications
2016-06-07 07:48:36 +00:00
Marcelo Araujo
1830617ec9 Bump date in both manpages.
Reported by:	rodrigc
2016-06-07 07:04:05 +00:00
Navdeep Parhar
0bc01d66b6 cxgbe(4): Provide information about traffic classes in the sysctl mib.
Sponsored by:	Chelsio Communications
2016-06-07 06:42:35 +00:00
Michal Meloun
949883bd72 INTRNG: As follow up of r301451, implement mapping and configuration
of gpio pin interrupts by new way.

Note: This removes last consumer of intr_ddata machinery and we remove it
in separate commit.
2016-06-07 05:08:24 +00:00
Sepherosa Ziehau
36ad8372d4 net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by:	hps, erj, tuexen
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6688
2016-06-07 04:51:50 +00:00
Adrian Chadd
aebdb1e24e [ath3k] add a replacement ath3k firmware loading tool.
This is influenced by the ath3k driver from linux (circa 2013, this is
how long I've been sitting on this.)

It handles loading in firmware using the newer model, where it assembles
the right set of firmware blobs and board configuration based on the
device list and querying the device.

The older utility could only load in a single image - which sometimes
was ath3k-1.fw and sometimes was ath3k-2.fw.  However, the ath3k maintainers
didn't want to keep adding in binaries that were just derivatives with a
separate board config, so they deleted ath3k-2.fw from the Linux firmware
repository and instead, well, did this.

Now, this has been tested against AR3011 and AR3012 NICs from the AR9285+BT
combo up through to the QCA9565+BT combo.  It doesn't yet work with the
QCAFN222 NIC as that is some newer chip.

The firmware can be grabbed from https://github.com/erikarn/ath3kfw/ in
the share/firmware/ath3k directory.  I'll update this utility over time
to support the newer firmware drops (newer than mid-2013) which should
pull in the QCNFA222 and subsequent chips.

Tested:

* AR9285 + BT
* AR9287 + BT
* AR9485 + BT
* AR9462 + BT
* QCA9565 + BT
2016-06-07 04:22:18 +00:00
Marcelo Araujo
3db8326de1 Add an entry on rc.conf(5) explaining the new options
nis_ypldap_enable and nis_ypldap_flags.

Also add an entry on ypldap(8) that it is a feature ready and
appears on FreeBSD 11.0.

Requested by:	rodrigc
Relnotes:	Yes
2016-06-07 01:00:08 +00:00
Navdeep Parhar
46464b95b0 cxgbe(4): Track the state of the hardware traffic schedulers in the
driver.  This works as long as everyone uses set_sched_class_params
to program them.

Sponsored by:	Chelsio Communications
2016-06-07 00:27:55 +00:00
Bjoern A. Zeeb
2d5ad99a0d After tearing down the interface per-"domain" bits, set the data area
to NULL to avoid it being mis-treated on a possible re-attach but also
to get a clean NULL pointer derefence in case of errors due to
unexpected race conditions elsewhere in the code, e.g., callouts.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:59:58 +00:00
Eric van Gyzen
c152ba971f newsyslog: Eliminate unnecessary sleep(10) when -R and -s are specified
After going through the signal work list, during which do_sigwork()
is called and essentially does nothing because -s and -R were
specified on the command line, newsyslog will sleep for 10 seconds
as the (verbose) code says: "Pause 10 seconds to allow daemon(s)
to close log file(s)".

However, the man page verbiage for -R (and -s) seems quite clear
that this sleep() is unnecessary because the daemon was expected
to have already closed the log file before calling newsyslog.

PR:		210020
Submitted by:	David A. Bright <david_a_bright@dell.com>
MFC after:	1 week
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D6727
2016-06-06 22:54:08 +00:00
Navdeep Parhar
cfbe2911c9 cxgbe(4): Break up set_sched_class. Validate the channel number and
min/max rates against their actual limits (which are chip and port
specific) instead of hardcoded constants.

Sponsored by:	Chelsio Communications
2016-06-06 22:51:44 +00:00
Bjoern A. Zeeb
74b44794c6 Make KASSERT message more useful by printing the variables on which
we assert.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:34:12 +00:00
Bjoern A. Zeeb
b941cb8d60 Add a show igi_list command to DDB to debug IGMP state.
Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2016-06-06 22:26:18 +00:00
Bjoern A. Zeeb
3af72c1124 Implement a show panic command to DDB which will helpfully print the
panic string again if set, in case it scrolled out of the active
window.  This avoids having to remember the symbol name.

Also add a show callout <addr> command to DDB in order to inspect
some struct callout fields in case of panics in the callout code.
This may help to see if there was memory corruption or to further
ease debugging problems.

Obtained from:	projects/vnet
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Reviewed by:	jhb (comment only on the show panic initally)
Differential Revision:	https://reviews.freebsd.org/D4527
2016-06-06 20:57:24 +00:00
Navdeep Parhar
db80d07377 cxgbe(4): Create a reusable struct type for scheduling class parameters.
Sponsored by:	Chelsio Communications
2016-06-06 20:42:46 +00:00
John Baldwin
9f70e94e68 Defer the creation of ACPI thermal kthreads to a startup sysinit.
The SYSINIT runs at SI_SUB_KICK_SCHEDULER after the scheduler is fully
initialized and timers are working.  This fixes booting in the
EARLY_AP_STARTUP case.
2016-06-06 20:28:53 +00:00
Kurt Lidl
504422fab3 Update blacklist support in ftpd to clarify fd usage
The ftp daemon dups the control socket to stdin and uses that fd
throughout the code.  Clarify this usage slightly by changing from
explicit use of "0" for the fd to a variable, to make it clear what
the zero represents in the non-blacklist code. Make the
blacklist_notify routine use STDIN_FILENO so as to have less of a
"magic number" feel to the code.

Reviewed by:	cem
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D6716
2016-06-06 20:00:13 +00:00
Navdeep Parhar
93e452dbc0 cxgbetool: Allow max-rate > 10Gbps for rate-limited traffic.
Sponsored by:	Chelsio Communications
2016-06-06 18:45:09 +00:00
Kurt Lidl
00dc8270d5 Turn off blacklistd daemon in defaults
Reported by:	Matteo Riondato ( matteo @ FreeBSD.org )
Reviewed by:	rpaulo
Approved by:	rpaulo
Relnotes:	YES
Sponsored by:	The FreeBSD Foundation
2016-06-06 17:01:35 +00:00