Carl Love [Mon, 20 Jul 2015 22:22:42 +0000 (22:22 +0000)]
Patch 7 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt (will_schmidt@vnet.ibm.com).
A handful of cosmetic changes to the ppc32 and ppc64 makefiles.
Cleans up some whitespace issues, spaces/tabs/etc,
Rearranges some of the contents so they are logically group, and
more consistent between the 32- and 64- bit versions of the same.
Carl Love [Mon, 20 Jul 2015 21:57:21 +0000 (21:57 +0000)]
Patch 6 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt (will_schmidt@vnet.ibm.com).
Rework hwcap checking in configure.ac. This adds and swizzles
some of the capability checking as found in configure.ac.
This cleans up some corner cases where capabilities were assumed
based on compiler features, but not supported by the platform.
- clean up vsx kludge, and remove associated comment.
- check assorted capabilities against the hwcap values, including
altivec, vsx, dfp, htm, ISA_2_0* .
Carl Love [Mon, 20 Jul 2015 19:36:53 +0000 (19:36 +0000)]
Patch 2 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt (will_schmidt@vnet.ibm.com).
Update all vgtest files to reference the new capability check helper.
This includes a few adjustments to ensure the test is checking for
the specific capability. I.e. isa_2_07 is a requirement for htm, but
does not indicate htm support is actually present.
VG_(helperc_LOADV64le): add handwritten assembly helper for ARM32
VG_(helperc_LOADV32le): VG_(helperc_LOADV16le): VG_(helperc_LOADV8):
use ".L" style assembly labels so they don't appears as new symbols
during disassembly.
Fix syntax error;
Certain GCC versions do not accept empty clobber lists.
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com). Part of
fixing BZ #342841.
VG_(get_StackTrace_wrk) for x86-{linux,darwin}: when following
frame-pointer chains (via EBP), don't continue if EBP doesn't contain
a 4-aligned value. A misaligned EBP is almost certainly invalid --
hence, no loss in unwind capability here -- and the misaligned access
causes gcc 5.1 ubsan alignment checks to fail. So avoid them.
Use seg->start instead of a as DebugInfoMapping avma. Normally seg->start
equals a. But when it is not then the size of the map might extend beyond
the segment (and not actually cover the start of the segment). When another
ELF file is them mapped right after this then it triggers an overlap purge
of the DebugInfo. In the case the mapping was for libc or ld.so this then
removes all intercepts causing "bad things".
Carl Love [Wed, 1 Jul 2015 21:29:12 +0000 (21:29 +0000)]
Backing out patch 1 and 2 from Bugzilla 349790.
The new script (tests/check_ppc64_auxv_cap) in the first patch was
written for the bash shell. I was told by fkrohm that there was an
issue with bash sometime ago and the decision was to use sh instead.
sh maps to bash on a lot of systems but on some it maps to dash. The
script is not compatible with dash.
In retesting the second patch with a fresh svn pull, I found that I
forgot to do the svn add for the new script file. Which causes the
regression test to fail with the second patch applied.
So, I have decided it will be best to just back out patch 1 and 2 for now.
I will fix the script and do this again.
Carl Love [Wed, 1 Jul 2015 19:44:13 +0000 (19:44 +0000)]
Patch 2 of 6
Update all vgtest files to reference the new capability check helper.
This includes a few adjustments to ensure the test is checking for
the proper capability. (i.e. htm versus isa_2_07).
Patch 1 valgrind commit id 15388.
The bugzilla for this commit is 349790
Patch submitted by Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>
Carl Love [Wed, 1 Jul 2015 18:48:48 +0000 (18:48 +0000)]
Patch 1 of 6
Rework the aux vector hwcap capability checking utilities.
This is meant to consolidate a number of existing _cap
checking scripts, and allow a better way of checking for
additional capabilites.
The bugzilla for this commit is 349790
Patch submitted by Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>
Bart Van Assche [Sun, 28 Jun 2015 16:55:45 +0000 (16:55 +0000)]
xen: Implement the xsm_op hypercall
More recent Xen toolstacks use this for the SID_TO_CONTEXT operation
only, even when XSM is not in use.
XSM is actually an abstraction layer, of which the only current
implementation is FLASK. So this blindly assumes that the backend is
FLASK. Should another XSM backend be invented then we will have to
sort of detecting the correct one.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15384
Bart Van Assche [Sun, 28 Jun 2015 16:48:22 +0000 (16:48 +0000)]
xen: Basic syswrap infrastructure for XEN_sched_op hypercalls
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15381
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15373
Bart Van Assche [Sun, 28 Jun 2015 16:37:54 +0000 (16:37 +0000)]
xen: syswrap XEN_DOMCTL_[gs]et_vcpu_msrs
The XEN_DOMCTL_[gs]et_vcpu_msrs work simiarly to the other get/set pairs,
taking a vcpu, buffer and size. A query with a buffer of NULL is a request
for the maximum size.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15370
Bart Van Assche [Sun, 28 Jun 2015 16:31:54 +0000 (16:31 +0000)]
xen: Add support for new sysctl and domctl interface versions
The change causing the sysctl bump is not in an implemented subop yet, so no
change is required. The change causing the domctl bump is in an implemented
subop, but has also been reverted in favor of a different way of performing
the same actions. Therefore, there is no net difference.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15365
Bart Van Assche [Sun, 28 Jun 2015 16:30:36 +0000 (16:30 +0000)]
xen: refactor the various "version not supported" messages into a single helper
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15364
Florian Krohm [Tue, 23 Jun 2015 20:31:52 +0000 (20:31 +0000)]
Beef up configury for the undefined behaviour sanitiser.
If the compiler supports -fno-sanitize=alignment use it.
Otherwise, there will be complaints about misaligned
memory accesses. This is needed for GCC 5.1.
If that flag is not supported simply pass in -fsantize=undefined
and assume that it won't check for alignment violations (which
is true for GCC 4.9).
Filter 'New thread' lines
gdb 7.9 reports new threads at different moment than the previous versions.
Filter these new threads lines so as to not be dependent on this
gdb aspect.
324181 mmap does not handle MAP_32BIT (handle it now, rather than fail it)
324181 was previously closed with a solution to always make
MAP_32BIT fail. This is technically correct/according to the doc,
but is not very usable.
This patch ensures that MAP_32BIT mmap is succesful, as long as
aspacemgr gives a range in the first 2GB
(so, compared to a native run, MAP_32BIT will fail much more quickly
as aspacemgr does not reserve the address space below 2GB on a 64 bits).
Far to be perfect, but this is better than nothing.
Added a regression test that test succesful mmap 32 bits till
the 2GB limit is reached.
Florian Krohm [Tue, 9 Jun 2015 21:44:58 +0000 (21:44 +0000)]
Followup to r15323. Cannot use AC_GCC_WARNING_SUBST to detect
whether -Wformat-security is supported. Special handling is needed.
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2 accepts -Wformat-security
without -Wformat being present on the command line. Other GCC
versions will issue a warning if -Wformat is missing. r15323
adds -Werror to AC_GCC_WARNING_SUBST and therefore turns that
warning into an error. With the consequence that
-Wformat-security appears to be unsupported -- a false conclusion.
Rhys Kidd [Sat, 6 Jun 2015 04:18:49 +0000 (04:18 +0000)]
Resolve remaining clang warning on OS X. Should be possible to build Valgrind on modern OS X without any warnings (note: does not hold for regression test suite).
Rhys Kidd [Sat, 6 Jun 2015 03:57:34 +0000 (03:57 +0000)]
Resolve clang warning on OS X: m_stacktrace.c:542:7: warning: implicit declaration of function 'vgPlain_is_in_syscall' is invalid in C99 [-Wimplicit-function-declaration]
Florian Krohm [Fri, 5 Jun 2015 21:19:06 +0000 (21:19 +0000)]
clang, as opposed to gcc, does not terminate with a non-zero return code
in case an unrecognised command line option is encountered. configure.ac
however was assuming just that which led to compile time warnings later on.
Add -Werror to the configure bits to make clang behave like gcc in this
regard. Fixes BZ #348565.
Florian Krohm [Fri, 5 Jun 2015 17:09:57 +0000 (17:09 +0000)]
Simplify configury and eliminate AC_GCC_WARNING_COND which was only used
in one place and can be replaced with AC_GCC_WARNING_SUBST_NEW. Adjust
perf/Makefile.am.
Julian Seward [Fri, 5 Jun 2015 13:33:46 +0000 (13:33 +0000)]
arm32-linux only: add handwritten assembly helpers for
MC_(helperc_LOADV32le), MC_(helperc_LOADV16le) and
MC_(helperc_LOADV8). This improves performance by around 5% to 7% in
the best case, for run-of-the-mill integer code.