arm64: report correct stack pointer in KSTK_ESP for compat tasks
authorWill Deacon <will.deacon@arm.com>
Fri, 29 Aug 2014 15:11:10 +0000 (16:11 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 4 Sep 2014 16:11:06 +0000 (17:11 +0100)
commitb0f11137875b93d4c166c6e2feb042c72678e972
tree3dd6ee809aac01519084908b55fa44ca93e89406
parent011e965c6a7003a007b41babbb85f99697dc2c08
arm64: report correct stack pointer in KSTK_ESP for compat tasks

The KSTK_ESP macro is used to determine the user stack pointer for a
given task. In particular, this is used to to report the '[stack]' VMA
in /proc/self/maps, which is used by Android to determine the stack
location for children of the main thread.

This patch fixes the macro to use user_stack_pointer instead of directly
returning sp. This means that we report w13 instead of sp, since the
former is used as the stack pointer when executing in AArch32 state.

Cc: <stable@vger.kernel.org>
Reported-by: Serban Constantinescu <Serban.Constantinescu@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Conflicts:
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/processor.h