linux/arch/powerpc
Paul Mackerras eae3f3ab7f powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold
commit b492f7e4e0 upstream.

These functions compute an IP checksum by computing a 64-bit sum and
folding it to 32 bits (the "nofold" in their names refers to folding
down to 16 bits).  However, doing (u32) (s + (s >> 32)) is not
sufficient to fold a 64-bit sum to 32 bits correctly.  The addition
can produce a carry out from bit 31, which needs to be added in to
the sum to produce the correct result.

To fix this, we copy the from64to32() function from lib/checksum.c
and use that.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-12-16 16:25:47 +01:00
..
boot powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 2017-11-15 15:53:13 +01:00
configs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next 2016-10-11 20:07:56 +11:00
crypto powerpc/crypto/crc32c-vpmsum: Fix missing preempt_disable() 2017-04-12 12:41:13 +02:00
include powerpc/64: Fix checksum folding in csum_tcpudp_nofold and ip_fast_csum_nofold 2017-12-16 16:25:47 +01:00
kernel powerpc/64s: Initialize ISAv3 MMU registers before setting partition table 2017-12-14 09:28:13 +01:00
kvm KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter 2017-11-15 15:53:12 +01:00
lib powerpc: Fix emulation of mfocrf in emulate_step() 2017-07-27 15:08:00 -07:00
math-emu powerpc: Correct emulated mtfsf instruction 2014-04-07 10:33:11 +10:00
mm powerpc/64: Invalidate process table caching after setting process table 2017-12-14 09:28:17 +01:00
net powerpc/bpf: Add support for bpf constant blinding 2016-10-04 20:33:20 +11:00
oprofile powerpc/sparse: Make a bunch of things static 2016-09-13 17:35:47 +10:00
perf powerpc/perf: Add restrictions to PMC5 in power9 DD1 2017-10-21 17:21:38 +02:00
platforms powerpc/powernv/ioda2: Gracefully fail if too many TCE levels requested 2017-12-14 09:28:21 +01:00
scripts powerpc/ftrace: Add Kconfig & Make glue for mprofile-kernel 2016-03-07 14:53:56 +11:00
sysdev axonram: Fix gendisk handling 2017-12-14 09:28:21 +01:00
xmon powerpc/xmon: Don't use ld on 32-bit 2016-09-13 17:37:02 +10:00
Kconfig security/keys: add CONFIG_KEYS_COMPAT to Kconfig 2017-11-18 11:22:24 +01:00
Kconfig.debug powerpc/mm: Catch usage of cpu/mmu_has_feature() before jump label init 2016-08-01 11:15:06 +10:00
Makefile powerpc: Fix compiling a BE kernel with a powerpc64le toolchain 2017-12-14 09:28:17 +01:00
relocs_check.sh powerpc/64: whitelist unresolved modversions CRCs 2016-09-22 14:46:31 +02:00