kernel-ark/arch/arm
Viktor Rosendahl 0652f06736 ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC
The Rn value from the emulation is unconditionally written back;
this is fine as long as Rn != PC because in that case, even if the
instruction isn't a write back instruction, it will only result in the
same value being written back.

In case Rn == PC, then the emulated instruction doesn't have the
actual PC value in Rn but an adjusted value; when this is written
back, it will result in the PC being incorrectly updated.

An altenative solution would be to check bits 24 and 22 to see whether
the instruction actually is a write back instruction or not. I think
it's enough to check whether Rn != PC,  because:
- it's looks cheaper than the alternative
- to my understaning it's not permitted to update the PC with a write
back instruction, so we don't lose any ability to emulate legal
instructions.
- in case of writing back for non write back instructions where Rn != PC, it doesn't matter because the values are the same.

Regarding the second point above, it would possibly be prudent to add
some checking to prep_emulate_ldr_str(), so that instructions with
both write back and Rn == PC would be rejected.

Signed-off-by: Viktor Rosendahl <viktor.rosendahl@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-03-28 19:01:16 +01:00
..
boot mmc: Add MMC_PROGRESS_* 2011-03-25 01:24:57 +09:00
common Merge branch 'misc' into devel 2011-03-16 23:35:25 +00:00
configs Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra 2011-03-24 09:33:14 -07:00
include/asm Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-23 20:37:26 -07:00
kernel ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC 2011-03-28 19:01:16 +01:00
lib Merge branches 'fixes', 'pgt-next' and 'versatile' into devel 2011-03-20 09:32:12 +00:00
mach-at91 Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-bcmring ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-clps711x Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-16 19:03:06 -07:00
mach-cns3xxx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-davinci Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-dove Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes 2011-03-28 18:57:19 +01:00
mach-ebsa110 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-ep93xx arm: ep93xx: Add basic interrupt info 2011-03-25 00:02:51 +01:00
mach-exynos4 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-23 20:37:26 -07:00
mach-footbridge Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-gemini Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-h720x ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-imx mfd: mfd_cell is now implicitly available to mc13xxx drivers 2011-03-23 10:41:54 +01:00
mach-integrator Merge branches 'fixes', 'pgt-next' and 'versatile' into devel 2011-03-20 09:32:12 +00:00
mach-iop13xx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-iop32x ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-iop33x ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-ixp4xx Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-ixp23xx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-ixp2000 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-kirkwood Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes 2011-03-28 18:57:19 +01:00
mach-ks8695 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-l7200/include/mach
mach-loki Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-lpc32xx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-mmp ARM: pxa2xx: reorganize I2C files 2011-03-21 09:09:33 +00:00
mach-msm Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-23 20:37:26 -07:00
mach-mv78xx0 Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-mx3 mfd: mfd_cell is now implicitly available to mc13xxx drivers 2011-03-23 10:41:54 +01:00
mach-mx5 ARM: imx5x: clean up ARCH_MX5X 2011-03-07 19:29:42 +01:00
mach-mxc91231 ARM: mxc91231/iomux: allow pin_list to be const 2011-03-07 19:29:28 +01:00
mach-mxs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2011-03-22 17:53:13 -07:00
mach-netx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-nomadik ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-ns9xxx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-nuc93x ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-omap1 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6 2011-03-17 19:28:15 -07:00
mach-omap2 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-03-24 09:50:13 -07:00
mach-orion5x Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into fixes 2011-03-28 18:57:19 +01:00
mach-pnx4008 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-pxa ARM: pxa2xx: reorganize I2C files 2011-03-21 09:09:33 +00:00
mach-realview ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile 2011-03-26 10:06:08 +00:00
mach-rpc ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-s3c24a0/include/mach ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-s3c64xx Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-s3c2400 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-s3c2410 ARM: H1940/RX1950: Change default LED triggers 2011-03-21 23:29:43 +00:00
mach-s3c2412 ARM: s3c24xx: Switch to common GPIO controlled UDC pullup implementation 2011-03-07 12:23:22 -08:00
mach-s3c2416 Merge branch 'next-s3c24xx' into for-next 2011-01-06 18:44:09 +09:00
mach-s3c2440 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2011-03-23 07:58:09 -07:00
mach-s3c2443 Merge branch 'next-s3c24xx' into for-next 2011-01-06 18:44:09 +09:00
mach-s5p64x0 Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-s5p6442 Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-s5pc100 Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-s5pv210 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2011-03-19 22:27:06 -07:00
mach-sa1100 Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-shark ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-shmobile Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2011-03-24 10:04:59 -07:00
mach-spear3xx ARM: 6794/1: SPEAr: Append UL to device address macros. 2011-03-09 09:50:04 +00:00
mach-spear6xx ARM: 6794/1: SPEAr: Append UL to device address macros. 2011-03-09 09:50:04 +00:00
mach-stmp37xx ARM: stmp37xx: irq_data conversion. 2011-01-13 17:19:02 +01:00
mach-stmp378x ARM: stmp378x: irq_data conversion. 2011-01-13 17:19:01 +01:00
mach-tcc8k Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-tegra Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra 2011-03-24 09:33:14 -07:00
mach-u300 Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-ux500 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-23 20:37:26 -07:00
mach-versatile Merge branches 'fixes', 'pgt-next' and 'versatile' into devel 2011-03-20 09:32:12 +00:00
mach-vexpress ARM: 6771/1: vexpress: add support for multiple core tiles 2011-03-20 09:32:21 +00:00
mach-vt8500 ARM: 6597/1: Add basic architecture support for VIA/WonderMedia 85xx SoC's 2011-01-25 15:07:01 +00:00
mach-w90x900 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mm lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
nwfpe
oprofile Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-02-15 10:18:48 -08:00
plat-iop Merge branch 'clksrc' into devel 2011-01-05 18:09:03 +00:00
plat-mxc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc 2011-03-18 22:32:40 -07:00
plat-nomadik arm/gpio: Remove three copies of broken and racy debug code 2011-03-25 00:02:51 +01:00
plat-omap Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 2011-03-24 09:50:13 -07:00
plat-orion ARM: Remove dependency of plat-orion GPIO code on mach directory includes. 2011-03-03 16:27:02 -05:00
plat-pxa ARM: pxa2xx: reorganize I2C files 2011-03-21 09:09:33 +00:00
plat-s3c24xx Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
plat-s5p ARM: EXYNOS4: Implement Clock gating for System MMU 2011-03-15 21:37:38 +09:00
plat-samsung Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
plat-spear Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
plat-stmp3xxx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
plat-tcc ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
plat-versatile ARM: 6759/1: smp: Select local timers vs broadcast timer support runtime 2011-02-23 17:54:27 +00:00
tools ARM: Update (and cut down) mach-types 2011-03-20 18:07:44 +00:00
vfp Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-03-20 18:14:55 -07:00
Kconfig Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-23 20:37:26 -07:00
Kconfig-nommu
Kconfig.debug Merge branch 'misc' into devel 2011-01-06 22:32:52 +00:00
Makefile Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00