Comment 10 for bug 1934548

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

Looking at the crashing address (by doing objdump on the vmlinux from the ddeb), it lands on the middle of an instruction.

ffffffe000009204: 99c080e7 jalr -1636(ra) # ffffffe000006b9c <riscv_cpuid_to_hartid_mask>
ffffffe000009208: 0180e797 auipc a5,0x180e
ffffffe00000920c: f187b783 ld a5,-232(a5) # ffffffe001817120 <__sbi_send_ipi>
ffffffe000009210: fd040513 addi a0,s0,-48
ffffffe000009214: 9782 jalr a5
ffffffe000009216: fd843703 ld a4,-40(s0)

Perhaps, the patching done by ftrace is causing this.

There is afc76b8b80112189b6f11e67e19cf58301944814 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT"), which doesn't refer to any bug that is fixed, but changes the way patches are applied. So, perhaps, this would help fix the issue. Possibly worth the try until this is properly debugged. I can't test it, otherwise, so @xnox, would you be able to try this upstream commit?

Cascardo.