Spdk/lib/util
Richael Zhuang fed358a0e7 util: fix misaligned load for uint64_t type
The following error was reported when running gpt_ut which is related
to crc32_update().
"load of misaligned address 0x001ffeff78cc for type 'const uint64_t',
which requires 8 byte alignment".

This patch preprocesses the first several bytes to make the buf address
passed to __crc32_d or__crc32_cd is 8 byte aligned. And finally process
the trailing bytes.

For function spdk_crc32c_update in crc32c.c, memcpy was used to avoid
misaligned load problem. Update it with above solution to reduce extra
overhead.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I7c7aaa41e1c042a96668158818b06729fb3ceec6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16801
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2023-03-01 08:56:01 +00:00
..
base64_neon.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
base64_sve.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
base64.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
bit_array.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
cpuset.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc16.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32_ieee.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32.c util: fix misaligned load for uint64_t type 2023-03-01 08:56:01 +00:00
crc32c.c util: fix misaligned load for uint64_t type 2023-03-01 08:56:01 +00:00
crc_internal.h util add crc_internal.h 2023-02-06 08:34:08 +00:00
dif.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
fd_group.c thread: Always wrap interrupt handlers to set the thread correctly 2023-02-28 08:52:27 +00:00
fd.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
file.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
hexlify.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
iov.c util: add spdk_iov_xfer_*() API 2023-01-30 16:28:35 +00:00
Makefile uuid: add spdk_uuid_generate_sha1() 2023-02-28 08:57:01 +00:00
math.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
pipe.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_util.map uuid: add spdk_uuid_generate_sha1() 2023-02-28 08:57:01 +00:00
strerror_tls.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
string.c util: Add spdk_strcpy_replace() to replace substrings 2023-01-10 13:12:05 +00:00
util_internal.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
uuid.c uuid: add spdk_uuid_generate_sha1() 2023-02-28 08:57:01 +00:00
xor.c update Intel copyright notices 2022-11-10 08:28:53 +00:00
zipf.c update Intel copyright notices 2022-11-10 08:28:53 +00:00