public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@actcom.co.il>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	John Levon <movement@marcelothewonderpenguin.com>,
	"Steven N. Hirsch" <shirsch@adelphia.net>,
	linux-kernel@vger.kernel.org
Subject: Re: Two fixes for 2.4.19-pre5-ac3
Date: Mon, 8 Apr 2002 09:27:37 +0300	[thread overview]
Message-ID: <20020408092737.D10733@actcom.co.il> (raw)
In-Reply-To: <E16uJHZ-0006eO-00@the-village.bc.nu> <20020407225504.Z10733@actcom.co.il> <E16uJHZ-0006eO-00@the-village.bc.nu> <20020407232339.B10733@actcom.co.il> <5.1.0.14.2.20020408000103.03cda5a0@pop.cus.cam.ac.uk>

On Mon, Apr 08, 2002 at 12:03:06AM +0100, Anton Altaparmakov wrote:
> At 21:23 07/04/02, Muli Ben-Yehuda wrote:

> >Right, this module (syscall_hijack.o) currently has the interface:
> >
> >int hijack_syscall_before(int syscall_id, func_ptr func);
> >int hijack_syscall_after(int syscall_id, func_ptr func);
> >
> >int release_syscall_before(int syscall_id);
> >int release_syscall_after(int syscall_id);
> >
> >where 'before' and 'after' correspond to a hook which should run
> >before the original system call is invoked (allowing it to specify
> >that the original system call should not be executed) or after the
> >original system call is invoked (allowing it access to its return
> >value).
> [snip]
> 
> So are you coping with someone hijacking YOU as well between calls to 
> hijack_syscall_* and release_syscall_*? Or would that trash the
> caller chain?

That should work fine, since we never explicitly refer to the entry in
the sys_call_table in our call chain (our callchain goes 

hijacked_function 
   -> hook_before
   if call original syscall
   ->  original syscall (the entry that was in the sys_call_table when we
       hijacked it, not the currrent entry!)
   -> hook_after

Note that we don't support stacking of hooks right now - we never had
need to. 
-- 
The ill-formed Orange
Fails to satisfy the eye:       http://vipe.technion.ac.il/~mulix/
Segmentation fault.             http://syscalltrack.sf.net/

  reply	other threads:[~2002-04-08  6:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-07 16:43 Two fixes for 2.4.19-pre5-ac3 Steven N. Hirsch
2002-04-07 17:11 ` Christoph Hellwig
2002-04-07 17:14   ` arjan
2002-04-07 17:42 ` Alan Cox
2002-04-07 17:27   ` arjan
2002-04-07 17:48     ` Alexander Viro
2002-04-07 17:33   ` John Levon
2002-04-07 19:18     ` Alan Cox
2002-04-07 19:23       ` John Levon
2002-04-07 19:42         ` Alan Cox
2002-04-07 19:32           ` John Levon
2002-04-07 19:58             ` Alan Cox
2002-04-07 19:40       ` Jan Harkes
2002-04-07 20:01         ` Alan Cox
2002-04-07 20:13           ` Jan Harkes
2002-04-07 19:49     ` Alan Cox
2002-04-07 19:41       ` John Levon
2002-04-07 19:55         ` Muli Ben-Yehuda
2002-04-07 20:29           ` Alan Cox
2002-04-07 20:23             ` Muli Ben-Yehuda
2002-04-07 20:51               ` Alan Cox
2002-04-07 23:03               ` Anton Altaparmakov
2002-04-08  6:27                 ` Muli Ben-Yehuda [this message]
2002-04-07 20:02         ` Alan Cox
2002-04-07 20:10         ` Eric W. Biederman
2002-04-07 23:06           ` John Levon
2002-04-07 19:44       ` Steven N. Hirsch
2002-04-08 14:48     ` Bill Davidsen
2002-04-08 16:06       ` Philippe Elie
2002-04-08 17:53         ` Eric W. Biederman
2002-04-08 18:07           ` John Levon
2002-04-07 23:31   ` Erik Tews
     [not found] <20020407193245.GA21570@compsoc.man.ac.uk.suse.lists.linux.kernel>
     [not found] ` <E16uIoN-0006b3-00@the-village.bc.nu.suse.lists.linux.kernel>
2002-04-07 21:34   ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020408092737.D10733@actcom.co.il \
    --to=mulix@actcom.co.il \
    --cc=aia21@cam.ac.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=movement@marcelothewonderpenguin.com \
    --cc=shirsch@adelphia.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox