linux-stable/arch/arm64
Christoffer Dall fd28f5d439 arm64: Don't report clear pmds and puds as huge
The current pmd_huge() and pud_huge() functions simply check if the table
bit is not set and reports the entries as huge in that case.  This is
counter-intuitive as a clear pmd/pud cannot also be a huge pmd/pud, and
it is inconsistent with at least arm and x86.

To prevent others from making the same mistake as me in looking at code
that calls these functions and to fix an issue with KVM on arm64 that
causes memory corruption due to incorrect page reference counting
resulting from this mistake, let's change the behavior.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Fixes: 084bd29810 ("ARM64: mm: HugeTLB support.")
Cc: <stable@vger.kernel.org> # 3.11+
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2015-07-01 14:29:28 +01:00
..
boot ARM64: juno: add sp810 support and fix sp804 clock frequency 2015-05-12 16:39:28 +02:00
configs arm64: defconfig: enable memtest 2015-06-15 16:57:46 +01:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2015-05-11 11:05:13 -07:00
include arm64: use private ratelimit state along with show_unhandled_signals 2015-06-19 16:26:15 +01:00
kernel arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs 2015-06-30 18:13:05 +01:00
kvm arm64: KVM: Switch vgic save/restore to alternative_insn 2015-06-12 15:12:08 +01:00
lib arm64: __clear_user: handle exceptions on strb 2014-11-13 15:21:26 +00:00
mm arm64: Don't report clear pmds and puds as huge 2015-07-01 14:29:28 +01:00
net arm64: bpf: fix endianness conversion bugs 2015-06-26 14:15:39 +01:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: Allow forced irq threading 2015-05-19 15:27:42 +01:00
Kconfig.debug coresight: moving to new "hwtracing" directory 2015-04-03 16:17:04 +02:00
Makefile arm64: Adjust EFI libstub object include logic 2015-03-17 16:59:47 +00:00