diff --git a/thesis/Makefile b/thesis/Makefile index e874184..a4f0038 100644 --- a/thesis/Makefile +++ b/thesis/Makefile @@ -2,7 +2,7 @@ .PHONY: all clean clean-out all: thesis.pdf clean-out -%.pdf: %.tex $(wildcard src/*) $(wildcard listings/*) +%.pdf: %.tex $(wildcard src/*) latexmk -pdf $< clean: diff --git a/thesis/src/02.intercept.tex b/thesis/src/02.intercept.tex index 4157ade..f58a387 100644 --- a/thesis/src/02.intercept.tex +++ b/thesis/src/02.intercept.tex @@ -39,7 +39,7 @@ Also note that arguments to the calls are displayed in a ``pretty'' way. For example, string arguments would be simple pointers, but \texttt{strace} displays them as C-like strings. \begin{listing}[htbp] - \inputminted[linenos]{c}{listings/main.c} + \inputminted[linenos]{c}{src/listings/main.c} \caption{Contents of \texttt{main.c}.} \label{lst:main.c} \end{listing} @@ -138,7 +138,7 @@ To call the real function inside the wrapper, \texttt{\_\_real\_\textit{symbol}} Listings~\ref{lst:wrap.c} and~\ref{lst:wrap} try to illustrate this by overriding the \texttt{malloc} function of the C standard library. \begin{listing}[htbp] - \inputminted[linenos]{c}{listings/wrap.c} + \inputminted[linenos]{c}{src/listings/wrap.c} \caption{Contents of \texttt{wrap.c}.} \label{lst:wrap.c} \end{listing} @@ -191,7 +191,7 @@ This means, by setting the environment variable \texttt{LD\_PRELOAD}, it is poss Listings~\ref{lst:preload.c} and~\ref{lst:preload} try to illustrate this by overriding the \texttt{malloc} function of the C standard library. \begin{listing}[htbp] - \inputminted[linenos]{c}{listings/preload.c} + \inputminted[linenos]{c}{src/listings/preload.c} \caption{Contents of \texttt{preload.c}.} \label{lst:preload.c} \end{listing} @@ -235,7 +235,7 @@ Listing~\ref{lst:intercept-preload.c} gives an overview over the grounding code For each function that should be intercepted, this function simply has to be declared and defined the same way \texttt{malloc} was. \begin{listing}[htbp] - \inputminted[linenos]{c}{listings/intercept-preload.c} + \inputminted[linenos]{c}{src/listings/intercept-preload.c} \caption{Contents of \texttt{intercept-preload.c}.} \label{lst:intercept-preload.c} \end{listing} @@ -251,10 +251,10 @@ As already mentioned, \texttt{ltrace} uses prototype functions to format its fun This allows \texttt{ltrace} to ``dynamically'' display function arguments for any new or unknown functions without the need for recompilation. \cite{ltrace.conf.5} -However, due to implementation complexity reasons and the need for ``complex''\todo{} return types (see Section~\ref{sec:retrieving-function-return-values}) a statically compiled approach has been used for this work. +However, due to implementation complexity reasons and the need for ``complex'' return types for string/buffer and structure values (see Section~\ref{sec:retrieving-function-return-values}) a statically compiled approach has been used for this work. This means that each function formats its arguments and return values itself without any configuration option. -The reason for retrieving as much information as possible from each function call is that at a later point in time it is possible to completely reconstruct the exact function calls an their sequence. +The reason for retrieving as much information as possible from each function call is that at a later point in time it is possible to completely reconstruct the exact function calls and their sequence. This allows analysis on these records to be performed independently of the corresponding execution of the program. It should always be possible for any parser to fully parse the recorded calls without any specific knowledge of specific functions, their argument types, or return value type. @@ -491,7 +491,7 @@ intercept [-h] [-F FUNCTIONS] [-s] [-o | -L LIBRARIES] \ Indicates that strings and structures should be printed empty to save bandwidth. \item[\texttt{-o}, \texttt{-{}-only-own}] A shorthand for \texttt{-L *,-/lib*,-/usr/lib*}. - This has the effect, that only function calls from the executed binary itself are recorded. + This has the effect that only function calls from the executed binary itself are recorded. \item[\texttt{-L}, \texttt{-{}-libraries}] A list of library paths to intercept function calls from. See Section~\ref{sec:intercept.so-library} for more details. @@ -523,7 +523,7 @@ If available, the interpretation of the return address is also provided. This includes the offset relative to the calling binary and a source file and line number combination if the binary was compiled using \texttt{gcc -g} or \texttt{gcc -gdwarf}. \begin{listing}[htbp] - \inputminted[fontsize=\tiny]{text}{listings/intercept-client.txt} + \inputminted[fontsize=\tiny]{text}{src/listings/intercept-client.txt} \caption{Recoreded function calls from \texttt{./client}.} \label{lst:intercept-client} \end{listing} @@ -533,6 +533,12 @@ This includes the offset relative to the calling binary and a source file and li Lorem Ipsum. +\begin{itemize} + \item Which functions where called? + \item In what order were the functions called? + \item Did the programmer statisfy all preconditions on each function call? + \item Did the programmer clean up all used resources? +\end{itemize} \section{Automated Testing on Intercepted Function Calls}\label{sec:automated-testing-on-intercepted-function-calls} diff --git a/thesis/listings/intercept-client.txt b/thesis/src/listings/intercept-client.txt similarity index 100% rename from thesis/listings/intercept-client.txt rename to thesis/src/listings/intercept-client.txt diff --git a/thesis/listings/intercept-preload.c b/thesis/src/listings/intercept-preload.c similarity index 100% rename from thesis/listings/intercept-preload.c rename to thesis/src/listings/intercept-preload.c diff --git a/thesis/listings/intercept-wrap.c b/thesis/src/listings/intercept-wrap.c similarity index 100% rename from thesis/listings/intercept-wrap.c rename to thesis/src/listings/intercept-wrap.c diff --git a/thesis/listings/intercept.c b/thesis/src/listings/intercept.c similarity index 100% rename from thesis/listings/intercept.c rename to thesis/src/listings/intercept.c diff --git a/thesis/listings/ltrace.txt b/thesis/src/listings/ltrace.txt similarity index 100% rename from thesis/listings/ltrace.txt rename to thesis/src/listings/ltrace.txt diff --git a/thesis/listings/main.c b/thesis/src/listings/main.c similarity index 100% rename from thesis/listings/main.c rename to thesis/src/listings/main.c diff --git a/thesis/listings/preload.c b/thesis/src/listings/preload.c similarity index 100% rename from thesis/listings/preload.c rename to thesis/src/listings/preload.c diff --git a/thesis/listings/strace.txt b/thesis/src/listings/strace.txt similarity index 100% rename from thesis/listings/strace.txt rename to thesis/src/listings/strace.txt diff --git a/thesis/listings/wrap.c b/thesis/src/listings/wrap.c similarity index 100% rename from thesis/listings/wrap.c rename to thesis/src/listings/wrap.c