From: Muli Ben-Yehuda <mulix@actcom.co.il>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: 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: Sun, 7 Apr 2002 23:23:40 +0300 [thread overview]
Message-ID: <20020407232339.B10733@actcom.co.il> (raw)
In-Reply-To: <20020407225504.Z10733@actcom.co.il> <E16uJHZ-0006eO-00@the-village.bc.nu>
On Sun, Apr 07, 2002 at 09:29:01PM +0100, Alan Cox wrote:
> > hijacks syscall entries in the sys_call_table as well, because we
> > want it to work as a module and not require patching the kernel. Our
> > solution to the module unload race on syscall de-hijacking is simple,
> > splitting the system call hijacking code into a single small module
> > which once loaded cannot be unloaded.
>
> So your small module can export a function called
> patch_syscall(NR_foo, function);
>
> Now you can put the arch specific syscall patching code into your small
> common module and its cleaner anyway ?
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).
We only support i386 (and uml) at the moment, because of the problems
with hijacking system calls on other architectures and because none of
us have access to other architectures to test the code on.
I recall reading in the archives that linus objected to modules
hijacking system calls on the grounds that it allows binary only
modules to completely subvert the way the kernel behaves towards
userspace. What if such a mechanism existed, however, and was only
exported to modules with a suitable license (modules which don't taint
the kernel). Would that be feasible?
--
The ill-formed Orange
Fails to satisfy the eye: http://vipe.technion.ac.il/~mulix/
Segmentation fault. http://syscalltrack.sf.net/
next prev parent reply other threads:[~2002-04-07 20:25 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 [this message]
2002-04-07 20:51 ` Alan Cox
2002-04-07 23:03 ` Anton Altaparmakov
2002-04-08 6:27 ` Muli Ben-Yehuda
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=20020407232339.B10733@actcom.co.il \
--to=mulix@actcom.co.il \
--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