You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sittipol (Phil) Tribunyatkul edited this page Aug 26, 2015
·
10 revisions
Under < LLFI_SRC_ROOT >/runtime_lib, create a class that is the child of class HardwareFaultInjector or class SoftwareFaultInjector. You have to implement the injectFault(long llfi_index, unsigned size, unsigned fi_bit,char *buf) in your class.
Register the class with RegisterFaultInjector(). In the registration, you also provide the name to find the fault injector.
Build the < LLFI_SRC_ROOT >/runtime_lib by adding the created file(s) to CMakeLists.txt in that directory, and go to the < LLFI_DST_ROOT > and run make
run the fault injection executable with the custom fault injector. You need to use the option fi_type=<name given in step 2> in llfi.config.runtime.txt to invoke the custom fault injector.
There are some sample fault injectors in < LLFI_SRC_ROOT >/runtime_lib/CommonFaultInjectors.cpp. Play it first to get an idea.
[GUI] To get the custom fault injector to show up in the LLFI GUI, add the name of the fault injector, exactly as registered, to the file LLFI_SRC_ROOT/gui/config/fault_type.txt (hardware injection only).
[FIDL] Alternatively, use the FIDL tool to generate a Custom Software Fault Injector and a Custom Instruction Selector instead.