Commit Graph

197816 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
e595e65b8a Add uefisign(8), UEFI Secure Boot signing utility.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 09:15:24 +00:00
Edward Tomasz Napierala
f584f51d96 Add missing error check.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 09:08:48 +00:00
Dimitry Andric
4c991ff32f Fix a number of -Wcast-qual warnings under sys/arm. No functional
change.

Submitted by:	andrew
MFC after:	3 days
2015-02-26 07:47:35 +00:00
Dimitry Andric
9e950417ce In sys/arm/ti/am335x/am335x_rtc.c, fix a clang 3.6.0 warning about
am33x_rtc_softc::sc_irq_res (which is an array) never being NULL.

Submitted by:	andrew
MFC after:	3 days
2015-02-26 07:45:40 +00:00
Dimitry Andric
fb48e1d39c Since newer versions of compiler-rt require unwind.h, and we want to use
the copy in libcxxrt for it, fix the arm-specific header to define the
_Unwind_Action type.

Submitted by:	andrew
MFC after:	3 days
2015-02-26 07:42:16 +00:00
Dimitry Andric
a0f4b91bed Make libcxxrt's parsing of DWARF exception handling tables work on
architectures with strict alignment, by using memcpy() instead of
directly reading fields.

Reported by:	Daisuke Aoyama <aoyama@peach.ne.jp>
Reviewed by:	imp, bapt
Tested by:	bapt
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D1967
2015-02-26 07:20:05 +00:00
Jayachandran C.
5441635eb0 Remove run-time allocation of XLP IRQs
Follow the same static IRQ to Interrupt Table Entry mapping as the other
OS supported on XLP.
2015-02-26 02:22:47 +00:00
Jayachandran C.
70abc1ff8e Add netlogic,xlp-pic as interrupt controller for XLP
Add an empty driver for netlogic,xlp-pic to ensure that the device tree
is correct and has an interrupt controller.
2015-02-26 02:05:45 +00:00
Jayachandran C.
fb3ba470da Fix up interrupt definitions for Broadcom XLP
Gather all the IRQ definitions to interrupt.h. Earlier these were in xlp.h
and pic.h.  Update the definition of XLP_IRQ_IS_PICINTR to check for last
irq as well.
2015-02-26 01:53:24 +00:00
Ed Maste
4b8807a4d3 GNU nm: Avoid NULL dereference
bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr,
which resulted in a crash on certain ELF objects.

This change was implemented independently from upstream binutils, but
I have checked that the crash does not happen there.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-02-25 22:12:37 +00:00
Adrian Chadd
75493a82e0 Remove taskqueue_start_threads_pinned(); there's noa generic cpuset version of this.
Sponsored by:	Norse Corp, Inc.
2015-02-25 21:59:03 +00:00
Adrian Chadd
977dc4e243 Migrate using CPU_ZERO() + CPU_SET() -> CPU_SETOF().
Tested:

* ixgbe, igb, RSS enabled

Submitted by:	jhb
Sponsored by:	Norse Corp, Inc.
2015-02-25 21:44:53 +00:00
Ed Maste
0b93a0b462 nm: avoid crash in print_lineno if func->name is NULL
This can occur when DW_AT_specification is used to refer to another DIE
that provides the actual DW_AT_name string. For example:

< 3><0x00000086> DW_TAG_subprogram
                   DW_AT_name              PrettyStackTraceEntry
...
< 1><0x00002cf4> DW_TAG_subprogram
                   DW_AT_specification     <0x00000086>

We will need to add support for DW_AT_specification, but in the interim
we should not segfault.

Obtained from:	Elftoolchain (r3170)
Sponsored by:	The FreeBSD Foundation
2015-02-25 21:43:09 +00:00
Hans Petter Selasky
39b86a6a6f Update to upstream version 2.10
The most notable new feature is support for definition files.

Obtained from:	http://dotat.at/prog/unifdef
MFC after:	1 week
2015-02-25 21:10:03 +00:00
Xin LI
3b557094a2 Explicitly crypt_set_format("des") and bail out if we
can't.  This would prevent problem when we changed the
default crypt(3) algorithm or removed it in the future.

