178 Commits

Author SHA1 Message Date
Tom Hughes
b53fdb8ea7 Add support for the CDROM_GET_CAPABILITY ioctl based on patch
from Nick Black. Fixes BZ#302827.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12726
2012-07-11 12:02:06 +00:00
Philippe Waroquiers
93f019ff73 fix 302709 valgrind for ARM needs extra tls support for android emulator
Allow Valgrind to run on android emulator.
+ added README.android_emulator giving some details about versions used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12710
2012-07-04 21:59:29 +00:00
Petar Jovanovic
0b52be6035 Including additional header file to syswrap-linux.c to see VG_(get_SP).
Removing a warning of 'implicit declaration of function vgPlain_get_SP' when
compiled for MIPS. Done by including an appropriate header file.
Also, minor style issue correction for  #define PSRAn_BE(n,s,t,a) macro.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12707
2012-07-03 21:02:42 +00:00
Petar Jovanovic
ac1b8d6512 Correcting sys_shmdt wrapper for MIPS Linux.
This patch fixes incorrect handling of sys_shmdt for MIPS. Linux wrappers have
been added for sys_sigprocmask, sys_timerfd_create, sys_timerfd_gettime, and
sys_timerfd_settime on MIPS.
The bug has been reported at https://bugs.kde.org/show_bug.cgi?id=270777 as
sh_mat issue, and it can be reproduced with shmat-sample.c from 
https://bugs.kde.org/show_bug.cgi?id=222545.
The change also fixes sigprocmask from memcheck tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12658
2012-06-21 17:33:35 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Christian Borntraeger
188189536d add some intial kvm ioctls (low hanging fruits). This gets rid of some valgrind
warnings regarding KVM ioctl without a length/direction specifier.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12578
2012-05-23 15:59:40 +00:00
Tom Hughes
bc2f84b39f Add support for the move_pages system call. BZ#282790.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12485
2012-04-03 10:51:27 +00:00
Tom Hughes
1e1da9ff38 Add support for the HCIINQUIRY ioctl.
Patch from Andrew Brampton to fix BZ#283961.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12421
2012-03-07 11:22:42 +00:00
Tom Hughes
137aace5a3 Add support for the I2C_RDWR ioctl.
Patch from arnaud mouiche to fix BZ#286261.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12420
2012-03-07 10:21:33 +00:00
Philippe Waroquiers
74d44d1764 * README_DEVELOPERS : complete/enhance the section about outer/inner
* manual-core.xml : fix a typo
* include/pub_tool_inner.h : new file, defining macros for inner annotation
  include/Makefile.am : reference this new file.
* syswrap-linux.c : when ENABLE_INNER, register the stacks for the outer.
   (otherwise, nothing works properly).
* m_redir.c : avoid inner interpreting the outer vgpreload instructions.
* sema.c : annotate the semaphore with RWLOCK annotations for helgrind
* ticket-lock-linux.c : similar.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12414
2012-03-03 12:01:48 +00:00
Tom Hughes
35cc294c29 Handle prlimit64 the same way we do getrlimit and setrlimit, with
some requests trapped and handled by valgrind.

Patch from Matthias Schwarzott via BZ#294047.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12411
2012-03-01 13:42:18 +00:00
Tom Hughes
3925f2d664 Only mark data which has actually been filled in by recvmsg as defined.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12380
2012-02-10 16:45:01 +00:00
Tom Hughes
b7ec723aa8 Improve messages for mmsg calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12379
2012-02-10 11:54:16 +00:00
Tom Hughes
3e8d8f5087 Correct system call name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12378
2012-02-10 11:50:36 +00:00
Tom Hughes
0080aa8368 It turns out sendmmsg also updates the msg_len fields.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12377
2012-02-10 11:48:01 +00:00
Tom Hughes
baec53c5f1 Add support for the sendmmsg and recvmmsg system calls. Fixes BZ#277779.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12376
2012-02-10 11:30:09 +00:00
Tom Hughes
dc42e147f5 Add support for some SCSI ioctls. Patch from Jakub Jelinek on BZ#292627.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12375
2012-02-10 10:41:07 +00:00
Tom Hughes
74eb6fb3b4 Add support for process_vm_readv and process_vm_writev system calls.
Patch from Lénaïc Huard to fix BZ#292995.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12374
2012-02-10 09:39:37 +00:00
Tom Hughes
7104ded0a5 Add support for the F_GETOWN_EX and F_SETOWN_EX fcntl calls.
Patch from Jakub Jelinek to fix BZ#292626.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12373
2012-02-09 12:21:47 +00:00
Julian Seward
68cf6ae28d Some fixes for Android:
* initial support for Pandaboard/Linaro
* on Android/ARM, ask for non-executable stacks in the executables
* disable Memcheck's strcasestr intercept; its use of tolower()
  causes the dynamic linker to fail.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12234
