Linux filesystem development
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Mickaël Salaün" <mic@digikod.net>
Cc: Linux-Fsdevel <linux-fsdevel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: procfs/d_invalidate break userland
Date: Thu, 23 Apr 2015 00:51:35 +0100	[thread overview]
Message-ID: <20150422235135.GY889@ZenIV.linux.org.uk> (raw)
In-Reply-To: <5538318E.6000405@digikod.net>

On Thu, Apr 23, 2015 at 01:41:02AM +0200, Mickaël Salaün wrote:
> Hi,
> 
> For your information, the commit bbd5192412fdedbae00888316bfe350bf89d0458 (proc: Update proc_flush_task_mnt to use d_invalidate), in the v3.17, break some userland use of procfs.
> 
> In a user namespace, I'm using /proc/<pid>/task/<tid>/fdinfo to mount a tmpfs, chdir into it, terminate the <tid> thread, and use the tmpfs as a private working directory for PID 1. This trick is useful to disconnect/d_drop a directory from the current file system and make it inaccessible to the other processes (kind of an O_TMPFILE for directory).
> 
> With the v3.17 this is no more possible because it's no more possible to mount anything in this tmpfs nor use the previously mounted file systems in this tmpfs.
> 
> The new d_invalidate is really good to lazily invalidate/umount an entire hierarchy but I'm not sure the intention was to remove this useful "feature" ;)

And what will happen if you mount stuff there and exit?  Dirty filesystem
after reboot?
--
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:[~2015-04-22 23:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 23:41 procfs/d_invalidate break userland Mickaël Salaün
2015-04-22 23:51 ` Al Viro [this message]
2015-04-23  7:00   ` Mickaël Salaün

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=20150422235135.GY889@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=miklos@szeredi.hu \
    /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