Thanks for your work on the patch
> Your patch almost works but it copies the stack into the parent's address space.
> Using access_process_vm() fixes it. However, that still leaves unfixed the case
> where vsyscall-int80 is used.
I copy the stack into the parent's address space becuase in this case
the memory is shared, but access_process_vm() is more elegant :).
About vsyscall-int80, I don't know how to test that case in my
computer but I think a solution could be:
add a INT80H_RETURN symbol:
.LSTART_vsyscall:
int $0x80
.globl INT80H_RETURN
INT80H_RETURN:
ret
.LEND_vsyscall:
and then in process.c:
int size = 0 ;
childregs->eax = 0;
if ((void *)regs->eip == SYSENTER_RETURN)
size = sizeof(vsyscall_stack) ;
if ((void *)regs->eip == INT80H_RETURN)
size = sizeof(unsigned long) ;
if (regs->esp != esp && size) {
if (copy_from_user(vsyscall_stack, (void *)regs->esp, size))
return -EFAULT;
if (access_process_vm(p, esp - size, vsyscall_stack,
size, 1) != size)
return -EFAULT;
esp -= size;
}
childregs->esp = esp;
I hope somebody can test if it works that way.
Regards
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]