Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-12 Thread Borislav Petkov
On Mon, Jan 11, 2021 at 07:59:52PM -0600, Josh Poimboeuf wrote: > 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

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-12 Thread Borislav Petkov
On Mon, Jan 11, 2021 at 05:13:16PM -0800, Nick Desaulniers wrote: > Unconditionally. See > https://sourceware.org/pipermail/binutils/2021-January/114700.html > where that flag was rejected and the optimization was adopted as the > optimization was obvious to GNU binutils developers. So I suspect

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Josh Poimboeuf
On Mon, Jan 11, 2021 at 05:13:16PM -0800, Nick Desaulniers wrote: > On Mon, Jan 11, 2021 at 5:00 PM Borislav Petkov 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

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Nick Desaulniers
On Mon, Jan 11, 2021 at 5:00 PM Borislav Petkov 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

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Borislav Petkov
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. > The LLVM

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Fāng-ruì Sòng
On Mon, Jan 11, 2021 at 4:38 PM Borislav Petkov wrote: > > On Mon, Jan 11, 2021 at 12:38:06PM -0800, Nick Desaulniers wrote: > > Arnd found a randconfig that produces the warning: > > > > arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at > > offset 0x3e > > > > when building

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Borislav Petkov
On Mon, Jan 11, 2021 at 12:38:06PM -0800, Nick Desaulniers wrote: > Arnd found a randconfig that produces the warning: > > arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at > offset 0x3e > > when building with LLVM_IAS=1 (use Clang's integrated assembler). Josh > notes: >

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Fāng-ruì Sòng
On Mon, Jan 11, 2021 at 2:09 PM Josh Poimboeuf wrote: > > On Mon, Jan 11, 2021 at 12:58:14PM -0800, Fangrui Song wrote: > > On 2021-01-11, Nick Desaulniers wrote: > > > Arnd found a randconfig that produces the warning: > > > > > > arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Josh Poimboeuf
On Mon, Jan 11, 2021 at 12:38:06PM -0800, Nick Desaulniers wrote: > Arnd found a randconfig that produces the warning: > > arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at > offset 0x3e > > when building with LLVM_IAS=1 (use Clang's integrated assembler). Josh > notes: >

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Josh Poimboeuf
On Mon, Jan 11, 2021 at 12:58:14PM -0800, Fangrui Song wrote: > On 2021-01-11, Nick Desaulniers wrote: > > Arnd found a randconfig that produces the warning: > > > > arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at > > offset 0x3e > > > > when building with LLVM_IAS=1 (use

Re: [PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Fangrui Song
On 2021-01-11, Nick Desaulniers wrote: Arnd found a randconfig that produces the warning: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at offset 0x3e when building with LLVM_IAS=1 (use Clang's integrated assembler). Josh notes: With the LLVM assembler stripping the

[PATCH v3] x86/entry: emit a symbol for register restoring thunk

2021-01-11 Thread Nick Desaulniers
Arnd found a randconfig that produces the warning: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol for insn at offset 0x3e when building with LLVM_IAS=1 (use Clang's integrated assembler). Josh notes: With the LLVM assembler stripping the .text section symbol, objtool has no way