On Tue, Jan 24, 2023 at 8:50 AM Linus Torvalds torvalds@linux-foundation.org wrote:
This patch does not work correctly without '-funsigned-char', and I don't think that has been back-ported to stable kernels.
That said, the patch *almost* works.
So I'm not convinced this should be back-ported at all, but it's certainly true that going back and forth between the two cases would be problematic.
Maybe the right thing to do would be for me to just do that explicit 'unsigned char' even in kernels that don't need it, and also add a 'pr_warn_once()' to make people aware of this case if it ever happens outside of the xfstests.
So a more complete patch might be something like the attached (which also changes the polarity of the signed hash test, in order to make the pr_warn_once() simpler).
Linus