Commit Graph

116 Commits

Author SHA1 Message Date
Brian Huffman
2a620d41de Switch from ansi-wl-pprint to the prettyprinter package.
This patch relies on the following submodule updates:
- GaloisInc/what4#77
- GaloisInc/elf-edit#20
- GaloisInc/crucible#586
- GaloisInc/asl-translator#28

This patch updates the following packages:
- macaw-base
- macaw-symbolic
- macaw-x86
- macaw-x86-symbolic
- macaw-aarch32
- macaw-ppc
- macaw-semmc
- macaw-refinement
2020-12-02 11:38:19 -08:00
Joe Hendrix
5aad8ca32e Upgrade to elf-edit 0.39 and other libraries. 2020-11-10 17:15:47 -08:00
Joe Hendrix
22a9104faa Various cleanups.
Consolidate three different checks that control when to explore
a function into a single one defined in exploreFunPred.

Modify noreturn function calls to not treat the return address
as a potential function entry point.

Add basic checking of LSDA address to compare-dwarfdump.

Minor code refactoring and submodule updates.
2020-11-06 14:37:13 -08:00
Joe Hendrix
98b69d992c Add compare-dwarfdump 2020-11-06 14:35:06 -08:00
Joe Hendrix
9203a37b94 Minor cleanups; dwarf updates 2020-11-06 14:35:06 -08:00
Joe Hendrix
a276dbaea4 Update to work with latest elf-edit. 2020-11-06 14:01:04 -08:00
Joe Hendrix
c356694627 Update to work with latest elf-edit. 2020-11-06 13:48:26 -08:00
Tristan Ravitch
37861df8c7
Support for mixed ARM/Thumb binaries (#174)
aarch32: Support mixed ARM/Thumb1 binaries

This updates the aarch32 backend to decode Thumb instructions and generate the Thumb semantics. The major implementation change is to use the `ArchBlockPrecond` feature of macaw to track the Thumb state (`PSTATE_T`) across block boundaries.

The ARM code discovery decides whether or not a function entry point should be decoded as Thumb by examining the low bit of the function address. If the low bit is set, it is a Thumb entry point. This has the slightly odd effect of causing macaw to say that the function is at the address with the low bit set, which is not technically true. This is documented in the README, but not obvious on inspection. Most use cases should not care, and can in any case account for it. In the future, it should be possible to fix this (though it will require some changes to the core of macaw).
2020-11-02 12:48:01 -08:00
Rob Dockins
e9b960c6d5 Bump semmc submodule 2020-09-15 16:24:24 -07:00
Rob Dockins
99f8cb0bdf Update to use new HasLLVMAnn API, which requires an action for
recording (or discarding) annotations rather than a map.
2020-09-11 14:40:02 -07:00
Kevin Quick
de31610929
Update submodules. 2020-08-10 17:47:35 -07:00
Daniel Matichuk
68193b9ef9 bump submodules 2020-07-31 00:33:10 -07:00
Daniel Matichuk
626071e459 bump submodules 2020-07-28 12:40:52 -07:00
Kevin Quick
0cb0a89748
Update submodules. 2020-07-20 14:18:35 -07:00
Tristan Ravitch
b160e480a7
x86: Add semantics for the endbr instructions (#147)
This change treats them as no-ops (which is what they do on all released
hardware).  We could represent them with arch extensions.  This has a supporting
change in flexdis86 (included as a submodule).
2020-06-25 13:43:15 -07:00
Ben Selfridge
039b8497fc
updates what4, crucible, etc. (#146)
* update to bv-sized branch of what4 and other things

* removed parameterized-utils submodule completely

* Updates submodules

* Fixes macaw-symbolic w.r.t. crucible-llvm changes

Co-authored-by: Ben Selfridge <ben@000548-benselfridge.local>
2020-06-16 16:49:55 -07:00
Kevin Quick
2c23067318 Update submodules. 2020-06-03 21:37:37 -07:00
Tristan Ravitch
89fc5a73f7
Tr/full arm intrinsics (#137)
Improve the TH codegen for macaw-semmc

This change lazily translates as much as possible.  It also generates somewhat more compact code. This change also finishes implementing primitives for the aarch32 backend.  Complementing the aarch32 changes, the macaw-semmc interface has been modified to allow macaw-aarch32 to avoid a redundant serialize-deserialize round.

Co-authored-by: Kevin Quick <kquick@galois.com>
2020-05-26 09:24:45 -07:00
Kevin Quick
3e9ecbaa8e
Update submodules for parameterized-utils release 2.1.0 compatibility. 2020-05-17 22:49:37 -07:00
Tristan Ravitch
938734d1e9 Submodule updates 2020-04-12 19:39:52 -07:00
Tristan Ravitch
6faf54ec42 Merge branch 'feature/asl' of github.com:GaloisInc/macaw into feature/asl 2020-04-06 21:46:37 -07:00
Daniel Matichuk
c5f374682e bump semmc 2020-04-06 21:01:41 -07:00
Daniel Wagner
277e1cd379 provide a way to mark certain jumps as terminal 2020-04-06 20:33:20 -07:00
Tristan Ravitch
1fa9b86b26 Rename macaw-asl to macaw-aarch32
This is more descriptive, especially since we will eventually have
macaw-aarch32 (also derived from the ASL specs)
2020-04-05 15:16:39 -07:00
Ben Selfridge
d8a601a1b8 feature/asl: checking in latest, test-conditional almost passing 2020-04-04 19:11:23 -07:00
Daniel Matichuk
42e22cfba5 bump submodules 2020-04-04 03:51:08 -07:00
Daniel Matichuk
5dab9c5209 Merge remote-tracking branch 'origin/master' into feature/asl 2020-04-03 23:38:19 -07:00
Ben Selfridge
8afc18dc62 feature/asl: BROKEN BUILD -- updated asl-translator, need to fix 2020-04-03 18:33:31 -07:00
Andrei Stefanescu
0be59e5815
Update Macaw to use HasLLVMAnn. (#122) 2020-04-02 17:58:47 -07:00
Ben Selfridge
c8736a83a3 feature/asl: bump semmc 2020-04-01 20:56:14 -07:00
Ben Selfridge
1b7fb5be73 feature/asl: bump asl-translator 2020-03-29 10:19:09 -07:00
Daniel Matichuk
1aa10fc35b bump submodules 2020-03-25 17:59:28 -07:00
Ben Selfridge
fd6343a254 submodule bump 2020-03-24 16:37:36 -07:00
Andrew Kent
3e5f52f11b bump semmc submodule, add what4-serialize dep 2020-03-18 12:01:17 -07:00
Ben Selfridge
acc79e1e24 bump asl-translator 2020-03-17 09:28:39 -07:00
Ben Selfridge
eee580fce4 bump semmc 2020-03-17 09:28:08 -07:00
Tristan Ravitch
4e487d5a5a Submodule update
This fixes an error introduced in the ghc-8.8 updates.  The error caused
macaw-x86 to throw an uncaught error when decoding certain instructions, when it
should have instead caught the error and reported a decode failure as a block
terminator.
2020-03-13 10:53:24 -07:00
Tristan Ravitch
e024646860
macaw-refinement (#114)
This commit updates macaw-refinement to work with the latest macaw/crucible and makes a few improvements along the way.

The major changes involved in this are:
* Block labels were removed from macaw, so we had to come up with an alternative approach to making synthetic blocks to represent dispatch resolved by macaw-refinement that is not really a jump table. We considered adding a new terminator that encoded "computed IP-based dispatch", but there was concern about the impact on client code. Instead, we added a field to the `DiscoveryFunInfo` that records "external" resolutions to indirect control flow (e.g., as by an SMT solver in macaw-refinement). The hook by which we feed SMT-based resolutions back into macaw was modified accordingly (`addDiscoveredFunctionBlockTargets`).
* Solver invocation changed to allow solver selection and parallel solver application.
* Logging is now done via the `lumberjack` library.
* macaw-symbolic now uses the "external" resolutions in `DiscoveryFunInfo` while building crucible CFGs.
* The path creation code in macaw-refinement was simplified significantly and the approach to path creation has been documented.
* The run-refinement tool is now more featureful.
* The test suite is a bit more structured and no longer depends on the printed output of the discovery process.
2020-03-12 17:15:08 -07:00
Ben Selfridge
9a51fcb14b feature/asl: bump asl-translator 2020-03-11 12:28:49 -07:00
Ben Selfridge
c176c05f61 feature/asl: bump semmc 2020-03-11 11:26:30 -07:00
Ben Selfridge
16c08f72f8 updated crucible/what4 2020-03-10 14:26:55 -07:00
Ben Selfridge
14ee2a7f70 feature/asl: update parameterized-utils 2020-03-09 15:23:32 -07:00
Tristan Ravitch
c825332f39
Update/ghc 8.8 (#112)
Updates for GHC 8.8

The two main classes of update are related to MonadFail and type alias expansion.

The MonadFail updates introduce explicit MonadFail instances and backward-compatible `fail` implementations under `Monad` for older GHC versions.

The type alias expansion rules changed in GHC 8.8 in a way that breaks the `Simple Lens` idiom; instead, we have to use `Lens'`.  Lens started supporting this alias in version 3.8, which was released in 2013.

This change includes necessary submodule updates, as well as the update for the split of what4 into its own repository.
2020-03-03 13:28:26 -08:00
Daniel Matichuk
8a4dc3f10a bump submodules 2020-02-27 13:34:27 -08:00
Daniel Matichuk
a98dec23c0 bump submodules 2020-02-26 23:05:08 -08:00
Daniel Matichuk
ad10d389fb copy macaw-arm into macaw-asl 2020-02-24 15:39:41 -08:00
Joe Hendrix
46be7aa52b Implement new registerUse analysis.
The new registerUse analysis uses a three phase process:

Phase 1 computes invariants about the start state of each block.  It
will indicate when registers/stack locations store stack offsets, and
where callee saved registers are stashed.  It also memoizes
information about stack reads and writes to simplify later passes.

Phase 2 is a demand analysis that computes which registers and stack
locations must be available to execute the program.  It then
propagates those constraints across blocks in the function.

Phase 3 combines the information into a form relevant for function
recovery.
2020-02-06 19:26:46 -08:00
Tristan Ravitch
e3aaf47a50
Tr/update submodules (#105)
The main change here is in macaw-semmc to account for a change to the BVOrBits
operation in Crucible.
2020-01-25 12:25:38 -08:00
Tristan Ravitch
d119a9ed5a
Update submodules (#104)
The main change here is in macaw-semmc to account for a change to the BVOrBits
operation in Crucible.
2020-01-17 16:17:30 -08:00
Tristan Ravitch
6b490a8193 Update the crucible submodule
The only real code change required is that simulation failure messages have an
extra argument.  The goal with this update is to pull in some fixes to the
solver feature detection for yices in the latest crucible.
2019-12-19 15:03:09 -08:00