Commit Graph

1462 Commits

Author SHA1 Message Date
33d40df4bd DatabaseCampaign/-Experiment: add randomjump faults
Taken from experiments/erika-tester.

Change-Id: Ic1aa72d1bfc839009297892cf9e50b3edb53fef9
2020-05-23 22:52:00 +02:00
dc73349a4d bochs: restore original RIP increase behavior
The now commented-out variant that was introduced in commit be9d291
(when FAIL* was still in an SVN repo, r1702) may be necessary for some
specific system behavior after modifying the currently executed
instruction, but breaks random-jump FI (import-trace -i
RandomJumpImporter).

Change-Id: I1ef3dc6dceab66b01cddd988e0f201065e404f99
2020-05-23 22:52:00 +02:00
8d1657a409 cmake: use -std=c++11 instead of c++14
With GCC 9, some of the stdlibc++'s header files don't compile with
AspectC++ anymore.  Until this is resolved, we compile with -std=c++11
although we actually use C++14 features; we need to ignore the
warnings pointing this out until AspectC++ works with these header
files.

Change-Id: If4d3c9fcbee61b7f8c6ffdf7f1ef9a641b6b6743
2020-05-20 10:08:47 +02:00
0dc0225dfa import-trace: diagnose missing ELF in RandomJumpImporter
Change-Id: Iede6947713f9e857e1d7c96f8d49e155ac4f59e5
2020-05-13 17:26:44 +02:00
d625021c2e Merge branch 'capstone'
Change-Id: I66475d1dfa2136f388db80d4ff39e181c4c857f7
2020-03-17 11:56:09 +01:00
25d153e037 README updates (publications, Docker note)
Change-Id: Iaac09495245bfebe0809999854c480b848ea49fb
2020-03-17 10:40:37 +01:00
039fa7bedf doc: explain how to build w/ Capstone
Change-Id: Ifc72117838e402fc432521bd10284dd0e61ca6b4
2020-03-16 18:49:44 +01:00
b94ef2acec capstone: deal properly with symbols outside .text section
Especially for dynamically linked ELF binaries (such as those in the
testing/ subdirectory), symbols with a start address outside the .text
section may exist.  This change skips any symbol that is not fully within
this section (and assigns a reasonable size to a zero-sized last symbol
within the symbol table), and turns green all Capstone-related test cases.

Change-Id: I2b51d0f21f325e6052ebc36d9533621bdf9aa38d
2020-03-16 18:49:44 +01:00
4e07ba50bd capstone: add missing disassembler test cases
Change-Id: I81e7f2ae9e70137c775f04a0a98c922e50b3743d
2020-03-16 18:49:44 +01:00
63b3a5772a capstone: compile-time version check
This version check could (and probably should) also be done in the cmake
scripts.  However, this check in CapstoneDisassembler.cpp catches another
failure mode: When a cmake script is missing a include_directories()
directive pointing to capstone.h -- resulting in a missing -I parameter to
gcc -- accidentally a system-wide 3.x capstone.h may get #included,
providing the wrong definitions and prototypes to some translation units.

Change-Id: Id30f77a47e38f4e892b92189bcce9119bf03918c
2020-03-16 18:49:44 +01:00
1cbd5acab0 (capstone) add capstone 2020-03-16 18:49:44 +01:00
f7f982fec5 (capstone) feat: add capstone disassembler to tools/import-trace/ 2020-03-16 18:49:44 +01:00
d04afaac54 (capstone) feat: add capstone disassembler files 2020-03-16 18:49:44 +01:00
ea6c1c031b (capstone) feat: add FindCapstone 2020-03-16 18:48:10 +01:00
3ae5076cbd update .gitignore 2020-03-16 18:48:10 +01:00
0c176e66f7 FAIL* works with LLVM 7 and 8
Change-Id: I459c3d38e788469c27a244f99ffe51d6537c3b01
2020-03-16 15:56:13 +01:00
d0f3e28d09 Merge branch 'luhsra-pr-regions'
Change-Id: Ib5f68fbe2a2e7ec176a2858d2a49816f68196eb5
2019-10-30 19:35:38 +01:00
f3d5b20327 Some config for bochs and generic-experiment 2019-10-28 18:10:12 +01:00
956112cc01 Added BasicBlock- and CallRegionPruner
Implemented two instantiations of Fault-Space Regions (FSR) as a program-structure-guided approximation of fault spaces based on the precise Def/Use-Pruning using basic blocks or function calls.

