From 84ad8c9f3a481aa433cdbef7d10487bd665a5c07 Mon Sep 17 00:00:00 2001
From: Holger Dengler <dengler@linutronix.de>
Date: Sun, 8 May 2016 17:10:41 +0200
Subject: sec: Add multiprocess slides

Signed-off-by: Holger Dengler <dengler@linutronix.de>
---
 security/advanced/frm_process_thread.tex | 113 +++++++++++++++++++++++++++++++
 1 file changed, 113 insertions(+)
 create mode 100644 security/advanced/frm_process_thread.tex

(limited to 'security/advanced/frm_process_thread.tex')

diff --git a/security/advanced/frm_process_thread.tex b/security/advanced/frm_process_thread.tex
new file mode 100644
index 0000000..b58a452
--- /dev/null
+++ b/security/advanced/frm_process_thread.tex
@@ -0,0 +1,113 @@
+% ----------------------------
+\subsubsection{Process Isolation}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Why isolating tasks?}
+\begin{figure}[h]
+\centering
+\includegraphics[width=5cm]{images/multithread_norm.png}
+\end{figure}
+\end{frame}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Multithreaded Application under attack}
+\begin{figure}[h]
+\centering
+\includegraphics[width=5cm]{images/multithread_attack.png}
+\end{figure}
+\end{frame}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Multi-process vs. Multi-thread}
+\begin{figure}[h]
+\centering
+\includegraphics[width=8cm]{images/multiproc_norm.png}
+\end{figure}
+\end{frame}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Multi-process under attack}
+\begin{figure}[h]
+\centering
+\includegraphics[width=8cm]{images/multiproc_attack.png}
+\end{figure}
+\end{frame}
+
+% ----------------------------
+\subsubsection{Memory Management}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Memory Manangement}
+\begin{itemize}
+\item create process context
+\item overload VMA
+\end{itemize}
+\begin{figure}[h]
+\centering
+\includegraphics[width=8cm]{images/proc_isol.png}
+\end{figure}
+\end{frame}
+
+% ----------------------------
+\subsubsection{Multiprocess Programming}
+
+% ----------------------------
+\begin{frame}[fragile]
+\frametitle{Multiprocess Programming}
+\begin{columns}[onlytextwidth]
+ \begin{column}{0.45\textwidth}
+ \begin{beamerboxesrounded}[shadow=true]{Program:}
+ \begin{tiny}
+ \begin{verbatim}
+[...]
+pid = fork();
+switch (pid) {
+case -1:
+        /* error handling */
+case 0:
+        /* child processing */
+        execve(argv[0], &argv[0], envp);
+        break;
+default:
+        /* parent processing */
+        [...]
+        pid = wait(&status);
+}
+[...]
+ \end{verbatim}
+ \end{tiny}
+ \end{beamerboxesrounded}
+ \end{column}
+ \begin{column}{0.45\textwidth}
+ \begin{beamerboxesrounded}[shadow=true]{Arguments:}
+ \begin{tiny}
+ \begin{verbatim}
+char *argv[] = {
+        "/bin/myappl",
+        "--config",
+        "/etc/myconfig",
+        NULL,
+};
+ \end{verbatim}
+ \end{tiny}
+ \end{beamerboxesrounded}
+ \begin{beamerboxesrounded}[shadow=true]{Environment:}
+ \begin{tiny}
+ \begin{verbatim}
+char *envp[] = {
+        "HOME=/myhome",
+        "PATH=/bin:/usr/bin",
+        "TZ=UTC0",
+        NULL,
+};
+ \end{verbatim}
+ \end{tiny}
+ \end{beamerboxesrounded}
+ \end{column}
+\end{columns}
+\end{frame}
-- 
cgit v1.2.3

