mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-05 04:50:07 +00:00
All callers of these primitives will * discard anything we might've copied in case of error * ignore the csum value in case of error * always pass 0xffffffff as the initial sum, so the resulting csum value (in case of success, that is) will never be 0. That suggest the following calling conventions: * don't pass err_ptr - just return 0 on error. * don't bother with zeroing destination, etc. in case of error * don't pass the initial sum - just use 0xffffffff. This commit does the minimal conversion in the instances of csum_and_copy_...(); the changes of actual asm code behind them are done later in the series. Note that this asm code is often shared with csum_partial_copy_nocheck(); the difference is that csum_partial_copy_nocheck() passes 0 for initial sum while csum_and_copy_..._user() pass 0xffffffff. Fortunately, we are free to pass 0xffffffff in all cases and subsequent patches will use that freedom without any special comments. A part that could be split off: parisc and uml/i386 claimed to have csum_and_copy_to_user() instances of their own, but those were identical to the generic one, so we simply drop them. Not sure if it's worth a separate commit... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
||
|---|---|---|
| .. | ||
| asm | ||
| os-Linux | ||
| shared/sysdep | ||
| vdso | ||
| bugs_32.c | ||
| bugs_64.c | ||
| checksum_32.S | ||
| delay.c | ||
| elfcore.c | ||
| fault.c | ||
| Kconfig | ||
| ldt.c | ||
| Makefile | ||
| mem_32.c | ||
| mem_64.c | ||
| ptrace_32.c | ||
| ptrace_64.c | ||
| ptrace_user.c | ||
| setjmp_32.S | ||
| setjmp_64.S | ||
| signal.c | ||
| stub_32.S | ||
| stub_64.S | ||
| stub_segv.c | ||
| sys_call_table_32.c | ||
| sys_call_table_64.c | ||
| syscalls_32.c | ||
| syscalls_64.c | ||
| sysrq_32.c | ||
| sysrq_64.c | ||
| tls_32.c | ||
| tls_64.c | ||
| user-offsets.c | ||