linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] efi: preserve NEON registers on UEFI services calls
@ 2014-06-26 10:09 Ard Biesheuvel
  2014-06-26 10:09 ` [PATCH v2 1/2] efi/x86: move UEFI Runtime Services wrappers to generic code Ard Biesheuvel
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Ard Biesheuvel @ 2014-06-26 10:09 UTC (permalink / raw)
  To: linux-arm-kernel

The current UEFI implementation for arm64 fails to preserve/restore the contents
of the NEON register file, which may result in data corruption, especially now
that those contents are lazily restored for user processes.

This series proposes to fix this by wrapping all runtime services calls, and
adding kernel_neon_begin()/kernel_neon_end() pairs to the wrappers.

The first patch moves the existing x86 versions of those wrappers to generic
code, so that the second patch can easily enable them by supplying a definition
for efi_call_virt and adding a call to efi_native_runtime_setup().

Changes since v1:
- rename runtime.c -> runtime-wrappers.c
- make build depend on new Kconfig symbol EFI_RUNTIME_WRAPPERS to fix ia64
  breakage
- remove default #defines for efi_call_virt()/__efi_call_virt(), they are not
  needed anymore now that it is built conditionally
- add references to applicable UEFI/AAPCS spec sections

Ard Biesheuvel (2):
  efi/x86: move UEFI Runtime Services wrappers to generic code
  efi/arm64: preserve FP/SIMD registers on UEFI runtime services calls

 arch/arm64/Kconfig                      |   1 +
 arch/arm64/include/asm/efi.h            |  21 +++++
 arch/arm64/kernel/efi.c                 |  14 +--
 arch/x86/Kconfig                        |   1 +
 arch/x86/platform/efi/efi.c             | 144 +---------------------------
 drivers/firmware/efi/Kconfig            |   7 ++
 drivers/firmware/efi/Makefile           |   1 +
 drivers/firmware/efi/runtime-wrappers.c | 161 ++++++++++++++++++++++++++++++++
 include/linux/efi.h                     |   2 +
 9 files changed, 197 insertions(+), 155 deletions(-)
 create mode 100644 drivers/firmware/efi/runtime-wrappers.c

-- 
1.8.3.2

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

end of thread, other threads:[~2014-07-08 15:33 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 10:09 [PATCH v2 0/2] efi: preserve NEON registers on UEFI services calls Ard Biesheuvel
2014-06-26 10:09 ` [PATCH v2 1/2] efi/x86: move UEFI Runtime Services wrappers to generic code Ard Biesheuvel
2014-07-01 13:30   ` Matt Fleming
2014-07-01 13:35     ` Ard Biesheuvel
2014-07-01 13:48       ` Matt Fleming
2014-06-26 10:09 ` [PATCH v2 2/2] efi/arm64: preserve FP/SIMD registers on UEFI runtime services calls Ard Biesheuvel
2014-07-04 15:45   ` Catalin Marinas
2014-07-04 15:51     ` Ard Biesheuvel
2014-07-04 16:59       ` Catalin Marinas
2014-07-04 17:15         ` Ard Biesheuvel
2014-06-26 13:58 ` [PATCH v2 0/2] efi: preserve NEON registers on UEFI " Mark Salter
2014-06-26 14:22   ` Ard Biesheuvel
2014-07-01 13:26 ` Matt Fleming
2014-07-01 13:46   ` Ard Biesheuvel
2014-07-08 15:33     ` Olivier Martin

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).