From ba80dd86505931f81802a8445d2d6357c8caa4c4 Mon Sep 17 00:00:00 2001 From: "Shiratori, Takehiro" Date: Wed, 18 Sep 2019 22:15:40 +0900 Subject: [PATCH] arm64: Fix for ptrace instruction rewrite on thunder-x2. - Fixed the problem that instruction rewriting by PTRACE_POKETEXT is not reflected. The cause is that the instruction cache was not flushed. - Add instruction chache flush in ptrace_report_signal(). Change-Id: Ie9d34d3d33e1fd85aef5fe419345d82c6ca781fb --- arch/arm64/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 95422326..4f01c8a3 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1011,6 +1011,7 @@ void ptrace_report_signal(struct thread *thread, int sig) if (sig == ((SIGTRAP | (PTRACE_EVENT_EXEC << 8)))) { memcpy(thread->ctx.thread, &tinfo, sizeof(struct thread_info)); } + arch_flush_icache_all(); } long