Git Product home page Git Product logo

tardis's Introduction

TARDIS

Trace And Rewrite Delays In Syscalls: Hooking time-related Linux syscalls to warp a process's perspective of time.

This code is rather buggy, mainly due to my lack of understanding of the ptrace API. You probably shouldn't use it for anything serious, although it could be useful for testing/debugging certain applications.

Things to try:

$ ./tardis 10000 10000 xclock
$ ./tardis 1 3 glxgears
$ ./tardis 1 -1 glxgears
$ ./tardis 10 10 firefox
$ ./tardis 10 10 /bin/sh

xclock demo

Notes:

  • Currently only x86_64 Linux is supported. It should be possible to port to i386 with fairly minimal effort.

  • I used PTRACE_SEIZE, which only exists since kernel version 3.4.

  • novdso.so is preloaded to prevent libc from using vDSO - otherwise ptrace(PTRACE_SYSCALL, ...) wouldn't work for those syscalls (Take a look at man vdso for more information). You might need to modify the LD_PRELOAD value to be an absolute path for some programs/environments, I only made it relative for simplicity.

  • Certain simple programs, like glxgears, don't mind being run with time flowing in reverse! Most programs don't however, and of course there's no way to have a negative delay.

  • There are many more syscalls that I still need to handle.

Currently handled syscalls:

  • nanosleep
  • clock_nanosleep
  • select
  • poll
  • gettimeofday
  • clock_gettime
  • time

tardis's People

Contributors

davidbuchanan314 avatar luxe avatar maxbla 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.