]> www.infradead.org Git - users/willy/xarray.git/commit
LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint
authorTiezhu Yang <yangtiezhu@loongson.cn>
Sat, 20 Jul 2024 14:41:07 +0000 (22:41 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 20 Jul 2024 14:41:07 +0000 (22:41 +0800)
commit3892b11eac5aaaeefbf717f1953288b77759d9e2
tree110403ad3c278f4c524c40f193fc86bd12561c3c
parent0d3a6322021b8c98527842518eeb685f3a8761c8
LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint

Currently, there are some places to set CSR.PRMD.PWE, the first one is
in hw_breakpoint_thread_switch() to enable user space singlestep via
checking TIF_SINGLESTEP, the second one is in hw_breakpoint_control() to
enable user space watchpoint. For the latter case, it should also check
TIF_LOAD_WATCH to make the logic correct and clear.

Fixes: c8e57ab0995c ("LoongArch: Trigger user-space watchpoints correctly")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/kernel/hw_breakpoint.c
arch/loongarch/kernel/ptrace.c