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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 11, 2015 at 08:10:50AM +0200, Ingo Molnar wrote:
> * Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
> > > I imagine that an automatic CFI annotation adder would walk through functions 
> > > one instruction at a time and keep track of the frame state. If so, then it 
> > > could verify that common jump targets had identical state and continue walking 
> > > through them and annotating.  I think this would get this case right, and it 
> > > might be necessary anyway to handle jumps within functions.
> > 
> > This would definitely add complexity to both asmvalidate and the CFI generator.  
> > In fact it sounds like it would push the CFI generator out of its current awk 
> > script territory and more into complex C code territory.
> 
> I'd count that as a plus: awk isn't a common skillset while C is, and properly 
> written it doesn't have to be _that_ complex.

The thing is, C is quite painful for text processing.  And I think we'd
have to do the analysis at the source text level in order to generate
the .cfi_* instructions to pass to the gnu assembler.

C would definitely make more sense when analyzing object code.  In fact,
asmvalidate is written in C.  But then I guess we'd have to re-implement
the .cfi stuff and populate the DWARF sections manually instead of
letting the assembler do it.

-- 
Josh
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux