[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21bf2e44-3316-2372-44cb-1488f88650f5@intel.com>
Date: Thu, 7 Sep 2023 08:39:13 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Adrian Hunter <adrian.hunter@...el.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Vlastimil Babka <vbabka@...e.cz>,
Mike Rapoport <rppt@...ux.ibm.com>,
Lorenzo Stoakes <lstoakes@...il.com>,
Tom Lendacky <thomas.lendacky@....com>,
Baoquan He <bhe@...hat.com>, Vivek Goyal <vgoyal@...hat.com>,
Dave Young <dyoung@...hat.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-coco@...ts.linux.dev, linux-efi@...r.kernel.org,
kexec@...ts.infradead.org
Subject: Re: [PATCH 1/3] proc/vmcore: Do not map unaccepted memory
On 9/6/23 00:39, Adrian Hunter wrote:
> @@ -559,7 +567,8 @@ static int vmcore_remap_oldmem_pfn(struct vm_area_struct *vma,
> * pages without a reason.
> */
> idx = srcu_read_lock(&vmcore_cb_srcu);
> - if (!list_empty(&vmcore_cb_list))
> + if (!list_empty(&vmcore_cb_list) ||
> + range_contains_unaccepted_memory(paddr, paddr + size))
> ret = remap_oldmem_pfn_checked(vma, from, pfn, size, prot);
> else
> ret = remap_oldmem_pfn_range(vma, from, pfn, size, prot);
The whole callback mechanism which fs/proc/vmcore.c::pfn_is_ram()
implements seems to be in place to ensure that there aren't a billion
different "ram" checks in here.
Is there a reason you can't register_vmcore_cb() a callback to check for
unaccepted memory?
Powered by blists - more mailing lists