Commit Graph

931 Commits

Author SHA1 Message Date
6fa0ae970b Coding Guideline: Fixes.
Sorry, for the small changesets.

Change-Id: I12e7b1b4efff0c63020613e399f8185ace97aec7
2013-11-11 13:27:43 +01:00
cf95437e65 RealtimeLogger: Fixed coding guideline issues.
Change-Id: I1172e0c60e2d6e895b4d3f99eb1a023c348bd3b3
2013-11-11 13:18:26 +01:00
8f0db45dfe Exp: Base system for the real time systems lecture
Change-Id: I3e5b8c6e60b57e6ec03500e9ee109fd5fb322cb2
2013-11-11 13:08:26 +01:00
4c7fcae6ad plugins: A simple signal generator
Listens on a configurable SUT's global variable.
On read access a signal pattern value is calculated and sent back
to the SUT.

Currently, only a superimposable sine wave signal form is implemented.
Further signal forms can be implemented by inheriting from the
abstract SignalForm class.

Change-Id: I2e6cf49cd44797999691c9e9cf0c54dd3c96875e
2013-11-11 13:07:42 +01:00
5d867be83b plugins: RealtimeLogger plugin
Logs access to a given global variable of the SUT, given by
a symbol name, and outputs value when variable is written to file.
Format:
<Simulation time>;<Value of variable>

Change-Id: I81b581e571be4255a1a2200c41e7c16657ddfd3d
2013-11-11 12:30:52 +01:00
443b3e4919 L4Sys: termination shortcuts
Add two new breakpoints to L4Sys experiment that allow detecting that
execution terminated with an error: vga_console_blink() is called by the
kernel if JDB was entered (meaning we are hanging, e.g., due to an
assertion); also longjmp() is only used by PF handling code after no
valid page fault handling could be performed

Change-Id: Ice61039c4bd07815a316bbc0bdb39f3483d9a1da
2013-11-06 17:37:20 +01:00
d4f22a38ff L4Sys: EIP deviation tracking
* after injecting a fault, track how many instructions it takes until
  execution deviates from original execution
* also track what the first deviating EIP value is

Change-Id: I18a9250517ca90214728c2c4b036b412f5dbf224
2013-11-06 17:37:20 +01:00
3db5d034a2 InstructionFilter: make unused EIP a default 0 parameter
Change-Id: I972be71af70934eef98bc67b27e32a98ecb8be3b
2013-11-06 17:37:20 +01:00
a5866a68a2 add l4-sys ignore file
Change-Id: Iea2228d8bafc2a3ecb4b6e26e2552813821a3d0b
2013-11-06 17:37:19 +01:00
71170145e0 Adapt l4-sys experiment to importer fix
no need to decrement instruction offset before setting bp anymore

Change-Id: I7f9c02349663899fa8f496a46bcb357bd567ac5c
2013-11-06 17:37:19 +01:00
63610d0652 L4sys: build fix
experiment.hpp is parsed before l4sys.ph.h is generated
-> remove dependency

Change-Id: I128108e562877caca732ad43fdb65b12e56951f8
2013-11-06 17:37:19 +01:00
c000b50101 Merge branch 'tracing-off-by-one' 2013-10-28 18:37:07 +01:00
5171645d9a plugin/tracing: fix extended trace on umapped memory areas
When a register in the extended trace was dereferenced and the value
was smaller than the memory pool size, but the address was not mapped
an assertion occured and the tracing plugin terminated the
simulator. Now the dereferenced memory address is checked for being
mapped and not being smaller than the memory pool.

Change-Id: I9ac954988ef860969679f9f360814c5e4b66f473
2013-10-28 15:09:35 +01:00
148b09be2e tools/import-trace: added ElfImporter
The ElfImporter is not a real trace importer, but we locate it
into the import-trace utility, since here the infrastructure is
already in place to import things related to an elf binary into
the database.

The ElfImporter calls objdump and dissassembles an elf binary
and imports the results into the database.

Change-Id: I6e35673c8dbee3b7e8dfc7549d10e5dca9b55935
2013-10-24 15:30:17 +02:00
c87075e598 Merge branch 'importtrace-reparse-parameters' 2013-10-23 15:51:21 +02:00
d97e3dfa8f revert out-of-l4sys change
Change-Id: I86b27aae6fa30992b485af79e767ec23949d1e62
2013-10-21 15:38:15 +02:00
a65c64791e L4Sys experiment: add CR3 detection to prep run
Change-Id: Iebbc0309695ee6a7bb8c68fd6ffa24b73ffd7ee5
2013-10-21 15:28:07 +02:00
77b2e208d0 L4Sys Experiment: more on address space tracing
* introduce L4SYS_ADDRESS_SPACE_TRACE to indicate that we want
  to trace instructions in a different AS from the one we are starting
  the experiment in
* add CR3Run() to determine address space ID

