Archived
14
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/arch/arm/kernel
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
..
apm.c [PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h 2005-11-13 18:14:10 -08:00
armksyms.c [ARM] Fix get_user when passed a const pointer 2005-11-18 14:22:03 +00:00
arthur.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
asm-offsets.c [ARM] 3060/1: allow constants found in asm/memory.h to be used in asm code 2005-10-29 21:44:55 +01:00
bios32.c [PATCH] pci and yenta: pcibios_bus_to_resource 2005-08-04 21:32:46 -07:00
calls.S [ARM] 2896/1: Add sys_ipc_wrapper to pass 'fifth' argument on stack 2005-09-13 22:55:00 +01:00
compat.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
debug.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dma-isa.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dma.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ecard.c [ARM] Fix second missing declaration of cache_is_vivt() 2005-11-06 19:47:04 +00:00
entry-armv.S [ARM SMP] Add core ARM support for local timers 2005-11-08 19:08:05 +00:00
entry-common.S [ARM] 3168/1: Update ARM signal delivery and masking 2005-11-19 10:01:07 +00:00
entry-header.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
fiq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
head.S [ARM] Remove mach-types.h from head.S 2005-11-25 15:43:22 +00:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io.c [ARM] Fix compiler warnings for memcpy_toio/memcpy_fromio/memset_io 2005-09-24 10:42:06 +01:00
irq.c [ARM SMP] Add core ARM support for local timers 2005-11-08 19:08:05 +00:00
isa.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
iwmmxt.S kbuild: arm - use generic asm-offsets.h support 2005-09-09 21:08:59 +02:00
Makefile [ARM] 3061/1: cleanup the XIP link address mess 2005-10-29 21:44:56 +01:00
module.c [ARM] Fix sparse warnings 2005-10-28 14:29:43 +01:00
process.c Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-09 08:55:53 -08:00
ptrace.c [ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fix 2005-12-10 11:59:15 +00:00
ptrace.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
semaphore.c [ARM] Fix warning in arch/arm/kernel/semaphore.c 2005-09-18 21:49:29 +01:00
setup.c [ARM] Fix /proc/cpuinfo format for ARM SMP 2005-11-06 21:41:08 +00:00
signal.c [ARM] 3168/1: Update ARM signal delivery and masking 2005-11-19 10:01:07 +00:00
signal.h [PATCH] ARM: Move signal return code into vector page 2005-06-22 20:26:05 +01:00
smp.c [ARM] Restore apparant pointless change in arch/arm/kernel/smp.c 2005-11-12 17:21:47 +00:00
sys_arm.c [ARM] 2952/1: fix a register clobber list 2005-10-04 23:17:53 +01:00
time.c [PATCH] jiffies_64 cleanup 2005-10-30 17:37:25 -08:00
traps.c [ARM] Re-organise die() 2005-10-30 19:01:43 +00:00
vmlinux.lds.S [ARM] Improve comment about ASSERT()s in vmlinux.lds.S 2005-11-17 16:43:14 +00:00