| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
83a49712
|
| 31-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
kstack_contains(): account for struct pcb on stack
for arm64, arm, powerpc, and riscv
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.
kstack_contains(): account for struct pcb on stack
for arm64, arm, powerpc, and riscv
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38320
show more ...
|
| #
2555f175
|
| 31-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38320
|
| #
b19c9dea
|
| 15-Dec-2019 |
Ian Lepore <ian@FreeBSD.org> |
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
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.
show more ...
|
| #
95ee2897
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
| #
83a49712
|
| 31-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
kstack_contains(): account for struct pcb on stack
for arm64, arm, powerpc, and riscv
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.
kstack_contains(): account for struct pcb on stack
for arm64, arm, powerpc, and riscv
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38320
show more ...
|
| #
2555f175
|
| 31-Jan-2023 |
Konstantin Belousov <kib@FreeBSD.org> |
Move kstack_contains() and GET_STACK_USAGE() to MD machine/stack.h
Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38320
|
| #
b19c9dea
|
| 15-Dec-2019 |
Ian Lepore <ian@FreeBSD.org> |
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
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.
show more ...
|
| #
98e0ffae
|
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
| #
e6e746bf
|
| 25-Mar-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278968-r280640
Sponsored by: The FreeBSD Foundation
|
| #
fa1e92b6
|
| 04-Mar-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
| #
072aeeb6
|
| 02-Mar-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Merge r278538 through r279514.
|
| #
0d36d957
|
| 19-Feb-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merging ^/head r278916 through r279022.
|
| #
1b23f9b9
|
| 19-Feb-2015 |
Andrew Turner <andrew@FreeBSD.org> |
Allow the ARM unwinder to work through modules. This will be used to add support for unwinding from dtrace.
Tested by: gnn (with dtrace) Sponsored by: ABT Systems Ltd
|
| #
6c787c8f
|
| 18-Feb-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278593-r278966
Sponsored by: The FreeBSD Foundation
|
| #
714e3c81
|
| 17-Feb-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r278756 through r278915.
|
| #
6da235a3
|
| 17-Feb-2015 |
Andrew Turner <andrew@FreeBSD.org> |
Pull the ARM ddb unwind code out to a new file. This will allow it to be used by other places that expect to unwind the stack, e.g. dtrace and stack(9).
As I have written most of this code I'm chang
Pull the ARM ddb unwind code out to a new file. This will allow it to be used by other places that expect to unwind the stack, e.g. dtrace and stack(9).
As I have written most of this code I'm changing the license to the standard FreeBSD license. I have received approval from the other developers who have changed any of the affected code.
Approved by: ian, imp, rpaulo, eadler (all license change)
show more ...
|
| #
23090366
|
| 04-Nov-2012 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Sync from head
|
| #
de720122
|
| 15-Jul-2012 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r236710 through r238467.
|
| #
6cf87ec8
|
| 13-Jul-2012 |
Xin LI <delphij@FreeBSD.org> |
IFC @238412.
|
| #
b652778e
|
| 11-Jul-2012 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r238370
|
| #
98e0ffae
|
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
| #
e6e746bf
|
| 25-Mar-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278968-r280640
Sponsored by: The FreeBSD Foundation
|
| #
fa1e92b6
|
| 04-Mar-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
| #
072aeeb6
|
| 02-Mar-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Merge r278538 through r279514.
|