]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add missing FUSE_COMPATIBLE_MAY_BLOCKs
authorMark Wielaard <mark@klomp.org>
Sat, 21 Sep 2024 20:27:24 +0000 (22:27 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 5 Oct 2024 12:49:16 +0000 (14:49 +0200)
Various syscalls (in particular "at" variants) PRE handlers were
missing a FUSE_COMPATIBLE_MAY_BLOCK statement.

Add it to the generic PRE handlers of access and statfs64. And the
linux PRE handlers of mknodat, fchownat, futimesat, utimensat,
utimensat_time64, renameat, renameat2, readlinkat, fchmodat,
fchmodat2, faccessat and faccessat2.

https://bugs.kde.org/show_bug.cgi?id=493454

NEWS
coregrind/m_syswrap/syswrap-generic.c
coregrind/m_syswrap/syswrap-linux.c

diff --git a/NEWS b/NEWS
index 003cf8916ce7097b5d8d9708869c7c540a4a5265..c76791aae1ab85cb9ee8284f5d3c70ffd81c1729 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -67,6 +67,7 @@ are not entered into bugzilla tend to get forgotten about or ignored.
 492214  statx(fd, NULL, AT_EMPTY_PATH) is supported since Linux 6.11
         but not supported in valgrind
 492663  Valgrind ignores debug info for some binaries
+493454  Missing FUSE_COMPATIBLE_MAY_BLOCK markers
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index 48be8e8bf075db7947a69eb8f27e2744b4712bc2..e4602e44a80cc0c0b96c49a59b5f7e09b6502c53 100644 (file)
@@ -3457,6 +3457,7 @@ PRE(sys_execve)
 
 PRE(sys_access)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_access ( %#" FMT_REGWORD "x(%s), %ld )", ARG1,
          (HChar*)(Addr)ARG1, SARG2);
    PRE_REG_READ2(long, "access", const char *, pathname, int, mode);
@@ -4846,6 +4847,7 @@ POST(sys_statfs)
 
 PRE(sys_statfs64)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_statfs64 ( %#" FMT_REGWORD "x(%s), %llu, %#" FMT_REGWORD "x )",
          ARG1, (char*)(Addr)ARG1, (ULong)ARG2, ARG3);
    PRE_REG_READ3(long, "statfs64",
index 901c32e95fe8db08faeb5aa874132e2d31a85009..a9b82d16a17b6e9905f9bdd28d279df9f0dbd3ef 100644 (file)
@@ -5869,6 +5869,7 @@ PRE(sys_mkdirat)
 
 PRE(sys_mknodat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_mknodat ( %ld, %#" FMT_REGWORD "x(%s), 0x%" FMT_REGWORD "x, 0x%"
          FMT_REGWORD "x )", SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4 );
    PRE_REG_READ4(long, "mknodat",
@@ -5878,6 +5879,7 @@ PRE(sys_mknodat)
 
 PRE(sys_fchownat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_fchownat ( %ld, %#" FMT_REGWORD "x(%s), 0x%" FMT_REGWORD "x, 0x%"
           FMT_REGWORD "x )", SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
    PRE_REG_READ4(long, "fchownat",
@@ -5888,6 +5890,7 @@ PRE(sys_fchownat)
 
 PRE(sys_futimesat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_futimesat ( %ld, %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3);
    PRE_REG_READ3(long, "futimesat",
@@ -5900,6 +5903,7 @@ PRE(sys_futimesat)
 
 PRE(sys_utimensat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_utimensat ( %ld, %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, 0x%"
           FMT_REGWORD "x )", SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
    PRE_REG_READ4(long, "utimensat",
@@ -5929,6 +5933,7 @@ PRE(sys_utimensat)
 
 PRE(sys_utimensat_time64)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_utimensat_time64 ( %ld, %#" FMT_REGWORD "x(%s), %#"
          FMT_REGWORD "x, 0x%" FMT_REGWORD "x )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
@@ -5992,6 +5997,7 @@ PRE(sys_unlinkat)
 
 PRE(sys_renameat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_renameat ( %ld, %#" FMT_REGWORD "x(%s), %ld, %#"
          FMT_REGWORD "x(%s) )", SARG1, ARG2, (HChar*)(Addr)ARG2, SARG3,
          ARG4, (HChar*)(Addr)ARG4);
@@ -6004,6 +6010,7 @@ PRE(sys_renameat)
 
 PRE(sys_renameat2)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_renameat2 ( %ld, %#" FMT_REGWORD "x(%s), %ld, %#" FMT_REGWORD
          "x(%s), %" FMT_REGWORD "u )", SARG1, ARG2, (HChar*)(Addr)ARG2, SARG3,
          ARG4, (HChar*)(Addr)ARG4, ARG5);
@@ -6045,6 +6052,8 @@ PRE(sys_readlinkat)
    HChar name[30];       // large enough
    Word  saved = SYSNO;
 
+   FUSE_COMPATIBLE_MAY_BLOCK();
+
    PRINT("sys_readlinkat ( %ld, %#" FMT_REGWORD "x(%s), %#" FMT_REGWORD "x, %"
           FMT_REGWORD "u )", SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
    PRE_REG_READ4(long, "readlinkat",
@@ -6074,6 +6083,7 @@ PRE(sys_readlinkat)
 
 PRE(sys_fchmodat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_fchmodat ( %ld, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3);
    PRE_REG_READ3(long, "fchmodat",
@@ -6083,6 +6093,7 @@ PRE(sys_fchmodat)
 
 PRE(sys_fchmodat2)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_fchmodat2 ( %ld, %#" FMT_REGWORD "x(%s), %" FMT_REGWORD "u, %"
          FMT_REGWORD "u )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, ARG3, ARG4);
@@ -6094,6 +6105,7 @@ PRE(sys_fchmodat2)
 
 PRE(sys_faccessat)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_faccessat ( %ld, %#" FMT_REGWORD "x(%s), %ld )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, SARG3);
    PRE_REG_READ3(long, "faccessat",
@@ -6103,6 +6115,7 @@ PRE(sys_faccessat)
 
 PRE(sys_faccessat2)
 {
+   FUSE_COMPATIBLE_MAY_BLOCK();
    PRINT("sys_faccessat2 ( %ld, %#" FMT_REGWORD "x(%s), %ld, %ld )",
          SARG1, ARG2, (HChar*)(Addr)ARG2, SARG3, SARG4);
    PRE_REG_READ4(long, "faccessat2",