]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Add support for preadv2 and pwritev2 syscalls
authorAlexandra Hájková <ahajkova@redhat.com>
Tue, 4 Jun 2019 11:47:14 +0000 (13:47 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 2 Jul 2019 22:19:16 +0000 (00:19 +0200)
commitb0861063a8d2a55bb7423e90d26806bab0f78a12
treef6754c13d312eabce03aac0290dd1827c1470d58
parent97fa86915e717dc68123f05b668b73adfe8885a9
Add support for preadv2 and pwritev2 syscalls

Support for amd64, x86 - 64 and 32 bit, arm64, ppc64, ppc64le,
s390x, mips64. This should work identically on all
arches, tested on x86 32bit and 64bit one, but enabled on all.

Refactor the code to be reusable between old/new syscalls. Resolve TODO
items in the code. Add the testcase for the preadv2/pwritev2 and also
add the (similar) testcase for the older preadv/pwritev syscalls.

Trying to test handling an uninitialized flag argument for the v2 syscalls
does not work because the flag always comes out as defined zero.
Turns out glibc does this deliberately on 64bit architectures because
the kernel does actually have a low_offset and high_offset argument, but
ignores the high_offset/assumes it is zero.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=601cc11d054ae4b5e9b5babec3d8e4667a2cb9b5

https://bugs.kde.org/408414
18 files changed:
NEWS
configure.ac
coregrind/m_syswrap/priv_syswrap-generic.h
coregrind/m_syswrap/priv_syswrap-linux.h
coregrind/m_syswrap/syswrap-amd64-linux.c
coregrind/m_syswrap/syswrap-arm64-linux.c
coregrind/m_syswrap/syswrap-linux.c
coregrind/m_syswrap/syswrap-mips64-linux.c
coregrind/m_syswrap/syswrap-ppc64-linux.c
coregrind/m_syswrap/syswrap-s390x-linux.c
coregrind/m_syswrap/syswrap-x86-linux.c
memcheck/tests/linux/Makefile.am
memcheck/tests/linux/sys-preadv2_pwritev2.c [new file with mode: 0644]
memcheck/tests/linux/sys-preadv2_pwritev2.stderr.exp [new file with mode: 0644]
memcheck/tests/linux/sys-preadv2_pwritev2.vgtest [new file with mode: 0644]
memcheck/tests/linux/sys-preadv_pwritev.c [new file with mode: 0644]
memcheck/tests/linux/sys-preadv_pwritev.stderr.exp [new file with mode: 0644]
memcheck/tests/linux/sys-preadv_pwritev.vgtest [new file with mode: 0644]