Re: [GIT PULL] overflow updates for v5.15-rc1

From: Linus Torvalds
Date: Sun Sep 05 2021 - 13:36:52 EST


On Sun, Sep 5, 2021 at 12:38 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
>
> Yeech. Yeah, no, that was not expected at all. I even did test merge builds against your latest tree before sending the Pull Request. This has been in -next for weeks, too.

Sadly, I don't think linux-next checks for warnings.

I really want to enable -Werror at some point, but every time I think
I should, I just end up worrying about another random new compiler (or
a random old one).

We do have -Werror in various configurations (and in some sub-trees).

> What was the build environment?

This is actually just bog-standard gcc-11.2 from F34, and an allmodconfig build.

> Seeing an unexpected "-Wunused-value" in your output makes me think I've got a compiler version blind-spot, with some different default flags.)

There were lots of other ones too, I just pasted a small subset. Thne
full error log was 400+ lines. Most of those lines are just because of
the very verbose warnings.

Three errors due to "-Werror=unused-value", but 17 each of variations on

error: call to ‘__read_overflow’ declared with attribute error:
detected read beyond size of object (1st parameter)

and

warning: unsafe xyz() usage lacked '__read_overflow' warning

warnings.

Full 400+ lines (25kB) of errors/warnings messages attached in case
you care about the whole thing and can't easily reproduce.

Linus

Attachment: errors
Description: Binary data