Compare commits

...

310 Commits

Author SHA1 Message Date
eaba782ca6 update mysql host 2026-01-18 19:51:43 +01:00
47b5b147b6 dockerfile: build dump/import/prune tools for generic-tracing 2026-01-18 19:51:38 +01:00
06f7346533 dockerfile: don't cache fail/fail-targets clones 2026-01-18 19:19:42 +01:00
569ee2b898 orchestrate containers using compose instead of makefile 2026-01-18 18:47:52 +01:00
ba991c0639 dockerfile: rename linked outputs 2026-01-18 18:47:17 +01:00
5a9c7b84ee dockerfile: replace links to fail/fail-targets with my forks 2026-01-18 18:47:17 +01:00
59da5d3763 add fork notice to readme 2026-01-18 18:47:17 +01:00
7b0e79d45b dockerfile: finally produce a working dockerfile 2026-01-18 18:47:17 +01:00
81f30926a2 ignore prebuilt binaries 2026-01-18 18:47:17 +01:00
f4f688acb6 dockerfile: update makefile to run with current docker versions 2026-01-18 18:47:17 +01:00
eade35bd98 dockerfile: update base ubuntu image to 16.04 + replace ccmake with explicit cmake options 2026-01-13 00:12:10 +01:00
c491750494 nixos: add wip FAIL* package derivation to flake.nix 2026-01-12 23:26:06 +01:00
c10739b8df dockerfile: don't check fail-targets.git certificates 2026-01-12 23:25:46 +01:00
c1441d9f5e dockerfile: symlink llvm-config-3.4 to llvm-config so FindLLVM.cmake finds it 2026-01-12 23:25:46 +01:00
91bd98db62 dockerfile: install missing boost libraries 2026-01-12 23:25:46 +01:00
241c583c54 dockerfile: don't check fail.git certificates 2026-01-12 23:25:46 +01:00
bca506ddcc dockerfile: don't check AspectC++ certificates 2026-01-12 23:25:46 +01:00
ee42a0ca0b dockerfile: fix package sources of deprecated ubuntu version 2026-01-12 23:25:46 +01:00
c205b2fcd0 nixos: add flake.nix 2026-01-12 23:25:46 +01:00
c78bbcb632 ElfReader: compilation fix
std::numeric_limits<> is defined in the <limits> header, not
<limits.h>.

Change-Id: I88eca0e3d60f88d3ad44cad9097cb92bd6ec8d8b
2021-12-15 23:29:16 +01:00
4d33831978 fix uninitialized variable 2021-12-15 00:34:02 +01:00
4d7ccd2d86 port resultbrowser to python3 2021-12-15 00:30:10 +01:00
da7af918c6 port faultspaceplot to python3 2021-12-15 00:28:42 +01:00
e52ece5aed README updates
- replace danceos.org links (danceos.org is permanently out of
  service)
- add dissertation link

This fixes #10.

Change-Id: I27278db1b36f94727a710ea7998374ecf5a60297
2021-08-01 23:56:47 +02:00
7bdefb6849 generic-tracing: --catch-trap aborts when a trap is observed
Enabling --catch-trap makes sure tracing aborts with an error message
in case a CPU exception/trap is observed in the fault-free golden run.
In most cases, this is an indication the analyzed program is broken in
the first place, which should be detected early in the FI process.

This is a refurbished version of a commit by Marcel Johannfunke.

Change-Id: I50cc8e12e0986d3623a1be78259cfad13dc56205
2021-07-27 16:28:37 +02:00
67f1be840f prune-trace: correctly handle 0 trace entries
If the analyzed program does not read any memory, or the reading
memory accesses are filtered out in the import step (import-trace -m),
the trace table may hold no entries for the program.  This commit
makes sure the SamplingPruner and FESamplingPruner deal properly with
this situation.

Change-Id: I6bb5da23f345fa97cf8ab0b688cce5d00945249a
2021-07-27 16:28:37 +02:00
3b7404de43 import-trace: add --cover-memorymap switch
This compatibility-breaking change introduces the --cover-memorymap
switch to import-trace.  It makes a previous behavior optional, which
enforces DB entries for addresses covered by the --memorymap that
don't occur in the trace.  This creates a continuous and potentially
very large fault space in the DB, which never made any real sense.

Change-Id: I47e412bb621b595748c1772e02d2577308be8664
2021-07-27 16:28:37 +02:00
6598520c0a fix small bug in assertion caused by incorrect spelling 2021-07-13 08:09:25 +02:00
355015fb64 generic-tracing: fix bounds-checking mode
This fixes a bug (uninitialized member variable check_bounds)
introduced in commit 43ebf3e, which led to bounds checking sometimes
being accidentally enabled.

Change-Id: Ia2992a38dd83416ce0ec2a9d845d7827617cbd89
2021-03-26 15:40:20 +01:00
2fd5c20a7c bochs: backport decoding of CRC32 instr fix
Upstream SVN r10223
Backport was neccessary, because the CRC32 assambly instruction
did not work as expected in bochs.
2021-03-24 20:12:53 +01:00
18b3203257 enlarge varchar of name to bigger value in the symbol table
Some benchmarks need this space for the function name, because of name mangling.
2021-03-24 20:05:11 +01:00
f33b4bac22 [generic-experiment] Fix whitespace in .proto file 2020-12-18 18:19:52 +01:00
4489537b4d [generic-experiment] WRITE_OUTERSPACE -> ACCESS_OUTERSPACE
This is a breaking change. However, the name is and always was
misleading. Therefore, we change it to the correct name.
2020-12-18 18:19:52 +01:00
d35ae687b0 [generic-experiment] Correct names for argument names
As the outerspace listeners catch read and write accesses, this must
be documented in the help message. The old parameter name is now marked as
deprecated and can be removed in 2022.

Furthmore, the experiment now has the combined command line argument
--catch-outerspace, which enables catching accesses below and above
the ELF.
2020-12-18 18:19:52 +01:00
625756f338 [generic-experiment] improve the injector logging 2020-12-18 18:19:52 +01:00
43ebf3ee81 [generic-tracing] add check-bound mode
During the trace generation, we can enable the bounds check, which
catches all events that are monitored by the generic-experiement
options:

  --catch-write-textsegment
  --catch-upper-outerspace
  --catch-lower-outerspace
2020-12-18 18:19:52 +01:00
eb43273e9b [generic-experiment] make text segment listener, listen only to writes
The generic experiment set the TriggerAccessType not the
WatchAccessType. Therefore, the text segment listener fired on write
AND read events. The watch access type can only be set in the constructor.
2020-12-18 18:19:52 +01:00
cd150a6f5b [generic-experiment/ElfReader] access listeners based on ELF segments
This patch uses ELF segments instead of section for determining the
extent of the binary in memory. Consequently, the outerspace listener
was modified to use these new bounds. Additionally, the generic
experiment was changed to include a lowerspace listener, which listens
for write access below the physical memory location of the ELF.
2020-12-18 18:19:52 +01:00
86267cce9f DatabaseCampaign: increase progress report interval
Change-Id: I439bf16b98fb11f89ece398fcaf13cc4fa2dd4cd
2020-12-16 15:39:39 +01:00
c148b70b55 DatabaseCampaign: bail out on query failures
Change-Id: If76d4a2d391879e5e12b65ef593b35436cb0e34d
2020-12-16 15:39:39 +01:00
f2e8c508de DatabaseCampaign: fix progress bar for >1 variant
Change-Id: I21843249830c67699214b6bed71f452b6ca03cb2
2020-12-16 15:39:39 +01:00
c422a86bfd cmake: fix boost version dependency
Change-Id: Icec5121440c189ebd8bc26d2366730d332055dbc
2020-12-16 15:39:39 +01:00
bd7cf9c922 ecos_kernel_test: formatting
Change-Id: I4bccb9a7c4fe286c34f4a74ad641e9107039c47b
2020-12-16 15:39:39 +01:00
b516f2f07f Database: doc fixes
Change-Id: I6304e4379ee0d94bd816b968eb5f08a281cfd0b4
2020-12-16 15:39:39 +01:00
54155b1fe5 capstone: fix missing build dependency
Change-Id: I890871323ecdfec09c2bd25cfede50fd0712d5cd
2020-12-16 15:39:39 +01:00
c5d7b19752 perf: call onDeletion in the right places
Change-Id: I920aacec475d8ec3f51e11bcb59f37b84a730ee7
2020-12-16 15:39:39 +01:00
28cf14cf00 ElfReader: compilation fix
Change-Id: I60e60e795154ffb270592b206dbfd85c3837bfc8
2020-12-16 15:39:39 +01:00
5929eac85c SimulatorController: Selection between multiple experiments
If the user enabled multiple experiments, it does not make sense to
execute them concurrently. Therefore, we now only register all enabled
experiments and choose one experiment on fail-client startup. For this
selection, the user can either set the FAIL_EXPERIMENT environment
variable or invoke the tool with a specific argv[0]. For the
bin/-folder, we create symlinks for this mechanism.

With this change, the generic-tracing and generic-experiment can be
compiled into the same executable and we could distribute a "standard"
version of FAIL*.
2020-12-16 15:38:29 +01:00
2ecdba92a5 [generic-experiment] allow passing state directory via environment 2020-12-16 15:38:29 +01:00
f92b930acb tools/tests: small end-to-end test suite for importing/pruning
As bigger changes lie ahead, we want a small end-to-end test suite
that ensures that our importing and tracing does not fall apart. With
this change, we add the infrastructure and two test-cases (fib, qsort)
including ELFs, traces, and injection results.

In order to run the basic-pruner test cases, one needs to setup a
MySQL table and set the CMake option ENABLE_DATABASE_TESTS.
2020-12-16 15:38:29 +01:00
df44da9f33 DatabaseExperiment: Use google::protobuf::Reflection
The previous path google::protobuf::Message::Reflection was deprecated
in 2008 (779f61c6a3ce02a119e28e802f229e61b69b9046), and we only used
it here. With newer versions of proto-c, this breaks the build.
2020-12-16 15:38:29 +01:00
973716ff35 Database: fix typo in command line argument
This is an API breaking change. Nevertheless, help text and
command-line parser were out of sync and the variant of the help-text
does make much more sense.
2020-12-16 15:38:29 +01:00
743e746e0f editorconfig: add .editorfile to support a consistent coding style 2020-12-16 15:38:29 +01:00
d296f15652 dump-trace: record the number of memory fault locations
With the number of accessed memory addresses and the duration of the
trace, we can deduce the size of the rectangular memory fault space.
This will be used in testing.
2020-12-16 15:38:29 +01:00
8421e1ef03 import-trace: diagnostics typo
Change-Id: Ic02f66884a300dd081c61ac911cd3d5767f08744
2020-07-06 17:33:04 +02:00
5e80a59058 qemu: incomplete QEMUx86CPU implementation
Change-Id: I3598e420f95e75523895f8cf496f443a92a687ec
2020-06-08 16:29:43 +02:00
cd31e27e97 Merge branch 'qemu-fixes'
Change-Id: I2154750088405bd552020e6ebe6982ee05df3b16
2020-06-08 09:58:26 +02:00
f9ed535c4a qemu: configuration-related fixes
+ Make it compile again.  Why was qemu/lol.h ever committed?

Change-Id: I398d3b9821072ca104630104270df4de2b91464a
2020-06-08 09:57:37 +02:00
e17dfe9c3a capstone: fix compilation
The removed line seems to have been overlooked when
reordering/splitting commits.

Change-Id: Idb6e7f69d76b3f6c8268cf08a85ab756c442d6fc
2020-05-24 19:26:29 +02:00
73b246c7df capstone: debug stuff, cleanup
Change-Id: Ia831c20097e86d1f178efb09884a60caa542f12a
2020-05-23 22:52:00 +02:00
1dd929aad5 capstone: only use insn.detail if it's not NULL
Capstone NULLs the detail field when it encounters a bad/invalid opcode.

Change-Id: I421386903756e03049e950f09b8a500b54fe4a73
2020-05-23 22:52:00 +02:00
0c38fd7345 capstone: disassemble .text also for STT_NOTYPE
Symbol type FUNC (STT_FUNC, "code object") seems not to suffice when parts
of the disassembled binary come from assembler source files.  We try to
disassemble STT_NOTYPE (symbol type "unspecified") as well now.

Change-Id: I582190900e66d6af0779dfaf3b569f0e157e9ce7
2020-05-23 22:52:00 +02:00
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
eef19b80a0 FAIL* works with LLVM 3.9, 4.0, 5.0 or 6.0
Change-Id: I5480c3451daac7c8ea6160a9afe5ce557b73afb1
2018-07-27 08:55:09 +02:00
5d5927a88a DatabaseExperiment: add register FI
Calling the DatabaseCampaign with --inject-registers or
--force-inject-registers now injects into CPU registers.  This is achieved
by reinterpreting data addresses in the DB as addresses within the register
file.  (The mapping between registers and data addresses is implemented in
core/util/llvmdisassembler/LLVMtoFailTranslator.hpp.)  The difference
between --inject-registers and --force-inject-registers is what the
experiment does when a data address is not interpretable as a register: the
former option then injects into memory (DatabaseCampaignMessage,
RegisterInjectionMode AUTO), the latter skips the injection altogether
(FORCE).

Currently only compiles together with the Bochs backend; the
DatabaseExperiment's redecodeCurrentInstruction() function must be
moved into the Bochs EEA to remedy this.

Change-Id: I23f152ac0adf4cb6fbe82377ac871e654263fe57
2018-07-24 09:45:00 +02:00
8adc859223 import-trace: fail gracefully if --elf is missing but needed
Change-Id: Ib154326507e307b65099f1b84c44e796b1aef98a
2018-07-24 09:24:47 +02:00
54f3d3f9b6 x86: add amd64 registers
Floating-point related registers are still missing.

