diff options
author | Helge Deller <deller@gmx.de> | 2018-08-05 00:03:29 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2018-08-13 09:54:17 +0200 |
commit | c8921d72e390cb6fca3fb2b0c2badfda851647eb (patch) | |
tree | 8c6aec1a9405da9caad70088a7dfd910b71b6675 /arch/parisc/include/asm/linkage.h | |
parent | 3b885ac1dc35b87a39ee176a6c7e2af9c789d8b8 (diff) | |
download | lwn-c8921d72e390cb6fca3fb2b0c2badfda851647eb.tar.gz lwn-c8921d72e390cb6fca3fb2b0c2badfda851647eb.zip |
parisc: Fix and improve kernel stack unwinding
This patchset fixes and improves stack unwinding a lot:
1. Show backward stack traces with up to 30 callsites
2. Add callinfo to ENTRY_CFI() such that every assembler function will get an
entry in the unwind table
3. Use constants instead of numbers in call_on_stack()
4. Do not depend on CONFIG_KALLSYMS to generate backtraces.
5. Speed up backtrace generation
Make sure you have this patch to GNU as installed:
https://sourceware.org/ml/binutils/2018-07/msg00474.html
Without this patch, unwind info in the kernel is often wrong for various
functions.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch/parisc/include/asm/linkage.h')
-rw-r--r-- | arch/parisc/include/asm/linkage.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/parisc/include/asm/linkage.h b/arch/parisc/include/asm/linkage.h index 9a69bf6fc4b6..49f6f3d772cc 100644 --- a/arch/parisc/include/asm/linkage.h +++ b/arch/parisc/include/asm/linkage.h @@ -18,9 +18,9 @@ #ifdef __ASSEMBLY__ #define ENTRY(name) \ - .export name !\ - ALIGN !\ -name: + ALIGN !\ +name: ASM_NL\ + .export name #ifdef CONFIG_64BIT #define ENDPROC(name) \ @@ -31,13 +31,18 @@ name: END(name) #endif -#define ENTRY_CFI(name) \ +#define ENTRY_CFI(name, ...) \ ENTRY(name) ASM_NL\ + .proc ASM_NL\ + .callinfo __VA_ARGS__ ASM_NL\ + .entry ASM_NL\ CFI_STARTPROC #define ENDPROC_CFI(name) \ - ENDPROC(name) ASM_NL\ - CFI_ENDPROC + CFI_ENDPROC ASM_NL\ + .exit ASM_NL\ + .procend ASM_NL\ + ENDPROC(name) #endif /* __ASSEMBLY__ */ |