linux/arch
Frederic Weisbecker a1e80fafc9 x86: Send a SIGTRAP for user icebp traps
Before we had a generic breakpoint layer, x86 used to send a
sigtrap for any debug event that happened in userspace,
except if it was caused by lazy dr7 switches.

Currently we only send such signal for single step or breakpoint
events.

However, there are three other kind of debug exceptions:

- debug register access detected: trigger an exception if the
  next instruction touches the debug registers. We don't use
  it.
- task switch, but we don't use tss.
- icebp/int01 trap. This instruction (0xf1) is undocumented and
  generates an int 1 exception. Unlike single step through TF
  flag, it doesn't set the single step origin of the exception
  in dr6.

icebp then used to be reported in userspace using trap signals
but this have been incidentally broken with the new breakpoint
code. Reenable this. Since this is the only debug event that
doesn't set anything in dr6, this is all we have to check.

This fixes a regression in Wine where World Of Warcraft got broken
as it uses this for software protection checks purposes. And
probably other apps do.

Reported-and-tested-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: 2.6.33.x 2.6.34.x <stable@kernel.org>
2010-06-30 16:16:20 +02:00
..
alpha asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h 2010-05-27 09:12:54 -07:00
arm Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6 2010-05-30 09:13:08 -07:00
avr32 avr32: use asm-generic/scatterlist.h 2010-05-27 09:12:54 -07:00
blackfin blackfin: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
cris cris: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
frv FRV: ARCH_KMALLOC_MINALIGN was already defined 2010-05-28 10:17:21 -07:00
h8300 h8300: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
ia64 ia64: revert __node_random addition 2010-05-30 10:08:03 -07:00
m32r m32r: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
m68k Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k 2010-05-27 10:19:19 -07:00
m68knommu arch/m68knommu/platform/68360/commproc.c: Checkpatch cleanup 2010-05-24 14:44:25 +10:00
microblaze asm-generic: remove ARCH_HAS_SG_CHAIN in scatterlist.h 2010-05-27 09:12:54 -07:00
mips mips: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
mn10300 mn10300: use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
parisc Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 2010-05-30 09:02:02 -07:00
powerpc powerpc/oprofile: fix potential buffer overrun in op_model_cell.c 2010-06-07 11:18:56 +02:00
s390 Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6 2010-05-27 10:48:46 -07:00
score asm-generic: remove ISA_DMA_THRESHOLD in scatterlist.h 2010-05-27 09:12:54 -07:00
sh asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len() 2010-05-27 09:12:54 -07:00
sparc Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-05-27 15:23:47 -07:00
um Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing 2010-05-24 08:01:10 -07:00
x86 x86: Send a SIGTRAP for user icebp traps 2010-06-30 16:16:20 +02:00
xtensa xtensa: use use asm-generic/scatterlist.h 2010-05-27 09:12:55 -07:00
.gitignore
Kconfig hw-breakpoints: Separate constraint space for data and instruction breakpoints 2010-05-01 04:32:11 +02:00