Re: Running Untrusted Code in a Restricted Process

From: Jeff Dike (jdike@karaya.com)
Date: Mon Jun 12 2000 - 13:18:56 EST


> Can anyone point me to some ptrace() documentation? I've looked at the
> source to strace and several other programs. I can see how to print out
> and trace system calls, but I don't see how to change the return value.

You write the return value into the child's EAX at syscall return time.

If you've got the user-mode port code, look in
arch/um/kernel/syscall_user.c (do-syscall() for reading out the system
call and arguments and annulling the system call, exit_kernel() for
setting the return value).

                                Jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:26 EST