android_kernel_samsung_univ.../arch/x86
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
..
boot x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
configs
crypto x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
entry x86/entry/64/compat: Clear registers for compat syscalls, to reduce speculation attack surface 2018-07-25 10:18:20 +02:00
ia32
include x86/speculation/l1tf: Fix up CPU feature flags 2018-08-15 17:42:11 +02:00
kernel x86/bugs: Move the l1tf function and define pr_fmt properly 2018-08-15 17:42:10 +02:00
kvm kvm: x86: vmx: fix vpid leak 2018-08-06 16:24:42 +02:00
lguest
lib x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
math-emu
mm ioremap: Update pgtable free interfaces with addr 2018-08-17 20:56:45 +02:00
net
oprofile x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
pci
platform x86/speculation: Use IBRS if available before calling into firmware 2018-07-25 10:18:21 +02:00
power
purgatory
ras
realmode
tools
um x86/cpufeature: Carve out X86_FEATURE_* 2018-07-17 11:31:44 +02:00
video
xen x86/xen: Add call of speculative_store_bypass_ht_init() to PV paths 2018-07-25 10:18:31 +02:00
.gitignore
Kbuild
Kconfig x86/cpu: Provide a config option to disable static_cpu_has 2018-07-17 11:31:44 +02:00
Kconfig.cpu
Kconfig.debug x86/cpufeature: Replace the old static_cpu_has() with safe variant 2018-07-17 11:31:44 +02:00
Makefile
Makefile_32.cpu
Makefile.um