linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] scs: switch to vmapped shadow stacks
@ 2020-11-24 19:59 Sami Tolvanen
  2020-11-24 19:59 ` [PATCH v2 1/2] " Sami Tolvanen
  2020-11-24 19:59 ` [PATCH v2 2/2] arm64: scs: use vmapped IRQ and SDEI " Sami Tolvanen
  0 siblings, 2 replies; 10+ messages in thread
From: Sami Tolvanen @ 2020-11-24 19:59 UTC (permalink / raw)
  To: Will Deacon, Catalin Marinas
  Cc: Mark Rutland, Kees Cook, Ard Biesheuvel, linux-kernel,
	James Morse, Sami Tolvanen, linux-arm-kernel

As discussed a few months ago [1][2], virtually mapped shadow call stacks
are better for safety and robustness. This series dusts off the VMAP
option from the original SCS patch series and switches the kernel to use
virtually mapped shadow stacks unconditionally when SCS is enabled.

 [1] https://lore.kernel.org/lkml/20200515172355.GD23334@willie-the-truck/
 [2] https://lore.kernel.org/lkml/20200427220942.GB80713@google.com/

Changes in v2:
- Added SCS_ORDER and used it to define SCS_SIZE, switched vmalloc() to
  use SCS_SIZE and removed the alignment.
- Moved the kasan_unpoison_vmalloc() to scs_alloc() when using a cached
  shadow stack instead of calling it in scs_free().
- Added a comment to scs_free().
- Moved arm64 IRQ and SDEI shadow stack initialization to irq/sdei.c,
  and removed the now unneeded scs.c.

Sami Tolvanen (2):
  scs: switch to vmapped shadow stacks
  arm64: scs: use vmapped IRQ and SDEI shadow stacks

 arch/arm64/kernel/Makefile |  1 -
 arch/arm64/kernel/entry.S  |  6 ++--
 arch/arm64/kernel/irq.c    | 19 ++++++++++
 arch/arm64/kernel/scs.c    | 16 ---------
 arch/arm64/kernel/sdei.c   | 71 +++++++++++++++++++++++++++++++-------
 include/linux/scs.h        | 16 ++++-----
 kernel/scs.c               | 66 +++++++++++++++++++++++++++++------
 7 files changed, 142 insertions(+), 53 deletions(-)
 delete mode 100644 arch/arm64/kernel/scs.c


base-commit: d5beb3140f91b1c8a3d41b14d729aefa4dcc58bc
-- 
2.29.2.454.gaff20da3a2-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-12-01 10:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-24 19:59 [PATCH v2 0/2] scs: switch to vmapped shadow stacks Sami Tolvanen
2020-11-24 19:59 ` [PATCH v2 1/2] " Sami Tolvanen
2020-11-24 22:04   ` Kees Cook
2020-11-30 11:44   ` Will Deacon
2020-11-30 20:03     ` Sami Tolvanen
2020-11-24 19:59 ` [PATCH v2 2/2] arm64: scs: use vmapped IRQ and SDEI " Sami Tolvanen
2020-11-30 11:49   ` Will Deacon
2020-11-30 21:13     ` Sami Tolvanen
2020-12-01 10:18       ` Will Deacon
2020-12-01 10:26         ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).