]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ptrace: fix compat hardware watchpoint reporting
authorWill Deacon <will.deacon@arm.com>
Fri, 22 Aug 2014 13:13:24 +0000 (14:13 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 28 Aug 2014 19:01:36 +0000 (20:01 +0100)
commit131a67fc410dd3e08c547e0d3712ea75af6e4fc3
tree1a78d6f0b2a8f0db791d6b7fdffa6f558ba054e4
parentd0a182b61cbaafc21187fe4c4a4ef782b295f62a
arm64: ptrace: fix compat hardware watchpoint reporting

I'm not sure what I was on when I wrote this, but when iterating over
the hardware watchpoint array (hbp_watch_array), our index is off by
ARM_MAX_BRP, so we walk off the end of our thread_struct...

... except, a dodgy condition in the loop means that it never executes
at all (bp cannot be NULL).

This patch fixes the code so that we remove the bp check and use the
correct index for accessing the watchpoint structures.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/hw_breakpoint.h
arch/arm64/kernel/ptrace.c