diff options
author | Lin Yongting <linyongting@gmail.com> | 2014-11-26 14:38:33 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-11-27 17:00:25 +0100 |
commit | 279f487e0b471577e2b3c134e2ff9af939129d0f (patch) | |
tree | 6c772b214b5110c695a2774a5785489bc5c6cfc9 /arch/arm/lib/copy_from_user.S | |
parent | ARM: 8224/1: Add unwinding support for memmove function (diff) | |
download | linux-279f487e0b471577e2b3c134e2ff9af939129d0f.tar.xz linux-279f487e0b471577e2b3c134e2ff9af939129d0f.zip |
ARM: 8225/1: Add unwinding support for memory copy functions
The memory copy functions(memcpy, __copy_from_user, __copy_to_user)
never had unwinding annotations added. Currently, when accessing
invalid pointer by these functions occurs the backtrace shown will
stop at these functions or some completely unrelated function.
Add unwinding annotations in hopes of getting a more useful backtrace
in following cases:
1. die on accessing invalid pointer by these functions
2. kprobe trapped at any instruction within these functions
3. interrupted at any instruction within these functions
Signed-off-by: Lin Yongting <linyongting@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/lib/copy_from_user.S')
-rw-r--r-- | arch/arm/lib/copy_from_user.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/lib/copy_from_user.S b/arch/arm/lib/copy_from_user.S index 66a477a3e3cc..7a235b9952be 100644 --- a/arch/arm/lib/copy_from_user.S +++ b/arch/arm/lib/copy_from_user.S @@ -12,6 +12,7 @@ #include <linux/linkage.h> #include <asm/assembler.h> +#include <asm/unwind.h> /* * Prototype: @@ -77,6 +78,10 @@ stmdb sp!, {r0, r2, r3, \reg1, \reg2} .endm + .macro usave reg1 reg2 + UNWIND( .save {r0, r2, r3, \reg1, \reg2} ) + .endm + .macro exit reg1 reg2 add sp, sp, #8 ldmfd sp!, {r0, \reg1, \reg2} |