diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 20:37:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-14 20:37:26 -0400 |
commit | cc73fee0bae2d66594d1fa2df92bbd783aa98e04 (patch) | |
tree | d1e7fe7f76cae4cbc941fc3bb43a46d237a9df77 /kernel/compat.c | |
parent | e7cdb60fd28b252f1c15a0e50f79a01906124915 (diff) | |
parent | aaed2dd8a31359e5767ee099ecbb078d55be4d29 (diff) |
Merge branch 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull ipc compat cleanup and 64-bit time_t from Al Viro:
"IPC copyin/copyout sanitizing, including 64bit time_t work from Deepa
Dinamani"
* 'work.ipc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
utimes: Make utimes y2038 safe
ipc: shm: Make shmid_kernel timestamps y2038 safe
ipc: sem: Make sem_array timestamps y2038 safe
ipc: msg: Make msg_queue timestamps y2038 safe
ipc: mqueue: Replace timespec with timespec64
ipc: Make sys_semtimedop() y2038 safe
get rid of SYSVIPC_COMPAT on ia64
semtimedop(): move compat to native
shmat(2): move compat to native
msgrcv(2), msgsnd(2): move compat to native
ipc(2): move compat to native
ipc: make use of compat ipc_perm helpers
semctl(): move compat to native
semctl(): separate all layout-dependent copyin/copyout
msgctl(): move compat to native
msgctl(): split the actual work from copyin/copyout
ipc: move compat shmctl to native
shmctl: split the work from copyin/copyout
Diffstat (limited to 'kernel/compat.c')
-rw-r--r-- | kernel/compat.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/kernel/compat.c b/kernel/compat.c index 6f0a0e723a06..772e038d04d9 100644 --- a/kernel/compat.c +++ b/kernel/compat.c | |||
@@ -200,29 +200,6 @@ int compat_put_timespec(const struct timespec *ts, void __user *uts) | |||
200 | } | 200 | } |
201 | EXPORT_SYMBOL_GPL(compat_put_timespec); | 201 | EXPORT_SYMBOL_GPL(compat_put_timespec); |
202 | 202 | ||
203 | int compat_convert_timespec(struct timespec __user **kts, | ||
204 | const void __user *cts) | ||
205 | { | ||
206 | struct timespec ts; | ||
207 | struct timespec __user *uts; | ||
208 | |||
209 | if (!cts || COMPAT_USE_64BIT_TIME) { | ||
210 | *kts = (struct timespec __user *)cts; | ||
211 | return 0; | ||
212 | } | ||
213 | |||
214 | uts = compat_alloc_user_space(sizeof(ts)); | ||
215 | if (!uts) | ||
216 | return -EFAULT; | ||
217 | if (compat_get_timespec(&ts, cts)) | ||
218 | return -EFAULT; | ||
219 | if (copy_to_user(uts, &ts, sizeof(ts))) | ||
220 | return -EFAULT; | ||
221 | |||
222 | *kts = uts; | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | int get_compat_itimerval(struct itimerval *o, const struct compat_itimerval __user *i) | 203 | int get_compat_itimerval(struct itimerval *o, const struct compat_itimerval __user *i) |
227 | { | 204 | { |
228 | struct compat_itimerval v32; | 205 | struct compat_itimerval v32; |