[lkml]   [2002]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] compatibility syscall layer (lets try again)

On Fri, 6 Dec 2002, Jim Houston wrote:
> I know it would be a few extra lines of assembly code but it would be
> nice if the restart routine had the original arguments.

It's not even extra code on x86, since we don't stomp on any of the
arguments, and they will all have the same values when returning. So on
x86, we could see the arguments by just adding parameters to the
sys_restart_syscall() function.

However, the same is not necessarily true on other architectures, where
there can be overlap between clobbers and arguments (so that the first
invocation of the system call may have trashed the arguments unless it
explicitly saves it), and that's the reason I don't want to expose the
original ones.

Also, I actually much prefer the arguments to be saved away in the restart
block for another reason too - because that way you can _trust_ them. The
restart function basically knows that the arguments are truly the same
that were saved away - if you allow the register contents from user space
to be re-used, clever 'ptrace()' usage will be able to change the

In other words, with the current setup, we can actually have hidden kernel
state inside the restart block, and it never gets leaked to/from user
space. That's potentially quite useful in itself (you can cache argument


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:31    [W:0.114 / U:0.776 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site