diff options
author | Luke Starrett <lstarret@broadcom.com> | 2015-07-31 11:53:26 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2015-09-01 15:41:38 -0700 |
commit | 845f2e4781d2182e82a9235b7a744e888716ea80 (patch) | |
tree | 16c576798f89a0349c087d42fdf177f6df2f6b62 | |
parent | d99f5abc00687df8b32e3afaee52eac399fef69e (diff) |
arm64: el0_dbg does not set link reg for return to user path, breaks debug
When the context tracking feature was backported to 3.14 LSK,
setting of the LR was moved out of the main body of el0_sync
and into the applicable sub handlers (i.e. el0_da, el0_sp_pc,
etc). The el0_dbg handler was overlooked. The implication
is that do_debug_exception() will attempt to return directly
to userspace without going through the ret_from_exception
path. This ultimately results in another sync exception due
to a protection fault on the target PC.
This was introduced by:
commit 333625b7586d2753a77f32e1f898ab7cc6cf7655
Author: Larry Bassel <larry.bassel@linaro.org>
Date: Wed Oct 15 15:15:56 2014 -0700
arm64: adjust el0_sync so that a function can be called
Backport of the following patch to 3.14 LSK:
commit 6ab6463aeb5fbc75fa3227befb508fc33b34dbf1
Author: Larry Bassel <larry.bassel@linaro.org>
Date: Fri May 30 20:34:14 2014 +0100
Signed-off-by: Luke Starrett <lstarret@broadcom.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
-rw-r--r-- | arch/arm64/kernel/entry.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index e59b7b3500fc..279cd3956b2a 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -526,6 +526,7 @@ el0_dbg: disable_step x1 mov x1, x25 mov x2, sp + adr lr, ret_from_exception b do_debug_exception el0_inv: ct_user_exit |