1 // SPDX-License-Identifier: GPL-2.0-or-later
4 #include <linux/module.h>
5 #include <net/checksum.h>
7 #include <asm/byteorder.h>
10 * copy from fs while checksumming, otherwise like csum_partial
13 csum_partial_copy_from_user(const void __user
*src
, void *dst
, int len
,
14 __wsum sum
, int *csum_err
)
18 missing
= __copy_from_user(dst
, src
, len
);
20 memset(dst
+ len
- missing
, 0, missing
);
25 return csum_partial(dst
, len
, sum
);
27 EXPORT_SYMBOL(csum_partial_copy_from_user
);
29 /* These are from csum_64plus.S */
30 EXPORT_SYMBOL(csum_partial
);
31 EXPORT_SYMBOL(csum_partial_copy
);
32 EXPORT_SYMBOL(ip_compute_csum
);
33 EXPORT_SYMBOL(ip_fast_csum
);