Commit Graph

211798 Commits

Author SHA1 Message Date
Andrew Rybchenko
96ffcdee44 sfxge(4): rename falconsiena_tx_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:16:29 +00:00
Andrew Rybchenko
d2df9a4e48 sfxge(4): rename falconsiena_rx_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:15:51 +00:00
Andrew Rybchenko
5cab4fc7dc sfxge(4): rename falconsiena_mac_*
Falcon support has been removed, so this code only supports Siena.

Reviewed by:    Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:15:02 +00:00
Andrew Rybchenko
e7b2e8b0ac sfxge(4): rename falconsiena_intr_*
falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:12:14 +00:00
Andrew Rybchenko
0f981da774 sfxge(4): rename falconsiena_ev_*
Falcon support has been removed, so this code only supports Siena.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:11:36 +00:00
Andrew Rybchenko
cc3897cf73 sfxge(4): move ef10_vpd_* to ef10_vpd.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:10:07 +00:00
Andrew Rybchenko
69fb4e16ea sfxge(4): move ef10_tx_* to ef10_tx.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:08:33 +00:00
Andrew Rybchenko
204d1d179e sfxge(4): move ef10_rx_* to ef10_rx.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:06:57 +00:00
Andrew Rybchenko
647112a4b3 sfxge(4): move ef10_phy_* to ef10_phy.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:05:40 +00:00
Andrew Rybchenko
dcab148366 sfxge(4): move ef10_nvram_* to ef10_nvram.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:04:28 +00:00
Andrew Rybchenko
31bf5f0399 sfxge(4): move ef10_nic_* to ef10_nic.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:03:04 +00:00
Andrew Rybchenko
e67df18431 sfxge(4): move ef10_mcdi_* to ef10_mcdi.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 07:00:46 +00:00
Andrew Rybchenko
9573ed00c6 sfxge(4): move ef10_mac_* to ef10_mac.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:59:20 +00:00
Andrew Rybchenko
57a2a11847 sfxge(4): move ef10_intr_* to ef10_intr.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:58:20 +00:00
Andrew Rybchenko
fc737285c3 sfxge(4): move ef10_filter_* to ef10_filter.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:57:08 +00:00
Andrew Rybchenko
f6078949da sfxge(4): move ef10_ev_* to ef10_ev.c
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
2016-05-13 06:54:18 +00:00
Andrew Rybchenko
fe7e969e7a sfxge(4): comment on when we assume multicast chaining is available
It's the same on Medford as Huntington.

Multicast chaining is not always on, even with Medford, as it's not
supported by low latency firmware.

Unlike the Linux driver, we don't need to support virtulization with
firmware released before support for multicast chaining was added.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6319
2016-05-13 06:47:47 +00:00
Andrew Rybchenko
d0a97c000f sfxge(4): avoid duplicate delivery of packets when changing multicast mode with multicast chaining enabled
With multicast chaining, if e.g. a specific multicast filter is
inserted and the multicast mis-match filter is then inserted, both may
match a packet and cause it to be delivered.

Copy the behaviour of the Linux driver, which is to remove the old filters
first, on the basis that customers are more likely to be able to handle
drops than duplicates (see bug49178 comment 4).

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6331
2016-05-13 06:47:07 +00:00
Don Lewis
7a7c07ef51 Properly compute the size argument to pass to malloc().
Reported by:	Coverity
CID:		1198856
MFC after:	1 week
2016-05-13 06:45:16 +00:00
Don Lewis
ae092f753a Move a call to cam_freeccb() to avoid a use after free error and
a later double free.

Reported by:	Coverity
CID:		1018507
MFC after:	1 week
2016-05-13 06:26:42 +00:00
Don Lewis
090fc1c839 Always return either a dynamically allocated string or NULL from
expand().  Never return the name parameter, which could be a the buf[]
buffer which is allocated on the stack by getdeadletter() and which
would then be used after getdeadletter() has returned.

Reported by:	Coverity
CID:		1199383
MFC after:	1 week
2016-05-13 06:15:05 +00:00
Scott Long
dde1276e8e Don't jam the softc in the device_probe routine. The softc isn't owned by
the driver here, so it shouldn't be accessed, let alone written to.  Remove
the nearby debug line, it's the only thing that depended on the softc, and
it depended on it in a way that couldn't work in this part of the code.

