On Fri, Nov 8, 2019 at 1:36 PM Ard Biesheuvel ardb@kernel.org wrote:
This is a backport to v4.4 of the Spectre v1 and v2 mitigations for 32-bit ARM that have already been backported to v4.9.
Patches #17 and up were cherry-picked from the v4.9 tree, and applied cleanly. The first 16 patches are prerequisites that were introduced between v4.4 and v4.9, and some needed minor massaging to apply. Some notable issues:
- the 32-bit KVM host parts were omitted, given the lack of demand and the fact that those pieces saw significantly more churn during the v4.4-v4.9 timeframe due to the fact that the code is shared with arm64
- some other changes are shared between ARM and arm64 (notably, the ARM SMCCCC changes), so the backport affects both architectures.
Patches can be found at [0]. They were build and boot tested using a variety of ARM and arm64 configs and platforms, both locally and on KernelCI.
An RFC of this series was sent out to the linux-arm-kernel mailing list and cc'ed to the maintainer, and no objections were raised. (The only difference between the RFC and this submission is that I have dropped a couple of mostly unrelated patches that were only there to make patch #8 match its context more closely in the file include/linux/arm-smccc.h)
Cc: Russell King rmk+kernel@armlinux.org.uk Cc: Linus Walleij linus.walleij@linaro.org
I felt responsible so I took it for a ride on a number of physical systems (no QEMU!).
It works flawlessly on: - Ux500 ARMv7 A9 x 2 - Versatile AB ARMv5 ARM926EJ-S - Integrator CP ARMv4t ARM920T
It bombs on RealView PB11MPCore but it's not your fault, it also hangs on v4.4.186 and a clean v4.4. However it boots fine with v5.6-rc1 and -next, anything using ARM11 in MPcore configurations (such as the Oxnas routers) should use a newer kernel and stay away from v4.4.
Anyways: Tested-by: Linus Walleij linus.walleij@linaro.org
Yours, Linus Walleij