ARM Ftrace Function Graph Fails With UNWINDER_FRAME_POINTER
Thorsten Scherer
T.Scherer at eckelmann.de
Mon May 27 00:43:41 PDT 2024
Hello,
in the context of a panic on an i.MX25 based v6.9 kernel [1] Uwe pointed me to
this thread. With the proposed code change applied the procedure
# set to some known good (randomly guessed) filter function and enable function_graph
echo mtdblock_open > set_ftrace_filter
echo function_graph > current_tracer
# walk available filter funcs
cat available_filter_functions | while read f; do echo $f | tee -a set_ftrace_filter; sleep 1; done
produces the following output
[ 159.832173] Insufficient stack space to handle exception!
[ 159.832241] Task stack: [0xc8e44000..0xc8e46000]
[ 159.842701] IRQ stack: [0xc8800000..0xc8802000]
[ 159.847712] Overflow stack: [0xc1934000..0xc1935000]
[ 159.852726] Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
[ 159.858273] Modules linked in: capture_events_imxgpt ti_ads7950 industrialio_triggered_buffer kfifo_buf capture_events_irq capture_events iio_trig_hrtimer industrialio_sw_trigger industrialio_configfs dm_mod
[ 159.876948] CPU: 0 PID: 199 Comm: sh Not tainted 6.9.0 #3
[ 159.882412] Hardware name: Freescale i.MX25 (Device Tree Support)
[ 159.888547] PC is at prepare_ftrace_return+0x4/0x7c
[ 159.893520] LR is at ftrace_graph_caller+0x1c/0x28
[ 159.898376] pc : [<c010dd44>] lr : [<c010d988>] psr: 60000093
[ 159.904690] sp : c8e44018 ip : c8e44018 fp : c8e4403c
[ 159.909959] r10: c0c09e78 r9 : c35e9bc0 r8 : c010d9bc
[ 159.915227] r7 : 00000001 r6 : 00000004 r5 : c8e44064 r4 : c8e440ac
[ 159.921800] r3 : c8e44030 r2 : c8e4403c r1 : c010eb9c r0 : c8e44038
[ 159.928376] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
[ 159.935652] Control: 0005317f Table: 83074000 DAC: 00000051
[ 159.941436] Register r0 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 159.952253] Register r1 information: non-slab/vmalloc memory
[ 159.957988] Register r2 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 159.968791] Register r3 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 159.979592] Register r4 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 159.990391] Register r5 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 160.001187] Register r6 information: non-paged memory
[ 160.006303] Register r7 information: non-paged memory
[ 160.011415] Register r8 information: non-slab/vmalloc memory
[ 160.017139] Register r9 information: slab kmalloc-32 start c35e9bc0 pointer offset 0 size 32
[ 160.025718] Register r10 information: non-slab/vmalloc memory
[ 160.031530] Register r11 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 160.042422] Register r12 information: 2-page vmalloc region starting at 0xc8e44000 allocated at kernel_clone+0xa8/0x408
[ 160.053315] Process sh (pid: 199, stack limit = 0x68fc3abb)
[ 160.058955] Stack: (0xc8e44018 to 0xc8e46000)
and points me to copy_from_kernel_nofault_allowed.
Disassembly of section .text:
c010eb8c <copy_from_kernel_nofault_allowed>:
c010eb8c: e1a0c00d mov ip, sp
c010eb90: e92dd800 push {fp, ip, lr, pc}
c010eb94: e24cb004 sub fp, ip, #4
c010eb98: e52de004 push {lr} ; (str lr, [sp, #-4]!)
c010eb9c: ebfffb4f bl c010d8e0 <__gnu_mcount_nc>
c010eba0: e35004bf cmp r0, #-1090519040 ; 0xbf000000
c010eba4: 3a000003 bcc c010ebb8 <copy_from_kernel_nofault_allowed+0x2c>
c010eba8: e0900001 adds r0, r0, r1
c010ebac: 33a00001 movcc r0, #1
c010ebb0: 23a00000 movcs r0, #0
c010ebb4: e89da800 ldm sp, {fp, sp, pc}
c010ebb8: e3a00000 mov r0, #0
c010ebbc: e89da800 ldm sp, {fp, sp, pc}
In the time given I couldn't make sense of the issue, so I am passing this
hopefully useful information to you.
Best regards
Thorsten
#regzbot introduced: 953f534a7ed6b725d4f101d2949393acc9262880 ^
[1] https://lore.kernel.org/all/alp44tukzo6mvcwl4ke4ehhmojrqnv6xfcdeuliybxfjfvgd3e@gpjvwj33cc76/
More information about the linux-arm-kernel
mailing list