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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23910C87FCE for ; Fri, 25 Jul 2025 23:51:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60ECC6B007B; Fri, 25 Jul 2025 19:51:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5BF046B0089; Fri, 25 Jul 2025 19:51:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D4BA6B008A; Fri, 25 Jul 2025 19:51:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 3E6A66B007B for ; Fri, 25 Jul 2025 19:51:07 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 75EA613427D for ; Fri, 25 Jul 2025 23:51:06 +0000 (UTC) X-FDA: 83704435332.09.4B08286 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id AB13E4000C for ; Fri, 25 Jul 2025 23:51:04 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=WC9QXExV; dmarc=none; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1753487464; h=from:from:sender: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:dkim-signature; bh=Qqf3oemEHSrz5WN/F0jsaZ1vSQjA3fwsg2DHfxI5XmY=; b=QjDVEylYJHPAJaYbuMbWDqQ2MlzeFbovgGjNHhUmxQ5owpcBEJwywDDIJjj4MOfNhqYls3 44LCxzqtqohXRj6u7eLninN3+iyg2in1FRZXsxhbbmVH0oqg7chMUENIJYxwErNMCr8xyj lZS+EiIOr9Nf3XdoSUF9ZJ5/r2zIjow= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1753487464; a=rsa-sha256; cv=none; b=XjPXKtO2/l9SAXPZ2ladWXOHDtyp2nAEy3gLJkmHbwHYJpjG6/Jt1K41Hw/Lyca7QtXKNV VCNiaMEUaxKc99mbGdAd9U+xTcYcVmRuYIcCi8ciOg6B37FG2WvmmTqIIr1v5S0t7AC7Xi csIBQp7118fKm14CkPTcDzgQZR81/AQ= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=WC9QXExV; dmarc=none; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 476DE5C6AE0; Fri, 25 Jul 2025 23:51:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F40DC4CEE7; Fri, 25 Jul 2025 23:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1753487463; bh=k2UEv3H0rQL8yvRCGdCtZL7jRC7k7qI5xjgkdT+pMnc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WC9QXExVCil7nvhzYbXj3XM3h/Vl1LWn9QMpKzNOvDfzK7tmmu6merjEVhJvQmzZv yUs17VM0Wf8pDrcd2pktcCxdrBzsT/O4NubFFqw75xqNVvpwEY/HNkNuGp9pQt+3zI 1dZ89hPoykgJ6fKPaTCp8tj3cHuOlfHg0tFzV40c= Date: Fri, 25 Jul 2025 16:51:01 -0700 From: Andrew Morton To: Harry Yoo Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Andy Lutomirski , Peter Zijlstra , "H . Peter Anvin" , Andrey Ryabinin , Arnd Bergmann , Dennis Zhou , Tejun Heo , Christoph Lameter , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Juergen Gross , Kevin Brodsky , Oscar Salvador , Joao Martins , Lorenzo Sccakes , Jane Chu , Alistair Popple , Mike Rapoport , David Hildenbrand , Gwan-gyeong Mun , "Aneesh Kumar K . V" , Uladzislau Rezki , "Liam R . Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Qi Zheng , Ard Biesheuvel , Thomas Huth , John Hubbard , Ryan Roberts , Peter Xu , Dev Jain , Bibo Mao , Anshuman Khandual , Joerg Roedel , x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v3 mm-hotfixes 0/5] mm, arch: a more robust approach to sync top level kernel page tables Message-Id: <20250725165101.e636bbe3fa69ad0b73810914@linux-foundation.org> In-Reply-To: <20250725012106.5316-1-harry.yoo@oracle.com> References: <20250725012106.5316-1-harry.yoo@oracle.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Stat-Signature: r1hsq17idenxss9aagjf7haj3z1cxh6m X-Rspamd-Queue-Id: AB13E4000C X-Rspamd-Server: rspam10 X-Rspam-User: X-HE-Tag: 1753487464-90931 X-HE-Meta: U2FsdGVkX191KKhiB/g16xjRaQ6gu3tkpYm6HSwa+dSfMUPBhScm1HApQXhub9Cv3b60rRHazrI+/lavlYUEiNvNbUi5ACYMoQmOpme3c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Yh/kwxu2kC69W4Fm+zGCqlU6CWY5BaMtw6VtqdmdgSYRE+NfGNPU9kN8B9c/Q3/Yd9G/2VxKiXqXtFvEBFIMTCHAsni1Ma7CnxuL3tEq4IEDZqpZyEOYdbDcUxqpKPbaB1bXXeFEo6Ozs3en4ppQ== 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: List-Subscribe: List-Unsubscribe: On Fri, 25 Jul 2025 10:21:01 +0900 Harry Yoo wrote: > During our internal testing, we started observing intermittent boot > failures when the machine uses 4-level paging and has a large amount > of persistent memory: > > BUG: unable to handle page fault for address: ffffe70000000034 > #PF: supervisor write access in kernel mode > #PF: error_code(0x0002) - not-present page > PGD 0 P4D 0 > Oops: 0002 [#1] SMP NOPTI > RIP: 0010:__init_single_page+0x9/0x6d > Call Trace: > > __init_zone_device_page+0x17/0x5d > memmap_init_zone_device+0x154/0x1bb > pagemap_range+0x2e0/0x40f > memremap_pages+0x10b/0x2f0 > devm_memremap_pages+0x1e/0x60 > dev_dax_probe+0xce/0x2ec [device_dax] > dax_bus_probe+0x6d/0xc9 > [... snip ...] > > > ... > > arch/x86/include/asm/pgalloc.h | 20 +++++++++++++ > arch/x86/include/asm/pgtable_64_types.h | 3 ++ > arch/x86/mm/init_64.c | 37 ++++++++++++++----------- > arch/x86/mm/kasan_init_64.c | 8 +++--- > include/asm-generic/pgalloc.h | 16 +++++++++++ > include/linux/pgtable.h | 17 ++++++++++++ > include/linux/vmalloc.h | 16 ----------- > mm/kasan/init.c | 10 +++---- > mm/percpu.c | 4 +-- > mm/sparse-vmemmap.c | 4 +-- > 10 files changed, 90 insertions(+), 45 deletions(-) Are any other architectures likely to be affected by this flaw? It's late for 6.16. I'd propose that this series target 6.17 and once merged, the cc:stable tags will take care of 6.16.x and earlier. It's regrettable that the series contains some patches which are cc:stable and some which are not. Because 6.16.x and earlier will end up getting only some of these patches, so we're backporting an untested patch combination. It would be better to prepare all this as two series: one for backporting and the other not. It's awkward that some of the cc:stable patches have a Fixes: and others do not. Exactly which kernel version(s) are we asking the -stable maintainers to merge these patches into? This looks somewhat more like an x86 series than an MM one. I can take it via mm.git with suitable x86 acks. Or drop it from mm.git if it goes into the x86 tree. We can discuss that. For now, I'll add this to mm.git's mm-new branch. There it will get a bit of exposure but it will be withheld from linux-next. Once 6.17-rc1 is released I can move this into mm.git's mm-unstable branch to expose it to linux-next testers. Thanks. I'll suppress the usual added-to-mm emails, save a few electrons.