From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman)
To: "Denis V. Lunev" <den-3ImXcnM4P+0@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
marcus-sJr3legBufCzQB+pC5nmwQ@public.gmane.org,
containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
"Denis V. Lunev" <den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH] proc: Do not invalidate dentries with submounts
Date: Thu, 06 Dec 2007 09:05:02 -0700 [thread overview]
Message-ID: <m17ijru7v5.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <4757CF70.3020508-3ImXcnM4P+0@public.gmane.org> (Denis V. Lunev's message of "Thu, 06 Dec 2007 13:31:12 +0300")
"Denis V. Lunev" <den-3ImXcnM4P+0@public.gmane.org> writes:
> you have changed the behavior of revalidation by shadows. I think it
> will be better to restore it and keep new one for shadows (and below)
> only, which has been done by my yesterday patch.
- I think it is better to move forward rather then back.
- The old proc dentry caching behavior is actually too aggressive, and has
problem corner cases. Keeping the dentries when we have something mounted
on top is a trade off that is the least of two evils.
- My change fixes the mount leak on all of /proc not just on /proc/generic.
What you did is a hack that restored the old slightly buggy behavior. Which
is fine if we can't find anything better. It is not code that is on the
path towards a /proc that properly caches it's dentries.
With the old behavior a random user space application can open a file or
a directory in /proc pinning it's dcache entry. Then the module supplying
that open file can be removed and reinserted. Until the user space application
removes reference to that /proc file all you will be able to find is the
version of the file from before /proc was removed.
That sounds like a way to trigger nasty behavior to me. I would like
to remove that possibility from the kernel if I can.
Eric
prev parent reply other threads:[~2007-12-06 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-05 14:35 [PATCH] lost content of /proc/sys/fs/binfmt_misc Denis V. Lunev
2007-12-06 10:17 ` Eric W. Biederman
2007-12-06 10:22 ` [PATCH] proc: Do not invalidate dentries with submounts Eric W. Biederman
2007-12-06 10:31 ` Denis V. Lunev
[not found] ` <4757CF70.3020508-3ImXcnM4P+0@public.gmane.org>
2007-12-06 16:05 ` Eric W. Biederman [this message]
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=m17ijru7v5.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm-as9lmozglivwk0htik3j/w@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=den-3ImXcnM4P+0@public.gmane.org \
--cc=den-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=marcus-sJr3legBufCzQB+pC5nmwQ@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox