OpenCloudOS-Kernel/arch/m32r/include/asm
Alexander Duyck 01cfbad79a ipv4: Update parameters for csum_tcpudp_magic to their original types
This patch updates all instances of csum_tcpudp_magic and
csum_tcpudp_nofold to reflect the types that are usually used as the source
inputs.  For example the protocol field is populated based on nexthdr which
is actually an unsigned 8 bit value.  The length is usually populated based
on skb->len which is an unsigned integer.

This addresses an issue in which the IPv6 function csum_ipv6_magic was
generating a checksum using the full 32b of skb->len while
csum_tcpudp_magic was only using the lower 16 bits.  As a result we could
run into issues when attempting to adjust the checksum as there was no
protocol agnostic way to update it.

With this change the value is still truncated as many architectures use
"(len + proto) << 8", however this truncation only occurs for values
greater than 16776960 in length and as such is unlikely to occur as we stop
the inner headers at ~64K in size.

I did have to make a few minor changes in the arm, mn10300, nios2, and
score versions of the function in order to support these changes as they
were either using things such as an OR to combine the protocol and length,
or were using ntohs to convert the length which would have truncated the
value.

I also updated a few spots in terms of whitespace and type differences for
the addresses.  Most of this was just to make sure all of the definitions
were in sync going forward.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-03-13 23:55:13 -04:00
..
m32104ut Fix common misspellings 2011-03-31 11:26:23 -03:00
m32700ut Fix common misspellings 2011-03-31 11:26:23 -03:00
mappi2
mappi3
opsput Fix common misspellings 2011-03-31 11:26:23 -03:00
Kbuild m32r: fix build failure 2015-12-29 17:45:49 -08:00
addrspace.h
asm-offsets.h m32r: Autogenerate offsets in struct thread_info 2015-04-12 20:58:24 +02:00
assembler.h m32r: use __stringify() macro in assembler.h 2009-05-02 22:38:21 +09:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
barrier.h arch: Clean up asm/barrier.h implementations using asm-generic/barrier.h 2014-01-12 10:37:15 +01:00
bitops.h arch,m32r: Convert smp_mb__*() 2014-04-18 14:20:36 +02:00
bug.h
bugs.h
cache.h
cachectl.h
cacheflush.h block: add helpers to run flush_dcache_page() against a bio and a request's pages 2009-11-26 09:16:19 +01:00
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
cmpxchg.h arch: Remove __ARCH_HAVE_CMPXCHG 2015-05-13 10:55:42 +02:00
current.h
dcache_clear.h Disintegrate asm/system.h for M32R 2012-03-28 18:30:02 +01:00
delay.h asm-generic: move archictures to common delay.h 2011-07-22 18:46:24 +02:00
device.h
div64.h
dma.h
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
emergency-restart.h
fb.h
flat.h flat: fix data sections alignment 2009-05-29 08:40:02 -07:00
ftrace.h
futex.h
hardirq.h hardirq: Make hardirq bits generic 2013-11-13 20:21:46 +01:00
hw_irq.h
io.h m32r: add io*_rep helpers 2015-12-29 17:45:49 -08:00
irq.h
irq_regs.h
irqflags.h Fix IRQ flag handling naming 2010-10-07 14:08:55 +01:00
kdebug.h
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
linkage.h
local.h Disintegrate asm/system.h for M32R 2012-03-28 18:30:02 +01:00
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
m32r.h
m32r_mp_fpga.h
m32102.h
mc146818rtc.h
mmu.h
mmu_context.h treewide: fix "distingush" typo 2013-10-14 15:38:33 +02:00
mmzone.h Fix node_start/end_pfn() definition for mm/page_cgroup.c 2011-06-27 14:13:09 -07:00
mutex.h
page.h m32r: make PAGE_SIZE available to assembly. 2009-09-23 00:29:38 +09:00
pci.h asm-generic: make pci.h usable directly 2009-06-11 21:02:22 +02:00
percpu.h
pgalloc.h m32r: handle pgtable_page_ctor() fail 2013-11-15 09:32:17 +09:00
pgtable-2level.h mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines 2015-02-28 09:57:51 -08:00
pgtable.h mm: make FIRST_USER_ADDRESS unsigned long on all archs 2015-02-11 17:06:03 -08:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
ptrace.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
rtc.h
s1d13806.h
segment.h
serial.h
setup.h UAPI: (Scripted) Disintegrate arch/m32r/include/asm 2012-12-19 16:07:18 +00:00
shmparam.h
signal.h consolidate kernel-side struct sigaction declarations 2013-02-03 15:09:22 -05:00
smp.h smp: Remove num_booting_cpus() 2012-06-05 17:32:30 +02:00
spinlock.h Disintegrate asm/system.h for M32R 2012-03-28 18:30:02 +01:00
spinlock_types.h locking: Convert raw_rwlock to arch_rwlock 2009-12-14 23:55:32 +01:00
string.h
switch_to.h Disintegrate asm/system.h for M32R 2012-03-28 18:30:02 +01:00
syscall.h
termios.h UAPI: (Scripted) Disintegrate arch/m32r/include/asm 2012-12-19 16:07:18 +00:00
thread_info.h m32r: Remove signal translation and exec_domain 2015-04-12 20:58:25 +02:00
timex.h
tlb.h
tlbflush.h MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
topology.h
types.h UAPI: (Scripted) Disintegrate arch/m32r/include/asm 2012-12-19 16:07:18 +00:00
uaccess.h mm/uaccess, mm/fault: Clarify that uaccess may only sleep if pagefaults are enabled 2015-05-19 08:39:14 +02:00
ucontext.h
unaligned.h
unistd.h consolidate cond_syscall and SYSCALL_ALIAS declarations 2013-03-03 22:55:19 -05:00
user.h
vga.h
xor.h