linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Zhang, Jonathan Zhixiong" <zjzhang-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: "Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	mchehab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, "Fleming,
	Matt" <matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linaro-acpi-cunTk1MwBs8s++Sfvej+rw@public.gmane.org"
	<linaro-acpi-cunTk1MwBs8s++Sfvej+rw@public.gmane.org>,
	"harba-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org"
	<harba-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"linaro-acpi-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
	<linaro-acpi-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: compatability with older versions of UEFI
Date: Wed, 24 Jun 2015 16:50:09 -0700	[thread overview]
Message-ID: <558B4231.7020907@codeaurora.org> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F32A9FBFF-8oqHQFITsIE64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

+Mauro

On 6/24/2015 1:12 PM, Luck, Tony wrote:
>> "Memory Error Section 2". One option we have without having to disturb
>> user space handler of memory error trace data would be to change
>> "struct cper_mem_err_compact" so the affected elements are of
>> __u32 instead of __u16. Drawback of this option is that the trace
>> buffer will be unnecessarily bigger if a platform generates
>> "Memory Error Section" data instead of "Memory Error Section 2" data.
>
> That structure is visible to user level consumers of the event (perhaps just
> one of those right now?):
>
>    git://git.fedorahosted.org/rasdaemon.git
>
> We were not as smart as UEFI and didn't include a version number, or other
> plan,  that would allow us to transition to a new format cleanly.
>
> Perhaps we could re-purpose some of the high order "validation_bits"
> as a version number?  It's a u64 and UEFI 2.5 is only up to bit21 so far,
> so perhaps it will be a long, long time before they get that many fields
> in some future standard.
I agree that we could re-purpose some of the high order "validation_bits"
as a version number. That being said, I am not sure whether that
approach is preferred by user space tool authors. My feeling is
such approach would make user space tool more complicated (eg.
has to understand versions). Mauro, pls. correct me is I am wrong;
pls. refer to previous email in this thread for context related to
challenge brought forth by UEFI 2.5.

perf interface has debugfs interface, so if user space tool does
following, compatibility with different kernel version and different
spec version will be maintained:
* Use debugfs interface to discover format of trace data.
* use largest size known for user space structure; check size of member
in user space structure and size of corresponding field in trace data,
adjust data as necessary.

In the mean time, I think when kernel defines TRACE_EVENT, it should
try not having to use __field_struct, that would make format inside that
field opaque to user space tool. For instance:
   __field_struct(struct cper_mem_err_compact, data)
Because of above, ras-extlog-handler.c in rasdaemon has to hardcode
this structure, making it harder to maintain forward/backward
compatibility.

-- 
Jonathan (Zhixiong) Zhang
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  parent reply	other threads:[~2015-06-24 23:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 17:05 compatability with older versions of UEFI Luck, Tony
     [not found] ` <20150623170534.GA21341-E6Nu+q68HHTI/KE9syI0vLvm/XP+8Wra@public.gmane.org>
2015-06-24 18:04   ` Zhang, Jonathan Zhixiong
     [not found]     ` <558AF115.8020909-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-06-24 19:14       ` Luck, Tony
     [not found]         ` <3908561D78D1C84285E8C5FCA982C28F32A9FB7C-8oqHQFITsIE64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-24 19:50           ` Zhang, Jonathan Zhixiong
     [not found]             ` <558B09F8.4060706-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-06-24 20:12               ` Luck, Tony
     [not found]                 ` <3908561D78D1C84285E8C5FCA982C28F32A9FBFF-8oqHQFITsIE64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-06-24 23:50                   ` Zhang, Jonathan Zhixiong [this message]
2015-06-28 14:34           ` Matt Fleming
2015-06-28 14:29       ` Matt Fleming
     [not found]         ` <20150628142909.GA28334-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-29 18:21           ` [PATCH] efi: Handle memory error structures produced based on old versions of standard Luck, Tony
     [not found]             ` <20150629182106.GA25924-E6Nu+q68HHTI/KE9syI0vLvm/XP+8Wra@public.gmane.org>
2015-06-30 12:22               ` Matt Fleming
     [not found]                 ` <20150630122244.GJ28334-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-06-30 22:57                   ` [PATCHv2] " Luck, Tony
     [not found]                     ` <20150630225751.GA18060-E6Nu+q68HHTI/KE9syI0vLvm/XP+8Wra@public.gmane.org>
2015-07-08 15:54                       ` Matt Fleming
     [not found]                         ` <20150708155440.GA5598-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2015-07-08 17:35                           ` Luck, Tony

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=558B4231.7020907@codeaurora.org \
    --to=zjzhang-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=harba-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linaro-acpi-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linaro-acpi-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mchehab-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).