On Wed, Mar 09, 2022 at 08:40:50AM +0100, Jeremie Courreges-Anglas wrote: > On Tue, Mar 08 2022, Visa Hankala <[email protected]> wrote: > > This patch adds kernel stack trace saving for riscv64, for the benefit > > of dt(4) and witness(4). > > Nice! > > > The unwinder is slow because of the symbol > > lookup, but this can be tweaked later. > > A dumb approach that appears to work: add > cpu_exception_handler_supervisor_end and cpu_exception_handler_user_end > symbols, and perform a range check.
Yes, using extra symbols and checking ranges has been an option. It does not look nice but seems less intrusive than making the exception entry points preserve, or rather improvise, the chain of callframes. I have to withdraw the patch for now as it does not seem reliable.