Change-Id: If0e0fa2b25cf2fda6e23aeddb3a72744e6c079a6
2018-07-24 09:24:45 +02:00
dd1b18e580 remove unused elfinfo/*
elfinfo was what ElfReader started from, but is not needed in itself
anymore.  The code has been mostly rewritten, so an explicit mention
of the original authors is not necessary anymore.

Change-Id: Iea48c80f9174504bbb56cc02ee2de5eda4a81489
2018-07-24 09:22:29 +02:00
9bd58cb294 ElfReader: read 64-bit ELF binaries
ElfReader now detects whether a 32- or 64-bit ELF is opened, and uses
the corresponding elf.h data structures.  Internally maps 32-bit ELF
structures onto 64-bit structures to use common processing code.

Change-Id: Ib42a4b21701aeadac7568e369a80c08f2807694e
2018-07-24 09:21:12 +02:00
3d292cb217 generic-tracing: add error handling
Instead of using assert() (which only does something in a Debug
build), explicitly fail when a user-specified symbol is not found.

Change-Id: I33ac59ca4483ee65ba70c264b5153a7766a919d2
2018-07-24 09:21:09 +02:00
c11547a952 visualfail: migrate to PHP 7
The "mysql" extension is gone, using "mysqli" now.  Plus tiny
syntax/operator precendence changes.

Change-Id: Icad4329521a2a42d7cd73408588d210431ec04c6
2018-07-24 09:21:04 +02:00
385830969c faultspaceplot: add sanity check
faultspaceplot.sh now fails gracefully if the requested
variant/benchmark combination does not exist in the database.

Change-Id: Ied3b5a0e72cc5ae8e6ce352b65486f15bb13576b
2018-07-24 09:20:37 +02:00
e64fd740fe data-aggregator: EAFC+coverage from sampling
This change adds global fault-coverage and occurrence count
measurement scripts that work with sampling results.

Change-Id: I14d94a2c549cff3256fc7b0800cfd4a702e6ad35
2018-07-24 09:19:50 +02:00
0baca64468 data-aggregator: document "onwrite" fault model requirements
The *-onwrite.sh analysis scripts only work if import-trace was not
run with --no-write-ecs, i.e. they only work if writing memory
accesses were imported into the "trace" table.

Change-Id: Icb2ea4e72d2200c886d4f9074f2da0f9bfd6ac85
2018-07-24 09:16:33 +02:00
3abdc51043 data-aggregator: more script renamings
The terms "occurrences" and "coverage" contradict each other.

Change-Id: I2c3b3a2fa046f9ab77ea4bec9a13eafa2ebfba58
2018-07-24 09:16:33 +02:00
a88b014578 data-aggregator: rename resulttype-* to global-*
This is more in line with the other scripts' names.

Change-Id: I8f645a3b93bce60fe167eeb93bb8c8e285f4038a
2018-07-24 09:16:33 +02:00
f5b34a962c data-aggregator: fix alphabetic resulttype sorting
Depending on SQL-statement nesting, some scripts already correctly sorted
resulttypes alphabetically, but some sorted along the numeric ENUM value
behind the resulttype name.  This change explicitly converts the resulttype
to a string before sorting.

Change-Id: Ia18aa4e75b94a6a9f7bb125953bc85b86b3cbd6e
2018-07-24 09:16:33 +02:00
27b697200b data-aggregator: specifically limit to fspmethod 'basic'
In their current implementation, the data-aggregator scripts do not work
correctly on sampling results.

Change-Id: I1035970b352f513d725bd1a40ac9262368ffbcc0
2018-07-24 09:16:33 +02:00
e63f7376f8 JobClient: connect to IPv4 endpoints only
As long as the JobServer only listens on IPv4 endpoints, it makes no
sense to attempt a connect to an IPv6 endpoint on the client side.

(However, it's 2018 and we should also be capable of using IPv6 on
both the client and server side ...)

Change-Id: I9c3916466c350ce74a31cef3b6ae0e7ac56367c7
2018-07-24 09:16:33 +02:00
c5e0825c6f Database: reduce varchar cols to fit MyISAM indexes
MyISAM indexes are limited to 1000 bytes per index.  Recently, Linux
distros (e.g. Debian 9) started to default MariaDB installations to
utf8mb4, which can use up to 4 bytes per character.  Hence, two
varchar columns indexed in a single key have a total maximum length of
250.  Instead, we use some lower, round numbers.

Change-Id: I4b53bc217912bc7070102a0af4938763e61b041d
2018-07-24 09:16:33 +02:00
c88c034ca7 cmake: default build type 'Release'
+Make available build types explicit (pull-down in CMake GUI)

Change-Id: Ib2cdd31ad038cef1bb27fcd14f089a35a9751e76
2018-07-24 09:16:33 +02:00
be0b7b630c doc update
Change-Id: Ie8f9011b7718c971de74ab40689c9de7fbeb3b18
2018-07-24 09:16:33 +02:00
ff3a5fb498 move to LLVM 3.9
This change removes support for earlier LLVM versions; making them
work as well is simply too tedious.

Change-Id: I372a151279ceb2bfd6de101c9e0c15f0a4b18c03
2018-07-24 09:15:33 +02:00
baaa6c3ce8 JobClient/Server fixes
- Retain original CLIENT_RETRY_COUNT semantics after Boost::Asio
  switch
- JobClient is C++11 now, too
- Message reception copy/paste error fixes

Change-Id: I19c474b2a79cd2ac8657e8d58d6170202d096fb0
2018-05-09 17:43:28 +02:00
9272c5cbed Move JobClient to Boost::asio as well
I did this mainly so server and client use a common networking API
IMO, using Boost::asio results in nicer name-lookup code.
Since no longer needed, I removed the SocketComm stuff.
The client is still synchronous; I see no benefit in having it
asynchronous.

I'm not super happy with the random backoff by the clients, if they
can't connect to the server. It makes the code really messy, 3 retries
is totally arbitrary, as is the backup windows. I believe launching
the server and clients in the correct order should be handled by a
launch script
Change-Id: Ifea64919fc228aa530c90449686f51bf63eb70e7
2018-05-09 17:41:52 +02:00
191219ad06 data-aggregator: variant-durations.sh w/o filter
Change-Id: I7a3164635fc2fbd65d99fc8bba66e956d505a515
2018-05-09 15:25:45 +02:00
42d6ff4a97 data-aggregator: "on write" fault model metrics
Change-Id: I784618fd4b3a0074153ce074957b57e363c54657
2018-05-09 15:25:45 +02:00
bbe60745e1 data-aggregator: script overhaul + modularization
Change-Id: I4353db1475f00956d19d91c8c558c34506ec836b
2018-05-09 15:25:45 +02:00
9ae8123433 JobServer: fix C++14 dependency
The recent Boost.Asio overhaul requires C++14 features, not only C++11.

Change-Id: I6decf0e6532956f7061d8a9021ec2c8406679266
2018-05-03 16:28:26 +02:00
5a5a99145c bochs: fix ac++-caused preprocessor namespace clash
When building with an experiment activated, the generated
instantiate-<experimentname>.ah gets included in each and every FAIL*
translation unit including Bochs's ones.  In the case of the
generic-experiment (and probably many others), this indirectly included
Google protobuf headers, which failed to compile for Bochs's gui/wx.cc and
gui/x.cc: The included X headers pollute the preprocessor namespace by
an internal protobuf "Status" class.

Change-Id: I613f5c792a9519cf2573eddc7fef6266c7168494
2018-05-03 16:26:13 +02:00
6f41ad73d3 util: MemoryMap test failure more verbose
Change-Id: Ie42e1983d8cc5658b7e88d59cdbe689e6aefe9f2
2018-05-03 15:24:52 +02:00
4a068792e8 fixes for Ubuntu 17.10
- Bochs: wx_gtk3 needs g(d|t)k2

Change-Id: I0a014e3ce7f1d40d215d5309e842db618a2971ed
2018-03-01 15:57:24 +01:00
6c120004eb Use boost-asio to improve FAIL* server performance
This patch overhauls the FAIL* server code to leverage Boost asio to be able to
handle a large number of clients (>4000). In this implementation the server is
now single threaded. I've not encountered any problems with this for up to
about 10k clients. Boost ASIO can also be used multithreaded, but I assume the
FAIL* internal data structures (Synchronized*) will become a bottleneck first.

The code now additionally depends on Boost Coro and Boost Context, as well as
a C++ 14 compiler, although the only C++14 feature required is a lambda capture
with initializer, such as [ x = std::move(x) ]. gcc-4.9.2 does this.

The code could (and probably should) be cleaned up more. Comments are wordy,
code is unnecessary now (multiple server threads), code is not self-contained
(headers spread dependencies), many ifdef's (server performance measuring
should be runtime rather than a compile time option), and much more. But for
this patch I was going for a minimal changeset the get the functionality in,
to have an easier review. Alas, FAIL* has no Unit-test suite to run the changes
against.

To handle such a large number of clients more changes were necessary, for
example server status output is now performed every 1s, instead for every
request.

The class Minion was removed completely; the only thing it was doing was
encapsulate an int.

The server has now a runtime-configurable port, or it can select a free port on
its own if none is specified. This requires the CampaignManager to add a port
argument and instantiate the JobServer dynamically.

Change-Id: Iad9238972161f95f5802bd2251116f8aeee14884
2017-09-15 06:26:14 +02:00
48ceeb6a14 Clang 4.0.0 fix for Bochs
Clang 4.0.0, which ac++ links against since today, throws an error in
the Bochs code.

config.cc:3480:55: error: ordered comparison between pointer and zero ('char *' and 'int')
    if (SIM->get_param_string("model", base)->getptr()>0) {
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Change-Id: I8404a54acd468bf71cbf29867657f9458f3a4c3f
2017-08-01 17:48:39 +02:00
3ad42e270c fixes for Debian 9
- search for libdwarf.h in new locations (e.g., /usr/include/libdwarf/)
- build Bochs with -std=gnu++98 (gnu++14 is default since GCC 6.1)
- specify "proto2" syntax for protobuf messages
- minor build-system and C++ namespace fixes

Change-Id: I16dbc622c797ef8e936fe3c0fb9b03029d27529d
2017-08-01 14:12:03 +02:00
d0d62de3f4 sal: remove perf dependency to watchpoints/breakpoints
This change removes the hard compile-time dependency from the
performance-improving dedicated listener-list implementation
(core/sal/perf/) to basic watchpoints / breakpoints being enabled in
the cmake config.  This allows to keep the CONFIG_FAST_* switches
enabled in practically every experiment.

The primary reason for this change was the recent insight that enabled
breakpoints with disabled CONFIG_FAST_BREAKPOINTS can massively slow
down an experiment even if the latter does not use a single breakpoint
itself.

Change-Id: I5e3f5c1632ed1ee98a3ec887f18b174fa0e15773
2016-12-03 17:49:07 +01:00
da3a78ec4d faultspaceplot: fix ymin calculation
The initialization value for ymin, which tracks the lower bound of
plotted rectangles (and is finally used for the preselected zoom
area), was chosen too small for Linux-kernel data structure addresses.

Change-Id: I7cd8dc690843394107e8aae7fffa90f27ca18153
2016-12-03 17:49:07 +01:00
87f7cae1da Merge "ecos_kernel_test: check if addr_errors_corrected is mapped before access" 2016-10-06 13:19:06 +02:00
e25c42f2b2 bochs: fix segmentation fault (after BX_PANIC) in HDD controller
Change-Id: I584e883b89ae36f4cee83684f9461e7baafa1495
2016-09-09 11:32:14 +02:00
3c6502a111 ecos_kernel_test: check if addr_errors_corrected is mapped before access
Change-Id: I08e751feeffc41a51312b8a9ad4b28a57a45a487
2016-09-09 11:26:07 +02:00
9886a0345e bochs: fix segmentation fault in DMA controller
Change-Id: I10c3e7e89d41abdcaea374ea01a2d1613d013e4c
2016-09-08 10:35:33 +02:00
85844b86cc ecos_kernel_test: compare serial output for coptermock benchmark
Change-Id: Ic4f13035d55c811bda7fa020114141b816a11ed8
2016-08-29 10:50:35 +01:00
89866de85f bochs: backport PCI IDE controller DMA start fix
Upstream SVN r12754: "Fixed PCI IDE controller DMA start (found with a
recent Linux version: "mode sense" command executed in DMA mode).
Updated output of "mode sense" page 0x2a (still reporting CD-ROM
drive)."

(data_ready part not backported due to missing dependency)

Change-Id: I392ba2b20a4138682fc34d6d2a78da0c6706e280
2016-08-06 19:44:49 +02:00
fbd788f05e bochs: backport overlapping memcpy fix
Upstream SVN r12563: "Bugfix: use memmove() if source and destination
range can overlap (found with valgrind)."

(Manually backported, the code structure has significantly changed
before this fix.)

Change-Id: Id176fb5b0aca806908cfb06f06bb5a7221ccc9c4
2016-08-06 17:50:27 +02:00
a2798cc2bf bochs: backport PCI IDE buffer-overflow fix
Upstream SVN r10244: "Fixed possible buffer overflow causing segfault
or memory corruption. The buffers are not large enough for the maximum
sector count in LBA48 mode. Now resetting buffer pointers after
processing a PRD (and move remaining data if necessary). This should
fix the SF bug items #3190970 and #3077616."

This happened to us when booting Debian 8 with a Linux 3.16 kernel
from "flat" or "volatile" disk images, in the end corrupting the VGA
card's ("theVga") internal state and segfaulting.

Change-Id: I6a80432093a547dc2eb5270845369d0918e1e49b
2016-08-06 17:49:39 +02:00
436930de71 rampage: fix integer overflow
Change-Id: I18ee65335efd0207c27da9524d74be5d5a575329
2016-08-01 16:39:42 +02:00
2aeded20be rampage: link correctly with Bochs
Change-Id: I7a0231c6b6e8983f86b94c2bfde78d2524dbfc8d
2016-08-01 16:36:17 +02:00
8a63533137 Merge branch 'hannesweisbach-fixes' 2016-07-26 18:13:53 +02:00
3fc3c6a689 bochs: backport fix for out-of-bounds memory access
Upstream SVN r11912: "Fixed some gcc 4.8.1 warnings"

Change-Id: I599eb4d6bb8d5a7a2585bcca7d9a738ac2930aac
2016-07-26 18:11:55 +02:00
feb61ced7b doxygen: cmake syntax fix
Remove superfluous closing brace in cmake file.

Change-Id: I95224f7a42007f6779a6d4950161e7208355edc6
2016-07-26 18:08:06 +02:00
6509d50ec1 compute-hops: detail fixes and optional procps dep
Cleanups, warning fix, optional procps dep, --help correction.

Change-Id: Iba719493e4a8ec37acb7336a39172b3cdefbdc99
2016-07-26 17:41:32 +02:00
b5aaddcb8f new publications using FAIL*
Change-Id: Idf4bb22712475d5a6df182bb7ad19729e81c4591
2016-07-26 17:41:32 +02:00
d3d2faf680 globally rename Fail* to FAIL*
Change-Id: Ief2cb687cc69dd92c2e04f9314f0f1347e0a84ed
2016-07-26 17:41:32 +02:00
94a56c43c8 remove deprecated stuff
Change-Id: Ifc25d216bbf782416159ceb0c366a080d2c8c428
2016-03-15 23:20:05 +01:00
69da134956 Merge branch 'wsos' 2016-03-15 23:16:42 +01:00
de8598ab83 cmake: prefer LLVM 3.4 over system-wide default
FindLLVM.cmake now starts searching for specific "llvm-config-x.y"
versions instead of using the system-wide default "llvm-config" first.
This avoids breaking builds on Debian 8, where LLVM 3.5 is the (yet
unsupported) default, but 3.4 is still installable.

Change-Id: I6fd577f515a233e30c6f803f87b9a680b5515a5b
2016-03-11 20:59:01 +01:00
449ac1a692 DatabaseExperiment: local debug helper code
Change-Id: Ibf42c93df26f6123edc867147621a011665e9c43
2016-03-11 20:59:01 +01:00
39b120f7ca GenericExperiment: record output during complete runtime
Before this change, the GenericExperiment only recorded port 0xe9 output
*after* the fault was injected.  When a fault was injected during the
workload's output loop, the output data before that point in time was
missing, and the experiment outcome was wrongly classified as SDC.

This change moves the logging activation to before the fast-forwarding
step (DatabaseExperiment::cb_before_fast_forward).  It also makes sure the
DatabaseExperiment only clears its own listeners instead of also touching
the SerialOutputLogger's one.

Change-Id: I66bda4ee318d271ddda6f7ade4e817bf9d14cf46
2016-03-11 20:59:01 +01:00
5bd7c4a9c5 GenericExperiment: limit output logger buffer
Limit the serial-output logger buffer to prevent overly large memory
consumption in case the target system ends up, e.g., in an endless loop.
The buffer is limited to (golden-run output size)+1 to be able to detect
the case when the target system makes a correct output but faultily adds
extra characters afterwards.

Change-Id: I50c082f8fb09a702d87ab83732ca3e3463c46597
2016-03-11 20:59:01 +01:00
e08deef9d5 GenericExperiment: prevent integer overflow
This change prevents an integer overflow in the memory-access listener
for WRITE_OUTERSPACE.  Instead of matching all addresses above
maxima_data, l_mem_outerspace never matched in the
generic-experiment's "--catch-write-outerspace" mode.

Change-Id: I8f4ee4515af3998b7c2a8e83c7a18306c26d8d66
2016-03-11 20:45:50 +01:00
7168566ef5 faultspaceplot: -k -- keep CSVs only optionally
Change-Id: I5900c53b81d15d5262420afbf636444af31b00f1
2016-03-11 20:44:31 +01:00
ee8759f6b8 faultspaceplot: don't round down ymin
Before this change, ymin was rounded down to the nearest Y value
divisible by 1000, showing an empty, white area in the lower part of
the plot.  With this change, the initial Y-axis zoom level is
maximized to exactly show all non-white areas.

Change-Id: I1aea52a3afc331e7f11fe76ff2c5de3c71c61c71
2016-03-11 20:41:52 +01:00
e8ca3ba6ea faultspaceplot: don't plot OK_MARKER
In the current configuration, OK_MARKER would be plotted in white
color and be indistinguishable from the background.  Not plotting
these areas at all reduces output-file size.  As a side effect, the
initial Y-axis zoom level (ymin, ymax) can change.

Change-Id: Ic7b1a22a5a6f58e4df0849bca5262c646051ae2c
2016-03-11 20:36:07 +01:00
915a344223 faultspaceplot: better distinguishable colors
Change-Id: I49517fd104394e598937ab1c8970c739e41993b7
2016-03-11 20:36:07 +01:00
ea0a5f90e2 faultspaceplot: add ticks for symbols if available
+ use helper scripts from the same dir, not from $PATH

Change-Id: I7aba773c8dbff5f8643a39fa1ed8d26867f3a86d
2016-03-11 20:36:07 +01:00
3dd7c9cb48 faultspaceplot: plot burst faults correctly
+ remove "old matplotlib" warning

Change-Id: I47dec1cc6bf6dd86216cd6d373174d4c70556f63
2016-03-11 20:36:07 +01:00
2bed7c124a data-aggregator: per-function + durations
Change-Id: I1dc7791fe9af7f848f56093e0554c61973b7a1f3
2016-03-11 20:36:07 +01:00
dd7ad77731 data-aggregator: add -t for table output
By default, the data-aggregator scripts create machine-readable,
tab-separated output.  The optional "-t" switch (passed to the
internally used `mysql' command-line client) creates human-readable
table output instead.

Change-Id: Ie448c21a4e82dea83f3e43e6642e67eb85f8b8e9
2016-03-11 19:07:40 +01:00
584ef57aab data-aggregator: allow resulttype aggregation for all benchmarks
This change additionally allows to create a resulttype/occurrences summary
over all benchmarks in the database, instead of specifying a single one.

Change-Id: I4fc7fd735300168f1e4f9e24a51aba469a7269a8
2016-03-11 19:07:40 +01:00
5851f5d848 data-aggregator: add aggregate per translation unit
Change-Id: Ibd141eccb2549dfad64e8daf35a16e3461a07f9f
2016-03-11 19:07:40 +01:00
927d6a5103 import-trace: import symbol size if available
Instead of using the address difference between two neighboring symbols as
an indication for the symbol's size, import the size as reported by
`nm -S'.

Additionally, this change fixes an off-by-one, which had the effect that
the last symbol in the list was not imported at all.

Change-Id: I3c8e139b788018702526bb968e36d248dc3fe8fc
2016-03-11 19:07:39 +01:00
cae6860e4e generic-tracing typo
Change-Id: Ie642487f3c30ec2b99d0d4ee469acb6a987e17c3
2016-03-11 19:01:30 +01:00
f171fe9286 data-aggregator
This change introduces a loose collection of scripts for
analysis/aggregation of FAIL*'s collected data.
It's going to be developed into a proper tool in the future.

Change-Id: I63f14d87dd86b62817ec3d8089079d70f58c89c9
2016-03-11 19:01:17 +01:00
806c71580f import-trace: add import of ELF symbols
This change adds the capability to import an ELF's symbols
into the database. The functionality is implemented via a
shell script and will be merged into "import-trace", when
it's being cleaned up sometime in the near future, but for
now this suffices.

Change-Id: I933783659674fcf31f5181fc13661fe10f5b9fe8
2016-03-11 19:01:17 +01:00
d46b81eb3d GenericTracing/-Experiment: add SDC detection
This change adds detection of SDCs to GenericTracing and
GenericExperiment via Bochs's I/O port E9.

Change-Id: Ie036aa97468b45cad94b6c8f73d1ef2d227547b2
2016-03-11 19:01:17 +01:00
ad558abeb6 DatabaseCampaign/-Experiment: add burst faults
This change introduces the ability to inject burst faults to
the DatabaseCampaign/-Experiment and thus to all derived
campaigns/experiments.

Change-Id: I491d021ed3953562bd7c908e9de50d448bc8ef33
2016-03-11 19:01:17 +01:00
bcf75bceee GenericExperiment: target ELF file now specifiable
Up until now only generic-tracing had the feature to directly
pass an ELF file to the experiment. generic-experiment lacked
that functionality and resorted to using the $FAIL_ELF_PATH
environment variable.
This change introduces the "--elf-file" command line argument
to generic-experiment.

Change-Id: Ie74de9e1781275ab247786856e13e412bac39224
2016-03-10 15:15:27 +01:00
52baab2d76 faultspaceplot as analysis tool
This change adds the faultspace-plotting scripts into FAIL*'s
tools/analysis/ folder and makes it CMake-configurable.

Change-Id: I9364a448a33853520629291721a6ed6d4e82eb32
2016-03-10 15:14:59 +01:00
c0420987ea doc: library-dependency update
Change-Id: Id88552e2f6117548b0c94dd2f68a08650306a535
2016-02-12 12:27:52 +01:00
2c176715ed import-trace: code comments + --help clarifications
Change-Id: I796969f2dc8c7e440c9f9bd5434cbe09834057db
2016-01-29 18:06:41 +01:00
fe5ccdf425 fixes for Debian 8 and newer AspectC++ versions
-  Debian 8 does not provide libsvga1-dev anymore, so Bochs cannot be
    built --with-svga (which is included in --with-all-libs).

 -  The latest AspectC++ nightlies should work without any
    -D__NO_MATH_INLINES -D__STRICT_ANSI__ tricks.

Change-Id: I56801a0735eb4922689dff812923d79faa94d26e
2016-01-09 17:02:51 +01:00
f114944af9 COPYING 2016 updates
Change-Id: I29b40d9d80b13c3653ea5bec8b43191e2cf41454
2016-01-09 17:01:51 +01:00
9a7e07986b publication update
Change-Id: I6a8d32fc2739dc5dba817507321bd395684860aa
2015-11-14 15:41:56 +01:00
bfcb1b415b experiments: experiment for tracing and testing ERIKA
ERIKA Enterprise is a OSEK conforming embedded RTOS. The supplied tracer
and experiment are similar to the cored-{tracing,tester} experiment, but
checks the integrity of the RTOS application in a different
manner. Stacks and stackpointers are located differently in ERIKA. This
experiment was used in RTAS'15 Hoffmann et al.

Change-Id: Idc8d874eb4d4ef15837f903270cfa521bc9514a2
2015-09-18 12:51:57 +02:00
1e572faa04 dosek: merge trace and test experiment
With the instantiate-indirect.ah method, we can choose between different
experiment flows at runtime. By this, we can combine tracing and actual
injection into one fail-client binary. A -Wf,--mode={tester,tracer}
switch does hand the control to different experiment flows.

Change-Id: Ia268489ff6bc74dffea745b7aedcb36e262e8079
2015-09-18 12:51:57 +02:00
f73008f60a cored-tester: adapt the cored tester experiment
For redoing the bench-coptermock-isorc experiment, we have to change the
timeout settings. We now use a soft timeout setting. A soft timeout is
resetted after each checkpoint event. If a hard timeout (2 seconds) is
reached although the soft timeout was resetted, we also abort the injection.

Change-Id: Ib7c2b1ad201641f47434a11d3273dde797e0012e
2015-09-18 12:51:56 +02:00
07b6275cbb plugin/checkpoint: add possibility to cache data
The checkpoint plugin is able to use dynamic values from within the
target to calculate its ranges. If the experiment injects faults within
those dynamic values, we will always get an digest error, even if it has
no influence on the outcome of the experiment or the integrity of the
data range.

Therefore, the plugin now provides a possiblity to cache those dynamic
values, before injecting them. This has to be done explicitly within the
experiment.

Change-Id: Ib2cbedd570ea9ab9c97efc152279e8eb79c573f4
2015-09-18 12:51:56 +02:00
05f557ec80 bochs-experiment-runner: make IPS configurable
The instructions per second config option influences the point in time
of IRQ events and the simulator time values.

Change-Id: Ied08ea577408d21839d100734f3cce552ee547f2
2015-09-18 12:51:56 +02:00
b6db95ffaa import-trace: objdump importer cut off long lines
Sometimes the lines in an objdump can get very long. Therefore, we limit
the size of the field, which is put into the database, to the maximal
size of the opcode, instruction, and comment column.

Change-Id: I8d7db33e8319f71e9dae14f683bba0ce1654b1f8
2015-09-18 12:51:55 +02:00
748b0aea09 MemWriteListener: Set accesstype correctly
One construction of MemWriteListener did not set the MemAccessEvent type
correctly.

Change-Id: I34a34a34c1c23b2081d4749ee5e5372461c21717
2015-09-18 12:51:55 +02:00
f7c9917f7e database-experiment: no abort on injection_instr_absolute==NULL
The injection_instr_absolute can be NULL, if the trace was imported by
--faultspace-rightmargin R. The database-experiment then aborted the
injection, since a non present injection instruction is encoded as 0,
which is != 0.

Change-Id: I0abcbf102e8b26678ea574d6f73741c2cfac6781
2015-09-18 12:51:03 +02:00
65e4409c90 generic-tracing: add --restore command-line option
This options performs a restore to the saved state of the machine immediately
after saving (default: off). This option is needed when the state is used by
other experiments that depend on the trace, which slighty differs without a
restore.

Change-Id: I4fdf4c5e03779bb9c6e0a0fa335ceae3e20608a5
2015-09-03 13:44:04 +02:00
c4437e1bd3 Merge "generic-tracing: add --serial-port and --serial-file command-line options" 2015-08-07 13:04:01 +02:00
c2b8566e35 generic-tracing: add --serial-port and --serial-file command-line options
The generic-tracing experiment now supports logging of I/O port access to file.
Therefore, the serialoutput plugin needs to be included in the experiment
configuration. Without the --serial-file option specified, logging is disabled.

Change-Id: I9e60d8ffd598ee04a50b4d92fc283f75382d478a
2015-08-07 11:43:01 +02:00
d71db9211c DatabaseExperiment: fix headers
-  Add missing iomanip header: Without this one, Fail/gem5 does not
    compile.

 -  Remove unnecessary sal/bochs header: This seems to be a relic from
    when the DatabaseExperiment was Bochs-specific.

Change-Id: I91c991795c2c2e76359e9d11415f5119d225a4ab
2015-08-06 16:33:59 +02:00
c069e87c6f gem5: adapt to changed SimulatorController iface
This quick fix is necessary to let gem5 compile again.  Instead of passing
NULL to onInterrupt(), a proper fix should pass the currently active
ConcreteCPU instance.

Change-Id: Ie4322fd98cb7b12309a21a2dd431f9bdc84efaf8
2015-08-06 16:33:19 +02:00
6ae7c6becc doc: clarify gem5 build configuration
Change-Id: I53d0931e28fa70438a3b8c3ccb289730f0485e94
2015-08-06 16:33:19 +02:00
d2f99b909f Merge changes I7de68835,I27d83526
* changes:
  GenericExperiment: Fix definition of "detected-marker"
  Gitignore: ignore vim swap files
2015-08-05 09:42:24 +02:00
1d9dae0e21 bochs: translate virtual to linear addresses
This change makes MemoryAccessListeners deliver linear addresses
instead of virtual ones deprived of their segment selector.  Even in
modern operating systems, segment selectors are still used for, e.g.,
thread-local storage.

The hooks within MemAccess.ah could maybe be implemented in a simpler
and less fragile way using the BX_INSTR_LIN_ACCESS instrumentation
hook, but this needs more investigation.

Change-Id: I0cee6271d6812d0a29b3a24f34d605a327ced7da
2015-07-31 12:46:06 +02:00
246938d4a6 l4-sys: Enable FI in all config cases
Fix the problem that injection was never enabled if func_entry == filter_entry.

Change-Id: Ifec64b6d1351e0857e568ca132cfed891f85aa62
2015-07-29 19:09:32 +02:00
32b11b35d8 publication update
Change-Id: I4070f0846ee04376e74ed39cfb37cc8b78763ddd
2015-07-23 23:41:51 +02:00
257a3fb542 ecos_kernel_test: fix using wrong filename for serial output
Change-Id: I59ed61e2e4ee7ffe1a29390dd6ff0264406c3e7b
2015-06-19 17:27:21 +02:00
442fa35c19 distribute-experiment.sh: exclude *.pb files from rsync
Change-Id: I6997dcb767fa302745a3a1c35eae2d5ad5166372
2015-06-19 17:23:53 +02:00
610e5d798d fiascoFail: grand overhaul of this experiment
* Removed all command-line options.
* Read all required information from *-traceinfo.txt file or kernel elf file.
* Record error_corrected (but only in the 'OK' case).
* Add support for multiple variants (similar to the ecos experiment).

Change-Id: I933e52881fc6bee0750d8aaef813fe2539166b06
2015-06-19 17:11:31 +02:00
eaf4e1f510 client.sh: run 'free' command in english to allow parsing its output
Change-Id: I2aa2d5733f52b4ed8abf9d619bca733fbabb5389
2015-06-16 12:30:41 +02:00
9424a2ead7 COPYING: +Hannes Weisbach
Change-Id: I6a6557e1cb2b01631bfdd0012d9608b06437f90b
2015-04-25 14:06:53 +02:00
a993fad273 cmake: search for libudis86 in non-standard dirs
Adds LIBUDIS86_PREFIX_DIR variable, to search for LIBUDIS86 in the
specified prefix. This makes it easier/possible to have libudis86 in
non-standard locations, for example when you don't have root.

Change-Id: Idaf86c9e03b2d4c35f60c3dc3b6da0d8efe97795
2015-04-25 14:01:49 +02:00
614531ed67 cmake: properly search for ag++ with find_program
Change-Id: I45d6241e169147e120ae1cf6d4fc870f9969fe99
2015-04-25 14:01:49 +02:00
ce41b30fb1 GenericExperiment: Fix definition of "detected-marker"
Due to a bug (most likely a copy and paste issue), the detected-marker
group was defined to point to the "FAIL_marker"-set, which would be
redundant. This commit will correctly map it to the "DETECTED_marker"
group.

Change-Id: I7de688357006ced1adf2423e213ae6633629cb81
2015-04-20 23:33:17 +02:00
f24f9f2107 cored-tester: add color_assert listener only if existsing
The color_assert_port symbol does not exist in all dOSEK variant,
therefore we add the listener only if the symbol exists. Otherwise the
invalid handler will trigger on INV_ADDR

Change-Id: I7b81940a8413850527efb9e4bae86248794c622c
2015-04-17 09:22:37 +02:00
6991499e43 Gitignore: ignore vim swap files
As a convenience, add vim's generated swap files (*.swp) to the
.gitignore file.

Change-Id: I27d83526565186f009f3feb6e27a1b7f7ba87a63
2015-04-16 21:07:17 +02:00
d38218f0eb DatabaseExperiment: remove Bochs dependency
Use the newly introduced SimulatorController::getCPUCount() instead of
BX_SMP_PROCESSORS to figure out the number of CPUs the back end provides.

Change-Id: I6d6521ae508154366ab5d0c23ddcb6f2de99aa04
2015-04-10 16:44:41 +02:00
ae15ac704d add missing headers
This change adds some missing headers needed for compiling the
PandaBoard variant, which seems to not have seen a compiler for a
while.

Change-Id: Ifb54abb4dc676fafc29ecbae97bafaa547fcfc80
2015-04-10 16:43:13 +02:00
96fae94b1f DatabaseExperiment: fix wrong variable scope
This fixes a wrong variable scope introduced in commit 193e5b7,
breaking compilation.

Change-Id: I74194e9ea6e726bc0a7ce2ee5ad5439b7de87fba
2015-04-10 15:07:45 +02:00
374011986c Merge branch 'save-restore-behavior' 2015-04-08 17:45:40 +02:00
b02831adc5 Merge branch 'authors-update' 2015-04-08 17:42:51 +02:00
e59918b6df more papers using Fail*
Change-Id: I9737c3304dfa5e265786cd2bab5d59ab282fc25a
2015-04-01 13:59:17 +02:00
193e5b757e adapt experiments to new restore() behavior
This change adapts several experiments, including the
DatabaseExperiment framework, to the restore() behavior update from
the previous change.  Existing traces should continue to be usable.

This is not tested yet, mainly because I don't have access to most of
the experiment targets / guest systems necessary for testing.  Please
test your own experiments if possible, or at least leave me a note
that you couldn't test it!

Especially the cored-voter/experiment.cc update may be broken, but
maybe the "FISHY" +2 in there was not OK in the first place.

Change-Id: I0c5daeabc8fe6ce0c3ce3e7e13d02195f41340ad
2015-03-18 18:22:21 +01:00
91a9c6f688 core/sal: restore() more reliable for bochs
BochsController::restore() now recreates a state more expectable from
the experiment.  The state is now the same that save() leaves behind
in its most prominent use case after hitting a breakpoint.  This
change breaks backwards compatibility with some experiments, see
below!

Right after a breakpoint on a specific address fired and
BochsController::save() was called, another breakpoint on that
specific address would not fire again (unless that instruction is
executed again later on).

Up to this change, the situation after calling
BochsController::restore() was different:  A breakpoint on that
specific address would fire twice.  This difference led to the problem
that running the tracing plugin after save() would work fine
(recording the current instruction once, since 3dc752c "tracing: fix
loss of first dynamic instruction"), but running it after restore()
would record the current instruction *twice*.

This change aligns restore()'s behavior to that of save().  The
implications for existing experiments, traces and results are:

 -  Existing result data should be not affected at all, as
    trace.time1/time2 were correct before this change.  Nevertheless,
    the assumption time2-time1 >= instr2-instr1 does not hold for
    equivalence classes including the first instruction, if the latter
    was faultily recorded twice (see below).

 -  Existing traces that were recorded after a restore() (with a
    tracing plugin including the aforementioned commit 3dc752c)
    contain the first instruction twice.  An affected trace can be
    corrected with this command line:

      dump-trace old.tc | tail -n +2 | convert-trace -f dump -t new.tc

 -  For experiments that record traces after a restore() (such as
    ecos_kernel_test), nothing changes, as both the tracing and the
    fast-forwarding before the fault injection now see one instruction
    event less.

 -  Experiments that record traces after a save(), especially those
    that rely on the generic-tracing experiment for tracing, now see
    one instruction event less, before they need to inject their
    fault.  These experiments need to be adjusted, for example
    dciao-kernelstructs now should use bp.setCounter(injection_instr)
    instead of bp.setCounter(injection_instr+1).

Change-Id: I913bed9f1cad91ed3025f610024d62cfc2b9b11b
2015-03-06 08:38:40 +01:00
bd5802e5d7 core/sal: allow repeating BochsController::save
BochsController::save() now can in principle be called multiple times
in a row.  Not that this would really make sense, but the results are
consistent now.

Change-Id: Ib4c6eb571a364b0f7ea6142c8cfec004a12f98b3
2015-03-06 08:38:40 +01:00
d2899e8db7 core/sal: silence "unused function" warning
BochsHelpers.hpp is included by some aspect headers, which are implicitly
included into many (all?) translation units.  As in most TUs the "static
inline" defined getCPU function is not used, every time a "unused function"
warning was generated.

Change-Id: Ibb903fe7a11aaf1f455a626c8bf8b86f50857645
2015-02-09 11:02:40 +01:00
8973f65a50 util: don't leak resources from SumTree
This fixes the resource-leaking "should never happen" case when no
element is found by returning a notfound member.  Found by Coverity
Scan, CID 25555.

Change-Id: I9055ae0a3b31e61f3a8e3b098ec5613c3b5535f6
2015-02-07 18:20:40 +01:00
0fce4f435c tracing: fix "IP only" tracing
Only tracing the instruction pointer was broken, memory accesses were
always traced additionally.  Found by Coverity Scan, CID 25495.

Change-Id: Ideb66175865c85bcd48f4b3786d5d8f16810d4f1
2015-02-07 18:20:39 +01:00
48423054b0 prune-trace: check 2nd cmd.parse() return value
As the first cmd.parse() call was already checked before, parsing a
second time should never fail.  Nevertheless, we can look at the
return value without much effort.  Found by Coverity Scan, CID 25494.

Change-Id: Id012cf7183fe7b2022d33e6cbcb19ba49b544c99
2015-02-07 18:20:39 +01:00
6a0214b132 ProtoStream: member variable -> local var
The contained state is not used over function boundaries anyways.
Found by Coverity Scan, CID 25689.

Change-Id: I34e42c227710be4859f6d62de9311c4201ed29b0
2015-02-07 18:20:39 +01:00
e99e4aafa8 JobServer: initialize sockaddr_in
This most probably is not a real problem, but does not take much work
to fix.  Found by Coverity Scan, in several reports.

Change-Id: I8bd12e3f7afeb4b1c4e1b057bdbd95da9aa9211c
2015-02-07 18:20:39 +01:00
8c2b6cf028 JobServer: fix socket leaks
Found by Coverity Scan, CID 25600.

Change-Id: Ic0c549928ce8058c145d178ed06b41b543676460
2015-02-07 18:20:30 +01:00
b01a5e80fd import-trace: initialize all members
This was never a real problem, but keeps us on the safe side.  Found
by Coverity Scan, CID 25731/25808/25817.

Change-Id: Ie4bd9fb52ff6140ce7ae024738b43c82f6f5045c
2015-02-07 17:29:53 +01:00
41a191eeaa import-trace: fix SQL value list termination
This fixes the (never intendedly occurring) case that no comma is
found in the SQL value list, and aligns the termination code with the
comment next to it.  Found by Coverity Scan, CID 25653.

Change-Id: I98062748458a50603cd63a9017acd94eef0753f9
2015-02-07 17:29:52 +01:00
8e5cd0d632 import-trace: check 2nd cmd.parse() return value
As the first cmd.parse() call was already checked before, parsing a
second time should never fail.  Nevertheless, we can look at the
return value without much effort.  Found by Coverity Scan, CID 25509.

Change-Id: I58466f5d123da2b541a6a88b72bafa1f754a581e
2015-02-07 17:29:50 +01:00
2c6aa6cd37 ElfReader: fix conditional free
buff cannot be zero.  Found by Coverity Scan, CID 25712.

Change-Id: Ibb411be376aab13832e3e5593fe001df1cbfc051
2015-02-07 17:29:48 +01:00
975d4de90d ecos: detect potential ftell failure
ftell() potentially fails and returns -1.  Found by Coverity Scan,
CID 25546.

Change-Id: Ifcf6fa8593cb1f3f54dbbff27ac021d46468a40c
2015-02-07 17:29:46 +01:00
a19eb6db74 DwarfReader: fix premature fd close
When Richard decided we need not yet give up when dwarf_srclines()
fails, he left a -- now premature -- close(fd) behind.  Found by
Coverity Scan, CID 25806.

Change-Id: I0bc0cb6796225c9efaf5290e2799b6814f88e5b4
2015-02-07 17:29:44 +01:00
0e305034e9 Disassembler: restore ostream state after changing it
Found by Coverity Scan, CID 25679.

Change-Id: Ia0c175cd79ddc42ab9154c667db0d647618e41e2
2015-02-07 17:29:42 +01:00
141cefbaf4 DatabaseProtobufAdapter: remove unused struct field
Found by Coverity Scan, CID 25685.

Change-Id: Id7c9d756a7f824af41d1315740f7415f021eaa91
2015-02-07 17:29:41 +01:00
c499292e2f DatabaseProtobufAdapter: init top-level type bridge
Found by Coverity Scan, CID 25724.

Change-Id: I30ab9251bd0b6c60a64075a5cf934f40874a7c6c
2015-02-07 17:29:40 +01:00
26076d070c DatabaseProtobufAdapter: fix uninitialized members
Found by Coverity Scan, CID 25694.

Change-Id: I8fbb1434b73dcecb16675da870e73f1ad39391e4
2015-02-07 17:29:38 +01:00
0047919644 Database: fix tmp array deletion
Found by Coverity Scan, CID 25544.

Change-Id: Iaf0866ebd4a458fabfe79336d8c8b639e42147c5
2015-02-07 17:29:37 +01:00
cf6b481d5e DatabaseExperiment: fix uninitialized variable
Found by Coverity Scan, CID 25741.

Change-Id: I6105fe76afbfe0a6ec76b59778214683d7d754e2
2015-02-07 17:29:35 +01:00
a7184af37b core/sal: uninitialized BochsController member
False positive, nevertheless worth fixing.  Found by Coverity Scan,
CID 25723.

Change-Id: Ia4f1eb033d7cc8c20889280a59d8973ecf768933
2015-02-07 17:29:34 +01:00
61038c2578 core/sal: fix CPUState bracing error
This is why our coding style suggests braces even for single-line "if"
or loop bodies.  Found by Coverity Scan, CID 25767.

Change-Id: I53062286accba7c0fc9795ecea0a5e2795443321
2015-02-07 17:29:32 +01:00
fe9e25374a CampaignManager: initialize campaign member
Found by Coverity Scan, CID 25798.

Change-Id: Ib310ca3198c78a8e01d044d90ada1cd0c22b26d6
2015-02-07 17:29:29 +01:00
bae03bc929 cmake: build with -D__NO_MATH_INLINES
To use the new clang-based AspectC++ (ac++ >1.2), Fail* must be built
with -D__NO_MATH_INLINES (or --c_compiler clang++).

Change-Id: I020d62891946d09ac456b8df914b669ab33ab0e2
2015-02-05 17:25:09 +01:00
6995dffca8 prune-trace: --no-weighting for SamplingPruner
Analogous to the FESamplingPruner, the --no-weighting switch disables the
equivalence-class weighting by using a weight of one instead of the
equivalence-class size.  This is usually not a good idea, and should only
be used for demonstration purposes, or if the fault model requires
weight-less sampling.

The --no-weighting switch was introduced with an earlier commit, but
did not have an effect until now.

Change-Id: If2ebf775bea7f2e3f8c293abbae08f1eb00cacf1
2015-02-02 13:50:59 +01:00
1dcd4fbeb2 fail-cleanup-db.sh: cleanup "symbol" table as well
(The "symbol" is currently only created by some inofficial scripts,
but may become part of the Fail* core at some point.)

Change-Id: If0b3e6cdd6b6ca865abb67382de128e7a27f19ab
2015-01-30 13:28:33 +01:00
b8c03bca8d fail-env: assign -> use default values
In bash, ${parameter:=word} assigns the default value.  In our case,
${parameter:-word} (the whole expression has a default value, but it's
not assigned) suffices.

Change-Id: I5f4105b973892aa13943d660cbebaed76fd43752
2015-01-29 16:43:22 +01:00
add9b80a1a copyright update for 2015
Change-Id: I001d03c09fe13ef5b5783620bfa3fd160b9c475c
2015-01-23 15:30:56 +01:00
412ecbba63 dbcampaign: skip existing pilots with wrong fspmethod
Loading existing pilots with a different fspmethod_id is a waste of
time.

Change-Id: I3519a14822029999fa2ed854daff9853c0cbeec1
2015-01-21 14:53:33 +01:00
d58694521c dbcampaign: don't include fspmethod/variant ID in job msg
These IDs don't make sense by themselves but only after a lookup in the
database, which clients usually don't have (and don't need) access to.

Conflicts:
	src/core/comm/DatabaseCampaignMessage.proto.in

Change-Id: Ice739463552039b7fb48581722ea2e05984cea47
2015-01-21 14:53:32 +01:00
c422911741 dbcampaign: allow wildcard for prune method
Using mixed pruning methods now does not require to run the campaign
server twice anymore.

Change-Id: I3f62c269166b750892bb0e659ad0c180425d1479
2015-01-21 14:53:32 +01:00
336ffd6453 Merge branch 'sampling'
Change-Id: Id6be7954b0bafcbfd64ba702e69e016bd2810115
2015-01-21 14:53:28 +01:00
39df0a979e Merge branch 'listener-perf-bug'
Change-Id: Ia863115ec31011ad2b7a954543c8ee64188d3d32
2015-01-21 14:52:33 +01:00
4cbcf30b7c prune-trace: incremental mode for SamplingPruner
The --incremental switch allows to add more samples if the resulting
confidence intervals are not satisfactory yet.

Change-Id: I65dc99522f45f8a4eaf4ce68e832f7636585381d
2015-01-21 00:22:36 +01:00
79211fd31d prune-trace: add SamplingPruner
The SamplingPruner implements "normal" sampling with equivalence-class
reuse.  Unlike the FESamplingPruner, the SamplingPruner implements
uniform fault-space sampling that counts multiple hits of an
equivalence class.

This change modifies the database schema, more specifically it adds
the "weight" column to the fspgroup table.  Update existing databases
with this query:

  ALTER TABLE fspgroup ADD COLUMN weight INT UNSIGNED;

Change-Id: I668fc9b25fc4d79a60aa1ef8d69cdf5fa076cc6d
2015-01-21 00:22:36 +01:00
99a923b11e Merge remote-tracking branch 'origin/master' into sampling-wip
Change-Id: Iae5c02be5801d75e8adc55222ccb35c559f7ebf4
2015-01-21 00:22:28 +01:00
f8e0f1bb3f util: add SumTree::iterator
Change-Id: I8304b64634fa3ab92a126fe5d942674b26334b3d
2015-01-21 00:17:48 +01:00
2f70e05db6 util: rename SumTree::get -> remove, add r/o get
SumTree::get now non-intrusively picks an element and returns a
reference to it, SumTree::remove removes and returns a copy.  The
former is needed for sampling with replacement.

Change-Id: Iefef2fdf0b7df6ea7a9949f2588528ec9e86bb7a
2015-01-21 00:17:48 +01:00
b0c58bab78 util: SumTree::add() documentation
This function copies the reference argument 'element' internally.

Change-Id: I33d94f224bc2b1b89057b90258d500eaa364ab85
2015-01-21 00:17:48 +01:00
f23860c139 prune-trace: use uint64_t for pilot counts
This enables using very large data sets in the FESamplingPruner.

Change-Id: Ibf097ed8cec24c85a74e83a78d79aa07893cfa8c
2015-01-21 00:17:48 +01:00
ed18399ff6 prune-trace: remove invalid assertion
This assertion in the FESamplingPruner is invalid if the import took
place without "write" ECs.

Change-Id: I7d1bbcf1572573e2ac97e9be1191fbf9fe61f755
2015-01-21 00:17:48 +01:00
57e4541190 prune-trace: do not sort ECs for sampling
Sorting is too costly for large data sets, and not worth the
sampling-process speedup.

Change-Id: I622ff3ed9b352fc5c7586f9733d830be727b6a11
2015-01-21 00:17:48 +01:00
b2b53380f4 prune-trace: add switch to disable sample weighting
In the sampling step, the --no-weighting switch disables the
equivalence-class weighting by using a weight of one instead of the
equivalence-class size.  This is usually not a good idea, and should
only be used for demonstration purposes, or if the fault model
requires weight-less sampling.

Change-Id: Id903d1924c6ecbcd217815aa5ce9271560130071
2015-01-21 00:14:45 +01:00
a1e3b31cd5 prune-trace: sample from known results
The --use-known-results switch simulates sampling (with fault
expansion, FESamplingPruner) by reusing results from a previous
campaign covering the full fault space (that used the "basic" pruner).
The pruner only creates entries in the "fspgroup" table that refer to
already existing pilots and corresponding results.

This switch is not for normal Fail* use, but only for experimenting
with the FESamplingPruner.

Change-Id: I1bf561d93f55918d243c5306551a1c6b48027198
2015-01-21 00:09:37 +01:00
d9028e9d70 CMake: Fail* version number handling fixed
The project version number is now not user-editable anymore, and
custom values get overwritten by force.  Without this change,
CMakeCache.txt stays at the version number it was first instantiated
from.

Change-Id: If9ad1549937dad98db9a0f0eda16ef752e7d74aa
2015-01-14 10:27:20 +01:00
fd6bd279ad Merge "util/DwarfReader: plug file-descriptor leaks" 2015-01-14 10:27:01 +01:00
a00c4d9a69 util/DwarfReader: plug file-descriptor leaks
This change fixes several file-descriptor leaks in the DwarfReader
implementation.  The patch is taken from Richard Hellwig's not yet
merged change I161f626d12ca7f2b7b9d13ba9cbc254eb55692f1.  I did not
apply any white-space cleanups to prevent conflicts when Richard's
change will be merged later.

Change-Id: Icd9c1bdeeab39e77900e2ce88b756a8cf7ade96a
2015-01-14 10:15:29 +01:00
d68ea990ca sal: catch listener removal corner case
This change makes sure an active but not-yet fired listener does not fire
anymore if it gets removed.  In this case, the listener already has an
invalid index, but still needs to be copied to the delete list.

This issue has not been observed in the wild, and is unlikely to have
caused real problems in the past.

Change-Id: I8be8a5b1d4cdc783a092b93f34f33b969894e5da
2015-01-13 19:22:49 +01:00
c4d44aeb0c sal: fix watch/breakpoint perf implementation
This commit changes the entities in a ResultSet from listener indexes
(into ListenerManagers m_BufferList) to BaseListener pointers, as
ListenerManager::makeActive(BaseListener*) (called from
FastBreakpoints/Watchpoints.ah) may invalidate indexes temporarily
stored in a ResultSet.  The issue occurs when multiple breakpoints
(watchpoints) fire at the same time, and one added more recently than
the others occupies the largest index position in m_BufferList.

Although this issue is extremely rare and was only observed in a few
corner cases up to now, it may have falsified results in the past.

Change-Id: I7b788a06d412f15700ca75f56f2be5d3b78465fa
2015-01-13 19:22:49 +01:00
32e8a679b5 CMake: Fail* version number handling fixed
The project version number is now not user-editable anymore, and
custom values get overwritten by force.  Without this change,
CMakeCache.txt stays at the version number it was first instantiated
from.

Change-Id: If9ad1549937dad98db9a0f0eda16ef752e7d74aa
2015-01-13 14:48:22 +01:00
722715c01f fail-cleanup-db.sh: cleanup unused DB entries
This script removes dangling rows from the database, for example
'trace' entries with a variant_id not mentioned in the 'variants'
table, or result rows referencing a nonexistent 'fsppilot' entry.
IOW, this script enforces referential integrity as it would be
maintained by foreign key constraints (that can only be used with
InnoDB tables).

Change-Id: I4dce1e46277d470f8c3eca31447ca71f63c6353f
2015-01-12 16:45:38 +01:00
80da913264 README: publications update
Change-Id: I4794dbba1e1fc28398bd040a5ffbc4ff821e5a6c
2015-01-11 18:47:37 +01:00
88dff29415 Merge branch 'visualfail' 2015-01-10 00:49:52 +01:00
62c3cc7f20 visualfail: README, pristine configuration
Change-Id: Ic7e3ec0e28fdd368b9207c7a843a3f397e5e3c09
2015-01-09 15:00:03 +01:00
f0a4dacd87 visualfail: remove common path prefix from file names
Change-Id: I5806f0e4ca3ebe4e9aae3423e04d8ffb36fff2a6
2015-01-09 15:00:03 +01:00
be6e4e687c visualfail: indentation fixes
Change-Id: Icac5dcf43ae28fa877a7127495066f4d48186b7e
2015-01-09 15:00:02 +01:00
4d070c6362 visualfail: collapse repeating instructions
Change-Id: I7d3bbb9eb79b502acabeeeab9886bf20177e68c6
2015-01-08 16:24:53 +01:00
957f9c9357 visualfail: high-level code mapping fixes and cleanups
Now high-level to low-level code mapping seems to be right for the first
time.

Change-Id: I3c6a7cfdf3f3e4da32420a74280ae4ae042acc09
2015-01-08 15:06:58 +01:00
d536cc72aa visualfail: less duplicate HTML IDs
... and a lot less unneeded IDs, reducing the amount of data to be
transferred to the client.

Change-Id: I071920fd4d8039d2f3d1f5d8c41c2c3ddd639617
2015-01-08 15:06:58 +01:00
874e5881b7 visualfail: disable JS debugging output
Change-Id: I8154aa182189ce88716d157aa41cbe2680f0eab8
2015-01-08 15:06:58 +01:00
2ae7e87abc visualfail: HTML output cleanups
Change-Id: Ibe966e8ece80f0f40f2f109d78a59f4ebe0121a6
2015-01-08 15:06:58 +01:00
38641ff34b visualfail: silence redundant notice
Change-Id: Ib6a71474727fd64d4057db026eb0e90e603947a0
2015-01-08 15:06:58 +01:00
aebe801dbf visualfail: query parameter name consistency
Consistently use 'variant_id' instead of 'variant'.

Change-Id: I93f054634698855687e3ba07b83173c8370297fd
2015-01-08 15:06:58 +01:00
c2b4a4fa8a visualfail: English interface
Change-Id: I4ebe88ce8621bcef30d84065b8e6525239283863
2015-01-08 15:06:58 +01:00
b5c261d762 visualfail: comments, whitespace fixes
Change-Id: I8821b43d7402e19c59810692ed7877bca4cec6f5
2015-01-08 15:06:58 +01:00
7c51ca0a63 visualfail: fix color coding
Change-Id: If76d8e9f7a22523868ea6977db5c0f58a0576224
2015-01-06 17:11:29 +01:00
2d2e477ddc visualfail: fix output formatting
This change fixes occasional redundant newlines in interspersed
ASM/highlevel code.

Change-Id: Ibe3a93d67bc017ce44c832c4948f3817d8f7e695
2015-01-06 17:11:29 +01:00
9df01a4a48 visualfail: off-by-one in getHighlevelCode()
This one omitted mappings to the first static instruction belonging to a
high-level source-code line.

Change-Id: I14427021e61f27a8b029fb56fad2ba813652422a
2015-01-06 17:11:29 +01:00
1faa885cb4 visualfail: speedup of two MySQL queries
Change-Id: Ibc4339cfe31a7d9f2a632a7e08278f8aca554a73
2015-01-06 17:11:29 +01:00
63670e7bce visualfail: off-by-one in resultsDB()
This one was responsible for a lot of notices in the terminal.

Change-Id: I097705af15d771d0dcb5a217445fec3db89fd132
2015-01-06 16:38:47 +01:00
42773e2be5 visualfail: speedup by using the ".=" operator
Using "$x .= $y" instead of "$x = $x . $y" is actually an extreme
speedup for long $x.  I had no idea PHP's "compiler" was that bad and
doesn't optimize this.

Change-Id: I39aec5f14f45b75a2467d8074b5ea2ffe5d4b856
2015-01-06 16:37:21 +01:00
fc8ad04db2 visualfail: increase default runtime limit to 10m
Change-Id: I9bdebb2ad0e4fd6cf0d5e72e2e0520ad3cf6b258
2015-01-06 16:37:15 +01:00
4575da411a visualfail: quote string array indexes
Change-Id: I943c931f256986b4c14e00ee278976d369c71765
2015-01-06 16:37:07 +01:00
9a34d7a78a visualfail: comment out checks for unneeded tables
The dbg_methods, dbg_variables and dbg_stacktrace tables are not
needed by the current VisualFAIL implementation.

Change-Id: I5f685c7d8100fe57fb2a23e1f8161770e64c9464
2015-01-06 16:37:01 +01:00
0ed1a4e306 visualfail: don't close MySQL connection too early
Luckily this didn't work as advertised, as the global connection
variable wasn't imported into the functions' scopes.

Change-Id: I080a32c6418deb3da3578987ec8a181b047608ad
2015-01-06 16:36:56 +01:00
1d81e2b519 visualfail: adminer should not be in the Fail* tree
Change-Id: Ib7f07306e297f8891666b54916e8076c0c9261ee
2015-01-06 16:36:50 +01:00
5bef0d4182 visualfail: whitespace cleanups
Change-Id: Ia773bf516ce1bab4adcd80e31678bda278cd8c11
2015-01-06 16:36:46 +01:00
ca99aee02b visualfail: removed trailing whitespace
Change-Id: I47725e1e4ca858109ffb0c3f7c599b67a48c0761
2015-01-06 16:36:38 +01:00
1d66db3625 visualfail: UNIX line endings
Change-Id: I5d26ec25d070e98b977ff3130c597a388a4c2c96
2015-01-06 16:36:20 +01:00
a3a77141f3 ezs-logger: Added missing dependency
There was a missing depenency to fail-util.

Change-Id: I32ea7f184affa6f95ea28d7254699872fd501a22
2014-12-16 16:36:37 +01:00
e83e87ecc7 DwarfReader: fixed linetable mapping
This change alters/corrects DwarfReader's way of determining the size of
linetable entries (i.e. their "range size"); the interface (e.g. to
ElfReader) stays the same. Prior to this, it was assumed that static
instructions within "the linetable" were sorted in ascending order. This
assumption turned out to be false, as every compilation unit's  header has
its own linetable and the compilation unit headers are not sorted by their
static instructions.
Furthermore this change implements normalization of file names.

Change-Id: Ia4beb7bf9cfb6f1a499aeebd01228335b70ab52d
2014-12-03 19:29:12 +01:00
ea4c350bcc VisualFAIL beta ;)
Change-Id: Ia40fe09cdf520926d00b9c39c983c925099501bc
2014-04-07 12:22:33 +02:00
431 changed files with 220383 additions and 7349 deletions

26
.editorconfig Normal file
View File

@ -0,0 +1,26 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
[{**/*.cc,**/*.hpp,**/*.ah,**/*.ah.in,**/*.proto}]
indent_style = tab
indent_size = 4
[*.py]
indent_style = space
indent_size = 4
[Makefile]
indent_style = tab
[CMakeLists.txt]
indent_style = tab
indent_size = 4

