Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1540391ybc; Tue, 12 Nov 2019 23:54:10 -0800 (PST) X-Google-Smtp-Source: APXvYqx7TWH6jUHn2+pbWEAM6Do4SdH4pVFz0/tBAoAxfrdwRzMQ9Xvvtp62/wZjGn/08hB07Rq+ X-Received: by 2002:a05:6402:142c:: with SMTP id c12mr2102715edx.96.1573631650729; Tue, 12 Nov 2019 23:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573631650; cv=none; d=google.com; s=arc-20160816; b=iSMmWN2kxFzK9SyNVHIzzhKSIbl62CYhIar86/FbuOYwJ/qP/picZo8+oTfU50KifB bcEIsL0Von9RL6Gh2rBijAPIob6IXXeD0zJzVCL8IxBIZrgaRcAhZBjnyu2/Bh/XEVGN R7aWNGEjwZpEBZGtvdeV1i59iGdap34ykI3xqvxbwWUeQyVfuh3V+TjRiNrAKLSmpWvF 22z0TB3TGZxsooM5a+jPl9ltuy+8NnzObHEkZGPmE0ac/wxMKvJ2d9k4rMcFrlJLKiuY MzQndehGeJIbr+VOVo7CjE32aAKNNw5NO74HFCYQFUvJf9VtMpZor5qcsYm4N87/GPaM ZxfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tVV1it/H2YntIomL2ftLin3HIqpaskB0a2jHZ/oj0S8=; b=MtrtCTUvjGmBZIkf7YeYL0kr/Uu8jrOKI2V4ZXJAQf9mV86dzsS9sssQz9NYyr0klz hN/fQ1ObKc9HsnZjm5UA8/c4Dyg9aOI2BOHBXkLRaZiKrFQajjSYXW+JADsEuCiZaJ9+ VkwW+33fPAB2MPXPFAaPcpQIEMLJdxiu7Ctl+GKMTroLm8Vq6HWWLJ1yhiguEr5W8/MY wkV0pQ8NfpsJBaJk+Fj1HfOTeoDjiFQcTKZsE3QeEMYT5i3bMf7YFZ5BgS5VXIuqsUqb RCDRJc9Z2NM+WL/kTVOg+VIc/NNNf0Hl2GVijoixOmb5aHR0803RmcbUhcMmNDuMO2vT m7MQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cc20si770076edb.201.2019.11.12.23.53.39; Tue, 12 Nov 2019 23:54:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726994AbfKMHxE (ORCPT + 99 others); Wed, 13 Nov 2019 02:53:04 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:42506 "EHLO mout-p-201.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725976AbfKMHxD (ORCPT ); Wed, 13 Nov 2019 02:53:03 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 47CcKk24kPzQlBh; Wed, 13 Nov 2019 08:52:58 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id Bp_N38N4yiqo; Wed, 13 Nov 2019 08:52:50 +0100 (CET) Date: Wed, 13 Nov 2019 18:52:27 +1100 From: Aleksa Sarai To: Al Viro Cc: Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan , Ingo Molnar , Peter Zijlstra , Christian Brauner , Jann Horn , Linus Torvalds , Eric Biederman , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Kees Cook , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Rasmus Villemoes , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Christian Brauner , Aleksa Sarai , containers@lists.linux-foundation.org, linux-alpha@vger.kernel.org, linux-api@vger.kernel.org, libc-alpha@sourceware.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v15 6/9] namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution Message-ID: <20191113075227.lu5b5uvc2nuk76uk@yavin.dot.cyphar.com> References: <20191105090553.6350-1-cyphar@cyphar.com> <20191105090553.6350-7-cyphar@cyphar.com> <20191113020917.GC26530@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qprdfpbfkuvffdu5" Content-Disposition: inline In-Reply-To: <20191113020917.GC26530@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qprdfpbfkuvffdu5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-11-13, Al Viro wrote: > On Tue, Nov 05, 2019 at 08:05:50PM +1100, Aleksa Sarai wrote: >=20 > > One other possible alternative (which previous versions of this patch > > used) would be to check with path_is_under() if there was a racing > > rename or mount (after re-taking the relevant seqlocks). While this does > > work, it results in possible O(n*m) behaviour if there are many renames > > or mounts occuring *anywhere on the system*. >=20 > BTW, do you realize that open-by-fhandle (or working nfsd, for that matte= r) > will trigger arseloads of write_seqlock(&rename_lock) simply on d_splice_= alias() > bringing disconnected subtrees in contact with parent? I wasn't aware of that -- that makes path_is_under() even less viable. I'll reword it to be clearer that path_is_under() isn't a good idea and why we went with -EAGAIN over an in-kernel retry. --=20 Aleksa Sarai Senior Software Engineer (Containers) SUSE Linux GmbH --qprdfpbfkuvffdu5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQSxZm6dtfE8gxLLfYqdlLljIbnQEgUCXcu2OAAKCRCdlLljIbnQ EtqZAQCjNdiANKBF7WCOTHUeD48U+o/7WczR7I/1WTsCcSBp9gEA6HgEdHKRHmol +5Fvn3Eg1Tya83fWQgWoVLu8i6CUUwE= =voMa -----END PGP SIGNATURE----- --qprdfpbfkuvffdu5--