PR:		bin/189958
MFC after:	1 month
2015-02-25 20:47:25 +00:00
Marcel Moolenaar
65f2833127 Fix "netstat -hdw 1" output.
Reported by: np@
2015-02-25 17:06:27 +00:00
Konstantin Belousov
45bc78eb45 For now, disable x2APIC mode when Xen is detected, even if CPU
declares support for it.  Newer versions of Xen works fine with x2APIC
code, but e.g. Xen 4.2 delivers GPF on the LAPIC MSR write, despite
x2APIC mode being known to hypervisor.

Discussed with:	royger
Sponsored by:	The FreeBSD Foundation
2015-02-25 16:44:07 +00:00
Konstantin Belousov
3e6d2e9b4e Propagate errors from _thr_umutex_unlock2 through mutex_unlock_common.
Errors from _thr_umutex_unlock2 should "never happen" in normal
circumstances.  If they do, however, return them to the application
so it can fail early and loudly.  Hiding the errors will only delay
the inevitable failure, making it harder to find and diagnose.

Submitted by:	Eric van Gyzen <eric_van_gyzen@dell.com>
Obtained from:	Dell Inc.
PR:	198914
MFC after:	1 week
2015-02-25 16:18:26 +00:00
Konstantin Belousov
84b736b268 When failing to claim ownership of a umtx_pi, restore the umutex owner
to its previous, unowned state.  This avoids compounding an existing
problem of inconsistent ownership.

Submitted by:	Eric van Gyzen <eric_van_gyzen@dell.com>
Obtained from:	Dell Inc.
PR:	198914
MFC after:	1 week
2015-02-25 16:17:16 +00:00
Konstantin Belousov
cc876d2c5c When unlocking a contested PI pthread mutex, if the queue of waiters
is empty, look up the umtx_pi and disown it if the current thread owns it.
This can happen if a signal or timeout removed the last waiter from
the queue, but there is still a thread in do_lock_pi() holding a reference
on the umtx_pi.  The unlocking thread might not own the umtx_pi in this case,
but if it does, it must disown it to keep the ownership consistent between
the umtx_pi and the umutex.

Submitted by:	Eric van Gyzen <eric_van_gyzen@dell.com>
	with advice from: Elliott Rabe and Jim Muchow, also at Dell Inc.
Obtained from:	Dell Inc.
PR:	198914
2015-02-25 16:12:56 +00:00
Hans Petter Selasky
9c0f6aa762 Fix a special case in ip_fragment() to produce a more sensible chain
of packets. When the data payload length excluding any headers, of an
outgoing IPv4 packet exceeds PAGE_SIZE bytes, a special case in
ip_fragment() can kick in to optimise the outgoing payload(s). The
code which was added in r98849 as part of zero copy socket support
assumes that the beginning of any MTU sized payload is aligned to
where a MBUF's "m_data" pointer points. This is not always the case
and can sometimes cause large IPv4 packets, as part of ping replies,
to be split more than needed.

Instead of iterating the MBUFs to figure out how much data is in the
current chain, use the value already in the "m_pkthdr.len" field of
the first MBUF in the chain.

Reviewed by:		ken @
Differential Revision:	https://reviews.freebsd.org/D1893
MFC after:		2 weeks
Sponsored by:		Mellanox Technologies
2015-02-25 13:58:43 +00:00
Alexander Motin
0b1b7c2cec Replace constant with proper sizeof().
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2015-02-25 10:18:11 +00:00
Alexander Motin
678b68798f Fix memory leak on incorrect initiator portal.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	3 days
2015-02-25 10:10:40 +00:00
Alexander Motin
16fa28094c Add checks for malloc() failures.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	3 days
2015-02-25 10:07:39 +00:00
Alexander Motin
772747e2ee Fix potential NULL dereference.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2015-02-25 09:57:05 +00:00
Hans Petter Selasky
6fc22e8f35 Add ugen keyword to USB pnpinfo. Remove extra space from existing pnpinfo.
PR:		198015
PR:		198019
PR:		198026
MFC after:	1 week
2015-02-25 08:35:00 +00:00
Colin Percival
eb51316b50 Adjust wording slightly to emphasize that random(3) should not be used for
any applications which need unpredictable random numbers, not merely those
which are cryptographic in nature.

