Commit 0dd316cb authored by Andi Kleen's avatar Andi Kleen Committed by Linus Torvalds

[PATCH] Make x86-64 use new compat support code

Just call them from the x86-64 entry code.

Also implement the x86-64 specific sys32_timer_create.
parent 32065295
......@@ -462,11 +462,21 @@ ia32_sys_call_table:
.quad sys_epoll_wait
.quad sys_remap_file_pages
.quad sys_set_tid_address
.quad sys32_timer_create
.quad compat_timer_settime
.quad compat_timer_gettime
.quad sys_timer_getoverrun
.quad sys_timer_delete
.quad compat_clock_settime
.quad compat_clock_gettime
.quad compat_clock_getres
.quad compat_clock_nanosleep
.quad compat_statfs64 /* statfs64 */
.quad compat_fstatfs64 /* fstatfs64 */
.quad sys_tgkill
.quad compat_sys_utimes
/* don't forget to change IA32_NR_syscalls */
ia32_syscall_end:
.rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8
.quad ni_syscall
.endr
......@@ -428,6 +428,8 @@ put_tv32(struct compat_timeval *o, struct timeval *i)
return err;
}
extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
asmlinkage long
sys32_alarm(unsigned int seconds)
{
......@@ -1991,6 +1993,41 @@ asmlinkage long sys32_open(const char * filename, int flags, int mode)
return fd;
}
struct sigevent32 {
u32 sigev_value;
u32 sigev_signo;
u32 sigev_notify;
u32 payload[(64 / 4) - 3];
};
extern asmlinkage long
sys_timer_create(clockid_t which_clock,
struct sigevent __user *timer_event_spec,
timer_t __user * created_timer_id);
long
sys32_timer_create(u32 clock, struct sigevent32 *se32, timer_t *timer_id)
{
struct sigevent se;
if (se32) {
memset(&se, 0, sizeof(struct sigevent));
if (get_user(se.sigev_value.sival_int, &se32->sigev_value) ||
__get_user(se.sigev_signo, &se32->sigev_signo) ||
__get_user(se.sigev_notify, &se32->sigev_notify) ||
__copy_from_user(&se._sigev_un._pad, &se32->payload,
sizeof(se32->payload)))
return -EFAULT;
}
if (!access_ok(VERIFY_WRITE,timer_id,sizeof(timer_t)))
return -EFAULT;
mm_segment_t oldfs = get_fs();
set_fs(KERNEL_DS);
long err = sys_timer_create(clock, se32 ? &se : NULL, timer_id);
set_fs(oldfs);
return err;
}
long sys32_vm86_warning(void)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment