Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1292102ybc; Tue, 12 Nov 2019 18:12:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwDKU2T3K9KAKijx0J8gI2Nl+fyiWFmfoW+IJmtcGnc9aGLZYnZqG1dBNFT7zFpJCom9boZ X-Received: by 2002:a17:906:1e03:: with SMTP id g3mr453164ejj.331.1573611127983; Tue, 12 Nov 2019 18:12:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573611127; cv=none; d=google.com; s=arc-20160816; b=vnTdTJlfXBqEQhQVhkyHLkODRtY5Z92q9mbpke+wuvbVzUXqfJX55OQlJRX1RnBjeH V9/Z1s3FgIdPGBvv+NmgocPFeCiKWlPHK4W271rj0vpmyMicw8a3MqVYcU9GcCK+mKjE gGOnI2qX0DKdF946Ky+EEBSESviM61b0jIeQWEaTTeokgMfEEDSdRdrSSzIUiaJ5OrPE QYrhyYAVuvtkwIIAOwhm5dGdWdLNM8eMaQD5kztjcwT7jaeE5zkW0YCgeUsi4kLmRtXR /urQGfxfWi/TscoqbP4Q/oxNEOm/pZzj2+vgkOhJv8iTrj0GiRFtXBHel8TErfdkVBgS pTxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Sor1Og9Mzy6YTYxmVFrj6/IsKUr1nUxRjjYdRm2ydNs=; b=sUsIF6xYhLqe3qeyA40q1O+mNMwpYT9AI+h5y4KTqPmisI6WQrBwzLAeidiO5DffNE zp3erRxhZIZFhEeFIQywfUe49DopIArSjMjWn/V1/wZ/DEQ620Q7Y+xTG7ZA5iZa6tKm YljydlgReqDRT6i4kToflmD3yFa9I+bjxy/Ib6awhPGXyvj3LKPcxu6f/6MQfAD6hwol O+V8RdAgoKmeaG++AM6qaUzTsuaXulhye0QF+ywYmauzZoEBv+hWLC8z658HnFfKFELk BKaZd2eriy44kjyGEpw5icuJH7IqoT8UAeEGeLrtQipMlk0WMVI8wbutqspJGLM/kCO6 vyQg== 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 s40si308072edd.233.2019.11.12.18.11.43; Tue, 12 Nov 2019 18:12:07 -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 S1730901AbfKMCJw (ORCPT + 99 others); Tue, 12 Nov 2019 21:09:52 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:39438 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727468AbfKMCJt (ORCPT ); Tue, 12 Nov 2019 21:09:49 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUi5t-0008S0-DR; Wed, 13 Nov 2019 02:09:17 +0000 Date: Wed, 13 Nov 2019 02:09:17 +0000 From: Al Viro To: Aleksa Sarai 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: <20191113020917.GC26530@ZenIV.linux.org.uk> References: <20191105090553.6350-1-cyphar@cyphar.com> <20191105090553.6350-7-cyphar@cyphar.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191105090553.6350-7-cyphar@cyphar.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 05, 2019 at 08:05:50PM +1100, Aleksa Sarai wrote: > 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*. BTW, do you realize that open-by-fhandle (or working nfsd, for that matter) will trigger arseloads of write_seqlock(&rename_lock) simply on d_splice_alias() bringing disconnected subtrees in contact with parent?