Commit Graph

207519 Commits

Author SHA1 Message Date
Eric van Gyzen
50d901977a bsdinstall: Suggest the GPT+Active workaround on Dell T5810
The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Reviewed by:	allanjude, dteske
MFC after:	5 days
Relnotes:	We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:	Dell Inc.
Differential Revision:	https://reviews.freebsd.org/D4075
2016-01-14 00:31:00 +00:00
Eric van Gyzen
8e402f34b9 libthr: const-ify two variables
Make the default umutex and urwlock initializers const,
because they can be, and as a microoptimization.

MFC after:	5 days
Sponsored by:	Dell Inc.
2016-01-13 22:34:55 +00:00
Brooks Davis
216818a1bb Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206178
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
MFC after:	1 week
2016-01-13 21:50:08 +00:00
Brooks Davis
cd3dbc2573 Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR:		206177
Submitted by:	Alexander Cherepanov <cherepan@mccme.ru>
MFC after:	1 week
2016-01-13 21:49:01 +00:00
Marius Strobl
e12a9f251e Given that em(4), lem(4) and igb(4) hardware doesn't require the
alignment guarantees provided by m_defrag(9), use m_collapse(9)
instead for performance reasons.
While at it, sanitize the statistics softc members, i. e. retire
unused ones and add SYSCTL nodes missing for actually used ones.

Differential Revision:	https://reviews.freebsd.org/D4717
2016-01-13 21:47:27 +00:00
Andrew Turner
f5e45e53f9 Add support for relocating AArch64 modules to kldxref. This fixes an error
message where it fails to read the module as the unrelocated addresses
are zero.

Sponsored by:	ABT Systems Ltd
2016-01-13 21:34:15 +00:00
Jean-Sébastien Pédron
fe8e65ae3d drm: Revert the part of r288653 about M_WAITOK vs M_NOWAIT
Using M_NOWAIT could lead to transient failures with ioctls.

Suggested by:	kib
2016-01-13 20:35:02 +00:00
Jean-Sébastien Pédron
bd2ebb612d drm/i915: Further reduce the diff with Linux 3.8
There is no functional change. The goal is to ease the future update to
Linux 3.8's i915 driver.
2016-01-13 19:52:25 +00:00
Jung-uk Kim
4ec1c9bfac Remove dead code when the target processor has POPCNT instruction. 2016-01-13 19:19:50 +00:00
Steven Hartland
4b09a8fdbc Improve non-interactive forth cmd error reporting
Non-interactive forth command errors where silent even for critical issues
e.g. failing to load a required kernel module or mfs_root.

This resulted in later unexplained and hard to trace errors such as mount
root failures.

This introduces additional command return codes that are treated
appropriately by the non-interactive command processor (bf_command).
* CMD_CRIT = print error
* CMD_FATAL = panic

Also fix minor style(9) issues with command_load return codes.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-13 18:33:12 +00:00
Baptiste Daroussin
1da56163f2 Remove some unneeded headers 2016-01-13 17:59:12 +00:00
Alan Somers
0191f57ff1 Fix Coverity warnings regarding r293229
rpcbind/check_bound.c
	Fix CID1347798, a memory leak in mergeaddr.

rpcbind/tests/addrmerge_test.c
	Fix CID1347800 through CID1347803, memory leaks in ATF tests.  They
	are harmless because each ATF test case runs in its own process, but
	they are trivial to fix.  Fix a few other leaks that Coverity didn't
	detect, too.

Coverity CID:	1347798, 1347800, 1347801, 1347802, 1347803
MFC after:	2 weeks
X-MFC-With:	293229
Sponsored by:	Spectra Logic Corp
2016-01-13 17:33:50 +00:00
Andrew Turner
fafb1ee7bd Remove the compat code to handle the kernel passing us an unalinged
stackpointer. Userland expects the kernel to pass it an aligned sp and
pass a pointer to the arguments in x0. The kernel side was updated in
r289502, 3 months ago.

Sponsored by:	ABT Systems Ltd
2016-01-13 15:54:17 +00:00
Steven Hartland
88b85228a4 Increase efiboot.img size used in ISO creation
Due to recent and upcoming changes to add additional functionality to
the EFI loader its now bigger than the space allocates for efiboot.img
so increase this in line with boot1.efifat.

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-13 14:47:13 +00:00
Ian Lepore
739e2464e9 Fix the spelling of fueword* to eliminate compile warnings about mismatched
begin/end symbols when the warning level is turned up.

Submitted by:	Steve Kiernan <stevek@juniper.net>
2016-01-13 14:39:39 +00:00
Alexander V. Chernikov
0eb64f4e44 Remove RTF_RNH_LOCKED support from rtalloc1_fib().
Last caller using it was eliminated in r293471.

