Re: [PATCH] compatibility syscall layer (lets try again)

From: David Mosberger (davidm@napali.hpl.hp.com)
Date: Mon Dec 09 2002 - 12:27:06 EST


>>>>> On Mon, 9 Dec 2002 08:48:13 -0800 (PST), Linus Torvalds <torvalds@transmeta.com> said:

  Linus> Architecture maintainers, can you comment on how easy/hard it
  Linus> is to do the same thing on your architectures? I _assume_
  Linus> it's trivial (akin to the three-liner register state change
  Linus> in i386/kernel/signal.c).

It's not trivial on ia64: we keep the syscall arguments in registers
(the stacked registers, to be precise), so to modify them, we need to
(a) flush the stacked registers to memory and (b) find the frame that
contains the syscall arguments, (c) patch the values in memory, and
(d) reload the stacked registers. It's doable (like you say, ptrace()
does it already), but that's about the best I can say about it...

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



This archive was generated by hypermail 2b29 : Sun Dec 15 2002 - 22:00:14 EST