Re: [PATCH 0/5] x86/mm/pat: CPA fixes

"Lorenzo Stoakes (ARM)" <[email protected]>
Newsgroups dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.stable,org.kvack.linux-mm
Message-ID <an2KYgqMIoy6VloV@lucifer>
On Thu, Aug 13, 2026 at 11:51:00AM +0300, Mike Rapoport wrote:
> On Thu, Aug 13, 2026 at 05:55:44AM +0000, Nikunj A Dadhania wrote:
> > On Fri, Aug 07, 2026 at 04:36:08PM +0100, Lorenzo Stoakes (ARM) wrote:
> > > +static void poke_vmalloc_pages_safe(struct page **pages, void *addr,
> > > +				    bool cross_page_boundary)
> > > +{
> > > +	guard(mmap_read_lock)(&init_mm);
> > > +	poke_vmalloc_pages(pages, addr, cross_page_boundary);
> > > +}
> >
> > Tested just the proposed patch from this email (without the rest of the
> > CPA fixes series) on the 512-guest concurrent boot harness (details in
>
> For this fix to actually fix anything, the patches that add locking of
> mmap_lock to CPA are needed still.

And just in time the fully respun series (based on tip tree x86/mm) is in:

https://lore.kernel.org/all/[email protected]/

Please do try with the full series applied.

>
> > [1]) and still see the memcmp BUG, I havent hit the first BUG though:
> >
> >   kernel BUG at arch/x86/kernel/alternative.c:2727!
> >   Oops: invalid opcode: 0000 [#1] SMP NOPTI
> >   CPU: 1 UID: 0 PID: 485 Comm: (udev-worker) Not tainted 7.2.0-rc5-pokesafe+ #42 PREEMPT(full)
> >   RIP: 0010:__text_poke.cold+0xdb/0x2af
> >
> > The instrumentation captured the following before the memcmp BUG:
> >
> >   SMP alternatives: __text_poke: memcmp failed at addr=ffffffffc06ce1bb len=4
> >   SMP alternatives: __text_poke: expected (src): 2e 2e 31 c0
> >   SMP alternatives: __text_poke: found    (dst): f9 b8 9b d3
> >   SMP alternatives: __text_poke: pfn at poke time (vmalloc_to_page): 8ece
> >   SMP alternatives: __text_poke: pfn at readback time (vmalloc_to_page): c6ce
> >   SMP alternatives: __text_poke: page table dump for addr:
> >     PGD 2f042067  P4D 2f043067  PUD 2f045067  PMD c6001a1
> >
> > pfn acquired at the start of __text_poke() (0x8ece) differs from pfn
> > at readback time (0xc6ce) in the instrumentaion.
> >
> > [1] https://lore.kernel.org/all/[email protected]/
> >
> > Regards,
> > Nikunj
>
> --
> Sincerely yours,
> Mike.

--
Cheers, Lorenzo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.