[RFC PATCH v1 01/16] fixup! unwind_user: Add frame pointer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 kernel/unwind/user.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/unwind/user.c b/kernel/unwind/user.c
index 6e7ca9f1293a..d0181c636c6b 100644
--- a/kernel/unwind/user.c
+++ b/kernel/unwind/user.c
@@ -74,6 +74,7 @@ static int unwind_user_next(struct unwind_user_state *state)
 		goto done;
 	}
 
+	/* Get the Canonical Frame Address (CFA) */
 	if (frame->use_fp) {
 		if (state->fp < state->sp)
 			goto done;
@@ -81,11 +82,9 @@ static int unwind_user_next(struct unwind_user_state *state)
 	} else {
 		cfa = state->sp;
 	}
-
-	/* Get the Canonical Frame Address (CFA) */
 	cfa += frame->cfa_off;
 
-	/* stack going in wrong direction? */
+	/* Make sure that stack is not going in wrong direction */
 	if (cfa <= state->sp)
 		goto done;
 
@@ -94,10 +93,11 @@ static int unwind_user_next(struct unwind_user_state *state)
 	if ((cfa + frame->ra_off) & ((1 << shift) - 1))
 		goto done;
 
-	/* Find the Return Address (RA) */
+	/* Get the Return Address (RA) */
 	if (unwind_get_user_long(ra, cfa + frame->ra_off, state))
 		goto done;
 
+	/* Get the Frame Pointer (FP) */
 	if (frame->fp_off && unwind_get_user_long(fp, cfa + frame->fp_off, state))
 		goto done;
 
-- 
2.48.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux