arm64: fix inline asm in load_unaligned_zeropad()
authorPeter Collingbourne <pcc@google.com>
Thu, 1 Apr 2021 16:51:10 +0000 (09:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:00:55 +0000 (13:00 +0200)
commite2931f05eb328e167bd39369dd738f9840bf4f39
treebfbb69d06b92da4da36543490b9c476bdc541cc1
parent957f83a138f152af5bcec0555bd9b6c612b9212f
arm64: fix inline asm in load_unaligned_zeropad()

commit 185f2e5f51c2029efd9dd26cceb968a44fe053c6 upstream.

The inline asm's addr operand is marked as input-only, however in
the case where an exception is taken it may be modified by the BIC
instruction on the exception path. Fix the problem by using a temporary
register as the destination register for the BIC instruction.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Cc: stable@vger.kernel.org
Link: https://linux-review.googlesource.com/id/I84538c8a2307d567b4f45bb20b715451005f9617
Link: https://lore.kernel.org/r/20210401165110.3952103-1-pcc@google.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/word-at-a-time.h