diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 15:51:41 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-02 15:51:41 -0400 |
| commit | 7125764c5d1a5c72d522f1011b6cc8b8100b48fe (patch) | |
| tree | 678f3355ac872a4379b28dbe36f5beddd0e284d8 /include/linux | |
| parent | c6f21243ce1e8d81ad8361da4d2eaa5947b667c4 (diff) | |
| parent | dce44e03b0a3448ad11ac6c6e0cbe299e0400791 (diff) | |
Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull compat time conversion changes from Peter Anvin:
"Despite the branch name this is really neither an x86 nor an
x32-specific patchset, although it the implementation of the
discussions that followed the x32 security hole a few months ago.
This removes get/put_compat_timespec/val() and replaces them with
compat_get/put_timespec/val() which are savvy as to the current status
of COMPAT_USE_64BIT_TIME.
It removes several unused and/or incorrect/misleading functions (like
compat_put_timeval_convert which doesn't in fact do any conversion)
and also replaces several open-coded implementations what is now
called compat_convert_timespec() with that function"
* 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
compat: Fix sparse address space warnings
compat: Get rid of (get|put)_compat_time(val|spec)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compat.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 01c0aa57ccec..e6494261eaff 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
| @@ -147,26 +147,23 @@ struct compat_sigaction { | |||
| 147 | }; | 147 | }; |
| 148 | 148 | ||
| 149 | /* | 149 | /* |
| 150 | * These functions operate strictly on struct compat_time* | ||
| 151 | */ | ||
| 152 | extern int get_compat_timespec(struct timespec *, | ||
| 153 | const struct compat_timespec __user *); | ||
| 154 | extern int put_compat_timespec(const struct timespec *, | ||
| 155 | struct compat_timespec __user *); | ||
| 156 | extern int get_compat_timeval(struct timeval *, | ||
| 157 | const struct compat_timeval __user *); | ||
| 158 | extern int put_compat_timeval(const struct timeval *, | ||
| 159 | struct compat_timeval __user *); | ||
| 160 | /* | ||
| 161 | * These functions operate on 32- or 64-bit specs depending on | 150 | * These functions operate on 32- or 64-bit specs depending on |
| 162 | * COMPAT_USE_64BIT_TIME, hence the void user pointer arguments and the | 151 | * COMPAT_USE_64BIT_TIME, hence the void user pointer arguments. |
| 163 | * naming as compat_get/put_ rather than get/put_compat_. | ||
| 164 | */ | 152 | */ |
| 165 | extern int compat_get_timespec(struct timespec *, const void __user *); | 153 | extern int compat_get_timespec(struct timespec *, const void __user *); |
| 166 | extern int compat_put_timespec(const struct timespec *, void __user *); | 154 | extern int compat_put_timespec(const struct timespec *, void __user *); |
| 167 | extern int compat_get_timeval(struct timeval *, const void __user *); | 155 | extern int compat_get_timeval(struct timeval *, const void __user *); |
| 168 | extern int compat_put_timeval(const struct timeval *, void __user *); | 156 | extern int compat_put_timeval(const struct timeval *, void __user *); |
| 169 | 157 | ||
| 158 | /* | ||
| 159 | * This function convert a timespec if necessary and returns a *user | ||
| 160 | * space* pointer. If no conversion is necessary, it returns the | ||
| 161 | * initial pointer. NULL is a legitimate argument and will always | ||
| 162 | * output NULL. | ||
| 163 | */ | ||
| 164 | extern int compat_convert_timespec(struct timespec __user **, | ||
| 165 | const void __user *); | ||
| 166 | |||
| 170 | struct compat_iovec { | 167 | struct compat_iovec { |
| 171 | compat_uptr_t iov_base; | 168 | compat_uptr_t iov_base; |
| 172 | compat_size_t iov_len; | 169 | compat_size_t iov_len; |
