Re: [PATCH v5 00/10] x86/asm: Compile-time asm code validation

Josh Poimboeuf
2015-06-10T19:43:26Z

On Wed, Jun 10, 2015 at 11:41:43AM -0700, Andi Kleen wrote:
> Josh Poimboeuf <jpoimboe@redhat.com> writes:
> >
> > If you're wanting something like -freorder-blocks-and-partition for asm
> > code, maybe we could implement something analagous to the
> > likely()/unlikely() macros, to allow the hot and cold portions to be
> > placed into different sections. (I could then teach asmvalidate how to
> > validate such code.)
> >
> > Would that be useful?
>
> Eventually you have to handle dwarf4, because that's the only way to
> handle the gcc generated code.
>
> So your tool just needs to understand the dwarf. It's ok to warn
> about assembler code that is not correctly annotated, and fix it
> then.

Ok, I think we're talking about two different things. Maybe you're
mixing up this patch set with some of the other things we've discussed
like the DWARF CFI generation tool or the runtime DWARF unwinder.

This patch set is only concerned with enforcing sane rules on asm code.
It has nothing to do with understanding DWARF. In fact, since Ingo
reverted the CFI annotations, there is currently no DWARF in asm code at
all. This patch set is a prerequisite for the other DWARF stuff we
talked about previously.

--
Josh