Git Product home page Git Product logo

btkernel's Introduction

The code in btmod compiles into a loadable module in the Linux kernel.

To run, follow the following steps:

1. Download the linux kernel source tree from kernel.org
   (latest version if you like)
2. Add a line ``EXPORT_SYMBOL(search_exception_tables)'' after the
   search_exception_table() in kernel/extable.c. Compile and boot from the
   custom kernel for 32-bit x86. While this code requires this small change
   in the kernel, our implementation for [1] disassembles the kernel
   binary (vmlinux) and modules to obtain the exception tables.
3. Download binutils-2.19.tar.bz2 and place in folder btmod/
4. cd btmod/bt
5. ./configure --enable-callopt
               --oldkernel           [if version < 3.5]
               --enable-extable      [if extable.txt exists]
               --enable-inscount
6. sudo ./load
7. If your system doesn't hang and there is no error messages run dmesg.
8. It should print "BT module loaded sucessfully".
9. run 'lsmod | grep bt' to confirm that the module is loaded and running.

Congratulations, you are now running translated!

To unload the module run, ./unload.
To restart the module run, ./unload followed by ./load.


The above procedure lets you run the translated kernel with
identity translations. To implement a custom instrumentation client,
you will need to modify the translation rulebook given in btmod/bt/peep.tab.
More details on the syntax of an entry in the peep.tab file can be found
in doc/ folder.

For some instrumentation clients, you may need to write generic rules
that do not depend on the instruction opcode --- our shadow memory
client in [1] required many such rules. The docs in doc/ folder also
describe how to write such generic rules.

Good luck! and please let us know about how you used this implementation.

thanks,

Piyus Kedia  ([email protected])
Sorav Bansal ([email protected])

References:
[1] Fast Dynamic Binary Translation for the Kernel, SOSP 2013

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.