Re: Dealing with load/store instructions on static tainted flow analysis

Martin Ward <martin@gkc.org.uk>
Sun, 12 Jun 2011 12:11:38 +0100

          From comp.compilers

Related articles
Dealing with load/store instructions on static tainted flow analysis gabrielquadros@hotmail.com (Gabriel Quadros) (2011-06-06)
Re: Dealing with load/store instructions on static tainted flow analys gah@ugcs.caltech.edu (glen herrmannsfeldt) (2011-06-07)
Re: Dealing with load/store instructions on static tainted flow analys kym@kymhorsell.com (2011-06-08)
Re: Dealing with load/store instructions on static tainted flow analys gneuner2@comcast.net (George Neuner) (2011-06-09)
Re: Dealing with load/store instructions on static tainted flow analys martin@gkc.org.uk (Martin Ward) (2011-06-12)
| List of all articles for this month |
From: Martin Ward <martin@gkc.org.uk>
Newsgroups: comp.compilers
Date: Sun, 12 Jun 2011 12:11:38 +0100
Organization: Compilers Central
References: 11-06-010
Keywords: analysis, storage
Posted-Date: 12 Jun 2011 11:44:52 EDT

On Tuesday 07 Jun 2011 at 05:00, Gabriel Quadros <gabrielquadros@hotmail.com>
wrote:
> I am using LLVM, and I am analyzing the LLVM bitcodes. My pass is
> working well, but I am having some issues with memory. Once
> information flows to the heap, it is hard to know how it propagates to
> the rest of the program. Example:
>
> a = SOURCE
> b = malloc(100)
> ...
> b[i] = a
> ...
> SINK = c[j]
> ...
>
> So, the problem is that it is hard to know that c != b and i != j.
> Once information flows into memory, the safest thing to do is to flag
> the whole memory as a SOURCE. Of course, that is very conservative. I
> was wondering if you guys could recommend me some strategies and
> techniques to be more precise. In particular, if you could point me
> some paper that does it, that would be great.


I suggest that you look at the research on "points-to analysis" with regions:
this attempts to divide the memory of the machine into disjoint regions
where each pointer can be guaranteed to address one or more of these regions.
As long as the SOURCE pointers are in different regions to the SINK pointers,
you should be OK.


A possible starting point:
"Putting Pointer Analysis to Work" (1998)
by Rakesh Ghiya , Laurie J. Hendren
http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.40.9725


--
Martin


STRL Reader in Software Engineering and Royal Society Industry Fellow
martin@gkc.org.uk http://www.cse.dmu.ac.uk/~mward/ Erdos number: 4
G.K.Chesterton web site: http://www.cse.dmu.ac.uk/~mward/gkc/
Mirrors: http://www.gkc.org.uk and http://www.gkc.org.uk/gkc


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.