]> Git Repo - linux.git/commit
ext4: deal with legacy signed xattr name hash values
authorLinus Torvalds <[email protected]>
Wed, 18 Jan 2023 04:27:23 +0000 (20:27 -0800)
committerLinus Torvalds <[email protected]>
Sat, 21 Jan 2023 18:14:47 +0000 (10:14 -0800)
commitf3bbac32475b27f49be201f896d98d4009de1562
tree846c1202579a22355107289288854926ec12b4c1
parentf883675bf6522b52cd75dc3de791680375961769
ext4: deal with legacy signed xattr name hash values

We potentially have old hashes of the xattr names generated on systems
with signed 'char' types.  Now that everybody uses '-funsigned-char',
those hashes will no longer match.

This only happens if you use xattrs names that have the high bit set,
which probably doesn't happen in practice, but the xfstest generic/454
shows it.

Instead of adding a new "signed xattr hash filesystem" bit and having to
deal with all the possible combinations, just calculate the hash both
ways if the first one fails, and always generate new hashes with the
proper unsigned char version.

Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/oe-lkp/[email protected]
Link: https://lore.kernel.org/all/CAHk-=whUNjwqZXa-MH9KMmc_CpQpoFKFjAB9ZKHuu=TbsouT4A@mail.gmail.com/
Exposed-by: 3bc753c06dd0 ("kbuild: treat char as always unsigned")
Cc: Eric Biggers <[email protected]>
Cc: Andreas Dilger <[email protected]>
Cc: Theodore Ts'o <[email protected]>,
Cc: Jason Donenfeld <[email protected]>
Cc: Masahiro Yamada <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/ext4/xattr.c
This page took 0.054591 seconds and 4 git commands to generate.