From: Ira Weiny <ira.weiny@intel.com>
To: <alison.schofield@intel.com>, Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Dave Jiang <dave.jiang@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Steve Rostedt <rostedt@goodmis.org>
Cc: Alison Schofield <alison.schofield@intel.com>,
<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v2] cxl/trace: Properly initialize cxl_poison region name
Date: Thu, 14 Mar 2024 13:51:57 -0700 [thread overview]
Message-ID: <65f3636da691e_22141294d7@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20240314201217.2112644-1-alison.schofield@intel.com>
alison.schofield@ wrote:
> From: Alison Schofield <alison.schofield@intel.com>
>
> The TP_STRUCT__entry that gets assigned the region name, or an
> empty string if no region is present, is erroneously initialized
> to the cxl_region pointer. It needs to be properly initialized
> otherwise it's length is wrong and garbage chars can appear in
> the kernel trace output: /sys/kernel/tracing/trace
>
> The bad initialization was due in part to a naming conflict with
> the parameter: struct cxl_region *region. The field 'region' is
> already exposed externally as the region name, so changing that
> to something logical, like 'region_name' is not an option. Instead
> rename the internal only struct cxl_region to the commonly used
> 'cxlr'.
>
> Impact is that tooling depending on that trace data can miss
> picking up a valid event when searching by region name. The
> TP_printk() output, if enabled, does emit the correct region
> names in the dmesg log.
>
> This was found during testing of the cxl-list option to report
> media-errors for a region.
>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
prev parent reply other threads:[~2024-03-14 20:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 20:12 [PATCH v2] cxl/trace: Properly initialize cxl_poison region name alison.schofield
2024-03-14 20:41 ` Steven Rostedt
2024-03-14 21:05 ` Alison Schofield
2024-03-14 21:17 ` Steven Rostedt
2024-03-14 22:36 ` Alison Schofield
2024-03-14 22:50 ` Steven Rostedt
2024-03-15 10:47 ` Steven Rostedt
2024-03-15 16:18 ` Dan Williams
2024-03-15 16:30 ` Steven Rostedt
2024-03-14 20:51 ` Ira Weiny [this message]
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=65f3636da691e_22141294d7@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=jonathan.cameron@huawei.com \
--cc=linux-cxl@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=vishal.l.verma@intel.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