Skip to content

Commit

Permalink
Fix indentation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ekcom committed Sep 14, 2024
1 parent de5f2d2 commit de769af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions processes/processes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ \subsection{Memory Layout}
The stack is the place where automatically allocated variables and function call return addresses are stored.
Every time a new variable is declared, the program moves the stack pointer down to reserve space for the variable.
This segment of the stack is writable but not executable.
This behavior is controlled by the no-execute (NX) bit, sometimes called the W\^{}X (write XOR execute) bit, which helps prevent malicious code, such as \keyword{shellcode} from being run on the stack.
This behavior is controlled by the no-execute (NX) bit, sometimes called the W\^{}X (write XOR execute) bit, which helps prevent malicious code, such as \keyword{shellcode} from being run on the stack.

If the stack grows too far -- meaning that it either grows beyond a preset boundary or intersects the heap -- the program will stack overflow error, most likely resulting in a SEGFAULT.
\textbf{The stack is statically allocated by default; there is only a certain amount of space to which one can write.}
Expand Down Expand Up @@ -201,7 +201,7 @@ \subsection{Other Contents}
\item \textbf{File Descriptors} - A list of mappings from integers to real devices (files, USB flash drives, sockets)
\item \textbf{Permissions} - What \keyword{user} the file is running on and what \keyword{group} the process belongs to.
The process can then only perform operations based on the permissions given to the \keyword{user} or \keyword{group}, such as accessing files.
There are tricks to make a program take a different user than who started the program (e.g., \keyword{sudo} takes a program that a \keyword{user} starts and executes it as \keyword{root}).
There are tricks to make a program take a different user than who started the program (e.g., \keyword{sudo} takes a program that a \keyword{user} starts and executes it as \keyword{root}).
More specifically, a process has a real user ID (identifies the owner of the process), an effective user ID (used for non-privileged users trying to access files only accessible by superusers), and a saved user ID (used when privileged users perform non-privileged actions).
\item \textbf{Arguments} - a list of strings that tell your program what parameters to run under.
\item \textbf{Environment Variables} - a list of key-value pair strings in the form \keyword{NAME=VALUE} that one can modify. These are often used to specify paths to libraries and binaries, program configuration settings, etc.
Expand Down

0 comments on commit de769af

Please sign in to comment.