From: James Clark <james.clark@arm.com>
To: Linu Cherian <lcherian@marvell.com>
Cc: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
devicetree@vger.kernel.org, sgoutham@marvell.com,
gcherian@marvell.com, Anil Kumar Reddy <areddy3@marvell.com>,
Tanmay Jagdale <tanmay@marvell.com>,
suzuki.poulose@arm.com, mike.leach@linaro.org
Subject: Re: [PATCH v9 5/7] coresight: tmc: Add support for reading crash data
Date: Wed, 5 Jun 2024 11:30:39 +0100 [thread overview]
Message-ID: <1b0c8c7e-2cf2-49a9-9120-3ced46f2df08@arm.com> (raw)
In-Reply-To: <20240605081725.622953-6-lcherian@marvell.com>
On 05/06/2024 09:17, Linu Cherian wrote:
> * Introduce a new mode CS_MODE_READ_CRASHDATA for reading trace
> captured in previous crash/watchdog reset.
>
> * Add special device files for reading ETR/ETF crash data.
>
> * User can read the crash data as below
>
> For example, for reading crash data from tmc_etf sink
>
> #dd if=/dev/crash_tmc_etfXX of=~/cstrace.bin
>
Hi Linu,
I think you are missing the removal of the new crash file when the
device is unloaded.
If you reload the module you get some errors:
# rmmod coresight_tmc
# modprobe coresight_tmc dyndbg=+p
kobject: kobject_add_internal failed for crash_tmc_etf0 with -EEXIST,
don't try to register things with the same name in the same
directory.
coresight tmc_etf0: Failed to setup user interface for crashdata
sysfs: cannot create duplicate filename '/devices/virtual
/misc/crash_tmc_etr0'
I'm not sure if it's related, but there are also some kasan errors at
the same time which I haven't seen before:
BUG: KASAN: slab-use-after-free in strcmp+0x94/0xd0
Read of size 1 at addr ffff00080b271be0 by task modprobe/570
CPU: 2 PID: 570 Comm: modprobe Not tainted 6.9.0-rc4+ #71
Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno
Development Platform, BIOS EDK II Oct 19 2019
Call trace:
dump_backtrace+0x100/0x158
show_stack+0x24/0x38
dump_stack_lvl+0x3c/0x98
print_report+0x178/0x508
kasan_report+0xc0/0x120
__asan_report_load1_noabort+0x20/0x30
strcmp+0x94/0xd0
cti_add_assoc_to_csdev+0x174/0x430 [coresight_cti]
coresight_register+0x414/0x500 [coresight]
__tmc_probe+0xd40/0x1340 [coresight_tmc]
tmc_probe+0x60/0x98 [coresight_tmc]
amba_probe+0x604/0x838
really_probe+0x318/0x780
__driver_probe_device+0x168/0x318
driver_probe_device+0x78/0x2a0
__driver_attach+0x22c/0x538
bus_for_each_dev+0x1bc/0x1f0
driver_attach+0x54/0x70
bus_add_driver+0x2a8/0x4c0
driver_register+0x168/0x2b8
amba_driver_register+0x74/0x98
coresight_init_driver+0x34/0xa8 [coresight]
init_module+0x34/0xfb8 [coresight_tmc]
do_one_initcall+0x1a0/0x8d0
do_init_module+0x1f8/0x588
load_module+0x3c20/0x44c0
__arm64_sys_finit_module+0x3c8/0x638
invoke_syscall+0x78/0x218
el0_svc_common+0x160/0x1d8
do_el0_svc+0x50/0x68
el0_svc+0x4c/0xc0
el0t_64_sync_handler+0x84/0x100
el0t_64_sync+0x190/0x198
next prev parent reply other threads:[~2024-06-05 10:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 8:17 [PATCH v9 0/7] Coresight for Kernel panic and watchdog reset Linu Cherian
2024-06-05 8:17 ` [PATCH v9 1/7] dt-bindings: arm: coresight-tmc: Add "memory-region" property Linu Cherian
2024-06-05 8:17 ` [PATCH v9 2/7] coresight: tmc-etr: Add support to use reserved trace memory Linu Cherian
2024-06-07 15:58 ` Suzuki K Poulose
2024-06-10 6:18 ` [EXTERNAL] " Linu Cherian
2024-06-05 8:17 ` [PATCH v9 3/7] coresight: core: Add provision for panic callbacks Linu Cherian
2024-06-05 16:09 ` James Clark
2024-06-20 4:12 ` Linu Cherian
2024-06-05 8:17 ` [PATCH v9 4/7] coresight: tmc: Enable panic sync handling Linu Cherian
2024-06-10 13:02 ` Suzuki K Poulose
2024-06-20 4:10 ` Linu Cherian
2024-06-20 8:25 ` James Clark
2024-06-05 8:17 ` [PATCH v9 5/7] coresight: tmc: Add support for reading crash data Linu Cherian
2024-06-05 10:30 ` James Clark [this message]
2024-06-20 4:14 ` Linu Cherian
2024-06-05 16:09 ` James Clark
2024-06-07 14:17 ` James Clark
2024-06-10 6:15 ` [EXTERNAL] " Linu Cherian
2024-06-10 13:15 ` James Clark
2024-06-10 16:34 ` Suzuki K Poulose
2024-06-20 1:48 ` Linu Cherian
2024-06-21 10:54 ` Suzuki K Poulose
2024-07-03 4:29 ` Linu Cherian
2024-07-03 9:39 ` Suzuki K Poulose
2024-07-11 5:49 ` Linu Cherian
2024-06-05 8:17 ` [PATCH v9 6/7] coresight: tmc: Stop trace capture on FlIn Linu Cherian
2024-06-05 8:17 ` [PATCH v9 7/7] coresight: config: Add preloaded configuration Linu Cherian
2024-06-10 13:06 ` [PATCH v9 0/7] Coresight for Kernel panic and watchdog reset Suzuki K Poulose
2024-06-10 13:22 ` James Clark
2024-06-20 1:50 ` Linu Cherian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1b0c8c7e-2cf2-49a9-9120-3ced46f2df08@arm.com \
--to=james.clark@arm.com \
--cc=areddy3@marvell.com \
--cc=conor+dt@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=gcherian@marvell.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lcherian@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.leach@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sgoutham@marvell.com \
--cc=suzuki.poulose@arm.com \
--cc=tanmay@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®