Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/7] arm64: move literal data into .rodata section
Date: Wed, 10 Jan 2018 12:11:35 +0000	[thread overview]
Message-ID: <20180110121142.18291-1-ard.biesheuvel@linaro.org> (raw)

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

             reply	other threads:[~2018-01-10 12:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 12:11 Ard Biesheuvel [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180110121142.18291-1-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox