Re: [PATCH] LoongArch: ptrace: Merge ptrace_hbp_set_*()
From: Tiezhu Yang
Date: Tue Nov 04 2025 - 22:12:44 EST
Hi Bill,
On 2025/11/5 上午8:57, Huacai Chen wrote:
Hi, Tiezhu,
On Wed, Oct 29, 2025 at 11:38 PM Bill Tsui <b10902118@xxxxxxxxxx> wrote:
What do you think about it?
In hw_break_set(), those functions actually can be combined into one.
This eliminates intermediate calls to modify_user_hw_breakpoint() that
may leave hardware registers in a partially updated state.
This redundancy was originally found in ARM ptrace, where it caused
non-4-byte address alignment checks to fail.
Link:
https://lore.kernel.org/all/20251018133731.42505-2-b10902118@xxxxxxxxxx/
The LoongArch implementation appears to have been derived from ARM,
so this refactor helps avoid the same issue and simplifies future
maintenance.
Can you describe directly what is wrong with the current code
on LoongArch? Please do not show the ARM's under-review patch
link in the commit message.
Does this patch fix real problem? If there is a test case to
reproduce the problem, please add it into the commit message.
If there is no functional change, just to refactor the code or
avoid the potential issues, please give a explicit description.
We will test GDB to see whether there is a regression.
Thanks,
Tiezhu