Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4164780rdb; Thu, 14 Sep 2023 13:57:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgRqBnnLX+TvXDW7iHkT857VeLq5TEvaS9ii4jIvb/ZeD5h9HlEV8Mi5sTmjgFP0W2Kd/l X-Received: by 2002:a05:6e02:11b2:b0:34f:a4f0:4fc4 with SMTP id 18-20020a056e0211b200b0034fa4f04fc4mr4335635ilj.2.1694725035940; Thu, 14 Sep 2023 13:57:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694725035; cv=none; d=google.com; s=arc-20160816; b=tsiWuPGMqrtRk9lLiFHopRmhQTzGX1ycpOtIDcubt02CwIwOsztGr8YOMc19GCfXk9 TILtG+4p4w/3/ZhRFbSdcMCI4Xrl15rpDL3zUB+yoLBua/1xdL2V8qOqO7H2NFTSea0s QscRa6wHu4kpZI6Iwag0YYieWAx8Ry0/bH5oGLRcCcImDb7WEhp/DWNODfYOCyfsVHqA KD/jAvEhhBaGSGAMhG0Z3Lrb18Pit2b4KRLLFXQR39vioVHOTtwexbrYlPccU0GcRdYe vSv/PmjePAroT9FIuo9cC8w9dJDf6vdYZtK5lcE7Ou4lO3D6lUgWCoRHwdmgJxmpb+MQ lJdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:organization:references:in-reply-to :message-id:subject:cc:to:from:date:dkim-signature; bh=9yMBj5KY/e+XMXKyNzGlyIzV435Q72xExT8MkWMqc6E=; fh=DByRTj+ySWvKyyaMf1PzpY9X7wOQq9Aw7kNKCrJ93Ac=; b=CApJVs3l0Xqcm59gQHNr/ZPtfYk1255KEGvtiQNNIDb16ddnVjAeXpPYDWobzCsr+Y PdEqoIUXdKt6bDSh/IKpC33nxF/OL0NP9PDYyTxOOtxjlfdI5niSHAIt3ixZUhfxvDwo JpDE/fqUygCe6tySodmgvk2XNacnl1lwdZBr24utXx4J8ixKrGuLrnj7rC3nVCLFzOJw lg89jaMsyVuoGv5ZaHu4QGqp9wtVVPbE+16fDTHnbL8Oi/dJi+URpG/X8RirGLY3dZQz zfn4lhXzHZFUC1i6TooHsy2Km9xiZ/H/M4TacWBqAaE7U675YnHBQGrSxlLWuq8TvLRM TpgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=mhkqX4DN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id 6-20020a630a06000000b00573fc592e9dsi2047129pgk.848.2023.09.14.13.57.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 13:57:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=mhkqX4DN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id F2041802887C; Thu, 14 Sep 2023 05:27:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236701AbjINM1E (ORCPT + 99 others); Thu, 14 Sep 2023 08:27:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236279AbjINM1D (ORCPT ); Thu, 14 Sep 2023 08:27:03 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8F751FC9; Thu, 14 Sep 2023 05:26:59 -0700 (PDT) Received: from wsk (85-222-111-42.dynamic.chello.pl [85.222.111.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lukma@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 9EE0686940; Thu, 14 Sep 2023 14:26:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1694694417; bh=9yMBj5KY/e+XMXKyNzGlyIzV435Q72xExT8MkWMqc6E=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mhkqX4DNrLGXMgAWLTrfp/QH9eJFVG0Y8RuLR7+Q74YyZezl2JH2FKBm4lv1a7Lek jvTMBAgnS/QmNwm4l2VW/0xSNbpaYNIlhr0K1ym+EwH/Vc1ZVRXQvDG1MWzTBt6ZDb MStMX5wU26MCIicLM+s2Tq+0HfEoO6Pcsdv05PO52+PsUk3vyrrYIHWnnJ/lf9vH/s Olk39+7BC370jKu3tM7REnkWJiRma1bXHUDTZSK69w4qmnt5pmTLxf8uv7181g+nOw PRPrQp1Fa1XdjElvO20l77QqpaBjXoLEuir4W38xnPuFlpAxAdZtk43GHF8fgfQYJC uguVev92HIzPA== Date: Thu, 14 Sep 2023 14:26:50 +0200 From: Lukasz Majewski To: Sebastian Andrzej Siewior Cc: Tristram.Ha@microchip.com, Eric Dumazet , davem@davemloft.net, Andrew Lunn , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Kristian Overskeid , Matthieu Baerts , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Oetken Subject: Re: [PATCH] net: hsr : Provide fix for HSRv1 supervisor frames decoding Message-ID: <20230914142650.6ea1a52f@wsk> In-Reply-To: <20230913163227.ysmJocR0@linutronix.de> References: <20230825153111.228768-1-lukma@denx.de> <20230905080614.ImjTS6iw@linutronix.de> <20230905115512.3ac6649c@wsk> <20230911165708.0bc32e3c@wsk> <20230911150144.cG1ZHTCC@linutronix.de> <20230912101828.06cb403d@wsk> <20230913163227.ysmJocR0@linutronix.de> Organization: denx.de X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/UkUwe2guQLDYQdd3_.qhV1S"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Sep 2023 05:27:08 -0700 (PDT) --Sig_/UkUwe2guQLDYQdd3_.qhV1S Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Sebastian Andrzej, > On 2023-09-12 10:18:28 [+0200], Lukasz Majewski wrote: > > Hi Sebastian, =20 > Hi Lukasz, >=20 > > Ok. No problem. Thanks for the information. =20 >=20 > So what happens if you try this: >=20 > diff --git a/net/hsr/hsr_framereg.c b/net/hsr/hsr_framereg.c > index b77f1189d19d1..6d14d935ee828 100644 > --- a/net/hsr/hsr_framereg.c > +++ b/net/hsr/hsr_framereg.c > @@ -288,13 +288,13 @@ void hsr_handle_sup_frame(struct hsr_frame_info > *frame)=20 > /* And leave the HSR tag. */ > if (ethhdr->h_proto =3D=3D htons(ETH_P_HSR)) { > - pull_size =3D sizeof(struct ethhdr); > + pull_size =3D sizeof(struct hsr_tag); > skb_pull(skb, pull_size); > total_pull_size +=3D pull_size; > } > =20 > /* And leave the HSR sup tag. */ > - pull_size =3D sizeof(struct hsr_tag); > + pull_size =3D sizeof(struct hsr_sup_tag); > skb_pull(skb, pull_size); > total_pull_size +=3D pull_size; > =20 >=20 > Sebastian Yes, this fixes this issue (caused by: SHA1: eafaa88b3eb7f). Such solution has also been pointed out earlier by Tristram. I will prepare v2 of this patch. Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de --Sig_/UkUwe2guQLDYQdd3_.qhV1S Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAmUC/AoACgkQAR8vZIA0 zr2QaQgA2lvqLjFeE2J9upAK/wAy3K5y9XdsDU00g/c+orFYDISTsCS+0WCk3hq5 JhYFya+FRU2sBzxVtP2R1MhIfbjnr/Efbpu//jpzoGz1iyic8u9DisgH4h1yLTv8 0zMqTlJ4se+peBTDvgI9eg3YiQdOOi8HAKbMCd8Vxlouf3NWh4v50hgji0eXaZGA uiwPIJzR7qdYsYlAdslEPqyukY/V51OFpNzVOvW+5StM0Y73v+/NALsPPUyJ2MgW yRMXauS8Pc2Uab7Bgz2c91pjvcfovV9iXPjWedQK6ZFxO4lhZ1FvFNg3voy1Whtm IatbaoNbwzpA2ywmy1BTX8JJWnXRYQ== =LUEH -----END PGP SIGNATURE----- --Sig_/UkUwe2guQLDYQdd3_.qhV1S--