Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp2268121rwb; Sun, 15 Jan 2023 12:08:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXsAqE3XTGiJfCsESlBgmwnEI7Er33k3r3yyCo3pWpYU9rUhVu3fwDnakbzBCbtpwuWdqBPs X-Received: by 2002:a17:907:6026:b0:84d:445b:8aa6 with SMTP id fs38-20020a170907602600b0084d445b8aa6mr19997493ejc.70.1673813328532; Sun, 15 Jan 2023 12:08:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673813328; cv=none; d=google.com; s=arc-20160816; b=CdoF0wJYcOimL1jKvSI0mY+WnbYnq8ujWiD+1cLb6JEbFAkIhX17j1N7sTlMatZisu GnySFm1dRS00i8OdAbpATwBqbvR7DuGJH0QOBLwBpD2kPQ2ycUNO+UhXb6vmZaHnYrAt KAszSDXQ1WCqMEkDwfyPFxasL4kswzcHwiWRiPzYF9/oGZTi3R4OoQUDycqoZLfM62P4 RT0+9dzlX7Wz9sOAHJu778JlX3spnoVfWYig+rbk0X1jE8ano6T6TBpJYt88OwUPhc0Y LCJyLYUIGE5a4uirVdiB594R9lsWU05Jdo880oAEnCDEIb8+W8JNr0Kfvh0uRQ/6PIop JG6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=vs0/04K1GIos3EULc9wcvjYIMqUKIQ9jTNF2u67vRqc=; b=HsThWXDwpaLxZglni+n1KCJShRdKWMXK/LgVtu9UkWGw3pZBrwg6DeoUxMaG1Vwwib fTOPSHI6mxmWJQ542WPBgdnIFMMPzSyAzjrUNYtRtjLC8FJXWbfONr+hJc7CjwVXw/Bj g0CwkKw3nYbgbcTWPEwppPbJUWiGaVym7HCXFwlnc1NaSTAV5KVVEaMilku/OzNqQOt8 g4Z5JIZjZTY2C1sIdu21SLGV24fTq9SaA1L0U5sOrK/jk9owQWAxi2JgWmXqN9n3QQ06 o2S3t0KDJWUFSXD0wxLGM4Jrz3dskAHo1hD0KL8LHpqjmoFGI5Lxv3REAXlE4GZnNhZ1 cwRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm1 header.b=KIkUMx5n; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=jxXle1w6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hz5-20020a1709072ce500b007bc30c06aa2si29122935ejc.902.2023.01.15.12.08.33; Sun, 15 Jan 2023 12:08:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov.name header.s=fm1 header.b=KIkUMx5n; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=jxXle1w6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbjAOTHI (ORCPT + 52 others); Sun, 15 Jan 2023 14:07:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231213AbjAOTHF (ORCPT ); Sun, 15 Jan 2023 14:07:05 -0500 Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD6223A8D for ; Sun, 15 Jan 2023 11:07:03 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id C33D632008FF; Sun, 15 Jan 2023 14:07:00 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 15 Jan 2023 14:07:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1673809620; x=1673896020; bh=vs 0/04K1GIos3EULc9wcvjYIMqUKIQ9jTNF2u67vRqc=; b=KIkUMx5nLlUKpDJhC6 +lhg0WierY3fIs1gAvNbRzY/0BNYGiR151XpaM1usQNjRaRr/s2iNCTST7Dduw9G oNrL9zztciY4PMeXma1IuhfQd0MsnivFtI4TTQS8ZPwUJ/50R8r8t9VZwTXhkfiW G9U41x6Dpt9cOriISUjpP/Qcqu1HummU8KcDUfRFMN16ZCmzkhcvh+lwlvSbcz1u HIM+uYzDrn48VF0Hy7E8h97YV+0hBpK5l+tZEJVJ2oAivM0hblG2ewfjrRDVSxqI wf77Mva9C27/nE8M1qH55vV+Y+y8xs4rrxbxJcBeQH8o/Rin5Gwm4I9bKAlpDnkH jFyg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1673809620; x=1673896020; bh=vs0/04K1GIos3EULc9wcvjYIMqUK IQ9jTNF2u67vRqc=; b=jxXle1w6tDVLVVtZUsl47klynlSdhnEwIHy9LAW6zGtT 1xEbJ+j+cZHlcrvdyAiiRJpDY8o9jhMqCuHfn7dgXzbUwbFI9PTymN2qP4ySGa9u cw5xCdVpfZqczjjKzlw9fEbZ9foAtyRO0MI7iXsKUdfu28e77Le2W+at6oNIw35Y ZL5wCWxdvRMzKTcaLwaM1RVi3ZbxXM8aCBAd8SLCZs1MEYS++q2Wm9MgXqrYcugv mdSDHVyevE7PrWi2775h3ZoI8bdF6WLeGDegKqEd62ArYk/clr6nLatmw+s8ynSU 66Od2/zxrY9Pui30ASw4XaUI8vJggAcPvq2ybSB8Wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddtvddguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehttddttddttddvnecuhfhrohhmpedfmfhi rhhilhhlucetrdcuufhhuhhtvghmohhvfdcuoehkihhrihhllhesshhhuhhtvghmohhvrd hnrghmvgeqnecuggftrfgrthhtvghrnhephfeigefhtdefhedtfedthefghedutddvueeh tedttdehjeeukeejgeeuiedvkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomhepkhhirhhilhhlsehshhhuthgvmhhovhdrnhgrmhgv X-ME-Proxy: Feedback-ID: ie3994620:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Jan 2023 14:06:59 -0500 (EST) Received: by box.shutemov.name (Postfix, from userid 1000) id 04B5B102D59; Sun, 15 Jan 2023 22:06:55 +0300 (+03) Date: Sun, 15 Jan 2023 22:06:54 +0300 From: "Kirill A. Shutemov" To: Jann Horn Cc: Andrew Morton , linux-mm@kvack.org, "Kirill A. Shutemov" , Zach O'Keefe , linux-kernel@vger.kernel.org, David Hildenbrand , Yang Shi Subject: Re: [PATCH] mm/khugepaged: Fix ->anon_vma race Message-ID: <20230115190654.mehtlyz2rxtg34sl@box.shutemov.name> References: <20230111133351.807024-1-jannh@google.com> <20230112085649.gvriasb2t5xwmxkm@box.shutemov.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 13, 2023 at 08:28:59PM +0100, Jann Horn wrote: > No, that lockdep assert has to be there. Page table traversal is > allowed under any one of the mmap lock, the anon_vma lock (if the VMA > is associated with an anon_vma), and the mapping lock (if the VMA is > associated with a mapping); and so to be able to remove page tables, > we must hold all three of them. Okay, that's fair. I agree with the patch now. Maybe adjust the commit message a bit? Anyway: Acked-by: Kirill A. Shutemov BTW, I've noticied that you recently added tlb_remove_table_sync_one(). I'm not sure why it is needed. Why IPI in pmdp_collapse_flush() in not good enough to serialize against GUP fast? -- Kiryl Shutsemau / Kirill A. Shutemov