android_kernel_samsung_univ.../arch/x86/mm
Chintan Pandya 29f475cbff ioremap: Update pgtable free interfaces with addr
commit 785a19f9d1dd8a4ab2d0633be4656653bd3de1fc upstream.

The following kernel panic was observed on ARM64 platform due to a stale
TLB entry.

 1. ioremap with 4K size, a valid pte page table is set.
 2. iounmap it, its pte entry is set to 0.
 3. ioremap the same address with 2M size, update its pmd entry with
    a new value.
 4. CPU may hit an exception because the old pmd entry is still in TLB,
    which leads to a kernel panic.

Commit b6bdb7517c3d ("mm/vmalloc: add interfaces to free unmapped page
table") has addressed this panic by falling to pte mappings in the above
case on ARM64.

To support pmd mappings in all cases, TLB purge needs to be performed
in this case on ARM64.

Add a new arg, 'addr', to pud_free_pmd_page() and pmd_free_pte_page()
so that TLB purge can be added later in seprate patches.

[toshi.kani@hpe.com: merge changes, rewrite patch description]
Fixes: 28ee90fe6048 ("x86/mm: implement free pmd/pte page interfaces")
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: mhocko@suse.com
Cc: akpm@linux-foundation.org
Cc: hpa@zytor.com
Cc: linux-mm@kvack.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: Will Deacon <will.deacon@arm.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20180627141348.21777-3-toshi.kani@hpe.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-17 20:56:45 +02:00
..
kmemcheck
amdtopology.c
dump_pagetables.c
extable.c
fault.c x86/mm: Fix vmalloc_fault to use pXd_large 2018-03-22 09:23:30 +01:00
gup.c
highmem_32.c
hugetlbpage.c
init_32.c
init_64.c
init.c x86/init: fix build with CONFIG_SWAP=n 2018-08-15 17:42:11 +02:00
iomap_32.c
ioremap.c x86/mm/kmmio: Fix mmiotrace for page unaligned addresses 2018-02-25 11:03:41 +01:00
kaiser.c x86/kaiser: fix build error with KASAN && !FUNCTION_GRAPH_TRACER 2018-02-16 20:09:40 +01:00
kasan_init_64.c
kmmio.c x86/mm/kmmio: Make the tracer robust against L1TF 2018-08-15 17:42:11 +02:00
Makefile
mm_internal.h
mmap.c x86/speculation/l1tf: Disallow non privileged high MMIO PROT_NONE mappings 2018-08-15 17:42:10 +02:00
mmio-mod.c
mpx.c
numa_32.c
numa_64.c
numa_emulation.c
numa_internal.h
numa.c
pageattr-test.c
pageattr.c x86/mm/pat: Make set_memory_np() L1TF safe 2018-08-15 17:42:11 +02:00
pat_internal.h
pat_rbtree.c
pat.c x86/mm/pat, /dev/mem: Remove superfluous error message 2018-01-17 09:35:28 +01:00
pf_in.c
pf_in.h
pgtable_32.c
pgtable.c ioremap: Update pgtable free interfaces with addr 2018-08-17 20:56:45 +02:00
physaddr.c
physaddr.h
setup_nx.c x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
srat.c
testmmiotrace.c
tlb.c x86/speculation: Use Indirect Branch Prediction Barrier in context switch 2018-07-25 10:18:21 +02:00