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 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E8C8C55186 for ; Fri, 24 Apr 2020 20:16:03 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E51FE214AF for ; Fri, 24 Apr 2020 20:16:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LM9epuze" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E51FE214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 667BA8E0006; Fri, 24 Apr 2020 16:16:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 617478E0003; Fri, 24 Apr 2020 16:16:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 506C88E0006; Fri, 24 Apr 2020 16:16:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0182.hostedemail.com [216.40.44.182]) by kanga.kvack.org (Postfix) with ESMTP id 2EAEC8E0003 for ; Fri, 24 Apr 2020 16:16:02 -0400 (EDT) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id CA520181AC9BF for ; Fri, 24 Apr 2020 20:16:01 +0000 (UTC) X-FDA: 76743854922.12.plot16_34971c76ad933 X-HE-Tag: plot16_34971c76ad933 X-Filterd-Recvd-Size: 4710 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Fri, 24 Apr 2020 20:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587759360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mijZ0deIMv+7N52HZ2/oeSJuKxO51O9zwfYwlf/bvUU=; b=LM9epuzexSiF2slJwrZ5gfMuU0H/glRthazJd0nGhYhaIgZIsPEPea2A4fTf80io5qe1Gi 7zVlsZRm7Wqx9pGqCvOOLu6/1gTqDP3EO6c7lE2zBW95myXZhei/ju8dLwGGq4DHKQIhx/ drkGRjmMEmmsu7tpXp/lQ5hzrI5SCB8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-342-D4Qq4ngMOX6rlbMg-FH6uw-1; Fri, 24 Apr 2020 16:15:56 -0400 X-MC-Unique: D4Qq4ngMOX6rlbMg-FH6uw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A496D107BEFE; Fri, 24 Apr 2020 20:15:53 +0000 (UTC) Received: from w520.home (ovpn-112-162.phx2.redhat.com [10.3.112.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id C2F531002380; Fri, 24 Apr 2020 20:15:51 +0000 (UTC) Date: Fri, 24 Apr 2020 14:15:48 -0600 From: Alex Williamson To: John Hubbard Cc: LKML , Andrew Morton , Al Viro , Christoph Hellwig , "Dan Williams" , Dave Chinner , "Ira Weiny" , Jan Kara , Jason Gunthorpe , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWU=?= Glisse , "Kirill A . Shutemov" , Michal Hocko , Mike Kravetz , Shuah Khan , Vlastimil Babka , Matthew Wilcox , , , , , , "Kirill A . Shutemov" Subject: Re: [regression] Re: [PATCH v6 06/12] mm/gup: track FOLL_PIN pages Message-ID: <20200424141548.5afdd2bb@w520.home> In-Reply-To: <5b901542-d949-8d7e-89c7-f8d5ee20f6e9@nvidia.com> References: <20200211001536.1027652-1-jhubbard@nvidia.com> <20200211001536.1027652-7-jhubbard@nvidia.com> <20200424121846.5ee2685f@w520.home> <5b901542-d949-8d7e-89c7-f8d5ee20f6e9@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 24 Apr 2020 12:20:03 -0700 John Hubbard wrote: > On 2020-04-24 11:18, Alex Williamson wrote: > ... > > Hi John, > > > > I'm seeing a regression bisected back to this commit (3faa52c03f44 > > mm/gup: track FOLL_PIN pages). I've attached some vfio-pci test code > > that reproduces this by mmap'ing a page of MMIO space of a device and > > then tries to map that through the IOMMU, so this should be attempting > > a gup/pin of a PFNMAP page. Previously this failed gracefully (-EFAULT), > > but now results in: > > > Hi Alex, > > Thanks for this report, and especially for source code to test it, > seeing as how I can't immediately spot the problem just from the crash > data so far. I'll get set up and attempt a repro. > > Actually this looks like it should be relatively easier than the usual > sort of "oops, we leaked a pin_user_pages() or unpin_user_pages() call, > good luck finding which one" report that I fear the most. :) This one > looks more like a crash that happens directly, when calling into the > pin_user_pages_remote() code. Which should be a lot easier to solve... > > btw, if you are set up for it, it would be nice to know what source file > and line number corresponds to the RIP (get_pfnblock_flags_mask+0x22) > below. But if not, no problem, because I've likely got to do the repro > in any case. Hey John, TBH I'm feeling a lot less confident about this bisect. This was readily reproducible to me on a clean tree a bit ago, but now it eludes me. Let me go back and figure out what's going on before you spend any more time on it. Thanks, Alex