Commit Graph

198085 Commits

Author SHA1 Message Date
Mark Johnston
b0ee912984 CTF containers use the ctf_dtoldid field as a threshold type index which
indicates the range of type indices which have been committed to the
container by ctf_update(). However, the top bit of the dtd_type field is
not part of the type index; rather, it is a flag used to indicate that the
corresponding CTF container is a parent. This is why the maximum CTF type
index is 2^15 - 1 rather than 2^16 - 1. Therefore, this flag must be masked
off (using the CTF_TYPE_TO_INDEX macro) when comparing a type index with the
ctf_dtoldid field of a container.

This bug was causing libctf to erroneously free committed type definitions
in ctf_discard(). libdtrace holds some references to such types, resulting
in a use-after-free.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-03-10 21:08:58 +00:00
Michael Tuexen
2bb7e77385 Unlock the stcb when using setsockopt() for the SCTP_PEER_ADDR_THLDS option.
MFC after: 3 days
2015-03-10 21:05:17 +00:00
Mark Johnston
ba8d15d3a8 ctf_discard(): fetch the next list element before restarting the loop. If
we end up skipping a dynamic type because it has already been committed to
the container, we would previously either set the loop variable to an
uninitialized local variable, or set it to itself, resulting in an infinite
loop.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-03-10 20:52:03 +00:00
Mark Johnston
26a222dc0c MFV r279822:
This merge is effectively a no-op since parts of it are already present
in FreeBSD, and the rest is incorrect since gelf_newehdr(3) and
gelf_newphdr(3) return pointers on FreeBSD rather than integers.

Illumos issue:
    5589 improper use of NULL in tools/ctf

MFC after:	3 days
2015-03-10 20:43:16 +00:00
Jack F Vogel
31830672a6 Replace the DEV_NETMAP code that accidentally got removed in the
last commit.

MFC after: 1 week
2015-03-10 19:55:43 +00:00
Michael Tuexen
59b6d5be4e Add a SCTP socket option to limit the cwnd for each path.
MFC after: 1 month
2015-03-10 19:49:25 +00:00
Jack F Vogel
56c2c47b64 This delta introduces SRIOV support, thanks to Ryan Stone of Sandvine for
adding this major feature to the driver. Secondly, this updates the base
driver with new 20G device support, and with the new firmware levels some
changes to link handling and initialization were required.

MFC after: 1 week
2015-03-10 19:17:40 +00:00
Eric van Gyzen
0f8b21ceb5 Add myself to the src committers graph, with kib as my mentor.
Approved by:    kib (mentor)
2015-03-10 17:45:46 +00:00
Steve Kargl
186f620727 According to POSIX.1-2008, the Bessel functions of second kind
should raise a divide-by-zero floating point exception for x = +-0
and an invalid floating point exception for x < 0 including x = -Inf.
Update the code to raise the exception and update the documentation
with hopefully better description of the behavior.

Reviewed by:	bde (code only)
2015-03-10 17:10:54 +00:00
Nathan Whitehorn
25023a8a88 Let unchangeable 8-bit frame buffers have vaguely correct colors.
MFC after:	2 weeks
2015-03-10 17:04:11 +00:00
Hans Petter Selasky
996f8471b1 Lock softc before clearing bits.
Found by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2015-03-10 16:06:07 +00:00
Nathan Whitehorn
276df218b9 Allow PowerMac systems to be booted from an FDT as well as Open Firmware.
This is not complete yet: the gem(4) interface on my laptop seems to
disappear from the PCI bus as a result of quiescing Open Firmware in the
boot loader.
2015-03-10 16:01:43 +00:00
Luiz Otavio O Souza
4a5fa7b2e3 Fix off-by-one bugs.
Spotted by:	rpaulo (on another review)
2015-03-10 14:55:05 +00:00
Edward Tomasz Napierala
7b74285f65 Fix typo.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 14:43:07 +00:00
Ian Lepore
868c7673d2 Remove MODULES_OVERRIDE="" for Marvel-based armv5 systems.
Also add some #NO_UNIVERSE to configs that essentially duplicate DB-88F6XXX.
2015-03-10 14:36:51 +00:00
Baptiste Daroussin
7d6e57b6c6 Add OpenBSD copyright for reallocarray
Move the function at the bottom of the misc.c file to clearly state the
copyright only stand for this function

