93 Commits

Author SHA1 Message Date
Philippe Waroquiers
ec2e7c2bdf fix the warning introduced by fixing SETTLS clone flag PRE_READ logic
on amd64, vki_modify_ldt_t was defined as void (not very clear why).
sizeof (void) cannot be taken (or more precisely can be taken,
but nobody knows what that means and what gcc does).
So, uncommended the (supposedly) correct definition of the type.
Note that I checked the definition on debian 6.0, kernel 2.6.32
and the structure is still ok.

Still needed to look at the other platforms not properly
handling the *SETTID and the SETTLS flags in clone PRE_READ
logic and/or not defining the type vki_modify_ldt_t



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12589
2012-05-27 20:21:02 +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
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
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
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
Tom Hughes
f65fa07cc9 Update linux system call lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12370
2012-02-09 11:38:10 +00:00
Florian Krohm
b8466723cd Beef up VG_(strerror) to provide correct messages for the
errno codes in asm-generic/errno-base.h (on linux). 
The error strings were obtained by calling strerror natively in
Linux. 
Extend vki-linux.h accordingly. vki-darwin.h already had
those errno codes.
Add testcase. This fixes #287858.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12316
2011-12-24 21:50:53 +00:00
Julian Seward
0d7caa744f Get a bunch more copyright dates in the right format, 20xx-2011,
so the auto-update script will handle them correctly in future.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12207
2011-10-23 07:49:30 +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
58d0ead76e Enable sys_epoll_pwait on arm-linux. #283427. Derived from
larger patch by John Reiser (jreiser@bitwagon.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12177
2011-10-20 13:00:32 +00:00
Bart Van Assche
c11090abde include/vki/vki-linux.h: Remove __attribute_const__ definition since it
isn't used anywhere inside the Valgrind project.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12111
2011-10-07 09:41:14 +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
8885c4e740 Add initial support for Mac OS X 10.7 (Lion). Tracked by bug #275168.
* configure.in support

* new supp file darwin11.supp

* comment out many intercepts in mc_replace_strmem.c and
  vg_replace_malloc.c that are apparently unnecessary for Darwin

* add minimal handling for the following new syscalls and mach traps:
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost

* wqthread_hijack on amd64-darwin: deal with
  tst->os_state.pthread having an apparently different offset,
  which caused an assertion failure

* m_debuginfo: for 32 bit processes on Lion, use the DebugInfoFSM
  cleanup added in r12041/12042 to handle apparently new dyld
  behaviour, which is to map text areas r-- first and only
  vm_protect them later to r-x.



The following cleanups remain to be done

* remove apparently pointless, commented out wrapper macro
  invokations in mc_replace_strmem.c, eg

  //MEMMOVE(VG_Z_DYLD,        memmove)

  (or determine that they are still necessary, and uncomment)


* ditto in vg_replace_malloc.c, plus general VGO_darwin cleanups
  there


* write proper syscall wrappers for
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost
  These are currently just no-ops and may be causing Memcheck to
  report false undef-value errors


* figure out why it doesn't work properly unless built with gcc-4.2 on
  Lion.

  gcc-4.2 is the "normal" gcc (i686-apple-darwin11-gcc-4.2.1).  Plain
  gcc is the hybrid gcc-front-end clang-back-end thing
  (i686-apple-darwin11-llvm-gcc-4.2).  Whereas on Snow Leopard, plain
  gcc is the normal gcc.

  The symptoms of the failure are that wqthread_hijack in
  syswrap-amd64-linux.c hits this /*NOTREACHED*/ vg_assert(0); right
  at the end (you need a pretty complex threaded app to trigger this),
  which makes me think that either ML_(wqthread_continue_NORETURN) or
  call_on_new_stack_0_1 do return, which they are not expected to.


* figure out if some of the uninitialised value errors reported in
  system libraries on are caused by Memcheck being confused by LLVM
  generated code, as per bug #242137



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12043
2011-09-21 08:43:08 +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
ea5e1b6a5e Fix VKI_FIOQSIZE definition on ppc platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11973
2011-08-13 15:14:58 +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
Florian Krohm
bc494507f2 Synch s390x system call list with linux 2.6.39.2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11845
2011-06-28 23:37:01 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +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
8bc495c8d7 Update system call lists to match current kernel source.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11805
2011-06-08 09:12:07 +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
Julian Seward
2ee9e90486 Implement a GDB server in Valgrind. See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11727
2011-05-06 21:02:55 +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
a17e55e5c2 Definitions relating to ptrace: replace bogus x86 versions with
arm specific versions.  Partial fix for #269079.
(Ulrich Weigand, uweigand@de.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11663
2011-03-24 11:33:00 +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
1a7379bf89 Enable support for sys_ppoll on arm-linux (Rodrigo Belem, rodrigo.belem@openbossa.org).
See #253636.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11428
2010-10-11 19:09:53 +00:00
Julian Seward
78699f56cb Define VKI_SHMLBA on Darwin, so as to un-break build breakage caused by
r11399.  See #222545.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11405
2010-10-07 09:53:02 +00:00
Julian Seward
878207ebb9 Define VKI_SHMLBA for all supported Linux targets, thereby unbreaking
the breakage created by r11399.  Part of #222545.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11400
2010-10-06 15:55:59 +00:00
Julian Seward
566a25cf7e Make client sys_shmat work properly on arm-linux by taking into
account rounding requirements to SHMLBA.  Modified version of a patch
by Kirill Batuzov, batuzovk@ispras.ru.  This fixes the main bug in
#222545.  Temporarily breaks the build on all other platforms though.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11399
2010-10-06 15:24:39 +00:00
Julian Seward
19bc251432 arm-linux: determine whether the host supports Neon by looking at our
AUXV at startup, rather than by trying to execute a Neon instruction
and seeing whether it SIGILLs.  Apparently the latter is not a
reliable way to ascertain the presence of usable Neon support.  Fixes
#249775.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11347
2010-09-09 07:25:58 +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
Julian Seward
65e5f2fd0a Merge from branches/THUMB: add support for sys_pselect6, sys_pipe2,
sys_inotify_init1 on arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11280
2010-08-22 12:08:59 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Bart Van Assche
f938bef38f Reimplemented the _VKI_IOC_TYPECHECK() macro such that it doesn't trigger a
compiler warning on PPC when it shouldn't.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11180
2010-06-15 14:55:28 +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
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
Tom Hughes
3985923259 Fix up a few issues with OSS ioctls. Fixes #227325.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11050
2010-02-18 15:54:45 +00:00
Julian Seward
99857994dd Handle sys_pipe2 on arm-linux; also add some missing numbers to
vki-scnums-arm-linux.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10994
2010-01-03 11:29:35 +00:00
Julian Seward
b722650de4 Redo r10971 ("Made sure that C++ compilers do not complain about the
_VKI_IOC_TYPECHECK() macro") in a way which is easier to understand.
Also, add it for arm-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10990
2010-01-02 10:41:46 +00:00
Julian Seward
e9de458500 Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982
2010-01-01 11:59:33 +00:00
Bart Van Assche
30b6cbe318 Made sure that C++ compilers do not complain about the _VKI_IOC_TYPECHECK() macro.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10971
2009-12-29 15:08:14 +00:00
Tom Hughes
5309bc27a0 Handle adjtimex being called in adjtime mode correctly. Closes #219538.
Validate the constant field with ADJ_TAI is used in an adjtimex call.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10969
2009-12-21 11:29:54 +00:00
Tom Hughes
3174f947e2 Add support for accept4 system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10955
2009-11-25 12:05:41 +00:00
Tom Hughes
e46ec05df6 Re-enable old support for adjtimex system call based on patch
from Dodji Seketeli. Part fix for #215973.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10948
2009-11-24 16:38:21 +00:00
Tom Hughes
cc253fdd8f Handle some extra aio opcodes in io_submit and io_getevents.
Based on patch from Gabor Gomas. Fixes #209807.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10918
2009-10-28 16:03:29 +00:00
Tom Hughes
141ec942a1 Add support for the perf_counter_open system call. Fixes #211498.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10907
2009-10-27 09:19:26 +00:00
Tom Hughes
d32144bb8d Update linux system calls lists to match 2.6.31.5 kernel.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10906
2009-10-27 09:01:43 +00:00