Whamcloud - gitweb
lib/ext2fs: remove 32-bit x86 bitops assembly
authorEric Biggers <ebiggers@google.com>
Sat, 21 Jan 2023 20:32:07 +0000 (12:32 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 27 Jan 2023 17:33:59 +0000 (12:33 -0500)
commit71c2baa11755344730e67f6b0faa5a6b30764f5a
tree5d346c0f96d6e366f8fc393a84819248c213ab45
parent6a5d03d4a5cd1fae84c94c797f28e86fae831865
lib/ext2fs: remove 32-bit x86 bitops assembly

The EXT2FS_ADDR() macro is causing -Warray-bounds warnings because it
(sort of) dereferences past the end of the input array.  It's not a
"real" dereference, since the result is passed as a memory operand to
inline asm.  But in the C language sense, it is a dereference.

Instead of trying to fix this code, let's consider that libext2fs *only*
implements the bit operations in assembly for 32-bit x86, which is
rarely used anymore.  The fact that compilers have also improved, and no
one has implemented these for another architecture, even x86_64,
suggests it's not useful either.  So, let's just remove this outdated
code, which was maybe useful in the 90s, but now just causes problems.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/bitops.c
lib/ext2fs/bitops.h