This fixes some reports of use-after-free and system instability with
DEBUG_MEMGUARD enabled.

Submitted by:	Matthew Macy
MFC after:	3 days
2016-05-13 05:57:21 +00:00
Don Lewis
e4efa066e1 Instead of ignoring the EEXIST from link(), unconditionally unlink
the terget before calling link().  This should prevent links to an
old copy of the file from being retained.
2016-05-13 05:49:02 +00:00
Don Lewis
aa60f7a6de Revert r299584:
Mark usage() as __dead2 so that Coverity doesn't think that execution
  continues after the call and uses a negative array subscript.

Requested by:	bde
2016-05-13 05:39:29 +00:00
Jason Evans
1f0a49e863 Update jemalloc to 4.2.0. 2016-05-13 04:03:20 +00:00
Pedro F. Giffuni
b1f46f712f i2c(8): uninitialized variable (UNINIT).
If i2c_opt.width is somehow zero, the bufsize will be left uninitialized
and make cause trouble later on.

CID:		1331549
2016-05-13 02:58:11 +00:00
Don Lewis
8877d1dbe6 Declare line[] in the outermost scope of retrieve() instead of
declaring it in an inner scope and then using it via a pointer
in the outer scope.

Reported by:    Coverity
CID:            605895
2016-05-13 01:52:41 +00:00
Don Lewis
e402dde82d Mark usage() as __dead2 so that Coverity doesn't think that execution
continues after the call and uses a negative array subscript.

Reported by:	Coverity
CID:		1305629
2016-05-13 01:14:38 +00:00
Don Lewis
a5f637460b Avoid indexing an array with a negative value.
Reported by:	Coverity
CID:		971121
2016-05-13 00:58:05 +00:00
Don Lewis
16a9eab953 Simplify some overly complex code so that both humans and Coverity
have a better chance of understanding it.

Reported by:	Coverity
CID:		1009684, 1006931
2016-05-13 00:50:53 +00:00
Don Lewis
4238b561f0 Use strlcpy() instead of strncpy() to ensure that qf->fsname is NUL
terminated.  Don't bother checking for truncation since the subsequent
stat() call should detect that and fail.

Reported by:	Coverity
CID:		1018189
MFC after:	1 week
2016-05-13 00:26:14 +00:00
Don Lewis
5d29410d37 Use strlcpy() instead of strncpy() to ensure that ret->name is
NUL terminated.  The source and destination buffers are the same
size and the source *should* be NUL terminated, but be paranoid.

Reported by:	Coverity
CID:		1011274
MFC after:	1 week
2016-05-13 00:17:57 +00:00
Don Lewis
3b7e0c53d5 Use strlcpy() instead of strncpy() to ensure that qup->fsname is NUL
terminated.  Don't bother checking for truncation since the subsequent
quota_read() should detect that and fail.

Reported by:	Coverity
CID:		1009980
MFC after:	1 week
2016-05-13 00:02:03 +00:00
Don Lewis
52af39633a If fchdir() fails, call err() instead of warn(). 2016-05-12 23:37:58 +00:00
Don Lewis
3694294ca5 Avoid Coverity NUL termination warning about strncpy() by using
memcpy() instead.  It's probably a bit more optimal in this case
anyway. [1]

The program logic leading up to the creation of the strncpy/memcpy
destination buffer is a bit hairy.  Add a call to assert() to make
it clear what is happening here and detect any potential buffer
overruns in the future.

Check a couple syscall error returns.  Ignore the EEXIST error from
link() to preserve existing behavior. [2] [3]

Reported by:	Coverity
CID:		1009659 [1], 1009349 [2], 1009350 [3]
2016-05-12 23:14:31 +00:00
Martin Matuska
ec0bb2035e Fix broken cpio behavior.
Suggested upstream as PR #704.

MFC:	1 month (together with libarchive 3.2.0)
2016-05-12 22:51:04 +00:00
Andriy Voskoboinyk
601a2543a0 net80211: drop some unused variables / local macros
Most of them left after some commits (r178354, r191544, r287197 etc.);
some were never used.

Found by:	Clang Static Analyzer
2016-05-12 22:17:00 +00:00
Conrad Meyer
9183be81a7 stdio.h: Fix function-type typedef style and use _types.h __ssize_t
I'm still not sure why only Pypy runs into the error with the function
typedefs.  Fix it anyway.

