Commit 865994e8 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds

[PATCH] uml: sysenter is syscall

From: Bodo Stroesser - Change is_syscall to check for sysenter and also that
we are actually executing a system call.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 83f7d932
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "asm/elf.h" #include "asm/elf.h"
#include "asm/ptrace.h" #include "asm/ptrace.h"
#include "asm/uaccess.h" #include "asm/uaccess.h"
#include "asm/unistd.h"
#include "ptrace_user.h" #include "ptrace_user.h"
#include "sysdep/sigcontext.h" #include "sysdep/sigcontext.h"
#include "sysdep/sc.h" #include "sysdep/sc.h"
...@@ -23,11 +24,12 @@ int is_syscall(unsigned long addr) ...@@ -23,11 +24,12 @@ int is_syscall(unsigned long addr)
n = copy_from_user(&instr, (void *) addr, sizeof(instr)); n = copy_from_user(&instr, (void *) addr, sizeof(instr));
if(n){ if(n){
printk("is_syscall : failed to read instruction from 0x%lu\n", printk("is_syscall : failed to read instruction from 0x%lx\n",
addr); addr);
return(0); return(0);
} }
return(instr == 0x80cd); return( (instr == 0x80cd || instr == 0x340f) &&
PT_REGS_EAX(&current->thread.regs) < NR_syscalls);
} }
/* determines which flags the user has access to. */ /* determines which flags the user has access to. */
......
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