All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fixes for SW PAN
@ 2017-12-06 11:16 Will Deacon
  2017-12-06 11:16 ` [PATCH 1/2] arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm Will Deacon
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Will Deacon @ 2017-12-06 11:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

After lots of collective head scratching in response to Vinayak's mail
here:

  http://lists.infradead.org/pipermail/linux-arm-kernel/2017-December/545641.html

It turns out that we have a problem with SW PAN and kernel threads, where
the saved ttbr0 value for a kernel thread can be stale and subsequently
inherited by other kernel threads over a fork.

These two patches attempt to fix that. We've not be able to reproduce
the exact failure reported above, but I added some assertions to the
uaccess routines to check for discrepancies between the active_mm pgd
and the saved ttbr0 value (ignoring the zero page) and these no longer
fire with these changes, but do fire without them if EFI runtime services
are enabled on my Seattle board.

Cheers,

Will

--->8

Will Deacon (2):
  arm64: SW PAN: Point saved ttbr0 at the zero page when switching to
    init_mm
  arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb

 arch/arm64/include/asm/efi.h         |  4 +---
 arch/arm64/include/asm/mmu_context.h | 46 ++++++++++++++++++------------------
 2 files changed, 24 insertions(+), 26 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-12-12  3:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 11:16 [PATCH 0/2] Fixes for SW PAN Will Deacon
2017-12-06 11:16 ` [PATCH 1/2] arm64: SW PAN: Point saved ttbr0 at the zero page when switching to init_mm Will Deacon
2017-12-06 12:09   ` Mark Rutland
2017-12-06 12:15   ` Catalin Marinas
2017-12-06 11:16 ` [PATCH 2/2] arm64: SW PAN: Update saved ttbr0 value on enter_lazy_tlb Will Deacon
2017-12-06 12:10   ` Mark Rutland
2017-12-06 12:17   ` Catalin Marinas
2017-12-06 12:19 ` [PATCH 0/2] Fixes for SW PAN Mark Rutland
2017-12-06 13:37   ` Will Deacon
2017-12-06 17:31 ` Vinayak Menon
2017-12-06 17:56   ` Will Deacon
2017-12-06 18:01     ` Catalin Marinas
2017-12-06 18:07       ` Will Deacon
2017-12-06 18:18         ` Catalin Marinas
2017-12-06 18:26           ` Will Deacon
2017-12-07  8:55             ` Vinayak Menon
2017-12-12  3:30               ` Vinayak Menon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.