From: Dmitry V. Levin Date: Sat, 11 May 2019 22:35:56 +0000 (+0000) Subject: Use new parsers of adjtimex and clock_adjtime syscalls X-Git-Tag: v5.1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f97d66953f781d490d5e0e5baac19160e68217c;p=strace Use new parsers of adjtimex and clock_adjtime syscalls * print_timex.c (struct_timex, print_timex): Remove. * time.c (SYS_FUNC(adjtimex), SYS_FUNC(clock_adjtime)): Remove. * linux/alpha/syscallent.h [303]: Replace SEN(adjtimex) with SEN(adjtimex32). [366]: Replace SEN(adjtimex) with SEN(adjtimex64). [499]: Replace SEN(clock_adjtime) with SEN(clock_adjtime64). * linux/32/syscallent.h: Replace SEN(adjtimex) and SEN(clock_adjtime) with SEN(adjtimex32) and SEN(clock_adjtime32), respectively. * 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. * linux/64/syscallent.h: Replace SEN(adjtimex) and SEN(clock_adjtime) with SEN(adjtimex64) and SEN(clock_adjtime64), respectively. * 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. * tests/adjtimex.c: Include . (main): Print struct timex.tai unconditionally. --- diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index 8bebf68a..b5915bda 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -183,7 +183,7 @@ [168] = { 3, 0, SEN(getcpu), "getcpu" }, [169] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [170] = { 2, 0, SEN(settimeofday), "settimeofday" }, -[171] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[171] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [172] = { 0, PU|NF, SEN(getpid), "getpid" }, [173] = { 0, PU|NF, SEN(getppid), "getppid" }, [174] = { 0, PU|NF, SEN(getuid), "getuid" }, @@ -263,7 +263,7 @@ [263] = { 6, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, [264] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [265] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[266] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[266] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [267] = { 1, TD, SEN(syncfs), "syncfs" }, [268] = { 2, TD, SEN(setns), "setns" }, [269] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, diff --git a/linux/64/syscallent.h b/linux/64/syscallent.h index 6612c384..cb9efc6f 100644 --- a/linux/64/syscallent.h +++ b/linux/64/syscallent.h @@ -176,7 +176,7 @@ [168] = { 3, 0, SEN(getcpu), "getcpu" }, [169] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [170] = { 2, 0, SEN(settimeofday), "settimeofday" }, -[171] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[171] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [172] = { 0, PU|NF, SEN(getpid), "getpid" }, [173] = { 0, PU|NF, SEN(getppid), "getppid" }, [174] = { 0, PU|NF, SEN(getuid), "getuid" }, @@ -256,7 +256,7 @@ [263] = { 5, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, [264] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [265] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[266] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[266] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [267] = { 1, TD, SEN(syncfs), "syncfs" }, [268] = { 2, TD, SEN(setns), "setns" }, [269] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index 78106474..2ced0b98 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -247,7 +247,7 @@ [300] = { 2, 0, SEN(bdflush), "bdflush" }, [301] = { 1, 0, SEN(printargs), "sethae" }, [302] = { 5, TF, SEN(mount), "mount" }, -[303] = { 1, 0, SEN(adjtimex), "old_adjtimex" }, +[303] = { 1, 0, SEN(adjtimex32), "old_adjtimex" }, [304] = { 1, TF, SEN(swapoff), "swapoff" }, [305] = { 3, TD, SEN(getdents), "getdents" }, [306] = { 2, 0, SEN(create_module), "create_module" }, /* not implemented */ @@ -310,7 +310,7 @@ [363] = { 2, TF, SEN(utimes), "utimes" }, [364] = { 2, 0, SEN(getrusage), "getrusage" }, [365] = { 4, TP, SEN(wait4), "wait4" }, -[366] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[366] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [367] = { 2, TF, SEN(getcwd), "getcwd" }, [368] = { 2, 0, SEN(capget), "capget" }, [369] = { 2, 0, SEN(capset), "capset" }, @@ -442,7 +442,7 @@ [496] = { 4, 0, SEN(prlimit64), "prlimit64" }, [497] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [498] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[499] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[499] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [500] = { 1, TD, SEN(syncfs), "syncfs" }, [501] = { 2, TD, SEN(setns), "setns" }, [502] = { 4, TN, SEN(accept4), "accept4" }, diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 2519db34..8f57affa 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -379,7 +379,7 @@ [369] = { 4, 0, SEN(prlimit64), "prlimit64" }, [370] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [371] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[372] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[372] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [373] = { 1, TD, SEN(syncfs), "syncfs" }, [374] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [375] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h index 521af9a9..10ba93a9 100644 --- a/linux/avr32/syscallent.h +++ b/linux/avr32/syscallent.h @@ -118,7 +118,7 @@ [109] = { 4, TD|TN, SEN(sendfile), "sendfile" }, [110] = { 2, 0, SEN(setdomainname), "setdomainname" }, [111] = { 1, 0, SEN(uname), "uname" }, -[112] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[112] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [113] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [114] = { 0, TP, SEN(vfork), "vfork" }, [115] = { 3, 0, SEN(init_module), "init_module" }, @@ -312,7 +312,7 @@ [303] = { 4, 0, SEN(prlimit64), "prlimit64" }, [304] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [305] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[306] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[306] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [307] = { 1, TD, SEN(syncfs), "syncfs" }, [308] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [309] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, diff --git a/linux/bfin/syscallent.h b/linux/bfin/syscallent.h index 9b5cae15..9ef73a86 100644 --- a/linux/bfin/syscallent.h +++ b/linux/bfin/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -383,7 +383,7 @@ [374] = { 3, 0, SEN(cacheflush), "cacheflush" }, [375] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [376] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[377] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[377] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [378] = { 1, TD, SEN(syncfs), "syncfs" }, [379] = { 2, TD, SEN(setns), "setns" }, [380] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index af171208..4e95e669 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -127,7 +127,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 4, TD|TN, SEN(sendfile), "sendfile" }, [123] = { 6, TN, SEN(recvfrom), "recvfrom" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -327,7 +327,7 @@ [321] = { 4, 0, SEN(prlimit64), "prlimit64" }, [322] = { 2, TD, SEN(fanotify_init), "fanotify_init" }, [323] = { 6, TD|TF, SEN(fanotify_mark), "fanotify_mark" }, -[324] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[324] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [325] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [326] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, [327] = { 1, TD, SEN(syncfs), "syncfs" }, diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index d77182d7..0ebb1b7f 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -349,7 +349,7 @@ [340] = { 4, 0, SEN(prlimit64), "prlimit64" }, [341] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [342] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[343] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[343] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [344] = { 1, TD, SEN(syncfs), "syncfs" }, [345] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [346] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index fa63824e..bb931e99 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -114,7 +114,7 @@ [1024 + 104] = { 5, TP, SEN(clone), "clone" }, [1024 + 105] = { 2, 0, SEN(setdomainname), "setdomainname" }, [1024 + 106] = { 1, 0, SEN(uname), "uname" }, -[1024 + 107] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[1024 + 107] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [1024 + 108] = { 2, 0, SEN(create_module), "create_module" }, [1024 + 109] = { 3, 0, SEN(init_module), "init_module" }, [1024 + 110] = { 2, 0, SEN(delete_module), "delete_module" }, @@ -311,7 +311,7 @@ [1024 + 301] = { 4, 0, SEN(prlimit64), "prlimit64" }, [1024 + 302] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [1024 + 303] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[1024 + 304] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[1024 + 304] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [1024 + 305] = { 1, TD, SEN(syncfs), "syncfs" }, [1024 + 306] = { 2, TD, SEN(setns), "setns" }, [1024 + 307] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index bf27442f..13ec4bb6 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 4, 0, SEN(cacheflush), "cacheflush" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -348,7 +348,7 @@ [339] = { 4, 0, SEN(prlimit64), "prlimit64" }, [340] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [341] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[342] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[342] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [343] = { 1, TD, SEN(syncfs), "syncfs" }, [344] = { 2, TD, SEN(setns), "setns" }, [345] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, diff --git a/linux/microblaze/syscallent.h b/linux/microblaze/syscallent.h index b1eea3b4..9c547571 100644 --- a/linux/microblaze/syscallent.h +++ b/linux/microblaze/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(modify_ldt), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -379,7 +379,7 @@ [370] = { 4, 0, SEN(prlimit64), "prlimit64" }, [371] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [372] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[373] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[373] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [374] = { 1, TD, SEN(syncfs), "syncfs" }, [375] = { 2, TD, SEN(setns), "setns" }, [376] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index e30c99cf..ba156b29 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -161,7 +161,7 @@ [6151] = { 2, TF, SEN(pivotroot), "pivot_root" }, [6152] = { 1, 0, SEN(sysctl), "_sysctl" }, [6153] = { 5, 0, SEN(prctl), "prctl" }, -[6154] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[6154] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [6155] = { 2, 0, SEN(setrlimit), "setrlimit" }, [6156] = { 1, TF, SEN(chroot), "chroot" }, [6157] = { 0, 0, SEN(sync), "sync" }, @@ -312,7 +312,7 @@ [6302] = { 4, 0, SEN(prlimit64), "prlimit64" }, [6303] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [6304] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[6305] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[6305] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [6306] = { 1, TD, SEN(syncfs), "syncfs" }, [6307] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [6308] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 5fca5a41..d3ca8d93 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -161,7 +161,7 @@ [5151] = { 2, TF, SEN(pivotroot), "pivot_root" }, [5152] = { 1, 0, SEN(sysctl), "_sysctl" }, [5153] = { 5, 0, SEN(prctl), "prctl" }, -[5154] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[5154] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [5155] = { 2, 0, SEN(setrlimit), "setrlimit" }, [5156] = { 1, TF, SEN(chroot), "chroot" }, [5157] = { 0, 0, SEN(sync), "sync" }, @@ -307,7 +307,7 @@ [5297] = { 4, 0, SEN(prlimit64), "prlimit64" }, [5298] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [5299] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[5300] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[5300] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [5301] = { 1, TD, SEN(syncfs), "syncfs" }, [5302] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [5303] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index f779a0c6..26f459c5 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -132,7 +132,7 @@ [4121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [4122] = { 1, 0, SEN(uname), "uname" }, [4123] = { 0, 0, SEN(modify_ldt), "modify_ldt" }, -[4124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[4124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [4125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [4126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [4127] = { 2, 0, SEN(create_module), "create_module" }, @@ -349,7 +349,7 @@ [4338] = { 4, 0, SEN(prlimit64), "prlimit64" }, [4339] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [4340] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[4341] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[4341] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [4342] = { 1, TD, SEN(syncfs), "syncfs" }, [4343] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [4344] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index e8992984..103a70b5 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 5, 0, SEN(printargs), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -354,7 +354,7 @@ [344] = { 4, TN, SEN(accept4), "accept4" }, [345] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [346] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[347] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[347] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [348] = { 1, TD, SEN(syncfs), "syncfs" }, [349] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [350] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/powerpc64/syscallent.h b/linux/powerpc64/syscallent.h index 6c1d433c..4f4c0678 100644 --- a/linux/powerpc64/syscallent.h +++ b/linux/powerpc64/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 5, 0, SEN(printargs), "modify_ldt" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -349,7 +349,7 @@ [344] = { 4, TN, SEN(accept4), "accept4" }, [345] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [346] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[347] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[347] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [348] = { 1, TD, SEN(syncfs), "syncfs" }, [349] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [350] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 5baf00cb..069a74fa 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -133,7 +133,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -346,7 +346,7 @@ [334] = { 4, 0, SEN(prlimit64), "prlimit64" }, [335] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [336] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[337] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[337] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [338] = { 1, TD, SEN(syncfs), "syncfs" }, [339] = { 2, TD, SEN(setns), "setns" }, [340] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index 379c0e29..18416b3e 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -127,7 +127,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -330,7 +330,7 @@ [334] = { 4, 0, SEN(prlimit64), "prlimit64" }, [335] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [336] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[337] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[337] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [338] = { 1, TD, SEN(syncfs), "syncfs" }, [339] = { 2, TD, SEN(setns), "setns" }, [340] = { 6, 0, SEN(process_vm_readv), "process_vm_readv" }, diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h index f7104d12..8492c4e8 100644 --- a/linux/sh/syscallent.h +++ b/linux/sh/syscallent.h @@ -133,7 +133,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(cacheflush), "cacheflush" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -367,7 +367,7 @@ [358] = { 4, TN, SEN(accept4), "accept4" }, [359] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [360] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[361] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[361] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [362] = { 1, TD, SEN(syncfs), "syncfs" }, [363] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [364] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 86ca4061..a5157558 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -131,7 +131,7 @@ [121] = { 2, 0, SEN(setdomainname), "setdomainname" }, [122] = { 1, 0, SEN(uname), "uname" }, [123] = { 3, 0, SEN(printargs), "cacheflush" }, -[124] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[124] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [125] = { 3, TM|SI, SEN(mprotect), "mprotect" }, [126] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [127] = { 2, 0, SEN(create_module), "create_module" }, @@ -376,7 +376,7 @@ [369] = { 4, 0, SEN(prlimit64), "prlimit64" }, [370] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [371] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[372] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[372] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [373] = { 1, TD, SEN(syncfs), "syncfs" }, [374] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [375] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 4debb45b..ece46b9f 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -224,7 +224,7 @@ [216] = { 0, TS, SEN(sigreturn), "sigreturn" }, [217] = { 5, TP, SEN(clone), "clone" }, [218] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, -[219] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[219] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [220] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [221] = { 2, 0, SEN(create_module), "create_module" }, [222] = { 2, 0, SEN(delete_module), "delete_module" }, @@ -339,7 +339,7 @@ [331] = { 4, 0, SEN(prlimit64), "prlimit64" }, [332] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [333] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[334] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[334] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [335] = { 1, TD, SEN(syncfs), "syncfs" }, [336] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [337] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/sparc64/syscallent.h b/linux/sparc64/syscallent.h index e079d388..5f5fa8b2 100644 --- a/linux/sparc64/syscallent.h +++ b/linux/sparc64/syscallent.h @@ -222,7 +222,7 @@ [216] = { 0, TS, SEN(sigreturn), "sigreturn" }, [217] = { 5, TP, SEN(clone), "clone" }, [218] = { 2, 0, SEN(ioprio_get), "ioprio_get" }, -[219] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[219] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [220] = { 3, TS, SEN(sigprocmask), "sigprocmask" }, [221] = { 2, 0, SEN(create_module), "create_module" }, [222] = { 2, 0, SEN(delete_module), "delete_module" }, @@ -337,7 +337,7 @@ [331] = { 4, 0, SEN(prlimit64), "prlimit64" }, [332] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [333] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[334] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[334] = { 2, 0, SEN(clock_sparc64_adjtime), "clock_adjtime" }, [335] = { 1, TD, SEN(syncfs), "syncfs" }, [336] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [337] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/x32/syscallent.h b/linux/x32/syscallent.h index 38287592..1cf38e89 100644 --- a/linux/x32/syscallent.h +++ b/linux/x32/syscallent.h @@ -164,7 +164,7 @@ [156] = { 1, 0, SEN(printargs), "_sysctl#64" }, [157] = { 5, 0, SEN(prctl), "prctl" }, [158] = { 2, TP, SEN(arch_prctl), "arch_prctl" }, -[159] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[159] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [160] = { 2, 0, SEN(setrlimit), "setrlimit" }, [161] = { 1, TF, SEN(chroot), "chroot" }, [162] = { 0, 0, SEN(sync), "sync" }, @@ -310,7 +310,7 @@ [302] = { 4, 0, SEN(prlimit64), "prlimit64" }, [303] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [304] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[305] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[305] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [306] = { 1, TD, SEN(syncfs), "syncfs" }, [307] = { 4, TN, SEN(printargs), "sendmmsg#64" }, [308] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h index b6bf049d..fd1c50e5 100644 --- a/linux/x86_64/syscallent.h +++ b/linux/x86_64/syscallent.h @@ -164,7 +164,7 @@ [156] = { 1, 0, SEN(sysctl), "_sysctl" }, [157] = { 5, 0, SEN(prctl), "prctl" }, [158] = { 2, TP, SEN(arch_prctl), "arch_prctl" }, -[159] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[159] = { 1, 0, SEN(adjtimex64), "adjtimex" }, [160] = { 2, 0, SEN(setrlimit), "setrlimit" }, [161] = { 1, TF, SEN(chroot), "chroot" }, [162] = { 0, 0, SEN(sync), "sync" }, @@ -310,7 +310,7 @@ [302] = { 4, 0, SEN(prlimit64), "prlimit64" }, [303] = { 5, TD|TF, SEN(name_to_handle_at), "name_to_handle_at" }, [304] = { 3, TD, SEN(open_by_handle_at), "open_by_handle_at" }, -[305] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[305] = { 2, 0, SEN(clock_adjtime64), "clock_adjtime" }, [306] = { 1, TD, SEN(syncfs), "syncfs" }, [307] = { 4, TN, SEN(sendmmsg), "sendmmsg" }, [308] = { 2, TD, SEN(setns), "setns" }, diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index 4ed95753..cd7e2e77 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -193,7 +193,7 @@ [191] = { 6, 0, SEN(futex), "futex" }, [192] = { 2, 0, SEN(gettimeofday), "gettimeofday" }, [193] = { 2, 0, SEN(settimeofday), "settimeofday" }, -[194] = { 1, 0, SEN(adjtimex), "adjtimex" }, +[194] = { 1, 0, SEN(adjtimex32), "adjtimex" }, [195] = { 2, 0, SEN(nanosleep), "nanosleep" }, [196] = { 2, 0, SEN(getgroups), "getgroups" }, [197] = { 2, 0, SEN(setgroups), "setgroups" }, @@ -324,7 +324,7 @@ [326] = { 6, TD, SEN(sync_file_range2), "sync_file_range2" }, [327] = { 5, TD, SEN(perf_event_open), "perf_event_open" }, [328] = { 4, TP|TS, SEN(rt_tgsigqueueinfo), "rt_tgsigqueueinfo" }, -[329] = { 2, 0, SEN(clock_adjtime), "clock_adjtime" }, +[329] = { 2, 0, SEN(clock_adjtime32), "clock_adjtime" }, [330] = { 4, 0, SEN(prlimit64), "prlimit64" }, [331] = { 5, 0, SEN(kcmp), "kcmp" }, [332] = { 3, TD, SEN(finit_module), "finit_module" }, diff --git a/print_timex.c b/print_timex.c index 98d13525..6e141d87 100644 --- a/print_timex.c +++ b/print_timex.c @@ -10,76 +10,35 @@ */ #include "defs.h" - -#include DEF_MPERS_TYPE(struct_timex) - +#include "kernel_timex.h" #include -typedef struct timex struct_timex; - -#include MPERS_DEFS #include "xlat/adjtimex_modes.h" #include "xlat/adjtimex_status.h" -MPERS_PRINTER_DECL(int, print_timex, - struct tcb *const tcp, const kernel_ulong_t addr) -{ - struct_timex tx; - if (umove_or_printaddr(tcp, addr, &tx)) - return -1; +#define PRINT_TIMEX print_timex64 +#define TIMEX_T kernel_timex64_t +#include "print_timex.h" +#undef TIMEX_T +#undef PRINT_TIMEX - tprints("{modes="); - printflags(adjtimex_modes, tx.modes, "ADJ_???"); - tprintf(", offset=%jd, freq=%jd, maxerror=%ju, esterror=%ju, status=", - (intmax_t) tx.offset, (intmax_t) tx.freq, - (uintmax_t) tx.maxerror, (uintmax_t) tx.esterror); - printflags(adjtimex_status, tx.status, "STA_???"); - tprintf(", constant=%jd, precision=%ju, tolerance=%jd, time=", - (intmax_t) tx.constant, (uintmax_t) tx.precision, - (intmax_t) tx.tolerance); - MPERS_FUNC_NAME(print_struct_timeval)(&tx.time); - tprintf(", tick=%jd, ppsfreq=%jd, jitter=%jd", - (intmax_t) tx.tick, (intmax_t) tx.ppsfreq, (intmax_t) tx.jitter); - tprintf(", shift=%d, stabil=%jd, jitcnt=%jd", - tx.shift, (intmax_t) tx.stabil, (intmax_t) tx.jitcnt); - tprintf(", calcnt=%jd, errcnt=%jd, stbcnt=%jd", - (intmax_t) tx.calcnt, (intmax_t) tx.errcnt, (intmax_t) tx.stbcnt); -#ifdef HAVE_STRUCT_TIMEX_TAI - tprintf(", tai=%d", tx.tai); -#endif - tprints("}"); - return 0; -} +#if HAVE_ARCH_TIME32_SYSCALLS -#ifndef IN_MPERS - -# include "kernel_timex.h" - -# define PRINT_TIMEX print_timex64 -# define TIMEX_T kernel_timex64_t +# define PRINT_TIMEX print_timex32 +# define TIMEX_T kernel_timex32_t # include "print_timex.h" # undef TIMEX_T # undef PRINT_TIMEX -# if HAVE_ARCH_TIME32_SYSCALLS - -# define PRINT_TIMEX print_timex32 -# define TIMEX_T kernel_timex32_t -# include "print_timex.h" -# undef TIMEX_T -# undef PRINT_TIMEX +#endif /* HAVE_ARCH_TIME32_SYSCALLS */ -# endif /* HAVE_ARCH_TIME32_SYSCALLS */ +#ifdef SPARC64 -# ifdef SPARC64 - -# define PRINT_TIMEX print_sparc64_timex -# define TIMEX_T kernel_sparc64_timex_t -# include "print_timex.h" -# undef TIMEX_T -# undef PRINT_TIMEX - -# endif /* SPARC64 */ +# define PRINT_TIMEX print_sparc64_timex +# define TIMEX_T kernel_sparc64_timex_t +# include "print_timex.h" +# undef TIMEX_T +# undef PRINT_TIMEX -#endif /* !IN_MPERS */ +#endif /* SPARC64 */ diff --git a/tests/adjtimex.c b/tests/adjtimex.c index 65e13028..c287f976 100644 --- a/tests/adjtimex.c +++ b/tests/adjtimex.c @@ -8,6 +8,7 @@ */ #include "tests.h" +#include #include #include #include @@ -43,10 +44,7 @@ main(void) printf(", constant=%jd, precision=%jd" ", tolerance=%jd, time={tv_sec=%lld, tv_usec=%llu}, tick=%jd" ", ppsfreq=%jd, jitter=%jd, shift=%d, stabil=%jd, jitcnt=%jd" - ", calcnt=%jd, errcnt=%jd, stbcnt=%jd" -#ifdef HAVE_STRUCT_TIMEX_TAI - ", tai=%d" -#endif + ", calcnt=%jd, errcnt=%jd, stbcnt=%jd, tai=%d" "}) = %d (", (intmax_t) tx->constant, (intmax_t) tx->precision, @@ -64,6 +62,8 @@ main(void) (intmax_t) tx->stbcnt, #ifdef HAVE_STRUCT_TIMEX_TAI tx->tai, +#else + *(const int *)((const void *) tx + offsetofend(struct timex, stbcnt)), #endif state); printxval(adjtimex_state, (unsigned int) state, NULL); diff --git a/time.c b/time.c index f150fda2..e912ba3c 100644 --- a/time.c +++ b/time.c @@ -162,13 +162,6 @@ do_adjtimex(struct tcb *const tcp, const print_obj_by_addr_fn print_tx, return RVAL_STR; } -SYS_FUNC(adjtimex) -{ - if (exiting(tcp)) - return do_adjtimex(tcp, print_timex, tcp->u_arg[0]); - return 0; -} - #if HAVE_ARCH_TIME32_SYSCALLS SYS_FUNC(adjtimex32) { @@ -304,11 +297,6 @@ do_clock_adjtime(struct tcb *const tcp, const print_obj_by_addr_fn print_tx) return 0; } -SYS_FUNC(clock_adjtime) -{ - return do_clock_adjtime(tcp, print_timex); -} - #if HAVE_ARCH_TIME32_SYSCALLS SYS_FUNC(clock_adjtime32) {