Whamcloud - gitweb
e2fsck: fix portability problems caused by unaligned accesses
authorTheodore Ts'o <tytso@mit.edu>
Mon, 3 May 2021 19:37:33 +0000 (15:37 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 May 2021 18:02:51 +0000 (14:02 -0400)
commit1e0c8ca7c08abb197aacb3ce78575ee5b00874b6
tree7632fbef25ac2cb405e2eadd66213b673f9f3831
parent32fda1e5a338ff676ae7f7e3e2bc256e7a7e2855
e2fsck: fix portability problems caused by unaligned accesses

The on-disk format for the ext4 journal can have unaigned 32-bit
integers.  This can happen when replaying a journal using a obsolete
checksum format (which was never popularly used, since the v3 format
replaced v2 while the metadata checksum feature was being stablized),
and in the fast commit feature (which landed in the 5.10 kernel,
although it is not enabled by default).

This commit fixes the following regression tests on some platforms
(such as running 32-bit arm architectures on a 64-bit arm kernel):
j_recover_csum2_32bit, j_recover_csum2_64bit, j_recover_fast_commit.

https://github.com/tytso/e2fsprogs/issues/65

Addresses-Debian-Bug: #987641
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/journal.c
e2fsck/recovery.c
tests/j_recover_fast_commit/script