Git Product home page Git Product logo

mei's Introduction

#MEI (Memory Error Injection)

Wang Xiaoqiang[email protected] Distributed & Embedded System Lab (DSLab)

MEI is a memory errors injection tool to validate the memory testers. Memory testers implemented in userspace should use the interface 'read_byte_from_addr' provided in ./userlib/ directory. Kernel space memory testers can directly use the interface 'mei_read_byte' exported by the MEI kernel module.

Also we provide some userspace tools to inject memory errors and delete the injected memory errors. A debugfs interface - /sys/kernel/debug/MEI/inject_errors is provided to show and manipulate injected memory errors.

The MEI architecture is as follows:

architecture

##Usage

  1. cd MEI #enter the directory of MEI.
  2. make
  3. make install
  4. cd tools
  5. make
  6. sudo ./memerr-inject ./inject-file
  7. sudo cat /sys/kernel/debug/MEI/inject_errors
  8. sudo ./del-inject 1 #delete the previously injected error, argument "1" here is the first element in ./inject-file representing the physical address of memory error.
  9. sudo cat /sys/kernel/debug/MEI/inject_errors

###memerr-inject memerr-inject is a tool to inject memory errors. It reads the injected errors information from a file and parses it, and then injects the error into the kernel.

####inject-file Format We use the following structure to represent injected memory errors in kernel:

struct inject_memory_err {
        unsigned long phy_addr; /* where the error to inject in physical address */
        int err_bit_num; /* number of error bits in a byte */
        int bit[BYTESIZE]; /* which bit in the byte have error */
        int bit_value[BYTESIZE]; /* the bits stuck-at error values */
        struct list_head lists;
};

The member 'phy_addr' is the target physical memory address to inject errors. 'bit_num' stands for how many error bits in this byte. 'bit' and 'bit_value' stands for which bits have errors and the values of these bits.

We use a very simple format of inject-file. As you can see in the example inject-file, it only contains values of these members of the structure in order. For example:

                bit
                 /
err_bit_num      |
  /  ---------------
  |  |             |
1 2  0 1 0 0 0 0 0 1  0 1 0 0 0 0 0 1
|                     |             |
\                     ---------------
phy_addr                     \
                         bit_value

###del-inject Usage del-inject is used to delete some injected memory errors from the kernel. It takes a command line parameter standing for the physical address at which the injected error happens. If all of the injected errors don't happend in the address, del-inject will ignore it and simply return.

###debugfs Interface After the kernel module installation, you can see a directory in debugfs(usually mounted on /sys/kernel/debug/) called 'MEI'. There is a file under 'MEI' dirctory called 'inject_errors'. You can see and manipulate all injected errors through this interface.

Read all injected errors' information from the interface:

cat inject_errors

Clear all injected errors:

echo "clear" > inject_errors

##LICENSE This software is under the license of GPL v2.

##PUBLICATION Xiaoqiang Wang, Xuguo Wang, Fangfang Zhu, Qingguo Zhou, Rui Zhou, MEI: A Light Weight Memory Error Injection Tool for Validating Online Memory Testers, International Symposium on Software and System Reliability (ISSSR) 2016. pdf, ppt

mei's People

Contributors

wangxiaoq avatar

Watchers

James Cloos avatar Noisome Poison avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.