mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
8df137300d
Currently we call an on_accessible_stack() callback for each step of the unwinder, requiring redundant work to be performed in the core of the unwind loop (e.g. disabling preemption around accesses to per-cpu variables containing stack boundaries). To prevent unwind loops which go through a stack multiple times, we have to track the set of unwound stacks, requiring a stack_type enum which needs to cater for all the stacks of all possible callees. To prevent loops within a stack, we must track the prior FP values. This patch reworks the unwinder to minimize the work in the core of the unwinder, and to remove the need for the stack_type enum. The set of accessible stacks (and their boundaries) are determined at the start of the unwind, and the current stack is tracked during the unwind, with completed stacks removed from the set of accessible stacks. This makes the boundary checks more accurate (e.g. detecting overlapped frame records), and removes the need for separate tracking of the prior FP and visited stacks. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Kalesh Singh <kaleshsingh@google.com> Reviewed-by: Madhavan T. Venkataraman <madvenka@linux.microsoft.com> Reviewed-by: Mark Brown <broonie@kernel.org> Cc: Fuad Tabba <tabba@google.com> Cc: Marc Zyngier <maz@kernel.org> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20220901130646.1316937-9-mark.rutland@arm.com Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> |
||
---|---|---|
.. | ||
hyp | ||
vgic | ||
.gitignore | ||
arch_timer.c | ||
arm.c | ||
debug.c | ||
fpsimd.c | ||
guest.c | ||
handle_exit.c | ||
hypercalls.c | ||
inject_fault.c | ||
irq.h | ||
Kconfig | ||
Makefile | ||
mmio.c | ||
mmu.c | ||
pkvm.c | ||
pmu-emul.c | ||
pmu.c | ||
psci.c | ||
pvtime.c | ||
reset.c | ||
stacktrace.c | ||
sys_regs.c | ||
sys_regs.h | ||
trace_arm.h | ||
trace_handle_exit.h | ||
trace.h | ||
trng.c | ||
va_layout.c | ||
vgic-sys-reg-v3.c | ||
vmid.c |