]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix 397605 - Add support for Linux FICLONE ioctl
authorLaurent Bonnans <laurent.bonnans@here.com>
Fri, 16 Nov 2018 14:22:18 +0000 (15:22 +0100)
committerMark Wielaard <mark@klomp.org>
Sun, 20 Dec 2020 19:00:57 +0000 (20:00 +0100)
NEWS
coregrind/m_syswrap/syswrap-linux.c
include/vki/vki-linux.h

diff --git a/NEWS b/NEWS
index 45ee61d5adde260e162c6674e4282cb38436b3f1..9dae3a2702c1adb4790a8a22cc68fb774031d361 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,7 @@ where XXXXXX is the bug number as listed below.
 n-i-bz  helgrind: If hg_cli__realloc fails, return NULL.
 
 384729  __libc_freeres inhibits cross-platform valgrind
+397605  ioctl FICLONE mishandled
 408663  Suppression file for musl libc
 404076  s390x: z14 vector instructions not implemented
 415293  Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave*
index 41849873e6ca7df94d3a1cb8ccfdc27b2860c632..328e02a9803003af1a3d1059984d8a078968348d 100644 (file)
@@ -7961,6 +7961,11 @@ PRE(sys_ioctl)
    case VKI_FIBMAP:
       PRE_MEM_READ( "ioctl(FIBMAP)", ARG3, sizeof(int));
       break;
+   case VKI_FICLONE:
+      /* The direction of FICLONE (W) is incorrectly specified
+       * as it expects a file descriptor and not a pointer to
+       * user data */
+      break;
 
    case VKI_FBIOGET_VSCREENINFO: /* 0x4600 */
       PRE_MEM_WRITE( "ioctl(FBIOGET_VSCREENINFO)", ARG3,
@@ -10898,6 +10903,8 @@ POST(sys_ioctl)
    case VKI_FIBMAP:
       POST_MEM_WRITE(ARG3, sizeof(int));
       break;
+   case VKI_FICLONE:
+      break;
 
    case VKI_FBIOGET_VSCREENINFO: //0x4600
       POST_MEM_WRITE(ARG3, sizeof(struct vki_fb_var_screeninfo));
index ef93b9258521943ba0eddac79fff60e125dcb9b9..3b9dc37796bcdd5b983d2596ec6a2719cc7ba9ba 100644 (file)
@@ -1888,6 +1888,7 @@ struct vki_ppdev_frob_struct {
 
 #define VKI_FIBMAP     _VKI_IO(0x00,1) /* bmap access */
 #define VKI_FIGETBSZ    _VKI_IO(0x00,2)        /* get the block size used for bmap */
+#define VKI_FICLONE     _VKI_IOW(0x94, 9, int)
 
 //----------------------------------------------------------------------
 // From linux-2.6.8.1/include/scsi/sg.h