Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] arm64: move literal data into .rodata section
@ 2018-01-10 12:11 Ard Biesheuvel
  2018-01-10 12:11 ` [PATCH 1/7] arm64: kernel: avoid executable literal pools Ard Biesheuvel
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Ard Biesheuvel @ 2018-01-10 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Prevent inadvertently creating speculative gadgets by moving literal data
into the .rodata section.

Patch #1 enables this for C code, by reverting a change that disables the
GCC feature implementing this. Note that this conflicts with the mitigation
of erratum #843419 for Cortex-A53.

Patch #2 - #7 update the crypto asm code to move sboxes and round constant
tables (which may or may not be hiding 'interesting' opcodes) from .text
to .rodata

Ard Biesheuvel (7):
  arm64: kernel: avoid executable literal pools
  arm64/crypto: aes-cipher: move S-box to .rodata section
  arm64/crypto: aes-neon: move literal data to .rodata section
  arm64/crypto: crc32: move literal data to .rodata section
  arm64/crypto: crct10dif: move literal data to .rodata section
  arm64/crypto: sha2-ce: move the round constant table to .rodata
    section
  arm64/crypto: sha1-ce: get rid of literal pool

 arch/arm64/Makefile                   |  4 ++--
 arch/arm64/crypto/aes-cipher-core.S   | 19 ++++++++++---------
 arch/arm64/crypto/aes-neon.S          |  8 ++++----
 arch/arm64/crypto/crc32-ce-core.S     |  7 ++++---
 arch/arm64/crypto/crct10dif-ce-core.S | 17 +++++++++--------
 arch/arm64/crypto/sha1-ce-core.S      | 20 +++++++++-----------
 arch/arm64/crypto/sha2-ce-core.S      |  4 +++-
 7 files changed, 41 insertions(+), 38 deletions(-)

-- 
2.11.0

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

end of thread, other threads:[~2018-01-18 12:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10 12:11 [PATCH 0/7] arm64: move literal data into .rodata section Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 1/7] arm64: kernel: avoid executable literal pools Ard Biesheuvel
2018-01-14 23:27   ` Ard Biesheuvel
2018-01-14 23:29     ` Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 2/7] arm64/crypto: aes-cipher: move S-box to .rodata section Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 3/7] arm64/crypto: aes-neon: move literal data " Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 4/7] arm64/crypto: crc32: " Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 5/7] arm64/crypto: crct10dif: " Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 6/7] arm64/crypto: sha2-ce: move the round constant table " Ard Biesheuvel
2018-01-10 12:11 ` [PATCH 7/7] arm64/crypto: sha1-ce: get rid of literal pool Ard Biesheuvel
2018-01-18 11:41 ` [PATCH 0/7] arm64: move literal data into .rodata section Herbert Xu
2018-01-18 11:46   ` Ard Biesheuvel
2018-01-18 12:02     ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox