about summary refs log tree commit diff stats
path: root/README.md
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2024-07-12 11:52:00 +0200
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2024-07-12 11:52:00 +0200
commit243aaa08afd66f1b409774693b716e30fa9ffacc (patch)
treeb81dc00bf3b2dd10ba8a239672cf30a9d3360507 /README.md
parentef31d11c7bb0ec6505622ea61f963c56ddf79672 (diff)
downloadfocaccia-243aaa08afd66f1b409774693b716e30fa9ffacc.tar.gz
focaccia-243aaa08afd66f1b409774693b716e30fa9ffacc.zip
Add support for aarch64
 - Implement an architecture description for aarch64

 - Add endianness information to the `Arch` class.

 - Move conversion from flags register to logical flag values from the
   calling code to the concrete targets (LLDB and GDB), which is the
only point where we (have to) deal in flags registers.

 - Handle assembly/disassembly errors in serialization of
   SymbolicTransform

 - Move ProgramState's `arch` attribute into ReadableProgramState.

Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com>
Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 17 insertions, 4 deletions
diff --git a/README.md b/README.md
index 5c14d91..67db62c 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ The `tools/` directory contains additional utility scripts to work with focaccia
 
 ## Project Overview (for developers)
 
-### Snapshot-comparison framework
+### Snapshots and comparison
 
 The following files belong to a rough framework for the snapshot comparison engine:
 
@@ -43,8 +43,7 @@ representation of program snapshots.
 
  - `focaccia/compare.py`: The central algorithms that work on snapshots.
 
- - `focaccia/arch/`: Abstractions over different processor architectures. Will be used to integrate support for more
-architectures later. Currently, we only have X86.
+ - `focaccia/arch/`: Abstractions over different processor architectures. Currently we have x86 and aarch64.
 
 ### Concolic execution
 
@@ -67,4 +66,18 @@ our own log format.
 
  - `focaccia/match.py`: Algorithms for trace matching.
 
- - `miasm_test.py`: A test script that traces a program concolically.
+### Supporting new architectures
+
+To add support for an architecture <arch>, do the following:
+
+ - Add a file `focaccia/arch/<arch>.py`. This module declares the architecture's description, such as register names and
+an architecture class. The convention is to declare state flags (e.g. flags in RFLAGS for x86) as separate registers.
+
+ - Add the class to the `supported_architectures` dict in `focaccia/arch/__init__.py`.
+
+ - Depending on Miasm's support for <arch>, add register name aliases to the `MiasmSymbolResolver.miasm_flag_aliases`
+dict in `focaccia/miasm_util.py`.
+
+ - Depending on the existence of a flags register in <arch>, implement conversion from the flags register's value to
+values of single logical flags (e.g. implement the operation `RFLAGS['OF']`) in the respective concrete targets (LLDB,
+GDB, ...).