From: Petar Jovanovic Date: Mon, 5 Aug 2019 16:28:48 +0000 (+0000) Subject: mips: hook up splice syscall correctly X-Git-Tag: VALGRIND_3_16_0~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d830990cd9391f2e4f995d01d00e3d75d09ea238;p=thirdparty%2Fvalgrind.git mips: hook up splice syscall correctly Hook up splice syscall for mips32 and mips64 correctly. This fixes splice01 and several other tests in the LTP test suite. --- diff --git a/coregrind/m_syswrap/syswrap-mips32-linux.c b/coregrind/m_syswrap/syswrap-mips32-linux.c index d9e3a04e2e..7905547d32 100644 --- a/coregrind/m_syswrap/syswrap-mips32-linux.c +++ b/coregrind/m_syswrap/syswrap-mips32-linux.c @@ -1037,6 +1037,8 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_pselect6, sys_pselect6), // 301 LINXY (__NR_ppoll, sys_ppoll), // 302 //.. + LINX_ (__NR_splice, sys_splice), // 304 + //.. LINX_ (__NR_set_robust_list, sys_set_robust_list), // 309 LINXY (__NR_get_robust_list, sys_get_robust_list), // 310 //.. diff --git a/coregrind/m_syswrap/syswrap-mips64-linux.c b/coregrind/m_syswrap/syswrap-mips64-linux.c index 9b5c07f15c..0af43a7b7c 100644 --- a/coregrind/m_syswrap/syswrap-mips64-linux.c +++ b/coregrind/m_syswrap/syswrap-mips64-linux.c @@ -217,7 +217,6 @@ SysRes sys_set_tls ( ThreadId tid, Addr tlsptr ) DECL_TEMPLATE (mips_linux, sys_set_thread_area); DECL_TEMPLATE (mips_linux, sys_tee); -DECL_TEMPLATE (mips_linux, sys_splice); DECL_TEMPLATE (mips_linux, sys_vmsplice); DECL_TEMPLATE (mips_linux, sys_ustat); DECL_TEMPLATE (mips_linux, sys_sysfs); @@ -244,16 +243,6 @@ PRE(sys_tee) int, flags); } -PRE(sys_splice) -{ - PRINT("sys_splice ( %ld, %#" FMT_REGWORD "x, %ld, %#" FMT_REGWORD - "x, %" FMT_REGWORD "u, %#" FMT_REGWORD "x )", - SARG1, ARG2, SARG3, ARG4, ARG5, ARG6); - - PRE_REG_READ6(long, "sys_splice", int, fdin, vki_loff_t, sizein, int, - fdout, vki_loff_t, sizeout, vki_size_t, len, int, flags); -} - PRE(sys_vmsplice) { PRINT("sys_vmsplice ( %ld, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %ld )", @@ -805,7 +794,7 @@ static SyscallTableEntry syscall_main_table[] = { LINXY (__NR_pselect6, sys_pselect6), LINXY (__NR_ppoll, sys_ppoll), PLAX_ (__NR_unshare, sys_unshare), - PLAX_ (__NR_splice, sys_splice), + LINX_ (__NR_splice, sys_splice), LINX_ (__NR_sync_file_range, sys_sync_file_range), PLAX_ (__NR_tee, sys_tee), PLAX_ (__NR_vmsplice, sys_vmsplice),