From: James Smart <James.Smart@Emulex.Com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Meelis Roos <mroos@linux.ee>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: lpfc warnings on sparc64
Date: Thu, 25 Sep 2008 12:14:56 -0400 [thread overview]
Message-ID: <48DBB900.3000903@emulex.com> (raw)
In-Reply-To: <1222357008.3610.12.camel@localhost.localdomain>
Interesting:
Here's the code lines:
...
irsp->un.ulpWord[5],
*(((uint32_t *)irsp) + 6),
...
it's not tripping on the ulpWord[5] line - which is what you would
think, but rather the "+6" line. Given that the structure size for
irsp is certainly big enough, this has to be some loss of "object"
context in the compiler.
E.g: it wouldn't surprise me if there's a base register that
contains the address of irsp (%reg) and that the un.ulpWord[5]
results in a displacement on the pointer (e.g. "20(%reg)" ),
and that the ptr+6 also results in something similar
(e.g. "24(%reg)") - and the range checking code assumed the
context un.ulpWord meant ?(%reg), and lost track of the type
or object difference between the next instruction that happened
to have a ? that was too big for the array.
-- james s
James Bottomley wrote:
> On Thu, 2008-09-25 at 11:14 +0300, Meelis Roos wrote:
>> Noticed this wgile compiling 2.6.27-rc7+git on sparc64 - maybe it is of
>> interest.
>>
>> CC [M] drivers/scsi/lpfc/lpfc_sli.o
>> drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_sli_poll_fcp_ring':
>> drivers/scsi/lpfc/lpfc_sli.c:1365: warning: array subscript is above array bounds
>> drivers/scsi/lpfc/lpfc_sli.c:1365: warning: array subscript is above array bounds
>> drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_sli_handle_fast_ring_event':
>> drivers/scsi/lpfc/lpfc_sli.c:1541: warning: array subscript is above array bounds
>> drivers/scsi/lpfc/lpfc_sli.c:1541: warning: array subscript is above array bounds
>
> As best I can tell this is a bogus warning ... it triggers on x86 as
> well, but I can't find any reason gcc should think there's an array
> bounds error.
>
> James
>
>
>
prev parent reply other threads:[~2008-09-25 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 8:14 lpfc warnings on sparc64 Meelis Roos
2008-09-25 15:36 ` James Bottomley
2008-09-25 16:14 ` James Smart [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=48DBB900.3000903@emulex.com \
--to=james.smart@emulex.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mroos@linux.ee \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.