| .. | .. |
|---|
| 38 | 38 | * here even more important to align src and dst on a 32-bit (or even |
|---|
| 39 | 39 | * better 64-bit) boundary |
|---|
| 40 | 40 | */ |
|---|
| 41 | | -__wsum csum_partial_copy_nocheck(const void *src, void *dst, |
|---|
| 42 | | - int len, __wsum sum); |
|---|
| 43 | | - |
|---|
| 44 | | -long __csum_partial_copy_from_user(const void __user *src, |
|---|
| 45 | | - void *dst, int len, |
|---|
| 46 | | - __wsum sum); |
|---|
| 47 | | - |
|---|
| 48 | | -static inline __wsum |
|---|
| 49 | | -csum_partial_copy_from_user(const void __user *src, |
|---|
| 50 | | - void *dst, int len, |
|---|
| 51 | | - __wsum sum, int *err) |
|---|
| 52 | | -{ |
|---|
| 53 | | - long ret = __csum_partial_copy_from_user(src, dst, len, sum); |
|---|
| 54 | | - if (ret < 0) |
|---|
| 55 | | - *err = -EFAULT; |
|---|
| 56 | | - return (__force __wsum) ret; |
|---|
| 57 | | -} |
|---|
| 58 | | - |
|---|
| 59 | | -/* |
|---|
| 60 | | - * Copy and checksum to user |
|---|
| 61 | | - */ |
|---|
| 62 | | -#define HAVE_CSUM_COPY_USER |
|---|
| 63 | | -long __csum_partial_copy_to_user(const void *src, |
|---|
| 64 | | - void __user *dst, int len, |
|---|
| 65 | | - __wsum sum); |
|---|
| 66 | | - |
|---|
| 67 | | -static inline __wsum |
|---|
| 68 | | -csum_and_copy_to_user(const void *src, |
|---|
| 69 | | - void __user *dst, int len, |
|---|
| 70 | | - __wsum sum, int *err) |
|---|
| 71 | | -{ |
|---|
| 72 | | - long ret = __csum_partial_copy_to_user(src, dst, len, sum); |
|---|
| 73 | | - if (ret < 0) |
|---|
| 74 | | - *err = -EFAULT; |
|---|
| 75 | | - return (__force __wsum) ret; |
|---|
| 76 | | -} |
|---|
| 41 | +__wsum csum_partial_copy_nocheck(const void *src, void *dst, int len); |
|---|
| 42 | +__wsum csum_and_copy_from_user(const void __user *src, void *dst, int len); |
|---|
| 43 | +__wsum csum_and_copy_to_user(const void *src, void __user *dst, int len); |
|---|
| 77 | 44 | |
|---|
| 78 | 45 | /* ihl is always 5 or greater, almost always is 5, and iph is word aligned |
|---|
| 79 | 46 | * the majority of the time. |
|---|