dazuko-devel
[Top][All Lists]
Advanced

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

[Dazuko-devel] [PATCH] Use d_path if __d_path is not safe


From: Tikka, Sami
Subject: [Dazuko-devel] [PATCH] Use d_path if __d_path is not safe
Date: Mon, 7 Nov 2005 18:42:17 +0200

Hello!

As we discussed 2 months ago, dazuko could use d_path when running on an
Linux 2.6 SMP system and __d_path is not exported. I have now implemented
that change as you specified (behaviour changes only for Linux 2.6 SMP
chrooted processes). [see attached email]

I have uploaded the patch to Savannah:
https://savannah.nongnu.org/patch/index.php?func=detailitem&item_id=4602

I hope you find it to your liking and include it into Dazuko source.

-- 
Sami Tikka                tel. +358 9 2520 5115 
senior software engineer  fax. +358 9 2520 5014
                          mobile +358 40 7379388
F-Secure Corporation      http://www.f-secure.com
BE SURE
--- Begin Message --- Subject: Re: [Dazuko-devel] __d_path export and SMP safeness Date: Tue, 6 Sep 2005 16:45:47 +0200 User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050718 Debian/1.7.8-1sarge1
Tikka, Sami wrote:
> Dazuko could use the exported d_path. Then the filename the driver reports
> will be relative to the current root of the process that made the file
> access. But this is not a problem. The process which gets the dazuko events
> can easily check readlink /proc/PID/root and prepend that to the filename
in
> the event.
> 
> What do you think, John? Could you make dazuko use d_path on Linux?

Well, this would double the amount of user/kernel switches, which would be a
performance hit. It would also require that the /proc system is available.

But yes, this would work.

If I were to implement this for Linux 2.6 SMP (the only affected kernels),
then I would change Dazuko to send a filename without the beginning "/" for
files in chroot'd environments. This would signal the user application that
it needed to do a lookup for the full path. This would reduce the extra
overhead to *only* file accesses in a chroot environment.

With DazukoFS we won't have this problem because we won't need __d_path().
But we can use this hack until DazukoFS is available.

This hack would only be required for Linux 2.6 SMP kernels that do not
export __d_path().

John Ogness

-- 
Dazuko Maintainer

--- End Message ---

reply via email to

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