If you work for a lottery and you're using random(3) to select the winning
numbers, please let me know.
2015-02-25 07:49:15 +00:00
Andrew Rybchenko
e02196c57f sfxge: add to config files
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-25 06:20:42 +00:00
Andrew Rybchenko
f86f4cd2ae sfxge: use tab to indent instead of spaces
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-25 06:19:23 +00:00
Andrew Rybchenko
75ba9e1e51 sfxge: correct limit for number of Rx queues
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-25 06:19:00 +00:00
Xin LI
cfa498d88e Fix integer overflow in IGMP protocol.
Security:	FreeBSD-SA-15:04.igmp
Security:	CVE-2015-1414
Found by:	Mateusz Kocielski, Logicaltrust
Analyzed by:	Marek Kroemeke, Mateusz Kocielski (shm@NetBSD.org) and
		22733db72ab3ed94b5f8a1ffcde850251fe6f466
Submited by:	Mariusz Zaborski <oshogbo@FreeBSD.org>
Reviewed by:	bms
2015-02-25 05:42:59 +00:00
Kenneth D. Merry
7b7c7a0533 Fix several problems found by Coverity.
lib/libmt/mtlib.c:
	In mt_start_element(), make sure we don't overflow the
	cur_sb array.  CID 1271325

usr.bin/mt/mt.c:
	In main(), bzero the mt_com structure so that we aren't
	using any uninitialized stack variables.  CID 1271319

	In mt_param(), only allow one -s and one -p argument.  This
	will prevent a memory leak caused by overwriting the
	param_name and/or param_value variables.  CID 1271320 and
	CID 1271322

	To make things simpler in mt_param(), make sure there
	there is only one exit path for the function.  Make sure
	the arguments are explicitly freed.

Sponsored by:	Spectra Logic
Pointed out by:	emaste
MFC after:	1 month
2015-02-25 04:30:23 +00:00
Glen Barber
dc1c45001a Add a CLOUDPACKAGE variable to contain a list of targets for
post-install packaging cloud provider images.

Add a 'gce-package.sh' script to generate the final output
image ready for upload to the GCE platform.  Right now, this
is the only image that has a specific output format (GNU-tar),
and this implementation is expected to be temporary.

This is not directly connected to the other release targets.

MFC after:	1 week
X-MFC-with:	r279249, r279250
Sponsored by:	The FreeBSD Foundation
2015-02-24 22:27:02 +00:00
Brad Davis
2cf395883e Fix a race condition by allowing up to 5 seconds of difference between the time stamps.
PR:		197861
Approved by:	will
2015-02-24 22:22:06 +00:00
Adrian Chadd
9756bd5982 Change uses of taskqueue_start_threads_pinned() -> taskqueue_start_threads_cpuset()
Differential Revision:	https://reviews.freebsd.org/D1897
Reviewed by:	jfv
2015-02-24 22:17:12 +00:00
Stephen McConnell
ef065d89e9 - Updated all files with 2015 Avago copyright, and updated LSI's copyright
dates.

- Changed all of the PCI device strings from LSI to Avago Technologies (LSI).

- Added a sysctl variable to control how StartStopUnit behavior works. User can
  select to spin down disks based on if disk is SSD or HDD.

- Inquiry data is required to tell if a disk will support SSU at shutdown or
  not. Due to the addition of mpssas_async, which gets Advanced Info but not
  Inquiry data, the setting of supports_SSU was moved to the
  mpssas_scsiio_complete function, which snoops for any Inquiry commands. And,
  since disks are shutdown as a target and not a LUN, this process was
  simplified by basing it on targets and not LUNs.

- Added a sysctl variable that sets the amount of time to retry after sending a
  failed SATA ID command. This helps with some bad disks and large disks that
  require a lot of time to spin up. Part of this change was to add a callout to
  handle timeouts with the SATA ID command. The callout function is called
  mpssas_ata_id_timeout(). (Fixes PR 191348)

- Changed the way resets work by allowing I/O to continue to devices that are
  not currently under a reset condition. This uses devq's instead of simq's and
  makes use of the MPSSAS_TARGET_INRESET flag. This change also adds a function
  called mpssas_prepare_tm().

- Some changes were made to reduce code duplication when getting a SAS address
  for a SATA disk.

- Fixed some formatting and whitespace.

- Bump version of mps driver to 20.00.00.00-fbsd

PR:		191348
Reviewed by:	ken, scottl
Approved by:	ken, scottl
MFC after:	2 weeks
2015-02-24 22:07:42 +00:00
Nathan Whitehorn
827cc9b981 New pmap implementation for 64-bit PowerPC processors. The main focus of
this change is to improve concurrency:
- Drop global state stored in the shadow overflow page table (and all other
  global state)
