From 80f9507886076de0cadfdf2b87701e68156829c2 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Sun, 1 May 2005 08:58:55 -0700 Subject: [PATCH] uml: fix syscall table by including $(SUBARCH)'s one, for x86-64 Reuse asm-x86-64/unistd.h to build our syscall table, like x86-64 already does. Like for i386, we must add some #defines for all the (right!) changes UML does to x86-64 syscall table. Note: I noted a bogus: [ __NR_sched_yield ] = (syscall_handler_t *) yield, while doing this patch (which could only be a workaround for some strange bug, but I would ignore this possibility). I'm changing this without notice. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/sys-x86_64/syscalls.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/um/sys-x86_64/syscalls.c') diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 68205a03364..15768c96ceb 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c @@ -14,6 +14,7 @@ #include "asm/prctl.h" /* XXX This should get the constants from libc */ #include "choose-mode.h" +/* XXX: copied from x86-64: arch/x86_64/kernel/sys_x86_64.c */ asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg) { unsigned long raddr; @@ -21,6 +22,17 @@ asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg) return do_shmat(shmid, shmaddr, shmflg, &raddr) ?: (long) raddr; } +asmlinkage long sys_uname64(struct new_utsname __user * name) +{ + int err; + down_read(&uts_sem); + err = copy_to_user(name, &system_utsname, sizeof (*name)); + up_read(&uts_sem); + if (personality(current->personality) == PER_LINUX32) + err |= copy_to_user(&name->machine, "i686", 5); + return err ? -EFAULT : 0; +} + #ifdef CONFIG_MODE_TT extern int modify_ldt(int func, void *ptr, unsigned long bytecount); -- cgit v1.2.3