[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.1801111804240.11852@cbobk.fhfr.pm>
Date: Thu, 11 Jan 2018 18:05:24 +0100 (CET)
From: Jiri Kosina <jikos@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
cc: Josh Poimboeuf <jpoimboe@...hat.com>,
David Woodhouse <dwmw2@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Andi Kleen <ak@...ux.intel.com>, Paul Turner <pjt@...gle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Dave Hansen <dave.hansen@...el.com>,
Kees Cook <keescook@...gle.com>,
Andy Lutomirski <luto@...capital.net>,
gnomes@...rguk.ukuu.org.uk
Subject: Re: [PATCH 2/3] objtool: Ignore retpoline alternatives
On Thu, 11 Jan 2018, Peter Zijlstra wrote:
> > I think I heard that retpolines won't be ported to anything older than
> > GCC 4.9, so maybe it's safe to use '%='. I don't remember when it was
> > introduced into GCC though.
>
> root@...erlagos:~/tmp# gcc-4.8 -o test test.c
> root@...erlagos:~/tmp# ./test
> 11
>
> --- test.c
>
> #include <stdio.h>
>
> void main(void)
> {
> int val;
>
> asm ("mov $(%=),%0" : "=A" (val));
>
> printf("%d\n", val);
> }
# gcc --version
gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
# ./test
8
So this part is OK. The asm-goto hard dependency would be worse with that
compiler though.
--
Jiri Kosina
SUSE Labs
Powered by blists - more mailing lists