[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200430044308.kkniqb7pnpn4bovg@treble>
Date: Wed, 29 Apr 2020 23:43:08 -0500
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: x86@...nel.org, tglx@...utronix.de, linux-kernel@...r.kernel.org,
mingo@...nel.org, hpa@...or.com, ast@...nel.org,
peterz@...radead.org, rdunlap@...radead.org,
Arnd Bergmann <arnd@...db.de>, bpf@...r.kernel.org,
daniel@...earbox.net
Subject: Re: BPF vs objtool again
On Wed, Apr 29, 2020 at 09:24:00PM -0700, Alexei Starovoitov wrote:
> > This would actually be contingent on RETPOLINE, not FRAME_POINTER.
> >
> > (FRAME_POINTER was the other issue with the "optimize" attribute, which
> > we're reverting so it'll no longer be a problem.)
> >
> > So if you're not concerned about the retpoline text growth, it could be
> > as simple as:
> >
> > #define CONT ({ insn++; goto *jumptable[insn->code]; })
> > #define CONT_JMP ({ insn++; goto *jumptable[insn->code]; })
> >
> >
> > Or, if you wanted to avoid the text growth, it could be:
> >
> > #ifdef CONFIG_RETPOLINE
>
> I'm a bit lost. So objtool is fine with the asm when retpoline is on?
Yeah, it's confusing... this has been quite an adventure with GCC.
Objtool is fine with the RETPOLINE double goto. It's only the
!RETPOLINE double goto which is the problem, because that triggers
more GCC weirdness (see 3193c0836f20).
> Then pls do:
> #if defined(CONFIG_RETPOLINE) || !defined(CONFIG_X86)
>
> since there is no need to mess with other archs.
Getting rid of select_insn altogether would make the code a lot simpler,
but it's your call. I'll make a patch soon.
--
Josh
Powered by blists - more mailing lists