All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajat Sharma <fs.rajat@gmail.com>
To: Gaurav Saxena <grvsaxena419@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Intercepting system calls
Date: Thu, 29 Dec 2011 14:19:58 +0530	[thread overview]
Message-ID: <CAAYFAvpW0c6pQ9ub=OHi2UfWzR6sWA75FZTmn1QSbazngr1T_A@mail.gmail.com> (raw)
In-Reply-To: <CAOh0hwN1o=tKU7p=ntAvJicdJO=X6ho58OW9MhXy_jyz6Y9sWQ@mail.gmail.com>

I would suggest that you go through the stackable FS documentation
maintained with wrapfs website:

http://wrapfs.filesystems.org/docs/linux-stacking/index.html

there is no replacement of fops, that again I would categorize as pure
"HACK". Here you build a stack of FS on top of existing one. so stack
fs appears as regular FS to VFS layer and as VFS to lower FS, it just
fits in between VFS and lower FS. To do it tranparent to applications
you need to mount wrapfs on the same mount point as lower fs so that
you hide direct exposure to lower FS and application can still assume
same file paths as lower FS.

Thanks,
Rajat

On Thu, Dec 29, 2011 at 12:12 PM, Gaurav Saxena <grvsaxena419@gmail.com> wrote:
> Hello Rajat, Thanks for your reply.
>
> On 12/28/11, Rajat Sharma <fs.rajat@gmail.com> wrote:
>> wrapfs needs the underlying filesystem to be already mounted and then
>> it attaches itself on top of this mount point.
> Ok That means it will replace the specific file system operations with
> its own operations ? And then call the specific operations from
> itself? Doesn't it then requires a different operation for each file
> system ?
>>Thats the whole idea of
>> stacking one to one VFS objects from wrapfs to underlying FS objects.
>> So it assumes that / to be already mounted. And you would want to
>> attach to a route volume as soon as possible, so entering wrapfs mount
>> entry in /etc/fstab just after / entry should be good enough.
> Do I need volumes for using wrapfs ? Or simple partitioning would
> suffice ? It sounds quite good I would look at this.
>>
>> Thanks,
>> Rajat
>>
>> On Wed, Dec 28, 2011 at 11:29 AM, Gaurav Saxena <grvsaxena419@gmail.com>
>> wrote:
>>> Hello Rajat Thanks for your reply.
>>>
>>> On Mon, Dec 26, 2011 at 11:23 AM, Rajat Sharma <fs.rajat@gmail.com> wrote:
>>>> Hi Gaurav,
>>>>
>>>> I would suggest to take a wrapfs source (a null stackable file-system)
>>>> and customize it for your need. Well Erez (wrapfs author) puts his
>>>> continuous efforts in stabilizing wrapfs and porting to new kernels
>>>> and he is approachable too. In-fact he has acknowledged on of my patch
>>>> and merged it into wrapfs tree.
>>> Is there a way to mount "/" on such file system ? Like I want to
>>> monitor / for changes like unlink or modified write. Would I be able
>>> to see such changes using wrapfs. As by default on the systems "/"
>>> would be mounted as  ext4 filesystem.
>>>>
>>>> Agreed that you can do stuffs like patching system call table but I
>>>> (and most of us here) would categorize that as pure hack, as there
>>>> exist no framework provided by kernel to do that. Also any approach
>>>> you take to patch system call table won't be stable.
>>> Yes I agree with you I want to do this using a method which is not a
>>> hack, so that the support remains with all the versions of kernel
>>> rather than a trick that works in a limited way.
>>>>
>>>> Thanks,
>>>> Rajat
>>>>
>>>> On Sat, Dec 24, 2011 at 2:39 PM, Gaurav Saxena <grvsaxena419@gmail.com>
>>>> wrote:
>>>>> Hello all,
>>>>>
>>>>> I am writing an application which would create a backup for the system
>>>>> so that it could be restored as it is. For example I create a backup
>>>>> using my application. I just do nothing at time of backup so it would
>>>>> be fast. Now whenever I see any deletion I would save that file so
>>>>> that I could restore it. Also I would like to see for
>>>>> modification/rename. I cannot do this using inotify as I would be
>>>>> notified after actual deletion/write. I don't want to use SELinux
>>>>> because I want to implement this on existing installed system. I was
>>>>> earlier thinking of replacing system calls for open/unlink with my
>>>>> custom calls which will call my functions before actual work and then
>>>>> I would decide what to do I would also want to reject unlink request
>>>>> for some of the files. But as I now know that its not working in
>>>>> linux>3.0 . I had also seen dazuko which is not supporting linux>3.0
>>>>> yet. Also there used to be a redirfs which used to work earlier but
>>>>> the latest kernel is not supported yet. I think a method could be to
>>>>> replace unlink in syscall table with my unlink function but I don't
>>>>> find any good method of doing that, as syscall table is no longer
>>>>> exported. I would like to implement this in a kernel module instead of
>>>>> modifying kernel code itself. Please suggest some method of doing
>>>>> that.
>>>>> Thanks to you all for your help.
>>>>>
>>>>> --
>>>>> Thanks and Regards ,
>>>>> Gaurav
>>>>> --
>>>>> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel"
>>>>> in
>>>>> the body of a message to majordomo@vger.kernel.org
>>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>>
>>> --
>>> Thanks and Regards ,
>>> Gaurav
>>
>
>
> --
> Thanks and Regards ,
> Gaurav
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-12-29  8:49 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 16:07 Intercepting system calls 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
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
2011-12-24  9:09 ` Gaurav Saxena
2011-12-26  5:53   ` Rajat Sharma
2011-12-28  5:59     ` Gaurav Saxena
2011-12-28 13:44       ` Rajat Sharma
2011-12-29  6:42         ` Gaurav Saxena
2011-12-29  8:49           ` Rajat Sharma [this message]
2011-12-29 10:23             ` Gaurav Saxena
2011-12-29 11:11               ` Rajat Sharma
2011-12-29 12:06                 ` Gaurav Saxena
2011-12-29 12:25                   ` Rajat Sharma
2011-12-29 12:32                     ` Gaurav Saxena
     [not found]                       ` <CALJfu6NrF2fjsWUi4gnV9X6AN3rcecL=6=j9ZZADaRGwz3mECw@mail.gmail.com>
2011-12-29 13:12                         ` Rajat Sharma
2011-12-29 14:03                           ` Gaurav Saxena
2011-12-29 14:32                             ` Gaurav Saxena
2012-01-20  7:38                           ` Gaurav Saxena
2011-12-29 14:01                         ` Gaurav Saxena
  -- 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='CAAYFAvpW0c6pQ9ub=OHi2UfWzR6sWA75FZTmn1QSbazngr1T_A@mail.gmail.com' \
    --to=fs.rajat@gmail.com \
    --cc=grvsaxena419@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.