From 4101d31ba83aa64042d0fe65b1902cb76be37d1f Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 17 Jul 2017 09:43:41 +0200 Subject: [PATCH] context/introduction: add questions about Rust --- src/docs/parts/context/context.tex | 39 +++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/docs/parts/context/context.tex b/src/docs/parts/context/context.tex index cf40e48..493c6cd 100644 --- a/src/docs/parts/context/context.tex +++ b/src/docs/parts/context/context.tex @@ -88,29 +88,34 @@ As the result of collaborations between hard- and software developers, the memor A complete understand of this task is necessary in order to reason about it's safety. This chapter starts with the provides a thorough introduction to modern memory management techniques on the x86\_64 architecture. -\section{Abstraction And Protection Of Resources} +\section{Resource Abstraction: Protection And Efficiency} * TODO: recap that management has been motivated by multiprocessing without side-effects * TODO: brief history and market share of x86\_64 processors and ARM \section{Virtual Addresses} -* TODO: describe dynamic addresses +* TODO: describe dynamic (relocatable) addresses * TODO: describe swapping * TODO: describe virtual address -* TODO: describe segmantation -* TODO: describe paging % * TODO: parse http://wiki.osdev.org/Memory_Management_Unit \section{Paging} +* TODO: describe + \subsection{Multi-Level Paging} + \subsection{Top-Level Page table Self-Reference} + \subsection{Caching Lookups} + \subsection{Full Example} * http://taptipalit.blogspot.de/2013/10/theory-recursive-mapping-page.html * https://www.coresecurity.com/blog/getting-physical-extreme-abuse-of-intel-based-paging-systems-part-2-windows -\section{Common Memory-Related Errors} +\section{Memory Allocation} + +\chapter{Common Memory-Related Errors} This work focuses on the following weaknesses defined in the \gls{CWE} @@ -155,9 +160,31 @@ if (ptr == NULL) { \chapter{Introduction To Rust} -\section{Zero-Cost Abstractions} +\section{Compiler Architecture} +- TODO: Tokens? AST? LLVM? +- TODO: BSYS SS17 GITHUB IO Rust Memory Layout - 4 + + +\section{Static Analysis Features} +- TODO: How does static typing help with preventing programming errors +- TODO: How does the Rust's static analysis work, theoretically and practically +- TODO: how could memory be dynamically allocated and still safety checked? + +\subsection{Lifetimes} +- TODO: Where are global 'static variables allocated? + +\subsection{Ownership} +- TODO: Who owns global 'static variables? + +\subsection{Type Safety} +- TODO: how does casting work? +- TODO: what's the equivalent of void*? + \subsection{The Newtype Pattern} +\subsection{Zero-Cost Abstraction} + + https://aturon.github.io/features/types/newtype.html