Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3519430rdb; Wed, 13 Sep 2023 14:52:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEaRDKnkrW1reizSEzhz+erusSyUqiBiqhFnDnaZsL8DdfNj+sYqGsB/NtqcqhSRWGCKTsO X-Received: by 2002:a05:6358:9224:b0:134:c37f:4b5c with SMTP id d36-20020a056358922400b00134c37f4b5cmr5129552rwb.22.1694641928219; Wed, 13 Sep 2023 14:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694641928; cv=none; d=google.com; s=arc-20160816; b=LwTHtMD/e2PG7WS8A0nPZ9umQcGjaQy4YMUDCa/aPLBAsb/ZbcwNBXuozHBqA9I3JY hQDiO4MnMn+uW0txyGdSjXS88aY9kjucYma2TmfmJyeBDWfAFYFxDGL2VF05YvQ8I2Q/ PsKJPsy3vxAQeRscdo/ba96Bk+IY6C43k/7Cqnri7vcShp06h0zdFenCzBa7V1LQ+/fC 0ItcbyvChjwKVEdf1lO7+AxvihbRCNJFTq5Mr4cjeKHgz9jUbdYUMAbrN+tUMEv5OgR5 4I3NwPN7tfcfNOHlqUwGfUFcp+uAr32Ta56R/nJ6prv+QK1vV3JMKggFIoVct61lTP6d r0DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=r4gwsCbtaC/KCP2BoXEK3NS8uDKgrnFzIZ7+loZXK6g=; fh=PFn9mAJ5ucRcErHmvrFCnZEEiRWUrNDMcYjMKanuSrk=; b=acnNEDg5Akm/MBeHFJfXb9pke0+WmDqUUG33O8wDRCBqz8almBhXxtsadBrTz0qshd pMbZa5/Fe+LJD0orCjJE3iJf23k+cTA5FTIyPWBQ7du6G6ctbQBTvzbHb5El9ocRTLgs iFmQZQ1ytMHqSkvYUf1pVl88WppUYX07OZ2v8CnCi4E7u9JSAq92TETi9dE4UapbEg1J AyrhZfX3KemFy29pwvCKN7QtZbmdAr/x8DZpTIwp/Oa3oRMlF8eR2tmx7yzhE15VYtJh PWYbV0mJmAm0RpD7z+7iHkjJ+UHK/9tSStkAHYKJ2OYgvfXE8fMlbFY6jlK2LsAdsZR4 jDpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F92ndIr+; dkim=neutral (no key) header.i=@linutronix.de header.b=j9bYN7Zw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b25-20020a630c19000000b0055c7eb53d7fsi20211pgl.584.2023.09.13.14.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 14:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F92ndIr+; dkim=neutral (no key) header.i=@linutronix.de header.b=j9bYN7Zw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1D13F819703D; Wed, 13 Sep 2023 09:32:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229518AbjIMQcr (ORCPT + 99 others); Wed, 13 Sep 2023 12:32:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjIMQcg (ORCPT ); Wed, 13 Sep 2023 12:32:36 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E51F19AC; Wed, 13 Sep 2023 09:32:32 -0700 (PDT) Date: Wed, 13 Sep 2023 18:32:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1694622750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=r4gwsCbtaC/KCP2BoXEK3NS8uDKgrnFzIZ7+loZXK6g=; b=F92ndIr+WDdrx4JuPNU0rZtELDMxoKPv8Nabki68NizO4Aou9gUF2WZN34yowN7COsgXGd dAKOfAyYDx9Mqduge5FKPnqSlELFHbes8kF69r4lVYba+3jWI+ymi39idi6HmUckHxfbs6 t01BBoeDcqYHg7zbBUYQzoF8flrNdHpbIChvVOI4++6NOfT4K6a5o72g19+fKcBKAh4vj6 xRuPHcU/eDgfor3KUSyOeUFD+HMfsDqqDv2VS73ojXty6c+prhZ/8RDp8nnNa4Nn+vgU8j ir+X3b8AL2fFqXKkD9esqBNCuMiO85tGm8cBJ9JhR/FxtUR13dYY7f7MqSDydw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1694622750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=r4gwsCbtaC/KCP2BoXEK3NS8uDKgrnFzIZ7+loZXK6g=; b=j9bYN7ZwjbxQ1gOcDwGpUIQnOLQiDIeJMb+daOcEYVPYBnieDJNVTK0Kk6yAnIab7lMexa 4QCJMJIwvLFLdSDA== From: Sebastian Andrzej Siewior To: Lukasz Majewski 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230912101828.06cb403d@wsk> 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 (agentk.vger.email [0.0.0.0]); Wed, 13 Sep 2023 09:32:56 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email On 2023-09-12 10:18:28 [+0200], Lukasz Majewski wrote: > Hi Sebastian, Hi Lukasz, > Ok. No problem. Thanks for the information. So what happens if you try this: 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) /* And leave the HSR tag. */ if (ethhdr->h_proto == htons(ETH_P_HSR)) { - pull_size = sizeof(struct ethhdr); + pull_size = sizeof(struct hsr_tag); skb_pull(skb, pull_size); total_pull_size += pull_size; } /* And leave the HSR sup tag. */ - pull_size = sizeof(struct hsr_tag); + pull_size = sizeof(struct hsr_sup_tag); skb_pull(skb, pull_size); total_pull_size += pull_size; Sebastian