diff options
author | David Gow <davidgow@google.com> | 2023-07-04 16:30:22 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-08-26 22:39:24 +0200 |
commit | ff3f78607998274460f1742a7dfd853c6124d34a (patch) | |
tree | df7c62f0e4529104e980064d782ae63def0cb6f0 /lib/crypto/mpi/mpi-mul.c | |
parent | 760ee8f83825f6b6ee711bb50b61a2e9a89209a0 (diff) |
um: Use the x86 checksum implementation on 32-bit
When UML is compiled under 32-bit x86, it uses its own copy of
checksum_32.S, which is terribly out-of-date and doesn't support
checksumming unaligned data.
This causes the new "checksum" KUnit test to fail:
./tools/testing/kunit/kunit.py run --kconfig_add CONFIG_64BIT=n --cross_compile i686-linux-gnu- checksum
KTAP version 1
# Subtest: checksum
1..3
# test_csum_fixed_random_inputs: ASSERTION FAILED at lib/checksum_kunit.c:243
Expected result == expec, but
result == 33316 (0x8224)
expec == 33488 (0x82d0)
not ok 1 test_csum_fixed_random_inputs
# test_csum_all_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:267
Expected result == expec, but
result == 65280 (0xff00)
expec == 0 (0x0)
not ok 2 test_csum_all_carry_inputs
# test_csum_no_carry_inputs: ASSERTION FAILED at lib/checksum_kunit.c:306
Expected result == expec, but
result == 65531 (0xfffb)
expec == 0 (0x0)
not ok 3 test_csum_no_carry_inputs
Sharing the normal implementation in arch/x86/lib both fixes all of
these issues and means any further fixes only need to be done once.
x86_64 already seems to share the same implementation between UML and
"normal" x86.
Signed-off-by: David Gow <davidgow@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions