linux/arch/x86/um
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
..
asm ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
os-Linux um: use %lx format specifiers for unsigned longs 2016-03-05 22:21:28 +01:00
shared/sysdep um: Stop abusing __KERNEL__ 2015-05-31 22:05:32 +02:00
vdso um: Add asm/elf.h to vma.c 2015-05-31 17:31:50 +02:00
bug.c
bugs_32.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
bugs_64.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
checksum_32.S um: remove csum_partial_copy_generic_i386 to clean up exception table 2014-10-13 17:15:02 +02:00
delay.c um: merge delay_{32,64}.c 2011-11-02 14:15:37 +01:00
elfcore.c switch elf_core_write_extra_data() to dump_emit() 2013-11-09 00:16:23 -05:00
fault.c um: don't compare a pointer to 0 2012-12-20 11:49:39 -08:00
Kconfig arch/um: make it work with defconfig and x86_64 2013-11-17 11:31:48 +01:00
ksyms.c
ldt.c um: Do not rely on libc to provide modify_ldt() 2015-10-19 22:53:37 +02:00
Makefile um: Fix build error and kconfig for i386 2016-01-10 21:49:49 +01:00
mem_32.c um: Cleanup mem_32/64.c headers 2015-05-31 17:31:42 +02:00
mem_64.c um: Cleanup mem_32/64.c headers 2015-05-31 17:31:42 +02:00
ptrace_32.c um: Fix ptrace GETREGS/SETREGS bugs 2016-01-10 21:49:48 +01:00
ptrace_64.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
ptrace_user.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
setjmp_32.S
setjmp_64.S
signal.c um: Fix pointer cast 2015-12-22 15:31:51 -08:00
stub_32.S um: Remove dead symbol from i386 syscall stub 2015-11-06 22:49:11 +01:00
stub_64.S um: Simplify STUB_DATA loading 2015-11-06 22:49:11 +01:00
stub_segv.c um: get rid of pointless include "..." where include <...> will do 2012-10-09 22:28:45 +02:00
sys_call_table_32.c x86/syscalls: Give sys_call_ptr_t a useful type 2015-10-09 09:41:08 +02:00
sys_call_table_64.c x86/syscalls: Give sys_call_ptr_t a useful type 2015-10-09 09:41:08 +02:00
syscalls_64.c um: Add uaccess.h to syscalls_64.c 2015-05-31 17:31:56 +02:00
sysrq_32.c um: Rewrite show_stack() 2013-11-17 11:27:25 +01:00
sysrq_64.c um: Rewrite show_stack() 2013-11-17 11:27:25 +01:00
tls_32.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
tls_64.c um: Don't pollute kernel namespace with uapi 2015-06-25 22:44:11 +02:00
user-offsets.c x32: Add x32 system calls to syscall/syscall_64.tbl 2012-02-20 12:48:49 -08:00