lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v8dfqays.fsf@all.your.base.are.belong.to.us>
Date:   Wed, 16 Aug 2023 17:10:51 +0200
From:   Björn Töpel <bjorn@...nel.org>
To:     Yunhui Cui <cuiyunhui@...edance.com>, conor.dooley@...rochip.com,
        paul.walmsley@...ive.com, palmer@...belt.com,
        aou@...s.berkeley.edu, peterz@...radead.org, mpe@...erman.id.au,
        jpoimboe@...nel.org, mark.rutland@....com, svens@...ux.ibm.com,
        cuiyunhui@...edance.com, guoren@...nel.org, jszhang@...nel.org,
        ebiederm@...ssion.com, bjorn@...osinc.com, heiko@...ech.de,
        xianting.tian@...ux.alibaba.com, mnissler@...osinc.com,
        linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] riscv: Dump user opcode bytes on fatal faults

Hi Yunhui,

Waking up the dead! ;-)

Yunhui Cui <cuiyunhui@...edance.com> writes:

> We encountered such a problem that when the system starts to execute
> init, init exits unexpectedly with error message: "unhandled signal 4
> code 0x1 ...".
>
> We are more curious about which instruction execution caused the
> exception. After dumping it through show_opcodes(), we found that it
> was caused by a floating-point instruction.
>
> In this way, we found the problem: in the system bringup , it is
> precisely that we have not enabled the floating point function(CONFIG_FPU
> is set, but not enalbe COMPAT_HWCAP_ISA_F/D in the dts or acpi).
>
> Like commit ba54d856a9d8 ("x86/fault: Dump user opcode bytes on fatal
> faults"), when an exception occurs, it is necessary to dump the
> instruction that caused the exception.

X86's show_opcodes() is used both for kernel oops:es, and userland
unhandled signals. On RISC-V there's dump_kernel_instr() added in commit
eb165bfa8eaf ("riscv: Add instruction dump to RISC-V splats").

Wdyt about reworking that function, so that it works for userland epc as
well? I think it's useful to have the surrounding instruction context,
and not just on instruction.


Björn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