From 3f4a41a55de2f29bb1a38947ce83bf21073647cb Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 7 May 2013 02:27:50 +0000 Subject: [PATCH] fadvise64, fadvise64_64: fix handlers and number of syscall arguments The number of fadvise64 arguments depends on architecture and personality. For 64bit and ilp32 it equals to 4, for unaligned 32bit it equals to 5, and for aligned 32bit it equals to 6. The number of fadvise64_64 arguments is 4 for 64bit and ilp32, for unaligned 32bit and most of aligned 32bit it equals to 6, and for mips o32 it equals to 7. * linux/alpha/syscallent.h: Set fadvise64 handler. * linux/s390/syscallent.h: Likewise. * linux/hppa/syscallent.h: Set fadvise64_64 handler, change the number of syscall arguments to 6. * linux/ia64/syscallent.h: Change the number of fadvise64 arguments to 4. * linux/mips/syscallent-n32.h: Likewise. * linux/tile/syscallent1.h: Change the number of fadvise64 arguments to 5. * linux/mips/syscallent-o32.h: Change the number of fadvise64_64 arguments to 7. * linux/s390x/syscallent.h: Change fadvise64_64 handler. Set fadvise64 handler. Change numbers of fadvise64 and fadvise64_64 arguments to 4. * linux/sh64/syscallent.h: Change fadvise64_64 handler. Change numbers of fadvise64 and fadvise64_64 arguments to 4. * linux/sparc/syscallent.h: Set fadvise64 and fadvise64_64 handlers, change numbers of their arguments to 5 and 6. * linux/x86_64/syscallent.h: Change fadvise64 handler. --- linux/alpha/syscallent.h | 2 +- linux/hppa/syscallent.h | 2 +- linux/ia64/syscallent.h | 2 +- linux/mips/syscallent-n32.h | 2 +- linux/mips/syscallent-o32.h | 2 +- linux/s390/syscallent.h | 2 +- linux/s390x/syscallent.h | 4 ++-- linux/sh64/syscallent.h | 4 ++-- linux/sparc/syscallent.h | 4 ++-- linux/tile/syscallent1.h | 2 +- linux/x86_64/syscallent.h | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/linux/alpha/syscallent.h b/linux/alpha/syscallent.h index 27c513d2..2b89492c 100644 --- a/linux/alpha/syscallent.h +++ b/linux/alpha/syscallent.h @@ -439,7 +439,7 @@ { 5, TM, sys_remap_file_pages, "remap_file_pages" }, /* 410 */ { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 411 */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 412 */ - { 4, TD, printargs, "fadvise" }, /* 413 */ + { 4, TD, sys_fadvise64, "fadvise" }, /* 413 */ { 3, 0, sys_timer_create, "timer_create" }, /* 414 */ { 4, 0, sys_timer_settime, "timer_settime" }, /* 415 */ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 416 */ diff --git a/linux/hppa/syscallent.h b/linux/hppa/syscallent.h index 715bb5cf..48e4d047 100644 --- a/linux/hppa/syscallent.h +++ b/linux/hppa/syscallent.h @@ -238,7 +238,7 @@ { 5, 0, printargs, "mq_notify" }, /* 233 */ { 5, 0, printargs, "mq_getsetattr" }, /* 234 */ { 4, 0, printargs, "waitid" }, /* 235 */ - { 5, TD, printargs, "fadvise64_64" }, /* 236 */ + { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 236 */ { 5, 0, sys_set_tid_address, "set_tid_address" }, /* 237 */ { 5, TF, sys_setxattr, "setxattr" }, /* 238 */ { 5, TF, sys_setxattr, "lsetxattr" }, /* 239 */ diff --git a/linux/ia64/syscallent.h b/linux/ia64/syscallent.h index 60e75c49..43f132dc 100644 --- a/linux/ia64/syscallent.h +++ b/linux/ia64/syscallent.h @@ -1025,7 +1025,7 @@ { 3, 0, sys_sched_setaffinity, "sched_setaffinity"},/* 1231 */ { 3, 0, sys_sched_getaffinity, "sched_getaffinity"},/* 1232 */ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 1233 */ - { 5, TD, sys_fadvise64, "fadvise64" }, /* 1234 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 1234 */ { 3, TS, sys_tgkill, "tgkill" }, /* 1235 */ { 1, TP, sys_exit, "exit_group" }, /* 1236 */ { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 1237 */ diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 0d361a72..b3d3a335 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -216,7 +216,7 @@ { 1, 0, sys_set_tid_address, "set_tid_address" }, /* 6213 */ { 0, 0, sys_restart_syscall, "restart_syscall" }, /* 6214 */ { 5, TI, sys_semtimedop, "semtimedop" }, /* 6215 */ - { 5, TD, sys_fadvise64, "fadvise64" }, /* 6216 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 6216 */ { 3, TF, sys_statfs64, "statfs64" }, /* 6217 */ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 6218 */ { 4, TD|TN, sys_sendfile64, "sendfile64" }, /* 6219 */ diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 88b490b3..97583539 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -254,7 +254,7 @@ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 4251 */ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 4252 */ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 4253 */ - { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 4254 */ + { 7, TD, sys_fadvise64_64, "fadvise64_64" }, /* 4254 */ { 3, TF, sys_statfs64, "statfs64" }, /* 4255 */ { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 4256 */ { 3, 0, sys_timer_create, "timer_create" }, /* 4257 */ diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 26433800..c68362ec 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -281,7 +281,7 @@ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */ - { 5, TD, printargs, "fadvise64" }, /* 253 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 253 */ { 3, 0, sys_timer_create, "timer_create" }, /* 254 */ { 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */ diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index ef902e6e..97658ae3 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -280,7 +280,7 @@ { 4, TD, sys_epoll_ctl, "epoll_ctl" }, /* 250 */ { 4, TD, sys_epoll_wait, "epoll_wait" }, /* 251 */ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 252 */ - { 5, TD, printargs, "fadvise64" }, /* 253 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 253 */ { 3, 0, sys_timer_create, "timer_create" }, /* 254 */ { 4, 0, sys_timer_settime, "timer_settime" }, /* 255 */ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 256 */ @@ -291,7 +291,7 @@ { 2, 0, sys_clock_getres, "clock_getres" }, /* 261 */ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 262 */ { 5, 0, sys_vserver, "vserver" }, /* 263 */ - { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 264 */ + { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 264 */ { 3, TF, sys_statfs64, "statfs64" }, /* 265 */ { 3, TD, sys_fstatfs64, "fstatfs64" }, /* 266 */ { 5, TM, sys_remap_file_pages, "remap_file_pages"}, /* 267 */ diff --git a/linux/sh64/syscallent.h b/linux/sh64/syscallent.h index 5ac9d99e..2ecacb19 100644 --- a/linux/sh64/syscallent.h +++ b/linux/sh64/syscallent.h @@ -304,7 +304,7 @@ { 5, 0, sys_io_getevents, "io_getevents" }, /* 275 */ { 3, 0, sys_io_submit, "io_submit" }, /* 276 */ { 3, 0, sys_io_cancel, "io_cancel" }, /* 277 */ - { 5, TD, sys_fadvise64, "fadvise64" }, /* 278 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 278 */ { 5, 0, NULL, NULL }, /* 279 */ { 1, TP, sys_exit, "exit_group" }, /* 280 */ { 3, 0, sys_lookup_dcookie, "lookup_dcookie"}, /* 281 */ @@ -326,7 +326,7 @@ { 2, TD, sys_fstatfs64, "fstatfs64" }, /* 297 */ { 3, TS, sys_tgkill, "tgkill" }, /* 298 */ { 2, TF, sys_utimes, "utimes" }, /* 299 */ - { 6, TD, sys_fadvise64_64, "fadvise64_64" }, /* 300 */ + { 4, TD, sys_fadvise64, "fadvise64_64" }, /* 300 */ { 0, 0, NULL, NULL }, /* 301 */ { 4, TM, sys_mbind, "mbind" }, /* 302 */ { 5, TM, sys_get_mempolicy, "get_mempolicy" }, /* 303 */ diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 4ba974f7..1a34d433 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -207,8 +207,8 @@ { 2, TD, sys_socketcall, "socketcall" }, /* 206 */ { 3, 0, sys_syslog, "syslog" }, /* 207 */ { 4, 0, sys_lookup_dcookie,"lookup_dcookie" }, /* 208 */ - { 6, TD, printargs, "fadvise64" }, /* 209 */ - { 6, TD, printargs, "fadvise64_64" }, /* 210 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 209 */ + { 6, TD, sys_fadvise64_64,"fadvise64_64" }, /* 210 */ { 3, TS, sys_tgkill, "tgkill" }, /* 211 */ { 3, TP, sys_waitpid, "waitpid" }, /* 212 */ { 1, TF, sys_swapoff, "swapoff" }, /* 213 */ diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h index 956b4bf9..4ebcbb45 100644 --- a/linux/tile/syscallent1.h +++ b/linux/tile/syscallent1.h @@ -221,7 +221,7 @@ { 5, TP, sys_clone, "clone" }, /* 220 */ { 3, TF|TP, sys_execve, "execve" }, /* 221 */ { 6, TD|TM, sys_mmap_4koff, "mmap2" }, /* 222 */ - { 6, TD, sys_fadvise64, "fadvise64" }, /* 223 */ + { 5, TD, sys_fadvise64, "fadvise64" }, /* 223 */ { 1, TF, sys_swapon, "swapon" }, /* 224 */ { 1, TF, sys_swapoff, "swapoff" }, /* 225 */ { 3, TM, sys_mprotect, "mprotect" }, /* 226 */ diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h index d5437cb1..f6cf00f6 100644 --- a/linux/x86_64/syscallent.h +++ b/linux/x86_64/syscallent.h @@ -219,7 +219,7 @@ { 1, 0, sys_set_tid_address, "set_tid_address"}, /* 218 */ { 0, 0, sys_restart_syscall, "restart_syscall"}, /* 219 */ { 5, TI, sys_semtimedop, "semtimedop" }, /* 220 */ - { 4, TD, sys_fadvise64_64, "fadvise64" }, /* 221 */ + { 4, TD, sys_fadvise64, "fadvise64" }, /* 221 */ { 3, 0, sys_timer_create, "timer_create" }, /* 222 */ { 4, 0, sys_timer_settime, "timer_settime" }, /* 223 */ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 224 */ -- 2.40.0