summaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 23:27:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 23:27:54 -0400
commit0bbcce5d1ef3f771a349896f1c7574d20dc6f4bd (patch)
tree8a26c5f63eac55cbedff506bba22d32f8669fd5c /include/linux/compat.h
parent0ef283d4c7808cb264f904de5e29a0b661747fc4 (diff)
parente45e778f078efaac085e50366fe06d7b83c8b881 (diff)
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timers and timekeeping updates from Thomas Gleixner: - Core infrastucture work for Y2038 to address the COMPAT interfaces: + Add a new Y2038 safe __kernel_timespec and use it in the core code + Introduce config switches which allow to control the various compat mechanisms + Use the new config switch in the posix timer code to control the 32bit compat syscall implementation. - Prevent bogus selection of CPU local clocksources which causes an endless reselection loop - Remove the extra kthread in the clocksource code which has no value and just adds another level of indirection - The usual bunch of trivial updates, cleanups and fixlets all over the place - More SPDX conversions * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) clocksource/drivers/mxs_timer: Switch to SPDX identifier clocksource/drivers/timer-imx-tpm: Switch to SPDX identifier clocksource/drivers/timer-imx-gpt: Switch to SPDX identifier clocksource/drivers/timer-imx-gpt: Remove outdated file path clocksource/drivers/arc_timer: Add comments about locking while read GFRC clocksource/drivers/mips-gic-timer: Add pr_fmt and reword pr_* messages clocksource/drivers/sprd: Fix Kconfig dependency clocksource: Move inline keyword to the beginning of function declarations timer_list: Remove unused function pointer typedef timers: Adjust a kernel-doc comment tick: Prefer a lower rating device only if it's CPU local device clocksource: Remove kthread time: Change nanosleep to safe __kernel_* types time: Change types to new y2038 safe __kernel_* types time: Fix get_timespec64() for y2038 safe compat interfaces time: Add new y2038 safe __kernel_timespec posix-timers: Make compat syscalls depend on CONFIG_COMPAT_32BIT_TIME time: Introduce CONFIG_COMPAT_32BIT_TIME time: Introduce CONFIG_64BIT_TIME in architectures compat: Enable compat_get/put_timespec64 always ...
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index ad192057b887..b1a5562b3215 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -7,8 +7,7 @@
7 */ 7 */
8 8
9#include <linux/types.h> 9#include <linux/types.h>
10 10#include <linux/compat_time.h>
11#ifdef CONFIG_COMPAT
12 11
13#include <linux/stat.h> 12#include <linux/stat.h>
14#include <linux/param.h> /* for HZ */ 13#include <linux/param.h> /* for HZ */
@@ -21,8 +20,11 @@
21#include <linux/unistd.h> 20#include <linux/unistd.h>
22 21
23#include <asm/compat.h> 22#include <asm/compat.h>
23
24#ifdef CONFIG_COMPAT
24#include <asm/siginfo.h> 25#include <asm/siginfo.h>
25#include <asm/signal.h> 26#include <asm/signal.h>
27#endif
26 28
27#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER 29#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
28/* 30/*
@@ -83,6 +85,8 @@
83 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) 85 static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
84#endif /* COMPAT_SYSCALL_DEFINEx */ 86#endif /* COMPAT_SYSCALL_DEFINEx */
85 87
88#ifdef CONFIG_COMPAT
89
86#ifndef compat_user_stack_pointer 90#ifndef compat_user_stack_pointer
87#define compat_user_stack_pointer() current_user_stack_pointer() 91#define compat_user_stack_pointer() current_user_stack_pointer()
88#endif 92#endif
@@ -290,8 +294,6 @@ extern int compat_get_timespec(struct timespec *, const void __user *);
290extern int compat_put_timespec(const struct timespec *, void __user *); 294extern int compat_put_timespec(const struct timespec *, void __user *);
291extern int compat_get_timeval(struct timeval *, const void __user *); 295extern int compat_get_timeval(struct timeval *, const void __user *);
292extern int compat_put_timeval(const struct timeval *, void __user *); 296extern int compat_put_timeval(const struct timeval *, void __user *);
293extern int compat_get_timespec64(struct timespec64 *, const void __user *);
294extern int compat_put_timespec64(const struct timespec64 *, void __user *);
295extern int get_compat_itimerspec64(struct itimerspec64 *its, 297extern int get_compat_itimerspec64(struct itimerspec64 *its,
296 const struct compat_itimerspec __user *uits); 298 const struct compat_itimerspec __user *uits);
297extern int put_compat_itimerspec64(const struct itimerspec64 *its, 299extern int put_compat_itimerspec64(const struct itimerspec64 *its,
@@ -1023,7 +1025,9 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec)
1023#else /* !CONFIG_COMPAT */ 1025#else /* !CONFIG_COMPAT */
1024 1026
1025#define is_compat_task() (0) 1027#define is_compat_task() (0)
1028#ifndef in_compat_syscall
1026static inline bool in_compat_syscall(void) { return false; } 1029static inline bool in_compat_syscall(void) { return false; }
1030#endif
1027 1031
1028#endif /* CONFIG_COMPAT */ 1032#endif /* CONFIG_COMPAT */
1029 1033