Skip to content

Commit 399773c

Browse files
committed
[LFI] Update docs based on feedback
1 parent 5506213 commit 399773c

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

llvm/docs/CodeGenerator.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,9 +2493,10 @@ The AMDGPU code generator lives in the ``lib/Target/AMDGPU``
24932493
directory. This code generator is capable of targeting a variety of
24942494
AMD GPU processors. Refer to :doc:`AMDGPUUsage` for more information.
24952495

2496-
The Lightweight Fault Isolation (LFI) backend
2497-
---------------------------------------------
2496+
The Lightweight Fault Isolation (LFI) sub-architecture
2497+
------------------------------------------------------
24982498

2499-
LFI is a backend that allows programs compiled for the target to run in a
2500-
sandboxed environment that is within the same address space as host code. Refer
2501-
to :doc:`LFI` for more information about the LFI backend.
2499+
LFI is a sub-architecture available for certain backends that allows programs
2500+
compiled for the target to run in a sandboxed environment that is within the
2501+
same address space as host code. Refer to :doc:`LFI` for more information about
2502+
LFI.

llvm/docs/LFI.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ LFI aims for the following goals:
2424
* Performance: LFI aims for minimal overhead vs. unsandboxed code.
2525
* Security: The LFI runtime and compiler elements aim to be simple and
2626
verifiable when possible.
27-
* Usability: LFI aims to make it easy as possible to used retrofit sandboxing,
27+
* Usability: LFI aims to make it as easy as possible to retrofit sandboxing,
2828
i.e., to migrate from unsandboxed to sandboxed libraries with minimal effort.
2929

3030
When building a program for the LFI target the compiler is designed to ensure
@@ -116,10 +116,10 @@ Control flow
116116
~~~~~~~~~~~~
117117

118118
Indirect branches get rewritten to branch through register ``x28``, which must
119-
always contain an address within the sandbox. An ``add`` is used to safely load
120-
``x28`` with the destination address. Since ``ret`` uses ``x30`` by default,
121-
which already must contain an address within the sandbox, it does not require
122-
any rewrite.
119+
always contain an address within the sandbox. An ``add`` is used to safely
120+
update ``x28`` with the destination address. Since ``ret`` uses ``x30`` by
121+
default, which already must contain an address within the sandbox, it does not
122+
require any rewrite.
123123

124124
+--------------------+---------------------------+
125125
| Original | Rewritten |
@@ -220,7 +220,7 @@ Stack pointer modification
220220
~~~~~~~~~~~~~~~~~~~~~~~~~~
221221

222222
When the stack pointer is modified, we write the modified value to a temporary,
223-
before loading it back into ``sp`` with a safe ``add``.
223+
before moving it back into ``sp`` with a safe ``add``.
224224

225225
+------------------------------+-------------------------------+
226226
| Original | Rewritten |

0 commit comments

Comments
 (0)