linux-stable/arch/powerpc/lib
Christophe Leroy 85682a7e3b powerpc: fix csum_ipv6_magic() on little endian platforms
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: e9c4943a10 ("powerpc: Implement csum_ipv6_magic in assembly")
Reported-by: Jianlin Shi <jishi@redhat.com>
Reported-by: Xin Long <lucien.xin@gmail.com>
Cc: <stable@vger.kernel.org> # 4.18+
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Tested-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-09-20 21:12:28 +10:00
..
alloc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
checksum_32.S powerpc: Implement csum_ipv6_magic in assembly 2018-06-04 00:39:19 +10:00
checksum_64.S powerpc: fix csum_ipv6_magic() on little endian platforms 2018-09-20 21:12:28 +10:00
checksum_wrappers.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
code-patching.c powerpc: Avoid code patching freed init sections 2018-09-18 22:42:54 +10:00
copy_32.S powerpc/lib: Use patch_site to patch copy_32 functions once cache is enabled 2018-08-10 22:12:35 +10:00
copypage_64.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
copypage_power7.S powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision 2018-07-24 22:03:21 +10:00
copyuser_64.S powerpc/64: Copy as much as possible in __copy_tofrom_user 2018-08-08 00:32:36 +10:00
copyuser_power7.S selftests/powerpc/64: Test all paths through copy routines 2018-08-08 00:32:35 +10:00
crtsavres.S powerpc/64: Do not create new section for save/restore functions 2017-05-30 14:59:51 +10:00
div64.S
feature-fixups-test.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
feature-fixups.c powerpc/fsl: Add barrier_nospec implementation for NXP PowerPC Book3E 2018-08-08 00:32:24 +10:00
hweight_64.S powerpc: clean inclusions of asm/feature-fixups.h 2018-07-30 22:48:17 +10:00
ldstfp.S powerpc: move ASM_CONST and stringify_in_c() into asm-const.h 2018-07-30 22:48:16 +10:00
locks.c powerpc: clean the inclusion of stringify.h 2018-07-30 22:48:17 +10:00
Makefile powerpc/lib: Implement strlen() in assembly for PPC32 2018-08-07 21:49:30 +10:00
mem_64.S powerpc/string: Implement optimized memset variants 2017-08-17 23:04:35 +10:00
memcmp_32.S powerpc/lib: optimise PPC32 memcmp 2018-06-04 00:39:21 +10:00
memcmp_64.S powerpc/64: add 32 bytes prechecking before using VMX optimization on memcmp() 2018-07-24 22:03:21 +10:00
memcpy_64.S selftests/powerpc/64: Test all paths through copy routines 2018-08-08 00:32:35 +10:00
memcpy_power7.S selftests/powerpc/64: Test all paths through copy routines 2018-08-08 00:32:35 +10:00
pmem.c powerpc/lib: Implement UACCESS_FLUSHCACHE API 2017-11-13 08:00:31 +11:00
quad.S powerpc: Handle most loads and stores in instruction emulation code 2017-09-01 16:39:48 +10:00
rheap.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
sstep.c powerpc/sstep: Fix kernel crash if VSX is not present 2018-06-04 00:39:08 +10:00
string.S powerpc/lib: optimise PPC32 memcmp 2018-06-04 00:39:21 +10:00
string_32.S powerpc/lib: optimise 32 bits __clear_user() 2018-06-04 00:39:21 +10:00
string_64.S powerpc: Fix invalid use of register expressions 2017-08-10 22:29:41 +10:00
strlen_32.S powerpc/lib: Implement strlen() in assembly for PPC32 2018-08-07 21:49:30 +10:00
test_emulate_step.c powerpc/sstep: Fix emulate_step test if VSX not present 2018-06-04 00:39:14 +10:00
vmx-helper.c powerpc/64: enhance memcmp() with VMX instruction for long bytes comparision 2018-07-24 22:03:21 +10:00
xor_vmx.c powerpc/lib/xor_vmx: Ensure no altivec code executes before enable_kernel_altivec() 2017-06-02 20:17:52 +10:00
xor_vmx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xor_vmx_glue.c powerpc/altivec: Add missing prototypes for altivec 2018-05-25 12:04:38 +10:00