History

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

Linus Torvalds committed 9 years ago

Commit cc73fee2 parents e7cdb60 aaed2dd19 files · +1044 −1195Browse files

Showing the changes to kernel (3 of 19 files). Show all

Unified · Split

3 files
  1. kernel/audit.h +1 −1
  2. kernel/auditsc.c +6 −6
  3. kernel/compat.c +0 −23
kernel/audit.h+1−1
@@ -182,7 +182,7 @@ struct audit_context { · 181 unmodified lines
182182 mqd_t mqdes;
183183 size_t msg_len;
184184 unsigned int msg_prio;
185− struct timespec abs_timeout;
185+ struct timespec64 abs_timeout;
186186 } mq_sendrecv;
187187 struct {
188188 int oflag;
kernel/auditsc.c+6−6
@@ -1235,11 +1235,11 @@ static void show_special(struct audit_context *context, int *call_panic) · 1234 unmodified lines
12351235 case AUDIT_MQ_SENDRECV:
12361236 audit_log_format(ab,
12371237 "mqdes=%d msg_len=%zd msg_prio=%u "
1238− "abs_timeout_sec=%ld abs_timeout_nsec=%ld",
1238+ "abs_timeout_sec=%lld abs_timeout_nsec=%ld",
12391239 context->mq_sendrecv.mqdes,
12401240 context->mq_sendrecv.msg_len,
12411241 context->mq_sendrecv.msg_prio,
1242− context->mq_sendrecv.abs_timeout.tv_sec,
1242+ (long long) context->mq_sendrecv.abs_timeout.tv_sec,
12431243 context->mq_sendrecv.abs_timeout.tv_nsec);
12441244 break;
12451245 case AUDIT_MQ_NOTIFY:
@@ -2083,15 +2083,15 @@ void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr) · 837 unmodified lines
20832083 *
20842084 */
20852085 void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio,
2086− const struct timespec *abs_timeout)
2086+ const struct timespec64 *abs_timeout)
20872087 {
20882088 struct audit_context *context = current->audit_context;
2089− struct timespec *p = &context->mq_sendrecv.abs_timeout;
2089+ struct timespec64 *p = &context->mq_sendrecv.abs_timeout;
20902090
20912091 if (abs_timeout)
2092− memcpy(p, abs_timeout, sizeof(struct timespec));
2092+ memcpy(p, abs_timeout, sizeof(*p));
20932093 else
2094− memset(p, 0, sizeof(struct timespec));
2094+ memset(p, 0, sizeof(*p));
20952095
20962096 context->mq_sendrecv.mqdes = mqdes;
20972097 context->mq_sendrecv.msg_len = msg_len;
kernel/compat.c+0−23
@@ -200,29 +200,6 @@ int compat_put_timespec(const struct timespec *ts, void __user *uts) · 199 unmodified lines
200200 }
201201 EXPORT_SYMBOL_GPL(compat_put_timespec);
202202
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−
226203 int get_compat_itimerval(struct itimerval *o, const struct compat_itimerval __user *i)
227204 {
228205 struct compat_itimerval v32;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t