Further reading:
Program-Structure-Guided Approximation of Large Fault Spaces
Oskar Pusz and Daniel Kiechle and Christian Dietrich and Daniel Lohmann
In: 24th Pacific Rim International Symposium on Dependable Computing (PRDC'19)
IEEE Computer Science Press, 2019

Some configurations for bochs and generic-experiment
2019-10-28 18:09:57 +01:00
aec09d1565 Debian 10: fix loading ~/.my.cnf with MariaDB
The switch to MariaDB Connector/C 3.0 involves some subtle API
changes, including the fact that "~" is not expanded to the user's
home directory anymore.  This change expands the HOME environment
variable within our code base.

Change-Id: I30bc0d4fba6f0c8001832a981aa99af7e6f2a369
2019-10-22 18:12:57 +02:00
14aba36c6a cmake: typo
Change-Id: I56c4e29e8aedee96683d9218d72f67d55de254ed
2019-10-21 17:14:51 +02:00
c34917ca80 Debian 10: MySQL/MariaDB related fixes
Change-Id: I538caf6dedaa785061194a87c7e4965df3839088
2019-10-21 17:14:51 +02:00
198a2dde97 Debian 10: deal with deprecated CMP0048 policy
Change-Id: If243a8671df2d84951037155fe8e99cb1cedf9c4
2019-10-21 17:14:51 +02:00
8d060ef375 Debian 10: switch to C++14
Some libraries, e.g. protobuf, depend on C++11 now.  As they are
(indirectly) included in some .ah aspect headers, everything has to be
compiled with C++11 enabled now.

This change switches to C++14 globally.

Change-Id: I56a802bd510704d668a2b2c8957e11725fbe98b7
2019-10-21 17:14:51 +02:00
924e234db1 util/llvmdisassembler: fix address -> register translation
Due to a typo (cast to regwidth_t instead of regdata_t), accesses to
register content beyond an offset of 32 bits via
LLVMtoFailTranslator::reginfo_t did not work correctly.  Additionally, this
change fixes constructing reginfo_t with a bit width >= 64 (e.g. the whole
RAX register).

Change-Id: I24914cd64fa51118eeac38cc3fb47b76790d3aac
2018-12-11 17:14:59 +01:00
50704e9b59 x86: comment typos
Change-Id: I5092e8db23221ce109b75aee79ecc1c7e44c6d32
2018-12-11 17:14:59 +01:00
67f30a171e x86+bochs: add IDs and accessors for FPU and SSE registers
Change-Id: I33146929255337f679ff80152ed4d83106621ffb
2018-12-11 17:14:59 +01:00
9625587fc4 core/sal: refactoring BochsCPU::get/setRegisterContent
Removing the pData indirection that doesn't really simplify anything.

Change-Id: I98c15ffcd76faeac117bea4e1680dcb2dbdbc15f
2018-12-11 17:14:59 +01:00
171fe54330 core/sal: refactoring BochsCPU::get/setRegisterContent
Using switch/case instead of an if cascade is more readable and has a
better chance to be optimized.

Change-Id: I41dc2cbdf8c14bd35c91520d74b476d7b522a3a4
2018-12-11 17:14:59 +01:00
60329bface core/sal: correctly use CPU id in Bochs backend
Change-Id: I6b5f50d78429284b21794127af3af70df2c687a3
2018-12-11 17:14:59 +01:00
805bede338 util: LLVM code cleanups
Among others, rename instr_info to instr to avoid shadowing the class
member with the same name.

Change-Id: I53d2ee08f11a944528931bf8cb4003ec64391016
2018-09-03 14:14:27 +02:00
527763e87f JobServer: remove "come again" diagnostic
The "--[Server] No workload, come again..." appears every time a
larger job set is loaded from the database, once for every client that
knocks.  This isn't helpful and scrolls out relevant information,
hence I'm removing it for now.

Change-Id: Ic7ca5b3a0c096b384ba4803df5b482a96bf803b1
2018-08-27 20:20:53 +02:00
8426084e5a CampaignManager: avoid parameter-name clash
The -p parameter is already being used by several campaign servers for
the prune method to restrict to (which was broken in commit
6c120004e), hence allow only --port to choose a different server TCP
port at runtime.

Change-Id: Ia30e40d564e85a9702118dc28df4988ec628e491
2018-08-27 15:08:17 +02:00
d11579db30 GenericTracing/-Experiment: fix missing dependency
Change-Id: Iec285afbd3315b3fb124e97a9ce0fb10b60e6f52
2018-08-09 10:59:27 +02:00
3a47b20df2 JobServer: use steady_clock for interval measurement
std::chrono::system_clock is not monotonic, instead use
std::chrono::steady_clock for interval measurements.

Change-Id: I231affecfe8e89481720e47b59132fc838cdf73c
2018-08-03 22:00:23 +02:00
a547b0d5b4 JobServer: print completion percentage and ETA
If the JobServer is provided a total number of experiments by the
campaign, it now prints a completion percentage and an estimated
remaining runtime along the usual progress reports.

Change-Id: Ibd781ba8bff9af3a85683bbd29728216e316da57
2018-08-03 19:53:45 +02:00
f89794329c JobServer: progress-report overhaul
The JobServer progress-report output now shows the total number of
completed jobs instead of the (almost always zero) inbound queue fill
level.  Additionally, the current number of incoming results per
second is shown, which also prepares for an ETA calculation in the
following commit.

Change-Id: I6b71c45f44b9e6b9b17c059959a90068b51c165c
2018-08-03 19:51:07 +02:00
500d060376 import-trace: progress and summary report for FullTraceImporter
Change-Id: I13a4352f6addc972ce2e24768d4079780ed1f554
2018-08-01 14:32:58 +02:00
453a6efe0b GenericExperiment: command-line --help overhaul
Change-Id: I8eff38043efcbeef0026c7a26dd6cc14fa6af673
2018-08-01 14:32:58 +02:00
a256e1c5af GenericExperiment: optionally continue if symbol not found
When prefixing a symbol name with '?', the GenericExperiment does not abort
in case the symbol is not found in the provided ELF binary:

fail-client -Wf,--detected-marker=?eddiErrorHandler
[...]
[GenericExperiment] ELF Symbol not found, ignoring: eddiErrorHandler

Change-Id: Iec12416ce8e38ff0ee1704e3a725c2cadc97b756
2018-08-01 14:19:05 +02:00
1c774ce50d JobClient: fix retry delay
Only wait for the retry delay if really retrying.

Change-Id: If12bd3745c799edc5933874d9a44d049646e0e87
2018-08-01 14:19:05 +02:00
00882f98ad JobClient: resolve endpoint only once
The JobClient now resolves the server IP once (lazily, when needed) instead
on each connect attempt, reducing the amount of DNS requests sent out.

Change-Id: I9804048d3252da333cb3addbe94a01fdf3c707c8
2018-07-31 12:33:52 +02:00
ad0640cedd GenericExperiment: fix output formatting
Change-Id: I42c49fbeb15cdebd3f77124554efb8c1f40f429f
2018-07-31 12:33:48 +02:00
742ec092eb DatabaseExperiment: fix output formatting
Change-Id: If882a9ec68b5d2d040d8a047c2b1ea53eea4c21f
2018-07-31 12:29:20 +02:00
68229afa84 import-trace: fix same-address symbol import
This bugfix makes sure that from a set of symbols with the same
address, only the first one gets imported.

After an assessment whether analysis scripts can deal with multiple
symbols at the same address, an import of all symbols should be made
possible in the future.  This will also require to relax the
primary-key constraint of the `symbols' table.

Change-Id: I61c4ddb1af1556d44eab54e53eaa3d0fc20de7c1
2018-07-30 16:00:48 +02:00
2c7640fe90 import-trace: record stats on failed register mappings
The import-trace tool now systematically collects statistics on which
LLVM -> FAIL* register ID mappings failed during import, and presents
those after the import finished.

Change-Id: Ied67853d754483277868fe21bf2c6efeaeb60f09
2018-07-30 14:36:33 +02:00
d581fd27a2 GenericTracing: typo
Change-Id: I02b39a7ad0db49899dd602c1da472b76472da979
2018-07-30 14:20:48 +02:00
d370ded9b9 generic-experiment: generalize serial-output monitoring
The generic-experiment now learned to record and compare output on an
arbitrary serial port.  Using Bochs' port 0xe9 hack (parameter
--e9-file) is kept for compatibility reasons.

Change-Id: I5b1aa02d244e8b474919e1bdf043e523ea0e4f45
2018-07-27 21:12:41 +02:00
226545de58 util: LLVM test code output simplified
llvmDisTest now explicitly catches LLVMtoFailTranslator::notfound.

Change-Id: I45306212d45e00cfabb867159a13ce6d247e8e0f
2018-07-27 08:55:16 +02:00
45c7906d41 import-trace: cleanup
Change-Id: I9f658c1bb9881fd1ef70f1744b6a2e2c36ad7142
2018-07-27 08:55:16 +02:00