From: Chris Wedgwood <cw@f00f.org>
To: surfing t <surf17@lycos.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Points to fs architecture
Date: Mon, 5 Jul 2004 15:53:11 -0700 [thread overview]
Message-ID: <20040705225311.GA697@taniwha.stupidest.org> (raw)
In-Reply-To: <20040705213858.2002086AE1@ws7-1.us4.outblaze.com>
On Mon, Jul 05, 2004 at 04:38:58PM -0500, surfing t wrote:
> I want to create a utility that "hooks" into the the filesystem.
OK
> What I want to do is to be able to review all file system
> read/write/seek requests, most of the time without affecting file
> system operation (ie after review the request is passed on to the
> entity that would have received it had my utility not been
> installed, however some of the requests my driver should handle
> itself.
Strictly speaking what you want then is not going to be at the
filesystem layer, since the filesystem layer doesn't generally see
seeks, writes, etc.
It sounds like you want to instrument the system calls, look at the
man pages for 'strace' and similar.
> Basically I just want to "hijack" the system calls that applications
> use to access files and then pass them on to the original system
> call. Is this possible and how do I do it?
The ptrace system call and a little effort will let you do this. You
can also use LD_PRELOAD and over-ride some glibc hooks for the file IO
operations --- there are plenty of things that do this I'm sure
already.
--cw
next prev parent reply other threads:[~2004-07-05 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-05 21:38 surfing t
2004-07-05 22:53 ` Chris Wedgwood [this message]
2004-07-06 12:56 ` Horst von Brand
2004-07-06 18:34 ` Matthew Dharm
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=20040705225311.GA697@taniwha.stupidest.org \
--to=cw@f00f.org \
--cc=linux-kernel@vger.kernel.org \
--cc=surf17@lycos.com \
/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
all inboxes | Powered by JetHome®