All of lore.kernel.org
 help / color / mirror / Atom feed
* per-task stack canaries for arm64
@ 2018-01-17 18:24 Ard Biesheuvel
  2018-01-17 19:10 ` Kees Cook
  0 siblings, 1 reply; 10+ messages in thread
From: Ard Biesheuvel @ 2018-01-17 18:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

This is a followup to a discussion I had with Ramana in San Francisco
5 months ago. Apologies for the tardiness.

The topic of the discussion was compiler support for per-task stack
cookies in the arm64 kernel. From the compiler side, this would simply
entail offsetting the address of __stack_chk_guard with value held in
tpidr_el1, so we can make it a per-CPU variable. On the kernel side,
we would need fairly straight-forward plumbing to detect the compiler
support, and switching to a per-CPU variable when supported. Beyond
that, we need to update the per-CPU value at context switch time, and
perhaps some handling of the initial state when per-CPU variables are
initialized.

Ramana indicated at the time that he would be up for adding, e.g.,
-fstack-protector-linux-kernel as a command line option, and add the
contents of tpidr_el1 to every reference of __stack_chk_guard when
set.

Would this be sufficient to implement this from the kernel side? Am I
missing anything here? I am missing the cross-arch context entirely,
so are there things we should take into account and/or learn from?

Comments welcome.

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

end of thread, other threads:[~2018-01-22 16:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-17 18:24 per-task stack canaries for arm64 Ard Biesheuvel
2018-01-17 19:10 ` Kees Cook
2018-01-17 20:32   ` Ard Biesheuvel
2018-01-17 20:45     ` Kees Cook
2018-01-18 10:26       ` Ramana Radhakrishnan
2018-01-18 13:19         ` Ard Biesheuvel
2018-01-22 10:59           ` Ard Biesheuvel
2018-01-22 12:26             ` Kees Cook
2018-01-22 12:42               ` Ard Biesheuvel
2018-01-22 16:28                 ` Ard Biesheuvel

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.