summaryrefslogtreecommitdiffstats
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-01-06 18:33:08 -0500
committerArnd Bergmann <arnd@arndb.de>2019-02-06 18:13:27 -0500
commit8dabe7245bbc134f2cfcc12cde75c019dab924cc (patch)
treeb08c1d41803f1586bc32a22334fa2b183b0eb0ba /include/linux/syscalls.h
parent7948450d455658601fedbf3b3e9890b4b36a214a (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.h57
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);
300asmlinkage 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);
300asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, 305asmlinkage 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);
524asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr); 529asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user *otmr);
530asmlinkage long sys_timerfd_gettime32(int ufd,
531 struct old_itimerspec32 __user *otmr);
532asmlinkage 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 */
527asmlinkage long sys_utimensat(int dfd, const char __user *filename, 537asmlinkage 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);
540asmlinkage 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 */
532asmlinkage long sys_acct(const char __user *name); 545asmlinkage long sys_acct(const char __user *name);
@@ -555,6 +568,9 @@ asmlinkage long sys_unshare(unsigned long unshare_flags);
555asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, 568asmlinkage 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);
571asmlinkage long sys_futex_time32(u32 __user *uaddr, int op, u32 val,
572 struct old_timespec32 __user *utime, u32 __user *uaddr2,
573 u32 val3);
558asmlinkage long sys_get_robust_list(int pid, 574asmlinkage 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 */
565asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp, 581asmlinkage long sys_nanosleep(struct __kernel_timespec __user *rqtp,
566 struct __kernel_timespec __user *rmtp); 582 struct __kernel_timespec __user *rmtp);
583asmlinkage 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 */
569asmlinkage long sys_getitimer(int which, struct itimerval __user *value); 587asmlinkage long sys_getitimer(int which, struct itimerval __user *value);
@@ -602,6 +620,20 @@ asmlinkage long sys_clock_getres(clockid_t which_clock,
602asmlinkage long sys_clock_nanosleep(clockid_t which_clock, int flags, 620asmlinkage 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);
623asmlinkage long sys_timer_gettime32(timer_t timer_id,
624 struct old_itimerspec32 __user *setting);
625asmlinkage long sys_timer_settime32(timer_t timer_id, int flags,
626 struct old_itimerspec32 __user *new,
627 struct old_itimerspec32 __user *old);
628asmlinkage long sys_clock_settime32(clockid_t which_clock,
629 struct old_timespec32 __user *tp);
630asmlinkage long sys_clock_gettime32(clockid_t which_clock,
631 struct old_timespec32 __user *tp);
632asmlinkage long sys_clock_getres_time32(clockid_t which_clock,
633 struct old_timespec32 __user *tp);
634asmlinkage 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 */
607asmlinkage long sys_syslog(int type, char __user *buf, int len); 639asmlinkage long sys_syslog(int type, char __user *buf, int len);
@@ -627,6 +659,8 @@ asmlinkage long sys_sched_get_priority_max(int policy);
627asmlinkage long sys_sched_get_priority_min(int policy); 659asmlinkage long sys_sched_get_priority_min(int policy);
628asmlinkage long sys_sched_rr_get_interval(pid_t pid, 660asmlinkage long sys_sched_rr_get_interval(pid_t pid,
629 struct __kernel_timespec __user *interval); 661 struct __kernel_timespec __user *interval);
662asmlinkage 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 */
632asmlinkage long sys_restart_syscall(void); 666asmlinkage long sys_restart_syscall(void);
@@ -696,6 +730,7 @@ asmlinkage long sys_gettimeofday(struct timeval __user *tv,
696asmlinkage long sys_settimeofday(struct timeval __user *tv, 730asmlinkage long sys_settimeofday(struct timeval __user *tv,
697 struct timezone __user *tz); 731 struct timezone __user *tz);
698asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p); 732asmlinkage long sys_adjtimex(struct __kernel_timex __user *txc_p);
733asmlinkage long sys_adjtimex_time32(struct old_timex32 __user *txc_p);
699 734
700/* kernel/timer.c */ 735/* kernel/timer.c */
701asmlinkage long sys_getpid(void); 736asmlinkage long sys_getpid(void);
@@ -714,6 +749,14 @@ asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t
714asmlinkage 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); 749asmlinkage 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);
715asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); 750asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
716asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); 751asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
752asmlinkage 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);
756asmlinkage 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 */
719asmlinkage long sys_msgget(key_t key, int msgflg); 762asmlinkage 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
731asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, 774asmlinkage 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);
777asmlinkage long sys_semtimedop_time32(int semid, struct sembuf __user *sops,
778 unsigned nsops,
779 const struct old_timespec32 __user *timeout);
734asmlinkage long sys_semop(int semid, struct sembuf __user *sops, 780asmlinkage 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);
872asmlinkage long sys_clock_adjtime(clockid_t which_clock, 918asmlinkage long sys_clock_adjtime(clockid_t which_clock,
873 struct __kernel_timex __user *tx); 919 struct __kernel_timex __user *tx);
920asmlinkage long sys_clock_adjtime32(clockid_t which_clock,
921 struct old_timex32 __user *tx);
874asmlinkage long sys_syncfs(int fd); 922asmlinkage long sys_syncfs(int fd);
875asmlinkage long sys_setns(int fd, int nstype); 923asmlinkage long sys_setns(int fd, int nstype);
876asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg, 924asmlinkage long sys_sendmmsg(int fd, struct mmsghdr __user *msg,
@@ -1006,6 +1054,7 @@ asmlinkage long sys_alarm(unsigned int seconds);
1006asmlinkage long sys_getpgrp(void); 1054asmlinkage long sys_getpgrp(void);
1007asmlinkage long sys_pause(void); 1055asmlinkage long sys_pause(void);
1008asmlinkage long sys_time(time_t __user *tloc); 1056asmlinkage long sys_time(time_t __user *tloc);
1057asmlinkage long sys_time32(old_time32_t __user *tloc);
1009#ifdef __ARCH_WANT_SYS_UTIME 1058#ifdef __ARCH_WANT_SYS_UTIME
1010asmlinkage long sys_utime(char __user *filename, 1059asmlinkage 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,
1014asmlinkage long sys_futimesat(int dfd, const char __user *filename, 1063asmlinkage long sys_futimesat(int dfd, const char __user *filename,
1015 struct timeval __user *utimes); 1064 struct timeval __user *utimes);
1016#endif 1065#endif
1066asmlinkage long sys_futimesat_time32(unsigned int dfd,
1067 const char __user *filename,
1068 struct old_timeval32 __user *t);
1069asmlinkage long sys_utime32(const char __user *filename,
1070 struct old_utimbuf32 __user *t);
1071asmlinkage long sys_utimes_time32(const char __user *filename,
1072 struct old_timeval32 __user *t);
1017asmlinkage long sys_creat(const char __user *pathname, umode_t mode); 1073asmlinkage long sys_creat(const char __user *pathname, umode_t mode);
1018asmlinkage long sys_getdents(unsigned int fd, 1074asmlinkage 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 */
1040asmlinkage long sys_stime(time_t __user *tptr); 1096asmlinkage long sys_stime(time_t __user *tptr);
1097asmlinkage long sys_stime32(old_time32_t __user *tptr);
1041 1098
1042/* obsolete: kernel/signal.c */ 1099/* obsolete: kernel/signal.c */
1043asmlinkage long sys_sigpending(old_sigset_t __user *uset); 1100asmlinkage long sys_sigpending(old_sigset_t __user *uset);