From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64B20C04A6A for ; Thu, 10 Aug 2023 22:02:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231849AbjHJWCe (ORCPT ); Thu, 10 Aug 2023 18:02:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231857AbjHJWC2 (ORCPT ); Thu, 10 Aug 2023 18:02:28 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6602630FD; Thu, 10 Aug 2023 15:02:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=XO1Zfx6GJ1l9WlDeH8/kq6dTqURz53+JSUpY8BZBxfk=; b=U75vcdAdN/gfb0u0MhA6ycdiaa jZIjL+a3hRs2kdcWbxAI2giPZCbMyZ/M9HjEqfL+gS7WzPUw3VglE9lLJvgN71wXk40idsXIO2yME rkFOgb0Zw2w2w/3jU9WgU/2RQlywQNha/h6PIXiYGMpFR4n2yJ/54vYB/CMg1X0npZgk5Ul902E/Z hSnEAR2Trk3+hfMryv/Qyt7GJKdtmB1BSEf5b1nJzVWzuDztA+MApBNvnvpzQeN2GW67u+4w9xyqB aV9/bBbFDdeHd9X78PcxJIDdIrsJA3IUg/wmQAn3qBZx0tLXgaDSuw3HJDnvasPM7TyNlZilS19ps mvdiU4Pw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qUDiC-00EvmZ-1j; Thu, 10 Aug 2023 22:00:56 +0000 Date: Thu, 10 Aug 2023 23:00:55 +0100 From: Matthew Wilcox To: David Hildenbrand Cc: Suren Baghdasaryan , akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@suse.com, josef@toxicpanda.com, jack@suse.cz, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, michel@lespinasse.org, liam.howlett@oracle.com, jglisse@google.com, vbabka@suse.cz, minchan@google.com, dave@stgolabs.net, punit.agrawal@bytedance.com, lstoakes@gmail.com, hdanton@sina.com, apopple@nvidia.com, peterx@redhat.com, ying.huang@intel.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, viro@zeniv.linux.org.uk, brauner@kernel.org, pasha.tatashin@soleen.com, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v7 0/6] Per-VMA lock support for swap and userfaults Message-ID: References: <0ab6524a-6917-efe2-de69-f07fb5cdd9d2@redhat.com> <01e20a4a-35dc-b342-081f-0edaf8780f51@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01e20a4a-35dc-b342-081f-0edaf8780f51@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Aug 10, 2023 at 09:40:57AM +0200, David Hildenbrand wrote: > I won't lie: all of these locking checks are a bit hard to get and possibly > even harder to maintain. > > Maybe better mmap unlock sanity checks as spelled out above might help > improve part of the situation. > > > And maybe some comments regarding the placement might help as well ;) The placement was obvious; we can't call into drivers under the vma lock. Not until we've audited all of them. I haven't yet had the chance to figure out exactly what is being fixed with this patch ... give me a few minutes.