Dim color boxes colours

This commit is contained in:
Théophile Bastian 2019-10-24 10:38:37 +03:00
parent e128a47ecd
commit 6af99634a5

View file

@ -33,6 +33,12 @@
\setbeamertemplate{navigation symbols}{} \setbeamertemplate{navigation symbols}{}
\setbeamertemplate{headline}{} \setbeamertemplate{headline}{}
\definecolor{infoboxbg}{HTML}{f3e7ac}
\definecolor{infoboxborder}{HTML}{de9758}
\definecolor{alertboxbg}{HTML}{ffc6c7}
\definecolor{alertboxborder}{HTML}{ea2f61}
\newcommand{\cmark}{\color{OliveGreen}\ding{52}} \newcommand{\cmark}{\color{OliveGreen}\ding{52}}
\newcommand{\xmark}{\color{BrickRed}\ding{56}} \newcommand{\xmark}{\color{BrickRed}\ding{56}}
@ -283,8 +289,10 @@ Segmentation fault.
\end{frame} \end{frame}
\begin{frame}{What does this imply?} \begin{frame}{What does this imply?}
Your compiler actually generates codes for \alert{two machines}:\\ \begin{center}
your processor and the DWARF VM\@. \textbf{Your compiler generates code for \alert{two machines}:\\
your processor and the DWARF VM\@.}
\end{center}
\vfill{} \vfill{}
\begin{columns} \begin{columns}
@ -310,6 +318,8 @@ Segmentation fault.
\end{center} \end{center}
\end{column} \end{column}
\pause{}
\begin{column}{0.55\textwidth} \begin{column}{0.55\textwidth}
\begin{itemize} \begin{itemize}
\item[$\implies$] \alert{Cumbersome} to generate for the \item[$\implies$] \alert{Cumbersome} to generate for the
@ -325,6 +335,7 @@ Segmentation fault.
\end{column} \end{column}
\end{columns} \end{columns}
\vfill{}
\end{frame} \end{frame}
\begin{frame} \begin{frame}
@ -332,7 +343,7 @@ Segmentation fault.
\only<2>{ \only<2>{
\begin{textblock*}{0.60\textwidth}[0.5,0.5](0.5\paperwidth,0.5\paperheight)% \begin{textblock*}{0.60\textwidth}[0.5,0.5](0.5\paperwidth,0.5\paperheight)%
\begin{tcolorbox}[halign=center, colframe=OliveGreen, colback=YellowGreen] \begin{tcolorbox}[halign=center, colframe=infoboxborder, colback=infoboxbg]
In \prog{glibc}, \prog{lowlevellock.h}: In \prog{glibc}, \prog{lowlevellock.h}:
\alert{off by one error in unwinding data}. \alert{off by one error in unwinding data}.
@ -343,7 +354,7 @@ Segmentation fault.
\only<3->{ \only<3->{
\begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.10\paperheight)% \begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.10\paperheight)%
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender] \begin{tcolorbox}[halign=center, colframe=alertboxborder, colback=alertboxbg]
\bf \LARGE \bf \LARGE
Complex \,\& \,slow Complex \,\& \,slow
\end{tcolorbox} \end{tcolorbox}
@ -352,7 +363,7 @@ Segmentation fault.
\only<4->{ \only<4->{
\begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.30\paperheight)% \begin{textblock*}{0.90\textwidth}[0.5,0](0.5\paperwidth,0.30\paperheight)%
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender] \begin{tcolorbox}[halign=center, colframe=alertboxborder, colback=alertboxbg]
\LARGE \LARGE
\textbf{Pervasive:}\\ relied upon by profilers, debuggers, \textbf{Pervasive:}\\ relied upon by profilers, debuggers,
aaand\ldots{} aaand\ldots{}
@ -363,26 +374,26 @@ Segmentation fault.
\end{tcolorbox} \end{tcolorbox}
\end{textblock*} \end{textblock*}
} }
\end{frame} \end{frame}
\newcommand{\LinusMailOne}{ \newcommand{\LinusMailOne}{
``Sorry, but last time was too f\dots painful. The whole (and ``Sorry, but last time was too f\dots painful. The whole (and
only) point of unwinders is to make debugging easy only) point of unwinders is to make debugging easy
when a bug occurs. But \alert{the dwarf unwinder had bugs} when a bug occurs. But \alert{the dwarf unwinder had bugs}
itself, or \alert{our dwarf information had bugs}, and in either itself, or \alert{our dwarf information had bugs}, and in either
case it actually turned several trivial bugs into a \alert{total case it actually turned several trivial bugs into a \alert{total
undebuggable hell}.'' undebuggable hell}.''
} }
\newcommand{\LinusMailTwo}{ \newcommand{\LinusMailTwo}{
``If you can \alert{mathematically prove that the unwinder is ``If you can \alert{mathematically prove that the unwinder is
correct} — even in the presence of bogus and actively correct} — even in the presence of bogus and actively
incorrect unwinding information — and never ever incorrect unwinding information — and never ever
follows a bad pointer, \alert{Ill reconsider}.'' follows a bad pointer, \alert{Ill reconsider}.''
} }
\newcommand{\LinusSource}{ \newcommand{\LinusSource}{
\hfill ---~Linus Torvalds, 2012 \hfill ---~Linus Torvalds, 2012
} }
\begin{frame} \begin{frame}
\begin{columns} \begin{columns}
\begin{column}{0.75\textwidth} \begin{column}{0.75\textwidth}
\LinusMailOne{} \LinusMailOne{}
@ -411,42 +422,42 @@ Segmentation fault.
\vspace{1em} \vspace{1em}
\LinusSource{} \LinusSource{}
} }
\end{frame} \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Correctness by construction:\\*\textbf{synthesis of unwinding tables}} \section{Correctness by construction:\\*\textbf{synthesis of unwinding tables}}
\sectiontitleframe{} \sectiontitleframe{}
\newcommand{\tblrowval}[4]{#1 & #2 & \only<2->{#3} & \only<2->{#4} \\} \newcommand{\tblrowval}[4]{#1 & #2 & \only<2->{#3} & \only<2->{#4} \\}
\newcommand{\blknote}[1] \newcommand{\blknote}[1]
{\begin{block}{} {\begin{block}{}
\centering\large \centering\large
#1 #1
\end{block}} \end{block}}
\newcommand{\blklnote}[1] \newcommand{\blklnote}[1]
{\begin{block}{} {\begin{block}{}
\large \large
#1 #1
\end{block}} \end{block}}
\newcommand{\tblhl}{\rowcolor{Tan}} \newcommand{\tblhl}{\rowcolor{Tan}}
\begin{frame} \begin{frame}
\newcommand{\firsttblrows}{ \newcommand{\firsttblrows}{
\tblrowval{\hspace{-2ex}<{\bf foo}>:}{}{\textbf{CFA}}{\textbf{ra}} \tblrowval{\hspace{-2ex}<{\bf foo}>:}{}{\textbf{CFA}}{\textbf{ra}}
\rowonly<4>{\tblhl{}} \tblrowval{push}{\%r15}{rsp+8}{c-8} \rowonly<4>{\tblhl{}} \tblrowval{push}{\%r15}{rsp+8}{c-8}
\rowonly<5>{\tblhl{}} \tblrowval{push}{\%r14}{rsp+16}{c-8} \rowonly<5>{\tblhl{}} \tblrowval{push}{\%r14}{rsp+16}{c-8}
\rowonly<6>{\tblhl{}} \tblrowval{mov}{\$0x3,\%eax}{rsp+24}{c-8} \rowonly<6>{\tblhl{}} \tblrowval{mov}{\$0x3,\%eax}{rsp+24}{c-8}
\rowonly<7>{\tblhl{}} \tblrowval{push}{\%r13}{rsp+24}{c-8} \rowonly<7>{\tblhl{}} \tblrowval{push}{\%r13}{rsp+24}{c-8}
\tblrowval{push}{\%r12}{rsp+32}{c-8} \tblrowval{push}{\%r12}{rsp+32}{c-8}
\tblrowval{push}{\%rbp}{rsp+40}{c-8} \tblrowval{push}{\%rbp}{rsp+40}{c-8}
\tblrowval{push}{\%rbx}{rsp+48}{c-8} \tblrowval{push}{\%rbx}{rsp+48}{c-8}
\tblrowval{sub}{\$0x68,\%rsp}{rsp+56}{c-8} \tblrowval{sub}{\$0x68,\%rsp}{rsp+56}{c-8}
} }
{\only<3>{ {\only<3>{
\begin{textblock*}{\textwidth}[0.5,0.5](0.5\paperwidth,0.5\paperheight)% \begin{textblock*}{\textwidth}[0.5,0.5](0.5\paperwidth,0.5\paperheight)%
\begin{tcolorbox}[halign=center, colframe=red, colback=Lavender] \begin{tcolorbox}[halign=center, colframe=alertboxborder, colback=alertboxbg]
\large \large
\alert{\bf Assumptions} \alert{\bf Assumptions}
\vspace{0.6em} \vspace{0.6em}
@ -512,7 +523,7 @@ Segmentation fault.
\end{itemize} \end{itemize}
\vspace{1em} \vspace{1em}
\begin{tcolorbox}[halign=center, colframe=OliveGreen, colback=YellowGreen] \begin{tcolorbox}[halign=center, colframe=infoboxborder, colback=infoboxbg]
\large \large
Implemented on top of CMU's \prog{BAP} Implemented on top of CMU's \prog{BAP}
\end{tcolorbox} \end{tcolorbox}