Skip to content

Commit fea0b59

Browse files
committed
Fix trailing whitespace and line endings
Done automatically using `pre-commit run --all-files`
1 parent a434afa commit fea0b59

File tree

10 files changed

+109
-110
lines changed

10 files changed

+109
-110
lines changed

.github/workflows/compile.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,3 @@ jobs:
5858
asset_path: ./${{ env.doc_name }}.pdf
5959
asset_name: ${{ env.doc_name }}-snapshot-${{ github.sha }}.pdf
6060
asset_content_type: application/pdf
61-

abstract.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ \section*{Abstract}
4343
CHERI's hybrid approach allows incremental adoption of capability-oriented design:
4444
critical components can be ported and recompiled to use capabilities throughout,
4545
providing fine-grain memory protection, or be largely unmodified but encapsulated in ways that permit
46-
only controlled interaction.
46+
only controlled interaction.
4747
Potential early deployment scenarios include low-level software Trusted Computing
4848
Bases (TCBs) such as separation kernels, hypervisors, and operating-system
49-
kernels, userspace TCBs such as language runtimes and web browsers,
49+
kernels, userspace TCBs such as language runtimes and web browsers,
5050
and particularly high-risk
5151
software libraries such as data compression, protocol parsing, and image
5252
processing (which are concentrations of both complex and historically

app-exp-peripherals.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ \subsection{Implementation outline}
9595
matches the current one, and causes an exception if mismatched
9696
\item A privileged instruction takes two capabilities, an input capability
9797
and an authorization capability. The output of the instruction is the input
98-
capability with the color changed to match the authorization capability.
98+
capability with the color changed to match the authorization capability.
9999
\tmnote{Is this something that should be restricted by a permission? Or by
100100
a mode?}
101101
\item Checks may be necessary to verify the input capability is a subset of the

app-versions.tex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ \section{Detailed CHERI ISA Version Change History}
207207
Satisfyingly, many `future work' items in earlier versions of the report
208208
were becoming completed work in this version!
209209

210-
\item[1.3] The fourth version of the architecture document was released
211-
while
210+
\item[1.3] The fourth version of the architecture document was released
211+
while
212212
the first functional CHERI prototype was in testing. It reflects on
213213
initial experiences adapting a microkernel to exploit CHERI capability
214214
features.
@@ -400,7 +400,7 @@ \section{Detailed CHERI ISA Version Change History}
400400
A new \insnref{CIncOffset} instruction has been added, which avoids the
401401
need to read the offset into a general-purpose integer register for frequent
402402
arithmetic operations on pointers.
403-
403+
404404
Interactions between \EPC{} and \EPCC{} are now better specified, including
405405
that use of untagged capabilities has undefined behavior.
406406
\insnnoref{CBTS} and \insnnoref{CBTU} are now defined to use
@@ -918,7 +918,7 @@ \section{Detailed CHERI ISA Version Change History}
918918
A new \insnnoref{CCall} selector 1 has been added that provides a jump-like
919919
domain transition without use of an architectural exception.
920920
In this mode of operation, \insnnoref{CCall} unseals the sealed code and
921-
data capabilities to enter the new domain, offering a different set of
921+
data capabilities to enter the new domain, offering a different set of
922922
hardware and software tradeoffs from the existing selector-0 semantics.
923923
For example, complex exception-related mechanism is avoided in hardware for
924924
domain switches, with the potential to substantially improve performance.

chap-assurance.tex

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ \chapter{CHERI in High-Assurance Systems}
1212
\section{Unpredictable Behavior}
1313

1414
In the semantics for the CHERI instructions
15-
we try
16-
to avoid defining behavior as ``unpredictable''. There were several reasons
15+
we try
16+
to avoid defining behavior as ``unpredictable''. There were several reasons
1717
for avoiding unpredictable behavior, including the difficulty it creates for
1818
formal verification.
19-
Although CHERI is based on the MIPS ISA,
19+
Although CHERI is based on the MIPS ISA,
2020
the MIPS ISA specification (e.g., for the
2121
R4000) makes extensive use of ``unpredictable''. If ``unpredictable'' is
2222
modeled as ``anything could happen'', then clearly the system is not secure.
23-
As a
23+
As a
2424
concrete example, imagine a hypothetical CHERI implementation that contains
2525
a Trojan horse such that when a sandboxed program executes an arithmetic
2626
instruction whose result is ``unpredictable'', it also changes the capability
2727
registers so that a capability granting access to the entire virtual address
2828
space is placed in a capability register. If ``unpredictable'' means that
29-
anything could happen, then this is compliant with the MIPS ISA; it is also
29+
anything could happen, then this is compliant with the MIPS ISA; it is also
3030
obviously insecure. Later versions of the MIPS ISA (e.g., MIPS64 volume I) make
3131
it clear that ``unpredictable'' is more restrictive than this, saying that
3232
``\emph{unpredictable} operations must not read, write, or modify the contents of
@@ -61,7 +61,7 @@ \section{Bypassing the Capability Mechanism Using the TLB}
6161
In CheriBSD, user-space programs are unable to modify the TLB (except through
6262
system calls such as \ccode{mmap}), and thus cannot carry out this attack.
6363
This security argument makes it explicit that the security of the capability
64-
mechanism depends on the correctness of the underlying operating system.
64+
mechanism depends on the correctness of the underlying operating system.
6565
However, this may not be adequate for high-assurance systems.
6666
\item
6767
Similarly, a high-assurance microkernel could run untrusted code in user
@@ -92,7 +92,7 @@ \section{Malformed Capabilities}
9292
128-bit capabilities, there are bit patterns corresponding to \cbase{} $+$
9393
\clength{} $> 2^{64}$.
9494
The capability registers are initialized on reset, so there will
95-
never be malformed capabilities in the initial register contents, and
95+
never be malformed capabilities in the initial register contents, and
9696
a CHERI instruction will never create malformed capabilities from
9797
well-formed ones. However, DRAM is not cleared on system reset, so that it is
9898
possible that the initial memory might contain malformed capabilities with the
@@ -107,7 +107,7 @@ \section{Malformed Capabilities}
107107

108108
There are (at least) two implementation choices. An implementation of the CHERI
109109
instructions could perform access-control checks in a way that would
110-
work on both well-formed and malformed capabilities.
110+
work on both well-formed and malformed capabilities.
111111
Alternatively, the hardware could be
112112
slightly simplified by performing the checks in a way that might behave
113113
unexpectedly on malformed capabilities, and then rely on the capability
@@ -118,7 +118,7 @@ \section{Malformed Capabilities}
118118
presents special difficulties in testing. No program whose behavior
119119
is defined by the ISA specification will ever trigger the case of encountering
120120
a malformed capability. (Programs whose behavior is ``unpredictable'', because
121-
they access uninitialized memory, may encounter them).
121+
they access uninitialized memory, may encounter them).
122122
However, some approaches to
123123
automatic test generation may have difficulty constructing such tests.
124124

@@ -142,7 +142,7 @@ \section{Constants in the Formal Model}
142142
\section{Outline of Security Argument for a Reference Monitor}
143143

144144
The CHERI ISA can be used to provide several different security properties (for
145-
example, control-flow integrity or sandboxing). This section provides the
145+
example, control-flow integrity or sandboxing). This section provides the
146146
outline of a security argument for how the CHERI instructions can be used
147147
to implement a reference monitor.
148148

@@ -170,7 +170,7 @@ \section{Outline of Security Argument for a Reference Monitor}
170170
We are assuming that the system operates in an environment where
171171
the attacker does not have physical access to the hardware, so that
172172
hardware-level attacks such as introducing memory errors~\cite{Govinda+03}
173-
are not applicable.
173+
are not applicable.
174174
%%%% WE MIGHT ALSO MENTION the A2 best paper from IEEE SS&P 2016 on
175175
%%%% injecting analog circuit malware into the hardware.
176176

@@ -193,7 +193,7 @@ \section{Outline of Security Argument for a Reference Monitor}
193193
memory addresses ($S_K$) for the data, code, and stack segments of the trusted
194194
code, together with the CHERI reserved registers.
195195

196-
Our security requirement of the hardware is that the untrusted code will run
196+
Our security requirement of the hardware is that the untrusted code will run
197197
for a while, eventually returning control to the trusted code; and when the
198198
trusted code is re-entered, (a) it will be reentered at one of a small number
199199
of known entry points; (b) its code, data and stack will not have been modified
@@ -210,7 +210,7 @@ \section{Outline of Security Argument for a Reference Monitor}
210210
reference monitor's reserved memory or the reserved registers. That is, all
211211
memory accesses are checked against a capability register, and do not succeed
212212
unless the capability permits them. The untrusted code can access memory without
213-
returning control to the trusted code;
213+
returning control to the trusted code;
214214
however, all of its memory access are mediated
215215
by the capability hardware, which is considered to be part of the reference
216216
monitor. Tampering with the reference monitor by making physical modifications
@@ -253,7 +253,7 @@ \section{Outline of Security Argument for a Reference Monitor}
253253
this probably can't be used to attack a real system, any unpredictable behavior
254254
has to prevent for provable security).
255255
\item
256-
All capability registers have \cbase{} $+$ \clength{} $\leq 2^{64}$
256+
All capability registers have \cbase{} $+$ \clength{} $\leq 2^{64}$
257257
\algorithmicor{} \ctag{} $=$ \algorithmicfalse{}.
258258
\item
259259
The above is also true of all capabilities contained within the set of memory
@@ -293,10 +293,10 @@ \section{Outline of Security Argument for a Reference Monitor}
293293
We assume that \emph{SecureState} is true initially (i.e.,
294294
a requirement of
295295
the trusted code is that it puts the CPU into this state before calling the
296-
untrusted code).
296+
untrusted code).
297297
We then wish to show that \emph{SecureState} $\Rightarrow$ \textbf{X}
298298
(\emph{SecureState} \algorithmicor{} \emph{TCBEntryState}) (where \textbf{X} is
299-
the next operator in linear temporal logic). By induction on states,
299+
the next operator in linear temporal logic). By induction on states,
300300
\emph{SecureState} $\Rightarrow$ \emph{TCBEntryState} \textbf{R} \emph{SecureState}
301301
(where \textbf{R} is the release operator in linear temporal logic).
302302

@@ -308,7 +308,7 @@ \section{Outline of Security Argument for a Reference Monitor}
308308
Given that CP0.Status.KSU $\neq$ 0, CP0.Status.CU0 = \algorithmicfalse{},
309309
CP0.Status.EXL = \algorithmicfalse{} and CP0.Status.ERL = \algorithmicfalse{},
310310
all instructions will either raise an exception (\textbf{X}
311-
\emph{TCBEntryState}) or leave CP0 registers unchanged, leaving this
311+
\emph{TCBEntryState}) or leave CP0 registers unchanged, leaving this
312312
part of the \emph{SecureState} invariant unchanged.
313313
\item
314314
Given that CP0.Status.KSU $\neq$ 0 (etc.), all instructions will
@@ -347,7 +347,7 @@ \section{Outline of Security Argument for a Reference Monitor}
347347
The theorem \emph{SecureState} $\Rightarrow$ \emph{TCBEntryState} \textbf{R}
348348
\emph{SecureState} uses the \textbf{R} operator, which is a weak form of
349349
``until'': the system might continue in \emph{SecureState} indefinitely.
350-
Sometimes it is desirable to have the stronger property that
350+
Sometimes it is desirable to have the stronger property that
351351
\emph{TCBEntryState} is guaranteed to be reached eventually. This can be
352352
ensured by having the trusted code enable timer interrupts, and use a
353353
timer interrupt to force return to \emph{TCBEntryState} if the untrusted
@@ -378,7 +378,7 @@ \section{Outline of Security Argument for a Reference Monitor}
378378

379379
\emph{SecureStateTimer} $\Rightarrow$ \textbf{F} \emph{TCBEntryState}
380380

381-
It then follows that \emph{SecureStateTimer} $\Rightarrow$
381+
It then follows that \emph{SecureStateTimer} $\Rightarrow$
382382
\emph{SecureStateTimer} \textbf{U} \emph{TCBEntryState}, where
383383
\textbf{U} is the until operator in linear temporal logic.
384384

0 commit comments

Comments
 (0)