LU-5279 crypto: no vmalloc() for speed test buffer
Since the patch LU-5053 "libcfs: clean up cfs_crypto_hash code"
(commit
0723b8be34503b31dbfc6c877d7a855091c625b4) was landed the
cfs_crypto_performance_test() code can fail if CONFIG_DEBUG_VIRTUAL
is enabled. This causes problems in SG handling because it expects
physical addresses:
kernel BUG at arch/x86/mm/physaddr.c:20!
RIP: 0010:[<
ffffffff81050447>] __phys_addr+0x67/0x80
sg_init_one+0x36/0x80
cfs_crypto_hash_digest+0x94/0xf0 [libcfs]
cfs_crypto_register+0x108/0x330 [libcfs]
init_libcfs_module+0x0/0x3c0 [libcfs]
sys_init_module+0xe3/0x260
Don't use vmalloc() to allocate the cfs_crypto_test_hashes()
test buffer. Use alloc_page() and use cfs_crypto_hash_update_page()
to compute the hash instead of cfs_crypto_hash_digest(), since
tgt_checksum_bulk() computes the hash by page anyway.
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I27ec3cf2931b6bf385dd91191abba8955b500c1e
Reviewed-on: http://review.whamcloud.com/10982
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Alexander Boyko <alexander_boyko@xyratex.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>