arm64: kgdb: handle read-only text / modules
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 23 Sep 2016 07:42:08 +0000 (16:42 +0900)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 23 Sep 2016 10:25:01 +0000 (11:25 +0100)
commit67787b68ec48c239d5ec12f9bf5adaf5c459517a
tree807c1243a2458bb8a83d527c4970ad48840f87ee
parentc18df0adabf8400c1825b90382d06df5edc303fa
arm64: kgdb: handle read-only text / modules

Handle read-only cases when CONFIG_DEBUG_RODATA (4.0) or
CONFIG_DEBUG_SET_MODULE_RONX (3.18) are enabled by using
aarch64_insn_write() instead of probe_kernel_write() as introduced by
commit 2f896d586610 ("arm64: use fixmap for text patching") in 4.0.

Fixes: 11d91a770f1f ("arm64: Add CONFIG_DEBUG_SET_MODULE_RONX support")
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/debug-monitors.h
arch/arm64/kernel/kgdb.c