From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [patch] 2.4.21-ia64-030702 arch/ia64/kernel/mca.c
Date: Fri, 08 Aug 2003 16:12:42 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106035920806139@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105909779318784@msgid-missing>
On Thursday 07 August 2003 6:41 pm, Keith Owens wrote:
> On Thu, 7 Aug 2003 17:03:22 -0600,
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> >On Saturday 19 July 2003 12:25 am, Keith Owens wrote:
> >> OEM data can be variable sized, do not use sizeof().
> >
> >I don't quite understand this one. Don't these:
> >
> >> - (int)sizeof(sal_log_plat_specific_err_info_t) - 1,
> >> + ((char*)psei->oem_data - (char*)psei),
> >
> >compute the same value? I see that OEM data can be of variable
> >size (and we use "u8 oem_data[1]" as a placeholder), but isn't this
> >expression just computing the size of the fixed part of it?
>
> platform_plat_specific_err_print() maps to ia64_log_prt_oem_data()
> which expects a header length and a section length.
> ia64_log_prt_oem_data() calculates the data length as the difference of
> the first two parameters.
Yes, I read the code and I saw that, but that doesn't address my
question. The "section length" (which we're computing here) is
really a compile-time constant based on the structure layout.
The "header length" is the variable one and the difference is
the size of OEM data.
I now see the real reason this change is needed, though: because
of structure padding, we can't assume that the variable-length
OEM data begins at sizeof(fixed_part)-1
I'll apply this change now for 2.4 (I hope somebody is tracking
these for 2.5).
Bjorn
next prev parent reply other threads:[~2003-08-08 16:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-24 8:59 [patch] 2.4.21-ia64-030702 arch/ia64/kernel/unwind.c Keith Owens
2003-07-29 23:21 ` Bjorn Helgaas
2003-07-29 23:26 ` Bjorn Helgaas
2003-08-07 23:03 ` [patch] 2.4.21-ia64-030702 arch/ia64/kernel/mca.c Bjorn Helgaas
2003-08-08 0:41 ` Keith Owens
2003-08-08 16:12 ` Bjorn Helgaas [this message]
2003-08-08 17:15 ` Bjorn Helgaas
2003-08-10 5:08 ` Keith Owens
2003-08-10 5:28 ` Alex Williamson
2003-08-11 23:01 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2003-07-19 6:25 Keith Owens
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=marc-linux-ia64-106035920806139@msgid-missing \
--to=bjorn.helgaas@hp.com \
--cc=linux-ia64@vger.kernel.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