Re: [PATCH 5.4] arm64: kprobes: Use BRK instead of single-step when executing instructions out-of-line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 15, 2022 at 09:59:23AM +0800, Mark-PK Tsai wrote:
> From: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
> Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
> Link: https://lore.kernel.org/r/20201103134900.337243-1-jean-philippe@xxxxxxxxxx
> Signed-off-by: Will Deacon <will@xxxxxxxxxx>
> Link: https://lore.kernel.org/lkml/20220610063619.7921-1-mark-pk.tsai@xxxxxxxxxxxx/
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>

Now queued up, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux