ahoeller / fies Goto Github PK
View Code? Open in Web Editor NEWQEMU-based fault injection
License: Other
QEMU-based fault injection
License: Other
I want to adjust FIES to powerpc architecture.
I'm learning and studying about the files related to fault-injection section:(include fault-injection-data-analyzer.c、fault-injection-data-analyzer.h、fault-injection-collector.c、fault-injection-collector.h、fault-injection-library.c、fault-injection-library.h、fault-injection-controller.c、fault-injection-controller.h、fault-injection-injector.c、fault-injection-injector.h、fault-injection-config.h).
And I found that it has another three files related to ARM architecture fault-injection. It's imx28_gic.h、imx28_gic.c and imx28evk.c. It is based on the Freescale i.MX28 EVK system-on-chip featuring the ARM926EJ-S processor.
I just know these files is necessary to implement fault-injection. Is my idea correct ? And what else is need to be add and modified to implement powerpc fault-injection ?
Any help will be grateful!
I am not able to change instruction at specific address (0x000082a8) by new instruction (code: 0xe3530000). Here is my injection XML file:
<?xml version="1.0" encoding="UTF-8"?>
<injection>
<fault>
<id>1</id>
<component>CPU</component>
<target>INSTRUCTION EXECUTION</target>
<mode>NEW VALUE</mode>
<trigger>PC</trigger>
<params>
<address>0x000082a8</address>
<instruction>0xe3530000</instruction>
</params>
</fault>
</injection>
If I understand PC trigger correctly, address param is pointer to the instruction location (injection will be triggered when program counter points to this address) and instruciton is instruction which will be placed on that code address. Unfortunatelly, I cant get it work. I checked that func do_inject_look_up_error_arm (file fault-injection-injector.c) is called with correct lockup_instruction, but value in env->regs[15] did not change at all.
I run the linux kernel v4.19.10. However, it shows a lot of errors.
I can run the linux kernel v4.19.10 on the version 4.2.1 of qemu-system-arm.
thanks
I'm compiling the project FIES you posted on github. But I fall through a probelm when the build program come to this step "LINK arm-softmmu/qemu-system-arm", it report some error like:
fault-injection-library.o: In function
qmp_fault_reload': /home/yan/Documents/fies-master/fault-injection-library.c:621: undefined reference to
xmlCheckVersion'
There are many more below, but they are similar to the one above.
I use the ubuntu 14.04, and I can confirm that my libxml2 is installed properly. So I don't know what went wrong.
I would be very grateful if you can give me some help.
Hi,ahoeller:
I imitate your arm architecture to implement PowerPC fault injection.I made changes to register in fault injection module (regs of arm to gpr of powerpc,delete cpsr) and In target-ppc/translate.c ,fault_injection_controller_init function was called (gen_intermediate_code_internal).Mainly changed these.but,when i finished make it and run it like arm:ppc-softmmu/qemu-system-ppc -kernel hello, the terminal keeping printing:
qemu display:
I'm not sure the error is caused by me or the qemu itself,but I am more inclined to qemu caused .
any help will be grateful !
Running Ubuntu 16.04
install libs:
sudo apt install libffi6 libffi-dev libc6-dev gettext python pkg-config libsdl2-dev zlib1g-dev libpixman-1-dev libfdt-dev libxml2-dev
sudo apt install libsdl1.2debian libsdl-gfx1.2-5 libsdl-gfx1.2-dev libsdl-gfx1.2-doc libsdl-image1.2 libsdl-image1.2-dbg libsdl-image1.2-dev libsdl-mixer1.2 libsdl-mixer1.2-dbg libsdl-mixer1.2-dev libsdl-net1.2 libsdl-net1.2-dbg libsdl-net1.2-dev libsdl-sound1.2 libsdl-sound1.2-dev libsdl-ttf2.0-0 libsdl-ttf2.0-dev
Had to add --disable-werror for ./configure for couple of noisy warnings e.g.
warning: ‘g_mem_set_vtable’ is deprecated [-Wdeprecated-declarations]
link error from libxml2:
LINK arm-softmmu/qemu-system-arm
fault-injection-library.o: In function `qmp_fault_reload':
/ws/open-source/fies/fault-injection-library.c:621: undefined reference to `xmlCheckVersion'
fault-injection-library.o: In function `parseFile':
/ws/open-source/fies/fault-injection-library.c:541: undefined reference to `xmlParseFile'
/ws/open-source/fies/fault-injection-library.c:548: undefined reference to `xmlDocGetRootElement'
/ws/open-source/fies/fault-injection-library.c:557: undefined reference to `xmlStrcmp'
/ws/open-source/fies/fault-injection-library.c:577: undefined reference to `xmlStrcmp'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.