Skip to content

ARM/decompressor: deal with disabled CP15 barrier instructions

Ard Biesheuvel linux-arm-kernel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v1 posting 2/22 patches 1 replySuperseded
  3. v1 posting 1/22 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- instead of using v7 barriers in the v7 code, enable the CP15 barriers - this way, we can keep using the v7 routines for some v6 CPUs that implement CPUID instructions (causing them to take the v7 path) but not for the v7 barriers.
- applied Marc's and Linus's acks to #2 only

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ARM/decompressor: enable CP15 barrier instructions in v7 cache setup codearch/arm/boot/compressed/head.S+13 -00 replies
2/2Revert "ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache"arch/arm/boot/compressed/head.S+1 -150 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchMarc ZyngierLinus Walleij
1/2
2/2A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] ARM/decompressor: deal with disabled CP15 barrier instructions

From: Ard Biesheuvel <[email protected]>

While trying to test my v4.4 backport of the firmware/hypervisor based spectre v1/v2 mitigations for 32-bit ARM, I noticed that KVM/qemu failed to boot my kernel while it booted fine under TCG emulation.

As it turns out, KVM/qemu may instantiate the VCPU with support for CP15 barrier instructions disabled, causing them to UNDEF and crash the decompressor.

I already fixed the same issue for UEFI boot, but since v4.4 does not support that, I only noticed now that this is an issue for bare metal as well.

Changes since v1:
- instead of using v7 barriers in the v7 code, enable the CP15 barriers - this way, we can keep using the v7 routines for some v6 CPUs that implement CPUID instructions (causing them to take the v7 path) but not for the v7 barriers.
- applied Marc's and Linus's acks to #2 only

I have tested this via kernelci [0], which includes the v6 pogoplug that got broken by the v1 version of this series.

[0] https://kernelci.org/build/ardb/branch/for-kernelci/kernel/v5.4-rc8-2-gcaea8d2861c8/

Cc Russell King <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Marc Zyngier <[email protected]>

Ard Biesheuvel (2):
ARM/decompressor: enable CP15 barrier instructions in v7 cache setup
code
Revert "ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning
the cache"

 arch/arm/boot/compressed/head.S | 29 ++++++++++----------
 1 file changed, 14 insertions(+), 15 deletions(-)
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel