Re: IPA_STATUS_SIZE, commit b8dc7d0eea5a7709bb534f1b3ca70d2d7de0b42c

From: Bert Karwatzki
Date: Thu May 18 2023 - 18:12:22 EST


Am Mittwoch, dem 17.05.2023 um 16:35 -0500 schrieb Alex Elder:
> On 5/12/23 8:04 AM, Bert Karwatzki wrote:
> > commit b8dc7d0eea5a7709bb534f1b3ca70d2d7de0b42c
> > Author: Alex Elder <elder@xxxxxxxxxx>
> > Date:   Wed Jan 25 14:45:39 2023 -0600
> >
> >      net: ipa: stop using sizeof(status)
> >     
> >      The IPA packet status structure changes in IPA v5.0 in ways
> > that
> > are
> >      difficult to represent cleanly.  As a small step toward
> > redefining
> >      it as a parsed block of data, use a constant to define its
> > size,
> >      rather than the size of the IPA status structure type.
> >     
> >      Signed-off-by: Alex Elder <elder@xxxxxxxxxx>
> >      Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
> >
> > introduced the IPA_STATUS_SIZE constant as a replacent for
> > sizeof(struct ipa_status). IPA_STATUS_SIZE is defined as
> > sizeof(__le32[4]), but sizeof(struct ipa_status) =
> > sizeof(__le32[8])
> > and the newly introducded ipa_status_extract operates on 8 __le32
> > words, so I wondered if IPA_STATUS_SIZE is correct.
>
> You are right to wonder about this.  I think you have identified
> a bug.  It is a bug that most likely almost never matters (because
> the status size is always proper--and not too small), but it is
> a bug nevertheless.
>
> Would you like to provide a patch to fix this?  Otherwise I can
> do that, and I'll provide credit to you:
>
>      Reported-by: Bert Karwatzki <spasswolf@xxxxxx>
>
> Please let me know.  Thanks for inquiring about/reporting this.
>
>                                         -Alex
>
> >
> > Bert Karwatzki
>

Here's the patch that addresse the issue (if there's a > in front of
the first From, that seems to be a quirk of evolution ...)