Change-Id: I7bdaf1e858a6dd369af5175bd56e1b4e2d5f05ef
2013-10-21 15:28:07 +02:00
523f4a465b add injection address to results
Change-Id: I7966f97b8c09bbd6510ca6066dd40be398b54de3
2013-10-21 15:28:07 +02:00
f2d0919553 tracing: simplify confusing iponly/memonly configuration
The internal m_iponly / m_memonly bools are a bit hackish; especially it's
unclear what should happen if both are set.  The m_tracetype enum now
encompasses all possible configurations, while the plugin's user interface
remains unchanged.

Change-Id: Ibdd872b5cc5781836428b27bfb2db3825700e671
2013-10-17 19:09:54 +02:00
64034e29b4 tracing: bugfix: advance prevtime only if delta was recorded
This change implements what the source-code comment already promised but
didn't keep: As we only record time deltas instead of absolute time values,
prevtime must not be overwritten unless the current delta was really added
to the trace.  This has caused timing information to be stored incorrectly
if certain events were skipped (e.g., because they didn't match the memory
map configured by the user).

Change-Id: Id40271d117dd91b1122136c62329d64174f304b0
2013-10-17 19:07:35 +02:00
22b9646b80 import-trace: dynamic instruction off-by-one
Richard noticed that instr2 values are off by one when done with the
MemoryImporter vs. with his own importer.  The core problem is that
the dynamic instruction counter in the Importer base class
(Importer::copy_to_database, instruction_count_t instr) gets increased
*after* reporting an IP event to the importer implementation; this has
the side-effect that memory access events have a +1 dynamic
instruction count offset with regard to the IP event of the
instruction they belong to.

Bottom line: IP events and all memory events belonging to that
instruction should have the same dynamic instruction number.
Christian argued for the numbers starting with 0, which, as a side
effect, relativizes the repercussions of the change introduced in the
previous commit, as the new "first" event gets the sequence number 0
now.

 -  All experiments and importers only dealing with memory accesses
    (MemoryImporter) are affected by this change:  The dynamic
    instruction count now starts with 0 instead of 1.  Together with
    the previous commit, the only change is one additional dynamic
    instruction at position 0.  Note that existing trace files do not
    have this additional instruction, which shifts all trace positions
    by 1.

 -  All importers that process *only* IP events (InstructionImporter,
    RandomJumpImporter, RegisterImporter) won't see any difference.
    Commit 036e340, though, introduced a +1 offset.

 -  Experiments that use these instruction counts for navigating to
    the target instruction must be checked to properly deal with the
    dynamic instruction #0 (no forwarding necessary).  All dynamic
    instruction offsetting should now work uniformly for both memory
    accesses and all other fault models.  To be sure everything works
    in order, sanity-check the current absolute instruction pointer
    right before fault injection.

Change-Id: I3f509f1b47836fa78fd029a7bb7c36c878912d97
2013-10-17 18:28:40 +02:00
3dc752cd09 tracing: fix loss of first dynamic instruction
When starting the tracing plugin (simulator.addFlow()), at the moment
the *current* dynamic instruction (e.g., the one the start symbol
points to) is skipped, and tracing commences with the second
instruction.  This change records an additional instruction event at
the trace begin.

Note that this change affects all tracing-plugin users.  The first
event gets recorded when starting the plugin (simulator.addFlow()).
This avoids compatibility/off-by-one issues when recording traces with
the generic-tracing experiment vs. with custom experiments.

Change-Id: Ic24e17a68b8a44edad3be994e9edd6d6712bfda1
2013-10-17 18:28:28 +02:00
090125a283 Revert "generic-tracing: fix lossage of first event"
This reverts commit 036e340bd9.

Problems with this one were:
 -  Broken event timings.  m_prevtime wasn't reset to m_curtime in
    TracingPlugin::handleSingleIP(), resulting in a large deltatime
    being recorded for the second event, too.  This effectively
    doubled the experiment's start time.
 -  Code repetition (copy/pasted for special handling of first event),
    making planned changes (advanced tracing for IP events) more
    difficult.
 -  Unnecessary additional tracing-plugin interface method.

Change-Id: I4b74d1a3f4563aabe6626399f9b30a2171b4c285
2013-10-17 17:44:43 +02:00
87264af79a doc: Add plugin path to doxygen documentaion.
Change-Id: I7a7e7e658b4b86f1e319c58d7595d031f71cb4fd
2013-10-17 17:42:12 +02:00
e636924d0f import-trace: reparse parameters after importer instantiation
Without this change, import-trace won't recognize, e.g., the -e and -t
parameters if they come after a parameter that was added by the Importer:

import-trace -i objdump --objdump arm-none-eabi-objdump -e B.elf -t C.tc
[...]
[import-trace 14:37:32] couldn't open trace.pb

Change-Id: I9532b01e432055479c79d801b1ca2736a8fd21cc
2013-10-14 14:43:47 +02:00
036e340bd9 generic-tracing: fix lossage of first event
When using the generic-tracing experiment for generating a trace, the
first event, after the tracing is started (the start-symbol) is lost
in the trace. This patch handles this special case seperately.

