Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-18 Thread Masami Hiramatsu
On Sat, 16 May 2020 09:17:21 -0700 Doug Anderson wrote: > Hi, > > On Sat, May 16, 2020 at 1:47 AM liwei (GF) wrote: > > > > >> - kprobes_save_local_irqflag(kcb, regs); > > >> + kernel_prepare_single_step(>saved_irqflag, regs); > > > > > > Is there some reason to

Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-16 Thread Doug Anderson
Hi, On Sat, May 16, 2020 at 1:47 AM liwei (GF) wrote: > > >> - kprobes_save_local_irqflag(kcb, regs); > >> + kernel_prepare_single_step(>saved_irqflag, regs); > > > > Is there some reason to have two functions? It seems like every time > > you call

Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-16 Thread liwei (GF)
Hi Douglas, On 2020/5/14 8:21, Doug Anderson wrote: (SNIP) >> +/* >> + * Interrupts need to be disabled before single-step mode is set, and not >> + * reenabled until after single-step mode ends. >> + * Without disabling interrupt on local CPU, there is a chance of >> + * interrupt occurrence in

Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-13 Thread Doug Anderson
Hi, On Sat, May 9, 2020 at 6:49 AM Wei Li wrote: > > PSTATE.I and PSTATE.D are very important for single-step working. > > Without disabling interrupt on local CPU, there is a chance of > interrupt occurrence in the period of exception return and start of > out-of-line single-step, that result

Re: [PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-10 Thread Masami Hiramatsu
Hi Wei, On Sun, 10 May 2020 05:41:57 +0800 Wei Li wrote: > PSTATE.I and PSTATE.D are very important for single-step working. > > Without disabling interrupt on local CPU, there is a chance of > interrupt occurrence in the period of exception return and start of > out-of-line single-step, that

[PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-09 Thread Wei Li
PSTATE.I and PSTATE.D are very important for single-step working. Without disabling interrupt on local CPU, there is a chance of interrupt occurrence in the period of exception return and start of out-of-line single-step, that result in wrongly single stepping into the interrupt handler. And if D