Re: [PATCH v3 0/2] objtool: Add option to fail build on vmlinux warnings

Nathan Chancellor
2025-02-06T17:10:41Z

On Thu, Feb 06, 2025 at 04:05:01PM +0100, Brendan Jackman wrote:
> OK, it would be interesting to spend a couple of hours staring at
> these errors and see if I can get a feel for the overal picture..
>
> Also, now that I think about it I'm a bit embarrassed I didn't try
> building allmodconfig before sending this series (maybe I had
> forgotten it exists?)! Sorry about that :)
>
> On Fri, 31 Jan 2025 at 21:49, Nathan Chancellor <nathan@kernel.org> wrote:
> > > But I can also envisage a world where that creates exactly as much
> > > work for you, just introducing Kconfig hackery for no reason!
> >
> > Such is the nature of such changes. It is not that big of a deal for us
> > to work around in the short term but it would still need to be addressed
> > pretty quickly at that point.
>
> I can't quite parse what you're getting at here - is this an opinion
> about the idea to depend on !COMPILE_TEST, and if so are you in favour
> of it?

Sorry, that was more of a comment around having to disable that
configuration for builds such as allmodconfig if necessary to keep our
builds green. We can do it but that is not a long term solution because
we are not the only ones building allmodconfig with clang and we cannot
just tell everyone to disable it.

> My thinking is that if it defaults n and isn't in allmodconfig, the
> only people who will turn it on are those who actively care about
> clean objtool for their build. Which.. isn't really what we want long
> term, but it's better than not having the option at all and is already
> a step in the direction of something that can act as a "ratchet".

Right, I think gating on '!COMPILE_TEST' would not be a terrible way to
introduce it. We would definitely want to remove that dependency as
soon as possible because we want compile testers to be qble to find
these problems and have them be noticeable but it should make the
introduction of CONFIG_OBJTOOL_WERROR less disruptive.

> If not, I'll go ahead with the OBJTOOL_FLAGS thing. (Which is still a
> nice step in that direction).

This may still be worth doing because with the aforementioned
dependency, it would make it difficult to test with --Werror for
COMPILE_TEST configurations. Maybe Josh or Peter have other opinions
though.

Cheers,
Nathan