1
0
Fork 0
remarkable-linux/arch/mn10300/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
..
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
asm-offsets.h kbuild: move asm-offsets.h to include/generated 2009-12-12 13:08:14 +01:00
atomic.h atomic, arch: Audit atomic_{read,set}() 2015-09-23 09:54:28 +02:00
bitops.h arch,mn10300: Convert smp_mb__*() 2014-04-18 14:20:39 +02:00
bug.h MN10300: Stop gcc from generating uninitialised variable warnings after BUG() 2009-04-15 13:55:13 -07:00
bugs.h
busctl-regs.h
cache.h MN10300: Don't hard code the cacheline size in register defs 2010-10-27 17:28:39 +01:00
cacheflush.h mm/debug_pagealloc: fix build failure on ppc and some other archs 2015-02-05 13:35:30 -08:00
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
cmpxchg.h Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
cpu-regs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
current.h
debugger.h MN10300: Create generic kernel debugger hooks 2011-03-18 16:54:30 +00:00
delay.h
device.h
div64.h MN10300: gcc 4.6 vs am33 inline assembly 2011-03-23 17:42:49 +00:00
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
dmactl-regs.h MN10300: Move DMA engine control reg defs to MN103E010 processor directory 2010-10-27 17:28:39 +01:00
elf.h default SET_PERSONALITY() in linux/elf.h 2013-02-26 02:46:08 -05:00
emergency-restart.h
exceptions.h treewide: convert uses of ATTRIB_NORETURN to __noreturn 2012-01-12 20:13:03 -08:00
fb.h
fpu.h MN10300: Create generic kernel debugger hooks 2011-03-18 16:54:30 +00:00
frame.inc mn10300: switch to generic kernel_execve() 2012-10-01 00:53:59 -04:00
ftrace.h
futex.h
gdb-stub.h MN10300: Provide a MN10300_CACHE_ENABLED config option 2010-10-27 17:28:42 +01:00
hardirq.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
highmem.h sched/preempt, mm/kmap: Explicitly disable/enable preemption in kmap_atomic_* 2015-05-19 08:39:14 +02:00
hw_irq.h
intctl-regs.h MN10300: Remove unused mn10300_intc_* functions 2011-03-18 16:52:51 +00:00
io.h arch/*/io.h: Add ioremap_uc() to all architectures 2015-07-29 10:02:36 +02:00
irq.h MN10300: ASB2364: Handle the IRQ multiplexer in the FPGA 2010-10-27 17:28:58 +01:00
irq_regs.h MN10300: Save frame pointer in thread_info struct rather than global var 2010-10-27 17:29:01 +01:00
irqflags.h mn10300: Fix include dependency in irqflags.h et al. 2013-06-19 06:29:54 -10:00
kdebug.h
kgdb.h MN10300: Use KGDB 2011-03-18 16:54:31 +00:00
kmap_types.h kmap_types: make most arches use generic header file 2009-06-16 19:47:51 -07:00
kprobes.h
linkage.h
local.h
local64.h arch: Implement local64_t 2010-06-09 11:12:36 +02:00
mc146818rtc.h
mmu.h
mmu_context.h treewide: fix "distingush" typo 2013-10-14 15:38:33 +02:00
module.h Make most arch asm/module.h files use asm-generic/module.h 2012-09-28 14:31:03 +09:30
mutex.h
nmi.h
page.h libnvdimm, pfn, pmem: allocate memmap array in persistent memory 2016-01-15 17:56:32 -08:00
page_offset.h
pci.h Merge branch 'for-4.2/sg' of git://git.kernel.dk/linux-block 2015-06-25 15:22:36 -07:00
percpu.h
pgalloc.h mn10300: add missing pgtable_page_ctor/dtor calls 2013-11-15 09:32:16 +09:00
pgtable.h mm: add missing __PAGETABLE_{PUD,PMD}_FOLDED defines 2015-02-28 09:57:51 -08:00
pio-regs.h
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
ptrace.h UAPI Disintegration 2012-10-10 2012-10-13 11:22:31 +09:00
reset-regs.h nmi watchdog: do not use cpp symbol in Kconfig 2012-03-23 16:58:31 -07:00
rtc-regs.h
rtc.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
rwlock.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
serial-regs.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
serial.h serial: 8250: remove Kconfig indirection 2015-05-06 22:27:00 +02:00
setup.h UAPI: (Scripted) Disintegrate arch/mn10300/include/asm 2012-10-10 12:10:10 +01:00
shmparam.h
signal.h mn10300: switch to generic old sigaction() 2013-02-03 18:16:04 -05:00
smp.h mn10300: Fix include dependency in irqflags.h et al. 2013-06-19 06:29:54 -10:00
smsc911x.h MN10300: ASB2364: Add support for SMSC911X and SMC911X 2010-10-27 17:28:58 +01:00
spinlock.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
spinlock_types.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
string.h
switch_to.h Disintegrate asm/system.h for MN10300 2012-03-28 18:30:02 +01:00
syscall.h MN10300: Implement asm/syscall.h 2010-12-03 09:18:53 -08:00
termios.h UAPI: (Scripted) Disintegrate arch/mn10300/include/asm 2012-10-10 12:10:10 +01:00
thread_info.h mn10300: Remove signal translation and exec_domain 2015-04-12 20:58:25 +02:00
timer-regs.h MN10300: And Panasonic AM34 subarch and implement SMP 2010-10-27 17:28:55 +01:00
timex.h mn10300: move setup_jiffies_interrupt() to cevt-mn10300.c 2012-07-11 16:04:41 -07:00
tlb.h
tlbflush.h MN10300: SMP TLB flushing 2010-10-27 17:28:51 +01:00
topology.h
types.h UAPI: (Scripted) Disintegrate arch/mn10300/include/asm 2012-10-10 12:10:10 +01:00
uaccess.h put the remnants of ..._user_ret() to rest 2016-01-04 10:28:06 -05:00
ucontext.h
unaligned.h
unistd.h sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
user.h
vga.h
xor.h