linux-hardened/arch/arm64
Will Deacon cdc27c2784 arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events
Commit 8f34a1da35 ("arm64: ptrace: use HW_BREAKPOINT_EMPTY type for
disabled breakpoints") fixed an issue with GDB trying to zero breakpoint
control registers. The problem there is that the arch hw_breakpoint code
will attempt to create a (disabled), execute breakpoint of length 0.

This will fail validation and report unexpected failure to GDB. To avoid
this, we treated disabled breakpoints as HW_BREAKPOINT_EMPTY, but that
seems to have broken with recent kernels, causing watchpoints to be
treated as TYPE_INST in the core code and returning ENOSPC for any
further breakpoints.

This patch fixes the problem by prioritising the `enable' field of the
breakpoint: if it is cleared, we simply update the perf_event_attr to
indicate that the thing is disabled and don't bother changing either the
type or the length. This reinforces the behaviour that the breakpoint
control register is essentially read-only apart from the enable bit
when disabling a breakpoint.

Cc: <stable@vger.kernel.org>
Reported-by: Aaron Liu <liucy214@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2013-12-19 17:41:25 +00:00
..
boot arm64: dts: Reserve the memory used for secondary CPU release address 2013-11-25 16:44:04 +00:00
configs arm64: defconfig: Enable CONFIG_PREEMPT by default 2013-11-05 10:03:53 +00:00
include arm64: mm: Fix PMD_SECT_PROT_NONE definition 2013-12-06 17:22:44 +00:00
kernel arm64: ptrace: avoid using HW_BREAKPOINT_EMPTY for disabled events 2013-12-19 17:41:25 +00:00
kvm Here are the 3.13 KVM changes. There was a lot of work on the PPC 2013-11-15 13:51:36 +09:00
lib arm64: Treat the bitops index argument as an 'int' 2013-05-08 10:33:17 +01:00
mm arm64: ensure completion of TLB invalidatation 2013-12-06 17:21:49 +00:00
xen xen/arm,arm64: enable SWIOTLB_XEN 2013-10-10 13:40:44 +00:00
Kconfig arm64: make default NR_CPUS 8 2013-12-06 17:21:50 +00:00
Kconfig.debug arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
Makefile arm64: big-endian: add big-endian support to top-level arch Makefile 2013-10-25 15:59:31 +01:00