johalun / rustkpi

Sources to the Master's thesis: Safe Kernel Programming with Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Safe Kernel Programming with Rust

Master Thesis Project
Johannes Lundberg
KTH, Stockholm, Sweden
2017-2018

Introduction

TODO: Fix compile warnings and write introduction.

How To

Preliminary

  1. Clone this repo (to folder we will call $ROOT) on a FreeBSD 12 machine
  2. Install rustup (https://www.rust-lang.org/en-US/install.html)
  3. Set toolchain
    1. rustup toolchain link rustkpi $ROOT/rust/toolchains/x86_64-unknown-freebsd-1.25-nightly
    2. cd $ROOT
    3. rustup override set rustkpi
  4. Build RustKPI
    1. cd $ROOT/rust/kmod-rustkpi
    2. make
  5. Build Hello World module
    1. cd $ROOT/rust/kmod-helloworld
    2. make
  6. Test
    1. cd $ROOT/rust/
    2. sudo kldload kmod-rustkpi/rustkpi.ko
    3. sudo kldload kmod-helloworld/rustkpi-hello.ko
    4. dmesg

For the e1000 driver in kmod-e1000 the following devices are supported

  • bhyve with e1000 nic emulation
  • I218 (found in Intel Broadwell laptops)
  • I219-LM (found in Intel Skylake laptops)

kmod-e1000 is built the same way as described above.

About

Sources to the Master's thesis: Safe Kernel Programming with Rust


Languages

Language:C++ 35.1%Language:LLVM 23.6%Language:Rust 18.4%Language:C 11.0%Language:Assembly 8.1%Language:WebAssembly 1.0%Language:Python 0.7%Language:JavaScript 0.6%Language:CMake 0.4%Language:Shell 0.3%Language:OCaml 0.3%Language:Go 0.1%Language:Perl 0.1%Language:Makefile 0.1%Language:Roff 0.0%Language:HTML 0.0%Language:Yacc 0.0%Language:M4 0.0%Language:Dockerfile 0.0%Language:Objective-C++ 0.0%Language:CSS 0.0%Language:Objective-C 0.0%Language:TeX 0.0%Language:Batchfile 0.0%Language:Vim Script 0.0%Language:Emacs Lisp 0.0%Language:Pascal 0.0%Language:XSLT 0.0%Language:Inno Setup 0.0%Language:Lex 0.0%Language:RenderScript 0.0%Language:PHP 0.0%Language:Puppet 0.0%Language:Awk 0.0%Language:Logos 0.0%