]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: smccc: Save lr before calling __arm_smccc_sve_check()
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Wed, 21 Jul 2021 07:18:35 +0000 (09:18 +0200)
committerWill Deacon <will@kernel.org>
Wed, 21 Jul 2021 10:23:25 +0000 (11:23 +0100)
commite9ff876a4322eff9fd2ad42eff7a12e61ae78176
treeaa6739e676233664393b106c706c111b86ff3751
parent12c1b6f3a9ebaf0999360cb48e6fb9b46e48800d
arm64: smccc: Save lr before calling __arm_smccc_sve_check()

Commit 542c7fb9e831 ("arm64: smccc: Support SMCCC v1.3 SVE register
saving hint") added a call to __arm_smccc_sve_check() which clobbers the
lr (register x30), causing __arm_smccc_hvc() to return to itself and
crash. Save lr on the stack before calling __arm_smccc_sve_check(). Save
the frame pointer (x29) to complete the frame record, and adjust the
offsets used to access stack parameters.

Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Fixes: 542c7fb9e831 ("arm64: smccc: Support SMCCC v1.3 SVE register saving hint")
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20210721071834.69130-1-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/smccc-call.S