From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42GsbF33jBzF3QF for ; Fri, 21 Sep 2018 21:59:37 +1000 (AEST) In-Reply-To: <3c4cddf185438cc7200908b4f971a8e6ed7472fd.1536558233.git.christophe.leroy@c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Jianlin Shi , Xin Long From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: powerpc: fix csum_ipv6_magic() on little endian platforms Message-Id: <42GsbF1vw9z9sCR@ozlabs.org> Date: Fri, 21 Sep 2018 21:59:37 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, 2018-09-10 at 06:09:04 UTC, Christophe Leroy wrote: > On little endian platforms, csum_ipv6_magic() keeps len and proto in > CPU byte order. This generates a bad results leading to ICMPv6 packets > from other hosts being dropped by powerpc64le platforms. > > In order to fix this, len and proto should be converted to network > byte order ie bigendian byte order. However checksumming 0x12345678 > and 0x56341278 provide the exact same result so it is enough to > rotate the sum of len and proto by 1 byte. > > PPC32 only support bigendian so the fix is needed for PPC64 only > > Fixes: e9c4943a107b ("powerpc: Implement csum_ipv6_magic in assembly") > Reported-by: Jianlin Shi > Reported-by: Xin Long > Cc: # 4.18+ > Signed-off-by: Christophe Leroy > Tested-by: Xin Long Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/85682a7e3b9c664995ad477520f917 cheers