Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled

2021-04-13 Thread Will Deacon
On Mon, 12 Apr 2021 17:41:01 +0800, Jisheng Zhang wrote: > If instruction being single stepped caused a page fault, the kprobes > is cancelled to let the page fault handler continue as a normal page > fault. But the local irqflags are disabled so cpu will restore pstate > with DAIF masked. After

Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled

2021-04-12 Thread Masami Hiramatsu
On Mon, 12 Apr 2021 22:11:44 +0900 Masami Hiramatsu wrote: > Hi Jisheng, > > On Mon, 12 Apr 2021 17:41:01 +0800 > Jisheng Zhang wrote: > > > If instruction being single stepped caused a page fault, the kprobes > > is cancelled to let the page fault handler continue as a normal page > > fault.

Re: [PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled

2021-04-12 Thread Masami Hiramatsu
Hi Jisheng, On Mon, 12 Apr 2021 17:41:01 +0800 Jisheng Zhang wrote: > If instruction being single stepped caused a page fault, the kprobes > is cancelled to let the page fault handler continue as a normal page > fault. But the local irqflags are disabled so cpu will restore pstate > with DAIF

[PATCH] arm64: kprobes: Restore local irqflag if kprobes is cancelled

2021-04-12 Thread Jisheng Zhang
If instruction being single stepped caused a page fault, the kprobes is cancelled to let the page fault handler continue as a normal page fault. But the local irqflags are disabled so cpu will restore pstate with DAIF masked. After pagefault is serviced, the kprobes is triggerred again, we