Re: [PATCH] Powerpc/Watchpoint: Restore nvgprs while returning from exception

From: Ravi Bangoria
Date: Thu Jun 06 2019 - 04:35:24 EST




On 6/6/19 12:59 PM, Ravi Bangoria wrote:
> Powerpc hw triggers watchpoint before executing the instruction.
> To make trigger-after-execute behavior, kernel emulates the
> instruction. If the instruction is 'load something into non-
> volatile register', exception handler should restore emulated
> register state while returning back, otherwise there will be
> register state corruption. Ex, Adding a watchpoint on a list
> can corrput the list:
>
> # cat /proc/kallsyms | grep kthread_create_list
> c00000000121c8b8 d kthread_create_list
>
> Add watchpoint on kthread_create_list->next:

s/kthread_create_list->next/kthread_create_list->prev/