85 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			85 lines
		
	
	
	
		
			2.6 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
| \documentclass[11pt]{article}
 | |
| \usepackage[T1]{fontenc}
 | |
| \usepackage{amsmath, amsfonts, amssymb, amsthm, url, algorithmicx,
 | |
|     algpseudocode, lmodern, color, graphicx}
 | |
| 
 | |
| \title{Redox and system calls -- a multi-level kernel space}
 | |
| \author{Redox OS developers}
 | |
| \date{\today}
 | |
| 
 | |
| \begin{document}
 | |
|     \maketitle
 | |
| 
 | |
|     %%% DISCLAIMER %%%
 | |
| 
 | |
|     \begin{titlepage}
 | |
|         \centering \huge\bfseries The following document is an incomplete draft.
 | |
|     \end{titlepage}
 | |
| 
 | |
|     %%% START OF DOCUMENT %%%
 | |
| 
 | |
|     \maketitle
 | |
| 
 | |
|     \begin{abstract}
 | |
|         In this paper, we review Redox's core system call interface. Redox has
 | |
|         multiple levels of kernel space, and the top one consists of a very
 | |
|         minimal system call interface, which we go over here.
 | |
|     \end{abstract}
 | |
| 
 | |
|     \section{Introduction}
 | |
|     TODO
 | |
| 
 | |
|     \section{Executing system calls}
 | |
|     We allow multiplied system calls, a generalized version of concept of
 | |
|     multicalls in the \emph{kqueue} system call.
 | |
| 
 | |
|     Depending on the platform, system calls might be sent through interrupts or
 | |
|     \texttt{sysenter}. What we are really interested in, though, is the state
 | |
|     when we leave user space.
 | |
| 
 | |
|     \begin{description}
 | |
|         \item [\texttt{rax}/\texttt{eax}] stores the pointer to the array of system calls.
 | |
|         \item [\texttt{rbx}/\texttt{ebx}] stores the number of system calls in
 | |
|             this bundle.
 | |
|     \end{description}
 | |
| 
 | |
|     \section{The interface}
 | |
|     Each entry in this system call bundle buffer needs an ABI representation.
 | |
|     We represent the interface for the \emph{core system calls}.
 | |
| 
 | |
|     The representation is as follows:
 | |
| 
 | |
|     \begin{description}
 | |
|         \item [The system call ID] this is an unsigned 16-bit integer
 | |
|             representing which system call is used.
 | |
|         \item [First argument] this 64-bit integer is used as defined by the
 | |
|             system call.
 | |
|         \item [Second argument] this 64-bit integer is used as defined by the
 | |
|             system call.
 | |
|     \end{description}
 | |
| 
 | |
|     The return value of the system call is placed in the respective element.
 | |
| 
 | |
|     \subsection{Access management}
 | |
|     The memory access management is a set of system calls taken pointer and
 | |
|     size, respectively.
 | |
| 
 | |
|     It contains of four calls:
 | |
| 
 | |
|     \begin{description}
 | |
|         \item [Make memory readable].
 | |
|         \item [Make memory unreadable].
 | |
|         \item [Make memory writable].
 | |
|         \item [Make memory unwritable].
 | |
|         \item [Make memory executable].
 | |
|         \item [Make memory unexecutable].
 | |
|     \end{description}
 | |
| 
 | |
|     \subsection{Access management}
 | |
| 
 | |
|     %%% BIBLIOGRAPHY %%%
 | |
| 
 | |
|     \begin{thebibliography}{9}
 | |
|         TODO
 | |
|     \end{thebibliography}
 | |
| \end{document}
 | 
