Re: [PATCH v2] kbuild: treat char as always unsigned
Thread information
[Search the linux-kernel archive]
[PATCH] kbuild: treat char as always signed Jason A. Donenfeld ` Segher Boessenkool ` Linus Torvalds ` Linus Torvalds ` Nick Desaulniers ` Linus Torvalds ` Andy Shevchenko ` Linus Torvalds ` Segher Boessenkool ` Linus Torvalds ` Nick Desaulniers ` Linus Torvalds ` Kees Cook ` Linus Torvalds ` Jason A. Donenfeld ` Linus Torvalds ` Jason A. Donenfeld ` Segher Boessenkool ` David Laight ` Segher Boessenkool ` Gabriel Paubert ` Linus Torvalds ` Gabriel Paubert ` Linus Torvalds ` Gabriel Paubert ` Kees Cook ` Jason A. Donenfeld ` Kees Cook ` Linus Torvalds ` Jason A. Donenfeld ` [PATCH v2] kbuild: treat char as always unsigned Jason A. Donenfeld ` Linus Torvalds [this message] ` Jason A. Donenfeld ` Linus Torvalds ` Jason A. Donenfeld ` Kees Cook ` Jason A. Donenfeld ` Segher Boessenkool ` Dan Carpenter ` Dan Carpenter ` Jason A. Donenfeld ` Linus Torvalds ` Jason A. Donenfeld ` Kalle Valo ` David Laight ` Jason A. Donenfeld ` Guenter Roeck ` Geert Uytterhoeven ` Guenter Roeck ` Rasmus Villemoes ` Guenter Roeck ` Linus Torvalds ` Guenter Roeck ` Linus Torvalds ` Linus Torvalds ` Guenter Roeck ` Geert Uytterhoeven ` David Laight ` Geert Uytterhoeven ` David Laight ` David Laight ` Geert Uytterhoeven ` Andreas Schwab ` Geert Uytterhoeven ` [PATCH] kbuild: treat char as always signed David Laight ` make ctype ascii only? (was [PATCH] kbuild: treat char as always signed) Rasmus Villemoes ` Linus Torvalds ` Rasmus Villemoes ` Linus Torvalds ` [PATCH] kbuild: treat char as always signed kernel test robot ` Jason A. Donenfeld
From: | Linus Torvalds <torvalds-AT-linux-foundation.org> | |
To: | "Jason A. Donenfeld" <Jason-AT-zx2c4.com> | |
Subject: | Re: [PATCH v2] kbuild: treat char as always unsigned | |
Date: | Wed, 19 Oct 2022 16:56:03 -0700 | |
Message-ID: | <CAHk-=wit-67VU=kt-8Ojtx04m6wxfqypKLzW7CuSeEH_9MYZvw@mail.gmail.com> | |
Cc: | linux-kernel-AT-vger.kernel.org, linux-kbuild-AT-vger.kernel.org, linux-arch-AT-vger.kernel.org, linux-toolchains-AT-vger.kernel.org, Masahiro Yamada <masahiroy-AT-kernel.org>, Kees Cook <keescook-AT-chromium.org>, Andrew Morton <akpm-AT-linux-foundation.org>, Andy Shevchenko <andriy.shevchenko-AT-linux.intel.com>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org> |
On Wed, Oct 19, 2022 at 1:30 PM Jason A. Donenfeld <[email protected]> wrote: > > So let's just eliminate this particular variety of heisensign bugs > entirely. Set `-funsigned-char` globally, so that gcc makes the type > unsigned on all architectures. > > This will break things in some places and fix things in others, so this > will likely cause a bit of churn while reconciling the type misuse. Yeah, if we were still in the merge window, I'd probably apply this, but as things stand, I think it should go into linux-next and cook there for the next merge window. Anybody willing to put this in their -next trees? Any breakage it causes is likely going to be fairly subtle, and in some random driver that isn't used on architectures that already have an unsigned 'char' type. I think the architectures with an unsigned 'char' are arm, powerpc and s390, in all their variations (ie both 32- and 64-bit). So all *core* code should be fine with this, but that still leaves a lot of drivers that have likely never been tested on anything but x86, and could just stop working. I don't think breakage is very *likely*, but I suspect it exists. Linus