Skip to content

x86: Support Key Locker

Chang S. Bae dm-devel linux-crypto linux-doc linux-pm lkml llvm oe-kbuild-all 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest12 patches 11 repliesIn review
  2. v413 patches 9 repliesSuperseded
  3. v315 patches 13 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC11 patches16 repliesSuperseded
v1 RFC8 patches21 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12Documentation/x86: Document Key LockerDocumentation/x86/index.rst Documentation/x86/keylocker.rst+99 -01 reply
2/12x86/cpufeature: Enumerate Key Locker featurearch/x86/include/asm/cpufeatures.h arch/x86/include/asm/disabled-features.h arch/x86/include/uapi/asm/processor-flags.h +1 more+11 -10 replies
3/12x86/insn: Add Key Locker instructions to the opcode maparch/x86/lib/x86-opcode-map.txt tools/arch/x86/lib/x86-opcode-map.txt+14 -80 replies
4/12x86/asm: Add a wrapper function for the LOADIWKEY instructionarch/x86/include/asm/keylocker.h arch/x86/include/asm/special_insns.h+57 -00 replies
5/12x86/msr-index: Add MSRs for Key Locker internal wrapping keyarch/x86/include/asm/msr-index.h+6 -00 replies
6/12x86/keylocker: Define Key Locker CPUID leafarch/x86/include/asm/keylocker.h+7 -00 replies
7/12x86/cpu/keylocker: Load an internal wrapping key at boot-timearch/x86/include/asm/keylocker.h arch/x86/kernel/Makefile arch/x86/kernel/cpu/common.c +2 more+95 -18 replies
8/12x86/PM/keylocker: Restore internal wrapping key on resume from ACPI S3/4arch/x86/include/asm/keylocker.h arch/x86/kernel/keylocker.c arch/x86/power/cpu.c+128 -20 replies
8/12x86/PM/keylocker: Restore internal wrapping key on resume from ACPI S3/4arch/x86/include/asm/keylocker.h arch/x86/kernel/keylocker.c arch/x86/power/cpu.c+132 -20 replies
9/12x86/cpu: Add a configuration and command line option for Key LockerDocumentation/admin-guide/kernel-parameters.txt arch/x86/Kconfig arch/x86/kernel/cpu/common.c+21 -00 replies
10/12crypto: x86/aes - Prepare for a new AES implementationarch/x86/crypto/Makefile arch/x86/crypto/aes-intel_asm.S arch/x86/crypto/aes-intel_glue.c +4 more+309 -2060 replies
11/12crypto: x86/aes-kl - Support AES algorithm using Key Locker instructionsarch/x86/crypto/Makefile arch/x86/crypto/aeskl-intel_asm.S arch/x86/crypto/aeskl-intel_glue.c +1 more+338 -00 replies
12/12crypto: x86/aes-kl - Support XTS modearch/x86/crypto/aeskl-intel_asm.S arch/x86/crypto/aeskl-intel_glue.c+553 -30 replies

Reviews trailers per patch

All 13 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDan WilliamsRafael J. WysockiBagas SanjayaEric BiggersRandy Dunlap
SeriesR-b R-b R-b R-b R-b R-b R-b R-b R-b R-b A-b A-b A-b R-b R-b R-b R-b R-b R-b R-b R-b R-b A-b A-b R-b R-b R-b R-b R-b R-b R-b A-b A-b R-b R-b R-b R-b R-b R-b R-b R-b R-b A-b A-b A-b A-b A-b A-b A-b R-b R-b R-b R-b R-b
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b R-b A-b A-b
8/12R-b R-b A-b A-b
9/12R-b
10/12A-b
11/12R-b
12/12A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v5 thread

Cover letter [PATCH v5 00/12] x86: Support Key Locker

Changes from v4 [1]:
* Drop CBC mode support (PATCH10). (Eric Biggers)
* Update the changelog (PATCH8). (Rafael Wysocki)

A couple of other things outside of these patches are still in progress:
* Support DM-crypt/cryptsetup for Key Locker usage (Andy Lutomirski) [2].
* Understand decryption under-performance (Eric Biggers and Milan Broz) [3][4].

This feature's usage for the threat model can be found in the previous cover letter [1]. This version is based on 5.16.

Thanks,
Chang

[1] V4: https://lore.kernel.org/lkml/[email protected]/
[2] https://lore.kernel.org/lkml/[email protected]/
[3] https://lore.kernel.org/lkml/[email protected]/
[4] https://lore.kernel.org/lkml/[email protected]/

Chang S. Bae (12):
Documentation/x86: Document Key Locker
x86/cpufeature: Enumerate Key Locker feature
x86/insn: Add Key Locker instructions to the opcode map x86/asm: Add a wrapper function for the LOADIWKEY instruction x86/msr-index: Add MSRs for Key Locker internal wrapping key x86/keylocker: Define Key Locker CPUID leaf x86/cpu/keylocker: Load an internal wrapping key at boot-time x86/PM/keylocker: Restore internal wrapping key on resume from ACPI

    S3/4

x86/cpu: Add a configuration and command line option for Key Locker
crypto: x86/aes - Prepare for a new AES implementation
crypto: x86/aes-kl - Support AES algorithm using Key Locker
instructions
crypto: x86/aes-kl - Support XTS mode

 .../admin-guide/kernel-parameters.txt         |   2 +
 Documentation/x86/index.rst                   |   1 +
 Documentation/x86/keylocker.rst               |  98 +++
 arch/x86/Kconfig                              |   3 +
 arch/x86/crypto/Makefile                      |   5 +-
 arch/x86/crypto/aes-intel_asm.S               |  26 +
 arch/x86/crypto/aes-intel_glue.c              | 125 ++++
 arch/x86/crypto/aes-intel_glue.h              |  48 ++
 arch/x86/crypto/aeskl-intel_asm.S             | 633 ++++++++++++++++++
 arch/x86/crypto/aeskl-intel_glue.c            | 216 ++++++
 arch/x86/crypto/aesni-intel_asm.S             |  58 +-
 arch/x86/crypto/aesni-intel_glue.c            | 239 ++-----
 arch/x86/crypto/aesni-intel_glue.h            |  17 +
 arch/x86/include/asm/cpufeatures.h            |   1 +
 arch/x86/include/asm/disabled-features.h      |   8 +-
 arch/x86/include/asm/keylocker.h              |  45 ++
 arch/x86/include/asm/msr-index.h              |   6 +
 arch/x86/include/asm/special_insns.h          |  32 +
 arch/x86/include/uapi/asm/processor-flags.h   |   2 +
 arch/x86/kernel/Makefile                      |   1 +
 arch/x86/kernel/cpu/common.c                  |  21 +-
 arch/x86/kernel/cpu/cpuid-deps.c              |   1 +
 arch/x86/kernel/keylocker.c                   | 199 ++++++
 arch/x86/kernel/smpboot.c                     |   2 +
 arch/x86/lib/x86-opcode-map.txt               |  11 +-
 arch/x86/power/cpu.c                          |   2 +
 crypto/Kconfig                                |  36 +
 tools/arch/x86/lib/x86-opcode-map.txt         |  11 +-
 28 files changed, 1633 insertions(+), 216 deletions(-)
 create mode 100644 Documentation/x86/keylocker.rst
 create mode 100644 arch/x86/crypto/aes-intel_asm.S
 create mode 100644 arch/x86/crypto/aes-intel_glue.c
 create mode 100644 arch/x86/crypto/aes-intel_glue.h
 create mode 100644 arch/x86/crypto/aeskl-intel_asm.S
 create mode 100644 arch/x86/crypto/aeskl-intel_glue.c
 create mode 100644 arch/x86/crypto/aesni-intel_glue.h
 create mode 100644 arch/x86/include/asm/keylocker.h
 create mode 100644 arch/x86/kernel/keylocker.c

base-commit: df0cc57e057f18e44dac8e6c18aba47ab53202f9 --
2.17.1