Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp2077lqt; Wed, 5 Jun 2024 15:05:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVf5LEMX8oxR/k3YoxR2OC+pbMdj5r84yY74EidK6NRdwHpY5XooaCabOZqB5u9gf/pc8XULGlezOoV078WPq4bt2wn1ZFJqfDVU+zrZQ== X-Google-Smtp-Source: AGHT+IFtSLi5QUTiqbg6vCdITND6ChzXjWfJp+CgCEb5ksl91zYXLlnxBFrkMyk7Qkpts62T04bN X-Received: by 2002:a05:6830:1d3:b0:6f9:3fab:f99d with SMTP id 46e09a7af769-6f9436b72cfmr3833614a34.30.1717625158561; Wed, 05 Jun 2024 15:05:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717625158; cv=pass; d=google.com; s=arc-20160816; b=UCRfYzbIx7MGvjAaIJZHZqC2YHA6Grl2o2wWpsJ/efPuYyvPauPo2nVULYCImR7lEb rHWR1+e9P8Ah1d0Fewb9Y4vvLqXt91IiXkvygMY8dLAqWwC+D8mzifpF/lyeOlOgtyMK i8daOLThSDPCltAdttJAlC36Z8bCHkFXakXLckgDdQm0Zm7Y5JqtCUa22vIosAWOxUrp 9RH2qrznUyBIuNxBcEMb5gHoDLLhelLe/C/pJO/8dWq/o+faxcwu+Z8vla0QuTdroIsp RKk1viC9qhoGZ1P/z13M+kDkEDQvI0uJJdy3c35ILKX86AjsrJgVUBJU/az48yrni3Jq IE1A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=iAxjrVXkEDVUclsxbsYmROiJTmVOfMPz+ZUfJfznAK4=; fh=D0PRKKcXoKzfjO9/jMChwn4YuryMn/AAoaZHLJJnjEc=; b=T8y0ymNVLOtNzpjyVArS77pRJYuEogo1NTaEqvX+hoWmmTq2c5geu0aACHt8tqbuXl E6nUo1wB8UtFxr2jJabWp7bsjcWLkic8JoNWBoYZUAakw2jrD+IG58SOPjNBVLPMXMdy DxPO9Rutoyo0PHxVeHyx/HJcgmByIvAIy1AQjXykbmmH8bOv8c0iIKrEdLqwzuha/MC1 AplKncIhrtisQ2PsaoH1Gs3J6nnOpiZ5D2g/zaolSxCaDBmDFDMNHuTqhUgrY6NE5dX6 CXgpLkWEGBxRQnSnD96mA0iVyIWxNFq2RTL/7JFbVQhO+3dQyKSq3G7CCCrVdL7dlgBh I6CA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HUvp73ij; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-203331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203331-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-79529588180si177755485a.209.2024.06.05.15.05.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 15:05:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HUvp73ij; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-203331-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203331-linux.lists.archive=gmail.com@vger.kernel.org" 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 2AC481C23421 for ; Wed, 5 Jun 2024 22:05:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A77C63B1AB; Wed, 5 Jun 2024 22:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="HUvp73ij" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B730C15539D for ; Wed, 5 Jun 2024 22:05:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717625145; cv=none; b=B8EB+sR9pOY53d0Sh2Ei4WKXjjZap5ZyNmQrB7MgcBjFLODlvfOL6Iyxmzfti2TMcs7xLHgZM4FeN9bFR+K0i6+Sv2L42lYNLmgG3V8l7AJDQF948U+U65AuPjJ/9TLskpejYBdx7FTNQpJSV0npizwp1OYmug67N3TqdUNYhi8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717625145; c=relaxed/simple; bh=R3+HS5IAcTR42fptTxGAE8k7b69s+G5kxAPPVyzJJfg=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=PDg/XmC7MLDxP2Uu3khnABMu5RJ/xZb5ysdkgt41ySrYvoh+wH0R8boggEKiLU+eKVGUu9nhZaZ/iRp+N0cidQegweN5u8OgeECcIQee+ocQQCmBVbmu0BcHrfloYJp39o0yZCSp5KalskkwOYemaV3p9NSpGEB29/jpBz/SdCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=HUvp73ij; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AF83C2BD11; Wed, 5 Jun 2024 22:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1717625145; bh=R3+HS5IAcTR42fptTxGAE8k7b69s+G5kxAPPVyzJJfg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HUvp73ijpQYic3gRaURF4D3OSbULFRnhHTQh5Kic03/1ZO+YRcy/dsR5zGvdl0hPH znrLxImKjFswYuAqJUYOCBDVBWcDUna+fcIbdRRe3TQSt469Z2xLrtt65RTvOVrth0 Gd+MaGyE61KwnWtvs7ClEhgwGfH73C8fUoBBK1k8= Date: Wed, 5 Jun 2024 15:05:43 -0700 From: Andrew Morton To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dan Williams , Pasha Tatashin Subject: Re: [PATCH] mm/page_table_check: Fix crash on ZONE_DEVICE Message-Id: <20240605150543.87c81189fa7cb562e73fa0b8@linux-foundation.org> In-Reply-To: <20240605212146.994486-1-peterx@redhat.com> References: <20240605212146.994486-1-peterx@redhat.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 5 Jun 2024 17:21:46 -0400 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. Do we have a Reported-by: for this one? And a Fixes? It looks like df4e817b7108?