[External] Re: [PATCH] riscv/fault: Dump user opcode bytes on fatal faults

运辉崔 cuiyunhui at bytedance.com
Wed Mar 29 00:35:26 PDT 2023


Hi Conor,

On Wed, Mar 29, 2023 at 2:25 PM Conor Dooley <conor.dooley at microchip.com> wrote:

>
> Right, I'm trying to figure out of this is another bug in the kernel -
> if you don't have "fd" in riscv,isa in your devicetree then, even if
> CONFIG_FPU is set, none of the FPU code is meant to run, right?

yeah, CONFIG_FPU is set.
In the problem I encountered, the init to be executed in user mode
contained floating-point instructions, which caused an exception.


> What would be nice to have is what the new show_opcodes() function will
> look like ;)

After printing the contents of __show_regs(), this line will continue
to be printed:
Opcode: 53 80 02 f0

It is not just the problem I encountered. When the process exits
unexpected, we all want to know what the instruction that caused the
process exception is.

Thanks,
Yunhui



More information about the linux-riscv mailing list