* lpfc warnings on sparc64
@ 2008-09-25 8:14 Meelis Roos
2008-09-25 15:36 ` James Bottomley
0 siblings, 1 reply; 3+ messages in thread
From: Meelis Roos @ 2008-09-25 8:14 UTC (permalink / raw)
To: james.smart; +Cc: linux-scsi
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
--
Meelis Roos (mroos@linux.ee)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lpfc warnings on sparc64
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
0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2008-09-25 15:36 UTC (permalink / raw)
To: Meelis Roos; +Cc: james.smart, linux-scsi
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: lpfc warnings on sparc64
2008-09-25 15:36 ` James Bottomley
@ 2008-09-25 16:14 ` James Smart
0 siblings, 0 replies; 3+ messages in thread
From: James Smart @ 2008-09-25 16:14 UTC (permalink / raw)
To: James Bottomley; +Cc: Meelis Roos, linux-scsi@vger.kernel.org
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
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-25 16:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox