android_kernel_motorola_sm6225/arch/arm
Nikola Valerjev 22f975f4ff [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix
Patch from Nikola Valerjev

Single stepping an application using ptrace() fails over ARM instructions BX and BLX.

Steps to reproduce:

Compile and link the following files

main.c
-----
void foo();
int main() {
    foo();
    return 0;
}

foo.s
-----
	.text
	.globl foo
foo:
	BX LR

Using ptrace() functionality, run to main(), and start singlestepping.
Singlestep over \"BX LR\" instruction won\'t transfer the control back
to main, but run the code to completion.

This problems seems to be in the function get_branch_address() in
arch/arm/kernel/ptrace.c. The function doesn\'t seem to recognize BX
and BLX instructions as branches. BX and BLX instructions can be used
to convert from ARM to Thumb mode if the target address has the low
bit set. However, they are also perfectly legal in the ARM only mode.
Although other things in the kernel seem to indicate that only ARM
mode is accepted (and not Thumb), many compilers will generate BX
and BLX instructions even when generating ARM only code.

Signed-off-by: Nikola Valerjev <nikola@ghs.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-10 11:59:15 +00:00
..
boot [ARM] compressed/head.S debugging defaults to asm/arch/debug-macro.S 2005-11-16 14:59:51 +00:00
common [ARM] sa1111.c needs asm/sizes.h 2005-11-16 18:29:51 +00:00
configs [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
kernel [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix 2005-12-10 11:59:15 +00:00
lib [ARM] Fix get_user when passed a const pointer 2005-11-18 14:22:03 +00:00
mach-aaec2000 [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
mach-clps711x [PATCH] ARM: Reverted 2918/1: [update] Base port of Comdial MP1000 platfrom 2005-11-04 17:28:34 +00:00
mach-clps7500 [ARM] Shut up gcc warning in clps7500 core.c 2005-11-21 17:03:15 +00:00
mach-ebsa110 [ARM] Convert EBSA110 network driver to a platform driver 2005-10-31 17:14:57 +00:00
mach-epxa10db [PATCH] fix remaining missing includes 2005-11-07 07:53:41 -08:00
mach-footbridge [ARM] Re-fix footbridge 2005-11-13 09:53:34 +00:00
mach-h720x Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
mach-imx Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
mach-integrator [PATCH] kfree cleanup: arch 2005-11-07 07:54:06 -08:00
mach-iop3xx Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
mach-ixp4xx [ARM] Fix IXDP425 setup bug 2005-12-01 15:50:35 +00:00
mach-ixp2000 [ARM] 3121/1: unconditionally use XCB=101 on ixp2000 2005-11-07 21:12:09 +00:00
mach-l7200 [ARM] 2980/1: Fix L7200 core.c compile 2005-10-14 12:49:15 +01:00
mach-lh7a40x Create platform_device.h to contain all the platform device details. 2005-10-29 19:07:23 +01:00
mach-omap1 [ARM] 3141/1: OMAP 1/5: Update omap1 specific files 2005-11-10 14:26:48 +00:00
mach-omap2 [ARM] 3146/1: OMAP 3b/5: Add omap24xx clock framework 2005-11-10 14:26:52 +00:00
mach-pxa [ARM] 3188/1: Add missing i2c dependency for Akita 2005-12-01 15:52:47 +00:00
mach-realview [ARM] Realview core.c does not need mach-types.h 2005-11-25 15:57:21 +00:00
mach-rpc [ARM] 2989/1: Replace map_desc.physical with map_desc.pfn: RiscPC 2005-10-28 15:19:02 +01:00
mach-s3c2410 [ARM] 3161/1: BAST - fix commas on end of structs 2005-11-16 15:05:12 +00:00
mach-sa1100 [ARM] Shut up gcc warning in assabet.c 2005-11-21 17:01:13 +00:00
mach-shark [ARM] 2991/1: Replace map_desc.physical with map_desc.pfn: Shark 2005-10-28 15:19:03 +01:00
mach-versatile Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-10-31 07:32:56 -08:00
mm [ARM SMP] Disable lazy flush_dcache_page for SMP 2005-11-30 16:02:54 +00:00
nwfpe [ARM] 3118/1: fix and reenable nwfpe extended precision emulation for big-endian 2005-11-07 21:12:08 +00:00
oprofile [PATCH] mm: kill check_user_page_readable 2005-10-29 21:40:41 -07:00
plat-omap [ARM] Include asm/hardware.h instead of asm/arch/hardware.h 2005-11-16 14:51:20 +00:00
tools [ARM] Update mach-types 2005-11-25 15:59:01 +00:00
vfp kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
Kconfig [ARM] Use kernel/power/Kconfig 2005-11-15 11:31:41 +00:00
Kconfig.debug [ARM] Fix typo in arch/arm/Kconfig.debug 2005-09-09 15:57:17 +01:00
Makefile [ARM] 3145/1: OMAP 3a/5: Add support for omap24xx 2005-11-10 14:26:51 +00:00