[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210112015952.jdystnwkvuxsrwa2@treble>
Date: Mon, 11 Jan 2021 19:59:52 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Borislav Petkov <bp@...en8.de>,
Fāng-ruì Sòng <maskray@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Arnd Bergmann <arnd@...db.de>,
X86 ML <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
Nathan Chancellor <natechancellor@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk
On Mon, Jan 11, 2021 at 05:13:16PM -0800, Nick Desaulniers wrote:
> On Mon, Jan 11, 2021 at 5:00 PM Borislav Petkov <bp@...en8.de> wrote:
> >
> > On Mon, Jan 11, 2021 at 04:41:52PM -0800, Fāng-ruì Sòng wrote:
> > > To be fair: we cannot use
> >
> > Who's "we"?
> >
> > > .L-prefixed local because of the objtool limitation.
> >
> > What objtool limitation? I thought clang's assembler removes .text which
> > objtool uses. It worked fine with GNU as so far.
>
> I don't think we need to completely stop using .L prefixes in the
> kernel, just this one location since tracking the control flow seems a
> little tricky for objtool. Maybe Josh can clarify more if needed?
Right. In the vast majority of cases, .L symbols are totally fine.
The limitation now being imposed by objtool (due to these assembler
changes) is that all code must be contained in an ELF symbol. And .L
symbols don't create such symbols.
So basically, you can use an .L symbol *inside* a function or a code
segment, you just can't use the .L symbol to contain the code using a
SYM_*_START/END annotation pair.
It only affects a tiny fraction of all .L usage. Just a handful of code
sites I think.
--
Josh
Powered by blists - more mailing lists