linux_dsm_epyc7002/arch
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
..
alpha remove dma64_addr_t 2011-03-23 19:47:18 -07:00
arm ARM: 6836/1: kprobes/fix emulation of LDR/STR instruction when Rn == PC 2011-03-28 19:01:16 +01:00
avr32 Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 20:24:05 -07:00
blackfin Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin 2011-03-24 08:24:28 -07:00
cris remove dma64_addr_t 2011-03-23 19:47:18 -07:00
frv bitops: remove minix bitops from asm/bitops.h 2011-03-23 19:46:22 -07:00
h8300 Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 20:24:05 -07:00
ia64 lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
m32r Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 20:24:05 -07:00
m68k m68k: merge m68k and m68knommu arch directories 2011-03-25 14:05:13 +10:00
microblaze bitops: introduce CONFIG_GENERIC_FIND_BIT_LE 2011-03-23 19:46:14 -07:00
mips MIPS: JZ4740: Set nand ecc offsets for the qi_lb60 board 2011-03-25 18:45:21 +01:00
mn10300 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-mn10300 2011-03-24 10:07:50 -07:00
parisc lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
powerpc lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2011-03-25 17:47:04 -07:00
score mm: NUMA aware alloc_thread_info_node() 2011-03-22 17:44:01 -07:00
sh 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
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2011-03-25 17:47:38 -07:00
tile lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
um um: Use generic show_interrupts() 2011-03-24 20:35:57 +01:00
unicore32 lib, arch: add filter argument to show_mem and fix private implementations 2011-03-24 17:49:37 -07:00
x86 Merge branch 'syscore' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6 2011-03-25 21:07:59 -07:00
xtensa Merge branch 'irq-cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-25 20:24:05 -07:00
.gitignore
Kconfig oprofile, s390: Cleanups 2011-03-16 14:30:40 +01:00