Skip to content

Commit

Permalink
x86/mm: Recompute physical address for every page of per-CPU CEA mapping
Browse files Browse the repository at this point in the history
Recompute the physical address for each per-CPU page in the CPU entry
area, a recent commit inadvertantly modified cea_map_percpu_pages() such
that every PTE is mapped to the physical address of the first page.

Fixes: 9fd429c ("x86/kasan: Map shadow for percpu pages on demand")
Cc: Andrey Ryabinin <[email protected]>
Signed-off-by: Sean Christopherson <[email protected]>
  • Loading branch information
sean-jc committed Nov 9, 2022
1 parent 0008712 commit 34a85ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/cpu_entry_area.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ cea_map_percpu_pages(void *cea_vaddr, void *ptr, int pages, pgprot_t prot)
early_pfn_to_nid(PFN_DOWN(pa)));

for ( ; pages; pages--, cea_vaddr+= PAGE_SIZE, ptr += PAGE_SIZE)
cea_set_pte(cea_vaddr, pa, prot);
cea_set_pte(cea_vaddr, per_cpu_ptr_to_phys(ptr), prot);
}

static void __init percpu_setup_debug_store(unsigned int cpu)
Expand Down

0 comments on commit 34a85ba

Please sign in to comment.