2011-10-26 15:10:49 +00:00
Julian Seward
c96096ab24 Update all copyright dates, from 20xy-2010 to 20xy-2011.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206
2011-10-23 07:32:08 +00:00
Julian Seward
57b66d4b7d Add support for hardware-specific ioctl wrappers on Android,
starting with those required for the graphics hardware on 
Nexus S.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12060
2011-09-27 11:40:24 +00:00
Julian Seward
cea6601bf2 Android: add wrappers for ashmem and binder ioctls. From the AOSP
port of Valgrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12059
2011-09-27 10:26:52 +00:00
Julian Seward
99602cf81a run_a_thread_NORETURN: add trashed-register annotations for the magic
bits of assembly which finally cause the thread to exit.  How this
ever worked before, on any platform, beats me.  The lack was causing
some Android builds to segfault at thread exit.  Only the s390 version
was correct.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12049
2011-09-26 17:50:46 +00:00
Julian Seward
7bb130f5f3 Add a new simulation hint, --sim-hints=fuse-compatible, which causes
a bunch of file-related syscalls to be handled on the might-block
syscall path rather than the fast syscall path.  This fixes deadlocks
when running some FUSE-specific filesystem codes.  Fixes #278057.
(Mike Shal, marfey@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11993
2011-08-18 15:08:20 +00:00
Tom Hughes
d3a38c3b6a Add support for FBIOPUT_VSCREENINFO and FBIOPAN_DISPLAY ioctls.
Patch from Pauli Nieminen <ext-pauli.nieminen@nokia.com> on #263648.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11980
2011-08-15 08:47:29 +00:00
Tom Hughes
a570998478 Correct the calculation of the size of the node mask given to
the mbind, set_mempolicy and get_mempolicy system calls.

Patch from Brice Goglin <brice.goglin@ens-lyon.org> on #280083.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11977
2011-08-15 07:52:26 +00:00
Tom Hughes
4a7707d8be Add support for the FIOQSIZE ioctl. Fixes #270320.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11963
2011-08-10 14:25:06 +00:00
Tom Hughes
4c121370d4 Support the F_GETPIPE_SZ and F_SETPIPE_SZ fcntl calls. Fixes #278349.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11960
2011-08-10 10:11:14 +00:00
Julian Seward
42ada29286 Add a new client request and pair of macros,
VALGRIND_{DISABLE,ENABLE}_ERROR_REPORTING, which allow a thread to
temporarily disable reporting of errors it makes.  This is useful for
making Memcheck behave sanely in the presence of some MPI
implementations.  Also mark up libmpiwrap.c accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11910
2011-07-24 16:02:33 +00:00
Julian Seward
2420f2b5ce Handle sigaction, sigsuspend, sigprocmask on arm-linux; comment-only
changes for x86-linux and ppc32-linux.  Derived from patch in bug
266035 comment 10 (Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11871
2011-07-11 18:23:09 +00:00
Julian Seward
5ce93a8654 Remove identical copies of convert_sigset_to_rt, PRE(sys_sigaction)
and POST(sys_sigaction) in syswrap-x86-linux.c and
syswrap-ppc32-linux.c, and replace them with a single version in
syswrap-linux.c instead.  Derived from patch in bug 266035 comment 10
(Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11870
2011-07-11 17:48:24 +00:00
Tom Hughes
cfc24ee4ea Move the break out of the braces so that we don't fall through
into the next case when no argument was given to the ioctl.

Spotted by IBM's BEAM checker.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11860
2011-07-06 14:11:56 +00:00
Tom Hughes
1017470b36 Fix some warnings I introduced in r11804.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11807
2011-06-08 09:57:54 +00:00
Tom Hughes
42bc84e869 Add support for prlimit64 on x86 and amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11806
2011-06-08 09:55:54 +00:00
Tom Hughes
912fe51553 It seems that the perf_counter_open system call was renamed to
perf_event_open some time after we added it, so correct the name
wherever it appears to match the current kernel source.

Also fixup the PRE handler to do the check correctly, using the
size field of the structure to work out how much data there is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11804
2011-06-08 09:10:40 +00:00
Bart Van Assche
fbdd04d5a9 syswrap/Linux: trace ioctl() calls only once / do not report two-argument
ioctl() calls as an error. Patch provided by Mark Hills. Closes #272730.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11717
2011-04-28 18:36:49 +00:00
Bart Van Assche
d077061870 Linux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh@frogmouth.net>).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11702
2011-04-18 10:37:56 +00:00
Julian Seward
b3827d6c33 Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11687
2011-04-11 16:17:51 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
669d87bcc1 Support sys_readahead on Linux.
(Sean Bartell, wingedtachikoma@gmail.com)  Fixes #247894.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11394
2010-10-04 20:03:27 +00:00
Tom Hughes
3d13995189 Add support for F_DUPFD_CLOEXEC. Fixes #238696.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11316
2010-09-02 08:23:35 +00:00
Tom Hughes
72abd5958d The argument to FIBMAP is an int, not an unsigned long. Fixes #248822.
Patch from Christian Borntraeger <borntraeger@de.ibm.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11289
2010-08-25 09:13:44 +00:00
Bart Van Assche
9db21fdc0d Fix for bug #242814 (Linux): made sure that Valgrind tools do not crash when the first argument of the mount() system call is NULL.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11191
2010-06-29 06:16:52 +00:00
Tom Hughes
725752d4ea Fixed bogus check of RES in the ioctl PRE handler introduced
in r11124 while fixing #235642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11171
2010-06-10 15:01:02 +00:00
Tom Hughes
f26002da90 Fix amd64 and ppc64 to correctly mark mq_timedreceive as LINXY so that
the post handler is run to mark the retrieved message as correct.

Also change the post handler to only mark the number of bytes actually
returned as defined, rather than the whole buffer.

Fixes #238679.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11133
2010-05-24 13:40:10 +00:00
Tom Hughes
ef5b3e48b6 Add support for some EVIO ioctls. These are a bit abnormal because
the length part of the ioctl is not fixed so they are essentially
families of ioctls.

Based on patch from Peter Korsgaard. Fixes #235642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11124
2010-05-07 15:32:04 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Tom Hughes
0e95308259 Add a wrapper for the splice system call and wire it up on
x86 and amd64 systems. Closes #205788.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11055
2010-02-23 10:49:48 +00:00
Tom Hughes
2a70cf0b01 Add support for the getcpu system call on x86, ppc32 and ppc64. There
is no support for amd64 because there is no getcpu system call on that
platform - it is always done as a vsyscall in user space.

Based on patch from Aleksander Salwa. Closes #223758.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11054
2010-02-23 10:02:55 +00:00