PR:		198484
Submitted by:	logan@elandsys.com
2015-03-10 14:22:28 +00:00
Gleb Smirnoff
2c0cb02607 Fix function name in comment. 2015-03-10 13:06:54 +00:00
Edward Tomasz Napierala
61d75c3229 Properly pass options for direct maps.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 12:25:05 +00:00
Edward Tomasz Napierala
12f1f00c30 Fix handling of direct maps, broken in r275756. Previously, running
automount(8) would unmount direct map trigger nodes every second time.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 11:59:33 +00:00
Edward Tomasz Napierala
7a20e4799e Refactor.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-10 09:53:15 +00:00
Scott Long
cee9136cc6 Implement basic cpuset reporting in procstat via the -S flag.
Obtained from:	Netflix, Inc.
MFC after:	3 days
2015-03-10 09:41:48 +00:00
Michael Tuexen
8f290ed51b Fix a typo.
MFC after: 1 week
2015-03-10 09:16:31 +00:00
Ian Lepore
140e744269 Remove MODULES_OVERRIDE="" and WITHOUT_MODULES="ahc" from armv6 configs.
These are left over from long ago when there was no way to load modules
on early armv6 platforms, and when there was a build problem with ahc
that has long since been fixed, and they just keep getting copy-pasted
into new configs.
2015-03-10 02:33:51 +00:00
Ryan Stone
1761699194 Add missing counter definitions
Differential Revision:	https://reviews.freebsd.org/D1591
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:24:16 +00:00
Ryan Stone
bc0ad9a99d Fix Ivy Bridge+ MEM_UOPS_RETIRED counters
The MEM_UOPS_RETIRED actually work the same way as the Sandy
Bridge counters, but the counters were documented in a different
way and that seemed to cause the Ivy Bridge counters to be
implemented incorrectly.  Use the same counter definitions as
Sandy Bridge.  While I'm here, rename the counters to match
what's documented in the datasheet.

Differential Revision:	https://reviews.freebsd.org/D1590
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:24:08 +00:00
Ryan Stone
e31c323f95 Support architectural events on Haswell/Ivy Bridge
Differential Revision:	https://reviews.freebsd.org/D1589
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:24:02 +00:00
Ryan Stone
ae9975db34 Use the correct event table for Haswell Xeon events
Differential Revision:	https://reviews.freebsd.org/D1588
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:23:55 +00:00
Ryan Stone
9e60f3acd2 Fix Sandy Bridge+ hwpmc branch counters
On Sandy Bridge and later, to count branch-related events you
have to or together a mask indicating the type of branch
instruction to count (e.g. direct jump, branch, etc) and a bits
indicating whether to count taken and not-taken branches.  The
current counter definitions where defining this bits individually,
so the counters never worked and always just counted 0.

Fix the counter definitions to instead contain the proper
combination of masks.  Also update the man pages to reflect the
new counters.

Differential Revision:	https://reviews.freebsd.org/D1587
MFC after:	1 month
Sponsored by:	Sandvine Inc.
2015-03-10 01:23:47 +00:00
Ryan Stone
89d0633b86 Fix pmc unit restrictions to match documentation
A couple of pmc counters did not work because there were being
restricted to the wrong PMC unit.  I've verified that these
counters now work and match the documented restrictions.

Differential Revision:	https://reviews.freebsd.org/D1586
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:23:40 +00:00
Ryan Stone
d444c14119 Fix various bugs in Haswell counter definitions
1) The "WALK_COMPLETED_2M_4M" event incorrectly referenced 4K pages.
2) The umask for RING0 and RING123 events was reversed.

