Coder Social home page Coder Social logo

libvmi_extensions's Introduction

LibVMI-extensions for Bareflank

Reciver side of the bareflank hypercalls given by Libvmi.

These extensions can be used just like other bareflank examples.

Compilation and usage

git clone https://github.com/Bareflank/hypervisor
git clone https://github.com/boddumanohar/libvmi_extensions.git
mkdir build; cd build
cmake ../hypervisor -DDEFAULT_VMM=libvmi_extensions -DEXTENSION=../libvmi_extensions
make -j<# cores + 1>

When the above commands are run, apis in exit_handlers runs along with the hypervisor.

The userspace contains the files that will be used by libvmi to give hypercall.

Current state

Currenty, there is only one hypercall that simply returns doing nothing.

libvmi_extensions's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libvmi_extensions's Issues

[RFC] Bareflank-LibVMI Hypercall ABI

This RFC is a discussion of Bareflank-LibVMI hypercall ABI

A request is made to hypervisor with a hypercall ID which will be stored in rax register and the bareflank dispatches the task to the appropriate vmcall_handler based on hypercall ID.

Some hypercalls, take some data as input while other return data output. To facilitate the this, libvmi_extensions create common shared memory region between hypervisor and LibVMI with read-write-execute permissions. When libvmi_extensions are loaded, the details of the shared memory(starting memory address with size) will be printed to output so the hypercall with data as input can use this region. This shared memory with a fixed size will be created with Bareflank memory_manager.h.

The JSON format will be used for input-output data. We can use any json parser create
the data on one side and retrive the data on the otherside.

When data is given as input to Hypervisor:

the input data is first formated in the JSON format and then copied into the shared region.
and get the size of the total data.

The ABI for the hypercal looks like

mov rax 0x5          ; hypercall ID
mov rbx 0x2347789688 ;starting region of memory 
mov rcx 0x16         ;size of the input data

vmcall

When data is given as output by the hypervisor:

the output data is first formated in the JSON format and then copied into the shared region and get the size of the total data.

The ABI for the hypercall looks like

mov rax 0x6 ; hypercall ID
vmcall      ; Give hypercall
            ; collect the size of the data returned in rcx register. 

This region can be used by memory mapping hypercall to map a process's memory into this region so that LibVMI can read from the region.

Now the next immediate task is to create a shared memory region. I am thinking to create
a simple version of Xen's Grant table. So that this region can be shared with multiple VMs.

@rianquinn @connojd @tklengyel please comment your thoughts

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.