android_kernel_oneplus_msm8998/arch/arm64
Will Deacon 9b228c19dd arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP
commit 3a402a709500c5a3faca2111668c33d96555e35a upstream.

When TIF_SINGLESTEP is set for a task, the single-step state machine is
enabled and we must take care not to reset it to the active-not-pending
state if it is already in the active-pending state.

Unfortunately, that's exactly what user_enable_single_step does, by
unconditionally setting the SS bit in the SPSR for the current task.
This causes failures in the GDB testsuite, where GDB ends up missing
expected step traps if the instruction being stepped generates another
trap, e.g. PTRACE_EVENT_FORK from an SVC instruction.

This patch fixes the problem by preserving the current state of the
stepping state machine when TIF_SINGLESTEP is set on the current thread.

Cc: <stable@vger.kernel.org>
Reported-by: Yao Qi <yao.qi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-07 15:23:42 +02:00
..
boot arm64: dts: rockchip: add reset saradc node for rk3368 SoCs 2016-09-07 08:32:41 +02:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/aes-ctr - fix NULL dereference in tail processing 2016-09-30 10:18:34 +02:00
include arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb() 2016-09-24 10:07:41 +02:00
kernel arm64: debug: avoid resetting stepping state machine when TIF_SINGLESTEP 2016-10-07 15:23:42 +02:00
kvm arm64: KVM: Configure TCR_EL2.PS at runtime 2016-09-15 08:27:43 +02:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: Add workaround for Cavium erratum 27456 2016-09-15 08:27:44 +02:00
net arm64: bpf: add 'store immediate' instruction 2015-12-03 11:38:31 -05:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 2016-09-15 08:27:47 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: DT updates for v4.4 2015-11-10 15:06:26 -08:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-03-03 15:07:08 -08:00