40 Commits

Author SHA1 Message Date
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
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
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
Christian Borntraeger
a4b734a6ac also wire up arm, x86 and amd64 regarding ptrace regsets
original patch from 
Andreas Arnez <arnez AT  linux DOT vnet DOT ibm DOT com>

Seems that ppc and mips dont have ptrace support....



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13113
2012-11-08 20:27:05 +00:00
Philippe Waroquiers
88d11f08b4 factorise sys_socketcall
sys_socketcall was duplicated in syswrap-{ppc64|ppc32|arm|mips32|s390x}-linux.c
=>
* Similarly for what was done for sys_ipc, factorise the code in syswrap-linux.c
* re-enabled PRE_MEM_READ for VKI_SYS_SENDMSG and VKI_SYS_RECVMSG 
  (PRE_MEM_READ calls were commented out around 2003, for what
   was supposed a glibc bug.
   The PRE_MEM_READ calls were already re-enabled in s390x)
* s390x also had some more checking to verify the addressibility of
  the args and fail the syscall with EFAULT if not addressable
  => same checks are now done for all platforms.

(tested on x86/amd64/mips32/s390x/ppc32/ppc64, 
 compiled for arm-android-emulator)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13104
2012-11-04 20:40:33 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Tom Hughes
0c6ef68494 Wire up four more system calls on arm, based on patch
from William Cohen. Fixes BZ#295617.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12731
2012-07-11 15:38:29 +00:00
Tom Hughes
0f1fdb8f37 Wire up dup3 on arm. Fixes BZ#299629.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12728
2012-07-11 13:54:04 +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
Tom Hughes
fd01ed52d7 Implement accept4 on ARM systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12515
2012-04-20 14:07:34 +00:00
Tom Hughes
b6dd765c38 Wire up epoll_create1 on ARM systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12510
2012-04-19 14:54:30 +00:00
Philippe Waroquiers
a8a0fa7f4d add some .globl or used attribute to avoid link failures with gold linker + LTO
When doing experiment with gcc 4.7.0 and link time optimisation,
encountered link failures on amd64 which were solved by adding 
.globl and used attribute.
=> added .globl in similar places for arm/x86/ppc32/s390.
Did not touch darwin (which asm seems somewhat different).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12506
2012-04-16 22:06:47 +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
Bart Van Assche
563f0acd21 Check whether the big lock is held before invoking pre_thread_ll_create.
If the pre_thread_ll_create tracking function would be invoked without the
big lock being held, that would trigger a race condition in the tools that
implement this tracking function.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12458
2012-03-25 17:51:59 +00:00
Julian Seward
f0e4d8eb14 Support sys_fallocate on arm-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12454
2012-03-21 19:37:41 +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
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
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
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
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
d6740217a1 Add support for sys_ptrace. Fixes #269079.
(Ulrich Weigand, uweigand@de.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11664
2011-03-24 11:34:12 +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
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
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
Julian Seward
61f940977a Enable sys_pwrite64 on arm-linux. Fixes #249996.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11334
2010-09-03 14:25:10 +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
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
Julian Seward
578d74d4fa Fix the definedness handling of the last argument of sys_socketpair.
The last argument is really a pointer to an array of two ints and so
we need to say it is an int* and not an int [2].  This just happens to
work on amd64-linux because sizeof(int [2]) == 8 == sizeof(int*).  On
arm-linux it duly craps out w/ an assertion because sizeof(int [2]) !=
sizeof(UWord).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11083
2010-03-08 14:45:26 +00:00
Julian Seward
e6c318c531 When creating a child thread, initially set its os_state.threadgroup
to have the same value as the parent.  This avoids exit races leading
to hangs and strange behaviour in heavily multithreaded apps, in the
situation where threads are rapidly being created, and at the same
time an existing thread does sys_exit_group so as to terminate the
entire process.  Thanks to Konstantin S for chasing this down to a
small test case.  Fixes #226116.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11053
2010-02-22 11:03:10 +00:00
Julian Seward
6b95f1cd4c arm-linux: remove wrappers for __NR_ipc, __NR_mmap, __NR_sigsuspend
and __NR_sigaction, which all did I_die_here and therefore can never
have been used.  I think they were here as a result of this file being
derived from the x86-linux version, and that arm-linux uses more
modern equivalents (mmap2, rt_sig*, and the broken-out versions of
ipc).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11019
2010-01-06 11:08:18 +00:00
Julian Seward
5d80fe2bdc Pass sys_cacheflush along to VG_(discard_translations), so we have
transparent zero-cost self-modifying code support on ARM.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11018
2010-01-06 10:22:25 +00:00
Julian Seward
9ff9c8291a Enable pread64 on arm-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11016
2010-01-04 21:05:42 +00:00
Julian Seward
cc732d641a arm-linux: handle sys_signalfd4 and sys_eventfd2. Makes
memcheck/tests/linux-syscalls-2007 succeed on this platform.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10996
2010-01-03 11:46:50 +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
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
Nicholas Nethercote
fbf8653c8b Removed the remnants of the attempt at an ARM port, because it had
bit-rotted badly and was clogging up the code.

I put the useful remnants in docs/porting-to-ARM in case anyone ever
wants to try porting to ARM again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4092
2005-07-02 23:13:59 +00:00
Nicholas Nethercote
d463dd2292 Removed the VGA_/VGO_/VGP_ prefixes for arch/OS/platform-specific
things.  These made sense when the arch/OS/platform-specific code was in
one module, but as that code got mixed in with generic code the boundary
between generic and non-generic blurred, and the distinction made less
sense.  So let's get rid of them.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4002
2005-06-23 03:27:57 +00:00
Nicholas Nethercote
f174930b23 Final commit for the initial modularisation pass:
- Broke part of m_scheduler off into a new module m_threadstate.  It
  contains ThreadState, VG_(threads)[] and some basic operations on the
  thread table.  All simple stuff, the complex stuff stays in m_scheduler.
  This avoids lots of circular dependencies between m_scheduler and other
  modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
  include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
2005-06-19 01:24:32 +00:00
Nicholas Nethercote
b54b42c310 Rename m_syscalls/ as m_syswrap/ to complete the module renaming.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3924
2005-06-17 22:27:21 +00:00