]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
authorWill Deacon <will.deacon@arm.com>
Thu, 18 Oct 2012 14:17:00 +0000 (15:17 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 18 Oct 2012 19:15:34 +0000 (20:15 +0100)
commit8bc9779601b036d9609fe014c60845c0d3c53532
tree78bd55aae0bcfba26dbedeb93471e13635f90c67
parent35b9c56b17acfe47173728d72ee97dff2aec4c8b
arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints

If a debugger tries to zero a hardware debug control register, the
kernel will try to infer both the type and length of the breakpoint
in order to sanity-check against the requested regset type. This will
fail because the encoding will appear as a zero-length breakpoint.

This patch changes the control register setting so that disabled
breakpoints are treated as HW_BREAKPOINT_EMPTY and no further
sanity-checking is required.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/ptrace.c