]> granicus.if.org Git - strace/commitdiff
Implement and use new parsers of futex syscall
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 12 May 2019 22:45:45 +0000 (22:45 +0000)
* futex.c (SYS_FUNC(futex)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(futex_time32)): New function.
* linux/64/syscallent.h: Replace SEN(futex) with SEN(futex_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(futex) with SEN(futex_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.

26 files changed:
futex.c
linux/32/syscallent.h
linux/64/syscallent.h
linux/alpha/syscallent.h
linux/arm/syscallent.h
linux/avr32/syscallent.h
linux/bfin/syscallent.h
linux/hppa/syscallent.h
linux/i386/syscallent.h
linux/ia64/syscallent.h
linux/m68k/syscallent.h
linux/microblaze/syscallent.h
linux/mips/syscallent-n32.h
linux/mips/syscallent-n64.h
linux/mips/syscallent-o32.h
linux/powerpc/syscallent.h
linux/powerpc64/syscallent.h
linux/s390/syscallent.h
linux/s390x/syscallent.h
linux/sh/syscallent.h
linux/sh64/syscallent.h
linux/sparc/syscallent.h
linux/sparc64/syscallent.h
linux/x32/syscallent.h
linux/x86_64/syscallent.h
linux/xtensa/syscallent.h

diff --git a/futex.c b/futex.c
index b9048bc0df34cda76153b88ca5f335fd17647b0d..71de714fae408f6ebfad808aaa387d1ccb70d896 100644 (file)
--- a/futex.c
+++ b/futex.c
@@ -123,10 +123,12 @@ do_futex(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
        return RVAL_DECODED;
 }
 
-SYS_FUNC(futex)
+#if HAVE_ARCH_TIME32_SYSCALLS
+SYS_FUNC(futex_time32)
 {
-       return do_futex(tcp, print_timespec);
+       return do_futex(tcp, print_timespec32);
 }
+#endif
 
 SYS_FUNC(futex_time64)
 {
index 6251730b0ed15a4bd488f413d47a414939358d32..9ee228223b878438bf76b0c9590c049eda0dcd78 100644 (file)
 [ 95] = { 5,   TP,             SEN(waitid),                    "waitid"                },
 [ 96] = { 1,   0,              SEN(set_tid_address),           "set_tid_address"       },
 [ 97] = { 1,   TP,             SEN(unshare),                   "unshare"               },
-[ 98] = { 6,   0,              SEN(futex),                     "futex"                 },
+[ 98] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [ 99] = { 2,   0,              SEN(set_robust_list),           "set_robust_list"       },
 [100] = { 3,   0,              SEN(get_robust_list),           "get_robust_list"       },
 [101] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
index 4c59344f17c9d9b2cdb9468e831d0fd2fa07311d..6106a95b87180360c78b206fa87f1b92bf6106a1 100644 (file)
 [ 95] = { 5,   TP,             SEN(waitid),                    "waitid"                },
 [ 96] = { 1,   0,              SEN(set_tid_address),           "set_tid_address"       },
 [ 97] = { 1,   TP,             SEN(unshare),                   "unshare"               },
-[ 98] = { 6,   0,              SEN(futex),                     "futex"                 },
+[ 98] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [ 99] = { 2,   0,              SEN(set_robust_list),           "set_robust_list"       },
 [100] = { 3,   0,              SEN(get_robust_list),           "get_robust_list"       },
 [101] = { 2,   0,              SEN(nanosleep),                 "nanosleep"             },
index 3db6b35bd6f492d09bf953577ec4a5dc0d7d225a..d001a97a3610021150327dc52e576d10e4ac0df7 100644 (file)
 [391] = { 2,   TF,             SEN(removexattr),               "removexattr"           },
 [392] = { 2,   TF,             SEN(removexattr),               "lremovexattr"          },
 [393] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
-[394] = { 6,   0,              SEN(futex),                     "futex"                 },
+[394] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [395] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [396] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [397] = { 5,   0,              SEN(tuxcall),                   "tuxcall"               }, /* not implemented */
index 43b52e12bd4afa8aca3ca815cb204b4ae37b1e6f..df6cd6e4dd91cf36c6baa7054b0742b65310af75 100644 (file)
 [237] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [238] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [239] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[240] = { 6,   0,              SEN(futex),                     "futex"                 },
+[240] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [241] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [242] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [243] = { 2,   TM,             SEN(io_setup),                  "io_setup"              },
index 1c1bda658aab3ec07f5e53318645cd1cdf698342..30082d69033a13cddb4c8cb4cc10958b2f36b231 100644 (file)
 [189] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [190] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [191] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[192] = { 6,   0,              SEN(futex),                     "futex"                 },
+[192] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [193] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [194] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [195] = { 2,   0,              SEN(capget),                    "capget"                },
index fe75eb83dcf8e4ccd8d6d7ddfb20a822b70a6cca..21fe89bd2445a35c75b251403c087fad174ce8fa 100644 (file)
 [237] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [238] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [239] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[240] = { 6,   0,              SEN(futex),                     "futex"                 },
+[240] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [241] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [242] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [243] = { 1,   0,              SEN(set_thread_area),           "set_thread_area"       },
index bfc83aecb7900baad1e4d4781c7caf6b21e3e041..ebbceaa27dcf51bbea53d181484a347677e97081 100644 (file)
 [207] = { 4,   TD,             SEN(readahead),                 "readahead"             },
 [208] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [209] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[210] = { 6,   0,              SEN(futex),                     "futex"                 },
+[210] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [211] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [212] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [213] = { 5,   0,              SEN(printargs),                 "set_thread_area"       },
index 0ce8e36b76d60406bcb196eadbaf850eec3d0492..6e81662e1b6df2606237984f87dc51f8c03e75af 100644 (file)
 [237] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [238] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [239] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[240] = { 6,   0,              SEN(futex),                     "futex"                 },
+[240] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [241] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [242] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [243] = { 1,   0,              SEN(set_thread_area),           "set_thread_area"       },
index ec62fb172f18287093a904f72018bbc8720c8fc2..f86a4c059dc7ab3218df278992e86c6806d6cf58 100644 (file)
 [1024 + 203] = { 2,    TF,             SEN(removexattr),               "lremovexattr"          },
 [1024 + 204] = { 2,    TD,             SEN(fremovexattr),              "fremovexattr"          },
 [1024 + 205] = { 2,    TS,             SEN(kill),                      "tkill"                 },
-[1024 + 206] = { 6,    0,              SEN(futex),                     "futex"                 },
+[1024 + 206] = { 6,    0,              SEN(futex_time64),              "futex"                 },
 [1024 + 207] = { 3,    0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [1024 + 208] = { 3,    0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [1024 + 209] = { 1,    0,              SEN(set_tid_address),           "set_tid_address"       },
index 779fb402235c127958375187105c7267b52e3e12..d27aa9dc5e5351833c32a078c7bca737d345c992 100644 (file)
 [232] = { 2,   TF,             SEN(removexattr),               "removexattr"           },
 [233] = { 2,   TF,             SEN(removexattr),               "lremovexattr"          },
 [234] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
-[235] = { 6,   0,              SEN(futex),                     "futex"                 },
+[235] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [236] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
 [237] = { 3,   TM,             SEN(mincore),                   "mincore"               },
 [238] = { 3,   TM,             SEN(madvise),                   "madvise"               },
index a325646a1d0b24e206c47819e37237432b216748..7e9eaa64396d64ba2cd52463d1505100deb599dd 100644 (file)
 [237] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [238] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [239] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[240] = { 6,   0,              SEN(futex),                     "futex"                 },
+[240] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [241] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [242] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [243] = { 1,   0,              SEN(set_thread_area),           "set_thread_area"       },
index e5d7d9c7a73850a9b870fe609262079d92b04e86..3849dbd6f22a5845fbd63c549c2d9532048ba9c2 100644 (file)
 [6191] = { 2,  TD,             SEN(fremovexattr),              "fremovexattr"          },
 [6192] = { 2,  TS,             SEN(kill),                      "tkill"                 },
 [6193] = { 1,  0,              SEN(time),                      "time"                  },
-[6194] = { 6,  0,              SEN(futex),                     "futex"                 },
+[6194] = { 6,  0,              SEN(futex_time32),              "futex"                 },
 [6195] = { 3,  0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [6196] = { 3,  0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [6197] = { 3,  0,              SEN(printargs),                 "cacheflush"            },
index 1b1b4079dc4ce43a705bba957584f972167ca4d7..c5c72892c9269ed93c5d7b0fcd51ebfe52ea1cd2 100644 (file)
 [5191] = { 2,  TD,             SEN(fremovexattr),              "fremovexattr"          },
 [5192] = { 2,  TS,             SEN(kill),                      "tkill"                 },
 [5193] = { 1,  0,              SEN(time),                      "time"                  },
-[5194] = { 6,  0,              SEN(futex),                     "futex"                 },
+[5194] = { 6,  0,              SEN(futex_time64),              "futex"                 },
 [5195] = { 3,  0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [5196] = { 3,  0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [5197] = { 3,  0,              SEN(printargs),                 "cacheflush"            },
index c4aa51cad2e169fe8a66ebf8639c82089ef633ff..5eb06ac3ccff12569865213e7aecbf46a4adaaec 100644 (file)
 [4235] = { 2,  TD,             SEN(fremovexattr),              "fremovexattr"          },
 [4236] = { 2,  TS,             SEN(kill),                      "tkill"                 },
 [4237] = { 4,  TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[4238] = { 6,  0,              SEN(futex),                     "futex"                 },
+[4238] = { 6,  0,              SEN(futex_time32),              "futex"                 },
 [4239] = { 3,  0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [4240] = { 3,  0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [4241] = { 2,  TM,             SEN(io_setup),                  "io_setup"              },
index af7f412ad17b60e3263d6ce2d72388e28b5cbe33..82620c0faffd4b752e58a7bf75f902f64c5a0a1e 100644 (file)
 [218] = { 2,   TF,             SEN(removexattr),               "removexattr"           },
 [219] = { 2,   TF,             SEN(removexattr),               "lremovexattr"          },
 [220] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
-[221] = { 6,   0,              SEN(futex),                     "futex"                 },
+[221] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [222] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [223] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [224] = { },
index 2dd1fa876eb83d4e8c523024eb19a0d696937e9d..90177a1479d989052a4ef23d83db0fae649c0617 100644 (file)
 [218] = { 2,   TF,             SEN(removexattr),               "removexattr"           },
 [219] = { 2,   TF,             SEN(removexattr),               "lremovexattr"          },
 [220] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
-[221] = { 6,   0,              SEN(futex),                     "futex"                 },
+[221] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [222] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [223] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [224] = { },
index 12e1035c06397e70720b774a18d1358477bf08fc..bdcdbcb25e912815a4d96479018b9f64189d1146 100644 (file)
 [235] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [236] = { 0,   PU|NF,          SEN(gettid),                    "gettid"                },
 [237] = { 2,   TS,             SEN(kill),                      "tkill"                 },
-[238] = { 6,   0,              SEN(futex),                     "futex"                 },
+[238] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [239] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [240] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [241] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
index 759494394c33b05a74bb603d3db4b7d3c648f90f..aee9252cbc2ff790f4c3b60cd09fb4bb4870691b 100644 (file)
 [235] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [236] = { 0,   PU|NF,          SEN(gettid),                    "gettid"                },
 [237] = { 2,   TS,             SEN(kill),                      "tkill"                 },
-[238] = { 6,   0,              SEN(futex),                     "futex"                 },
+[238] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [239] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [240] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [241] = { 3,   TS,             SEN(tgkill),                    "tgkill"                },
index 2274fd009005512b365c4ec255d5c3a95d17f71a..bcb12223c9a9324f8ccc9a34d55b673574a7afa7 100644 (file)
 [237] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [238] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [239] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[240] = { 6,   0,              SEN(futex),                     "futex"                 },
+[240] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [241] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [242] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [243 ... 244] = { },
index 9d4fd507696fd9eead5c5de044f0125558c2b892..3efc3b525bd882f2cc106cb21d124dba8f05a5d1 100644 (file)
 [265] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [266] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [267] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
-[268] = { 6,   0,              SEN(futex),                     "futex"                 },
+[268] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [269] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [270] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [271 ... 272] = { },
index d2c51e8c52f31f238f6b3b1b76f8e355fc32dede..359824d9ed1759b3f6c1562e9604929726ff1165 100644 (file)
 [139] = { 2,   TF|TST|TSTA,    SEN(stat64),                    "stat64"                },
 [140] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
 [141] = { 3,   TN,             SEN(getpeername),               "getpeername"           },
-[142] = { 6,   0,              SEN(futex),                     "futex"                 },
+[142] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [143] = { 0,   PU|NF,          SEN(gettid),                    "gettid"                },
 [144] = { 2,   0,              SEN(getrlimit),                 "getrlimit"             },
 [145] = { 2,   0,              SEN(setrlimit),                 "setrlimit"             },
index c292cab46597a9a1cc8129a00a5dfec290680643..42c47af2b91f1b2ec662fab129ccdf98d1503f6a 100644 (file)
 [139] = { 2,   TF|TST|TSTA,    SEN(stat64),                    "stat64"                },
 [140] = { 4,   TD|TN,          SEN(sendfile64),                "sendfile64"            },
 [141] = { 3,   TN,             SEN(getpeername),               "getpeername"           },
-[142] = { 6,   0,              SEN(futex),                     "futex"                 },
+[142] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [143] = { 0,   PU|NF,          SEN(gettid),                    "gettid"                },
 [144] = { 2,   0,              SEN(getrlimit),                 "getrlimit"             },
 [145] = { 2,   0,              SEN(setrlimit),                 "setrlimit"             },
index 7c21aa337157746741ce66deff07a6b72364eef9..1a1b376114f3c86ab79e68fe16d0705e8ea6ad89 100644 (file)
 [199] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [200] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [201] = { 1,   0,              SEN(time),                      "time"                  },
-[202] = { 6,   0,              SEN(futex),                     "futex"                 },
+[202] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [203] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [204] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [205] = { 1,   0,              SEN(printargs),                 "set_thread_area#64"    },
index c738ab2fc46956577a668bb859345223eebff16e..e46d500fbcf1b2c0c6eeefb2ffee789c35c55e92 100644 (file)
 [199] = { 2,   TD,             SEN(fremovexattr),              "fremovexattr"          },
 [200] = { 2,   TS,             SEN(kill),                      "tkill"                 },
 [201] = { 1,   0,              SEN(time),                      "time"                  },
-[202] = { 6,   0,              SEN(futex),                     "futex"                 },
+[202] = { 6,   0,              SEN(futex_time64),              "futex"                 },
 [203] = { 3,   0,              SEN(sched_setaffinity),         "sched_setaffinity"     },
 [204] = { 3,   0,              SEN(sched_getaffinity),         "sched_getaffinity"     },
 [205] = { 1,   0,              SEN(set_thread_area),           "set_thread_area"       },
index a5dac2c344f98e60f2042c0eaad458cd9c9c0909..9a0967257a20d8296afdd4c62702eb70be4765c4 100644 (file)
 [188] = { 2,   0,              SEN(setrlimit),                 "setrlimit"             },
 [189] = { 2,   0,              SEN(getrlimit),                 "getrlimit"             },
 [190] = { 2,   0,              SEN(getrusage),                 "getrusage"             },
-[191] = { 6,   0,              SEN(futex),                     "futex"                 },
+[191] = { 6,   0,              SEN(futex_time32),              "futex"                 },
 [192] = { 2,   0,              SEN(gettimeofday),              "gettimeofday"          },
 [193] = { 2,   0,              SEN(settimeofday),              "settimeofday"          },
 [194] = { 1,   0,              SEN(adjtimex32),                "adjtimex"              },