mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "John Stoffel" <john@stoffel.org>
To: Gaurav Saxena <grvsaxena419@gmail.com>
Cc: John Stoffel <john@stoffel.org>,
	richard -rw- weinberger <richard.weinberger@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Intercepting system calls
Date: Fri, 23 Dec 2011 09:38:10 -0500	[thread overview]
Message-ID: <20212.37458.896503.997111@quad.stoffel.home> (raw)
In-Reply-To: <CAOh0hwPeveaEaNv_mjNVLM36JSbObX4n5y1jC_Yp5MwdBA0Sxw@mail.gmail.com>

>>>>> "Gaurav" == Gaurav Saxena <grvsaxena419@gmail.com> writes:

Gaurav> Hello John,
Gaurav> On Thu, Dec 22, 2011 at 11:22 PM, John Stoffel <john@stoffel.org> wrote:
>>>>>>> "Gaurav" == Gaurav Saxena <grvsaxena419@gmail.com> writes:
>> 
>>>> Intercepting system calls is very bad, don't do it.
>> 
Gaurav> Oh. I will not do it then, could you suggest me something so
Gaurav> that I could prevent unlink on some file say using kernel
Gaurav> support. I want to save file on unlink how could I do that
Gaurav> without kernel support, or how could I do that using a kernel
Gaurav> module.
>> 
>> Write a FUSE module to mount the filesystem through, inside your FUSE
>> module you can intercept the unlink/truncate/write calls and decide
>> what you want to have happen.

Gaurav> I would like to write it differently for each type of filesystem ?
Gaurav> Because what operations to call after my function depends on this.
Gaurav> Also Can I mount "/" in this way ?

Sounds like you really want to use inotify() then, but intercepting
calls to write/truncate/unlink isn't going to be easy to handle across
a large spectrum of filesystems without a bunch of hacking.  

Maybe if you can explain your requirements more clearly, with an
example of what you're trying to accomplish, then people could help
you more.

Also, it might be more appropriate to talk to the 'fs-devel' mailing
list.  I think it's on kernel.org, but not sure.

John


  reply	other threads:[~2011-12-23 14:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 16:07 Gaurav Saxena
2011-12-22 16:42 ` richard -rw- weinberger
2011-12-22 16:59   ` Gaurav Saxena
2011-12-22 17:05     ` richard -rw- weinberger
2011-12-22 17:16       ` Gaurav Saxena
2011-12-22 17:32         ` richard -rw- weinberger
2011-12-22 17:37           ` Gaurav Saxena
2011-12-22 17:52     ` John Stoffel
2011-12-23  2:22       ` Gaurav Saxena
2011-12-23 14:38         ` John Stoffel [this message]
2011-12-23 17:03           ` Gaurav Saxena
2011-12-28 12:56             ` Wojciech Zygmunt Porczyk
2011-12-29  6:38               ` Gaurav Saxena
2011-12-23 14:50       ` Alan Cox
2011-12-23 17:07         ` Gaurav Saxena
2011-12-22 19:03     ` Wakko Warner
2011-12-23  2:25       ` Gaurav Saxena
2011-12-23  9:45       ` Jiri Kosina
2011-12-23 15:10         ` Wakko Warner
2011-12-23  7:25 ` J. R. Okajima
2011-12-23  9:08   ` Gaurav Saxena
2011-12-23  9:16     ` richard -rw- weinberger
2011-12-23  9:22       ` Gaurav Saxena
2011-12-23  9:26         ` richard -rw- weinberger
2011-12-23  9:37           ` Gaurav Saxena
2011-12-23  9:47 ` Jiri Kosina
2011-12-23  9:50   ` Gaurav Saxena
2011-12-23 11:59     ` Gaurav Saxena
2011-12-23 12:29       ` Maxin B John
2011-12-23 12:50         ` Gaurav Saxena
2011-12-23 13:00           ` richard -rw- weinberger
  -- strict thread matches above, loose matches on Subject: below --
2010-02-04 19:00 Oleg Kutkov
2010-02-04 19:26 ` Bryan Donlan
     [not found]   ` <5e9821061002042140le7ba356s48e535c9d8b637ec@mail.gmail.com>
2010-02-05  7:20     ` Bryan Donlan
2004-12-21  4:22 selvakumar nagendran
2004-12-21  4:28 ` Lee Revell
2004-12-21 13:51 ` Steven Rostedt

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=20212.37458.896503.997111@quad.stoffel.home \
    --to=john@stoffel.org \
    --cc=grvsaxena419@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richard.weinberger@gmail.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®