671 Commits

Author SHA1 Message Date
Dejan Jevtic
c8213ce37a mips32/64: Fix the problem with cacheflush on mips platforms.
On mips platforms the second cacheflush parameter is the number
of bytes in cache that needs to be flushed. When we are discarding
translation we need to use this number instead of:
((ULong) ARG2) - ((ULong) ARG1) + 1ULL
This patch also include syscall wrapper for __NR_sigaction on mips32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13707
2013-10-31 16:58:31 +00:00
Philippe Waroquiers
81d7bfddde Fix 324227 memcheck false positive leak when a thread calls exit+block
only reachable via other thread live register

The exiting thread will have its registers considered as not reachable
anymore, registers of other threads will be considered reachable.

This is ensured by using a different exit reason for the
exiting thread and for the other threads.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13670
2013-10-21 19:57:08 +00:00
Philippe Waroquiers
fbe834ff1a unbreak (future) Mac OS 10.9, 11.0, ... builds
Disappeared syscalls are better 
  #ifdef-ed with "< version_in_which_they_disappear"

Newly appeared syscalls are better
  #ifdef-ed with ">= version_in_which_they_appear"



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13669
2013-10-21 18:39:01 +00:00
Julian Seward
6abdeda828 Enable sys_rt_sigsuspend on ppc64-linux. Not sure why this is
necessary, but I found it lying around in a ppc64 tree, so there
was probably some use case at some point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13668
2013-10-21 10:07:43 +00:00
Julian Seward
4a9b50efe7 Un-break the build on OSX 10.7.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13659
2013-10-18 14:45:29 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Julian Seward
4fc45578f6 Disallow client mmap calls with MAP_32BIT as a flag.
Fixes, or at least addresses, #324181.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13644
2013-10-14 14:50:57 +00:00
Julian Seward
3fd8c455b3 Enable sys_prlimit64 on arm-linux. Fixes #320131.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13639
2013-10-14 11:51:43 +00:00
Dejan Jevtic
5944b58df7 mips32: Fix the align problem with mmap.
Valgrind is doing mmap always with MAP_FIXED. On mips32 we need to check arg4.
If the arg4 is MAP_SHARED we need to align the address to SHMLBA.
If the program tries to do mmap with VKI_FIXED Valgrind doesn't need to align
the address to SHMLBA.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13593
2013-10-01 10:34:54 +00:00
Julian Seward
6fa2a5249b Enable sys_fanotify_init and sys_fanotify_mark on arm-linux.
Fixes #324421.  (Heinrich Schuchardt, xypron.glpk@gmx.de)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13586
2013-09-29 20:01:22 +00:00
Dejan Jevtic
8eda9d604e mips32: Add two syscall wrappers:
4345 __NR_process_vm_readv
4346 __NR_process_vm_writev
Code style, no functional changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13577
2013-09-24 14:21:50 +00:00
Florian Krohm
0ac9cb1d0c Fix memory leak when reallocating a thread name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13561
2013-09-18 14:00:10 +00:00
Florian Krohm
6d15b5deb4 Include pub_core/tool_clreq.h instead of valgrind.h where apropriate.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13555
2013-09-16 20:56:35 +00:00
Florian Krohm
dbc0ecfa9f Intercept prctl(PR_SET_NAME, name) and store the thread name so it
can be used in error messages. That should be helpful when debugging
multithreaded applications.
Patch by Matthias Schwarzott <zzam@gentoo.org> with some minor
modifications. Fixes BZ 322254.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13553
2013-09-16 17:08:50 +00:00
Dejan Jevtic
f569a8ac2c mips32: typo error fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13552
2013-09-16 10:48:25 +00:00
Florian Krohm
a6c7a2893c Fix coregrind header files such that they can be included without
having to worry what other header files may have to be included
beforehand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549
2013-09-15 13:54:34 +00:00
Florian Krohm
5c4ba95a27 Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548
2013-09-15 10:42:26 +00:00
Julian Seward
1e4c2d926b PRE(workq_ops): handle KI_WQOPS_QUEUE_REQTHREADS without complaining.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13530
2013-09-04 07:31:10 +00:00
Julian Seward
47dbd5a4ca Fixes and kludges (mostly the latter) needed to run graphical
apps on	  OSX 10.8:

