Re: [PATCH 02/11] x86: tboot: avoid Wstringop-overread-warning

From: Arnd Bergmann
Date: Mon Mar 22 2021 - 17:40:58 EST


On Mon, Mar 22, 2021 at 9:29 PM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> * Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
> > From: Arnd Bergmann <arnd@xxxxxxxx>

> This is indeed rather ugly - and the other patch that removes a debug
> check seems counterproductive as well.
>
> Do we know how many genuine bugs -Wstringop-overread-warning has
> caught or is about to catch?
>
> I.e. the real workaround might be to turn off the -Wstringop-overread-warning,
> until GCC-11 gets fixed?

See the [PATCH 0/11] message. The last two patches in the series are for
code that I suspect may be broken, the others are basically all false positives.

As gcc-11 is not released yet, I don't think we have to apply any of the
patches or disable the warning at the moment, but I posted all the patches
to get a better understanding on which of them should be addressed in
the kernel vs gcc.

Arnd