From: Borislav Petkov <bp@alien8.de>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: "Luck, Tony" <tony.luck@intel.com>,
"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"Smita.KoralahalliChannabasappa@amd.com"
<Smita.KoralahalliChannabasappa@amd.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 1/3] x86/MCE, EDAC/mce_amd: Add support for new MCA_SYND{1,2} registers
Date: Tue, 25 Oct 2022 20:05:48 +0200 [thread overview]
Message-ID: <Y1glfOlFE90SqjV/@zn.tnic> (raw)
In-Reply-To: <Y1gQQ8gh1CJf0Tuy@yaz-fattaah>
On Tue, Oct 25, 2022 at 04:35:15PM +0000, Yazen Ghannam wrote:
> I think the "right way" to use tracepoints is to parse the data according to
> the format provided by the tracepoint itself. You can see an example of
> rasdaemon doing that here:
> https://github.com/mchehab/rasdaemon/blob/c2255178a49f62c53009a456bc37dd5e37332f09/ras-mce-handler.c#L386
Lemme add Rostedt.
So now we have libtraceevent and here's an example how to do it:
https://patchwork.kernel.org/project/linux-trace-devel/patch/20221021182345.092cdb50@gandalf.local.home/
https://www.trace-cmd.org/Documentation/libtracefs/libtracefs-kprobes.html
Reportedly, rasdaemon is still using the old libtraceevent method. So it
probably should be updated to use the new library version.
> A tracepoint user should not assume a fixed struct layout, so adding
> and rearranging fields shouldn't be a problem. I'm not sure about
> removing a field. It seems to me that this should be okay in the
> interface, and it's up to the application how it wants to handle a
> field that isn't found.
From looking at the examples, I think the new libtraceevent should be
able to handle all that just fine.
> Another option could be to define a new tracepoint.
Yeah, no. Let's get this one to work pls.
trace_mce_record2() looks like the old attempts to design a syscall
better. :)
> Userspace already needs to be updated to recognize new fields, so I
> don't think it's much of a stretch to add a new tracepoint handler.
Syncing with other components is always a stretch. You're forgetting how
distros lag behind and don't always have the needed resources to update
their userspace.
Or they can't update because of enterprise raisins.
So no, it is not trivial, trust me. It's a bunch of politics and effort.
> This may be simpler than trying to fit vendor-specific info into an
> existing tracepoint and then decoding it later in userspace.
Until that new tracepoint becomes insufficient in the future and we need
to add trace_mce_record3(). No, you don't want that. :)
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2022-10-25 18:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 17:44 [PATCH 0/3] New SMCA Syndrome registers and FRU Text feature Yazen Ghannam
2022-04-18 17:44 ` [PATCH 1/3] x86/MCE, EDAC/mce_amd: Add support for new MCA_SYND{1,2} registers Yazen Ghannam
2022-06-30 11:01 ` Borislav Petkov
2022-07-11 17:31 ` Yazen Ghannam
2022-07-18 8:57 ` Borislav Petkov
2022-07-18 13:50 ` Borislav Petkov
2022-08-02 12:22 ` Yazen Ghannam
2022-08-02 16:58 ` Luck, Tony
2022-10-24 16:09 ` Borislav Petkov
2022-10-24 16:38 ` Tony Luck
2022-10-24 20:30 ` Borislav Petkov
2022-10-24 21:08 ` Luck, Tony
2022-10-24 21:23 ` Borislav Petkov
2022-10-24 21:32 ` Luck, Tony
2022-10-24 21:52 ` Luck, Tony
2022-10-25 16:35 ` Yazen Ghannam
2022-10-25 16:46 ` Luck, Tony
2022-10-25 18:05 ` Borislav Petkov [this message]
2022-10-25 19:28 ` Steven Rostedt
2022-11-01 17:27 ` Yazen Ghannam
2022-04-18 17:44 ` [PATCH 2/3] x86/MCE/APEI: Handle variable register array size Yazen Ghannam
2022-07-03 12:30 ` Borislav Petkov
2022-07-11 17:32 ` Yazen Ghannam
2022-04-18 17:44 ` [PATCH 3/3] EDAC/mce_amd: Add support for FRU Text in MCA Yazen Ghannam
2022-07-04 9:13 ` Borislav Petkov
2022-07-11 17:41 ` Yazen Ghannam
2022-06-10 16:29 ` [PATCH 0/3] New SMCA Syndrome registers and FRU Text feature Yazen Ghannam
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=Y1glfOlFE90SqjV/@zn.tnic \
--to=bp@alien8.de \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.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