Skip to content
Commit b95395ba authored by Pedro Falcato's avatar Pedro Falcato
Browse files

Ext4Pkg: Fix CRC16 checksumming on block groups

Old filesystems (around 2008 and older) do not use CRC32c
but rather CRC16-ANSI. Previously, the CalculateCrc16Ansi function was
broken and gave us wrong checksums. Adapt to the new interface.

And while we're at it, fix the checksum algorithm itself - the crc16
algorithm just skips over the bg_checksum, and does not checksum it.

This problem was found out-of-list when older ext4 filesystems
(that use crc16 checksums) failed to mount with "corruption".

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4609


Signed-off-by: default avatarPedro Falcato <pedro.falcato@gmail.com>
Cc: Savva Mitrofanov <savvamtr@gmail.com>
Cc: Marvin Häuser <mhaeuser@posteo.de>
Reviewed-by: default avatarMarvin Häuser <mhaeuser@posteo.de>
parent 674d6cf4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment