Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 15 Oct 2020 01:23:41 +0200
From: Jann Horn <>
To: Sami Tolvanen <>, Josh Poimboeuf <>, 
	Peter Zijlstra <>, "the arch/x86 maintainers" <>
Cc: Masahiro Yamada <>, Steven Rostedt <>, 
	Will Deacon <>, Greg Kroah-Hartman <>, 
	"Paul E. McKenney" <>, Kees Cook <>, 
	Nick Desaulniers <>, 
	clang-built-linux <>, 
	Kernel Hardening <>, 
	linux-arch <>, 
	Linux ARM <>,, 
	kernel list <>,
Subject: Re: [PATCH v6 22/25] x86/asm: annotate indirect jumps

+objtool folks

On Tue, Oct 13, 2020 at 2:35 AM Sami Tolvanen <> 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
$ grep OBJECT_FILES_NON_STANDARD arch/x86/platform/pvh/Makefile
$ 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
   10 arch/x86/kernel/Makefile                           39
OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o          := y
   12 arch/x86/kvm/Makefile                               7

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.