lkml.org 
[lkml]   [2015]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 00/10] x86/asm: Compile-time asm code validation
> In most cases there are ways to keep the optimizations.  For example:
>
> - grow the function bounds to keep the jump internal

So you mean moving it after the ret? That still means icache bloat.

> - duplicate the destination code inside the function
> - convert the jump to a call

That all won't work for a lot of cases.


> Also note that these rules only affect _callable_ functions, so the
> entry code and other non-function asm code can still be a pile of
> spaghetti (though I think Andy is working on improving that).

Thank you for your kind words.

> > In fact even gcc with the right options can generate code that violates
> > this. Standard Linux constructions, such as exception handling,
> > also violate this.
> >
> > If your tool needs that your tool is broken.
>
> This tool only validates asm code, so I don't see how whatever gcc does
> is relevant.

Whoever needs it would need it everywhere, right? If it's not needed
for gcc then it shouldn't be needed for assembler code either.

BTW the way gcc handles it is to use the dwarf 4 extensions that
can describe non contiguous sections.`

-Andi
--
ak@linux.intel.com -- Speaking for myself only.


\
 
 \ /
  Last update: 2015-06-10 17:01    [W:0.105 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site