On 2024/04/09 18:30, Yulong Tang wrote:
Hi, Lianbo
Thank you for your review.
Your concerns are valid, there are some bit operations performed here after
get_unaligned_le16(), perhaps we can add a check.
But the crash-utility should match the endianess of the vmcore file and the local
machine, and whether the compression algorithm always compresses data in the same format,
so may need to be tested on a big-endian machine.
Good catch, Lianbo.
It seems that in the kenrnel, le16_to_cpu in get_unaligned_le16 does
bswap_16 on a big-endian machine, probably we need to add something like
#if __BYTE_ORDER == __BIG_ENDIAN
return bswap_16(value);
#else
return value;
#endif
Is it possible to test on a big-endian machine?
Thanks,
Kazu