Use __ssize_t instead of ssize_t for the types; it's possible for the size_t
type to not be visible if at the wrong POSIX_VISIBLE level.

A final (crossing my fingers) follow-up to r299456.

Sponsored by:	EMC / Isilon Storage Division
2016-05-12 22:13:12 +00:00
Don Lewis
90abdc2dd7 Use strlcpy() instead of strncpy() when copying to dom_domain to
ensure that the latter is NUL terminated since it is passed
as an argument to *printf().

Warn about NIS domains that are too long.

Reported by:	Coverity
CID:		1009620, 1009621
MFH:		1 week
2016-05-12 21:35:40 +00:00
Conrad Meyer
1deb20f631 libc: Actually export fopencookie(3)
A follow-up to r299456.

Sponsored by:	EMC / Isilon Storage Division
2016-05-12 21:30:22 +00:00
Conrad Meyer
6710d21d9f Pollute more places with off64_t and add __off64_t
Despite the private namespace, several broken ports depend on the __off64_t
name for the type.  Export it exactly the same way off_t and __off_t are
exported.

A follow-up to r299456.

Suggested by:	php56
Sponsored by:	EMC / Isilon Storage Division
2016-05-12 21:18:17 +00:00
Oleksandr Tymoshenko
81d3ea9f28 Add loadable module for gpiokeys 2016-05-12 20:20:54 +00:00
Oleksandr Tymoshenko
3c977d6f36 Fix detach routine for gpiokeys
- Release pin only when all per=key callouts are stopped
- Unregister keyboard when detaching device node
2016-05-12 20:15:23 +00:00
Oleksandr Tymoshenko
f058b6fbee Properly release mapped pin in gpio_pin_release 2016-05-12 20:13:16 +00:00
Oleksandr Tymoshenko
3381a3898a Add gpiobus_release_pin function to release mapped pin
Add gpiobus_release_pin as a counterpart for gpiobus_map_pin. Without it
it's impossible to properly release pin so if kernel module is reloaded
it can't re-use pins again
2016-05-12 20:12:45 +00:00
Nick Hibma
3868814725 Add myself to the list of src committers. I've never been added it
seems.
2016-05-12 20:04:09 +00:00
Nick Hibma
6d07c1575b Allow silencing of 'promiscuous mode enabled/disabled' messages.
PR:		166255
Submitted by:	eugen.grosbein.net
Obtained from:	eugen.grosbein.net
MFC after:	1 week
2016-05-12 19:42:13 +00:00
Steven Kreuzer
16403ff439 Document r296633, OpenSSH updated to 7.2p2.
Approved by:	gjb@ (implicit with re@ hat on)
2016-05-12 19:32:40 +00:00
Eric Joyner
6bb8f4f665 ixl: Re-add a change to TC0 setup made in D5203.
Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:22:34 +00:00
Eric Joyner
d4683565fd ixl: Update to 1.4.27-k.
Changes:

Kevin Scott		i40e-shared: Save off VSI resource count when updating VSI
Anjali Singhai Jain	i40e-shared: Expose some registers to program parser, FD and RSS logic
Eric Joyner		ixl: Fix errors in queue interrupt setup in MSIX mode.
Shannon Nelson		i40e-shared: implement and use rx ctl helper functions
Shannon Nelson		i40e-shared: don't use AQ calls from clear_hw
Eric Joyner		ixl: Use rx ctl read/write functions instead of register accesses in certain places.
Shannon Nelson		i40e-shared: add adminq commands for rx ctl registers
Shannon Nelson		i40e-shared: implement and use rx ctl helper functions
Jeremiah Kyle		i40e-shared: Corrected function name in comment block
Deepthi Kavalur		i40e-shared: correcting a HW capability display info
Shannon Nelson		i40e-shared: fixups for (Linux) upstream consistency
Eric Joyner		ixl: Only stop firmware's LLDP agent on older firmware versions.

Differential Revision:  https://reviews.freebsd.org/D6211
Reviewed by:    sbruno, kmacy, jeffrey.e.pieper@intel.com
MFC after:      2 weeks
Sponsored by:   Intel Corporation
2016-05-12 18:22:12 +00:00