]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
authorAndy Lutomirski <luto@kernel.org>
Wed, 6 Jan 2016 20:21:01 +0000 (12:21 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 5 May 2016 20:49:18 +0000 (13:49 -0700)
commit7cac6fc59020b4c8d1aa68a3064fec2d221a61d2
tree4b83daeaf316e1a2ae212133d4c909afbd68025c
parentab04ee8faca1776905be8d096d16f63e02364b3a
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization

When switch_mm() activates a new PGD, it also sets a bit that
tells other CPUs that the PGD is in use so that TLB flush IPIs
will be sent.  In order for that to work correctly, the bit
needs to be visible prior to loading the PGD and therefore
starting to fill the local TLB.

Document all the barriers that make this work correctly and add
a couple that were missing.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mm@kvack.org
Cc: stable@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 71b3c126e61177eb693423f2e18a1914205b165e)

Orabug: 22673331
CVE: CVE-2016-2069

Signed-off-by: Manjunath Govindashetty <manjunath.govindashetty@oracle.com>
arch/x86/include/asm/mmu_context.h
arch/x86/mm/tlb.c