Date: Thu, 15 Oct 2020 01:23:41 +0200 From: Jann Horn <jannh@...gle.com> To: Sami Tolvanen <samitolvanen@...gle.com>, Josh Poimboeuf <jpoimboe@...hat.com>, Peter Zijlstra <peterz@...radead.org>, "the arch/x86 maintainers" <x86@...nel.org> Cc: Masahiro Yamada <masahiroy@...nel.org>, Steven Rostedt <rostedt@...dmis.org>, Will Deacon <will@...nel.org>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, "Paul E. McKenney" <paulmck@...nel.org>, Kees Cook <keescook@...omium.org>, Nick Desaulniers <ndesaulniers@...gle.com>, clang-built-linux <clang-built-linux@...glegroups.com>, Kernel Hardening <kernel-hardening@...ts.openwall.com>, linux-arch <linux-arch@...r.kernel.org>, Linux ARM <linux-arm-kernel@...ts.infradead.org>, linux-kbuild@...r.kernel.org, kernel list <linux-kernel@...r.kernel.org>, linux-pci@...r.kernel.org Subject: Re: [PATCH v6 22/25] x86/asm: annotate indirect jumps +objtool folks On Tue, Oct 13, 2020 at 2:35 AM Sami Tolvanen <samitolvanen@...gle.com> wrote: > Running objtool --vmlinux --duplicate on vmlinux.o produces a few > warnings about indirect jumps with retpoline: > > vmlinux.o: warning: objtool: wakeup_long64()+0x61: indirect jump > found in RETPOLINE build > ... > > This change adds ANNOTATE_RETPOLINE_SAFE annotations to the jumps > in assembly code to stop the warnings. In other words, this patch deals with the fact that OBJECT_FILES_NON_STANDARD stops being effective for object files that are linked into the main kernel when LTO is on, right? All the files you're touching here are supposed to be excluded from objtool warnings at the moment: $ grep OBJECT_FILES_NON_STANDARD arch/x86/kernel/acpi/Makefile OBJECT_FILES_NON_STANDARD_wakeup_$(BITS).o := y $ grep OBJECT_FILES_NON_STANDARD arch/x86/platform/pvh/Makefile OBJECT_FILES_NON_STANDARD_head.o := y $ grep OBJECT_FILES_NON_STANDARD arch/x86/power/Makefile OBJECT_FILES_NON_STANDARD_hibernate_asm_$(BITS).o := y It would probably be good to keep LTO and non-LTO builds in sync about which files are subjected to objtool checks. So either you should be removing the OBJECT_FILES_NON_STANDARD annotations for anything that is linked into the main kernel (which would be a nice cleanup, if that is possible), or alternatively ensure that code from these files is excluded from objtool checks even with LTO (that'd probably be messy and a bad idea?). Grepping for other files marked as OBJECT_FILES_NON_STANDARD that might be included in the main kernel on x86, I also see stuff like: 5 arch/x86/crypto/Makefile 5 OBJECT_FILES_NON_STANDARD := y 10 arch/x86/kernel/Makefile 39 OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y 12 arch/x86/kvm/Makefile 7 OBJECT_FILES_NON_STANDARD_vmenter.o := y for which I think the same thing applies.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.