arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
authorDave Martin <Dave.Martin@arm.com>
Wed, 18 Jan 2017 16:25:24 +0000 (16:25 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 18 Jan 2017 18:05:12 +0000 (18:05 +0000)
commitad9e202aa1ce571b1d7fed969d06f66067f8a086
tree75379a242a506cf3d3195946e9c2c1b755708979
parentaeb1f39d814b2e21e5e5706a48834bfd553d0059
arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields

We cannot preserve partial fields for hardware breakpoints, because
the values written by userspace to the hardware breakpoint
registers can't subsequently be recovered intact from the hardware.

So, just reject attempts to write incomplete fields with -EINVAL.

Cc: <stable@vger.kernel.org> # 3.7.x-
Fixes: 478fcb2cdb23 ("arm64: Debugging support")
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Acked-by: Will Deacon <Will.Deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/ptrace.c