Change-Id: Ia131a8559d67161532504160826fdb100247ed75
2013-09-19 15:57:11 +02:00
f2e76bfd70 bochs-runner: pass on additional arguments to fail-client
Change-Id: Icae29d819e4cbebc26e441a6daf74f9abafdb3ad
2013-09-19 14:56:49 +02:00
5bf498d959 Merge "Helper script for FailBochs pruning build env" 2013-09-19 13:17:45 +02:00
c6e298ac6f Helper script for FailBochs pruning build env
Call this script from a build directory to setup
a build environment for FailBochs pruning.

Usage:
 <path to fail>/configurations/x86_pruning.sh <Experiment name>

Change-Id: I778a20c258dcd5349c3da9e1c5a8542af43f61d5
2013-09-19 13:16:27 +02:00
3307828690 import-trace: fixes for build on amd64
"std::vector<T>::size_type" is compatible to "unsigned int" on ia32,
but not on amd64.

Change-Id: I7d0f96780f7c17757dcfd015a1b3f9d5a3947f1a
2013-09-18 17:13:08 +02:00
ee6ffef828 Merge "experiments: new cored-voter experiment" 2013-09-18 16:07:14 +02:00
aec5798f32 remove accidental checkin
Change-Id: I3cc42e153070b78bcea7df08ef2eddd1c838776c
2013-09-12 20:31:26 +02:00
014684ae1c L4Sys: check Bochs AS ID for mem accesses, too
Change-Id: Ifa2b38dc0e762ff4f956dc0b98c78b43f0d139cb
2013-09-12 20:29:08 +02:00
6274ddb15f Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-12 18:20:29 +02:00
ff19bec52d L4Sys: some bug fixes
* Fowler's Law of Refactoring: Have test cases available.
* BjoernD's Corollary to Fowler's Law: Use these tests!

Change-Id: I3d3e48ffe08209891c6204655323cd26a0eaaebd
2013-09-12 18:19:04 +02:00
b84d4d4c0e Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-12 10:14:59 +02:00
00f920f487 merge conflict resolved
... I somehow missed that one, sorry.

Change-Id: I2daf6f9215f34e39090145ff70e70eaf84d0f286
2013-09-12 09:52:34 +02:00
37eda90971 L4Sys campaign: GPRFLIP and MEM injections
Change-Id: I0c4a6bf6b80d6620c035595c11663121f504f4d5
2013-09-11 18:02:03 +02:00
b7d03f64d4 docs
Change-Id: Ic46dfc6c59c7bee796c2e3e8e97376859391b342
2013-09-11 18:02:03 +02:00
560860cb99 L4Sys: consult instruction list for breakpoints
Change-Id: Ic8163cc84bad9b0074a9d6489127d0ef09eb3c21
2013-09-11 18:02:03 +02:00
1a09d30127 L4Sys: prepare script supports mem/reg experiments
Change-Id: Ibcbc9e99b063d4b019b4d68401c77fc964253da8
2013-09-11 18:02:03 +02:00
8caa63397a L4Sys: refactoring
* more more stuff into functions
* try to have generic experiment code only once

Change-Id: I4f037bd972243665a10941fcc3607f015b0bb1f9
2013-09-11 18:02:02 +02:00
0b2ab41c2f first working mem experiment
Change-Id: I928ee0c38f12f6dfe3f661ee60cccad11f35ad6a
2013-09-11 18:02:02 +02:00
20a9904032 start memory experiment
Change-Id: Ice7921a02f899c7381d15ead10b27e21df7019fb
2013-09-11 18:02:02 +02:00
32efc604e7 use MEM FI type
Change-Id: If149c4fdeaaf6fef96a99d6fe2a424d8ad0f2916
2013-09-11 18:02:02 +02:00
ec969603d5 Merge commit 'dcd2c021a5ac91d38187d397914e5f51e2fc8819'
Conflicts:
	tools/import-trace/RegisterImporter.cc

Change-Id: I4f49c976bd60badba73c15746aa03c420cb9f77b
2013-09-11 14:38:55 +02:00
844e15293d experiments: new cored-voter experiment
The experiment does support
- 1 bit faults in registers/memory/IP
- 2 bit faults in registers (all)
- n bit faults monte-carlo in registers

Change-Id: Ifdd7df6ec4bc88cfc75391b5e19e0d648fd0d087
2013-09-11 13:47:47 +02:00
04e96b977c tools/import-trace: add --do-not-split option to RegisterImporter
The RegisterImporter splits each register into 1 byte chunks. The
--do-not-split flag prohibits this splitting. Be aware, that def/use
pruning won't work correctly in mixed-width cases (EAX/AX/AH/AL).

Change-Id: Ifa1930bdd9f317a6fd3ae50c4ff3cffc97504640
2013-09-11 10:30:01 +02:00
d26fc28fa4 cpn/database: include data_width in the fsppilot during prune step
During the prune step the data_width of the injected location was not
propagated before. It is now stored in fsppilot (database layout change!) and
sent in the fsppilot protobuf message.

Change-Id: I0562f6fc8957adea0f8a9fb63469ca5e3f4b7b2d
2013-09-11 10:27:04 +02:00