Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp145195ybz; Fri, 24 Apr 2020 13:20:30 -0700 (PDT) X-Google-Smtp-Source: APiQypLamWBddGDCHN8Dq9TlF5sO6EPcYlJRxpE/OWb0YwIMUQnYc6dCBf/P0T0s1wCAW6aRlneB X-Received: by 2002:a50:d1c6:: with SMTP id i6mr8676519edg.241.1587759630183; Fri, 24 Apr 2020 13:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587759630; cv=none; d=google.com; s=arc-20160816; b=gIDfxsDdPPDBOocd8yU831X+gYMemM7oF6Czrm0ulBV1+t7qke0tsjKOE5A6vn0eIF EBU447c1NYMWtxoFXkjlvSUvfjSVKow8tTdiPuNea2CrhYl7JRFnExTvoch5y0UJFpCk UgdxqdRjxqMzTyeQ78Lr6n5w8Tg+k+SaZs4oBE++y39sFn0cHClhpBcLJ+KDKEs/cYdL ECtNzUdoeKTWFFAWwxrxAc3IBQyhLPSXNuotkqUjvtbqBEnNPyfVEgy6A70iSScJDm/d aVExxF/2dNT/+w5zxUWpkJPYQUy1sk6hcfCUZhlw1qWWW/RubD2dtEDf2IaQ/nECeE5k +IXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=mijZ0deIMv+7N52HZ2/oeSJuKxO51O9zwfYwlf/bvUU=; b=WrkywF++Aq/jqeVHi2TKx+Anlzuoi4r6gGLEEp95SdmudttgK7bnQDmG/2kRveCV9d 58gZsNYX5MavSTOTxbLxKfMfszOwgmSAy621jboy+s8eF6HQSoxAQhvqEe6y4rJwcFav 02tvNXboifSPh456Q4LkvCCptlUFNRD3ghcUOu4BJkIZdy9AL3fUrVs/5BjGtIhI07yh wabcXuMvfg8A2c6/T/s4q8Mk7kQAy14FwD22a/MgJMNUnIKKx7pO+9FhlEoNe0ELv92j CDqEGVaohHCQHj66m6gSZtO+IT/+IjbFKc6JF+BUx1nNNathQxvNqHoCoitguxPUBA8C O2tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LM9epuze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si4052499edg.339.2020.04.24.13.20.06; Fri, 24 Apr 2020 13:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LM9epuze; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729610AbgDXUQD (ORCPT + 99 others); Fri, 24 Apr 2020 16:16:03 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:44785 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729596AbgDXUQC (ORCPT ); Fri, 24 Apr 2020 16:16:02 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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