[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220228200934.GF11184@worktop.programming.kicks-ass.net>
Date: Mon, 28 Feb 2022 21:09:34 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, joao@...rdrivepizza.com, hjl.tools@...il.com,
andrew.cooper3@...rix.com, linux-kernel@...r.kernel.org,
ndesaulniers@...gle.com, keescook@...omium.org,
samitolvanen@...gle.com, mark.rutland@....com,
alyssa.milburn@...el.com
Subject: Re: [PATCH 21/29] objtool: Rename --duplicate to --lto
On Mon, Feb 28, 2022 at 10:32:28AM -0800, Josh Poimboeuf wrote:
> Thanks for the explanations. To summarize, we have:
>
> A) legacy mode:
>
> translation unit: objtool check [--module]
> vmlinux.o: N/A
> module: N/A
>
> B) CONFIG_VMLINUX_VALIDATION=y && !(CONFIG_X86_KERNEL_IBT=y || CONFIG_LTO=y)
>
> translation unit: objtool check [--module]
> vmlinux: objtool check --vmlinux --noinstr
> module: objtool check --module --noinstr
Not the module thing here; noinstr never leaves the core kernel (for
now; I need me a few compiler features before I can tackle the idle path
issues).
> C) CONFIG_X86_KERNEL_IBT=y || CONFIG_LTO=y:
>
> translation unit: N/A
> vmlinux: objtool check --vmlinux --noinstr --lto
> module: objtool check --module --noinstr --lto
>
> Right?
More or less, with the one caveat above.
> I think I get it, but it's mental gymnastics for me to remember how the
> options interact. It still seems counterintuitive, because whatever
> "objtool check" does to a translation unit, I'd expect "objtool check
> --vmlinux" to do the same things.
I think I agree. It is a bit weird.
> So how about we just get rid of the magical --vmlinux and --lto options
> altogether, and make --noinstr additive, like all the other options?
>
> A) legacy mode:
> .o files: objtool check [--module]
> vmlinux: N/A
> module: N/A
>
> B) CONFIG_NOINSTR_VALIDATION=y && !(CONFIG_X86_KERNEL_IBT=y || CONFIG_LTO=y):
> .o files: objtool check [--module]
> vmlinux: objtool check --noinstr-only
> module: objtool check --module --noinstr-only
>
> C) CONFIG_X86_KERNEL_IBT=y || CONFIG_LTO=y:
> .o files: N/A
> vmlinux: objtool check --noinstr
> module: objtool check --module --noinstr
I like the --noinstr-only thing. But I think I still like a flag to
differentiate between TU/.o file and vmlinux/whole-module invocation.
Anyway, you ok with me cleaning this up later, in a separate series?
Powered by blists - more mailing lists