]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: Fix compat register mappings
authorRobin Murphy <robin.murphy@arm.com>
Thu, 22 Oct 2015 14:41:52 +0000 (15:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Dec 2015 19:31:19 +0000 (14:31 -0500)
commitd005a5d9ddd873b36310096d8b88147f0fad5a3c
treeb07ce626fa95301ffb7fc20e2bc73c04833cb7fe
parentd79ee50a08a6b28374b8809ecbd87a09211f2687
arm64: Fix compat register mappings

commit 5accd17d0eb523350c9ef754d655e379c9bb93b3 upstream.

For reasons not entirely apparent, but now enshrined in history, the
architectural mapping of AArch32 banked registers to AArch64 registers
actually orders SP_<mode> and LR_<mode> backwards compared to the
intuitive r13/r14 order, for all modes except FIQ.

Fix the compat_<reg>_<mode> macros accordingly, in the hope of avoiding
subtle bugs with KVM and AArch32 guests.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/ptrace.h