diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-01-06 18:33:08 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-02-06 18:13:27 -0500 |
commit | 8dabe7245bbc134f2cfcc12cde75c019dab924cc (patch) | |
tree | b08c1d41803f1586bc32a22334fa2b183b0eb0ba /include/linux/syscalls.h | |
parent | 7948450d455658601fedbf3b3e9890b4b36a214a (diff) |
y2038: syscalls: rename y2038 compat syscalls
A lot of system calls that pass a time_t somewhere have an implementation
using a COMPAT_SYSCALL_DEFINEx() on 64-bit architectures, and have
been reworked so that this implementation can now be used on 32-bit
architectures as well.
The missing step is to redefine them using the regular SYSCALL_DEFINEx()
to get them out of the compat namespace and make it possible to build them
on 32-bit architectures.
Any system call that ends in 'time' gets a '32' suffix on its name for
that version, while the others get a '_time32' suffix, to distinguish
them from the normal version, which takes a 64-bit time argument in the
future.
In this step, only 64-bit architectures are changed, doing this rename
first lets us avoid touching the 32-bit architectures twice.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 09330d5bda0c..94369f5bd8e5 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -297,6 +297,11 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id, | |||
297 | long nr, | 297 | long nr, |
298 | struct io_event __user *events, | 298 | struct io_event __user *events, |
299 | struct __kernel_timespec __user *timeout); | 299 | struct __kernel_timespec __user *timeout); |
300 | asmlinkage long sys_io_getevents_time32(__u32 ctx_id, | ||
301 | __s32 min_nr, | ||
302 | __s32 nr, | ||
303 | struct io_event __user *events, | ||
304 | struct old_timespec32 __user *timeout); | ||
300 | asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, | 305 | asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, |
301 | long min_nr, | 306 | long min_nr, |
302 | long nr, | 307 | long nr, |
@@ -522,11 +527,19 @@ asmlinkage long sys_timerfd_settime(int ufd, int flags, | |||
522 | const struct __kernel_itimerspec __user *utmr, | 527 | const struct __kernel_itimerspec __user *utmr, |
523 | struct __kernel_itimerspec __user *otmr); | 528 | struct __kernel_itimerspec __user *otmr); |
524 | asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr); | 529 | asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr); |
530 | asmlinkage long sys_timerfd_gettime32(int ufd, | ||
531 | struct old_itimerspec32 __user *otmr); | ||
532 | asmlinkage long sys_timerfd_settime32(int ufd, int flags, | ||
533 | const struct old_itimerspec32 __user *utmr, | ||
534 | struct old_itimerspec32 __user *otmr); | ||
525 | 535 | ||
526 | /* fs/utimes.c */ | 536 | /* fs/utimes.c */ |
527 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, | 537 | asmlinkage long sys_utimensat(int dfd, const char __user *filename, |
528 | struct __kernel_timespec __user *utimes, | 538 | struct __kernel_timespec __user *utimes, |
529 | int flags); | 539 | int flags); |
540 | asmlinkage long sys_utimensat_time32(unsigned int dfd, | ||
541 | const char __user *filename, | ||
542 | struct old_timespec32 __user *t, int flags); | ||
530 | 543 | ||
531 | /* kernel/acct.c */ | 544 | /* kernel/acct.c */ |
532 | asmlinkage long sys_acct(const char __user *name); | 545 | asmlinkage long sys_acct(const char __user *name); |
@@ -555,6 +568,9 @@ asmlinkage long sys_unshare(unsigned long unshare_flags); | |||
555 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, | 568 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, |
556 | struct __kernel_timespec __user *utime, u32 __user *uaddr2, | 569 | struct __kernel_timespec __user *utime, u32 __user *uaddr2, |
557 | u32 val3); | 570 | u32 val3); |
571 | asmlinkage long sys_futex_time32(u32 __user *uaddr, int op, u32 val, | ||
572 | struct old_timespec32 __user *utime, u32 __user *uaddr2, | ||
573 | u32 val3); | ||
558 | asmlinkage long sys_get_robust_list(int pid, | 574 | asmlinkage long sys_get_robust_list(int pid, |
559 | struct robust_list_head __user * __user *head_ptr, | 575 | struct robust_list_head __user * __user *head_ptr, |
560 | size_t __user *len_ptr); | 576 | size_t __user *len_ptr); |
@@ -564,6 +580,8 @@ asmlinkage long sys_set_robust_list(struct robust_list_head __user *head, | |||
564 | /* kernel/hrtimer.c */ | 580 | /* kernel/hrtimer.c */ |
565 | asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, | 581 | asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, |
566 | struct __kernel_timespec __user *rmtp); | 582 | struct __kernel_timespec __user *rmtp); |
583 | asmlinkage long sys_nanosleep_time32(struct old_timespec32 __user *rqtp, | ||
584 | struct old_timespec32 __user *rmtp); | ||
567 | 585 | ||
568 | /* kernel/itimer.c */ | 586 | /* kernel/itimer.c */ |
569 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); | 587 | asmlinkage long sys_getitimer(int which, struct itimerval __user *value); |
@@ -602,6 +620,20 @@ asmlinkage long sys_clock_getres(clockid_t which_clock, | |||
602 | asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, | 620 | asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, |
603 | const struct __kernel_timespec __user *rqtp, | 621 | const struct __kernel_timespec __user *rqtp, |
604 | struct __kernel_timespec __user *rmtp); | 622 | struct __kernel_timespec __user *rmtp); |
623 | asmlinkage long sys_timer_gettime32(timer_t timer_id, | ||
624 | struct old_itimerspec32 __user *setting); | ||
625 | asmlinkage long sys_timer_settime32(timer_t timer_id, int flags, | ||
626 | struct old_itimerspec32 __user *new, | ||
627 | struct old_itimerspec32 __user *old); | ||
628 | asmlinkage long sys_clock_settime32(clockid_t which_clock, | ||
629 | struct old_timespec32 __user *tp); | ||
630 | asmlinkage long sys_clock_gettime32(clockid_t which_clock, | ||
631 | struct old_timespec32 __user *tp); | ||
632 | asmlinkage long sys_clock_getres_time32(clockid_t which_clock, | ||
633 | struct old_timespec32 __user *tp); | ||
634 | asmlinkage long sys_clock_nanosleep_time32(clockid_t which_clock, int flags, | ||
635 | struct old_timespec32 __user *rqtp, | ||
636 | struct old_timespec32 __user *rmtp); | ||
605 | 637 | ||
606 | /* kernel/printk.c */ | 638 | /* kernel/printk.c */ |
607 | asmlinkage long sys_syslog(int type, char __user *buf, int len); | 639 | asmlinkage long sys_syslog(int type, char __user *buf, int len); |
@@ -627,6 +659,8 @@ asmlinkage long sys_sched_get_priority_max(int policy); | |||
627 | asmlinkage long sys_sched_get_priority_min(int policy); | 659 | asmlinkage long sys_sched_get_priority_min(int policy); |
628 | asmlinkage long sys_sched_rr_get_interval(pid_t pid, | 660 | asmlinkage long sys_sched_rr_get_interval(pid_t pid, |
629 | struct __kernel_timespec __user *interval); | 661 | struct __kernel_timespec __user *interval); |
662 | asmlinkage long sys_sched_rr_get_interval_time32(pid_t pid, | ||
663 | struct old_timespec32 __user *interval); | ||
630 | 664 | ||
631 | /* kernel/signal.c */ | 665 | /* kernel/signal.c */ |
632 | asmlinkage long sys_restart_syscall(void); | 666 | asmlinkage long sys_restart_syscall(void); |
@@ -696,6 +730,7 @@ asmlinkage long sys_gettimeofday(struct timeval __user *tv, | |||
696 | asmlinkage long sys_settimeofday(struct timeval __user *tv, | 730 | asmlinkage long sys_settimeofday(struct timeval __user *tv, |
697 | struct timezone __user *tz); | 731 | struct timezone __user *tz); |
698 | asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p); | 732 | asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p); |
733 | asmlinkage long sys_adjtimex_time32(struct old_timex32 __user *txc_p); | ||
699 | 734 | ||
700 | /* kernel/timer.c */ | 735 | /* kernel/timer.c */ |
701 | asmlinkage long sys_getpid(void); | 736 | asmlinkage long sys_getpid(void); |
@@ -714,6 +749,14 @@ asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t | |||
714 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct __kernel_timespec __user *abs_timeout); | 749 | asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct __kernel_timespec __user *abs_timeout); |
715 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); | 750 | asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); |
716 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); | 751 | asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); |
752 | asmlinkage long sys_mq_timedreceive_time32(mqd_t mqdes, | ||
753 | char __user *u_msg_ptr, | ||
754 | unsigned int msg_len, unsigned int __user *u_msg_prio, | ||
755 | const struct old_timespec32 __user *u_abs_timeout); | ||
756 | asmlinkage long sys_mq_timedsend_time32(mqd_t mqdes, | ||
757 | const char __user *u_msg_ptr, | ||
758 | unsigned int msg_len, unsigned int msg_prio, | ||
759 | const struct old_timespec32 __user *u_abs_timeout); | ||
717 | 760 | ||
718 | /* ipc/msg.c */ | 761 | /* ipc/msg.c */ |
719 | asmlinkage long sys_msgget(key_t key, int msgflg); | 762 | asmlinkage long sys_msgget(key_t key, int msgflg); |
@@ -731,6 +774,9 @@ asmlinkage long sys_old_semctl(int semid, int semnum, int cmd, unsigned long arg | |||
731 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, | 774 | asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, |
732 | unsigned nsops, | 775 | unsigned nsops, |
733 | const struct __kernel_timespec __user *timeout); | 776 | const struct __kernel_timespec __user *timeout); |
777 | asmlinkage long sys_semtimedop_time32(int semid, struct sembuf __user *sops, | ||
778 | unsigned nsops, | ||
779 | const struct old_timespec32 __user *timeout); | ||
734 | asmlinkage long sys_semop(int semid, struct sembuf __user *sops, | 780 | asmlinkage long sys_semop(int semid, struct sembuf __user *sops, |
735 | unsigned nsops); | 781 | unsigned nsops); |
736 | 782 | ||
@@ -871,6 +917,8 @@ asmlinkage long sys_open_by_handle_at(int mountdirfd, | |||
871 | int flags); | 917 | int flags); |
872 | asmlinkage long sys_clock_adjtime(clockid_t which_clock, | 918 | asmlinkage long sys_clock_adjtime(clockid_t which_clock, |
873 | struct __kernel_timex __user *tx); | 919 | struct __kernel_timex __user *tx); |
920 | asmlinkage long sys_clock_adjtime32(clockid_t which_clock, | ||
921 | struct old_timex32 __user *tx); | ||
874 | asmlinkage long sys_syncfs(int fd); | 922 | asmlinkage long sys_syncfs(int fd); |
875 | asmlinkage long sys_setns(int fd, int nstype); | 923 | asmlinkage long sys_setns(int fd, int nstype); |
876 | asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, | 924 | asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, |
@@ -1006,6 +1054,7 @@ asmlinkage long sys_alarm(unsigned int seconds); | |||
1006 | asmlinkage long sys_getpgrp(void); | 1054 | asmlinkage long sys_getpgrp(void); |
1007 | asmlinkage long sys_pause(void); | 1055 | asmlinkage long sys_pause(void); |
1008 | asmlinkage long sys_time(time_t __user *tloc); | 1056 | asmlinkage long sys_time(time_t __user *tloc); |
1057 | asmlinkage long sys_time32(old_time32_t __user *tloc); | ||
1009 | #ifdef __ARCH_WANT_SYS_UTIME | 1058 | #ifdef __ARCH_WANT_SYS_UTIME |
1010 | asmlinkage long sys_utime(char __user *filename, | 1059 | asmlinkage long sys_utime(char __user *filename, |
1011 | struct utimbuf __user *times); | 1060 | struct utimbuf __user *times); |
@@ -1014,6 +1063,13 @@ asmlinkage long sys_utimes(char __user *filename, | |||
1014 | asmlinkage long sys_futimesat(int dfd, const char __user *filename, | 1063 | asmlinkage long sys_futimesat(int dfd, const char __user *filename, |
1015 | struct timeval __user *utimes); | 1064 | struct timeval __user *utimes); |
1016 | #endif | 1065 | #endif |
1066 | asmlinkage long sys_futimesat_time32(unsigned int dfd, | ||
1067 | const char __user *filename, | ||
1068 | struct old_timeval32 __user *t); | ||
1069 | asmlinkage long sys_utime32(const char __user *filename, | ||
1070 | struct old_utimbuf32 __user *t); | ||
1071 | asmlinkage long sys_utimes_time32(const char __user *filename, | ||
1072 | struct old_timeval32 __user *t); | ||
1017 | asmlinkage long sys_creat(const char __user *pathname, umode_t mode); | 1073 | asmlinkage long sys_creat(const char __user *pathname, umode_t mode); |
1018 | asmlinkage long sys_getdents(unsigned int fd, | 1074 | asmlinkage long sys_getdents(unsigned int fd, |
1019 | struct linux_dirent __user *dirent, | 1075 | struct linux_dirent __user *dirent, |
@@ -1038,6 +1094,7 @@ asmlinkage long sys_fork(void); | |||
1038 | 1094 | ||
1039 | /* obsolete: kernel/time/time.c */ | 1095 | /* obsolete: kernel/time/time.c */ |
1040 | asmlinkage long sys_stime(time_t __user *tptr); | 1096 | asmlinkage long sys_stime(time_t __user *tptr); |
1097 | asmlinkage long sys_stime32(old_time32_t __user *tptr); | ||
1041 | 1098 | ||
1042 | /* obsolete: kernel/signal.c */ | 1099 | /* obsolete: kernel/signal.c */ |
1043 | asmlinkage long sys_sigpending(old_sigset_t __user *uset); | 1100 | asmlinkage long sys_sigpending(old_sigset_t __user *uset); |