]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: hook up tee syscall correctly
authorPetar Jovanovic <mips32r2@gmail.com>
Wed, 14 Aug 2019 15:27:25 +0000 (15:27 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Wed, 14 Aug 2019 15:27:25 +0000 (15:27 +0000)
Hook up sys_tee for mips32 and mips64 correctly.
For mips64, it is just a simplification to use generic linux implementation.

This fixes tee01 test in the LTP test suite for mips32.

coregrind/m_syswrap/syswrap-mips32-linux.c
coregrind/m_syswrap/syswrap-mips64-linux.c

index fe58d0925a02d31ed7c8fd38df10bf1d8b6e3b3e..606b9e2539a0ac2167cf9094e1525ddafc45f249 100644 (file)
@@ -1062,6 +1062,7 @@ static SyscallTableEntry syscall_main_table[] = {
    //..
    LINX_ (__NR_splice,                 sys_splice),                  // 304
    PLAX_ (__NR_sync_file_range,        sys_sync_file_range),         // 305
+   LINX_ (__NR_tee,                    sys_tee),                     // 306
    //..
    LINX_ (__NR_set_robust_list,        sys_set_robust_list),         // 309
    LINXY (__NR_get_robust_list,        sys_get_robust_list),         // 310
index 0af43a7b7c9788bee5f66ef1be7cd5479cf80e58..d0bb3cdf175d87e8cba7151b638970395f51e9d1 100644 (file)
@@ -216,7 +216,6 @@ SysRes sys_set_tls ( ThreadId tid, Addr tlsptr )
    file, but that requires even more macro magic. */
 
 DECL_TEMPLATE (mips_linux, sys_set_thread_area);
-DECL_TEMPLATE (mips_linux, sys_tee);
 DECL_TEMPLATE (mips_linux, sys_vmsplice);
 DECL_TEMPLATE (mips_linux, sys_ustat);
 DECL_TEMPLATE (mips_linux, sys_sysfs);
@@ -235,14 +234,6 @@ DECL_TEMPLATE (mips_linux, sys_rt_sigreturn);
 DECL_TEMPLATE (mips_linux, sys_pipe);
 DECL_TEMPLATE (mips_linux, sys_fadvise64);
 
-PRE(sys_tee)
-{
-   PRINT("sys_tee ( %ld, %ld, %" FMT_REGWORD "u, %#" FMT_REGWORD "x )",
-         SARG1, SARG2, ARG3, ARG4);
-   PRE_REG_READ4(long, "sys_tee", int, fdin, int, fdout, vki_size_t, len,
-                 int, flags);
-}
-
 PRE(sys_vmsplice)
 {
    PRINT("sys_vmsplice ( %ld, %#" FMT_REGWORD "x, %" FMT_REGWORD "u, %ld )",
@@ -796,7 +787,7 @@ static SyscallTableEntry syscall_main_table[] = {
    PLAX_ (__NR_unshare, sys_unshare),
    LINX_ (__NR_splice, sys_splice),
    LINX_ (__NR_sync_file_range, sys_sync_file_range),
-   PLAX_ (__NR_tee, sys_tee),
+   LINX_ (__NR_tee, sys_tee),
    PLAX_ (__NR_vmsplice, sys_vmsplice),
    LINX_ (__NR_set_robust_list, sys_set_robust_list),
    LINXY (__NR_get_robust_list, sys_get_robust_list),