[Crash-utility] Re: [PATCH v4 ] Adding the zram decompression algorithm "lzo-rle" to support kernel versions >= 5.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux