freebsd-dev/sys/arm
Ian Lepore b19c9dea3e Rewrite arm kernel stack unwind code to work when unwinding through modules.
The arm kernel stack unwinder has apparently never been able to unwind when
the path of execution leads through a kernel module. There was code that
tried to handle modules by looking for the unwind data in them, but it did
so by trying to find symbols which have never existed in arm kernel
modules. That caused the unwind code to panic, and because part of panic
handling calls into the unwind code, that just created a recursion loop.

Locating the unwind data in a loaded module requires accessing the Elf
section headers to find the SHT_ARM_EXIDX section. For preloaded modules
those headers are present in a metadata blob. For dynamically loaded
modules, the headers are present only while the loading is in progress; the
memory is freed once the module is ready to use. For that reason, there is
new code in kern/link_elf.c, wrapped in #ifdef __arm__, to extract the
unwind info while the headers are loaded. The values are saved into new
fields in the linker_file structure which are also conditional on __arm__.

In arm/unwind.c there is new code to locally cache the per-module info
needed to find the unwind tables. The local cache is crafted for lockless
read access, because the unwind code often needs to run in context where
sleeping is not allowed.  A large comment block describes the local cache
list, so I won't repeat it all here.
2019-12-15 21:16:35 +00:00
..
allwinner Regularize my copyright notice 2019-12-04 16:56:11 +00:00
altera/socfpga o Add support for multi-port instances of Synopsys DesignWare APB GPIO 2019-09-04 15:37:24 +00:00
amlogic/aml8726 Implement missing MMCBR ivars 2019-07-04 14:15:04 +00:00
annapurna/alpine arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
arm Rewrite arm kernel stack unwind code to work when unwinding through modules. 2019-12-15 21:16:35 +00:00
broadcom/bcm2835 Be consistent about checking return value from bus_delayed_attach_children. 2019-12-13 21:39:20 +00:00
cloudabi32 Use uintptr_t instead of register_t * for the stack base. 2019-12-03 23:17:54 +00:00
conf Regularize my copyright notice 2019-12-04 16:56:11 +00:00
freescale Create new wrapper function: bus_delayed_attach_children() 2019-12-13 19:39:33 +00:00
include Rewrite arm kernel stack unwind code to work when unwinding through modules. 2019-12-15 21:16:35 +00:00
linux Regen after r355752. 2019-12-14 13:32:37 +00:00
mv Be consistent about checking return value from bus_delayed_attach_children. 2019-12-13 21:39:20 +00:00
nvidia Fix a few places that free a page from an object without busy held. This is 2019-12-02 22:42:05 +00:00
qemu arm: Add kern_clocksource.c directly in files.arm 2019-04-16 20:04:22 +00:00
ralink Convert to if_foreach_llmaddr() KPI. 2019-10-21 18:13:24 +00:00
rockchip Include eventhandler.h in more compilation units 2019-05-21 01:18:43 +00:00
samsung/exynos Remove more needless <sys/tty.h> includes 2019-12-01 20:43:37 +00:00
ti Create new wrapper function: bus_delayed_attach_children() 2019-12-13 19:39:33 +00:00
versatile Remove more needless <sys/tty.h> includes 2019-12-01 20:43:37 +00:00
xilinx Regularize my copyright notice 2019-12-04 16:56:11 +00:00