Re: [RFC PATCH v3 0/8] Coresight for Kernel panic and watchdog reset

From: James Clark
Date: Fri Sep 15 2023 - 09:50:45 EST




On 04/09/2023 06:05, Linu Cherian wrote:
> This RFC v3 patch series is rebased on v6.5-rc7 and is dependent
> on the below two patches.
[...]
>
> Steps for reading trace data captured in previous boot
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1. cd /sys/bus/coresight/devices/tmc_etrXX/
>
> 2. Change to special mode called, read_prevboot.
>
> #echo 1 > read_prevboot
>
> 3. Dump trace buffer data to a file,
>
> #dd if=/dev/tmc_etrXX of=~/cstrace.bin

Hi Linu,

I left this comment on V2, but I tested it again and get the same
result. Instead of linking it I'll just re-paste it here:

I made a reserved region, but when I run this command I get "Unable to
handle kernel paging request at virtual address 001f1921ed10ffae".

Is there an extra step involved if there was no trace captured from a
previous panic? I thought I'd just be able to read out uninitialised
data. Or is it the uninitialised metadata that's causing this issue?

Also that's without KASAN or lockdep turned on. If I have a kernel with
either of those things I get a different warning for each one. I expect
the lockdep one would happen even in the working scenario though?

>
> 4. Reset back to normal mode
>
> #echo 0 > read_prevboot
>