dazuko-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dazuko-help] Twice call for dazukofs_release


From: John Ogness
Subject: Re: [Dazuko-help] Twice call for dazukofs_release
Date: Fri, 22 Oct 2010 16:37:11 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

On 2010-10-22, Nil Nik <address@hidden> wrote:
>> If you want to track closes, you will probably want to add a new
>> DazukoFS command to close the file descriptor. This will allow
>> DazukoFS to again place the registered process on the "mask list",
>> close the file descriptor, and then remove the process from the
>> "mask list". It is important that a process is not on the "mask
>> list" while in userspace.
>
> Can you elaborate 'new DazukoFS command to close the file
> descriptor'?  How can i do this?

Actually, now that I've looked at the libdazukofs code again, you
wouldn't need to add a new DazukoFS command.

Right now libdazukofs (userspace) closes the file descriptor that was
opened by DazukoFS. You can see that in:

    dazukofs.c:dazukofs_return_access()

It does this just before writing to the DazukoFS group device (to
report the access response).

Rather than libdazukofs closing the file descriptor, you could have
DazukoFS do it, for example in:

    event.c:dazukofs_return_event()

The closing of the file descriptor would need to be wrapped with
mask/unmask calls to make sure the closing does not trigger another
CLOSE event. It would look something like this:

    mask_proc(&proc);
    sys_close(fd);
    if (proc.within_list)
        check_recursion();

(This is the same thing that is done to wrap dentry_open() to protect
against recursive OPEN events.)

John Ogness

-- 
Dazuko Maintainer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]