On Wed, Jun 15, 2022 at 09:59:23AM +0800, Mark-PK Tsai wrote:
From: Jean-Philippe Brucker jean-philippe@linaro.org
commit 7ee31a3aa8f490c6507bc4294df6b70bed1c593e upstream.
Commit 36dadef23fcc ("kprobes: Init kprobes in early_initcall") enabled using kprobes from early_initcall. Unfortunately at this point the hardware debug infrastructure is not operational. The OS lock may still be locked, and the hardware watchpoints may have unknown values when kprobe enables debug monitors to single-step instructions.
Rather than using hardware single-step, append a BRK instruction after the instruction to be executed out-of-line.
Fixes: 36dadef23fcc ("kprobes: Init kprobes in early_initcall") Suggested-by: Will Deacon will@kernel.org Signed-off-by: Jean-Philippe Brucker jean-philippe@linaro.org Acked-by: Masami Hiramatsu mhiramat@kernel.org Link: https://lore.kernel.org/r/20201103134900.337243-1-jean-philippe@linaro.org Signed-off-by: Will Deacon will@kernel.org Link: https://lore.kernel.org/lkml/20220610063619.7921-1-mark-pk.tsai@mediatek.com... Cc: stable@vger.kernel.org Signed-off-by: Mark-PK Tsai mark-pk.tsai@mediatek.com
Now queued up, thanks.
greg k-h