Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1085
b: refs/heads/master
c: 2d58cc9
h: refs/heads/master
i:
  1083: fc58187
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 7, 2005
1 parent 919b743 commit fbd3af3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f7e663dea7f0e22f3b2d07156c5e9d2e8656610
refs/heads/master: 2d58cc9a437f3833d242e9d1617ec9b4044e26f3
7 changes: 5 additions & 2 deletions trunk/arch/um/kernel/skas/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,12 @@ static unsigned long maybe_map(unsigned long virt, int is_write)
if(IS_ERR(phys) || (is_write && !pte_write(pte))){
err = handle_page_fault(virt, 0, is_write, 1, &dummy_code);
if(err)
return(0);
return(-1UL);
phys = um_virt_to_phys(current, virt, NULL);
}
if(IS_ERR(phys))
phys = (void *) -1;

return((unsigned long) phys);
}

Expand All @@ -42,7 +45,7 @@ static int do_op(unsigned long addr, int len, int is_write,
int n;

addr = maybe_map(addr, is_write);
if(addr == -1)
if(addr == -1UL)
return(-1);

page = phys_to_page(addr);
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/um/kernel/syscall_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "linux/utime.h"
#include "asm/mman.h"
#include "asm/uaccess.h"
#include "asm/ipc.h"
#include "kern_util.h"
#include "user_util.h"
#include "sysdep/syscalls.h"
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/kernel/trap_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int handle_page_fault(unsigned long address, unsigned long ip,
goto good_area;
else if(!(vma->vm_flags & VM_GROWSDOWN))
goto out;
else if(!ARCH_IS_STACKGROW(address))
else if(is_user && !ARCH_IS_STACKGROW(address))
goto out;
else if(expand_stack(vma, address))
goto out;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/um/sys-x86_64/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ int setup_signal_stack_si(unsigned long stack_top, int sig,

frame = (struct rt_sigframe __user *)
round_down(stack_top - sizeof(struct rt_sigframe), 16) - 8;
frame -= 128;
((unsigned char *) frame) -= 128;

if (!access_ok(VERIFY_WRITE, fp, sizeof(struct _fpstate)))
goto out;
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/um/sys-x86_64/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ long sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount)
#ifdef CONFIG_MODE_SKAS
extern int userspace_pid[];

#include "skas_ptrace.h"

long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
{
struct ptrace_ldt ldt;
Expand Down

0 comments on commit fbd3af3

Please sign in to comment.