- Remove all global locks
- Use per-PTE lock bits to allow parallel page insertion
- Reconstruct state when requested for evicted PTEs instead of buffering
  it during overflow

This drops total wall time for make buildworld on a 32-thread POWER8 system
by a factor of two and system time by a factor of three, providing performance
20% better than similarly clocked Core i7 Xeons per-core. Performance on
smaller SMP systems, where PMAP lock contention was not as much of an issue,
is nearly unchanged.

Tested on:	POWER8, POWER5+, G5 UP, G5 SMP (64-bit and 32-bit kernels)
Merged from:	user/nwhitehorn/ppc64-pmap-rework
Looked over by:	jhibbits, andreast
MFC after:	3 months
Relnotes:	yes
Sponsored by:	FreeBSD Foundation
2015-02-24 21:37:20 +00:00
Navdeep Parhar
1c468ed975 cxgbe(4): allow tx hardware checksumming on the netmap interface.
It is disabled by default but users can set IFCAP_TXCSUM on the
netmap ifnet (ifconfig ncxl0 txcsum) to override netmap and force
the hardware to calculate and insert proper IP and L4 checksums in
outbound frames.

MFC after:	2 weeks
2015-02-24 21:31:13 +00:00
Glen Barber
4e4c42d607 Remove a stale comment.
MFC after:	1 week
X-MFC-with:	r279249
Sponsored by:	The FreeBSD Foundation
2015-02-24 21:16:57 +00:00
Glen Barber
0e44fa6c1c Add 'cloudware-install' target to handle copying cloud
disk images to a directory within DESTDIR.

Add CLOUDINSTALL variable to automatically generate the
actual list of install targets.  While here, rename the
cloud-specific names from 'vm-' to 'cw-' to avoid naming
collisions.

Add AZURE_DISK, GCE_DISK, and OPENSTACK_DISK output file
variables.

Add 'cloudware-install' to the 'install' target.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-02-24 21:06:25 +00:00
Ed Maste
5dd72ff561 Unconditionally install debug directory hierarchy
This avoids various failure modes (e.g., when building and installing a
single binary with debug data on a system that otherwise does not have
it enabled).

It is also consistent with the way other directory hierarchies are
handled (e.g. share/man).

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D1962
2015-02-24 19:27:51 +00:00
Simon J. Gerraty
2ad4692912 If sys.mk were found via the magic path .../share/mk
replace it with the absolute path of .PARSEDIR, so that sub-makes
launched from objdirs (eg kernel) can still find the correct mk files.

Reviewed by:	obrien
2015-02-24 19:03:31 +00:00
Navdeep Parhar
1605bac6fb cxgbe(4): set up congestion management for netmap rx queues.
The hw.cxgbe.cong_drop knob controls the response of the chip when
netmap queues are congested.
2015-02-24 18:40:10 +00:00
Navdeep Parhar
b91cbdda76 cxgbe(4): do not set the netmap rxq interrupts on a hair-trigger.
MFC after:	2 weeks
2015-02-24 18:32:17 +00:00
Navdeep Parhar
b46fad7b6a cxgbe(4): wait for the hardware to catch up before destroying a netmap txq.
MFC after:	2 weeks
2015-02-24 18:22:24 +00:00
Navdeep Parhar
f8e30f9cf1 cxgbe(4): request an automatic tx update when a netmap txq idles.
MFC after:	2 weeks
2015-02-24 18:19:25 +00:00
Hans Petter Selasky
73e12bc91f Pass macro arguments properly.
MFC after:	1 week
2015-02-24 17:36:44 +00:00
Hans Petter Selasky
9090a24aed Fix order of arguments in the TRACEBUF_INITIALIZER macro so that we
can define QUEUE_MACRO_DEBUG to debug list problems.

MFC after:	1 week
2015-02-24 17:29:04 +00:00
Pedro F. Giffuni
d300dc2302 msun: drop unnecessary checks (part 2).
Drop an unnecessary check in some calculations. The check
would have Coverity falsely conclude that a variable could
be left undefined.
2015-02-24 16:45:16 +00:00
Ruslan Bukin
83dbea149e Enable 'receive timeout' interrupt allowing us to not
loose 'rx buffer full' event.

This fixes operation on ARMv8 Foundation Model.

Sponsored by:	DARPA, AFRL
2015-02-24 15:35:26 +00:00