Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp59337lqt; Wed, 5 Jun 2024 17:21:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDB2rb7E4tkANIb4QwcfY0N16F8H0IiN1UAn9uEgzpF5fYa7NiyCudVTYgP+eKcbGbwYv83uwySrowDmNHIQ1vHXPF0YGqMgManEIaQw== X-Google-Smtp-Source: AGHT+IGZgy/HJ0B0yCPhK5Tb6b2RKqtbr6NMaU/Zl/BKwEofmgvUm0u+GNXwUMpdxR4P/gkOs0ZR X-Received: by 2002:a05:620a:4587:b0:78f:182:5e20 with SMTP id af79cd13be357-79523d24b89mr541396085a.7.1717633265352; Wed, 05 Jun 2024 17:21:05 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038a6ee8bsi3404991cf.11.2024.06.05.17.21.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 17:21:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=eJ3EzT52; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-203445-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203445-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 055801C21F1A for ; Thu, 6 Jun 2024 00:21:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C123748F; Thu, 6 Jun 2024 00:20:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eJ3EzT52" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 776B31C2E for ; Thu, 6 Jun 2024 00:20:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.18 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717633254; cv=fail; b=QF05MoBWVqoUlNtuJPdyVIowkuDcBQreWT0cRcmXTEsfpS9tNLoyVL/HGen2iaZjYqwCgGa6+ieMtK2HMHXQKHR+9uS2OcJwAwVRtclPsPTHArRS8OLLq44avlq8akTnv34xf5i6/83NGsFyeRhtVUjbTKvWZMbnCrExYPQFmfY= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717633254; c=relaxed/simple; bh=CGKze3ZmLD05pXGLnhHQ8tfMs2eHqgO49quc9ArOSBM=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=QYuCwTEHvguTjEKiQKutZPRtxGi6uer48Zc9OnzAYCy9NpjPfP6xTLYvHJ7tOGudWlMfGyIUV3A9EvhAu9eAnGdzxg/eAXcWk+OmLmk7QJG5JnoqbzJzXfJUj6aBohtnvzCg+Ir74qMRta5fQcB/LN6B4lbRqX6rLINDML/VVj0= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=eJ3EzT52; arc=fail smtp.client-ip=198.175.65.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717633252; x=1749169252; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=CGKze3ZmLD05pXGLnhHQ8tfMs2eHqgO49quc9ArOSBM=; b=eJ3EzT52R23asMcW0zEeAVg/AT1TFGd6H6YRDOKmoKGJ04Bug8rxgHsT KH1hE4nWI8T/Ed0O2dAZYeDNwuNvre0kG+kDxkFod3ET4vFObH/jQv20t kCCT60fAO6Lm3mFbofjJ40HorwDn5tPMAy7GAG1Un4138vRBeJL2E/25f Kd+k+uW1tCLl9MQtPkVmA3NQOHj4Lk5uCy0aUYwOJy+RPhLW5GUa+yDZE 8NyVmxmYpeB0uVhn8BxUgRPCt/ZF4oStWw3eyKvUBY/eFGCaLp3lXWuyo LcLiUzffBP2sjNtL46xBfC1LIzKsebxRJ2wslrGiruFZffUgC+sGF0aTc w==; X-CSE-ConnectionGUID: eDxRmrUQSBy44flYtGcMhg== X-CSE-MsgGUID: yZfZkA2rQiiKsl0mFGbNjw== X-IronPort-AV: E=McAfee;i="6600,9927,11094"; a="14431019" X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="14431019" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2024 17:20:51 -0700 X-CSE-ConnectionGUID: +xKtQe68SeSebp6FtOF70w== X-CSE-MsgGUID: o1J8bXmDT+KSf5qk7F8r/g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,218,1712646000"; d="scan'208";a="42230620" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 05 Jun 2024 17:20:47 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 5 Jun 2024 17:20:47 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 5 Jun 2024 17:20:46 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.168) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 5 Jun 2024 17:20:46 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bsgdnxFOApi/0L45zRlsX+Ko85+tRPfoM+N58XEXvIl8+ttjptfc/3ZDxAw/a5djusMljBt4e5uz4MRNZK2Qaf++ZkdGAwhkuVArscjkGeLZ+EWr9fSpIkE2p7Fo7JTtCmPYImKp+faiIzVZVxziO+2o3R68LklP7BJA6bJf3peREPMfy7tBstEK40ne24RihcAl+AA5iXXkXg4UkoPYJHEuyCmlvYhKLvk/XS0v4yGONxfdhZTXt06mbFF4oHwGKab4svaGSMo51kcisJA0AOThv3XG9krvgcvD0QNo++azM8AVentuIsdj3JNF5JANgDreIY8x+x1obnl+8HFqng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1IkPspuxYoXXX9i+BWa4baHLgX0wdisAe1Qqqt2gz6o=; b=hyvQcpgSNcRDJX8o++2WHxjdaithSz89nkmf12O0CWHCwXsn8Eh5Dm5o/c4HdmHrXl5erHlQKWi+MHsbNu4YMdLH0ChKdHxHl2P5I8Rxwaf4jbHyIVzSWbwRGMw4pWLtGnhS47bSNPSBiAGcc0KX0iOPrus1s1PQR/J9lYbFPvQRFVkm/l3r6l4mGOE0/74lzVfRfbmuK1PVj3fN/ttQTeFUXAQUkKGL9tlUfYZ07Fv3JdIQTMIq+NWn2UVRB2AElAqdTAQtQo9OhWKGFN9cfL8caY/2JrYb6g3mVXLvl+hpht3SarS9/YgOzPGtOV/hEU45ne4BnzANe0dES9CFpA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) by PH0PR11MB4871.namprd11.prod.outlook.com (2603:10b6:510:30::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.27; Thu, 6 Jun 2024 00:20:38 +0000 Received: from PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8]) by PH8PR11MB8107.namprd11.prod.outlook.com ([fe80::6b05:74cf:a304:ecd8%6]) with mapi id 15.20.7633.021; Thu, 6 Jun 2024 00:20:37 +0000 Date: Wed, 5 Jun 2024 17:20:35 -0700 From: Dan Williams To: Pasha Tatashin , Peter Xu CC: , , Andrew Morton , Dan Williams Subject: Re: [PATCH] mm/page_table_check: Fix crash on ZONE_DEVICE Message-ID: <666100d39dee4_2d412294b3@dwillia2-mobl3.amr.corp.intel.com.notmuch> References: <20240605212146.994486-1-peterx@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: MW2PR16CA0001.namprd16.prod.outlook.com (2603:10b6:907::14) To PH8PR11MB8107.namprd11.prod.outlook.com (2603:10b6:510:256::6) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH8PR11MB8107:EE_|PH0PR11MB4871:EE_ X-MS-Office365-Filtering-Correlation-Id: f273ebe1-28d4-439f-2744-08dc85be7d9f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?utf-8?B?VEVvakFONWpod01lVloxSUxjSWVTRFRxMUFlOXA3cmZtcXlTYUZZdG5WZXo0?= =?utf-8?B?UG5hNGt5Mi9PQ3J6R3ZrYlNmU2dkQ3gvM2ZNeUJPSlFuT2FmMUU4bDhpaWJX?= =?utf-8?B?TnpiWktqd1ZCTDgwTUYxMnVTcWQ5R2dVcFdiV1BPUy9wc3J0TE1Mb2lTL2Jt?= =?utf-8?B?YjFyQ3RhZDN0MUVwaXU3cW5vb1VaSllqaUpUamEwTHp4V1NSaEcrMldISDRC?= =?utf-8?B?MG5XRUJJalIzbjJmc0dMUmNOVUljdmQvYno2Y1NMMGdqa0YvZi93UWNKN1dC?= =?utf-8?B?dFJjTmkrc2RSNHdyalJicTdpTmI5aHVuZTFjM3F2WHh6SmNXek0yanZqYWw1?= =?utf-8?B?UXM4Q1VBTUI4K2NiR3lXeXFYR3p4aDlCWWJBK3ZFSnA0b2ZON0laQ0xMZHMw?= =?utf-8?B?MzZ2aUMvRGZFeURHaE43UE1LYStOeUJrekVVNklRNjl3bS9mbHB2dXBpeW9q?= =?utf-8?B?RzJNUXZpb0ZIc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rSTRRcnBX?= =?utf-8?B?NmN0clhOQnhqUUkwL3htRGt4dTFDdE42a05LUUxpbEdTYmdaR0YvRkhnemJh?= =?utf-8?B?ZlBYYW9UZUtLQjZoV2FtR0kvbWZwNTQyRTFtZlpTSksyNTNQL21qWFpyMXgx?= =?utf-8?B?TVlnenNsTjRxOGFlWUVqejdFSFdheEF1Q0tEZUtXR1VBT282RHNVYnRFb1Ny?= =?utf-8?B?ZGdaZzVKM2pKSFRZamg1RkFyNk5DeDFaQ2N1ZXAzN0JVWFNmY1BtUWN6OUFI?= =?utf-8?B?VjA1akFoZS9KN2U1d2JLaDZUNTc1ZGN5VnV4S0w2MjdsRUFOb2pwUlZQTkxq?= =?utf-8?B?TU1NRDdVbEZITFlITTBraGZLRG5UYUticDJZOUVxZjZ1NTVQejRtWlFnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH8PR11MB8107.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OEZveDRGb0JSKzRNUlM2b0FrK216WmxjNTVBcmo4WEpQN2ZiTENBVlBWa0JT?= =?utf-8?B?SDBxWmJ1L2hZdkxsM3VJeDIzMUhHSjh4TFROdWJOU2J6REpBNkNxTDZjRHFC?= =?utf-8?B?cHN3SGdaN24yWUpWR0djUkIyTGVLWUI0NjNGbGtEbUZOR1F0OTYyZGk1S0Zw?= =?utf-8?B?RzdEMG9Dd25aL2lVMnMzc2JKK0hUaXpGNlQyUmdRT0VyL2RlWVhhMGM3NU0y?= =?utf-8?B?YjdjRnZIaFgyZ3p2SFMzM211Y3hlK1BTL2IvTlowOTNDQmQ2d3ZxNjVHd2JQ?= =?utf-8?B?N2tMVXdVVCtiT1JOOHlNY2FJQzlVdVRCVXJZL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0dIZzdF?= =?utf-8?B?Rk1SbU1iWU12VUJiVEtuYzZsR1h3b1RqdTZPVWxNWmkxQ3BVVVVseWNhSkJQ?= =?utf-8?B?V3c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: f273ebe1-28d4-439f-2744-08dc85be7d9f X-MS-Exchange-CrossTenant-AuthSource: PH8PR11MB8107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2024 00:20:37.8445 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yWTyAjwzumih9Mjc0LqEMhHFpMrqLTQmczslN6C2ds8Q90IkQpLrNNCkbe/7hd+mokk1bdqOGkAZNStxqnc4xJT5H+tFTCgYMahu+QEh2rQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4871 X-OriginatorOrg: intel.com Pasha Tatashin wrote: > On Wed, Jun 5, 2024 at 5:21 PM Peter Xu wrote: > > > > Not all pages may apply to pgtable check. One example is ZONE_DEVICE > > pages: they map PFNs directly, and they don't allocate page_ext at all even > > if there's struct page around. One may reference devm_memremap_pages(). > > > > When both ZONE_DEVICE and page-table-check enabled, then try to map some > > dax memories, one can trigger kernel bug constantly now when the kernel was > > trying to inject some pfn maps on the dax device: > > > > kernel BUG at mm/page_table_check.c:55! > > > > While it's pretty legal to use set_pxx_at() for ZONE_DEVICE pages for page > > fault resolutions, skip all the checks if page_ext doesn't even exist in > > pgtable checker, which applies to ZONE_DEVICE but maybe more. > > Thank you for reporting this bug. A few comments below: > > > > > Cc: Dan Williams > > Cc: Pasha Tatashin > > Signed-off-by: Peter Xu > > --- > > mm/page_table_check.c | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/mm/page_table_check.c b/mm/page_table_check.c > > index 4169576bed72..509c6ef8de40 100644 > > --- a/mm/page_table_check.c > > +++ b/mm/page_table_check.c > > @@ -73,6 +73,9 @@ static void page_table_check_clear(unsigned long pfn, unsigned long pgcnt) > > page = pfn_to_page(pfn); > > page_ext = page_ext_get(page); > > > > + if (!page_ext) > > + return; > > I would replace the above with the following, here and in other places: > > if (!page_ext) { > WARN_ONCE(!is_zone_device_page(page), > "page_ext is missing for a non-device page\n"); > return; > } Hmm, but this function is silent for the !pfn_valid(@pfn) case, and the old cold has BUG_ON(!page_ext). So we know the caller is not being careful about @pfn, and existing code is likely avoiding the BUG_ON(). The justification for the WARN_ONCE(), or maybe VM_WARN_ONCE(), would be if there is a high likelihood that ongoing kernel changes introduce more pfn_valid() but not page_ext covered pages? Is that a realistic scenario?