4
.gitignore vendored
View File

@ -8,6 +8,7 @@
*.pb.cc
*.gcda
*.pyc
*.swp
*~
Makefile
build
@ -53,3 +54,6 @@ debuggers/openocd/src/startup.tcl
debuggers/openocd/src/startup_tcl.c
debuggers/openocd/src/target/xscale_debug.h
debuggers/openocd/stamp-h1
.idea
0 prebuilt

View File

@ -5,12 +5,18 @@ if("${CMAKE_VERSION}" VERSION_GREATER 2.8.3)
# (makes cmake 2.8.4 and newer)
cmake_policy(SET CMP0017 NEW)
endif("${CMAKE_VERSION}" VERSION_GREATER 2.8.3)
if(NOT ("${CMAKE_VERSION}" VERSION_LESS 3.0)) # >= 3.0?
# overwrite PROJECT_VERSION when calling PROJECT()
cmake_policy(SET CMP0048 NEW)
PROJECT(FAIL* VERSION 1.0.1)
else()
PROJECT(FAIL*)
set(PROJECT_VERSION "1.0.1" CACHE INTERNAL "FAIL* version number" FORCE)
endif()
ENABLE_TESTING()
PROJECT(Fail*)
set(PROJECT_VERSION "1.0.1" CACHE STRING "Fail* version number")
#### Put all resulting library files in <your_build_dir>/lib ####
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
@ -31,6 +37,7 @@ ENDIF (EXECUTABLE_OUTPUT_PATH)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
#### Compiler configuration, see cmake/compilerconfig.cmake
include(BuildType)
include(compilerconfig)
include(doxygen)
@ -45,7 +52,7 @@ OPTION( BUILD_X86 "Build for x86 guests?" ON)
OPTION( BUILD_ARM "Build for ARM guests?" OFF)
# FIXME: only add simulators/ to include_directories, and include, e.g.,
# bochs/bochs.h in Fail*. -> avoids naming conflicts (e.g., /usr/include/elf.h
# bochs/bochs.h in FAIL*. -> avoids naming conflicts (e.g., /usr/include/elf.h
# vs. qemu/elf.h)
if(BUILD_BOCHS)
## add necessary additional header search paths.
@ -64,7 +71,7 @@ elseif(BUILD_PANDA)
include_directories(debuggers/openocd/src debuggers/openocd/jimtcl src/core)
endif(BUILD_BOCHS)
## Tell the linker where to find the Fail* libraries
## Tell the linker where to find the FAIL* libraries
link_directories("${LIBRARY_OUTPUT_PATH}")
# Add "simulators"-directory to the include path. This allows

11
COPYING
View File

@ -1,18 +1,19 @@
FAIL* - FAult Injection Leveraged
Copyright (c) 2011-2014 Horst Schirmeier <horst.schirmeier@tu-dortmund.de>
Copyright (c) 2011-2016 Horst Schirmeier <horst.schirmeier@tu-dortmund.de>
Copyright (c) 2011-2013 Adrian Böckenkamp <adrian.boeckenkamp@tu-dortmund.de>
Copyright (c) 2011-2014 Richard Hellwig <richard.hellwig@tu-dortmund.de>
Copyright (c) 2011-2014 Martin Hoffmann <hoffmann@cs.fau.de>
Copyright (c) 2011-2015 Martin Hoffmann <hoffmann@cs.fau.de>
Copyright (c) 2012-2013 Martin Unzner <martin.unzner@googlemail.com>
Copyright (c) 2013-2014 Christian Dietrich <stettberger@dokucode.de>
Copyright (c) 2013-2016 Christian Dietrich <stettberger@dokucode.de>
Copyright (c) 2013-2014 Lars Rademacher <lars.rademacher@udo.edu>
Copyright (c) 2012-2014 Christoph Borchert <christoph.borchert@tu-dortmund.de>
Copyright (c) 2012-2016 Christoph Borchert <christoph.borchert@tu-dortmund.de>
Copyright (c) 2013-2014 Björn Döbel <bjoern.doebel@gmail.com>
Copyright (c) 2012-2013 Tobias Friemel <tobias.friemel@tu-dortmund.de>
Copyright (c) 2013-2014 Michael Lenz <michael.lenz@udo.edu>
Copyright (c) 2013-2016 Michael Lenz <michael.lenz@udo.edu>
Copyright (c) 2013-2014 Florian Lukas <florian.lukas@gmail.com>
Copyright (c) 2012 Robby Zippel <robby.zippel@informatik.stud.uni-erlangen.de>
Copyright (c) 2015 Hannes Weisbach <hannes.weisbach@tu-dresden.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

128
README.md
View File

