Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp129168ybe; Wed, 4 Sep 2019 16:31:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPIU7csEF3lb6qsqVyFh+0jAaeG1YY1WGQaMRWm0X9kbM8HWzN2TrvSB20e/sH2d6XnkU0 X-Received: by 2002:a17:90a:af81:: with SMTP id w1mr706337pjq.143.1567639873223; Wed, 04 Sep 2019 16:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567639873; cv=none; d=google.com; s=arc-20160816; b=vfKrNlu8732ZM3Hj7DqKXvtWjdaGLkmloHTWPHw36fw9DYP2orHa5LaZ/uhJUu+oho TRjoNA95J2pf9dNlHv1bKiN/tG77weIKGh+PNnoKJl5EAecLOmUeCmAT13pDEzbY0HKj A2TiD8TH8SrEdMSV5YZh7PAHGy++yjj4oVIvty6pGWvZ1LZkri+8L6YwW0ULcn+QeYRF acW1Oc3FRVXNOas6FMI4AJ4aALahq5dDvjd6ZTzCDmECqpaoHCSvi7RIG4IJALttw9im jk9CXy86/2XoHseYYUdBABmuuWIx/4WxDh3X7aYItiUhgkmbz8WAgO0bZ3Q8LZ3TN7AX t34g== 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=zjeEEh3zzIM3ZWOq/ZSQKoqGD32zlxbyGTphi6GXR1w=; b=g2eV4eSiXxgrThtGCVe7MRtOcZ9aUVLmdJl2ftQG+uiGlo99WFOwUhz8a3NqmPmzp9 FqMo4Txi/rPrdcUv8d7OH5qCZPPSRFWwvNRt33+Fz/PrZT/KWbR30gjouEBY79qpDnLl ev5D21Mti/FkSXUYviLeJS2yecirw0iHx2pXKkzA7kS6L4sZzZ2zpPSshuARUONOX42a k0S0eEaNqLGTueeNizyWEKYWCtyFAYsD7Vrm6b61W903Lk5cKUZylgxsLs4MryCToxjj xgnqTzkLt3dUqQ8t9xLZ6uoNE5H6MtrlJu9nnuQSvHRxAosLrS7uTmUYPVvGRWA7n8uG 9Kzw== 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 u126si145314pgb.400.2019.09.04.16.30.56; Wed, 04 Sep 2019 16:31:13 -0700 (PDT) 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 S1730496AbfIDXaG (ORCPT + 99 others); Wed, 4 Sep 2019 19:30:06 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54178 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727156AbfIDXaF (ORCPT ); Wed, 4 Sep 2019 19:30:05 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.1 #3 (Red Hat Linux)) id 1i5ei7-0005kV-RM; Wed, 04 Sep 2019 23:29:12 +0000 Date: Thu, 5 Sep 2019 00:29:11 +0100 From: Al Viro To: Linus Torvalds Cc: David Howells , Aleksa Sarai , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , Shuah Khan , Shuah Khan , Ingo Molnar , Peter Zijlstra , Christian Brauner , Jann Horn , Kees Cook , Eric Biederman , Andy Lutomirski , Andrew Morton , Alexei Starovoitov , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Rasmus Villemoes , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Aleksa Sarai , Linux Containers , alpha , Linux API , linux-arch , Linux ARM , linux-fsdevel , linux-ia64@vger.kernel.org, Linux List Kernel Mailing , "open list:KERNEL SELFTEST FRAMEWORK" , linux-m68k , linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390 , Linux-sh list , linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v12 10/12] namei: aggressively check for nd->root escape on ".." resolution Message-ID: <20190904232911.GN1131@ZenIV.linux.org.uk> References: <20190904201933.10736-1-cyphar@cyphar.com> <20190904201933.10736-11-cyphar@cyphar.com> <20190904214856.vnvom7h5xontvngq@yavin.dot.cyphar.com> <20592.1567636276@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 03:38:20PM -0700, Linus Torvalds wrote: > On Wed, Sep 4, 2019 at 3:31 PM David Howells wrote: > > > > It ought to be reasonably easy to make them per-sb at least, I think. We > > don't allow cross-super rename, right? > > Right now the sequence count handling very much depends on it being a > global entity on the reader side, at least. > > And while the rename sequence count could (and probably should) be > per-sb, the same is very much not true of the mount one. Huh? That will cost us having to have a per-superblock dentry hash table; recall that lockless lockup can give false negatives if something gets moved from chain to chain, and rename_lock is first and foremost used to catch those and retry. If we split it on per-superblock basis, we can't have dentries from different superblocks in the same chain anymore...