Messages in this thread | | | From | Nadav Amit <> | Subject | Re: [PATCH 2/6] x86: bug: prevent gcc distortions | Date | Fri, 18 May 2018 17:24:27 +0000 |
| |
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Fri, May 18, 2018 at 12:59 AM Peter Zijlstra <peterz@infradead.org> > wrote: > >> This is an awesome hack, but is there really nothing we can do to make >> it more readable? Esp, that global asm doing the macro definition is a >> pain to read. > > I actually find that macro to be *more* legible than what we do now, > although I'm not enamored with the pseudo-operation name ("__BUG_FLAGS"). > > That said, the C header code itself I don't love. > > I wonder if we should just introduce a new assembler header file, and get > it included when processing compiler-generated asm. We already do that for > our _real_ *.S files, with a number of our header files having constants > and code for the asm case too, not just C. > > But we could have an <asm/asm-macro.h> header file that has these kinds of > macros (or "pseudo-instructions") for assembly language cases, and then we > could just rely on them in inline asm.
Will it be ok just to use a global inline asm to set an “.include” directive that gas would later process? (I can probably wrap it in a C macro so it won’t be too disgusting)
| |