@ -1,3 +1,5 @@
Forked from [https://github.com/danceos/fail](https://github.com/danceos/fail).
FAIL* - FAult Injection Leveraged
=======================================
@ -41,6 +43,9 @@ be manipulated.
Building FAIL*
--------------
**Note:** The Docker images are currently out of date; at the moment, FAIL*
needs to be built and installed manually.
Since FAIL* is a complex research project with many dependencies,
which are listed in `doc/how-to-build.txt`, we provide several
[Docker.io](http://www.docker.com) images that contain all
@ -111,7 +116,7 @@ docker instance.
Mailing list
------------
The Fail* developers, and some of its previous and current users, can be
The FAIL* developers, and some of its previous and current users, can be
contacted on the
[fail@lists.cs.tu-dortmund.de](mailto:fail@lists.cs.tu-dortmund.de)
mailing list
@ -119,6 +124,19 @@ mailing list
Publications about FAIL*
------------------------
Please cite the EDCC paper if you want to refer to FAIL*:
- H. Schirmeier, M. Hoffmann, C. Dietrich, M. Lenz, D. Lohmann, and O.
Spinczyk. FAIL*: An open and versatile fault-injection framework for the
assessment of software-implemented hardware fault tolerance. In Proceedings
of the 11th European Dependable Computing Conference (EDCC '15), pages
245255. IEEE Computer Society Press, Sept. 2015.
[PDF](https://ess.cs.uos.de/danceos/publications/EDCC-2015-Schirmeier.pdf)
- H. Schirmeier. Efficient Fault-Injection-based Assessment of
Software-Implemented Hardware Fault Tolerance. Dissertation, Technische
Universität Dortmund, July 2016.
[PDF](https://eldorado.tu-dortmund.de/bitstream/2003/35175/1/Dissertation.pdf)
- H. Schirmeier, M. Hoffmann, R. Kapitza, D. Lohmann, and
O. Spinczyk. FAIL*: Towards a versatile fault-injection experiment
@ -127,14 +145,66 @@ Publications about FAIL*
(ARCS '12), Workshop Proceedings, volume 200 of Lecture Notes in
Informatics, pages 201210. German Society of Informatics,
Mar. 2012.
[PDF](http://danceos.org/publications/VERFE-2012-Schirmeier.pdf)
[PDF](https://ess.cs.uos.de/danceos/publications/VERFE-2012-Schirmeier.pdf)
Selected publications using FAIL*
---------------------------------
- M. Hoffmann, P. Ulbrich, C. Dietrich, H. Schirmeier, D. Lohmann, and
W. Schröder-Preikschat. Experiences with software-based soft-error
mitigation using AN-codes. Software Quality Journal, 2015. (accepted).
- O. Pusz, D. Kiechle, C. Dietrich, D. Lohmann. Program-StructureGuided
Approximation of Large Fault Spaces. In Proceedings of the 24th IEEE Pacific
Rim International Symposium on Dependable Computing (PRDC '19). IEEE Computer
Society Press, Dec. 2019.
- C. Borchert. Aspect-Oriented Technology for Dependable Operating Systems.
Dissertation, Technische Universität Dortmund, May 2017.
- C. Borchert, H. Schirmeier, and O. Spinczyk. Generic soft-error detection and
correction for concurrent data structures. IEEE Transactions on Dependable
and Secure Computing, 14(1):2236, Jan. 2017.
- C. Dietrich, M. Hoffmann, and D. Lohmann. Global optimization of
fixed-priority real-time systems by RTOS-aware control-flow analysis. ACM
Transactions on Embedded Computing Systems (TECS), 16(2):125, Jan. 2017.
- H. Schirmeier. Efficient Fault-Injection-based Assessment of
Software-Implemented Hardware Fault Tolerance. Dissertation, Technische
Universität Dortmund, July 2016.
- M. Hoffmann. Konstruktive Zuverlässigkeit Eine Methodik für zuverlässige
Systemsoftware auf unzuverlässiger Hardware. Dissertation,
Friedrich-Alexander-Universität Erlangen-Nürnberg, Apr. 2016.
- C. Borchert and O. Spinczyk. Hardening an L4 microkernel against soft errors
by aspect-oriented programming and whole-program analysis. In Proceedings of
the 8th Workshop on Programming Languages and Operating Systems (PLOS '15),
pages 17, New York, NY, USA, Oct. 2015. ACM Press.
- T. Stumpf. How to Protect the Protector? In Proceedings of the 45th Annual
IEEE/IFIP International Conference on Dependable Systems and Networks (DSN '15),
Student Forum. IEEE Computer Society Press, June 2015.
- C. Dietrich, M. Hoffmann, and D. Lohmann. Cross-kernel control-flow-graph
analysis for event-driven real-time systems. In Proceedings of the 2015 ACM
SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded
Systems (LCTES '15), New York, NY, USA, June 2015. ACM Press.
- H. Schirmeier, C. Borchert, and O. Spinczyk. Avoiding pitfalls in
fault-injection based comparison of program susceptibility to soft errors. In
Proceedings of the 45th IEEE/IFIP International Conference on Dependable
Systems and Networks (DSN '15). IEEE Computer Society Press, June 2015.
- M. Hoffmann, F. Lukas, C. Dietrich, and D. Lohmann. dOSEK: The design and
implementation of a dependability-oriented static embedded kernel. In
Proceedings of the 21st IEEE Real-Time and Embedded Technology and
Applications (RTAS '15), Los Alamitos, CA, USA, Apr. 2015. IEEE Computer
Society Press.
- Christian Dietrich and Daniel Lohmann. The dataref versuchung. ACM Operating
Systems Review, pages 110, 2015.
- M. Hoffmann, P. Ulbrich, C. Dietrich, H. Schirmeier, D. Lohmann, and W.
Schröder-Preikschat. Experiences with software-based soft-error mitigation
using AN codes. Software Quality Journal, pages 127, 2015.
- I. Stilkerich, P. Taffner, C. Erhardt, C. Dietrich, C. Wawersich, and
M. Stilkerich. Team Up: Cooperative Memory Management in Embedded
@ -142,30 +212,34 @@ Selected publications using FAIL*
Architectures and Synthesis for Embedded Systems (CASES '14). ACM,
October 2014.
- H. Schirmeier, C. Borchert, and O. Spinczyk. Rapid fault-space
exploration by evolutionary pruning. In Proceedings of the 33rd
International Conference on Computer Safety, Reliability and
Security (SAFECOMP '14), Lecture Notes in Computer
Science. Springer-Verlag, Sept. 2014.
- H. Schirmeier, C. Borchert, and O. Spinczyk. Rapid fault-space exploration by
evolutionary pruning. In Proceedings of the 33rd International Conference on
Computer Safety, Reliability and Security (SAFECOMP '14), Lecture Notes in
Computer Science, pages 1732. Springer-Verlag, Sept. 2014.
- M. Hoffmann, C. Borchert, C. Dietrich, H. Schirmeier, R. Kapitza,
O. Spinczyk, and D. Lohmann. Effectiveness of fault detection
mechanisms in static and dynamic operating system designs. In
Proceedings of the 17th IEEE International Symposium on
Object-Oriented Real-Time Distributed Computing (ISORC '14). IEEE
Computer Society Press, June 2014.
- Björn Döbel. Operating System Support for Redundant Multithreading.
Dissertation, Technische Universität Dresden, August 2014.
- H. Schirmeier, L. Rademacher, and O. Spinczyk. Smart-hopping: Highly
efficient ISA-level fault injection on real hardware. In Proceedings
of the 19th IEEE European Test Symposium (ETS '14). IEEE Computer
Society Press, May 2014.
- Peter Ulbrich. Ganzheitliche Fehlertoleranz in eingebetteten
Softwaresystemen. Dissertation, Friedrich-Alexander-Universität
Erlangen-Nürnberg, August 2014.
- M. Hoffmann, P. Ulbrich, C. Dietrich, H. Schirmeier, D. Lohmann, and
W. Schröder-Preikschat. A practitioner's guide to software-based
soft-error mitigation using AN-codes. In Proceedings of the 15th
IEEE International Symposium on High Assurance Systems Engineering
(HASE '14), Miami, Florida, USA, Jan. 2014. IEEE Computer Society
Press.
- M. Hoffmann, C. Borchert, C. Dietrich, H. Schirmeier, R. Kapitza, O.
Spinczyk, and D. Lohmann. Effectiveness of fault detection mechanisms in
static and dynamic operating system designs. In Proceedings of the 17th IEEE
International Symposium on Object-Oriented Real-Time Distributed Computing
(ISORC '14), pages 230237. IEEE Computer Society Press, June 2014.
- H. Schirmeier, L. Rademacher, and O. Spinczyk. Smart-hopping: Highly efficient
ISA-level fault injection on real hardware. In Proceedings of the 19th IEEE
European Test Symposium (ETS '14), pages 6974. IEEE Computer Society Press,
May 2014.
- M. Hoffmann, P. Ulbrich, C. Dietrich, H. Schirmeier, D. Lohmann, and W.
Schröder-Preikschat. A practitioner's guide to software-based soft-error
mitigation using AN-codes. In Proceedings of the 15th IEEE International
Symposium on High Assurance Systems Engineering (HASE '14), pages 3340,
Miami, Florida, USA, Jan. 2014. IEEE Computer Society Press.
- C. Borchert, H. Schirmeier, and O. Spinczyk. Return-address
protection in C/C++ code by dependability aspects. In Proceedings of
@ -187,7 +261,7 @@ Selected publications using FAIL*
- C. Borchert, H. Schirmeier, and O. Spinczyk. Generative
software-based memory error detection and correction for operating
system data structures. In Proceedings of the 43nd IEEE/IFIP
system data structures. In Proceedings of the 43rd IEEE/IFIP
International Conference on Dependable Systems and Networks (DSN
'13). IEEE Computer Society Press, June 2013.

9
cmake/BuildType.cmake Normal file
View File

@ -0,0 +1,9 @@
# Set a default build type if none was specified
set(default_build_type "Release")
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE STRING "Choose the build type." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

33
cmake/FindCapstone.cmake Normal file
View File

@ -0,0 +1,33 @@
# - Try to find CAPSTONE
# Once done, this will define
#
# CAPSTONE_FOUND - system has CAPSTONE
# CAPSTONE_INCLUDE_DIRS - the CAPSTONE include directories
# CAPSTONE_LIBRARIES - link these to use CAPSTONE
include(LibFindMacros)
message(STATUS "[FAIL*] looking for Capstone library")
# Dependencies
# libfind_package(CAPSTONE capstone)
# Use pkg-config to get hints about paths
# libfind_pkg_check_modules(CAPSTONE_PKGCONF capstone)
# Include dir
find_path(CAPSTONE_INCLUDE_DIR
NAMES capstone/capstone.h
PATHS ${CAPSTONE_PKGCONF_INCLUDE_DIRS}
)
# Finally the library itself
find_library(CAPSTONE_LIBRARY
NAMES capstone
PATHS ${CAPSTONE_PKGCONF_LIBRARY_DIRS}
)
# Set the include dir variables and the libraries and let libfind_process do the rest.
# NOTE: Singular variables for this library, plural for libraries this this lib depends on.
set(CAPSTONE_PROCESS_INCLUDES CAPSTONE_INCLUDE_DIR CAPSTONE_INCLUDE_DIRS)
set(CAPSTONE_PROCESS_LIBS CAPSTONE_LIBRARY CAPSTONE_LIBRARIES)
libfind_process(CAPSTONE)

View File

@ -1,9 +1,9 @@
find_program(LLVMCONFIG NAMES llvm-config llvm-config-3.4 llvm-config-3.3 llvm-config-3.2 llvm-config-3.1)
find_program(LLVMCONFIG NAMES llvm-config-8 llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9 llvm-config)
if( NOT LLVMCONFIG )
message(FATAL_ERROR "llvm-config not found, try installing llvm-dev llvm")
else()
message(STATUS "[Fail*] LLVM Disassembler: Found llvm-config @ ${LLVMCONFIG}")
message(STATUS "[FAIL*] LLVM Disassembler: Found llvm-config @ ${LLVMCONFIG}")
endif()
# examine LLVM include directory

View File

@ -18,12 +18,16 @@ endif (LIBDWARF_LIBRARIES AND LIBDWARF_INCLUDE_DIRS)
find_path (DWARF_INCLUDE_DIR
NAMES
dwarf.h
libdwarf.h
PATHS
/usr/include
/usr/include/libdwarf
/usr/local/include
/usr/local/include/libdwarf
/opt/local/include
/opt/local/include/libdwarf
/sw/include
/sw/include/libdwarf
ENV CPATH) # PATH and INCLUDE will also work
#find_path (LIBDW_INCLUDE_DIR
# NAMES

View File

@ -6,10 +6,10 @@
# LIBUDIS86_LIBRARIES - Link these to use libudis86
# LIBUDIS86_DEFINITIONS - Compiler switches required for using libudis86
FIND_PATH(LIBUDIS86_INCLUDE_DIRS udis86.h)
FIND_PATH(LIBUDIS86_INCLUDE_DIRS udis86.h PATHS ${LIBUDIS86_PREFIX_DIR}/include)
FIND_LIBRARY(LIBUDIS86_LIBRARIES NAMES udis86
PATHS /usr/lib /usr/local/lib /opt/local/lib
PATHS /usr/lib /usr/local/lib /opt/local/lib ${LIBUDIS86_PREFIX_DIR}/lib
ENV LIBRARY_PATH # PATH and LIB will also work
ENV LD_LIBRARY_PATH)

View File

@ -1,24 +1,26 @@
# Find the MySQL includes and client library
# This module defines
# MYSQL_INCLUDE_DIR, where to find mysql.h
# MYSQL_CFLAGS, contain compiler -I parameters with MySQL/MariaDB headers
# MYSQL_LIBRARIES, the libraries needed to use MySQL.
# MYSQL_FOUND, If false, do not try to use MySQL.
set(MYSQL_CONFIG_PREFER_PATH "$ENV{MYSQL_HOME}/bin" CACHE FILEPATH
"preferred path to MySQL (mysql_config)")
find_program(MYSQL_CONFIG mysql_config
find_program(MYSQL_CONFIG
NAMES mysql_config mariadb_config
${MYSQL_CONFIG_PREFER_PATH}
/usr/local/mysql/bin/
/usr/local/mariadb/bin/
/usr/local/bin/
/usr/bin/
)
if(MYSQL_CONFIG)
message(STATUS "Using mysql_config: ${MYSQL_CONFIG}")
# set INCLUDE_DIR
# set MYSQL_CFLAGS
exec_program(${MYSQL_CONFIG}
ARGS --include
OUTPUT_VARIABLE MYSQL_INCLUDE_DIR)
ARGS --cflags
OUTPUT_VARIABLE MYSQL_CFLAGS)
# set LIBRARY_DIR
exec_program(${MYSQL_CONFIG}
@ -34,6 +36,8 @@ else(MYSQL_CONFIG)
/usr/local/mysql/include/mysql
/usr/include
/usr/include/mysql
/usr/include/mariadb
)
#find_library(mysqlclient_r ...
# PATHS
# ${MYSQL_ADD_LIBRARY_PATH}
@ -42,18 +46,18 @@ else(MYSQL_CONFIG)
# /usr/local/lib/mysql
# /usr/local/mysql/lib
#)
)
set(MYSQL_CFLAGS "-I${MYSQL_INCLUDE_DIR}")
endif(MYSQL_CONFIG)
set(MYSQL_INCLUDE_DIR ${MYSQL_INCLUDE_DIR} CACHE FILEPATH INTERNAL)
set(MYSQL_CFLAGS ${MYSQL_CFLAGS} CACHE FILEPATH INTERNAL)
set(MYSQL_LIBRARIES ${MYSQL_LIBRARIES} CACHE FILEPATH INTERNAL)
if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
if(MYSQL_CFLAGS AND MYSQL_LIBRARIES)
set(MYSQL_FOUND TRUE CACHE INTERNAL "MySQL found")
message(STATUS "Found MySQL: ${MYSQL_INCLUDE_DIR}, ${MYSQL_LIBRARIES}")
else(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
message(STATUS "Found MySQL: ${MYSQL_CFLAGS}, ${MYSQL_LIBRARIES}")
else(MYSQL_CFLAGS AND MYSQL_LIBRARIES)
set(MYSQL_FOUND FALSE CACHE INTERNAL "MySQL found")
message(STATUS "MySQL not found.")
endif(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES)
endif(MYSQL_CFLAGS AND MYSQL_LIBRARIES)
mark_as_advanced(MYSQL_INCLUDE_DIR MYSQL_LIBRARIES)
mark_as_advanced(MYSQL_CFLAGS MYSQL_LIBRARIES)

99
cmake/LibFindMacros.cmake Normal file
View File

@ -0,0 +1,99 @@
# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments
# used for the current package. For this to work, the first parameter must be the
# prefix of the current package, then the prefix of the new package etc, which are
# passed to find_package.
macro (libfind_package PREFIX)
set (LIBFIND_PACKAGE_ARGS ${ARGN})
if (${PREFIX}_FIND_QUIETLY)
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} QUIET)
endif (${PREFIX}_FIND_QUIETLY)
if (${PREFIX}_FIND_REQUIRED)
set (LIBFIND_PACKAGE_ARGS ${LIBFIND_PACKAGE_ARGS} REQUIRED)
endif (${PREFIX}_FIND_REQUIRED)
find_package(${LIBFIND_PACKAGE_ARGS})
endmacro (libfind_package)
# CMake developers made the UsePkgConfig system deprecated in the same release (2.6)
# where they added pkg_check_modules. Consequently I need to support both in my scripts
# to avoid those deprecated warnings. Here's a helper that does just that.
# Works identically to pkg_check_modules, except that no checks are needed prior to use.
macro (libfind_pkg_check_modules PREFIX PKGNAME)
if (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
include(UsePkgConfig)
pkgconfig(${PKGNAME} ${PREFIX}_INCLUDE_DIRS ${PREFIX}_LIBRARY_DIRS ${PREFIX}_LDFLAGS ${PREFIX}_CFLAGS)
else (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(${PREFIX} ${PKGNAME})
endif (PKG_CONFIG_FOUND)
endif (${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4)
endmacro (libfind_pkg_check_modules)
# Do the final processing once the paths have been detected.
# If include dirs are needed, ${PREFIX}_PROCESS_INCLUDES should be set to contain
# all the variables, each of which contain one include directory.
# Ditto for ${PREFIX}_PROCESS_LIBS and library files.
# Will set ${PREFIX}_FOUND, ${PREFIX}_INCLUDE_DIRS and ${PREFIX}_LIBRARIES.
# Also handles errors in case library detection was required, etc.
macro (libfind_process PREFIX)
# Skip processing if already processed during this run
if (NOT ${PREFIX}_FOUND)
# Start with the assumption that the library was found
set (${PREFIX}_FOUND TRUE)
# Process all includes and set _FOUND to false if any are missing
foreach (i ${${PREFIX}_PROCESS_INCLUDES})
if (${i})
set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${i}})
mark_as_advanced(${i})
else (${i})
set (${PREFIX}_FOUND FALSE)
endif (${i})
endforeach (i)
# Process all libraries and set _FOUND to false if any are missing
foreach (i ${${PREFIX}_PROCESS_LIBS})
if (${i})
set (${PREFIX}_LIBRARIES ${${PREFIX}_LIBRARIES} ${${i}})
mark_as_advanced(${i})
else (${i})
set (${PREFIX}_FOUND FALSE)
endif (${i})
endforeach (i)
# Print message and/or exit on fatal error
if (${PREFIX}_FOUND)
if (NOT ${PREFIX}_FIND_QUIETLY)
message (STATUS "Found ${PREFIX} include directory: ${${PREFIX}_INCLUDE_DIR}")
message (STATUS "Found ${PREFIX} library: ${${PREFIX}_LIBRARY}")
endif (NOT ${PREFIX}_FIND_QUIETLY)
else (${PREFIX}_FOUND)
if (${PREFIX}_FIND_REQUIRED)
foreach (i ${${PREFIX}_PROCESS_INCLUDES} ${${PREFIX}_PROCESS_LIBS})
message("${i}=${${i}}")
endforeach (i)
message (FATAL_ERROR "Required library ${PREFIX} NOT FOUND.\nInstall the library (dev version) and try again. If the library is already installed, use ccmake to set the missing variables manually.")
endif (${PREFIX}_FIND_REQUIRED)
endif (${PREFIX}_FOUND)
endif (NOT ${PREFIX}_FOUND)
endmacro (libfind_process)
macro(libfind_library PREFIX basename)
set(TMP "")
if(MSVC80)
set(TMP -vc80)
endif(MSVC80)
if(MSVC90)
set(TMP -vc90)
endif(MSVC90)
set(${PREFIX}_LIBNAMES ${basename}${TMP})
if(${ARGC} GREATER 2)
set(${PREFIX}_LIBNAMES ${basename}${TMP}-${ARGV2})
string(REGEX REPLACE "\\." "_" TMP ${${PREFIX}_LIBNAMES})
set(${PREFIX}_LIBNAMES ${${PREFIX}_LIBNAMES} ${TMP})
endif(${ARGC} GREATER 2)
find_library(${PREFIX}_LIBRARY
NAMES ${${PREFIX}_LIBNAMES}
PATHS ${${PREFIX}_PKGCONF_LIBRARY_DIRS}
)
endmacro(libfind_library)

View File

@ -71,15 +71,15 @@ if(BUILD_BOCHS)
endif()
# FIXME: some libraries still need to be located the "cmake way"
set(bochs_library_dependencies ${bochs_library_dependencies} -lfontconfig -lrt -lvgagl -pthread)
set(bochs_library_dependencies ${bochs_library_dependencies} -lfontconfig -lrt -pthread)
set(bochs_src_dir ${PROJECT_SOURCE_DIR}/simulators/bochs)
set(bochs_install_prefix ${bochs_src_dir}/install CACHE STRING "FailBochs installation path")
set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-all-libs CACHE STRING "Bochs default configure parameters")
set(bochs_configure_params --enable-a20-pin --enable-x86-64 --enable-cpu-level=6 --enable-ne2000 --enable-acpi --enable-pci --enable-usb --enable-trace-cache --enable-fast-function-calls --enable-host-specific-asms --enable-disasm --enable-readline --enable-clgd54xx --enable-fpu --enable-vmx=2 --enable-monitor-mwait --enable-cdrom --enable-sb16=linux --enable-gdb-stub --disable-docbook --with-nogui --with-x11 --with-wx --with-sdl CACHE STRING "Bochs configure parameters")
## Bochs CXX args for calling make
set(bochs_build_CXX CXX=ag++\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler)
set(bochs_build_CXX CXX=${AGXX}\ -p\ ${PROJECT_SOURCE_DIR}/src\ -p\ ${PROJECT_SOURCE_DIR}/simulators\ -p\ ${PROJECT_SOURCE_DIR}/debuggers\ -p\ ${PROJECT_SOURCE_DIR}/tools\ -p\ ${PROJECT_BINARY_DIR}/src\ -I${PROJECT_SOURCE_DIR}/src/core\ -I${CMAKE_BINARY_DIR}/src/core\ ${CMAKE_AGPP_FLAGS}\ --Xcompiler\ -std=gnu++11\ -Wno-narrowing)
## Bochs libtool command.
set(bochs_build_LIBTOOL LIBTOOL=/bin/sh\ ./libtool\ --tag=CXX)

View File

@ -1,3 +1,10 @@
#### C++14 ####
# We need at least C++11, as some library headers begin to require it. C++14
# has already aged sufficiently to mandate it here.
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
##### Verbose make ####
option( VERBOSE_MAKE "Verbose Makefile output" OFF) # defaults to OFF
set(CMAKE_VERBOSE_MAKEFILE ${VERBOSE_MAKE})
@ -11,11 +18,15 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "ag++")
set(CMAKE_AGPP_FLAGS "--real-instances" CACHE STRING "Additional ag++ flags, e.g. --real-instances --keep_woven")
find_program(AGXX ag++ PATHS /usr/bin /usr/local/bin /opt/bin /opt/local/bin ENV PATH)
if(${AGXX} MATCHES "NOTFOUND")
message(FATAL_ERROR "ag++ not found.")
endif()
set(CMAKE_CXX_COMPILER "${AGXX}")
set(CMAKE_AGPP_FLAGS "-D__NO_MATH_INLINES" CACHE STRING "Additional ag++ flags (space-separated), e.g., --keep_woven")
## Here we add the build dir holding the generated header files (protobuf)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --Xweaver -p ${PROJECT_SOURCE_DIR}/src -p ${PROJECT_SOURCE_DIR}/simulators -p ${PROJECT_SOURCE_DIR}/debuggers -p ${PROJECT_SOURCE_DIR}/tools -p ${PROJECT_BINARY_DIR}/src ${CMAKE_AGPP_FLAGS} --Xcompiler")
add_definitions(-D_FILE_OFFSET_BITS=64)
message(STATUS "[${PROJECT_NAME}] Compiler: ${CMAKE_C_COMPILER}/${CMAKE_CXX_COMPILER}" )
message(STATUS "[${PROJECT_NAME}] Compiler: ${CMAKE_C_COMPILER} + ${CMAKE_CXX_COMPILER}" )

View File

@ -1,5 +1,6 @@
### Setup doxygen documentation
include(CMakeParseArguments) # work around internal FindDoxygen bug
find_package(Doxygen)
if(DOXYGEN_FOUND)
# Using a .in file means we can use CMake to insert project settings
@ -13,14 +14,14 @@ set(FAIL_DOC_SOURCE "${FAIL_DOC_SOURCE} ${PROJECT_SOURCE_DIR}/src/plugins")
set(FAIL_DOC_EXCLUDE_PATTERNS "*/util/pstream.h */util/optionparser/optionparser.h")
file(MAKE_DIRECTORY ${FAIL_DOC_OUTPUT})
# FIXME: The find command does not quote the paths to be processed by doxygen. That
# means, the path to your Fail* directory should not contain any blanks.
# means, the path to your FAIL* directory should not contain any blanks.
configure_file(${PROJECT_SOURCE_DIR}/cmake/Doxyfile.in
${PROJECT_BINARY_DIR}/Doxyfile @ONLY}
${PROJECT_BINARY_DIR}/Doxyfile @ONLY
)
## call make doc to generate documentation
set(line0 "[${PROJECT_NAME}] Generating Fail* documentation with Doxygen")
set(line0 "[${PROJECT_NAME}] Generating FAIL* documentation with Doxygen")
set(line1 " Directories: ${FAIL_DOC_SOURCE}")
set(line2 " Excluded patterns: ${FAIL_DOC_EXCLUDE_PATTERNS}")
add_custom_target(doc

View File

@ -85,7 +85,7 @@ if(BUILD_GEM5)
# Cleans up everything (gem5 and Fail related):
add_custom_target(gem5-allclean
COMMAND @echo "Cleaning Fail* and gem5 ..."
COMMAND @echo "Cleaning FAIL* and gem5 ..."
COMMAND cd "${PROJECT_BINARY_DIR}/" && make clean
COMMAND cd "${gem5_src_dir}/" && scons -c build/ARM
COMMAND cd "${gem5_src_dir}/" && rm -rf build/

View File

@ -45,7 +45,7 @@ if(BUILD_PANDA)
# ensure, elf path is set for enabling openocd to read elf symbols
if(EXISTS $ENV{FAIL_ELF_PATH})
message(STATUS "[Fail*] PandaBoard ELF under test: $ENV{FAIL_ELF_PATH}")
message(STATUS "[FAIL*] PandaBoard ELF under test: $ENV{FAIL_ELF_PATH}")
else()
message(FATAL_ERROR "Please set the FAIL_ELF_PATH environment variable to the binary under test.")
endif()

View File

@ -8,7 +8,7 @@ if [ -z $1 ]; then
find ${FAILPATH}/src/experiments -maxdepth 1 -mindepth 1 -type d -printf \-\>\ %P\\n | sort
else
CONFIG='-DBUILD_BOCHS:BOOL=ON -DBUILD_X86:BOOL=ON -DCONFIG_BOCHS_NO_ABORT:BOOL=ON -DCONFIG_EVENT_BREAKPOINTS:BOOL=ON -DCONFIG_EVENT_BREAKPOINTS_RANGE:BOOL=ON -DCONFIG_EVENT_INTERRUPT:BOOL=ON -DCONFIG_EVENT_IOPORT:BOOL=ON -DCONFIG_EVENT_MEMREAD:BOOL=ON -DCONFIG_EVENT_MEMWRITE:BOOL=ON -DCONFIG_EVENT_TRAP:BOOL=ON -DCONFIG_SR_RESTORE:BOOL=ON -DCONFIG_SR_SAVE:BOOL=ON -Dbochs_configure_params:STRING="--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--with-nogui" -DEXPERIMENTS_ACTIVATED:STRING='${EXP}' -DBUILD_IMPORT_TRACE:BOOL=ON -DBUILD_PRUNE_TRACE:BOOL=ON -DBUILD_LLVM_DISASSEMBLER=ON'
CONFIG='-DBUILD_BOCHS:BOOL=ON -DBUILD_X86:BOOL=ON -DBUILD_GEM5:BOOL=OFF -DBUILD_ARM:BOOL=OFF -DBUILD_SIMULAVR:BOOL=OFF -DBUILD_AVR:BOOL=OFF -DCONFIG_BOCHS_NO_ABORT:BOOL=ON -DCONFIG_EVENT_BREAKPOINTS:BOOL=ON -DCONFIG_EVENT_BREAKPOINTS_RANGE:BOOL=ON -DCONFIG_EVENT_INTERRUPT:BOOL=ON -DCONFIG_EVENT_IOPORT:BOOL=ON -DCONFIG_EVENT_MEMREAD:BOOL=ON -DCONFIG_EVENT_MEMWRITE:BOOL=ON -DCONFIG_EVENT_TRAP:BOOL=ON -DCONFIG_SR_RESTORE:BOOL=ON -DCONFIG_SR_SAVE:BOOL=ON -Dbochs_configure_params:STRING="--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--with-nogui" -DEXPERIMENTS_ACTIVATED:STRING='${EXP}' -DBUILD_IMPORT_TRACE:BOOL=ON -DBUILD_PRUNE_TRACE:BOOL=ON -DBUILD_LLVM_DISASSEMBLER=ON'
if [ -e "${FAILPATH}/src/experiments/${EXP}/config.cmake" ]; then
CONFIG="-C ${FAILPATH}/src/experiments/${EXP}/config.cmake -DEXPERIMENTS_ACTIVATED:STRING=${EXP}"

View File

@ -326,7 +326,7 @@ int main(int argc, char *argv[])
init_symbols();
LOG << "OpenOCD 0.7.0 for Fail* and Pandaboard initialized" << endl;
LOG << "OpenOCD 0.7.0 for FAIL* and Pandaboard initialized" << endl;
/* === INITIALIZATION COMPLETE => MAIN LOOP === */

View File

@ -1,29 +0,0 @@
#ifndef __FIRETIMER_AH__
#define __FIRETIMER_AH__
#include <iostream>
// FIXME: This seems deprecated...?!
aspect fireTimer {
advice "bx_pc_system_c" : slice class {
public:
// TODO: Log-level?
void fireTimer(Bit32u timerNum){
if(timerNum <= numTimers){
if(!timer[timerNum].active){
std::cout << "[FAIL] WARNING: The selected timer is actually NOT active!" << std::endl;
}
currCountdownPeriod = Bit64u(1);
timer[timerNum].timeToFire = Bit64u(currCountdownPeriod) + ticksTotal;
std::cout << "[FAIL] Timer " << timerNum <<" will fire now!" << std::endl;
}else{
std::cout << "[FAIL] There are actually only " << numTimers <<" allocated!" << std::endl;
}
}
};
};
#endif // __FIRETIMER_AH__

View File

@ -1,35 +0,0 @@
#ifndef __JUMP_TO_PREVIOUS_CTX_AH__
#define __JUMP_TO_PREVIOUS_CTX_AH__
#include "config/FailConfig.hpp"
// FIXME: What's the purpose of this file/code? Deprecated?
#if 0
// #if defined(CONFIG_SR_RESTORE) || defined(CONFIG_SR_REBOOT)
#include "bochs.h"
#include "../SALInst.hpp"
aspect jumpToPreviousCtx
{
pointcut end_reset_handler() = "void bx_gui_c::reset_handler(...)";
//|| "int bxmain()";
advice execution (end_reset_handler()) : after ()
{
if (fail::restore_bochs_request || fail::reboot_bochs_request )
{
fail::restore_bochs_request = false;
fail::reboot_bochs_request = false;
fail::simulator.toPreviousCtx();
}
}
};
#endif // CONFIG_SR_RESTORE || CONFIG_SR_REBOOT
#endif // __JUMP_TO_PREVIOUS_CTX_AH__

View File

@ -1,102 +0,0 @@
#ifndef __MEM_ACCESS_BIT_FLIP_AH__
#define __MEM_ACCESS_BIT_FLIP_AH__
#include "config/FailConfig.hpp"
#ifdef CONFIG_FI_MEM_ACCESS_BITFLIP
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "bochs.h"
#include "../../controller/EventList.hpp"
#include "../../controller/Event.hpp"
// FIXME: This is deprecated stuff. Delete this file.
using namespace std;
// FIXME this code doesn't make any sense for the read_virtual_% functions
// (the fault would need to be injected into their *return* value)
aspect MemAccessBitFlip
{
pointcut injection_methods()
= "% ...::bx_cpu_c::read_virtual_%(...)" || // -> access32/64.cc
/*
"% ...::bx_cpu_c::read_RMW_virtual_%(...)" || // -> access32.cc
"% ...::bx_cpu_c::system_read_%(...)" || // -> access.cc
"% ...::bx_cpu_c::v2h_read_byte(...)" || // -> access.cc
*/
"% ...::bx_cpu_c::write_virtual_%(...)"; // -> access32/64.cc
/*
"% ...::bx_cpu_c::write_RMW_virtual_%(...)" || // -> access32.cc
"% ...::bx_cpu_c::write_new_stack_%(...)" || // -> access32/64.cc
"% ...::bx_cpu_c::system_write_%(...)" || // -> access.cc
"% ...::bx_cpu_c::v2h_write_byte(...)"; // -> access.cc
*/
//
// Injects a bitflip each time the guest system requests to write/read
// data to/from RAM at the (hardcoded) addresses defined above:
//
// Event source: "memory write/read access"
//
advice execution (injection_methods()) : before ()
{
for(size_t i = 0; i < fi::evbuf.getEventCount(); i++) // check for active events
{
fi::SimpleBitFlip* pEv = dynamic_cast<fi::SimpleBitFlip*>(fi::evbuf.getEvent(i)); // FIXME: Performance verbessern
if(pEv && *(tjp->arg<1>())/*typed!*/ == pEv->getAddress())
{
cout << " " << tjp->signature() << endl;
// Get a pointer to the data that should be written to RAM
// *before* it is actually written:
Bit32u* pData = (Bit32u*)(tjp->arg(JoinPoint::ARGS-1));
// Flip bit at position pEv->getBitPos():
char* ptr = (char*)pData; // For simplification we're just looking at the
// first byte of the data
ptr[0] = (ptr[0]) ^ (pEv->getMask() << pEv->getBitPos());
cout << " >>> Bit flipped at index " << pEv->getBitPos()
<< " at address 0x" << hex << (*(tjp->arg<1>())) << "!" << endl;
fi::evbuf.fireEvent(pEv);
// Continue... (maybe more events to process)
}
}
}
/*
//
// Shows the mapping of a virtual address (within eCos) to a *host* address:
//
if(g_fEnableInjection) // event fired?
{
g_fEnableInjection = false;
const unsigned SEGMENT_SELECTOR_IDX = 2; // always the code segment (seg-base-addr should be zero)
const bx_address logicalAddr = MEM_ADDR_TO_INJECT; // offset within the segment ("local eCos address")
// Get the linear address:
Bit32u linearAddr = pThis->get_laddr32(SEGMENT_SELECTOR_IDX/ *seg* /, logicalAddr/ *offset* /);
// Map the linear address to the physical address:
bx_phy_address physicalAddr;
bx_bool fValid = pThis->dbg_xlate_linear2phy(linearAddr, (bx_phy_address*)&physicalAddr);
// Determine the *host* address of the physical address:
Bit8u* hostAddr = BX_MEM(0)->getHostMemAddr(pThis, physicalAddr, BX_READ);
// Now, hostAddr contains the "final" address where we are allowed to inject errors:
*(unsigned*)hostAddr = BAD_VALUE; // inject error
if(!fValid)
printf("[Error]: Could not map logical address to host address.\n");
else
printf("[Info]: Error injected at logical addr %p (host addr %p).\n", logicalAddr, hostAddr);
}
*/
};
#endif // CONFIG_FI_MEM_ACCESS_BITFLIP
#endif // __MEM_ACCESS_BIT_FLIP_AH__

View File

@ -1,36 +0,0 @@
#include <iostream>
#include "DataRetrievalExperiment.hpp"
#include "../SAL/SALInst.hpp"
#include "../controller/Event.hpp"
#include "ExperimentDataExample/FaultCoverageExperiment.pb.h"
using namespace std;
using namespace fail;
#define MEMTEST86_BREAKPOINT 0x4EDC
bool DataRetrievalExperiment::run()
{
cout << "[getExperimentDataExperiment] Experiment start." << endl;
// Breakpoint address for Memtest86:
BPSingleEvent mainbp(MEMTEST86_BREAKPOINT);
simulator.addEventAndWait(&mainbp);
cout << "[getExperimentDataExperiment] Breakpoint reached." << endl;
FaultCoverageExperimentData* test = NULL;
cout << "[getExperimentDataExperiment] Getting ExperimentData (FaultCoverageExperiment)..." << endl;
test = simulator.getExperimentData<FaultCoverageExperimentData>();
cout << "[getExperimentDataExperiment] Content of ExperimentData (FaultCoverageExperiment):" << endl;
if (test->has_data_name())
cout << "Name: "<< test->data_name() << endl;
// m_instrptr1 augeben
cout << "m_instrptr1: " << hex << test->m_instrptr1() << endl;
// m_instrptr2 augeben
cout << "m_instrptr2: " << hex << test->m_instrptr2() << endl;
simulator.clearEvents(this);
return true; // experiment successful
}

View File

@ -1,14 +0,0 @@
#ifndef __DATA_RETRIEVAL_EXPERIMENT_HPP__
#define __DATA_RETRIEVAL_EXPERIMENT_HPP__
#include "../controller/ExperimentFlow.hpp"
class DataRetrievalExperiment : public fail::ExperimentFlow
{
public:
DataRetrievalExperiment() { }
bool run();
};
#endif // __DATA_RETRIEVAL_EXPERIMENT_HPP__

View File

@ -1,19 +0,0 @@
## Setup desired protobuf descriptions HERE ##
set(MY_PROTOS
FaultCoverageExperiment.proto
)
set(SRCS
example.cc
)
#### PROTOBUFS ####
find_package(Protobuf REQUIRED)
include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_CURRNET_BINARY_DIR})
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${MY_PROTOS} )
## Build library
add_library(fcexperimentmessage ${PROTO_SRCS} ${SRCS} )

View File

@ -1,7 +0,0 @@
message FaultCoverageExperimentData{
optional string data_name = 1;
required int64 m_InstrPtr1 = 2;
required int64 m_InstrPtr2 = 3;
}

View File

@ -1,3 +0,0 @@
#!/bin/bash
cd $(dirname $0)
g++ ../../controller/JobServer.cc ../../controller/ExperimentDataQueue.cc example.cc FaultCoverageExperiment.pb.cc -o ./ExperimentData_example -l protobuf -pthread

View File

@ -1,63 +0,0 @@
#include <iostream>
#include <fstream>
#include "controller/ExperimentData.hpp"
#include "controller/ExperimentDataQueue.hpp"
#include "jobserver/JobServer.hpp"
#include "FaultCoverageExperiment.pb.h"
using namespace std;
int main(int argc, char* argv[])
{
// FIXME: Translation missing.
ExperimentDataQueue exDaQu;
ExperimentData* readFromQueue;
// Daten in Struktur schreiben und in Datei speichern
ofstream fileWrite;
fileWrite.open("test.txt");
FaultCoverageExperimentData faultCovExWrite;
// Namen setzen
faultCovExWrite.set_data_name("Testfall 42");
// Instruktionpointer 1
faultCovExWrite.set_m_instrptr1(0x4711);
// Instruktionpointer 2
faultCovExWrite.set_m_instrptr2(0x1122);
// In ExperimentData verpacken
ExperimentData exDaWrite(&faultCovExWrite);
// In Queue einbinden
exDaQu.addData(&exDaWrite);
// Aus Queue holen
if (exDaQu.size() != 0)
readFromQueue = exDaQu.getData();
// Serialisierung ueber Wrapper-Methode in ExperimentData
readFromQueue->serialize(&fileWrite);
// cout << "Ausgabe: " << out << endl;
fileWrite.close();
//---------------------------------------------------------------
// Daten aus Datei lesen und in Struktur schreiben
ifstream fileRead;
fileRead.open("test.txt");
FaultCoverageExperimentData faultCovExRead;
ExperimentData exDaRead(&faultCovExRead);
exDaRead.unserialize( &fileRead);
// Wenn Name, dann ausgeben
if(faultCovExRead.has_data_name()){
cout << "Name: "<< faultCovExRead.data_name() << endl;
}
// m_instrptr1 augeben
cout << "m_instrptr1: " << faultCovExRead.m_instrptr1() << endl;
// m_instrptr2 augeben
cout << "m_instrptr2: " << faultCovExRead.m_instrptr2() << endl;
fileRead.close();
return 0;
}

View File

@ -1,76 +0,0 @@
#ifndef __JUMP_AND_RUN_EXPERIMENT_HPP__
#define __JUMP_AND_RUN_EXPERIMENT_HPP__
#include <iostream>
#include "../controller/ExperimentFlow.hpp"
#include "../SAL/SALInst.hpp"
#include "../SAL/bochs/BochsRegister.hpp"
#include "config/FailConfig.hpp"
// Check if aspect dependencies are satisfied:
#if !defined(CONFIG_EVENT_CPULOOP) || !defined(CONFIG_EVENT_JUMP)
#error Breakpoint- and jump-events needed! Enable aspects first (see FailConfig.hpp)!
#endif
using namespace std;
using namespace fail;
class JumpAndRunExperiment : public fail::ExperimentFlow {
public:
bool run()
{
/************************************
* Description of experiment flow. *
************************************/
// Wait for function entry adresss:
cout << "[JumpAndRunExperiment] Setting up experiment. Allowing to "
<< "start now." << endl;
BPEvent mainFuncEntry(0x3c1f);
simulator.addEvent(&mainFuncEntry);
if (&mainFuncEntry != simulator.waitAny()) {
cerr << "[JumpAndRunExperiment] Now, we are completely lost! "
<< "It's time to cry! :-(" << endl;
simulator.clearEvents(this);
return false;
}
else
cout << "[JumpAndRunExperiment] Entry of main function reached! "
<< " Let's see who's jumping around here..." << endl;
const unsigned COUNTER = 20000;
unsigned i = 0;
BxFlagsReg* pFlags = dynamic_cast<BxFlagsReg*>(simulator.
getRegisterManager().getSetOfType(RT_ST).snatch());
assert(pFlags != NULL && "FATAL ERROR: NULL ptr not expected!");
JumpEvent ev;
// Catch the next "counter" jumps:
while (++i <= COUNTER) {
ev.setWatchInstructionPointer(ANY_INSTR);
simulator.addEvent(&ev);
if (simulator.waitAny() != &ev) {
cerr << "[JumpAndRunExperiment] Damn! Something went "
<< "terribly wrong! Who added that event?! :-(" << endl;
simulator.clearEvents(this);
return false;
}
else
cout << "[JumpAndRunExperiment] Jump detected. Instruction: "
<< "0x" hex << ev.getTriggerInstructionPointer()
<< " -- FLAGS [CF, ZF, OF, PF, SF] = ["
<< pFlags->getCarryFlag() << ", "
<< pFlags->getZeroFlag() << ", "
<< pFlags->getOverflowFlag() << ", "
<< pFlags->getParityFlag() << ", "
<< pFlags->getSignFlag() << "]." << endl;
}
cout << "[JumpAndRunExperiment] " << dec << counter
<< " jump(s) detected -- enough for today...exiting! :-)"
<< endl;
simulator.clearEvents(this);
return true;
}
};
#endif // __JUMP_AND_RUN_EXPERIMENT_HPP__

View File

@ -1,71 +0,0 @@
#ifndef __MEM_WRITE_EXPERIMENT_HPP__
#define __MEM_WRITE_EXPERIMENT_HPP__
#include <iostream>
#include "../controller/ExperimentFlow.hpp"
#include "../SAL/SALInst.hpp"
#include "config/FailConfig.hpp"
// Check aspect dependencies:
#if !defined(CONFIG_EVENT_CPULOOP) || !defined(CONFIG_EVENT_MEMACCESS) || !defined(CONFIG_SR_SAVE) || !defined(CONFIG_FI_MEM_ACCESS_BITFLIP)
#error Event dependecies not satisfied! Enabled needed aspects in FailConfig.hpp!
#endif
using namespace std;
using namespace fail;
class MemWriteExperiment : public fail::ExperimentFlow {
public:
bool run() // Example experiment (defines "what we wanna do")
{
/************************************
* Description of experiment flow. *
************************************/
// 1. Add some events (set up the experiment):
cout << "[MemWriteExperiment] Setting up experiment. Allowing to"
<< " start now." << endl;
MemWriteEvent mem1(0x000904F0), mem2(0x02ff0916), mem3(0x0050C8E8);
BPEvent breakpt(0x4ae6);
simulator.addEvent(&mem1);
simulator.addEvent(&mem2);
simulator.addEvent(&mem3);
simulator.addEvent(&breakpt);
// 2. Wait for event condition "(id1 && id2) || id3" to become true:
cout << "[MemWriteExperiment] Waiting for condition (1) (\"(id1 &&"
<< " id2) || id3\") to become true..." << endl;
bool f1 = false, f2 = false, f3 = false, f4 = false;
while (!(f1 || f2 || f3 || f4)) {
BPEvent* pev = simulator.waitAny();
cout << "[MemWriteExperiment] Received event id=" << id
<< "." << endl;
if(pev == &mem4)
f4 = true;
if(pev == &mem3)
f3 = true;
if(pev == &mem2)
f2 = true;
if(pev == &mem1)
f1 = true;
}
cout << "[MemWriteExperiment] Condition (1) satisfied! Ready to "
<< "add next event..." << endl;
// 3. Add a new event now:
cout << "[MemWriteExperiment] Adding new Event..."; cout.flush();
simulator.clearEvents(); // remove residual events in the buffer
// (we're just interested in the new event)
simulator.save("./bochs_save_point");
cout << "done!" << endl;
// 4. Continue simulation (waitAny) and inject bitflip:
// ...
simulator.clearEvents(this);
return true;
}
};
#endif // __MEM_WRITE_EXPERIMENT_HPP__

View File

@ -1,60 +0,0 @@
#ifndef __MY_EXPERIMENT_HPP__
#define __MY_EXPERIMENT_HPP__
#include <iostream>
#include "../controller/ExperimentFlow.hpp"
#include "../SAL/SALInst.hpp"
using namespace std;
using namespace fail;
class MyExperiment : public fail::ExperimentFlow {
public:
bool run() // Example experiment (defines "what we wanna do")
{
/************************************
* Description of experiment flow. *
************************************/
// 1. Add some events (set up the experiment):
cout << "[MyExperiment] Setting up experiment. Allowing to start"
<< " now." << endl;
BPEvent ev1(0x8048A00), ev2(0x8048F01), ev3(0x3c1f);
simulator.addEvent(&ev1);
simulator.addEvent(&ev2);
simulator.addEvent(&ev3);
// 2. Wait for event condition "(id1 && id2) || id3" to become true:
BPEvent* pev;
cout << "[MyExperiment] Waiting for condition (1) (\"(id1 && id2)"
<< " || id3\") to become true..." << endl;
bool f1 = false, f2 = false, f3 = false;
while (!((f1 && f2) || f3)) {
pev = simulator.waitAny();
cout << "[MyExperiment] Received event id=" << pev->getId()
<< "." << endl;
if(pev == &ev3)
f3 = true;
if(pev == &ev2)
f2 = true;
if(pev == &ev1)
f1 = true;
}
cout << "[MyExperiment] Condition (1) satisfied! Ready..." << endl;
// Remove residual (for all active experiments!)
// events in the buffer:
simulator.clearEvents();
BPEvent foobar(ANY_ADDR);
foobar.setCounter(400);
cout << "[MyExperiment] Adding breakpoint-event, firing after the"
<< " next 400 instructions..."; cout.flush();
simulator.addEventAndWait(&foobar);
cout << "cought! Exiting now." << endl;
simulator.clearEvents(this);
return true;
}
};
#endif // __MY_EXPERIMENT_HPP__

View File

@ -1,60 +0,0 @@
#ifndef __SINGLE_STEPPING_EXPERIMENT_HPP__
#define __SINGLE_STEPPING_EXPERIMENT_HPP__
#include <iostream>
#include "../controller/ExperimentFlow.hpp"
#include "../SAL/SALInst.hpp"
#include "config/FailConfig.hpp"
#include "../SAL/bochs/BochsRegister.hpp"
// Check if aspect dependency is satisfied:
#ifndef CONFIG_EVENT_CPULOOP
#error Breakpoint-events needed! Enable aspect first (see FailConfig.hpp)!
#endif
using namespace std;
using namespace fail;
#define FUNCTION_ENTRY_ADDRESS 0x3c1f
class SingleSteppingExperiment : public fail::ExperimentFlow {
public:
bool run()
{
/************************************
* Description of experiment flow. *
************************************/
// Wait for function entry adresss:
cout << "[SingleSteppingExperiment] Setting up experiment. Allowing"
<< " to start now." << endl;
BPEvent mainFuncEntry(FUNCTION_ENTRY_ADDRESS);
simulator.addEvent(&mainFuncEntry);
if (&mainFuncEntry != simulator.waitAny()) {
cerr << "[SingleSteppingExperiment] Now, we are completely lost!"
<< " It's time to cry! :-(" << endl;
simulator.clearEvents(this);
return false;
}
cout << "[SingleSteppingExperiment] Entry of main function reached!"
<< " Beginning single-stepping..." << endl;
char action;
while (true) {
BPEvent bp(ANY_ADDR);
simulator.addEvent(&bp);
simulator.waitAny();
cout << "0x" << hex
<< simulator.getRegisterManager().getInstructionPointer()
<< endl;
cout << "Continue (y/n)? ";
cin >> action; cin.sync(); cin.clear();
if (action != 'y')
break;
}
simulator.clearEvents(this);
return true;
}
};
#endif // __SINGLE_STEPPING_EXPERIMENT_HPP__

View File

@ -1,16 +0,0 @@
#ifndef __INSTANTIATE_EXPERIMENT_AH__
#define __INSTANTIATE_EXPERIMENT_AH__
// copy this file to a .ah file and instantiate the experiment(s) you need
#include "hscsimple.hpp"
#include "../SAL/SALInst.hpp"
aspect hscsimple {
hscsimpleExperiment experiment;
advice execution ("void fail::SimulatorController::initExperiments()") : after () {
fail::simulator.addFlow(&experiment);
}
};
#endif // __INSTANTIATE_EXPERIMENT_AH__

View File

@ -1,34 +0,0 @@
## Setup desired protobuf descriptions HERE ##
#set(MY_PROTOS
# TestData.proto
#)
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
#find_package (LibElf REQUIRED)
#find_package (LibDwarf REQUIRED)
#### PROTOBUFS ####
#find_package(Protobuf REQUIRED)
#include_directories(${PROTOBUF_INCLUDE_DIRS})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_CURERNT_BINARY_DIR})
#PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${MY_PROTOS} )
## Build library
#add_library(testmessages ${PROTO_SRCS})
## Add some tests
#add_executable(testclient client.cc )
#add_executable(testclient testjc.cc )
#add_executable(testserver server.cc)
#target_link_libraries(testclient fail ${PROTOBUF_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} anexperimentmessage protomessages)
#target_link_libraries(testserver fail ${PROTOBUF_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} anexperimentmessage protomessages)
#add_executable(dwarf dwarf.cc)
#target_link_libraries(dwarf ${LIBDWARF_LIBRARIES} ${LIBELF_LIBRARIES} )
#include_directories(${CMAKE_BINARY_DIR}/core/experiments/MHTestCampaign)
#add_executable(mhcampaign mhcampaign.cc)
#target_link_libraries(mhcampaign mhtestcampaign fail ${PROTOBUF_LIBRARY} ${Boost_THREAD_LIBRARY})

View File

@ -1,6 +0,0 @@
message TestData {
optional string foo = 1;
optional int64 input = 2;
optional int64 output = 3;
}

View File

@ -1,110 +0,0 @@
#include <iostream>
#include "jobserver/messagedefs/FailControlMessage.pb.h"
#include "jobserver/SocketComm.hpp"
#include "experiments/AnExperiment/AnExperiment.pb.h"
#include <stdio.h>
using namespace std;
void error(const char *s)
{
perror(s);
exit(0);
}
template <typename Message>
Message *get_job(int sockfd)
{
Message *msg = new Message;
FailControlMessage ctrlmsg;
ctrlmsg.set_command(FailControlMessage_Command_NEED_WORK);
ctrlmsg.set_build_id(42);
cout << "Sending need work msg: " << ctrlmsg.build_id() << ", Command: " << ctrlmsg.command() << endl;
fail::SocketComm::send_msg(sockfd, ctrlmsg);
cout << "sent ctrl message." << endl;
fail::SocketComm::rcv_msg(sockfd, ctrlmsg);
cout << "Received ctrl message: " << ctrlmsg.command() << endl;
switch(ctrlmsg.command()){
case FailControlMessage_Command_DIE: return 0;
case FailControlMessage_Command_WORK_FOLLOWS:
fail::SocketComm::rcv_msg(sockfd, *msg);
return msg;
default:
cerr << "wtf?" << endl;
}
return 0;
}
template <typename Message>
void return_result(int sockfd, Message *msg)
{
FailControlMessage ctrlmsg;
ctrlmsg.set_command(FailControlMessage_Command_RESULT_FOLLOWS);
ctrlmsg.set_build_id(42);
cout << "Sending Result msg: " << ctrlmsg.build_id() << ", Command: " << ctrlmsg.command() << endl;
fail::SocketComm::send_msg(sockfd, ctrlmsg);
fail::SocketComm::send_msg(sockfd, *msg);
delete msg;
}
int main(int argc, char **argv){
int portno;
struct hostent *server;
cout << "JobClient" << endl;
if (argc < 3) {
cerr << "usage: " << argv[0] << " hostname port" << endl;
return 1;
}
portno = atoi(argv[2]);
server = gethostbyname(argv[1]);
if (server == NULL) {
cerr << "cannot resolve host " << argv[1] << endl;
return 1;
}
int i = 1;
while (1) {
int sockfd;
struct sockaddr_in serv_addr;
cout << ">>>>>>>>>Durchgang " << i++ << endl;
sockfd = socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0) {
error("socket()");
}
memset(&serv_addr, 0, sizeof(serv_addr));
serv_addr.sin_family = AF_INET;
memcpy(&serv_addr.sin_addr.s_addr, server->h_addr, server->h_length);
serv_addr.sin_port = htons(portno);
if (connect(sockfd, (sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
error("connect()");
}
MHTestData *msg = get_job<MHTestData>(sockfd);
if(!msg){
break;
close(sockfd);
}
cout << "[Minion] received job input: " << msg->input() << endl;
cout << "[Minion] Calculating " << msg->input() << "^2 = " << msg->input() * msg->input() << endl;
msg->set_output(msg->input() * msg->input());
sleep(1);
cout << "[Minion] returning result: " << msg->output() << endl;
return_result<MHTestData>(sockfd, msg);
close(sockfd);
}
cout << "ByeBye" << endl;
return 0;
}

View File

@ -1,163 +0,0 @@
/* Code sample: Using libdwarf for getting the address of a function
** from DWARF in an ELF executable.
** Not much error-handling or resource-freeing is done here...
**
** Eli Bendersky (http://eli.thegreenplace.net)
** This code is in the public domain.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <dwarf.h>
#include <libdwarf.h>
void die(char* fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
exit(EXIT_FAILURE);
}
/* List a function if it's in the given DIE.
*/
void list_func_in_die(Dwarf_Debug dgb, Dwarf_Die the_die)
{
char* die_name = 0;
const char* tag_name = 0;
Dwarf_Error err;
Dwarf_Half tag;
Dwarf_Attribute* attrs;
Dwarf_Addr lowpc, highpc;
Dwarf_Signed attrcount, i;
int rc = dwarf_diename(the_die, &die_name, &err);
if (rc == DW_DLV_ERROR)
die("Error in dwarf_diename\n");
else if (rc == DW_DLV_NO_ENTRY)
return;
if (dwarf_tag(the_die, &tag, &err) != DW_DLV_OK)
die("Error in dwarf_tag\n");
/* Only interested in subprogram DIEs here */
if (tag != DW_TAG_subprogram)
return;
if (dwarf_get_TAG_name(tag, &tag_name) != DW_DLV_OK)
die("Error in dwarf_get_TAG_name\n");
printf("DW_TAG_subprogram: '%s'\n", die_name);
/* Grab the DIEs attributes for display */
if (dwarf_attrlist(the_die, &attrs, &attrcount, &err) != DW_DLV_OK)
die("Error in dwarf_attlist\n");
for (i = 0; i < attrcount; ++i) {
Dwarf_Half attrcode;
if (dwarf_whatattr(attrs[i], &attrcode, &err) != DW_DLV_OK)
die("Error in dwarf_whatattr\n");
/* We only take some of the attributes for display here.
** More can be picked with appropriate tag constants.
*/
if (attrcode == DW_AT_low_pc)
dwarf_formaddr(attrs[i], &lowpc, 0);
else if (attrcode == DW_AT_high_pc)
dwarf_formaddr(attrs[i], &highpc, 0);
}
printf("low pc : 0x%08llx\n", lowpc);
printf("high pc : 0x%08llx\n", highpc);
}
/* List all the functions from the file represented by the given descriptor.
*/
void list_funcs_in_file(Dwarf_Debug dbg)
{
Dwarf_Unsigned cu_header_length, abbrev_offset, next_cu_header;
Dwarf_Half version_stamp, address_size;
Dwarf_Error err;
Dwarf_Die no_die = 0, cu_die, child_die;
/* Find compilation unit header */
while (dwarf_next_cu_header(
dbg,
&cu_header_length,
&version_stamp,
&abbrev_offset,
&address_size,
&next_cu_header,
&err) != DW_DLV_ERROR) {
/* Expect the CU to have a single sibling - a DIE */
if (dwarf_siblingof(dbg, no_die, &cu_die, &err) == DW_DLV_ERROR)
die("Error getting sibling of CU\n");
/* Expect the CU DIE to have children */
if (dwarf_child(cu_die, &child_die, &err) == DW_DLV_ERROR)
die("Error getting child of CU DIE\n");
/* Now go over all children DIEs */
while (1) {
int rc;
list_func_in_die(dbg, child_die);
rc = dwarf_siblingof(dbg, child_die, &child_die, &err);
if (rc == DW_DLV_ERROR)
die("Error getting sibling of DIE\n");
else if (rc == DW_DLV_NO_ENTRY)
break; /* done */
}
}
}
int main(int argc, char** argv)
{
Dwarf_Debug dbg = 0;
Dwarf_Error err;
const char* progname;
int fd = -1;
if (argc < 2) {
fprintf(stderr, "Expected a program name as argument\n");
return 1;
}
progname = argv[1];
if ((fd = open(progname, O_RDONLY)) < 0) {
perror("open");
return 1;
}
if (dwarf_init(fd, DW_DLC_READ, 0, 0, &dbg, &err) != DW_DLV_OK) {
fprintf(stderr, "Failed DWARF initialization\n");
return 1;
}
list_funcs_in_file(dbg);
if (dwarf_finish(dbg, &err) != DW_DLV_OK) {
fprintf(stderr, "Failed DWARF finalization\n");
return 1;
}
close(fd);
return 0;
}

Binary file not shown.

View File

@ -1,62 +0,0 @@
#include "jobserver/JobServer.hpp"
#include <iostream>
#include "experiments/AnExperiment.hpp"
#include <boost/thread.hpp>
fail::JobServer js;
using namespace std;
static const int nums = 30;
void exec_js(){
js.waitForConnections();
cout << "That's it.." << endl;
}
int main(int argc, char**argv){
cout << "Testing Jobserver" << endl;
boost::thread th(exec_js);
AnExperimentData* datas[nums];
for(int i = 1; i <= nums; i++){
datas[i] = new AnExperimentData;
datas[i]->setInput(i);
js.addExperiment(datas[i]);
usleep(100 * 1000); // 100 ms
}
js.setNoMoreExperiments();
// test results.
int f;
int res = 0;
int res2 = 0;
AnExperimentData * exp;
for(int i = 1; i <= nums; i++){
exp = static_cast<AnExperimentData*>( js.m_doneJobs.Dequeue() );
f = exp->getOutput();
// cout << ">>>>>>>>>>>>>>> Output: " << i << "^2 = " << f << endl;
res += f;
res2 += (i*i);
delete exp;
}
if (res == res2) {
cout << "TEST SUCCESSFUL FINISHED! " << "[" << res << "==" << res2 << "]" << endl;
}else{
cout << "TEST FAILED!" << " [" << res << "!=" << res2 << "]" << endl;
}
cout << "thats all, waiting for server thread. " << endl;
js.done();
th.join();
return 0;
}

View File

@ -1,42 +0,0 @@
#include <iostream>
#include "jobserver/JobClient.hpp"
#include "experiments/AnExperiment.hpp"
using namespace std;
using namespace fail;
int main(int argc, char** argv){
int portno;
JobClient* jc;
cout << "JobClient" << endl;
if(argc == 1){
jc = new JobClient();
}else if(argc == 3){
portno = atoi(argv[2]);
jc = new JobClient(argv[1], portno);
}else{
cerr << "usage: " << argv[0] << " hostname port" << endl;
return 1;
}
AnExperimentData exp;
while(1){
if(jc->getExperimentData(exp)){
/// Do some work.
cout << "Got data: " << exp.getInput() << endl;
int result = exp.getInput() * exp.getInput();
usleep(500 * 1000); // 500 ms
/// Send back.
exp.setOutput(result);
jc->sendResult(exp);
}else{
cout << "No (more) data for me :(" << endl;
break;
}
}
delete jc;
}

View File

@ -1,24 +0,0 @@
#include "ExperimentDataQueue.hpp"
#include <assert.h>
// FIXME: This is deprecated stuff. Remove it.
namespace fi
{
void ExperimentDataQueue::addData(ExperimentData* exp)
{
assert(exp != 0);
m_queue.push_front(exp);
}
ExperimentData* ExperimentDataQueue::getData()
{
ExperimentData* ret = m_queue.back();
m_queue.pop_back();
return ret;
}
}

View File

@ -1,55 +0,0 @@
/**
* \brief A queue for experiment data.
*
*
* \author Martin Hoffmann, Richard Hellwig
*
*/
// FIXME: This is deprecated stuff. Remove it.
#ifndef __EXPERIMENT_DATA_QUEUE_H__
#define __EXPERIMENT_DATA_QUEUE_H__
#include <deque>
#include "ExperimentData.hpp"
namespace fi{
/**
* \class ExperimentDataQueue
* Class which manage ExperimentData in a queue.
*/
class ExperimentDataQueue
{
protected:
std::deque<ExperimentData*> m_queue;
public:
ExperimentDataQueue() {}
~ExperimentDataQueue() {}
/**
* Adds ExperimentData to the queue.
* @param exp ExperimentData that is to be added to the queue.
*/
void addData(ExperimentData* exp);
/**
* Returns an item from the queue
* @return the next element of the queue
*/
ExperimentData* getData();
/**
* Returns the number of elements in the queue
* @return the size of teh queue
*/
size_t size() const { return m_queue.size(); };
};
};
#endif //__EXPERIMENT_DATA_QUEUE_H__

View File

@ -1,16 +0,0 @@
// Author: Adrian Böckenkamp
// Date: 15.06.2011
// FIXME: This is deprecated stuff. Delete it.
#include "Signal.hpp"
namespace fi
{
std::auto_ptr<Signal> Signal::m_This;
Mutex Signal::m_InstanceMutex;
} // end-of-namespace: fi

View File

@ -1,135 +0,0 @@
#ifndef __SIGNAL_HPP__
#define __SIGNAL_HPP__
// FIXME: This is deprecated stuff. Delete it.
#include <cassert>
#include <memory>
#include <iostream>
#ifndef __puma
#include <boost/thread.hpp>
#include <boost/interprocess/sync/named_semaphore.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/mutex.hpp>
#endif
namespace fi
{
#ifndef __puma
typedef boost::mutex Mutex; // lock/unlock
typedef boost::mutex::scoped_lock ScopeLock; // use RAII with lock/unlock mechanism
typedef boost::condition_variable ConditionVariable; // wait/notify_one
#else
typedef int Mutex;
typedef int ScopeLock;
typedef int ConditionVariable;
#endif
// Simulate a "private" semaphore using boost-mechanisms:
class Semaphore
{
private:
Mutex m_Mutex;
ConditionVariable m_CondVar;
unsigned long m_Value;
public:
// Create a semaphore object based on a mutex and a condition variable
// and initialize it to value "init".
Semaphore(unsigned long init = 0) : m_Value(init) { }
void post()
{
ScopeLock lock(m_Mutex);
++m_Value; // increase semaphore value:
#ifndef __puma
m_CondVar.notify_one(); // wake up other thread, currently waiting on condition var.
#endif
}
void wait()
{
ScopeLock lock(m_Mutex);
#ifndef __puma
while(!m_Value) // "wait-if-zero"
m_CondVar.wait(lock);
#endif
--m_Value; // decrease semaphore value
}
};
class Signal
{
private:
static Mutex m_InstanceMutex; // used to sync calls to getInst()
static std::auto_ptr<Signal> m_This; // the one and only instance
Semaphore m_semBochs;
Semaphore m_semContr;
Semaphore m_semSimCtrl;
bool m_Locked; // prevent misuse of thread-sync
// Singleton class (forbid creation, copying and assignment):
Signal()
: m_semBochs(0), m_semContr(0),
m_semSimCtrl(0), m_Locked(false) { }
Signal(Signal const& s)
: m_semBochs(), m_semContr(),
m_semSimCtrl(), m_Locked(false) { } // never called.
Signal& operator=(Signal const&) { return *this; } // dito.
~Signal() { }
friend class std::auto_ptr<Signal>;
public:
static Signal& getInst()
{
ScopeLock lock(m_InstanceMutex); // lock/unlock handled by RAII principle
if(!m_This.get())
m_This.reset(new Signal());
return (*m_This);
}
// Called from Experiment-Controller class ("beyond Bochs"):
void lockExperiment()
{
assert(!m_Locked &&
"[Signal::lockExperiment]: lockExperiment called twice without calling unlockExperiment() in between.");
m_Locked = true;
m_semContr.wait(); // suspend experiment process
}
// Called from Experiment-Controller class ("beyond Bochs"):
void unlockExperiment()
{
assert(m_Locked &&
"[Signal::unlockExperiment]: unlockExperiment called twice without calling lockExperiment() in between.");
m_Locked = false;
m_semBochs.post(); // resume experiment (continue bochs simulation)
}
// Called from Advice-Code ("within Bochs") to trigger event occurrence:
void signalEvent()
{
m_semContr.post(); // Signal event (to Experiment-Controller)
m_semBochs.wait(); // Wait upon handling to finish
}
// Called from Experiment-Controller to allow simulation start:
void startSimulation()
{
m_semSimCtrl.post();
}
// Called from Bochs, directly after thread creation for Experiment-Controller:
// (This ensures that Bochs waits until the experiment has been set up in the
// Experiment-Controller.)
void waitForStartup()
{
m_semSimCtrl.wait();
}
};
} // end-of-namespace: fi
#endif /* __SIGNAL_HPP__ */

View File

@ -1,25 +0,0 @@
#include "SynchronizedExperimentDataQueue.hpp"
// FIXME: This file is not used. Delete it either.
namespace fi {
void SynchronizedExperimentDataQueue::addData(ExperimentData* exp){
//
m_sema_full.wait();
ExperimentDataQueue::addData(exp);
m_sema_empty.post();
//
}
ExperimentData* SynchronizedExperimentDataQueue::getData(){
//
m_sema_empty.wait();
return ExperimentDataQueue::getData();
m_sema_full.post();
//
}
};

View File

@ -1,57 +0,0 @@
/**
* \brief A queue for experiment data.
*
*
* \author Martin Hoffmann, Richard Hellwig
*
*/
// FIXME: This file is not used. Delete it.
#ifndef __SYNC_EXPERIMENT_DATA_QUEUE_H__
#define __SYNC_EXPERIMENT_DATA_QUEUE_H__
#include "ExperimentDataQueue.hpp"
#include "Signal.hpp"
namespace fi{
/**
* \class SynchronizedExperimentDataQueue
* Class which manage ExperimentData in a queue.
* Thread safe using semphores.
*/
class SynchronizedExperimentDataQueue : public ExperimentDataQueue
{
private:
/// There are maxSize elements in at a time
/// Or do we allow a really possibly huge queue?
Semaphore m_sema_full;
Semaphore m_sema_empty;
public:
SynchronizedExperimentDataQueue(int maxSize = 1024) : m_sema_full(maxSize), m_sema_empty(0) {}
~SynchronizedExperimentDataQueue() {}
/**
* Adds ExperimentData to the queue.
* @param exp ExperimentData that is to be added to the queue.
*/
void addData(ExperimentData* exp);
/**
* Returns an item from the queue
* @return the next element of the queue
*/
ExperimentData* getData();
/**
* Returns the number of elements in the queue
* @return the size of the queue
*/
size_t size() const { return m_queue.size(); };
};
};
#endif //__EXPERIMENT_DATA_QUEUE_H__

View File

@ -1,4 +1,4 @@
Coding Style for Fail*
Coding Style for FAIL*
======================
You may violate/break any of the following rules if you have a good reason to

View File

@ -4,21 +4,20 @@ Directory structure:
The folders are nested as follow:
**********************************************************************
fail: Fail* parent directory, containing all source & configuration files (${FAIL_DIR})
fail: FAIL* parent directory, containing all source & configuration files (${FAIL_DIR})
|-cmake: CMake-related configuration files (e.g. compiler-flags, dependencies, ...)
|-doc: Fail*-Framework documentation (e.g., diagrams, howtos, ...)
|-deprecated: temporal and old (source) files, which will probably be deleted
|-scripts: python/shell scripts for Fail*-compilation and experiment distribution
|-simulators: parent directory of simulators supported by Fail* (may still be WIP)
|-doc: FAIL*-Framework documentation (e.g., diagrams, howtos, ...)
|-scripts: python/shell scripts for FAIL*-compilation and experiment distribution
|-simulators: parent directory of simulators supported by FAIL* (may still be WIP)
|-bochs: source files of the (modified) Bochs x86 simulator backend
|-gem5: source files of the gem5 simulator backend
|-debuggers: parent directory of debuggers supported by Fail* (may still be WIP)
|-debuggers: parent directory of debuggers supported by FAIL* (may still be WIP)
|-gdb: source files related to the GNU gdb debugger
|-t32: source files related to the Lauterbach T32 debugger
|-src: C/C++/AspectC++ source files related to Fail*, experiments and plugins
|-core: core source files forming the Fail* framework
|-src: C/C++/AspectC++ source files related to FAIL*, experiments and plugins
|-core: core source files forming the FAIL* framework
|-util: utility classes and miscellaneous helper functions
|-config: CMake configuration files, defining the Fail* components and variant
|-config: CMake configuration files, defining the FAIL* components and variant
|-sal: source file forming the Simulator Abstraction Layer (backend-interface)
|-bochs: backend source files of the Bochs simulator
|-gem5: backend source files of the gem5 simulator
@ -27,14 +26,14 @@ fail: Fail* parent directory, containing all source & configuration files (${FA
|-arm: ARM-specific platform source files
|-x86: x86-specific platform source files
|-perf: performance-related source files (extensions); speeds up
Fail* <-> simulator interaction (e.g., when using breakpoints)
FAIL* <-> simulator interaction (e.g., when using breakpoints)
|-cpn: campaign- (and therefore server-)related source files
|-efw: experiment-framework- (and therefore client-)related source files
|-comm: communication related source files (these files are used by cpn and efw), incl.
protobuf message definitions used for communication purposes
|-experiments: experiment code files (within a new dir) need to be located here
|-plugins: plugin code files (within a new dir) need to be located here
|-tools: Fail*-related tools, e.g., for tracing or fault-space pruning
|-tools: FAIL*-related tools, e.g., for tracing or fault-space pruning
|-[build]: recommended location of your build-tree, generated files will be placed here

View File

@ -1,41 +1,58 @@
=========================================================================================
Additional libraries/packages/tools needed for Fail*:
Additional libraries/packages/tools needed for FAIL*:
=========================================================================================
Required for Fail*:
Required for FAIL*:
**********************************************************************
- build-essential (e.g. g++)
- libmysqlclient-dev or libmariadbclient-dev
- libprotobuf-dev
- protobuf-compiler libprotobuf-dev
- libpcl1-dev
- libboost-thread-dev libboost-system-dev libboost-regex-dev
- libdwarf-dev
- libelf-dev
- protobuf-compiler
- cmake 2.8.2 (2.8.11 preferred)
- fontconfig1-dev
- libboost-thread-dev libboost-system-dev libboost-regex-dev libboost-coroutine-dev libboost-context-dev
- libdwarf-dev libelf-dev
- cmake >=2.8.2
- libfontconfig1-dev
- zlib1g-dev
- binutils-dev, on newer systems libiberty-dev
- AspectC++ (ag++, ac++): AspectC++ 1.1 or newer is known to work and can be
obtained from <http://www.aspectc.org>; nightlies can be downloaded from
<http://akut.aspectc.org>. Make sure you use the 64-bit version if running
in a 64-bit environment.
- binutils-dev libiberty-dev
- AspectC++ (ag++, ac++):
* AspectC++ 1.1 or 1.2 as well as the clang-based >1.2 versions are known to
work and can be obtained from <http://www.aspectc.org>. Make sure you use
the 64-bit version if running in a 64-bit environment.
* In some environments, some AspectC++ versions have issues ingesting
specific system headers. Workaround: build with CMAKE_AGPP_FLAGS
"-D__NO_MATH_INLINES -D__STRICT_ANSI__" or "--c_compiler clang++" (the
latter requires the clang++ compiler).
- optional:
* LLVM 3.3 or 3.4 (needed for several importers in tools/import-trace)
(compiles/links with 3.1 or 3.2, but fails to properly import information
from ELF binaries not compiled with -ffunction-sections)
* the Capstone disassembler library, version 4.0 or newer
- Capstone is highly recommended over using LLVM, which provides
incomplete def/use information for many opcodes.
- Note that Debian's/Ubuntu's libcapstone-dev 4.0.1+really+3.0.5 does not
suffice. As of this writing, you need to build/install the Capstone
library yourself on these distributions.
- If the build system cannot automatically locate the Capstone library,
manually set CAPSTONE_INCLUDE_DIR and CAPSTONE_LIBRARY in the cmake
configuration. Consider using the static libcapstone.a library instead
of the .so variant.
* LLVM 3.9, 4.0, 5.0, or 6.0 (needed for several importers in
tools/import-trace): llvm-3.9-dev, llvm-4.0-dev, llvm-5.0-dev or
llvm-6.0-dev
- built with "make REQUIRES_RTTI=1" (the Debian/Ubuntu packages already
come built this way)
- details below
* a MySQL 5.0+ or MariaDB 5.1+ (MariaDB 5.5 recommended) server
- optional: cmake-curses-gui
* doxygen
* cmake-curses-gui
* python-numpy and python-matplotlib for the faultspaceplot tool
Required for the Bochs simulator backend:
**********************************************************************
- libpthread
- Probably more, depending on, e.g., the GUI you configure (X11 ->
libsvga1-dev, libxrandr-dev)
- Probably more, depending on, e.g., the GUI you configure
(bochs_configure_params in the cmake configuration):
SDL/X11 (--with-sdl;--with-x11) -> libsdl1.2-dev
wx (--with-wx) -> libgtk2.0-dev libwxgtk3.0-dev libwxbase3.0-dev
Required for the gem5 simulator backend:
**********************************************************************
@ -73,10 +90,10 @@ For distribution/parallelization:
it exists.
=========================================================================================
Compiling, building and modifying: Simulators and Fail*
Compiling, building and modifying: Simulators and FAIL*
=========================================================================================
Building Fail*:
Building FAIL*:
**********************************************************************
For the first time:
@ -95,7 +112,7 @@ For the first time:
$ ccmake .
Select "BUILD_BOCHS" or "BUILD_GEM5". Select an experiment to enable by
naming its "experiments/" subdirectory under "EXPERIMENTS_ACTIVATED".
Configure Fail* features you need for this experiment by enabling
Configure FAIL* features you need for this experiment by enabling
"CONFIG_*" options. Press 'c', 'g' to regenerate the build system.
(Alternatively use
$ cmake-gui .
@ -105,18 +122,18 @@ For the first time:
for your need.
After changes to Fail* code:
After changes to FAIL* code:
------------------------------------------------------------
Compile (in ${BUILD_DIR}, optionally "add -jN" for parallel building):
$ make
CMake will build all Fail* libraries and link them with the simulator backend
CMake will build all FAIL* libraries and link them with the simulator backend
library to a binary called "fail-client". You may use the shell script
$ ${FAIL_DIR}/scripts/rebuild-bochs.sh [-]
to speed up repetitive tasks regarding Fail/Bochs builds. This script contains
a concise documentation on itself.
Add new Fail* sources to build chain:
Add new FAIL* sources to build chain:
------------------------------------------------------------
To add new source files to the build, see CMakeLists.txt in the subdirectory of the
corresponding component in "${FAIL_DIR}/src/core/", and probably consultate the
@ -130,7 +147,7 @@ new subdirectory in "experiments/", activate it in the CMake configuration step
above).
Generating the Doxygen documentation for Fail*:
Generating the Doxygen documentation for FAIL*:
**********************************************************************
To generate the Doxygen documentation, type:
$ make doc
@ -145,17 +162,18 @@ to be compiled previously:
FailBochs: Bochs configuration features
**********************************************************************
The autotools-based bochs is configured within the Fail* build run.
The autotools-based bochs is configured within the FAIL* build run.
The configuration flags can be set within the ccmake configuration (ccmake ${FAIL_DIR}/build)
- Sufficient:
--enable-cpu-level=6;--enable-ne2000;--enable-trace-cache;--enable-gdb-stub;--disable-docbook
- More simulator features (FailBochs default configuration):
--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-all-libs
Instead of --with-all-libs, you could use --with-nogui for "headless" experiments,
additionally removing lots of library dependencies (thus reducing startup overhead).
--with-x11 enables only the "x" (X11), --with-wx only the "wx" (wxWidgets) GUI.
Note that "wx" does not play well together with Fail*'s "restore" feature (FailBochs
will fall back to "x" if available, or die trying.)
--enable-cpu-level=6;--enable-ne2000;--enable-trace-cache;--enable-gdb-stub;--disable-docbook;--with-nogui
- More simulator features and GUIs (FailBochs default configuration):
--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-nogui;--with-x11;--with-wx;--with-sdl
The --with-nogui flag suffices for for "headless" experiments, with the
advantage of removing lots of library dependencies (thus reducing startup
overhead). --with-x11 enables only the "x" (X11), --with-wx only the "wx"
(wxWidgets) GUI. Note that "wx" does not play well together with FAIL*'s
"restore" feature (FailBochs will fall back to "x" if available, or die
trying.)
Once you know everything works as it should, you may want to add the
following flags before running larger campaigns:
--disable-logging --disable-assert-checks
@ -182,7 +200,7 @@ Debug build:
Configure Bochs to use debugging-related compiler flags (expects to be in ${BUILD_DIR}):
$ cd ../simulator/bochs
$ CFLAGS="-g -O0" CXXFLAGS="-g -O0" ./configure --prefix=... ... (see above)
You might additionally want to configure the rest of Fail* into debug mode by
You might additionally want to configure the rest of FAIL* into debug mode by
setting CMAKE_BUILD_TYPE to "Debug" (ccmake, see above).
FIXME: Does this still work?
@ -213,19 +231,20 @@ Building gem5:
For the first time (incl. selecting an experiment):
------------------------------------------------------------
1. Change to the Fail* directory (expects to be in ${FAIL_DIR}) and
1. Change to the FAIL* directory (expects to be in ${FAIL_DIR}) and
create a new build directory.
$ cd ${FAIL_DIR}; mkdir build; cd build
3. Start the configuration by typing
$ cmake ..
4. Modify the generated configuration according to your needs using
$ ccmake .
At least, you should set an experiment and turn on the following
flags: BUILD_GEM5 = BUILD_ARM = ON. Additionally, all config
options specific for other simulator should be turned OFF.
At least, you should set an experiment and turn on the configuration flags
BUILD_GEM5 and BUILD_ARM. Additionally, all config options specific for
other back-ends and architectures should be turned OFF, especially
BUILD_BOCHS and BUILD_X86.
5. Typing
$ make (or nice make -jN)
will start the build process of Fail* and gem5. This automatically
will start the build process of FAIL* and gem5. This automatically
builds the debug variant for ARM targets. (Note that this build will
automatically include the ${FAIL_DIR}/src/core/sal/gem5 as an
"EXTRAS" feature, see gem5/scons build system documentation for
@ -237,13 +256,16 @@ For the first time (incl. selecting an experiment):
(e.g. a release build, i.e. using "gem5.fast" instead of "gem5.debug")
can be changed in the aforementioned gem5.cmake file.
After changes to Fail*/gem5 code (incl. aspect headers):
NOTE: gem5 currently does not compile with the newer clang-based daily builds
of AspectC++ (ac++). You may need to use the ac++ 1.2 release instead.
After changes to FAIL*/gem5 code (incl. aspect headers):
------------------------------------------------------------
1. Clean the current build by typing
$ make gem5-allclean
(in your build dir ${FAIL_DIR}/build). This cleans the current
Fail* and gem5 build directories. Note that "make clean" only cleans
the Fail* build directory. Furthermore, all remaining CMake remnants
FAIL* and gem5 build directories. Note that "make clean" only cleans
the FAIL* build directory. Furthermore, all remaining CMake remnants
should be deleted:
$ find -name CMakeCache.txt | xargs rm
2. Rebuild by typing
@ -278,12 +300,13 @@ Database backend setup: MySQL / MariaDB
=========================================================================================
Building LLVM from sources
=========================================================================================
If your Linux distribution does not provide a library package for LLVM 3.3 or
newer, and you need LLVM support in Fail*, you may need to build LLVM from the
sources and install it, e.g., locally in your home.
If your Linux distribution does not provide a library package for LLVM 3.9 or
newer (the following steps work for LLVM 3.9), and you need LLVM support in
FAIL*, you may need to build LLVM from the sources and install it, e.g.,
locally in your home.
1. Download the source tarball of LLVM 3.4 from http://llvm.org (or use the git
repository http://llvm.org/git/llvm.git and checkout release_34)
1. Download the source tarball of LLVM 3.9 from http://llvm.org (or use the git
repository http://llvm.org/git/llvm.git and checkout release_39)
2. Configure as needed. On mixed 32/64-bit systems (userland/kernel),
prefixing with "linux32" may be necessary:
$ linux32 ./configure --prefix=$(echo ~/localroot/usr) --enable-optimized --disable-assertions --disable-werror

View File

@ -1,5 +1,5 @@
=========================================================================================
Steps to run a boot image in Fail* using the Bochs simulator backend:
Steps to run a boot image in FAIL* using the Bochs simulator backend:
=========================================================================================
Follow the Bochs documentation, and start your own "bochsrc" configuration file
based on the "${PREFIX}/share/doc/bochs/bochsrc-sample.txt" template (or
@ -15,17 +15,17 @@ based on the "${PREFIX}/share/doc/bochs/bochsrc-sample.txt" template (or
- For an X11 GUI:
config_interface: textconfig
display_library: x
- For a wxWidgets GUI (does not play well with Fail*'s "restore" feature):
- For a wxWidgets GUI (does not play well with FAIL*'s "restore" feature):
config_interface: wx
display_library: wx
- Reduce the guest system's RAM to a minimum to reduce Fail*'s memory footprint
- Reduce the guest system's RAM to a minimum to reduce FAIL*'s memory footprint
and save/restore overhead, e.g.:
memory: guest=16, host=16
- If you want to redirect FailBochs's output to a file using the shell's
redirection operator '>', make sure "/dev/stdout" is not used as a target
file for logging. (The Debian "bochsrc" template unfortunately does this
in two places. It suffices to comment out these entries.)
- To make Fail* terminate if something unexpected happens in a larger
- To make FAIL* terminate if something unexpected happens in a larger
campaign, be sure it doesn't "ask" in these cases, e.g.:
panic: action=fatal
error: action=fatal
@ -63,7 +63,7 @@ An example of a DatabaseCampaign with separate experiment.
CONFIG_EVENT_MEMWRITE, CONFIG_EVENT_TRAP, CONFIG_SR_RESTORE and CONFIG_SR_SAVE
The options BUILD_BOCHS, BUILD_X86 are needed as well, but are defaults.
3. In weather-monitor/experimentInfo.hpp set "PREREQUISITES" to 1 and build
Fail*/Bochs using e.g. fail/scripts/rebuild-bochs.sh (-> how-to-build.txt).
FAIL*/Bochs using e.g. fail/scripts/rebuild-bochs.sh (-> how-to-build.txt).
Upon minor changes (i.e. not e.g. to aspects), append " -" to the call to
the script. This will rebuild only parts that changed.
4. Enter experiment_targets/weathermonitor and run:
@ -76,7 +76,7 @@ An example of a DatabaseCampaign with separate experiment.
being VARIANT.trace
6. Use "import-trace" (using correct -b & -v, -t is VARIANT.trace) to get the
trace into the database and "prune-trace" to (obviously) prune the data.
7. Change PREREQUISITES (see 5) back to "0" and rebuild Fail*/Bochs.
7. Change PREREQUISITES (see 5) back to "0" and rebuild FAIL*/Bochs.
8. Run the "weather-monitor-server" (Don't forget -v & -b!) and "fail-client -q"
from within experiment_targets/weathermonitor/.
You'll need several clients to finish the campaign.
@ -87,7 +87,7 @@ A simple standalone experiment (without a separate campaign). To compile this
experiment, the following steps are required:
1. Add "hsc-simple" to ccmake's EXPERIMENTS_ACTIVATED.
2. Enable CONFIG_EVENT_BREAKPOINTS, CONFIG_SR_RESTORE and CONFIG_SR_SAVE.
3. Build Fail* and Bochs, see "how-to-build.txt" for details.
3. Build FAIL* and Bochs, see "how-to-build.txt" for details.
4. Enter experiment_targets/hscsimple/, bunzip2 -k *.bz2
5. Start the Bochs simulator by typing
$ fail-client -q
@ -130,7 +130,7 @@ fail-client for the next 2k experiments.
The experiments can be significantly sped up by
a) parallelization (run more FailBochs clients and
b) a headless (and more optimized) Fail* configuration (see above).
b) a headless (and more optimized) FAIL* configuration (see above).
Experiment "MHTestCampaign":
@ -211,7 +211,7 @@ To compile this experiment, the following steps are required:
CONFIG_EVENT_MEMREAD, CONFIG_EVENT_MEMWRITE, CONFIG_EVENT_TRAP, CONFIG_SR_RESTORE
and CONFIG_SR_SAVE.
6. Enable STEP1 in fail/src/experiments/weather-monitor/experiment.cc
7. Build Fail* and gem5, see "how-to-build.txt" for details.
7. Build FAIL* and gem5, see "how-to-build.txt" for details.
8. Start the gem5-fail-client by typing
"../scripts/run-gem5.sh ../../experiment_targets/weathermonitor_arm/weather.elf
weathermonitor_arm/weather.elf"
@ -222,7 +222,7 @@ To compile this experiment, the following steps are required:
10. Prune the trace with
"prune-trace -d YOUR_DB -v baseline -b weather"
11. Enable STEP3 in fail/src/experiments/weather-monitor/experiment.cc
12. Build Fail* and gem5, see "how-to-build.txt" for details.
12. Build FAIL* and gem5, see "how-to-build.txt" for details.
13. Start the campaign-server
"bin/weather-monitor-server -v baseline -b weather"
14. Start the gem5-fail-client by typing
@ -231,18 +231,18 @@ To compile this experiment, the following steps are required:
=========================================================================================
Parallelization
=========================================================================================
Fail* is designed to allow parallelization of experiment execution allowing to reduce
FAIL* is designed to allow parallelization of experiment execution allowing to reduce
the time needed to execute the experiments on a (larger) set of experiment data (aka
input parameters for the experiment execution, e.g. instruction pointer, registers, bit
numbers, ...). We call such "experiment data" the parameter sets. The so called "campaign"
is responsible for managing the parameter sets (i.e., the data to be used by the experiment
flows), inquired by the clients. As a consequence, the campaign is running on the server-
side and the experiment flows are running on the (distributed) clients.
First of all, the Fail* instances (and other required files, e.g. saved state) are
First of all, the FAIL* instances (and other required files, e.g. saved state) are
distributed to the clients. In the second step the campaign(-server) is started, preparing
its parameter sets in order to be able to answer the requests from the clients. (Once
there are available parameter sets, the clients can request them.) In the final step,
the distributed Fail* clients have to be started. As soon as this setup is finished,
the distributed FAIL* clients have to be started. As soon as this setup is finished,
the clients request new parameter sets, execute their experiment code and return their
results to the server (aka campaign) in an iterative way, until all paremeter sets have
been processed successfully. If all (new) parameter sets have been distributed, the

View File

@ -211,7 +211,7 @@ Erledigt:
-> benenne Events um ("Listener")
-> Erstelle neue Klassenhierarchie, die den "Informationsanteil" der "Events"
repräsentiert. Diese kapseln dann die Informationen in den Events und
werden zudem intern im Fail*-Framework verwendet (genauer: kommuniziert).
werden zudem intern im FAIL*-Framework verwendet (genauer: kommuniziert).
==========================================================================================
Theorie TODO

View File

@ -1,8 +1,8 @@
This file documents ideas/wishes especially from a Fail* *user* perspective.
This file documents ideas/wishes especially from a FAIL* *user* perspective.
- Recurring Fail* API usage patterns in experiment/campaign implementations
- Recurring FAIL* API usage patterns in experiment/campaign implementations
(that could be implemented in a reusable way, e.g. in a library that sits
between the Fail* API and the experiment)
between the FAIL* API and the experiment)
* Fault-space pruning (FIXME elaborate)
* Preparation vs. final experiment steps -> cmake-driven, automatically
build 2 fail-client binaries? (FIXME elaborate)

59
flake.lock generated Normal file
View File

@ -0,0 +1,59 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1768032153,
"narHash": "sha256-6kD1MdY9fsE6FgSwdnx29hdH2UcBKs3/+JJleMShuJg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3146c6aa9995e7351a398e17470e15305e6e18ff",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

334
flake.nix Normal file
View File

@ -0,0 +1,334 @@
rec {
description = "FAIL* - Fault Injection Leveraged";
inputs = {
nixpkgs.url = "nixpkgs"; # Use nixpkgs from system registry
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
# Create a shell (and possibly package) for each possible system, not only x86_64-linux
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [];
};
inherit (pkgs) lib stdenv;
# ===========================================================================================
# Define custom dependencies
# ===========================================================================================
# 64 bit C/C++ compilers that don't collide (use the same libc)
bintools = pkgs.wrapBintoolsWith {
bintools = pkgs.bintools.bintools; # Unwrapped bintools
libc = pkgs.glibc;
};
gcc = lib.hiPrio (pkgs.wrapCCWith {
cc = pkgs.gcc.cc; # Unwrapped gcc
libc = pkgs.glibc;
bintools = bintools;
});
clang = pkgs.wrapCCWith {
cc = pkgs.clang.cc; # Unwrapped clang
libc = pkgs.glibc;
bintools = bintools;
};
# Multilib C/C++ compilers that don't collide (use the same libc)
# bintools_multilib = pkgs.wrapBintoolsWith {
# bintools = pkgs.bintools.bintools; # Unwrapped bintools
# libc = pkgs.glibc_multi;
# };
# gcc_multilib = lib.hiPrio (pkgs.wrapCCWith {
# cc = pkgs.gcc.cc; # Unwrapped gcc
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# });
# clang_multilib = pkgs.wrapCCWith {
# cc = pkgs.clang.cc; # Unwrapped clang
# libc = pkgs.glibc_multi;
# bintools = bintools_multilib;
# };
aspectcxx = stdenv.mkDerivation rec {
pname = "aspectcxx";
version = "1.2";
src = pkgs.fetchurl {
url = "http://www.aspectc.org/releases/${version}/ac-bin-linux-x86-64bit-${version}.tar.gz";
sha256 = "sha256-8wOrPYC99E3aV5/Js2EBI4V/OoD9y10fYZt8ikPtvt4="; # 1.2
# sha256 = "sha256-gmqoZFkPvs60b6yuMHNtYvuGJXGnbwAYEiyXxp/fmPI="; # 2.0
# sha256 = "sha256-+rEflemXNwn4XZZwSOqCsr6/KFGV8wxW6PeXzHHUK0o="; # 2.5
};
nativeBuildInputs = [
pkgs.autoPatchelfHook
];
unpackPhase = ''
tar xvzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp aspectc++/ac++ $out/bin/
cp aspectc++/ag++ $out/bin/
'';
};
libpcl = stdenv.mkDerivation rec {
pname = "libpcl";
version = "1.12-2";
src = pkgs.fetchurl {
url = "https://launchpadlibrarian.net/521269537/libpcl1_1.12-2_amd64.deb";
sha256 = "sha256-GL3mjPAccAtRMAJPnDMCHiDf6xNvGi4oUWylOIqBjP0=";
};
nativeBuildInputs = with pkgs; [
dpkg
autoPatchelfHook
];
unpackPhase = ''
dpkg-deb -x $src .
'';
installPhase = ''
mkdir -p $out
cp -r usr/* $out/
'';
};
libpcl-dev = stdenv.mkDerivation rec {
pname = "libpcl-dev";
version = "1.12-2";
src = pkgs.fetchurl {
url = "https://launchpadlibrarian.net/521269536/libpcl1-dev_${version}_amd64.deb";
sha256 = "sha256-Z1wP0K8hfV1f9ypee9XIx6H0JOTidhtXDBe82mlRaOg=";
};
nativeBuildInputs = with pkgs; [
dpkg
autoPatchelfHook
];
unpackPhase = ''
dpkg-deb -x $src .
'';
installPhase = ''
mkdir -p $out
cp -r usr/* $out/
# Hacky bullshit
cp ${libpcl}/lib/x86_64-linux-gnu/libpcl.so.1.0.11 $out/lib/x86_64-linux-gnu/libpcl.so.1.0.11
rm $out/share/doc/libpcl1-dev/changelog.Debian.gz
'';
};
# ===========================================================================================
# Specify dependencies
# https://nixos.org/manual/nixpkgs/stable/#ssec-stdenv-dependencies-overview
# Just for a "nix develop" shell, buildInputs can be used for everything.
# ===========================================================================================
# Add dependencies to nativeBuildInputs if they are executed during the build:
# - Those which are needed on $PATH during the build, for example cmake and pkg-config
# - Setup hooks, for example makeWrapper
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
nativeBuildInputs = with pkgs; [
# Languages:
bintools
gcc
# clang
aspectcxx
# C/C++:
gnumake
cmake
pkg-config
doxygen
];
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
# - Libraries used by compilers, for example zlib
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
buildInputs = with pkgs; [
# C/C++:
libpcl-dev
libiberty
libelf
libdwarf
boost
llvmPackages_18.llvm
mariadb-connector-c
fontconfig
zlib
capstone
protobuf
binutils
# No clue what I need from those
xorg.libX11
xorg.libXext
xorg.libXrender
xorg.libXrandr
xorg.libXinerama
xorg.libXcursor
xorg.libXi
xorg.libXfixes
];
# ===========================================================================================
# Define buildable + installable packages
# ===========================================================================================
package = stdenv.mkDerivation {
inherit nativeBuildInputs buildInputs;
pname = "fail";
version = "1.0.1";
src = ./.;
enableParallelBuilding = true;
cmakeFlags = [
# Our CMake is too new :( Try it anyway, can still downgrade later...
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
# AspectC++
# "-DCMAKE_AGPP_FLAGS=--c_compiler${clang}/bin/clang++"
"-DCMAKE_AGPP_FLAGS=-D__NO_MATH_INLINES"
# "-DCMAKE_AGPP_FLAGS=--c_compiler${clang}/bin/clang++ -D__NO_MATH_INLINES -D__STRICT_ANSI__"
# Tell CMake where the libs are
"-DLibIberty_INCLUDE_DIRS=${pkgs.libiberty}/include"
"-DLibIberty_LIBRARIES=${pkgs.libiberty}/lib/libiberty.a"
"-DLIBELF_INCLUDE_DIRS=${pkgs.libelf}/include"
"-DLIBELF_LIBRARIES=${pkgs.libelf}/lib/libelf.a"
"-DLIBDWARF_INCLUDE_DIRS=${pkgs.libdwarf}/include"
"-DLIBDWARF_LIBRARIES=${pkgs.libdwarf}/lib/libdwarf.a"
"-DCAPSTONE_INCLUDE_DIR=${pkgs.capstone}/include"
"-DCAPSTONE_LIBRARY=${pkgs.capstone}/lib/libcapstone.a"
"-DLIBPCL_LIBRARIES=${libpcl-dev}/lib/libpcl.a"
];
installPhase = ''
mkdir -p $out/bin
mv ./fail $out/bin/
'';
};
in rec {
# Provide package for "nix build"
defaultPackage = package;
defaultApp = flake-utils.lib.mkApp {
drv = defaultPackage;
};
# Provide environment for "nix develop"
devShell = pkgs.mkShell {
inherit nativeBuildInputs buildInputs;
name = description;
# =========================================================================================
# Define environment variables
# =========================================================================================
# Custom dynamic libraries:
# LD_LIBRARY_PATH = builtins.concatStringsSep ":" [
# # Rust Bevy GUI app:
# # "${pkgs.xorg.libX11}/lib"
# # "${pkgs.xorg.libXcursor}/lib"
# # "${pkgs.xorg.libXrandr}/lib"
# # "${pkgs.xorg.libXi}/lib"
# # "${pkgs.libGL}/lib"
#
# # JavaFX app:
# # "${pkgs.libGL}/lib"
# # "${pkgs.gtk3}/lib"
# # "${pkgs.glib.out}/lib"
# # "${pkgs.xorg.libXtst}/lib"
# ];
# Dynamic libraries from buildinputs:
LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath buildInputs;
# Set matplotlib backend
# MPLBACKEND = "TkAgg";
# =========================================================================================
# Define shell environment
# =========================================================================================
# Setup the shell when entering the "nix develop" environment (bash script).
shellHook = let
mkCmakeScript = type: let
typeLower = lib.toLower type;
in
pkgs.writers.writeFish "cmake-${typeLower}.fish" ''
cd $FLAKE_PROJECT_ROOT
echo "Removing build directory ./cmake-build-${typeLower}/"
rm -rf ./cmake-build-${typeLower}
echo "Creating build directory"
mkdir cmake-build-${typeLower}
cd cmake-build-${typeLower}
echo "Running cmake"
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="${type}" -DCMAKE_EXPORT_COMPILE_COMMANDS="On" ..
echo "Linking compile_commands.json"
cd ..
ln -sf ./cmake-build-${typeLower}/compile_commands.json ./compile_commands.json
'';
cmakeDebug = mkCmakeScript "Debug";
cmakeRelease = mkCmakeScript "Release";
mkBuildScript = type: let
typeLower = lib.toLower type;
in
pkgs.writers.writeFish "cmake-build.fish" ''
cd $FLAKE_PROJECT_ROOT/cmake-build-${typeLower}
echo "Running cmake"
cmake --build .
'';
buildDebug = mkBuildScript "Debug";
buildRelease = mkBuildScript "Release";
# Use this to specify commands that should be ran after entering fish shell
initProjectShell = pkgs.writers.writeFish "init-shell.fish" ''
echo "Entering \"${description}\" environment..."
# Determine the project root, used e.g. in cmake scripts
set -g -x FLAKE_PROJECT_ROOT (git rev-parse --show-toplevel)
# C/C++:
# abbr -a cmake-debug "${cmakeDebug}"
# abbr -a cmake-release "${cmakeRelease}"
# abbr -a build-debug "${buildDebug}"
# abbr -a build-release "${buildRelease}"
'';
in
builtins.concatStringsSep "\n" [
# Launch into pure fish shell
''
exec "$(type -p fish)" -C "source ${initProjectShell} && abbr -a menu '${pkgs.bat}/bin/bat "${initProjectShell}"'"
''
];
};
});
}

View File

@ -43,7 +43,7 @@ do
fi
# only start a client if at least 500 MiB is available
FREE_MEM=$(free -m | grep "buffers/cache:" | awk '{print $4}')
FREE_MEM=$(LC_ALL=C free -m | grep "buffers/cache:" | awk '{print $4}')
if [ $FREE_MEM -lt "500" ]; then
# waiting for free memory. sleep 1-60s and retry.
sleep $(($RANDOM / (32768 / 60) + 1))

View File

@ -39,7 +39,7 @@ fi
for h in $FAIL_DISTRIBUTE_HOSTS
do
echo Distributing to $h ...
rsync -az --partial --delete-before --delete-excluded --exclude=core --exclude=*.tc . $h:"$FAIL_EXPERIMENT_TARGETDIR" &
rsync -az --partial --delete-before --delete-excluded --exclude=core --exclude=*.tc --exclude=*.pb . $h:"$FAIL_EXPERIMENT_TARGETDIR" &
done
wait

View File

@ -1,19 +1,12 @@
all:
docker build -t danceos/fail-base fail-base
build-all:
docker build -t danceos/fail-base fail-base --build-arg CACHE_DATE="$(shell date)"
docker build -t danceos/fail-generic-tracing fail-generic-tracing
docker build -t danceos/fail-demo fail-demo
docker build -t danceos/fail-demo fail-demo --build-arg CACHE_DATE="$(shell date)"
run-all: .compose ssh
run-fail-db:
docker run --name fail-db \
-e MYSQL_ROOT_PASSWORD=fail \
-e MYSQL_USER=fail \
-e MYSQL_PASSWORD=fail \
-e MYSQL_DATABASE=fail \
-d mysql
.compose:
docker compose up -d --force-recreate --renew-anon-volumes -y
run-fail-demo:
docker run --name fail-demo -p 127.0.0.1:5000:5000 --link fail-db:mysql -d danceos/fail-demo
ssh-fail-demo:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no fail@$$(docker inspect --format "{{ .NetworkSettings.IPAddress }}" fail-demo)
ssh:
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 5022 fail@127.0.0.1

View File

@ -0,0 +1,26 @@
services:
fail-db:
image: mysql
container_name: fail-db
environment:
MYSQL_ROOT_PASSWORD: fail
MYSQL_USER: fail
MYSQL_PASSWORD: fail
MYSQL_DATABASE: fail
# ports:
# - "3306:3306"
networks:
- fail-network
fail-demo:
image: danceos/fail-demo
container_name: fail-demo
ports:
- "5000:5000" # Result Browser
- "5022:22" # SSH
networks:
- fail-network
networks:
fail-network:
driver: bridge

View File

@ -1,59 +1,132 @@
# Set the base image to Ubuntu Utopic (14.10)
FROM ubuntu:utopic
# Set the base image to Ubuntu Jammy. Jammy includes the correct dependency versions except for LLVM.
FROM ubuntu:jammy
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
LABEL org.opencontainers.image.authors="Christian Dietrich <stettberger@dokucode.de>"
# Install Packages required to build FAIL*
RUN apt-get update
RUN apt-get install -y \
binutils-dev \
build-essential \
cmake \
git \
libboost-regex-dev \
libboost-system-dev \
# TODO: Can shrink the image size down by a LOT:
# - A lot of dependencies are unnecessary, I just need to figure out which
# - Separate build-time / runtime dependencies, then do 2 stages
# - Combine multiple RUNs into a single one
# - Use apt-get --no-install-recommends during package install and apt-get clean afterwards
# Install basic packages
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
cmake-curses-gui \
wget \
git \
doxygen \
screen \
openssh-server \
neovim \
ranger
# NOTE: Only required if the base image is not Jammy
# Install Boost 1.74 (focal includes 1.71)
# Jammy includes the correct version but its llvm is too old
# RUN wget https://archives.boost.io/release/1.74.0/source/boost_1_74_0.tar.gz \
# && tar xvzf boost_1_74_0.tar.gz && cd boost_1_74_0 \
# && chmod +x ./bootstrap.sh \
# && ./bootstrap.sh --prefix=/usr/local \
# && ./b2 && ./b2 install
# && cd / && rm -rf boost_1_74_0.tar.gz && rm -rf boost_1_74_0
# ENV BOOST_ROOT=/usr/local
# NOTE: Only required if the base image is not Focal
# Install LLVM 6.0 from source
RUN git clone https://github.com/llvm/llvm-project.git && cd llvm-project \
&& git checkout llvmorg-6.0.0 \
&& mkdir build && cd build \
&& cmake -G "Unix Makefiles" ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_CURSES=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
&& make -j$(nproc) && make install \
&& cd / && rm -rf ./llvm-project
# Install packages required to build FAIL*
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
# binutils-dev \
libmysqlclient-dev \
libprotobuf-dev \
libtinfo-dev \
libpcl1-dev \
libdwarf-dev \
libelf-dev \
libiberty-dev \
libboost-thread-dev \
libdwarf-dev \
libelf-dev \
libfontconfig1-dev \
libiberty-dev \
libmysqlclient-dev \
libpcl1-dev \
libprotobuf-dev \
libsvga1-dev \
llvm-3.4-dev \
screen \
protobuf-compiler \
wget \
openssh-server \
vim \
zlib1g-dev
libboost-system-dev \
libboost-regex-dev \
libboost-coroutine-dev \
libboost-context-dev \
libfontconfig1-dev \
zlib1g-dev \
libz3-dev \
libsdl1.2-dev \
# libsdl2-dev \
libgtk2.0-dev \
# libgtk-3-dev \
# libwxbase3.0-dev \
libwxgtk3.0-gtk3-dev \
libncurses-dev \
# libncurses5-dev \
libx11-dev \
xorg-dev \
libasound2-dev
# Install packages required to run FAIL*
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
protobuf-compiler \
libtinfo6 \
# libtinfo5 \
libmariadb3 \
libprotobuf23 \
libncurses6 \
&& apt-get clean
# NOTE: Only required if we install llvm from apt
# Symlink clang++/llvm-config to match docs
# RUN ln -sf /usr/bin/clang++-6.0 /usr/bin/clang++ \
# && ln -sf /usr/bin/llvm-config-6.0 /usr/bin/llvm-config
# Add a user for compiling FAIL*
RUN useradd fail; mkdir /home/fail; chown fail /home/fail
RUN echo 'fail:fail' | chpasswd; chsh fail --shell /bin/bash
RUN adduser fail sudo
RUN useradd fail \
&& mkdir /home/fail && chown fail /home/fail \
&& echo 'fail:fail' | chpasswd && chsh fail --shell /bin/bash \
&& adduser fail sudo
# SSH login fix. Otherwise user is kicked off after login
RUN mkdir /var/run/sshd
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
RUN mkdir /var/run/sshd \
&& sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
ENV NOTVISIBLE="in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
USER fail
ENV HOME /home/fail
ENV HOME=/home/fail
WORKDIR /home/fail
# Get AspectC++ v1.2 for 64 Bit
RUN wget http://www.aspectc.org/releases/1.2/ac-bin-linux-x86-64bit-1.2.tar.gz
RUN tar xvzf ac-bin-linux-x86-64bit-1.2.tar.gz; mkdir bin; mv aspectc++/ac++ aspectc++/ag++ bin/; rm -rf aspectc++
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Get AspectC++ (originally v1.2) for 64 Bit
ARG acversion="2.5"
RUN wget http://www.aspectc.org/releases/"$acversion"/ac-bin-linux-x86-64bit-"$acversion".tar.gz \
&& tar xvzf ac-bin-linux-x86-64bit-"$acversion".tar.gz \
&& mkdir bin && mv aspectc++/ac++ aspectc++/ag++ bin/ \
&& rm -rf aspectc++ && rm -rf ac-bin-linux-x86-64bit-"$acversion".tar.gz
ENV PATH=/home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Clone FAIL*
RUN git clone https://github.com/danceos/fail.git
# Break docker layer cache
ARG CACHE_DATE=1970-01-01
# RUN git clone https://github.com/danceos/fail.git
RUN git clone https://gitea.vps.chriphost.de/christoph/fail
WORKDIR fail
USER root
# Accept SSH connections
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

View File

@ -4,19 +4,8 @@
# place (~fail/bin/*)
FROM danceos/fail-generic-tracing
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
# Install Additional Packages
RUN apt-get install -y \
python-minimal \
grub-common \
xorriso \
grub-pc-bin \
mysql-client \
python-flask \
python-mysqldb \
python-yaml
LABEL org.opencontainers.image.authors="Christian Dietrich <stettberger@dokucode.de>"
# Passwort for MySQL Daemon
ADD my.cnf /home/fail/.my.cnf
@ -24,22 +13,144 @@ RUN chown fail /home/fail/.my.cnf
USER fail
WORKDIR /home/fail
RUN echo 'export PATH=$HOME/bin:$PATH' >> ~/.profile;\
echo 'cd $HOME/fail-targets' >> ~/.profile
RUN git clone https://github.com/danceos/fail-targets.git
RUN echo 'export PATH=$HOME/bin:$PATH' >> ~/.profile \
&& echo 'cd $HOME/fail-targets' >> ~/.profile
WORKDIR fail
RUN mkdir build; cd build; ../configurations/x86_pruning.sh generic-experiment
RUN mkdir build; cd build
WORKDIR build
# Make FAIL*
RUN make -j$(getconf _NPROCESSORS_ONLN) || make -j$(getconf _NPROCESSORS_ONLN)
RUN ln -s /home/fail/fail/build/bin/fail-client /home/fail/bin/generic-experiment-client; \
ln -s /home/fail/fail/build/bin/generic-experiment-server /home/fail/bin/; \
ln -s /home/fail/fail/tools/analysis/resultbrowser/run.py /home/fail/bin/resultbrowser
RUN cmake \
-DAGXX=/home/fail/bin/ag++ \
-DBOOST_THREAD_LIBRARY=/usr/lib/x86_64-linux-gnu/libpthread.so \
# Enable / Disable features \
-DBUILD_ARM=OFF \
-DBUILD_BOCHS=ON \
-DBUILD_CAPSTONE_DISASSEMBLER=OFF \
-DBUILD_COMPUTE_HOPS=OFF \
-DBUILD_CONVERT_TRACE=OFF \
-DBUILD_DATA_AGGREGATOR=OFF \
-DBUILD_DUMP_HOPS=OFF \
-DBUILD_DUMP_TRACE=OFF \
-DBUILD_FAULTSPACEPLOT=OFF \
-DBUILD_GEM5=OFF \
-DBUILD_IMPORT_TRACE=OFF \
-DBUILD_LLVM_DISASSEMBLER=ON \
-DBUILD_PANDA=OFF \
-DBUILD_PRUNE_TRACE=OFF \
-DBUILD_QEMU=OFF \
-DBUILD_T32=OFF \
-DBUILD_X86=ON \
# \
-DCLIENT_JOB_INITIAL=1 \
-DCLIENT_JOB_LIMIT=1000 \
-DCLIENT_JOB_REQUEST_SEC=30 \
-DCLIENT_RAND_BACKOFF_TEND=8 \
-DCLIENT_RAND_BACKOFF_TSTART=3 \
-DCLIENT_RETRY_COUNT=3 \
# ;-separated list \
-DCMAKE_AGPP_FLAGS="-D__NO_MATH_INLINES" \
# \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCONFIG_BOCHS_COMPRESS_STATE=ON \
-DCONFIG_BOCHS_NON_VERBOSE=OFF \
-DCONFIG_BOCHS_NO_ABORT=ON \
-DCONFIG_DISABLE_KEYB_INTERRUPTS=OFF \
-DCONFIG_EVENT_BREAKPOINTS=ON \
-DCONFIG_EVENT_BREAKPOINTS_RANGE=ON \
-DCONFIG_EVENT_GUESTSYS=ON \
-DCONFIG_EVENT_INTERRUPT=ON \
-DCONFIG_EVENT_IOPORT=ON \
-DCONFIG_EVENT_JUMP=OFF \
-DCONFIG_EVENT_MEMREAD=ON \
-DCONFIG_EVENT_MEMWRITE=ON \
-DCONFIG_EVENT_TRAP=ON \
-DCONFIG_FAST_BREAKPOINTS=ON \
-DCONFIG_FAST_WATCHPOINTS=ON \
-DCONFIG_FIRE_INTERRUPTS=ON \
-DCONFIG_INJECTIONPOINT_HOPS=OFF \
-DCONFIG_SR_REBOOT=ON \
-DCONFIG_SR_RESTORE=ON \
-DCONFIG_SR_SAVE=ON \
-DCONFIG_SUPPRESS_INTERRUPTS=ON \
-DENABLE_DATABASE_TESTS=OFF \
# ;-separated list \
-DEXPERIMENTS_ACTIVATED="generic-experiment" \
# \
-DLibIberty_INCLUDE_DIRS=/usr/include/libiberty \
-DLibIberty_LIBRARIES=/usr/lib/x86_64-linux-gnu/libiberty.a \
-DMYSQL_CONFIG=/usr/bin/mysql_config \
-DMYSQL_CONFIG_PREFER_PATH=/bin \
# ;-separated list \
-DPLUGINS_ACTIVATED="serialoutput" \
# \
-DSERVER_COMM_HOSTNAME=localhost \
-DSERVER_COMM_TCP_PORT=1111 \
-DSERVER_OUT_QUEUE_SIZE=0 \
-DSERVER_PERFORMANCE_MEASURE=OFF \
-DSERVER_PERF_LOG_PATH=perf.log \
-DSERVER_PERF_STEPPING_SEC=1 \
-DTEST_MYSQL_DATABASE=fail_test \
-DTEST_MYSQL_HOST=localhost \
-DTEST_MYSQL_PASSWORD=fail_test \
-DTEST_MYSQL_PORT=3306 \
-DTEST_MYSQL_USER=fail_test \
-DVERBOSE_MAKE=OFF \
-D_filename=/usr/include/wx-3.0/wx/version.h \
# ;-separated list \
-Dbochs_configure_params="--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-nogui;--with-x11;--with-wx;--with-sdl" \
# \
-Dbochs_install_prefix=/home/fail/fail/simulators/bochs/install \
..
# For the resultbrowser, we expose port 5000 to the outside world.
EXPOSE 5000
# We need to manually build Bochs first to generate the bochs/config.h - the external_project configure step
# (where this file is generated) is run at build time (not configure time), but the build order is not defined correctly.
# RUN cmake --build . --target libfailbochs_external-configure \
# && cmake --build .
RUN cmake --build . --target libfailbochs_external-configure -- -j$(nproc) \
&& cmake --build . -- -j$(nproc)
RUN ln -s /home/fail/fail/build/bin/fail-client /home/fail/bin/generic-experiment-client \
&& ln -s /home/fail/fail/build/bin/generic-experiment-server /home/fail/bin/ \
&& ln -s /home/fail/fail/tools/analysis/resultbrowser/run.py /home/fail/bin/resultbrowser.py
USER root
# Install additional packages
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin apt-get install -y --no-install-recommends \
grub-common \
xorriso \
grub-pc-bin \
mysql-client \
python2-minimal \
python2-dev \
# python2-flask \
# python2-mysqldb \
# python2-yaml \
unzip \
&& apt-get clean
# Fix old shebangs
RUN ln -sf /usr/bin/python2 /usr/bin/python
# Install python packages
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py \
&& python2 get-pip.py \
&& wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h \
&& pip2 install flask pyyaml MySQL-python
USER fail
# Clone FAIL* targets
# Break docker layer cache
ARG CACHE_DATE=1970-01-01
WORKDIR /home/fail
# RUN git clone https://github.com/danceos/fail-targets.git
RUN git clone https://gitea.vps.chriphost.de/christoph/fail-targets
USER root
# Resultbrowser
EXPOSE 5000

View File

@ -1,5 +1,5 @@
[client]
host=mysql
host=fail-db
user=fail
password=fail
database=fail

View File

@ -1,25 +1,114 @@
# Inherit from docker container that has the fail source code prepared,
# including all tools which are needed to build FAIL*
FROM danceos/fail-base
MAINTAINER Christian Dietrich <stettberger@dokucode.de>
LABEL org.opencontainers.image.authors="Christian Dietrich <stettberger@dokucode.de>"
USER fail
# Configure the Weather Monitor Experiment
ENV PATH /home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH=/home/fail/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WORKDIR /home/fail/fail
RUN mkdir build-tracer; cd build-tracer; ../configurations/x86_pruning.sh generic-tracing
RUN mkdir build-tracer && cd build-tracer
WORKDIR build-tracer
# Make FAIL*
RUN make -j$(getconf _NPROCESSORS_ONLN) || make -j$(getconf _NPROCESSORS_ONLN)
RUN cmake \
-DAGXX=/home/fail/bin/ag++ \
-DBOOST_THREAD_LIBRARY=/usr/lib/x86_64-linux-gnu/libpthread.so \
# Enable / Disable features \
-DBUILD_ARM=OFF \
-DBUILD_BOCHS=ON \
-DBUILD_CAPSTONE_DISASSEMBLER=OFF \
-DBUILD_COMPUTE_HOPS=OFF \
-DBUILD_CONVERT_TRACE=OFF \
-DBUILD_DATA_AGGREGATOR=OFF \
-DBUILD_DUMP_HOPS=OFF \
-DBUILD_DUMP_TRACE=ON \
-DBUILD_FAULTSPACEPLOT=OFF \
-DBUILD_GEM5=OFF \
-DBUILD_IMPORT_TRACE=ON \
-DBUILD_LLVM_DISASSEMBLER=ON \
-DBUILD_PANDA=OFF \
-DBUILD_PRUNE_TRACE=ON \
-DBUILD_QEMU=OFF \
-DBUILD_T32=OFF \
-DBUILD_X86=ON \
# \
-DCLIENT_JOB_INITIAL=1 \
-DCLIENT_JOB_LIMIT=1000 \
-DCLIENT_JOB_REQUEST_SEC=30 \
-DCLIENT_RAND_BACKOFF_TEND=8 \
-DCLIENT_RAND_BACKOFF_TSTART=3 \
-DCLIENT_RETRY_COUNT=3 \
# ;-separated list \
-DCMAKE_AGPP_FLAGS="-D__NO_MATH_INLINES" \
# \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCONFIG_BOCHS_COMPRESS_STATE=ON \
-DCONFIG_BOCHS_NON_VERBOSE=OFF \
-DCONFIG_BOCHS_NO_ABORT=ON \
-DCONFIG_DISABLE_KEYB_INTERRUPTS=OFF \
-DCONFIG_EVENT_BREAKPOINTS=ON \
-DCONFIG_EVENT_BREAKPOINTS_RANGE=ON \
-DCONFIG_EVENT_GUESTSYS=ON \
-DCONFIG_EVENT_INTERRUPT=ON \
-DCONFIG_EVENT_IOPORT=ON \
-DCONFIG_EVENT_JUMP=OFF \
-DCONFIG_EVENT_MEMREAD=ON \
-DCONFIG_EVENT_MEMWRITE=ON \
-DCONFIG_EVENT_TRAP=ON \
-DCONFIG_FAST_BREAKPOINTS=ON \
-DCONFIG_FAST_WATCHPOINTS=ON \
-DCONFIG_FIRE_INTERRUPTS=ON \
-DCONFIG_INJECTIONPOINT_HOPS=OFF \
-DCONFIG_SR_REBOOT=ON \
-DCONFIG_SR_RESTORE=ON \
-DCONFIG_SR_SAVE=ON \
-DCONFIG_SUPPRESS_INTERRUPTS=ON \
-DENABLE_DATABASE_TESTS=OFF \
# ;-separated list \
-DEXPERIMENTS_ACTIVATED="generic-tracing" \
# \
-DLibIberty_INCLUDE_DIRS=/usr/include/libiberty \
-DLibIberty_LIBRARIES=/usr/lib/x86_64-linux-gnu/libiberty.a \
-DMYSQL_CONFIG=/usr/bin/mysql_config \
-DMYSQL_CONFIG_PREFER_PATH=/bin \
# ;-separated list \
-DPLUGINS_ACTIVATED="tracing;serialoutput" \
# \
-DSERVER_COMM_HOSTNAME=localhost \
-DSERVER_COMM_TCP_PORT=1111 \
-DSERVER_OUT_QUEUE_SIZE=0 \
-DSERVER_PERFORMANCE_MEASURE=OFF \
-DSERVER_PERF_LOG_PATH=perf.log \
-DSERVER_PERF_STEPPING_SEC=1 \
-DTEST_MYSQL_DATABASE=fail_test \
-DTEST_MYSQL_HOST=localhost \
-DTEST_MYSQL_PASSWORD=fail_test \
-DTEST_MYSQL_PORT=3306 \
-DTEST_MYSQL_USER=fail_test \
-DVERBOSE_MAKE=OFF \
-D_filename=/usr/include/wx-3.0/wx/version.h \
# ;-separated list \
-Dbochs_configure_params="--enable-a20-pin;--enable-x86-64;--enable-cpu-level=6;--enable-ne2000;--enable-acpi;--enable-pci;--enable-usb;--enable-trace-cache;--enable-fast-function-calls;--enable-host-specific-asms;--enable-disasm;--enable-readline;--enable-clgd54xx;--enable-fpu;--enable-vmx=2;--enable-monitor-mwait;--enable-cdrom;--enable-sb16=linux;--enable-gdb-stub;--disable-docbook;--with-nogui;--with-x11;--with-wx;--with-sdl" \
# \
-Dbochs_install_prefix=/home/fail/fail/simulators/bochs/install \
..
RUN ln -s /home/fail/fail/build-tracer/bin/fail-client /home/fail/bin/fail-x86-tracing; \
ln -s /home/fail/fail/build-tracer/bin/import-trace /home/fail/bin/; \
ln -s /home/fail/fail/build-tracer/bin/prune-trace /home/fail/bin/; \
ln -s /home/fail/fail/build-tracer/bin/dump-trace /home/fail/bin/; \
ln -s /home/fail/fail/build-tracer/bin/convert-trace /home/fail/bin/; \
cp /home/fail/fail/tools/bochs-experiment-runner/bochs-experiment-runner.py /home/fail/bin/bochs-experiment-runner.py; \
chmod a+x /home/fail/bin/bochs-experiment-runner.py;
# We need to manually build Bochs first to generate the bochs/config.h - the external_project configure step
# (where this file is generated) is run at build time (not configure time), but the build order is not defined correctly.
# RUN cmake --build . --target libfailbochs_external-configure \
# && cmake --build .
RUN cmake --build . --target libfailbochs_external-configure -- -j$(nproc) \
&& cmake --build . -- -j$(nproc)
RUN ln -s /home/fail/fail/build-tracer/bin/fail-client /home/fail/bin/generic-tracing-client \
&& ln -s /home/fail/fail/build-tracer/bin/import-trace /home/fail/bin/ \
&& ln -s /home/fail/fail/build-tracer/bin/prune-trace /home/fail/bin/ \
&& ln -s /home/fail/fail/build-tracer/bin/dump-trace /home/fail/bin/ \
&& ln -s /home/fail/fail/build-tracer/bin/convert-trace /home/fail/bin/ \
&& ln -s /home/fail/fail/tools/bochs-experiment-runner/bochs-experiment-runner.py /home/fail/bin/ \
&& chmod a+x /home/fail/bin/bochs-experiment-runner.py
USER root

162
scripts/fail-cleanup-db.sh Executable file
View File

@ -0,0 +1,162 @@
#!/bin/bash
#
# This script removes dangling rows from the database, for example 'trace'
# entries with a variant_id not mentioned in the 'variants' table, or result
# rows referencing a nonexistent 'fsppilot' entry. IOW, this script enforces
# referential integrity as it would be maintained by foreign key constraints
# (that can only be used with InnoDB tables).
#
if [ -z "$1" -o -z "$2" ]
then
echo "usage: $0 dbname resulttable" >&2
exit 1
fi
DB=$1
RESULT=$2
MYSQL=mysql
function table_exists()
{
N=$(echo "SHOW TABLES LIKE '$1'" | $MYSQL $DB | wc -l)
[ $N -gt 0 ]
return
}
if table_exists trace
then
echo -n "removing widowed entries in trace ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM trace
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists fsppilot
then
echo -n "removing widowed entries in fsppilot ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE p FROM fsppilot p
LEFT JOIN trace t
ON p.variant_id = t.variant_id
AND p.instr2 = t.instr2
AND p.data_address = t.data_address
WHERE t.variant_id IS NULL;
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists fspgroup
then
echo -n "removing widowed entries in fspgroup ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE g FROM fspgroup g
LEFT JOIN fsppilot p
ON g.pilot_id = p.id
WHERE p.id IS NULL;
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists $RESULT
then
echo -n "removing widowed entries in $RESULT ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE r FROM $RESULT r
LEFT JOIN fsppilot p
ON r.pilot_id = p.id
WHERE p.id IS NULL;
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists objdump
then
echo -n "removing widowed entries in objdump ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM objdump
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists fulltrace
then
echo -n "removing widowed entries in fulltrace ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM fulltrace
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists dbg_source
then
echo -n "removing widowed entries in dbg_source ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM dbg_source
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists dbg_filename
then
echo -n "removing widowed entries in dbg_filename ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM dbg_filename
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists dbg_mapping
then
echo -n "removing widowed entries in dbg_mapping ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM dbg_mapping
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
if table_exists symbol
then
echo -n "removing widowed entries in symbol ..."
echo " "$(
$MYSQL $DB <<EOT
DELETE FROM symbol
WHERE variant_id NOT IN
(SELECT id FROM variant);
SELECT ROW_COUNT() AS "deleted rows:";
EOT
)
fi
echo "done. Consider running \`mysqloptimize $DB' now."

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# fail-env.sh
# default values for several Fail* environment variables
# default values for several FAIL* environment variables
# If you want to set your own defaults, or need a script to source from, e.g.,
# your ~/.bashrc, please copy this file and do not edit it in-place.
#
@ -9,16 +9,16 @@
# A whitespace-separated list of hosts to rsync the experiment data to. This
# is not necessarily the same list as FAIL_EXPERIMENT_HOSTS (see below), as
# many hosts may share their homes via NFS.
export FAIL_DISTRIBUTE_HOSTS=${FAIL_DISTRIBUTE_HOSTS:="ios kos virtuos plutonium bigbox.informatik.uni-erlangen.de ls12sp $(for hostnr in $(seq 39 58); do echo -n cloudhost$hostnr\ ; done)"}
export FAIL_DISTRIBUTE_HOSTS=${FAIL_DISTRIBUTE_HOSTS:-"ios kos virtuos plutonium bigbox.informatik.uni-erlangen.de ls12sp $(for hostnr in $(seq 39 58); do echo -n cloudhost$hostnr\ ; done)"}
# A whitespace-separated list of hosts to run experiments on. If the host name
# is followed by a ':' and a number, this specifies the number of clients to
# run on that host (defaults to #CPUs).
export FAIL_EXPERIMENT_HOSTS=${FAIL_EXPERIMENT_HOSTS:="bigbox.informatik.uni-erlangen.de plutonium:4 uran:4 virtuos ios:32 kos:16 bohrium:12 polonium:12 radon $(for hostnr in $(seq 100 254); do echo -n fiws$hostnr\ ; done) $(for hostnr in $(seq 39 58); do echo -n cloudhost$hostnr\ ; done)"}
export FAIL_EXPERIMENT_HOSTS=${FAIL_EXPERIMENT_HOSTS:-"bigbox.informatik.uni-erlangen.de plutonium:4 uran:4 virtuos ios:32 kos:16 bohrium:12 polonium:12 radon $(for hostnr in $(seq 100 254); do echo -n fiws$hostnr\ ; done) $(for hostnr in $(seq 39 58); do echo -n cloudhost$hostnr\ ; done)"}
# A homedir-relative directory on the distribution hosts where all necessary
# Fail* ingredients reside (see multiple-clients.sh).
export FAIL_EXPERIMENT_TARGETDIR=${FAIL_EXPERIMENT_TARGETDIR:=.fail-experiment}
# FAIL* ingredients reside (see multiple-clients.sh).
export FAIL_EXPERIMENT_TARGETDIR=${FAIL_EXPERIMENT_TARGETDIR:-.fail-experiment}
# Number of parallel build processes. If unset, #CPUs+1.
if [ -z "$FAIL_BUILD_PARALLEL" ]; then

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# ab-fail-env.sh (Adrian Böckenkamp)
# default values for several Fail* environment variables
# default values for several FAIL* environment variables
#
# A whitespace-separated list of hosts to rsync the experiment data to. This
@ -15,5 +15,5 @@ export FAIL_DISTRIBUTE_HOSTS=${FAIL_DISTRIBUTE_HOSTS:='kos plutonium'}
export FAIL_EXPERIMENT_HOSTS=${FAIL_EXPERIMENT_HOSTS:="plutonium uran kos:6 bohrium polonium radon $(for hostnr in $(seq 100 254); do echo fiws$hostnr; done)"}
# A homedir-relative directory on the distribution hosts where all necessary
# Fail* ingredients reside (see multiple-clients.sh).
# FAIL* ingredients reside (see multiple-clients.sh).
export FAIL_EXPERIMENT_TARGETDIR=.fail-experiment

View File

@ -1,15 +1,15 @@
#!/bin/bash
#
# - needs to be called from within your build directory
# - "rebuild-bochs.sh": rebuild all of both Fail* and Bochs
# - "rebuild-bochs.sh": rebuild all of both FAIL* and Bochs
# (e.g., possibly necessary if you don't understand what was changed by others)
# - "rebuild-bochs.sh fail": rebuild all of Fail* and link fail-client
# - "rebuild-bochs.sh fail": rebuild all of FAIL* and link fail-client
# (e.g., possibly necessary if you changed Fail-affecting aspects or the
# build system)
# - "rebuild-bochs.sh bochs": rebuild all of Bochs and link fail-client
# (e.g., necessary if you changed Bochs-affecting aspects/code that must be
# inlined in Bochs)
# - "rebuild-bochs.sh -": rebuild only changed parts of Fail* and Bochs
# - "rebuild-bochs.sh -": rebuild only changed parts of FAIL* and Bochs
# (e.g., sufficient if you only changed experiment code)
#
set -e

View File

@ -2,16 +2,16 @@
if(EXISTS $ENV{T32SYS})
SET(T32_SYS $ENV{T32SYS})
message(STATUS "[Fail*] T32 base directory: T32SYS=${T32_SYS}")
message(STATUS "[FAIL*] T32 base directory: T32SYS=${T32_SYS}")
else()
SET(T32_SYS "/proj/i4ciao/tools/t32-20130226-qt") ## defaulting to I4 installation
#message(FATAL_ERROR "Please set env variable T32SYS to a valid T32 installation base directory.")
endif()
message(STATUS "[Fail*] T32 base directory: T32SYS=${T32_SYS}")
message(STATUS "[FAIL*] T32 base directory: T32SYS=${T32_SYS}")
if(EXISTS $ENV{FAIL_ELF_PATH})
SET(T32_ELF_PATH $ENV{FAIL_ELF_PATH})
message(STATUS "[Fail*] T32 ELF under test: ${T32_ELF_PATH}")
message(STATUS "[FAIL*] T32 ELF under test: ${T32_ELF_PATH}")
else()
message(FATAL_ERROR "Please set the FAIL_ELF_PATH enviroment variable to the binary under test.")
endif()
@ -34,9 +34,9 @@ set(T32_EXE "${T32_SYS}/bin/pc_linux64/" CACHE INTERNAL "") # TODO: set pc_linux
add_subdirectory(${T32_ARCHITECTURE})
message(STATUS "[Fail*] T32 Architecture: ${T32_ARCHITECTURE}")
message(STATUS "[Fail*] T32 CPU name: ${T32_CPUNAME}")
message(STATUS "[Fail*] T32 Executable: ${T32_EXE}")
message(STATUS "[FAIL*] T32 Architecture: ${T32_ARCHITECTURE}")
message(STATUS "[FAIL*] T32 CPU name: ${T32_CPUNAME}")
message(STATUS "[FAIL*] T32 Executable: ${T32_EXE}")
add_custom_target(runt32
COMMAND T32CONFIG=${PROJECT_BINARY_DIR}/cmm/config.t32 T32SYS=${T32_SYS} ${T32_EXE} &

View File

@ -908,11 +908,11 @@ void bx_dbg_info_segment_regs_command(void)
(unsigned) sreg.des_l, (unsigned) sreg.valid);
BX_CPU(dbg_cpu)->dbg_get_gdtr(&global_sreg);
dbg_printf("gdtr:base=0x"FMT_ADDRX", limit=0x%x\n",
dbg_printf("gdtr:base=0x" FMT_ADDRX ", limit=0x%x\n",
global_sreg.base, (unsigned) global_sreg.limit);
BX_CPU(dbg_cpu)->dbg_get_idtr(&global_sreg);
dbg_printf("idtr:base=0x"FMT_ADDRX", limit=0x%x\n",
dbg_printf("idtr:base=0x" FMT_ADDRX ", limit=0x%x\n",
global_sreg.base, (unsigned) global_sreg.limit);
}
@ -1610,18 +1610,18 @@ void bx_dbg_print_watchpoints(void)
// print watch point info
for (i = 0; i < num_read_watchpoints; i++) {
if (BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), read_watchpoint[i].addr, 2, buf))
dbg_printf("rd 0x"FMT_PHY_ADDRX" len=%d\t\t(%04x)\n",
dbg_printf("rd 0x" FMT_PHY_ADDRX " len=%d\t\t(%04x)\n",
read_watchpoint[i].addr, read_watchpoint[i].len, (int)buf[0] | ((int)buf[1] << 8));
else
dbg_printf("rd 0x"FMT_PHY_ADDRX" len=%d\t\t(read error)\n",
dbg_printf("rd 0x" FMT_PHY_ADDRX " len=%d\t\t(read error)\n",
read_watchpoint[i].addr, read_watchpoint[i].len);
}
for (i = 0; i < num_write_watchpoints; i++) {
if (BX_MEM(0)->dbg_fetch_mem(BX_CPU(dbg_cpu), write_watchpoint[i].addr, 2, buf))
dbg_printf("wr 0x"FMT_PHY_ADDRX" len=%d\t\t(%04x)\n",
dbg_printf("wr 0x" FMT_PHY_ADDRX " len=%d\t\t(%04x)\n",
write_watchpoint[i].addr, write_watchpoint[i].len, (int)buf[0] | ((int)buf[1] << 8));
else
dbg_printf("rd 0x"FMT_PHY_ADDRX" len=%d\t\t(read error)\n",
dbg_printf("rd 0x" FMT_PHY_ADDRX " len=%d\t\t(read error)\n",
write_watchpoint[i].addr, write_watchpoint[i].len);
}
}
@ -1861,7 +1861,7 @@ void bx_dbg_disassemble_current(int which_cpu, int print_time)
dbg_printf("(%u) ", which_cpu);
if (BX_CPU(which_cpu)->protected_mode()) {
dbg_printf("[0x"FMT_PHY_ADDRX"] %04x:" FMT_ADDRX " (%s): ",
dbg_printf("[0x" FMT_PHY_ADDRX "] %04x:" FMT_ADDRX " (%s): ",
phy, BX_CPU(which_cpu)->guard_found.cs,
BX_CPU(which_cpu)->guard_found.eip,
bx_dbg_symbolic_address(BX_CPU(which_cpu)->cr3 >> 12,
@ -1869,7 +1869,7 @@ void bx_dbg_disassemble_current(int which_cpu, int print_time)
BX_CPU(which_cpu)->get_segment_base(BX_SEG_REG_CS)));
}
else { // Real & V86 mode
dbg_printf("[0x"FMT_PHY_ADDRX"] %04x:%04x (%s): ",
dbg_printf("[0x" FMT_PHY_ADDRX "] %04x:%04x (%s): ",
phy, BX_CPU(which_cpu)->guard_found.cs,
(unsigned) BX_CPU(which_cpu)->guard_found.eip,
bx_dbg_symbolic_address_16bit(BX_CPU(which_cpu)->guard_found.eip,
@ -2250,7 +2250,7 @@ void bx_dbg_info_bpoints_command(void)
dbg_printf("pbreakpoint ");
dbg_printf("keep ");
dbg_printf(bx_guard.iaddr.phy[i].enabled?"y ":"n ");
dbg_printf("0x"FMT_PHY_ADDRX"\n", bx_guard.iaddr.phy[i].addr);
dbg_printf("0x" FMT_PHY_ADDRX "\n", bx_guard.iaddr.phy[i].addr);
}
#endif
}
@ -2973,7 +2973,7 @@ void bx_dbg_print_descriptor64(Bit32u lo1, Bit32u hi1, Bit32u lo2, Bit32u hi2)
break;
default:
// task, int, trap, or call gate.
dbg_printf("target=0x%04x:"FMT_ADDRX", DPL=%d", segment, offset, dpl);
dbg_printf("target=0x%04x:" FMT_ADDRX ", DPL=%d", segment, offset, dpl);
break;
}
}
@ -3464,7 +3464,7 @@ void bx_dbg_dump_table(void)
return;
}
printf("cr3: 0x"FMT_PHY_ADDRX"\n", BX_CPU(dbg_cpu)->cr3);
printf("cr3: 0x" FMT_PHY_ADDRX "\n", BX_CPU(dbg_cpu)->cr3);
lin = 0;
phy = 0;
@ -3476,14 +3476,14 @@ void bx_dbg_dump_table(void)
if(valid) {
if((lin - start_lin) != (phy - start_phy)) {
if(start_lin != 1)
dbg_printf("0x%08x-0x%08x -> 0x"FMT_PHY_ADDRX"-0x"FMT_PHY_ADDRX"\n",
dbg_printf("0x%08x-0x%08x -> 0x" FMT_PHY_ADDRX "-0x" FMT_PHY_ADDRX "\n",
start_lin, lin - 1, start_phy, start_phy + (lin-1-start_lin));
start_lin = lin;
start_phy = phy;
}
} else {
if(start_lin != 1)
dbg_printf("0x%08x-0x%08x -> 0x"FMT_PHY_ADDRX"-0x"FMT_PHY_ADDRX"\n",
dbg_printf("0x%08x-0x%08x -> 0x" FMT_PHY_ADDRX "-0x" FMT_PHY_ADDRX "\n",
start_lin, lin - 1, start_phy, start_phy + (lin-1-start_lin));
start_lin = 1;
start_phy = 2;
@ -3493,7 +3493,7 @@ void bx_dbg_dump_table(void)
lin += 0x1000;
}
if(start_lin != 1)
dbg_printf("0x%08x-0x%08x -> 0x"FMT_PHY_ADDRX"-0x"FMT_PHY_ADDRX"\n",
dbg_printf("0x%08x-0x%08x -> 0x" FMT_PHY_ADDRX "-0x" FMT_PHY_ADDRX "\n",
start_lin, 0xffffffff, start_phy, start_phy + (0xffffffff-start_lin));
}

View File

@ -3477,7 +3477,7 @@ int bx_write_atadevice_options(FILE *fp, Bit8u channel, Bit8u drive, bx_list_c *
fprintf(fp, ", biosdetect=%s", SIM->get_param_enum("biosdetect", base)->get_selected());
if (SIM->get_param_string("model", base)->getptr()>0) {
if (SIM->get_param_string("model", base)->getptr()) {
fprintf(fp, ", model=\"%s\"", SIM->get_param_string("model", base)->getptr());
}

File diff suppressed because it is too large Load Diff

View File

@ -1915,9 +1915,16 @@ if test x$WX_CONFIG != xnot_found; then
case x$WX_BASENAME in
xwx_gtk2|xwx_gtk2u) wx_needs_gtk2=1 ;;
*) ;;
x3*) # version 3
ok_wx_version=1
wx_multi_lib=1
case x$WX_BASENAME in
xwx_gtk2|xwx_gtk2u) wx_needs_gtk2=1 ;;
*) ;;
esac
;;
esac
;;
x[3-9]*) ok_wx_version=1 ;; # version 3 or greater
*) ;; # who knows?
esac
]

View File

@ -151,16 +151,22 @@ void BX_CPU_C::cpu_loop(Bit32u max_instr_count)
debug_disasm_instruction(BX_CPU_THIS_PTR prev_rip);
}
#endif
#if 0
// DanceOS: Save original instruction length in case we modify the instruction.
unsigned orig_len = i->ilen();
#endif
// DanceOS: Aspect "hook"
defineCPULoopJoinPoint(BX_CPU_THIS, i);
// instruction decoding completed -> continue with execution
// want to allow changing of the instruction inside instrumentation callback
BX_INSTR_BEFORE_EXECUTION(BX_CPU_ID, i);
#if 0
// DanceOS: Use original length (see above).
RIP += orig_len;
#else
RIP += i->ilen();
#endif
BX_CPU_CALL_METHOD(i->execute, (i)); // might iterate repeat instruction
BX_CPU_THIS_PTR prev_rip = RIP; // commit new RIP
BX_INSTR_AFTER_EXECUTION(BX_CPU_ID, i);
@ -645,6 +651,29 @@ unsigned BX_CPU_C::handleAsyncEvent(void)
// Code page fault (priority 7 on 486/Pentium)
// (handled in main decode loop)
// Now we can handle things which are synchronous to instruction
// execution.
if (BX_CPU_THIS_PTR get_RF()) {
BX_CPU_THIS_PTR clear_RF();
}
#if BX_X86_DEBUGGER
else {
// only bother comparing if any breakpoints enabled and
// debug events are not inhibited on this boundary.
if (! (BX_CPU_THIS_PTR inhibit_mask & BX_INHIBIT_DEBUG_SHADOW) && ! BX_CPU_THIS_PTR in_repeat) {
code_breakpoint_match(get_laddr(BX_SEG_REG_CS, BX_CPU_THIS_PTR prev_rip));
}
}
#endif
if (BX_CPU_THIS_PTR get_TF())
{
// TF is set before execution of next instruction. Schedule
// a debug trap (#DB) after execution. After completion of
// next instruction, the code above will invoke the trap.
BX_CPU_THIS_PTR debug_trap |= BX_DEBUG_SINGLE_STEP_BIT;
}
// Priority 7: Faults from decoding next instruction
// Instruction length > 15 bytes
// Illegal opcode
@ -663,38 +692,6 @@ unsigned BX_CPU_C::handleAsyncEvent(void)
// Alignment check
// (handled by rest of the code)
// Now we can handle things which are synchronous to instruction
// execution.
if (BX_CPU_THIS_PTR get_RF()) {
BX_CPU_THIS_PTR clear_RF();
}
#if BX_X86_DEBUGGER
else {
// only bother comparing if any breakpoints enabled and
// debug events are not inhibited on this boundary.
if (! (BX_CPU_THIS_PTR inhibit_mask & BX_INHIBIT_DEBUG_SHADOW) && ! BX_CPU_THIS_PTR in_repeat) {
if (BX_CPU_THIS_PTR dr7 & 0x000000ff) {
bx_address iaddr = get_laddr(BX_SEG_REG_CS, BX_CPU_THIS_PTR prev_rip);
Bit32u dr6_bits = hwdebug_compare(iaddr, 1, BX_HWDebugInstruction, BX_HWDebugInstruction);
if (dr6_bits) {
// Add to the list of debug events thus far.
BX_CPU_THIS_PTR debug_trap |= dr6_bits;
BX_ERROR(("#DB: x86 code breakpoint catched"));
exception(BX_DB_EXCEPTION, 0); // no error, not interrupt
}
}
}
}
#endif
if (BX_CPU_THIS_PTR get_TF())
{
// TF is set before execution of next instruction. Schedule
// a debug trap (#DB) after execution. After completion of
// next instruction, the code above will invoke the trap.
BX_CPU_THIS_PTR debug_trap |= BX_DEBUG_SINGLE_STEP_BIT;
}
if (!((BX_CPU_INTR && BX_CPU_THIS_PTR get_IF()) ||
BX_CPU_THIS_PTR debug_trap ||
// BX_CPU_THIS_PTR get_TF() // implies debug_trap is set

View File

@ -3267,6 +3267,7 @@ public: // for now...
// x86 hardware debug support
BX_SMF bx_bool hwbreakpoint_check(bx_address laddr);
BX_SMF void iobreakpoint_match(unsigned port, unsigned len);
BX_SMF void code_breakpoint_match(bx_address laddr);
BX_SMF void hwbreakpoint_match(bx_address laddr, unsigned len, unsigned rw);
BX_SMF Bit32u hwdebug_compare(bx_address laddr, unsigned len,
unsigned opa, unsigned opb);

View File

@ -1192,6 +1192,19 @@ bx_bool BX_CPU_C::hwbreakpoint_check(bx_address laddr)
return 0;
}
void BX_CPU_C::code_breakpoint_match(bx_address laddr)
{
if (BX_CPU_THIS_PTR dr7 & 0x000000ff) {
Bit32u dr6_bits = hwdebug_compare(iaddr, 1, BX_HWDebugInstruction, BX_HWDebugInstruction);
if (dr6_bits) {
// Add to the list of debug events thus far.
BX_CPU_THIS_PTR debug_trap |= dr6_bits;
BX_ERROR(("#DB: x86 code breakpoint catched"));
exception(BX_DB_EXCEPTION, 0); // no error, not interrupt
}
}
}
void BX_CPU_C::hwbreakpoint_match(bx_address laddr, unsigned len, unsigned rw)
{
if (BX_CPU_THIS_PTR dr7 & 0x000000ff) {

View File

@ -2012,7 +2012,7 @@ modrm_done:
OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[b3]);
break;
case BxOSizeGrp:
OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[offset >> 8]);
OpcodeInfoPtr = &(OpcodeInfoPtr->AnotherArray[offset >> 9]);
break;
case BxPrefixSSE:
/* For SSE opcodes look into another table

View File

@ -424,7 +424,7 @@ void BX_CPU_C::TLB_invlpg(bx_address laddr)
{
invalidate_prefetch_q();
BX_DEBUG(("TLB_invlpg(0x"FMT_ADDRX"): invalidate TLB entry", laddr));
BX_DEBUG(("TLB_invlpg(0x" FMT_ADDRX "): invalidate TLB entry", laddr));
#if BX_CPU_LEVEL >= 5
bx_bool large = 0;

View File

@ -292,7 +292,7 @@ bx_shadow_num_c::bx_shadow_num_c(bx_param_c *parent,
val.p64bit = ptr_to_real_val;
if (base == BASE_HEX) {
this->base = base;
this->text_format = "0x"FMT_LL"x";
this->text_format = "0x" FMT_LL "x";
}
}
@ -311,7 +311,7 @@ bx_shadow_num_c::bx_shadow_num_c(bx_param_c *parent,
val.p64bit = (Bit64s*) ptr_to_real_val;
if (base == BASE_HEX) {
this->base = base;
this->text_format = "0x"FMT_LL"x";
this->text_format = "0x" FMT_LL "x";
}
}

View File

@ -1200,7 +1200,7 @@ bx_bool bx_real_sim_c::save_sr_param(FILE *fp, bx_param_c *node, const char *sr_
fprintf(fp, node->get_format(), value);
} else {
if ((Bit64u)((bx_param_num_c*)node)->get_max() > BX_MAX_BIT32U) {
fprintf(fp, "0x"FMT_LL"x", (Bit64u) value);
fprintf(fp, "0x" FMT_LL "x", (Bit64u) value);
} else {
fprintf(fp, "0x%x", (Bit32u) value);
}

View File

@ -1706,3 +1706,5 @@ static Bit32u convertStringToGDKKey (const char *string)
#endif
#endif /* if BX_WITH_WX */
#undef Status

View File

@ -2624,3 +2624,5 @@ BxEvent *x11_notify_callback (void *unused, BxEvent *event)
}
#endif /* if BX_WITH_X11 */
#undef Status

View File

@ -699,6 +699,10 @@ void bx_dma_c::raise_HLDA(void)
// wait till they're unmasked
return;
}
if (!BX_DMA_THIS s[ma_sl].chan[channel].used) {
//BX_PANIC(("hlda: channel %d not connected to device", channel));
return;
}
//BX_DEBUG(("hlda: OK in response to DRQ(%u)", (unsigned) channel));
phy_addr = (BX_DMA_THIS s[ma_sl].chan[channel].page_reg << 16) |

View File

@ -1245,8 +1245,10 @@ void bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
break;
case 0xa0: // PACKET
if (BX_SELECTED_CONTROLLER(channel).buffer_index >= PACKET_SIZE)
if (BX_SELECTED_CONTROLLER(channel).buffer_index >= PACKET_SIZE) {
BX_PANIC(("IO write(0x%04x): buffer_index >= PACKET_SIZE", address));
return;
}
switch (io_len) {
case 4:
@ -1403,24 +1405,24 @@ void bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
init_mode_sense_single(channel, &BX_SELECTED_CONTROLLER(channel).buffer[8], 28);
BX_SELECTED_CONTROLLER(channel).buffer[8] = 0x2a;
BX_SELECTED_CONTROLLER(channel).buffer[9] = 0x12;
BX_SELECTED_CONTROLLER(channel).buffer[10] = 0x00;
BX_SELECTED_CONTROLLER(channel).buffer[10] = 0x03;
BX_SELECTED_CONTROLLER(channel).buffer[11] = 0x00;
// Multisession, Mode 2 Form 2, Mode 2 Form 1
BX_SELECTED_CONTROLLER(channel).buffer[12] = 0x70;
// Multisession, Mode 2 Form 2, Mode 2 Form 1, Audio
BX_SELECTED_CONTROLLER(channel).buffer[12] = 0x71;
BX_SELECTED_CONTROLLER(channel).buffer[13] = (3 << 5);
BX_SELECTED_CONTROLLER(channel).buffer[14] = (unsigned char) (1 |
(BX_SELECTED_DRIVE(channel).cdrom.locked ? (1 << 1) : 0) |
(1 << 3) |
(1 << 5));
BX_SELECTED_CONTROLLER(channel).buffer[15] = 0x00;
BX_SELECTED_CONTROLLER(channel).buffer[16] = (706 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[17] = 706 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[16] = ((16 * 176) >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[17] = (16 * 176) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[18] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[19] = 2;
BX_SELECTED_CONTROLLER(channel).buffer[20] = (512 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[21] = 512 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[22] = (706 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[23] = 706 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[22] = ((16 * 176) >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[23] = (16 * 176) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[24] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[25] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[26] = 0;
@ -1481,24 +1483,24 @@ void bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
init_mode_sense_single(channel, &BX_SELECTED_CONTROLLER(channel).buffer[8], 28);
BX_SELECTED_CONTROLLER(channel).buffer[8] = 0x2a;
BX_SELECTED_CONTROLLER(channel).buffer[9] = 0x12;
BX_SELECTED_CONTROLLER(channel).buffer[10] = 0x00;
BX_SELECTED_CONTROLLER(channel).buffer[10] = 0x03;
BX_SELECTED_CONTROLLER(channel).buffer[11] = 0x00;
// Multisession, Mode 2 Form 2, Mode 2 Form 1
BX_SELECTED_CONTROLLER(channel).buffer[12] = 0x70;
// Multisession, Mode 2 Form 2, Mode 2 Form 1, Audio
BX_SELECTED_CONTROLLER(channel).buffer[12] = 0x71;
BX_SELECTED_CONTROLLER(channel).buffer[13] = (3 << 5);
BX_SELECTED_CONTROLLER(channel).buffer[14] = (unsigned char) (1 |
(BX_SELECTED_DRIVE(channel).cdrom.locked ? (1 << 1) : 0) |
(1 << 3) |
(1 << 5));
BX_SELECTED_CONTROLLER(channel).buffer[15] = 0x00;
BX_SELECTED_CONTROLLER(channel).buffer[16] = (706 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[17] = 706 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[16] = ((16 * 176) >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[17] = (16 * 176) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[18] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[19] = 2;
BX_SELECTED_CONTROLLER(channel).buffer[20] = (512 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[21] = 512 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[22] = (706 >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[23] = 706 & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[22] = ((16 * 176) >> 8) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[23] = (16 * 176) & 0xff;
BX_SELECTED_CONTROLLER(channel).buffer[24] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[25] = 0;
BX_SELECTED_CONTROLLER(channel).buffer[26] = 0;
@ -1527,14 +1529,11 @@ void bx_hard_drive_c::write(Bit32u address, Bit32u value, unsigned io_len)
}
break;
default:
case 0x3: // saved values not implemented
atapi_cmd_error(channel, SENSE_ILLEGAL_REQUEST, ASC_SAVING_PARAMETERS_NOT_SUPPORTED, 1);
raise_interrupt(channel);
break;
default:
BX_PANIC(("Should not get here!"));
break;
}
}
break;
@ -3120,7 +3119,7 @@ void bx_hard_drive_c::init_mode_sense_single(Bit8u channel, const void* src, int
BX_SELECTED_CONTROLLER(channel).buffer[7] = 0; // reserved
// Data
memcpy(BX_SELECTED_CONTROLLER(channel).buffer + 8, src, size);
memmove(BX_SELECTED_CONTROLLER(channel).buffer + 8, src, size);
}
void BX_CPP_AttrRegparmN(1)

View File

@ -301,6 +301,14 @@ void bx_pci_ide_c::timer()
BX_PIDE_THIS s.bmdma[channel].prd_current = 0;
DEV_hd_bmdma_complete(channel);
} else {
// To avoid buffer overflow reset buffer pointers and copy data if necessary
count = BX_PIDE_THIS s.bmdma[channel].buffer_top - BX_PIDE_THIS s.bmdma[channel].buffer_idx;
if (count > 0) {
memmove(BX_PIDE_THIS s.bmdma[channel].buffer, BX_PIDE_THIS s.bmdma[channel].buffer_idx, count);
}
BX_PIDE_THIS s.bmdma[channel].buffer_top = BX_PIDE_THIS s.bmdma[channel].buffer + count;
BX_PIDE_THIS s.bmdma[channel].buffer_idx = BX_PIDE_THIS s.bmdma[channel].buffer;
// Prepare for next PRD
BX_PIDE_THIS s.bmdma[channel].prd_current += 8;
DEV_MEM_READ_PHYSICAL(BX_PIDE_THIS s.bmdma[channel].prd_current, 4, (Bit8u *)&prd.addr);
DEV_MEM_READ_PHYSICAL(BX_PIDE_THIS s.bmdma[channel].prd_current+4, 4, (Bit8u *)&prd.size);

View File

@ -136,7 +136,7 @@ void bx_pit_c::init(void)
BX_DEBUG(("finished init"));
BX_DEBUG(("s.last_usec="FMT_LL"d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.last_usec=" FMT_LL "d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.timer_id=%d",BX_PIT_THIS s.timer_handle[0]));
BX_DEBUG(("s.timer.get_next_event_time=%d",BX_PIT_THIS s.timer.get_next_event_time()));
BX_DEBUG(("s.last_next_event_time=%d",BX_PIT_THIS s.last_next_event_time));
@ -191,7 +191,7 @@ void bx_pit_c::handle_timer()
}
BX_PIT_THIS s.last_next_event_time = BX_PIT_THIS s.timer.get_next_event_time();
}
BX_DEBUG(("s.last_usec="FMT_LL"d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.last_usec=" FMT_LL "d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.timer_id=%d",BX_PIT_THIS s.timer_handle[0]));
BX_DEBUG(("s.timer.get_next_event_time=%x",BX_PIT_THIS s.timer.get_next_event_time()));
BX_DEBUG(("s.last_next_event_time=%d",BX_PIT_THIS s.last_next_event_time));
@ -325,7 +325,7 @@ void bx_pit_c::write(Bit32u address, Bit32u dvalue, unsigned io_len)
}
BX_PIT_THIS s.last_next_event_time = BX_PIT_THIS s.timer.get_next_event_time();
}
BX_DEBUG(("s.last_usec="FMT_LL"d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.last_usec=" FMT_LL "d",BX_PIT_THIS s.last_usec));
BX_DEBUG(("s.timer_id=%d",BX_PIT_THIS s.timer_handle[0]));
BX_DEBUG(("s.timer.get_next_event_time=%x",BX_PIT_THIS s.timer.get_next_event_time()));
BX_DEBUG(("s.last_next_event_time=%d",BX_PIT_THIS s.last_next_event_time));

View File

@ -1,3 +1,4 @@
#pragma clang diagnostic ignored "-Wc++11-narrowing"
/////////////////////////////////////////////////////////////////////////
// $Id$
/////////////////////////////////////////////////////////////////////////

View File

@ -663,7 +663,7 @@ Bit32s scsi_device_t::scsi_send_command(Bit32u tag, Bit8u *buf, int lun)
case 0x08:
case 0x28:
case 0x88:
BX_DEBUG(("Read (sector "FMT_LL"d, count %d)", lba, len));
BX_DEBUG(("Read (sector " FMT_LL "d, count %d)", lba, len));
if (lba > max_lba)
goto illegal_lba;
r->sector = lba;
@ -672,7 +672,7 @@ Bit32s scsi_device_t::scsi_send_command(Bit32u tag, Bit8u *buf, int lun)
case 0x0a:
case 0x2a:
case 0x8a:
BX_DEBUG(("Write (sector "FMT_LL"d, count %d)", lba, len));
BX_DEBUG(("Write (sector " FMT_LL "d, count %d)", lba, len));
if (lba > max_lba)
goto illegal_lba;
r->sector = lba;
@ -680,7 +680,7 @@ Bit32s scsi_device_t::scsi_send_command(Bit32u tag, Bit8u *buf, int lun)
is_write = 1;
break;
case 0x35:
BX_DEBUG(("Syncronise cache (sector "FMT_LL"d, count %d)", lba, len));
BX_DEBUG(("Syncronise cache (sector " FMT_LL "d, count %d)", lba, len));
// TODO: flush cache
break;
case 0x43:

View File

@ -448,7 +448,7 @@ int bx_sound_linux_c::alsa_pcm_write()
BX_ERROR(("ALSA: short write, write %d frames", ret));
}
audio_bufsize -= alsa_bufsize;
memcpy(audio_buffer, audio_buffer+alsa_bufsize, audio_bufsize);
memmove(audio_buffer, audio_buffer+alsa_bufsize, audio_bufsize);
}
if ((audio_bufsize == 0) && (alsa_buffer != NULL)) {
free(alsa_buffer);

View File

@ -558,7 +558,7 @@ void bx_vga_c::determine_screen_dimensions(unsigned *piHeight, unsigned *piWidth
{
int ai[0x20];
int i,h,v;
for (i = 0 ; i < 0x20 ; i++)
for (i = 0 ; i < 0x19 ; i++)
ai[i] = BX_VGA_THIS s.CRTC.reg[i];
h = (ai[1] + 1) * 8;

View File

@ -529,7 +529,7 @@ void bx_virt_timer_c::timer_handler(void)
printf("useconds: " FMT_LL "u, ", temp1);
printf("expect ticks: " FMT_LL "u, ", temp2);
printf("ticks: " FMT_LL "u, ", temp3);
printf("diff: "FMT_LL "u\n", temp4);
printf("diff: " FMT_LL "u\n", temp4);
}
# endif

View File

@ -185,7 +185,7 @@ inc_one:
}
else {
// access outside limits of physical memory, ignore
BX_DEBUG(("Write outside the limits of physical memory (0x"FMT_PHY_ADDRX") (ignore)", a20addr));
BX_DEBUG(("Write outside the limits of physical memory (0x" FMT_PHY_ADDRX ") (ignore)", a20addr));
}
}

View File

@ -1,6 +1,6 @@
# --------------------------------------------------------------
# This script invokes the gem5 simulator. It is written to be used
# with the Fail* framework. For further information, see
# with the FAIL* framework. For further information, see
# http://www.m5sim.org/Simulation_Scripts_Explained
# This script is based on $FAIL/simulators/gem5/configs/example/fs.py
#
@ -33,7 +33,7 @@ Options.addFSOptions(parser) # TODO: dito
if args:
print "Error: script doesn't take any positional arguments"
sys.exit(1)
print "[Fail*] Welcome to the FULL SYSTEM simulation script for gem5!"
print "[FAIL*] Welcome to the FULL SYSTEM simulation script for gem5!"
# Sets up the low-level system parameter:
class FailArmSystem(System):
@ -130,10 +130,10 @@ test_sys = makeFailArmSystem(test_mem_mode, options.machine_type)
# experiment target (e.g., the abo-simple-arm.elf file). It should
# contain the bootload code as well.
if options.kernel is not None:
print "[Fail*] Using target: " + options.kernel
print "[FAIL*] Using target: " + options.kernel
test_sys.kernel = options.kernel
else:
print "[Fail*] No kernel target given, exiting!"
print "[FAIL*] No kernel target given, exiting!"
sys.exit(1)
test_sys.init_param = options.init_param

View File

@ -584,7 +584,7 @@ class FloatRegOperand(Operand):
return self.buildWriteCode(func)
# (DanceOS hack begin...
if self.ctype == 'int32_t' or self.ctype == 'int16_t':
print "Applying Fail* hack in %s@%s ... :-)" % \
print "Applying FAIL* hack in %s@%s ... :-)" % \
(__file__, inspect.currentframe().f_lineno)
wb = '''
{

View File

@ -334,7 +334,8 @@ BaseSimpleCPU::checkForInterrupts()
if (interrupt != NoFault) {
// DanceOS
#ifdef CONFIG_EVENT_INTERRUPT
fail::simulator.onInterrupt(dynamic_cast<ArmFault*>(interrupt.get())->offset(), false);
// FIXME pass the currently active ConcreteCPU instance
fail::simulator.onInterrupt(NULL, dynamic_cast<ArmFault*>(interrupt.get())->offset(), false);
#endif
fetchOffset = 0;
interrupts->updateIntrInfo(tc);

View File

@ -15,10 +15,10 @@ SET(PROTOBUF_IMPORT_DIRS "/usr/include;${CMAKE_CURRENT_SOURCE_DIR}/core/comm"
# is generated by CMake from config/FailConfig.hpp.in and stored in
# your build-dir. (The same goes for "FailControlMessage.pb.h", etc.)
# This is done in the "src"-folder because experiments need to include
# Fail* headers as well (see hierarchy of CMakeLists.txt's).
# FAIL* headers as well (see hierarchy of CMakeLists.txt's).
## Add CMakeLists from subdirectories ##
# The Fail* core source files (and it's subdirectories):
# The FAIL* core source files (and it's subdirectories):
add_subdirectory(core)
# Here we add all user-defined experiments (which fills the target list)
@ -39,8 +39,8 @@ endforeach(plugin_name)
# (probably there's a smarter way to do that with cmake?)
add_library(fail dummy.cc)
## Setup build dependencies of the Fail* lib
## -> the Fail* targets and user defined experiment targets
## Setup build dependencies of the FAIL* lib
## -> the FAIL* targets and user defined experiment targets
# start/end-group: ld must iterate over these archives more than once to figure
# out which objects are needed
set(experiment_libraries "")

View File

@ -1,5 +1,5 @@
### Add Boost and Threads
find_package(Boost 1.42 COMPONENTS thread REQUIRED)
find_package(Boost 1.53 COMPONENTS thread coroutine context REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
@ -7,7 +7,7 @@ link_directories(${Boost_LIBRARY_DIRS})
# The autogenerated header files
add_subdirectory(config)
# Fail* targets
# FAIL* targets
add_subdirectory(comm)
add_subdirectory(cpn)
add_subdirectory(efw)

View File

@ -1,7 +1,5 @@
set(SRCS
ExperimentData.hpp
SocketComm.hpp
SocketComm.cc
)
## Setup desired protobuf descriptions HERE ##

View File

@ -1,3 +1,5 @@
syntax = "proto2";
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
optional bool sql_primary_key = 32382 [ default = false];
@ -8,8 +10,6 @@ import "@CONCRETE_INJECTION_POINT@";
message DatabaseCampaignMessage {
required uint32 pilot_id = 1 [(sql_primary_key) = true];
required uint32 variant_id = 2 [(sql_ignore) = true];
required uint32 fspmethod_id = 3 [(sql_ignore) = true];
// ToDo: injection_instr can be deleted if all experiments switched to
// using generic InjectionPointMessage
@ -21,10 +21,19 @@ message DatabaseCampaignMessage {
required string benchmark = 9 [(sql_ignore) = true];
required InjectionPointMessage injection_point = 10 [(sql_ignore) = true];
required bool inject_bursts = 11 [default = false];
enum RegisterInjectionMode {
OFF = 0;
AUTO = 1;
FORCE = 2;
RANDOMJUMP = 3;
}
optional RegisterInjectionMode register_injection_mode = 12 [default = OFF];
}
message DatabaseExperimentMessage {
required uint32 bitoffset = 1 [(sql_primary_key) = true];
required uint32 original_value = 2;
required uint32 bitoffset = 1 [(sql_primary_key) = true];
required uint32 original_value = 2;
required uint32 injection_width = 3;
}

View File

@ -1,3 +1,5 @@
syntax = "proto2";
message FailControlMessage {
enum Command {
// Minions may send these:

View File

@ -1,3 +1,5 @@
syntax = "proto2";
message InjectionPointMessage {
// Costs of the hop chain on the PandaBoard
// ToDo: Could be eliminated, but it is nice for evaluation

View File

@ -1,3 +1,5 @@
syntax = "proto2";
message InjectionPointMessage {
required uint32 injection_instr = 1;
}

Some files were not shown because too many files have changed in this diff Show More