[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0AE4A626-C4E1-47BC-912A-F768643C8689@zytor.com>
Date: Fri, 18 May 2018 12:05:28 -0700
From: hpa@...or.com
To: Nadav Amit <namit@...are.com>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH 2/6] x86: bug: prevent gcc distortions
On May 18, 2018 12:02:50 PM PDT, Nadav Amit <namit@...are.com> wrote:
>hpa@...or.com wrote:
>
>> On May 18, 2018 11:50:12 AM PDT, Linus Torvalds
><torvalds@...ux-foundation.org> wrote:
>>> On Fri, May 18, 2018 at 11:34 AM <hpa@...or.com> wrote:
>>>
>>>> On May 18, 2018 11:25:32 AM PDT, Linus Torvalds <
>>> torvalds@...ux-foundation.org> wrote:
>>>
>>>> Unfortunately gcc doesn't guarantee that global assembly inlines
>will
>>> appear at the top of the file.
>>>
>>> Yeah. It really would be better to do the "asm version of -inline".
>>>
>>> We already do something like that for real *.S files on some
>>> architectures
>>> (because their assembly really wants it, eg
>>>
>>> arch/arm/Makefile:
>>> KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y)
>>> -include
>>> asm/unified.h -msoft-float
>>>
>>> but I do want to point out that KBUILD_AFLAGS is *not* used for
>>> compiler-generated assembly, only for actual *.S files.
>>>
>>> Sadly, I don't actually know any way to make gcc call the 'as' phase
>>> with
>>> particular options. We can use "-Wa,xyzzy" to pass in xyzzy to the
>>> assembler, but there is no "-include" option for GNU as afaik.
>>>
>>> Can you perhaps define a macro symbol for "--defsym"? Probably not.
>>>
>>> Linus
>>
>> I looked at this thing a long time ago; it's not there, and the best
>would probably be to get global asm() working properly in gcc.
>
>I can add a -Wa,[filename.s] switch. It works, but sort of
>undocumented.
Ah, I thought that would have assembled each file separately. We can request it be documented, that's usually much easier than getting a new feature implemented.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Powered by blists - more mailing lists