Sponsored by:	Yandex LLC
2016-01-13 14:32:48 +00:00
Michael Tuexen
fa89f69240 Store the timer type for logging, because the timer can be freed
during processing the timerout.

MFC after:	3 days
2016-01-13 14:28:12 +00:00
Konstantin Belousov
a53b7c692d Make devfs_fpdrop() static. It was not a public KPI, and it has no
reason to remain exported for some time.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-01-13 14:03:06 +00:00
Konstantin Belousov
c77f6350ee Move the funsetown(9) call from audit_pipe_close() to cdevpriv
destructor.  As result, close method becomes trivial and removed.
Final cdevsw close method might be called without file
context (e.g. in vn_open_vnode() if the vnode is reclaimed meantime),
which leaves ap_sigio registered for notification, despite cdevpriv
destructor frees the memory later.

Call destructor instead of doing a cleanup inline, for
devfs_set_cdevpriv() failure in open.  This adds missed funsetown(9)
call and locks ap to satisfy audit_pipe_free() invariants.

Reported and tested by:	pho (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-01-13 14:02:07 +00:00
Konstantin Belousov
7ea3f72efb Switch legacy pty clone handler to use make_dev_s(9). Add
MAKEDEV_CHECKNAME flag to the call, this is required to not panic on
race between the clone and destructing the closed master.

Reported by and discussed with:	bde
Tested by:	pho (as part of the larger patch)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2016-01-13 12:01:28 +00:00
Enji Cooper
09d986419d Integrate
tools/regression/geom_{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}
in to the FreeBSD test suite as
tests/sys/geom/class/{concat,eli,gate,mirror,nop,raid3,shsec,stripe,uzip}

The tools/regression/geom and tools/regression/geom_part testcases are being
left alone because both test sets are both currently broken.

The majority of this work was done on ^/user/ngie/more-tests2 . The differences
are as follows:
- tests/sys/geom/class/Makefile.inc is not present; it was
  inlined into the class's Makefiles for explicitness.
- The testcases officially require root via kyua
- The geom_gate(4) tests don't use the pidfile changes proposed in
  https://reviews.freebsd.org/D4836 .

MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
2016-01-13 09:14:27 +00:00
Andrew Rybchenko
6e4d48127c sfxge: cleanup: fix return code types
Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-13 08:09:28 +00:00
Andrew Rybchenko
e02305fc28 sfxge: cleanup: fix typo in unused EFX_QWORD_IS_SET64
Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-13 07:55:47 +00:00
Andrew Rybchenko
86ec4b8565 sfxge: cleanup: prefast fixes in common code
Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-13 07:46:21 +00:00
Enji Cooper
7de2d9ec2f Add conf.sh file missed in r293621
MFC after: 16 days
Sponsored by: EMC / Isilon Storage Division
2016-01-13 07:31:59 +00:00
Andrew Rybchenko
47d4cf2347 sfxge: cleanup: simplify EFX header includes
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-13 07:25:51 +00:00
Andrew Rybchenko
51fd644178 sfxge: define FATSOv2 option descriptors
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-13 07:11:43 +00:00
Andrew Rybchenko
88cbf0f746 sfxge: add Medford firmware subtypes definitions
Pulled firmware_ids.h from firmwaresrc and applied genfwdef script.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4897
2016-01-13 06:47:47 +00:00
Andrew Rybchenko
4c28e9bcc2 sfxge: support MC_CMD_GET_CAPABILITIES_V2
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4896
2016-01-13 06:45:05 +00:00
Andrew Rybchenko
bce88e313d sfxge: simplify conversion of NVRAM types to/from partition ids
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4895
2016-01-13 06:44:05 +00:00
Andrew Rybchenko
0a68758097 sfxge: simplify MCDI request start
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4894
2016-01-13 06:42:51 +00:00
Andrew Rybchenko
426f453b52 sfxge: note VI_SHIFT reported in ALLOC_VIS response
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4892
2016-01-13 06:41:39 +00:00
Andrew Rybchenko
0badfd7281 sfxge: rework RX prefix handling in the common code
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4889
2016-01-13 06:40:00 +00:00
Andrew Rybchenko
1b02e3c0cf sfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT
The EFSYS_OPT_RX_HDR_SPLIT optional feature in the common code
implemented the Lookahead Split feature of Windows. This split
received packets at a preconfigured byte offset, and delivered
the header and payload portions to separate receive queues.

Now the common code interface has no callers, so remove it.

Note that this should not be confused with the Header Data Split
feature of Windows, which splits packets at a header boundary.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4888
2016-01-13 06:37:45 +00:00
Andrew Rybchenko
a78d512838 sfxge: rename common hunt NIC methods to ef10
Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4880
2016-01-13 06:34:51 +00:00
Marcelo Araujo
3bf7d9a6eb ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).
This commit, fix a core dump on ypldap(8) related with memory allocation.
Also an example of how to set the ypldap.conf(5) properly is added to
examples files.

