Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1650022rwd; Thu, 18 May 2023 15:23:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6UrCwmz2XOzsM/oWoTwPPxfhNQwQY46OuAvTmbdpB1eZCKy4JTAaO5B7yFaCQ4XodAqzQY X-Received: by 2002:a05:6a20:6f05:b0:105:c74:6a4b with SMTP id gt5-20020a056a206f0500b001050c746a4bmr1285923pzb.57.1684448613297; Thu, 18 May 2023 15:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684448613; cv=none; d=google.com; s=arc-20160816; b=tlBYNj3Ya/E5QOUgecD335jGrEUBMfH00fbGY1kofSXoznZD2EcgKAeO45c69E4fPi MP4HRpuqmc0SPa2i9+J6dr4PQ/6E/2fPAQVtWz424v3ntAMhDNRB0V6DqYAJ5MzSduN0 gcFdyh2SvY/EI3yZ751PxpHJ4P8za5jpHeUCQBfWIBf3CFDR2i07MCQlKpyxpx0/ITHN rSTg+uSU4+hZk7gR85MFXUx736E4S9f+UnOre3TtMtNcdDpeat3aC3ELcevtxvx6TS9S mStNgkehT9NLMZTnxvA9wBVpMuWybda1G3BNybXl3KP+3P79V5RaAw5HTJIwqI8S6msj um3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=I4FETs1wRcty4UYj8xDUW15uRLgIe9OgIojMpK2Lgww=; b=p4MVPE16sTiTAhCNIa9H7zKFb6gdxvw6CqTsYz4uNrCGYdXjjvrEtsqgSppm6mzbWW KzMxNcxGl7mAaa+NyifaGaIqENIv5Gvtjf3JBHXTjbuWh1rihh8vINwCRkhUPtkXEec6 YFUJ5bovDrl4fU0Hha2i039SKLWhSeZXx4igJ8BDGp9eH5PWPKKTlZZUf9GH/TdO9rKj QH9S9iOf3iMN5DHFsdO4uP588OJrZk2yAu17NF1g6LJnrvFecaoHR6U5fTFo84RFzkcn n76tRZHZ8f6WZ5ENIwz++xFOSydP/JbUMBDMXgXBb0ly7shQMy95xFFwUOGhxut8gyvc 04ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=TvD4qT5p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v190-20020a6389c7000000b0053427b6841dsi2657537pgd.337.2023.05.18.15.23.21; Thu, 18 May 2023 15:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=TvD4qT5p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=web.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjERWMU (ORCPT + 99 others); Thu, 18 May 2023 18:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjERWMU (ORCPT ); Thu, 18 May 2023 18:12:20 -0400 Received: from mout.web.de (mout.web.de [212.227.15.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37029121 for ; Thu, 18 May 2023 15:12:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1684447935; i=spasswolf@web.de; bh=eneJwTZD0TVjPoGCSTsIZPTkcncoa+dBB3vE2mgjA5Y=; h=X-UI-Sender-Class:Subject:From:To:Cc:Date:In-Reply-To:References; b=TvD4qT5pdggq6uxkcnE+BGYn47I6TItFz9Zv+MMnYINMYAR7z1V9mnZtLGSUXJAhr ewMuDNoyWR7SRk7RGXCUioQMT+qL8z99B30imdGUxjnBQvlTt4cAQie357oiFlpcr7 ZyWV0SbCy8Hbg2+ABPj8jh0p+C1xHF8DXcNX2qzeBkOS459+1LcZ8G+PxKLGyvjkSu 0tofhyeSLzYwXYSC1V5TuXqmwu7lGIcNGHdeGE44c3JFE+64QrvDMRc6Y8ev+0KPqF GyE9e/QD1iQ8y2A0qn7cg1xnR9cWHjcHoY6P2dRqAugc3KvU6IUjsfRQh6tHikbCpO NpMCh65aH+TBQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.0.101] ([176.198.191.160]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MT7WN-1paFAu1ILP-00ULhb; Fri, 19 May 2023 00:12:15 +0200 Message-ID: Subject: Re: IPA_STATUS_SIZE, commit b8dc7d0eea5a7709bb534f1b3ca70d2d7de0b42c From: Bert Karwatzki To: Alex Elder Cc: linux-kernel@vger.kernel.org Date: Fri, 19 May 2023 00:12:04 +0200 In-Reply-To: References: <8a1beef0bc605756f8a45acf86f6bb58c188ae21.camel@web.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4-2 MIME-Version: 1.0 X-Provags-ID: V03:K1:n3ixjA7x8BrAFzzSdFw8KKqhKb7sx5AHO/FDLzAJu/3qld6+I1/ /jLswfFj8dPqKGssagAgQ/+qiQLxdW2zRaRmNzpEYGVgPoDr133k9peWYqTM7IJtt4UJUGm qivsJZeE6gmn8x+93yeS3d6PyTh9V54BqKpNaFUglrUGUGcIzIY73wb/2CZUl4DELGEWeRn ifx6lhXVvZLv0uOnUfP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score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Date:=C2=A0=C2=A0 Wed Jan 25 14:45:39 2023 -0600 > >=20 > > =C2=A0=C2=A0=C2=A0=C2=A0 net: ipa: stop using sizeof(status) > > =C2=A0=C2=A0=C2=A0=C2=A0=20 > > =C2=A0=C2=A0=C2=A0=C2=A0 The IPA packet status structure changes in IPA= v5.0 in ways > > that > > are > > =C2=A0=C2=A0=C2=A0=C2=A0 difficult to represent cleanly.=C2=A0 As a sma= ll step toward > > redefining > > =C2=A0=C2=A0=C2=A0=C2=A0 it as a parsed block of data, use a constant t= o define its > > size, > > =C2=A0=C2=A0=C2=A0=C2=A0 rather than the size of the IPA status structu= re type. > > =C2=A0=C2=A0=C2=A0=C2=A0=20 > > =C2=A0=C2=A0=C2=A0=C2=A0 Signed-off-by: Alex Elder > > =C2=A0=C2=A0=C2=A0=C2=A0 Signed-off-by: David S. Miller > >=20 > > 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) =3D > > sizeof(__le32[8]) > > and the newly introducded ipa_status_extract operates on 8 __le32 > > words, so I wondered if IPA_STATUS_SIZE is correct. >=20 > You are right to wonder about this.=C2=A0 I think you have identified > a bug.=C2=A0 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. >=20 > Would you like to provide a patch to fix this?=C2=A0 Otherwise I can > do that, and I'll provide credit to you: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0 Reported-by: Bert Karwatzki >=20 > Please let me know.=C2=A0 Thanks for inquiring about/reporting this. >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0-Alex >=20 > >=20 > > Bert Karwatzki >=20 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 ...) From 583f35b3d91f048d413fc4f6a3b9237fc9d7efb2 Mon Sep 17 00:00:00 2001 From: Bert Karwatzki Date: Fri, 19 May 2023 00:02:55 +0200 Subject: [PATCH] Make IPA_STATUS_SIZE equal to the size of the remove struct ipa_status. --- drivers/net/ipa/ipa_endpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c index 2ee80ed140b7..afa1d56d9095 100644 --- a/drivers/net/ipa/ipa_endpoint.c +++ b/drivers/net/ipa/ipa_endpoint.c @@ -119,7 +119,7 @@ enum ipa_status_field_id { }; =20 /* Size in bytes of an IPA packet status structure */ -#define IPA_STATUS_SIZE sizeof(__le32[4]) +#define IPA_STATUS_SIZE sizeof(__le32[8]) =20 /* IPA status structure decoder; looks up field values for a structure */ static u32 ipa_status_extract(struct ipa *ipa, const void *data, --=20 2.40.1 Bert Karwatzki