linux/arch/m68k/lib
Al Viro c693cc4676 saner calling conventions for csum_and_copy_..._user()
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>
2020-08-20 15:45:15 -04:00
..
ashldi3.c m68k: replace gcc specific macros with ones from compiler.h 2017-02-24 17:46:56 -08:00
ashrdi3.c m68k: replace gcc specific macros with ones from compiler.h 2017-02-24 17:46:56 -08:00
checksum.c saner calling conventions for csum_and_copy_..._user() 2020-08-20 15:45:15 -04:00
divsi3.S m68k: move exports to definitions 2016-08-07 23:47:19 -04:00
lshrdi3.c m68k: replace gcc specific macros with ones from compiler.h 2017-02-24 17:46:56 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memcpy.c m68k: fix unused variable warning in mempcy.c 2012-12-05 10:51:23 +10:00
memmove.c
memset.c
modsi3.S m68k: move exports to definitions 2016-08-07 23:47:19 -04:00
muldi3.c m68k: replace gcc specific macros with ones from compiler.h 2017-02-24 17:46:56 -08:00
mulsi3.S m68k: move exports to definitions 2016-08-07 23:47:19 -04:00
uaccess.c m68k: get rid of zeroing 2017-03-28 18:23:40 -04:00
udivsi3.S m68k: move exports to definitions 2016-08-07 23:47:19 -04:00
umodsi3.S m68k: move exports to definitions 2016-08-07 23:47:19 -04:00