]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/hw_brk: Fix off by one error when validating DAWR region end
authorMichael Neuling <mikey@neuling.org>
Mon, 1 Jul 2013 04:19:50 +0000 (14:19 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 1 Jul 2013 22:20:49 +0000 (08:20 +1000)
commita9cb6e055f278786bb7675334716904ce5cb7c1b
treebc7c89f204fbd0b2451fdb8d7b7fc5ca621add18
parentf4c28599ef0507a9feb0eae93c94d1554bc31e82
powerpc/hw_brk: Fix off by one error when validating DAWR region end

The Data Address Watchpoint Register (DAWR) on POWER8 can take a 512
byte range but this range must not cross a 512 byte boundary.

Unfortunately we were off by one when calculating the end of the region,
hence we were not allowing some breakpoint regions which were actually
valid.  This fixes this error.

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