diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compat.h | 26 | ||||
| -rw-r--r-- | include/linux/futex.h | 8 | ||||
| -rw-r--r-- | include/linux/signal.h | 4 | ||||
| -rw-r--r-- | include/linux/socket.h | 9 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 29 | ||||
| -rw-r--r-- | include/linux/time32.h | 25 | ||||
| -rw-r--r-- | include/linux/timekeeping.h | 14 | ||||
| -rw-r--r-- | include/linux/timekeeping32.h | 15 |
8 files changed, 60 insertions, 70 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 88720b443cd6..056be0d03722 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -169,6 +169,10 @@ typedef struct { | |||
| 169 | compat_sigset_word sig[_COMPAT_NSIG_WORDS]; | 169 | compat_sigset_word sig[_COMPAT_NSIG_WORDS]; |
| 170 | } compat_sigset_t; | 170 | } compat_sigset_t; |
| 171 | 171 | ||
| 172 | int set_compat_user_sigmask(const compat_sigset_t __user *usigmask, | ||
| 173 | sigset_t *set, sigset_t *oldset, | ||
| 174 | size_t sigsetsize); | ||
| 175 | |||
| 172 | struct compat_sigaction { | 176 | struct compat_sigaction { |
| 173 | #ifndef __ARCH_HAS_IRIX_SIGACTION | 177 | #ifndef __ARCH_HAS_IRIX_SIGACTION |
| 174 | compat_uptr_t sa_handler; | 178 | compat_uptr_t sa_handler; |
| @@ -558,6 +562,12 @@ asmlinkage long compat_sys_io_pgetevents(compat_aio_context_t ctx_id, | |||
| 558 | struct io_event __user *events, | 562 | struct io_event __user *events, |
| 559 | struct old_timespec32 __user *timeout, | 563 | struct old_timespec32 __user *timeout, |
| 560 | const struct __compat_aio_sigset __user *usig); | 564 | const struct __compat_aio_sigset __user *usig); |
| 565 | asmlinkage long compat_sys_io_pgetevents_time64(compat_aio_context_t ctx_id, | ||
| 566 | compat_long_t min_nr, | ||
| 567 | compat_long_t nr, | ||
| 568 | struct io_event __user *events, | ||
| 569 | struct __kernel_timespec __user *timeout, | ||
| 570 | const struct __compat_aio_sigset __user *usig); | ||
| 561 | 571 | ||
| 562 | /* fs/cookies.c */ | 572 | /* fs/cookies.c */ |
| 563 | asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t); | 573 | asmlinkage long compat_sys_lookup_dcookie(u32, u32, char __user *, compat_size_t); |
| @@ -643,11 +653,21 @@ asmlinkage long compat_sys_pselect6(int n, compat_ulong_t __user *inp, | |||
| 643 | compat_ulong_t __user *exp, | 653 | compat_ulong_t __user *exp, |
| 644 | struct old_timespec32 __user *tsp, | 654 | struct old_timespec32 __user *tsp, |
| 645 | void __user *sig); | 655 | void __user *sig); |
| 656 | asmlinkage long compat_sys_pselect6_time64(int n, compat_ulong_t __user *inp, | ||
| 657 | compat_ulong_t __user *outp, | ||
| 658 | compat_ulong_t __user *exp, | ||
| 659 | struct __kernel_timespec __user *tsp, | ||
| 660 | void __user *sig); | ||
| 646 | asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, | 661 | asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, |
| 647 | unsigned int nfds, | 662 | unsigned int nfds, |
| 648 | struct old_timespec32 __user *tsp, | 663 | struct old_timespec32 __user *tsp, |
| 649 | const compat_sigset_t __user *sigmask, | 664 | const compat_sigset_t __user *sigmask, |
| 650 | compat_size_t sigsetsize); | 665 | compat_size_t sigsetsize); |
| 666 | asmlinkage long compat_sys_ppoll_time64(struct pollfd __user *ufds, | ||
| 667 | unsigned int nfds, | ||
| 668 | struct __kernel_timespec __user *tsp, | ||
| 669 | const compat_sigset_t __user *sigmask, | ||
| 670 | compat_size_t sigsetsize); | ||
| 651 | 671 | ||
| 652 | /* fs/signalfd.c */ | 672 | /* fs/signalfd.c */ |
| 653 | asmlinkage long compat_sys_signalfd4(int ufd, | 673 | asmlinkage long compat_sys_signalfd4(int ufd, |
| @@ -768,6 +788,9 @@ asmlinkage long compat_sys_rt_sigpending(compat_sigset_t __user *uset, | |||
| 768 | asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese, | 788 | asmlinkage long compat_sys_rt_sigtimedwait(compat_sigset_t __user *uthese, |
| 769 | struct compat_siginfo __user *uinfo, | 789 | struct compat_siginfo __user *uinfo, |
| 770 | struct old_timespec32 __user *uts, compat_size_t sigsetsize); | 790 | struct old_timespec32 __user *uts, compat_size_t sigsetsize); |
| 791 | asmlinkage long compat_sys_rt_sigtimedwait_time64(compat_sigset_t __user *uthese, | ||
| 792 | struct compat_siginfo __user *uinfo, | ||
| 793 | struct __kernel_timespec __user *uts, compat_size_t sigsetsize); | ||
| 771 | asmlinkage long compat_sys_rt_sigqueueinfo(compat_pid_t pid, int sig, | 794 | asmlinkage long compat_sys_rt_sigqueueinfo(compat_pid_t pid, int sig, |
| 772 | struct compat_siginfo __user *uinfo); | 795 | struct compat_siginfo __user *uinfo); |
| 773 | /* No generic prototype for rt_sigreturn */ | 796 | /* No generic prototype for rt_sigreturn */ |
| @@ -873,6 +896,9 @@ asmlinkage long compat_sys_move_pages(pid_t pid, compat_ulong_t nr_pages, | |||
| 873 | asmlinkage long compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid, | 896 | asmlinkage long compat_sys_rt_tgsigqueueinfo(compat_pid_t tgid, |
| 874 | compat_pid_t pid, int sig, | 897 | compat_pid_t pid, int sig, |
| 875 | struct compat_siginfo __user *uinfo); | 898 | struct compat_siginfo __user *uinfo); |
| 899 | asmlinkage long compat_sys_recvmmsg_time64(int fd, struct compat_mmsghdr __user *mmsg, | ||
| 900 | unsigned vlen, unsigned int flags, | ||
| 901 | struct __kernel_timespec __user *timeout); | ||
| 876 | asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, | 902 | asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg, |
| 877 | unsigned vlen, unsigned int flags, | 903 | unsigned vlen, unsigned int flags, |
| 878 | struct old_timespec32 __user *timeout); | 904 | struct old_timespec32 __user *timeout); |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 821ae502d3d8..ccaef0097785 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
| @@ -9,9 +9,6 @@ struct inode; | |||
| 9 | struct mm_struct; | 9 | struct mm_struct; |
| 10 | struct task_struct; | 10 | struct task_struct; |
| 11 | 11 | ||
| 12 | extern int | ||
| 13 | handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi); | ||
| 14 | |||
| 15 | /* | 12 | /* |
| 16 | * Futexes are matched on equal values of this key. | 13 | * Futexes are matched on equal values of this key. |
| 17 | * The key type depends on whether it's a shared or private mapping. | 14 | * The key type depends on whether it's a shared or private mapping. |
| @@ -55,11 +52,6 @@ extern void exit_robust_list(struct task_struct *curr); | |||
| 55 | 52 | ||
| 56 | long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, | 53 | long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, |
| 57 | u32 __user *uaddr2, u32 val2, u32 val3); | 54 | u32 __user *uaddr2, u32 val2, u32 val3); |
| 58 | #ifdef CONFIG_HAVE_FUTEX_CMPXCHG | ||
| 59 | #define futex_cmpxchg_enabled 1 | ||
| 60 | #else | ||
| 61 | extern int futex_cmpxchg_enabled; | ||
| 62 | #endif | ||
| 63 | #else | 55 | #else |
| 64 | static inline void exit_robust_list(struct task_struct *curr) | 56 | static inline void exit_robust_list(struct task_struct *curr) |
| 65 | { | 57 | { |
diff --git a/include/linux/signal.h b/include/linux/signal.h index f428e86f4800..cc7e2c1cd444 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
| @@ -273,6 +273,10 @@ extern int group_send_sig_info(int sig, struct kernel_siginfo *info, | |||
| 273 | struct task_struct *p, enum pid_type type); | 273 | struct task_struct *p, enum pid_type type); |
| 274 | extern int __group_send_sig_info(int, struct kernel_siginfo *, struct task_struct *); | 274 | extern int __group_send_sig_info(int, struct kernel_siginfo *, struct task_struct *); |
| 275 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 275 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
| 276 | extern int set_user_sigmask(const sigset_t __user *usigmask, sigset_t *set, | ||
| 277 | sigset_t *oldset, size_t sigsetsize); | ||
| 278 | extern void restore_user_sigmask(const void __user *usigmask, | ||
| 279 | sigset_t *sigsaved); | ||
| 276 | extern void set_current_blocked(sigset_t *); | 280 | extern void set_current_blocked(sigset_t *); |
| 277 | extern void __set_current_blocked(const sigset_t *); | 281 | extern void __set_current_blocked(const sigset_t *); |
| 278 | extern int show_unhandled_signals; | 282 | extern int show_unhandled_signals; |
diff --git a/include/linux/socket.h b/include/linux/socket.h index 84c48a3c0227..ab2041a00e01 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
| @@ -349,7 +349,8 @@ struct ucred { | |||
| 349 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); | 349 | extern int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr_storage *kaddr); |
| 350 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); | 350 | extern int put_cmsg(struct msghdr*, int level, int type, int len, void *data); |
| 351 | 351 | ||
| 352 | struct timespec64; | 352 | struct __kernel_timespec; |
| 353 | struct old_timespec32; | ||
| 353 | 354 | ||
| 354 | /* The __sys_...msg variants allow MSG_CMSG_COMPAT iff | 355 | /* The __sys_...msg variants allow MSG_CMSG_COMPAT iff |
| 355 | * forbid_cmsg_compat==false | 356 | * forbid_cmsg_compat==false |
| @@ -358,8 +359,10 @@ extern long __sys_recvmsg(int fd, struct user_msghdr __user *msg, | |||
| 358 | unsigned int flags, bool forbid_cmsg_compat); | 359 | unsigned int flags, bool forbid_cmsg_compat); |
| 359 | extern long __sys_sendmsg(int fd, struct user_msghdr __user *msg, | 360 | extern long __sys_sendmsg(int fd, struct user_msghdr __user *msg, |
| 360 | unsigned int flags, bool forbid_cmsg_compat); | 361 | unsigned int flags, bool forbid_cmsg_compat); |
| 361 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen, | 362 | extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, |
| 362 | unsigned int flags, struct timespec64 *timeout); | 363 | unsigned int vlen, unsigned int flags, |
| 364 | struct __kernel_timespec __user *timeout, | ||
| 365 | struct old_timespec32 __user *timeout32); | ||
| 363 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, | 366 | extern int __sys_sendmmsg(int fd, struct mmsghdr __user *mmsg, |
| 364 | unsigned int vlen, unsigned int flags, | 367 | unsigned int vlen, unsigned int flags, |
| 365 | bool forbid_cmsg_compat); | 368 | bool forbid_cmsg_compat); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 2ac3d13a915b..251979d2e709 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
| @@ -296,12 +296,18 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id, | |||
| 296 | long min_nr, | 296 | long min_nr, |
| 297 | long nr, | 297 | long nr, |
| 298 | struct io_event __user *events, | 298 | struct io_event __user *events, |
| 299 | struct timespec __user *timeout); | 299 | struct __kernel_timespec __user *timeout); |
| 300 | asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, | 300 | asmlinkage long sys_io_pgetevents(aio_context_t ctx_id, |
| 301 | long min_nr, | 301 | long min_nr, |
| 302 | long nr, | 302 | long nr, |
| 303 | struct io_event __user *events, | 303 | struct io_event __user *events, |
| 304 | struct timespec __user *timeout, | 304 | struct __kernel_timespec __user *timeout, |
| 305 | const struct __aio_sigset *sig); | ||
| 306 | asmlinkage long sys_io_pgetevents_time32(aio_context_t ctx_id, | ||
| 307 | long min_nr, | ||
| 308 | long nr, | ||
| 309 | struct io_event __user *events, | ||
| 310 | struct old_timespec32 __user *timeout, | ||
| 305 | const struct __aio_sigset *sig); | 311 | const struct __aio_sigset *sig); |
| 306 | 312 | ||
| 307 | /* fs/xattr.c */ | 313 | /* fs/xattr.c */ |
| @@ -466,10 +472,16 @@ asmlinkage long sys_sendfile64(int out_fd, int in_fd, | |||
| 466 | 472 | ||
| 467 | /* fs/select.c */ | 473 | /* fs/select.c */ |
| 468 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, | 474 | asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, |
| 469 | fd_set __user *, struct timespec __user *, | 475 | fd_set __user *, struct __kernel_timespec __user *, |
| 476 | void __user *); | ||
| 477 | asmlinkage long sys_pselect6_time32(int, fd_set __user *, fd_set __user *, | ||
| 478 | fd_set __user *, struct old_timespec32 __user *, | ||
| 470 | void __user *); | 479 | void __user *); |
| 471 | asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, | 480 | asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, |
| 472 | struct timespec __user *, const sigset_t __user *, | 481 | struct __kernel_timespec __user *, const sigset_t __user *, |
| 482 | size_t); | ||
| 483 | asmlinkage long sys_ppoll_time32(struct pollfd __user *, unsigned int, | ||
| 484 | struct old_timespec32 __user *, const sigset_t __user *, | ||
| 473 | size_t); | 485 | size_t); |
| 474 | 486 | ||
| 475 | /* fs/signalfd.c */ | 487 | /* fs/signalfd.c */ |
| @@ -541,7 +553,7 @@ asmlinkage long sys_unshare(unsigned long unshare_flags); | |||
| 541 | 553 | ||
| 542 | /* kernel/futex.c */ | 554 | /* kernel/futex.c */ |
| 543 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, | 555 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, |
| 544 | struct timespec __user *utime, u32 __user *uaddr2, | 556 | struct __kernel_timespec __user *utime, u32 __user *uaddr2, |
| 545 | u32 val3); | 557 | u32 val3); |
| 546 | asmlinkage long sys_get_robust_list(int pid, | 558 | asmlinkage long sys_get_robust_list(int pid, |
| 547 | struct robust_list_head __user * __user *head_ptr, | 559 | struct robust_list_head __user * __user *head_ptr, |
| @@ -637,6 +649,10 @@ asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese, | |||
| 637 | siginfo_t __user *uinfo, | 649 | siginfo_t __user *uinfo, |
| 638 | const struct __kernel_timespec __user *uts, | 650 | const struct __kernel_timespec __user *uts, |
| 639 | size_t sigsetsize); | 651 | size_t sigsetsize); |
| 652 | asmlinkage long sys_rt_sigtimedwait_time32(const sigset_t __user *uthese, | ||
| 653 | siginfo_t __user *uinfo, | ||
| 654 | const struct old_timespec32 __user *uts, | ||
| 655 | size_t sigsetsize); | ||
| 640 | asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo); | 656 | asmlinkage long sys_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t __user *uinfo); |
| 641 | 657 | ||
| 642 | /* kernel/sys.c */ | 658 | /* kernel/sys.c */ |
| @@ -831,6 +847,9 @@ asmlinkage long sys_accept4(int, struct sockaddr __user *, int __user *, int); | |||
| 831 | asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg, | 847 | asmlinkage long sys_recvmmsg(int fd, struct mmsghdr __user *msg, |
| 832 | unsigned int vlen, unsigned flags, | 848 | unsigned int vlen, unsigned flags, |
| 833 | struct __kernel_timespec __user *timeout); | 849 | struct __kernel_timespec __user *timeout); |
| 850 | asmlinkage long sys_recvmmsg_time32(int fd, struct mmsghdr __user *msg, | ||
| 851 | unsigned int vlen, unsigned flags, | ||
| 852 | struct old_timespec32 __user *timeout); | ||
| 834 | 853 | ||
| 835 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, | 854 | asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, |
| 836 | int options, struct rusage __user *ru); | 855 | int options, struct rusage __user *ru); |
diff --git a/include/linux/time32.h b/include/linux/time32.h index 61904a6c098f..118b9977080c 100644 --- a/include/linux/time32.h +++ b/include/linux/time32.h | |||
| @@ -96,31 +96,6 @@ static inline int timespec_compare(const struct timespec *lhs, const struct time | |||
| 96 | return lhs->tv_nsec - rhs->tv_nsec; | 96 | return lhs->tv_nsec - rhs->tv_nsec; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | extern void set_normalized_timespec(struct timespec *ts, time_t sec, s64 nsec); | ||
| 100 | |||
| 101 | static inline struct timespec timespec_add(struct timespec lhs, | ||
| 102 | struct timespec rhs) | ||
| 103 | { | ||
| 104 | struct timespec ts_delta; | ||
| 105 | |||
| 106 | set_normalized_timespec(&ts_delta, lhs.tv_sec + rhs.tv_sec, | ||
| 107 | lhs.tv_nsec + rhs.tv_nsec); | ||
| 108 | return ts_delta; | ||
| 109 | } | ||
| 110 | |||
| 111 | /* | ||
| 112 | * sub = lhs - rhs, in normalized form | ||
| 113 | */ | ||
| 114 | static inline struct timespec timespec_sub(struct timespec lhs, | ||
| 115 | struct timespec rhs) | ||
| 116 | { | ||
| 117 | struct timespec ts_delta; | ||
| 118 | |||
| 119 | set_normalized_timespec(&ts_delta, lhs.tv_sec - rhs.tv_sec, | ||
| 120 | lhs.tv_nsec - rhs.tv_nsec); | ||
| 121 | return ts_delta; | ||
| 122 | } | ||
| 123 | |||
| 124 | /* | 99 | /* |
| 125 | * Returns true if the timespec is norm, false if denorm: | 100 | * Returns true if the timespec is norm, false if denorm: |
| 126 | */ | 101 | */ |
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 29975e93fcb8..a8ab0f143ac4 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h | |||
| @@ -262,18 +262,4 @@ void read_persistent_wall_and_boot_offset(struct timespec64 *wall_clock, | |||
| 262 | struct timespec64 *boot_offset); | 262 | struct timespec64 *boot_offset); |
| 263 | extern int update_persistent_clock64(struct timespec64 now); | 263 | extern int update_persistent_clock64(struct timespec64 now); |
| 264 | 264 | ||
| 265 | /* | ||
| 266 | * deprecated aliases, don't use in new code | ||
| 267 | */ | ||
| 268 | #define getnstimeofday64(ts) ktime_get_real_ts64(ts) | ||
| 269 | |||
| 270 | static inline struct timespec64 current_kernel_time64(void) | ||
| 271 | { | ||
| 272 | struct timespec64 ts; | ||
| 273 | |||
| 274 | ktime_get_coarse_real_ts64(&ts); | ||
| 275 | |||
| 276 | return ts; | ||
| 277 | } | ||
| 278 | |||
| 279 | #endif | 265 | #endif |
diff --git a/include/linux/timekeeping32.h b/include/linux/timekeeping32.h index a502616f7e1c..cc59cc9e0e84 100644 --- a/include/linux/timekeeping32.h +++ b/include/linux/timekeeping32.h | |||
| @@ -6,15 +6,6 @@ | |||
| 6 | * over time so we can remove the file here. | 6 | * over time so we can remove the file here. |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | static inline void do_gettimeofday(struct timeval *tv) | ||
| 10 | { | ||
| 11 | struct timespec64 now; | ||
| 12 | |||
| 13 | ktime_get_real_ts64(&now); | ||
| 14 | tv->tv_sec = now.tv_sec; | ||
| 15 | tv->tv_usec = now.tv_nsec/1000; | ||
| 16 | } | ||
| 17 | |||
| 18 | static inline unsigned long get_seconds(void) | 9 | static inline unsigned long get_seconds(void) |
| 19 | { | 10 | { |
| 20 | return ktime_get_real_seconds(); | 11 | return ktime_get_real_seconds(); |
| @@ -52,10 +43,4 @@ static inline void getboottime(struct timespec *ts) | |||
| 52 | *ts = timespec64_to_timespec(ts64); | 43 | *ts = timespec64_to_timespec(ts64); |
| 53 | } | 44 | } |
| 54 | 45 | ||
| 55 | /* | ||
| 56 | * Persistent clock related interfaces | ||
| 57 | */ | ||
| 58 | extern void read_persistent_clock(struct timespec *ts); | ||
| 59 | extern int update_persistent_clock(struct timespec now); | ||
| 60 | |||
| 61 | #endif | 46 | #endif |
