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
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
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
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
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
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
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
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
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
found by Coverity's checker.
Also fix another missing break XEN_SYSCTL_numainfo found by via a
by-eye check. This one is at the end of the switch so it is benign.
Patch by Ian Campbell <ian.campbell@citrix.com>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13251
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
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
Additional refinement in PRE(sys_ipc) on which arguments to check for the call.
This is still a simplistic check, yet it should resolve additional cases.
One of the resolved cases is memcheck/tests/sem on MIPS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13084
Depending on the semctl command (arg3), arg4 might or might not be needed.
The PRE(sys_ipc) multiplexed syscall for semctl was always checking
all 4 args.
The fix consists in dereferencing the 4th arg (which in sys_ipc is ARG5)
only if the semctl syscall cmd implies 4 arguments.
This avoids the false positive on linux x86.
Note that PRE(sys_ipc) is still too simplistic as it assumes
that 6 args are always read, which is not the case.
This seems to cause false positive on mips:
memcheck on none/tests/sem gives:
Syscall param ipc(fifth) contains uninitialised byte(s)
It would be nice to implement the multiplexed PRE(sys_ipc) by
calling the PRE(sys_xxxx) similar PRE, depending on ARG1 of sys_ipc.
This would then avoid the simplistic PRE(sys_ipc) logic without duplicating
the logic in PRE(sys_semctl) (and all other sys_ipc multiplexed syscalls).
However, I found no easy way to do that.
With the current fix, some logic about semctl is partially duplicated between
the PRE(sys_ipc) (for platforms such as x86 having a multiplexed sys call)
and PRE(sys_semctl) (for platforms such as amd64, having a direct sys call)
to fix the false positive encountered on x86.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13082
Rev 13078 removed a PRE call (for SEMCTL) in the POST(sys_ipc).
This commit adds the correct POST call for SEMCTL in POST(sys_ipc).
(note: some tests are missing in this area, as removing PRE
and adding POST did not cause any test result to change).
This is the last patch to restructure the sys_ipc code.
After this patch, should be able to do the real fix
for 23837 (semctl GETVAL false positive)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13079
Now that the PRE/POS(sys_ipc) code is not duplicated anymore,
fix two strange things in this code:
* PRE(sys_ipc) : add missing ; after the call PRE_REG_READ6
(strange that this was compiling without it ???)
* POST(sys_ipc) : it seems there was a copy/paste of
the PRE(sys_ipc) code for VKI_SEMCTL.
Cannot understand why we would need to call again
deref_Addr and ML_(generic_PRE_sys_semctl) in the POST(sys_ipc).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13078
(allows to have the list of opened fds and the associated info
on request from GDB or from the shell, using vgdb)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13072
Makes it easier to figure out what was not initialised.
Thanks, once again, to Julien Grall.
From: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13050
This is pretty dodgy on 64 bit systems.
Thanks to Julien Grall.
From: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13049