]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc/hw_brk: Fix setting of length for exact mode breakpoints
authorMichael Neuling <mikey@neuling.org>
Mon, 24 Jun 2013 05:47:22 +0000 (15:47 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 25 Jun 2013 07:24:39 +0000 (17:24 +1000)
commitb0b0aa9c7faf94e92320eabd8a1786c7747e40a8
tree6b93f3c7d29c8e8b2b4d65f72dafe0693ea0ae20
parente7f345a2a36754e43673e86870a7a89101fb13e3
powerpc/hw_brk: Fix setting of length for exact mode breakpoints

The smallest match region for both the DABR and DAWR is 8 bytes, so the
kernel needs to filter matches when users want to look at regions smaller than
this.

Currently we set the length of PPC_BREAKPOINT_MODE_EXACT breakpoints to 8.
This is wrong as in exact mode we should only match on 1 address, hence the
length should be 1.

This ensures that the kernel will filter out any exact mode hardware breakpoint
matches on any addresses other than the requested one.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Reported-by: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/ptrace.c