Commit b5319c9
Revert "sh: Handle calling csum_partial with misaligned data"
This reverts commit cadc4e1.
Commit cadc4e1 ("sh: Handle calling csum_partial with misaligned
data") causes bad checksum calculations on unaligned data. Reverting
it fixes the problem.
# Subtest: checksum
# module: checksum_kunit
1..5
# test_csum_fixed_random_inputs: ASSERTION FAILED at lib/checksum_kunit.c:500
Expected ( u64)result == ( u64)expec, but
( u64)result == 53378 (0xd082)
( u64)expec == 33488 (0x82d0)
# test_csum_fixed_random_inputs: pass:0 fail:1 skip:0 total:1
not ok 1 test_csum_fixed_random_inputs
# test_csum_all_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:525
Expected ( u64)result == ( u64)expec, but
( u64)result == 65281 (0xff01)
( u64)expec == 65280 (0xff00)
# test_csum_all_carry_inputs: pass:0 fail:1 skip:0 total:1
not ok 2 test_csum_all_carry_inputs
# test_csum_no_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:573
Expected ( u64)result == ( u64)expec, but
( u64)result == 65535 (0xffff)
( u64)expec == 65534 (0xfffe)
# test_csum_no_carry_inputs: pass:0 fail:1 skip:0 total:1
not ok 3 test_csum_no_carry_inputs
# test_ip_fast_csum: pass:1 fail:0 skip:0 total:1
ok 4 test_ip_fast_csum
# test_csum_ipv6_magic: pass:1 fail:0 skip:0 total:1
ok 5 test_csum_ipv6_magic
# checksum: pass:2 fail:3 skip:0 total:5
# Totals: pass:2 fail:3 skip:0 total:5
not ok 22 checksum
Fixes: cadc4e1 ("sh: Handle calling csum_partial with misaligned data")
Signed-off-by: Guenter Roeck <[email protected]>
Tested-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: John Paul Adrian Glaubitz <[email protected]>1 parent 6516f19 commit b5319c9
1 file changed
+18
-49
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | 54 | | |
74 | 55 | | |
75 | 56 | | |
76 | 57 | | |
77 | 58 | | |
78 | 59 | | |
79 | 60 | | |
| 61 | + | |
80 | 62 | | |
81 | 63 | | |
82 | 64 | | |
83 | 65 | | |
84 | 66 | | |
85 | 67 | | |
86 | | - | |
87 | | - | |
88 | 68 | | |
89 | | - | |
90 | | - | |
| 69 | + | |
| 70 | + | |
91 | 71 | | |
92 | 72 | | |
93 | 73 | | |
| |||
109 | 89 | | |
110 | 90 | | |
111 | 91 | | |
112 | | - | |
| 92 | + | |
113 | 93 | | |
114 | 94 | | |
115 | | - | |
116 | | - | |
| 95 | + | |
| 96 | + | |
117 | 97 | | |
118 | | - | |
| 98 | + | |
119 | 99 | | |
120 | 100 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
125 | 104 | | |
126 | 105 | | |
127 | 106 | | |
128 | 107 | | |
129 | 108 | | |
130 | | - | |
| 109 | + | |
131 | 110 | | |
132 | 111 | | |
133 | 112 | | |
134 | | - | |
| 113 | + | |
135 | 114 | | |
136 | | - | |
| 115 | + | |
137 | 116 | | |
138 | 117 | | |
139 | 118 | | |
| |||
159 | 138 | | |
160 | 139 | | |
161 | 140 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 141 | | |
173 | 142 | | |
174 | 143 | | |
| |||
0 commit comments