linux/arch
Frederic Weisbecker 89e45aac42 x86: Fix instruction breakpoint encoding
Lengths and types of breakpoints are encoded in a half byte
into CPU registers. However when we extract these values
and store them, we add a high half byte part to them: 0x40 to the
length and 0x80 to the type.
When that gets reloaded to the CPU registers, the high part
is masked.

While making the instruction breakpoints available for perf,
I zapped that high part on instruction breakpoint encoding
and that broke the arch -> generic translation used by ptrace
instruction breakpoints. Writing dr7 to set an inst breakpoint
was then failing.

There is no apparent reason for these high parts so we could get
rid of them altogether. That's an invasive change though so let's
do that later and for now fix the problem by restoring that inst
breakpoint high part encoding in this sole patch.

Reported-by: Kelvie Wong <kelvie@ieee.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Will Deacon <will.deacon@arm.com>
2010-09-17 03:24:13 +02:00
..
alpha alpha: Fix printk format errors 2010-09-01 11:25:17 -04:00
arm Merge branch 'at91-fixes-for-linus' of git://github.com/at91linux/linux-2.6-at91 2010-09-10 07:24:51 -07:00
avr32 Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
blackfin Blackfin: bf52x/bf54x boards: drop unused nand page size 2010-08-27 16:08:43 -04:00
cris Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
frv Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
h8300 h8300: Fix missing consts in kernel_execve() 2010-09-07 13:52:28 -07:00
ia64 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-08-28 13:55:31 -07:00
m32r Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2010-08-18 09:27:10 -07:00
m68knommu m68knommu: fix missing linker segments 2010-09-07 13:55:30 -07:00
microblaze Merge branch 'merge-devicetree' of git://git.secretlab.ca/git/linux-2.6 2010-08-18 09:26:17 -07:00
mips Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
mn10300 arch/mn10300/mm: eliminate NULL dereference 2010-08-23 11:41:24 -07:00
parisc Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
powerpc arch/powerpc/include/asm/fsldma.h needs slab.h 2010-09-09 18:57:24 -07:00
s390 [S390] fix tlb flushing vs. concurrent /proc accesses 2010-08-24 09:26:34 +02:00
score Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sh Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2010-09-11 08:01:09 -07:00
tile Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2010-08-28 13:55:31 -07:00
x86 x86: Fix instruction breakpoint encoding 2010-09-17 03:24:13 +02:00
xtensa Make do_execve() take a const filename pointer 2010-08-17 18:07:43 -07:00
.gitignore
Kconfig kprobes: Fix Kconfig dependency 2010-09-13 20:41:31 +02:00