Linux-Fsdevel Archive on lore.kernel.org
 help / color / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Aleksa Sarai <cyphar@cyphar.com>
Cc: Florian Weimer <fw@deneb.enyo.de>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-xfs@vger.kernel.org, libc-alpha@sourceware.org,
	linux-fsdevel@vger.kernel.org, Rich Felker <dalias@libc.org>
Subject: Re: XFS reports lchmod failure, but changes file system contents
Date: Fri, 21 Feb 2020 05:02:05 +0000
Message-ID: <20200221050205.GW23230@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20200221040919.zmsayko3fnbdbmib@yavin.dot.cyphar.com>

On Fri, Feb 21, 2020 at 03:09:19PM +1100, Aleksa Sarai wrote:

>  * open(/proc/self/fd/$n) failing with ELOOP might actually be a bug
>    (the error is coming from may_open as though the lookup was done with
>    O_NOFOLLOW) -- the nd_jump_link() jump takes the namei lookup to a
>    the symlink but it looks like the normal link_path_walk et al
>    handling doesn't actually try to continue resolving it. I'll look
>    into this a bit more.

Not a bug.  Neither mount nor symlink traversal applies to destinations
of pure jumps (be it a symlink to "/" or a procfs symlink).  Both are
deliberate and both for very good reasons.  We'd discussed that last
year (and I'm going to cover that on LSF); basically, there's no
good semantics for symlink traversal in such situation.

Again, this is absolutely deliberate.  And for sanity sake, don't bother
with link_path_walk() et.al. state in mainline - see #work.namei or
#work.do_last in vfs.git; I'm going to repost that series tonight or
tomorrow.  The logics is easier to follow there.

  reply index

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-12 11:48 Florian Weimer
2020-02-12 12:15 ` Florian Weimer
2020-02-12 16:16 ` Darrick J. Wong
2020-02-12 18:11   ` Christoph Hellwig
2020-02-12 18:37     ` Darrick J. Wong
2020-02-12 19:15       ` Florian Weimer
2020-02-12 19:51         ` Al Viro
2020-02-12 19:55           ` Rich Felker
2020-02-12 20:01           ` Florian Weimer
2020-02-12 20:17             ` Andreas Schwab
2020-02-12 20:19               ` Rich Felker
2020-02-12 20:26                 ` Florian Weimer
2020-02-12 20:38                   ` Rich Felker
2020-02-12 20:27                 ` Al Viro
2020-02-12 20:36                   ` Rich Felker
2020-02-12 20:18             ` Rich Felker
2020-02-12 20:38             ` Paul Eggert
2020-02-21  4:09             ` Aleksa Sarai
2020-02-21  5:02               ` Al Viro [this message]
2020-02-21  5:21                 ` Aleksa Sarai
2020-02-12 18:50     ` Florian Weimer
2020-02-12 18:55       ` Christoph Hellwig

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=20200221050205.GW23230@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=cyphar@cyphar.com \
    --cc=dalias@libc.org \
    --cc=darrick.wong@oracle.com \
    --cc=fw@deneb.enyo.de \
    --cc=hch@infradead.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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

Linux-Fsdevel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-fsdevel/0 linux-fsdevel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-fsdevel linux-fsdevel/ https://lore.kernel.org/linux-fsdevel \
		linux-fsdevel@vger.kernel.org
	public-inbox-index linux-fsdevel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-fsdevel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git