Differential Revision:	https://reviews.freebsd.org/D1585
MFC after:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:23:34 +00:00
Ryan Stone
f1ec0939ec Add manpage for Haswell Xeon pmc implementation
Differential Revision:	https://reviews.freebsd.org/D1584
Reviewed by:	gnn
MFC After:	1 month
Sponsored by:	Sandvine Inc
2015-03-10 01:22:43 +00:00
Ian Lepore
023911aa01 Use the new ifnet API. Also, allocate bus_dma_maps as needed instead of
pre-allocating them all at start-up.  Also fix a bug in cgem_stop(); before,
it wasn't properly unloading dma maps due to a cut-and-paste error.
2015-03-09 22:39:58 +00:00
Ian Lepore
b1029a9bc8 Revert accidentally commited file from r279824. We're not quite ready to
enable dtrace module building on all arm platforms yet.
2015-03-09 22:01:57 +00:00
Ian Lepore
3e096b705c Change the name of the dmtimer pps device from /dev/ppsN to /dev/dmtppsN.
ntpd is hard-coded to use /dev/ppsN, and typically when multiple PPS sources
are available the sysadmin will symlink the right one(s) to /dev/ppsN, so
it's best to not usurp those names directly.
2015-03-09 21:58:41 +00:00
Ian Lepore
f61d8cc6fe Remove the static DTB config and instead build modules/dtb/am335x.
Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around
build problems that have long since been fixed correctly.

PR:		198460
2015-03-09 21:54:27 +00:00
Ian Lepore
7115aa8d18 Add a dtb module for AM335x systems (just Beaglebone right now). 2015-03-09 21:50:10 +00:00
Mark Johnston
168b1a758b 5589 improper use of NULL in tools/ctf
Reviewed by: David Höppner <0xffea@gmail.com>
Reviewed by: Josef "Jeff" Sipek <jeffpc@josefsipek.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Richard PALO <richard@NetBSD.org>

illumos/illumos-gate@ad0b1ea5d6
2015-03-09 20:43:14 +00:00
Julien Charbon
eb96dc3336 In TCP, connect() can return incorrect error code EINVAL
instead of EADDRINUSE or ECONNREFUSED

PR:			https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196035
Differential Revision:	https://reviews.freebsd.org/D1982
Reported by:		Mark Nunberg <mnunberg@haskalah.org>
Submitted by:		Harrison Grundy <harrison.grundy@astrodoggroup.com>
Reviewed by:		adrian, jch, glebius, gnn
Approved by:		jhb
MFC after:		2 weeks
2015-03-09 20:29:16 +00:00
Jung-uk Kim
be070eb896 Fix a typo in comment and explain the reason. 2015-03-09 20:26:42 +00:00
Xin LI
394e3bd088 Fix CARP when in use in a HyperV environment:
- Bump link state when stopping or starting the interface;
 - Don't handle SIOCGIFADDR specially, similar to r277103.

This change is based on a previous revision from Andy Zhang
(Microsoft) who did the diagnostic work and many thanks to
them for their help in supporting the HyperV work.

PR:		kern/187203
MFC after:	2 weeks
2015-03-09 20:11:16 +00:00
Ian Lepore
726f3ad5aa Attach the prcm clock driver early, so it can set the mpcore timer frequency.
Submitted by:	Svatopluk Kraus
2015-03-09 15:54:14 +00:00
Edward Tomasz Napierala
5d44d58834 Erm, revert chunk committed by mistake.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:44:36 +00:00
Warner Losh
601e4171b4 Add the DTrace modules to the build, rather than only build the dtrace
modules.
2015-03-09 15:43:33 +00:00
Edward Tomasz Napierala
6d8e60c342 Make things more readable; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:31:33 +00:00
Edward Tomasz Napierala
ef4b8dfad7 Remove some particularly bad code; no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 15:20:12 +00:00
Ian Lepore
a286c311ab Add minimum cache line sizes to struct cpuinfo, use them in the new cache
maintenance routines.  Also add a routine to invalidate the branch cache.

Submitted by:	Michal Meloun
2015-03-09 14:46:10 +00:00
Ian Lepore
5ca6daaa26 Clean data cache before instruction cache in armv7_icache_sync_range().
Also ensure dsb precedes isb in all icache maintenance routines (first
do a data sync, then stall the instruction stream until it finishes).

Submitted by:	Michal Meloun
2015-03-09 14:42:25 +00:00
Edward Tomasz Napierala
8f0eba6738 Fix memory leak.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:21:00 +00:00
Edward Tomasz Napierala
5585582d14 Improve separated_concat() to properly handle the case of concatenating
"/" and "/foo".

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 13:00:59 +00:00
Edward Tomasz Napierala
1bc6f46438 Minor optimization/cleanup in node_path(); no functional changes.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-03-09 11:59:58 +00:00