]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: 7496/1: hw_breakpoint: don't rely on dfsr to show watchpoint access type
authorWill Deacon <will.deacon@arm.com>
Thu, 16 Aug 2012 17:55:44 +0000 (18:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:38:58 +0000 (10:38 -0700)
commit868e5529c2686befc556cca687069bea4d426326
treed5de92e5acae940335e26a92645db6d8dc4ca56a
parent613401671e4b54a5814c49c8c81917fcb3435292
ARM: 7496/1: hw_breakpoint: don't rely on dfsr to show watchpoint access type

commit bf8801145c01ab600f8df66e8c879ac642fa5846 upstream.

From ARM debug architecture v7.1 onwards, a watchpoint exception causes
the DFAR to be updated with the faulting data address. However, DFSR.WnR
takes an UNKNOWN value and therefore cannot be used in general to
determine the access type that triggered the watchpoint.

This patch forbids watchpoints without an overflow handler from
specifying a specific access type (load/store). Those with overflow
handlers must be able to handle false positives potentially triggered by
a watchpoint of a different access type on the same address. For
SIGTRAP-based handlers (i.e. ptrace), this should have no impact.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/hw_breakpoint.c