A new user _ypldap is required to be able to run ypldap(8) as well as
in a chroot mode.

Reviewed by:	rodrigc (mentor), bjk
Approved by:	bapt (mentor)
Relnotes:	Yes
Sponsored by:	gandi.net
Differential Revision:	https://reviews.freebsd.org/D4744
2016-01-13 01:49:35 +00:00
Steven Hartland
1b383bfca2 Fix typo in libefi.c
Fix a typo in libefl.c (removal or L) introduced by r293724

MFC after:	2 weeks
X-MFC-With:	r293268
Sponsored by:	Multiplay
2016-01-13 00:37:28 +00:00
Ian Lepore
d45f99dee1 Go back to using uintptr_t, because code that actually compiles is
infinitely less buggy than code that is theoretically correct in some
alternate universe.

The uintfptr_t type is apparently a freebsd invention, and exists only when
compiling the kernel.  It's a little hard to say for sure, since it doesn't
seem to be documented anywhere except in email advice to unsuspecting and
overly-trusting souls, who then get to wear the pointy hat for blindly
following advice without investigating or testing it first.
2016-01-13 00:22:12 +00:00
Jilles Tjoelker
b956ae7c20 Update futimens/utimensat for MFC to stable/10:
* Fix __FreeBSD_version check.
* Update history section in man page.

An MFC of this commit to stable/10 will allow using the new system calls
instead of the fallback.

MFC after:	3 days
2016-01-12 20:53:57 +00:00
Ian Lepore
fdfbb3f5b1 Restore uart PPS signal capture polarity to its historical norm, and add an
option to invert the polarity in software. Also add an option to capture
very narrow pulses by using the hardware's MSR delta-bit capability of
latching line state changes.

This effectively reverts the mistake I made in r286595 which was based on
empirical measurements made on hardware using TTL-level signaling, in which
the logic levels are inverted from RS-232. Thus, this re-syncs the polarity
with the requirements of RFC 2783, which is writen in terms of RS-232
signaling.

Narrow-pulse mode uses the ability of most ns8250 and similar chips to
provide a delta indication in the modem status register. The hardware is
able to notice and latch the change when the pulse width is shorter than
interrupt latency, which results in the signal no longer being asserted by
time the interrupt service code runs. When running in this mode we get
notified only that "a pulse happened" so the driver synthesizes both an
ASSERT and a CLEAR event (with the same timestamp for each). When the pulse
width is about equal to the interrupt latency the driver may intermittantly
see both edges of the pulse. To prevent generating spurious events, the
driver implements a half-second lockout period after generating an event
before it will generate another.

Differential Revision:	https://reviews.freebsd.org/D4477
2016-01-12 18:42:00 +00:00
Ian Lepore
c1f892e0d1 Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
because rounding down cannot increase the number of bits needed to express
the result.

I had no idea there was such a thing as uintfptr_t.

Requested by: bde
2016-01-12 16:31:07 +00:00
Andrew Rybchenko
16b3294e2f sfxge: regenerate MCDI header
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
2016-01-12 16:21:34 +00:00
Andrew Rybchenko
1759d5d5e7 sfxge: remove obsolete lookahead split RXQ support
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4891
2016-01-12 15:35:00 +00:00
Andrew Rybchenko
219e008793 sfxge: pass context type and num_queues to efx_mcdi_rss_context_alloc
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4890
2016-01-12 15:33:48 +00:00
Svatopluk Kraus
339d7dad7a Fix local macro for early KVA allocation.
Only crashdumpmap allocation was affected which is used for temporary
mappings during panic dump.

Approved by:	kib (mentor)
2016-01-12 15:31:32 +00:00
Andrew Rybchenko
8eea4a0acb sfxge: cleanup: use consistent types for NVRAM partitions
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4887
2016-01-12 15:31:20 +00:00
Andrew Rybchenko
0c24a07e20 sfxge: fix interrupt handling for Medford
Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4886
2016-01-12 15:28:59 +00:00
Andrew Rybchenko
f5969609b9 sfxge: update NVRAM partition lookup for Medford
Prior to Medford, option ROM config was stored with one partition
per network port. Medford stores option ROM config in a single
partition (as an array of configurations, one per PF).

Update the EFXname /port to MCDI partition mapping for this.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4885
2016-01-12 15:28:10 +00:00
Andrew Rybchenko
3d385f4e51 sfxge: cleanup: improve consistency in efx_check.h
Make error messages consistent, and remove redundant checks.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4884
2016-01-12 15:27:11 +00:00
Andrew Rybchenko
74bb0ed8b9 sfxge: remove obsolete efx_mac_hash_set() from common code
This API has been replaced by efx_mac_multicast_list_set()
and has no callers.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4883
2016-01-12 15:26:17 +00:00