Commit Graph

92 Commits

Author SHA1 Message Date
Julian Seward
2ebd38040f Handle sys_lookup_dcookie on amd64-linux (Andrew Haley). Also take
the opportunity to move the handlers from syswrap-generic.c (which
they certainly aren't) to syswrap-linux.c.  Fixes #175044.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8769
2008-11-16 21:40:54 +00:00
Julian Seward
70e5fbdf04 Fix debug printing of fd in mmap system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8764
2008-11-13 13:14:00 +00:00
Julian Seward
f4bffe6909 Support sys_pipe2 on {amd64,x86}-linux. Also, update syscall numbers
for all supported Linuxes to those in linux-2.6.28-rc3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8730
2008-11-05 11:20:59 +00:00
Julian Seward
1c03211b43 Enable sys_quotactl on amd64-linux. Possible fixes #173177.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8720
2008-10-30 13:12:50 +00:00
Bart Van Assche
86ff87c102 Enabled capget and capset system calls for amd64, ppc32 and ppc64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8554
2008-08-27 17:41:56 +00:00
Julian Seward
832a3d400b Tidy up the wrappers for pread64 and pwrite64, and make these two
syscalls available on ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8519
2008-08-07 20:29:55 +00:00
Bart Van Assche
783f123bab Enabled support for the sched_setparam() system call on the amd64, ppc32 and ppc64 platforms (was already enabled on x86).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8405
2008-07-09 07:39:09 +00:00
Bart Van Assche
8e96150945 Merged FORMATCHECK branch (r8368) to trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369
2008-07-07 06:49:24 +00:00
Bart Van Assche
bd28f145d5 Moved support for Linux-specific system call sys_init_module from generic to Linux wrappers. Added wrapper for sys_delete_module system call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8266
2008-06-21 16:28:24 +00:00
Bart Van Assche
e3ebca1d59 Enabled support for the init_module() system call on amd64. Should fix #164476.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8263
2008-06-20 10:41:12 +00:00
Julian Seward
4cae5c3ed5 Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output.  This
will be fixed.

The core-tool interface is slightly changed.  The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982
2008-05-01 20:24:26 +00:00
Bart Van Assche
c6d4c09e7c Added support for timerfd_create(), timerfd_gettime() and timerfd_settime() system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7942
2008-04-27 12:56:06 +00:00
Bart Van Assche
46fd0e3040 Enabled syslog and create_module system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7920
2008-04-26 10:57:07 +00:00
Bart Van Assche
e31611fb5c Added support for epoll_pwait(), utimensat(), eventfd(), timerfd() and signalfd(). Fixes bug 160907.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7917
2008-04-26 07:45:10 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
7cebb7d626 Include headers for VG_(register_stack) calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7396
2008-02-11 11:23:12 +00:00
Tom Hughes
2e55cfac69 Make the clone system call wrappers call VG_(register_stack) to record
the new thread's stack, then make the stack unwinder use that information
to make a better guess at the stack bounds.

This helps avoid crashes trying to unwind the stack under wine when
the starting point is a routine without a proper stack frame.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7383
2008-02-08 15:17:07 +00:00
Tom Hughes
cbb3cb05a5 Add support for the sync_file_range system call.
Based on patch from Russell Sears <sears@cs.berkeley.edu>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7324
2008-01-08 16:31:25 +00:00
Julian Seward
06666933d9 Merge (from branches/THRCHECK) the following two changes to the core-tool
interface:

r6805: Modify two thread-notification events in the core-tool
interface.  This removes track_post_thread_create and
track_post_thread_join.  The core can only see low level thread
creation and exiting, and has no idea about pthread-level concepts
like "pthread_create" and "pthread_join", so these are a bit
ambiguous.

Replace them with track_pre_thread_ll_create, which is notified before
a new thread makes any memory references, and
track_pre_thread_ll_exit, which is notified just before the new thread
exits, that is, after it has made its last memory reference.

r6823: Core-tool interface: give 'needs_tool_errors' an extra Boolean
indicating whether or not the core should print thread id's on error
messages.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7123
2007-11-09 23:21:44 +00:00
Julian Seward
1d31d0b60c Followup to r6650: tidy up sys_sigreturn/sys_rt_sigreturn on ppc32/64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6651
2007-03-19 14:34:08 +00:00
Julian Seward
664364751b Document and tidy up one of the more arcane corners of signal
handling: why PRE(sys_sigreturn) has to construct a fake syscall
return value which, when written back to the guest state, leaves it
unchanged.  It's only taken me about 3 years to realise why :-)
Fixes to ppc platforms to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6650
2007-03-19 13:38:11 +00:00
Julian Seward
77c7c9adc2 Handle sys_ioprio_set on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6641
2007-03-11 19:28:02 +00:00
Tom Hughes
0075b20e84 Add support for linux key management system calls.
Based on patch from Ezra Peisach <epeisach@bu.edu>.
Fixes bug #139300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6632
2007-03-07 11:12:13 +00:00
Tom Hughes
cbb98bc70d Handle some additional ptrace reason codes. Based on a patch
from Magnus Vesterlund <magnus_vesterlund@hotmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6630
2007-03-07 09:48:32 +00:00
Julian Seward
967cd7b6fd Enable the pselect6 wrapper on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6530
2007-01-18 00:13:24 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Tom Hughes
69c8af5179 Improve prctl support - based on patch from Eric Pouech in bug #138627.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6410
2006-12-18 15:22:46 +00:00
Julian Seward
bbe7f55813 Merge r6140 (some of):
- track SysRes changes

- track VG_(am_find_nsegment) const-ness change

- increase number of client syscall args supported from 6 to 8

- simplify type SyscallStatus.  Simply hold a copy of the SysRes
  for the syscall rather than have this be a data structure
  incorporating something very similar to the fields of a SysRes,
  and more besides.  Change various macros in priv_types_n_macros.h
  to match.

- syswrap-main.c: instantiate the various impedance-matching
  functions for AIX.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6276
2006-10-17 01:47:30 +00:00
Julian Seward
8df6fe67b7 Unbreak amd64-linux after recent commits.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6229
2006-10-14 20:06:48 +00:00
Tom Hughes
ebe5060d49 Fix display of buffer address in sendto system call arguments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5967
2006-06-07 17:46:12 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Tom Hughes
297aa09b43 Implement the set_robust_list and get_robust_list system calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5905
2006-05-17 14:24:12 +00:00
Julian Seward
e717ec89e9 Add support for sys_broc on amd64-linux when --kernel-variant=bproc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5860
2006-04-20 14:38:50 +00:00
Julian Seward
8367bd8ed0 Syscall wrappers for ppc32-linux (and one for amd64-linux).
(from Jakub Jelinek)  See #125492.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5849
2006-04-14 01:04:04 +00:00
Tom Hughes
4eb782b553 Add wrappers for a load of new 2.6.16 system calls. Fixes bug #123248.
Also expands pathname arguments as strings in a lot more system call
trace messages and fixed the poll wrapper to not be x86 specific.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5785
2006-03-21 10:58:35 +00:00
Tom Hughes
391d10fdeb Fix the tkill system call wrapper and enable it on x86 and amd64.
Fixes bug #121901.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5651
2006-02-15 10:34:50 +00:00
Tom Hughes
d7ecda24bb Enable getpriority and setpriority on amd64. Fixes bug #117369.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5256
2005-12-01 09:21:37 +00:00
Tom Hughes
85bd6d7d0b Enable a few extra system calls on amd64 as found by the Python test suite.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5227
2005-11-21 13:57:49 +00:00
Julian Seward
19e8e951e5 Counterpart to r5202: restore previous assembler state with .previous
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5204
2005-11-19 02:02:57 +00:00
Julian Seward
418aae5c97 Hmm. Perhaps all those top-level pieces of assembly weren't such a
clever idea.  There's no reason to assume the assembler is in
.text-mode when it encounters them, and as gcc 2.96 rudely
demonstrates, sometimes it isn't.  So put .text in front of all of
them.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5202
2005-11-18 23:50:43 +00:00
Tom Hughes
0cfea5db07 Enable the prctl system call on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5127
2005-11-14 15:26:03 +00:00
Tom Hughes
66af8e3222 Enable remaining *xattr system calls on amd64. Fixes bug #116200.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5106
2005-11-13 00:08:03 +00:00
Tom Hughes
d1c6c1b8d2 Fix compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5081
2005-11-11 11:54:11 +00:00
Nicholas Nethercote
057061d2ae Try to avoid compiler warnings on AMD64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5065
2005-11-10 04:02:19 +00:00
Nicholas Nethercote
8a58b97fbb Factor out some common code in m_syswrap.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5062
2005-11-10 02:48:04 +00:00
Tom Hughes
44b7b48fd3 Add missing quote.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5051
2005-11-09 08:52:21 +00:00
Nicholas Nethercote
bf21ecfdb0 Factor out some common code in m_syswrap.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5049
2005-11-09 04:49:28 +00:00
Tom Hughes
2b553e2835 Add support for the mbind system call on x86 and amd64. Fixes bug #114756.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4958
2005-10-20 17:00:23 +00:00
Tom Hughes
6961dcf591 Fix statement-before-declaration warnings for the core code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4906
2005-10-12 10:45:27 +00:00
Tom Hughes
6c610b89c7 Rationalise the mmap system call handling - after examining the kernel
source it turns out that there are five different versions of mmap for
the three platforms we currently support:

  - On x86-linux there is mmap (aka old_mmap) which takes the
    arguments in a memory block and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On ppc32-linux there is mmap (aka sys_mmap) which takes the
    arguments in the normal way and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On amd64-linux everything is simple and there is just the one
    call, mmap (aka sys_mmap)  which takes the arguments in the normal
    way and the offset in bytes.

To reconcile all this I have created a generic handler and then
written five platform specific wrappers which normalise all the
arguments and then call the generic handler.

I have also modified the address space manager to use mmap2 rather
than mmap on x86 and ppc32 so that large offsets can be correctly
handled.

There is still an issue of OffT truncating offsets as we go through
the address space manager that will need to be addressed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4834
2005-09-30 08:07:53 +00:00