* port_create_vanilla: deal with the fact that ports get looked
  up before they get registered in the allocated_ports list.  I
  think this is	 a side effect of ..

* .. various syscalls: add stub (no-op) wrappers



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13524
2013-09-02 13:07:16 +00:00
Julian Seward
187c2be40d Make wqthread_hijack work with the OSX 10.8 kernel.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13523
2013-09-02 13:02:58 +00:00
Dejan Jevtic
47e3a1b8a7 mips32/mips64: Fix compiler warnings.
Fix some compiler warnings when compiling Valgrind for mips32/mips64.
Clean up exp files for mips32 BE and LE.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13496
2013-08-15 13:37:29 +00:00
Julian Seward
f7cd4044d5 Add support for a bunch of DRM Ioctls. Fixes #207815.
(Robert Bragg, bob@o-hand.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13486
2013-08-08 08:09:29 +00:00
Tom Hughes
c9ba888d97 Handle FIOCLEX and FIONCLEX ioctls. Patch from Ben Noordhuis. BZ#305170.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13462
2013-07-17 14:57:18 +00:00
Tom Hughes
97342e80a6 Handle setsockopt(SOL_SOCKET, SO_ATTACH_FILTER) better. Based
on patch from Guy Harris on BZ#318203.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13461
2013-07-17 14:36:57 +00:00
Tom Hughes
479650d938 Add support for fanotify_init and fanotify_mark, based on patches
from Heinrich Schuchardt. BZ#320895.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13460
2013-07-17 13:58:59 +00:00
Tom Hughes
6754a87d67 Add support for open_by_handle_at and fix name_to_handle_at
to check the file handle argument correctly. BZ#316761.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13459
2013-07-17 13:25:08 +00:00
Tom Hughes
a9453e4bce Handle the sethostname system call. BZ#311922.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13458
2013-07-17 12:43:30 +00:00
Petar Jovanovic
302ca71a6a mips32: another VG_(am_get_advisory) needs non-single-page-size adjustment
Another mmap issue in which another VG_(am_get_advisory) needs adjustment
wrapper for cases when (VKI_SHMLBA > VKI_PAGE_SIZE) and argument is
VKI_MAP_SHARED.

Fix by DejanJ for Bug #320057.
Issue and the test case by Vasile Floroiu.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13450
2013-07-12 15:32:27 +00:00
Mark Wielaard
fe9acdded4 Bug 321969. Support [lf]setxattr on ppc32 and ppc64 linux kernel.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13449
2013-07-05 09:50:26 +00:00
Bart Van Assche
7e6e7ae4d1 [PATCH 4/4] xen: VKI_XENMEM_get_sharing_{freed, shared}_pages hypercall (#321065)
From: Andrew Cooper <andrew.cooper3@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13438
2013-06-30 07:59:50 +00:00
Bart Van Assche
8650980ea8 [PATCH 3/4] xen: VKI_XEN_SYSCTL_sched_id hypercall (#321065)
From: Andrew Cooper <andrew.cooper3@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13437
2013-06-30 07:59:09 +00:00
Bart Van Assche
bbe2f19d40 [PATCH 2/4] xen: update for interface changes in Xen 4.3 release (#321065)
From: Ian Campbell <ian.campbell@citrix.com>



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13436
2013-06-30 07:58:19 +00:00
Bart Van Assche
c46c27fd34 [PATCH 1/4] xen: distinguish the various fields of the Xen privcmd ioctls in the logging (#321065)
From: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13435
2013-06-30 07:57:35 +00:00
Petar Jovanovic
3c8aeab70e mips64: add cases in wrappers for ptrace calls with GETREGSET
Add cases for PTRACE_GETREGSET in PRE(sys_ptrace) and POST(sys_ptrace).

This fixes memcheck/tests/linux/getregset on MIPS64 platforms with kernel
that supports ptrace call with PTRACE_GETREGSET.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13418
2013-06-03 15:33:09 +00:00
Mark Wielaard
6fd4d3b541 Don't break platforms without AF_BLUETOOTH.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13405
2013-05-22 10:37:52 +00:00
Mark Wielaard
86f74d6026 Support Linux kernel AF_BLUETOOTH for bind().
Bug #320116. sockaddr_rc might contain some padding which might not be
initialized. Explicitly check the sockaddr_rc fields are set. That also
produces better diagnostics about which field is unitialized.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13404
2013-05-22 10:21:10 +00:00
Mark Wielaard
d4513c94f0 Support PTRACE_GET/SET_THREAD_AREA on x86.
BZ#320063.  (Josh Stone, jistone@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13403
2013-05-22 10:21:08 +00:00
Petar Jovanovic
c116ce3d06 mips: enable syscalls prlimit64, process_vm_readv, process_vm_writev
Enable wrappers for syscalls prlimit64, process_vm_readv, process_vm_writev,
needed by the following tests:

- none/tests/rlimit64_nofile and
- none/tests/process_vm_readv_writev.

The change also adds definitions for several system calls for MIPS64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13400
2013-05-14 14:13:15 +00:00
Carl Love
7c6281ffb8 Add syscall suport for system calls sys_mbind, sys_set_mempolicy and
sys_get_mempolicy.

This patch add support for the PPC64 sytem calls:
        259 - sys_mbind
	260 - sys_get_mempolicy
	261 - sys_set_mempolicy

This patch also adds the Add syscall 259, sys_mbind, support for the PPC32
platform.

The patch fixes bugzilla 318932.

Signed-off-by: Carl Love <cel@us.ibm.com>
---


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13383
2013-05-07 15:47:35 +00:00
Petar Jovanovic
1fb2e817bb mips: fixup blksys_restart address for mips64
Restart logic has changed in kernel, this is counterpart in Valgrind.

This change fixes:

none/tests/syscall-restart1
none/tests/syscall-restart2

for mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13379
2013-04-26 19:01:04 +00:00
Petar Jovanovic
4ee8c6feea mips: enable several system call wrappers on mips64
Enable wrappers on mips64 for the following calls:

- dup3
- accept4
- epoll_create1
- timerfd_settime
- newfstatat

Also, allow additional flock64 values in sys_fcntl for mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13358
2013-04-03 23:43:11 +00:00
Julian Seward
cca00cebc1 Enable prctl on ppc64-linux. Fixes #308089.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13350
2013-03-29 09:40:48 +00:00
Bart Van Assche
1ae0d437be Darwin: Fix a compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13319
2013-03-10 12:49:08 +00:00
Tom Hughes
269fc43ee7 Implement the name_to_handle_at system call for x86 and amd64.
Based on patch from Asmadeus to fix BZ#308930.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13304
2013-03-03 12:57:20 +00:00
Philippe Waroquiers
1b9a118603 Factorise some code from syswrap-amd64/arm/mips32/mips64-linux.c to syswrap-linux.c
Almost mechanical transformation, removes > 1000 SLOC.

Compiled and regtested on amd64/x86/mips32
Compiled and (somewhat) tested on mips64
Compiled on arm



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13302
2013-03-01 23:31:09 +00:00
Christian Borntraeger
293a0cefd6 wire up 2 vhost ioctls. The kernel does not use any parameter
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13298
2013-03-01 13:17:49 +00:00
Christian Borntraeger
85a4737869 initial tun/tap ioctls.
TUNSETIFF/TUNGETIFF/TUNSETOFFLOAD. See 315952.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13297
2013-03-01 12:56:07 +00:00
Tom Hughes
592e58c747 Don't check the flags word in msghdr for sendmsg as the
kernel will neither read nor write it.

Patch from Mark Wielaard to fix BZ#315441.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13294
2013-02-28 12:50:55 +00:00
Petar Jovanovic
5dd4c02e39 mips: adding MIPS64LE support to Valgrind
Necessary changes to Valgrind to support MIPS64LE on Linux.
Minor cleanup/style changes embedded in the patch as well.
The change corresponds to r2687 in VEX.
Patch written by Dejan Jevtic and Petar Jovanovic.

More information about this issue:
https://bugs.kde.org/show_bug.cgi?id=313267


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13292
2013-02-27 23:17:33 +00:00
Tom Hughes
0d1fe31512 Make msgrcv wrappers on amd64, arm and mips32 look for IPC_NOWAIT in
the flags argument, not the type argument. Fixes #315534.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13289
2013-02-21 10:57:23 +00:00