linux-stable/arch/arm64/kernel/probes
Jisheng Zhang 509ae27a18 arm64: kprobes: Restore local irqflag if kprobes is cancelled
[ Upstream commit 738fa58ee1 ]

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 overwrite the saved_irqflag by calling
kprobes_save_local_irqflag(). NOTE, DAIF is masked in this new saved
irqflag. After kprobes is serviced, the cpu pstate is retored with
DAIF masked.

This patch is inspired by one patch for riscv from Liao Chang.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210412174101.6bfb0594@xhacker.debian
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-04-28 13:40:02 +02:00
..
decode-insn.c arm64: kprobe: clarify the comment of steppable hint instructions 2020-09-14 12:07:03 +01:00
decode-insn.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
kprobes.c arm64: kprobes: Restore local irqflag if kprobes is cancelled 2021-04-28 13:40:02 +02:00
kprobes_trampoline.S arm64: kernel: Convert to modern annotations for assembly functions 2020-05-04 12:46:03 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
simulate-insn.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
simulate-insn.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
uprobes.c arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing 2021-03-04 11:38:36 +01:00