All Projects → uw-unsat → Hyperkernel

uw-unsat / Hyperkernel

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Hyperkernel

Blizzard Jailbreak
An Open-Source iOS 11.0 -> 11.4.1 (soon iOS 13) Jailbreak, made for teaching purposes.
Stars: ✭ 130 (-14.47%)
Mutual labels:  kernel
Cpachecker
CPAchecker, the Configurable Software-Verification Platform (read-only mirror)
Stars: ✭ 138 (-9.21%)
Mutual labels:  verification
Gvisor
Application Kernel for Containers
Stars: ✭ 12,012 (+7802.63%)
Mutual labels:  kernel
M5p01 muprokaron
A tiny real-time kernel focusing on formal reliability and simplicity.
Stars: ✭ 132 (-13.16%)
Mutual labels:  kernel
Ds4vita
Stars: ✭ 135 (-11.18%)
Mutual labels:  kernel
Hodlr
A fast, accurate direct solver and determinant computation for dense linear systems
Stars: ✭ 140 (-7.89%)
Mutual labels:  kernel
Spylon Kernel
Jupyter kernel for scala and spark
Stars: ✭ 129 (-15.13%)
Mutual labels:  kernel
Clashos
multiplayer arcade game for bare metal Raspberry Pi 3 B+
Stars: ✭ 145 (-4.61%)
Mutual labels:  kernel
Cogent
Cogent Project
Stars: ✭ 137 (-9.87%)
Mutual labels:  verification
Kernel comment
中文注释说明内核源码
Stars: ✭ 145 (-4.61%)
Mutual labels:  kernel
Os One
一个自制的树莓派操作系统
Stars: ✭ 132 (-13.16%)
Mutual labels:  kernel
Knetstat
Simple kernel module to inspect socket options
Stars: ✭ 134 (-11.84%)
Mutual labels:  kernel
Neu Os
Based on linux0.11, break it down, then reassemble (For NEU Lab use)
Stars: ✭ 143 (-5.92%)
Mutual labels:  kernel
Djy Oneplus6 Or Oneplus6t Nethunter Andrax Kernel
DJY Nethunter And Andrax Kernel Oneplus6-Oneplus6T
Stars: ✭ 132 (-13.16%)
Mutual labels:  kernel
Ktweak
A no-nonsense kernel tweak script for Linux and Android systems, backed by evidence.
Stars: ✭ 146 (-3.95%)
Mutual labels:  kernel
Build
Armbian Linux build framework
Stars: ✭ 1,827 (+1101.97%)
Mutual labels:  kernel
Osvvm
OSVVM Utility Library: AlertLogPkg, CoveragePkg, RandomPkg, ScoreboardGenericPkg, MemoryPkg, TbUtilPkg, TranscriptPkg, ...
Stars: ✭ 140 (-7.89%)
Mutual labels:  verification
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (-1.97%)
Mutual labels:  verification
Nftlb
nftables load balancer
Stars: ✭ 147 (-3.29%)
Mutual labels:  kernel
Cfb
Canadian Furious Beaver is a tool for hijacking IRPs handler in Windows drivers, and facilitating the process of analyzing Windows drivers for vulnerabilities
Stars: ✭ 146 (-3.95%)
Mutual labels:  kernel

Hyperkernel

See recent updates and contact information at: https://unsat.cs.washington.edu/projects/hyperkernel/

This is a playground with kernel designs and ideas for formal verification. Don't use it for production.

How to run hv6

We have tested running hv6 with the following setup:

  • Linux Ubuntu 17.10
  • Binutils 2.29.1
  • GCC 7.2.0
  • QEMU 2.10.1

Install these packages before proceeding. Other platforms or versions may not work.

To compile:

make

To run in QEMU:

make qemu

Try a few commands in shell:

ls
ps
pstree
readylist
wttr

By default a web server starts on boot. Point your browser to http://localhost:10080/sh.html.

To run on real hardware, make sure your machine has VT-x (VMX) and VT-d (IOMMU) support and compatible devices (for E1000 we tested using Intel I217-LM). To get an ISO:

make iso

You can use it for PXE booting or creating a bootable USB.

How to verify hv6

We have tested verification with the following setup:

  • Linux Ubuntu 17.10
  • LLVM 5.0.0
  • Z3 4.5.0
  • Python 2.7.10

make hv6-verify: Runs the verification scripts for the hv6 kernel. This includes building the kernel into LLVM IR, translating the kernel to Python using Irpy, and invoking hv6/spec/main.py. Individual tests can be run, for example, to run just the sys_set_runnable test, invoke: make hv6-verify -- -v --failfast HV6.test_sys_set_runnable

make irpy/test: Runs the Irpy test suite, which compares symbolic execution results to running the C code directly.

The proof guarantees that the system call handlers are a refinement of our state-machine specification in hv6/spec/. It also shows that the state-machine specification satisfies certain high-level properties, such as process isolation or the correctness of reference counters.

This does not mean that the kernel is guaranteed to have zero bugs. There can be bugs in unverified code (e.g., initialization and glue code), the specification (or things not modeled in the specification), or the verification toolchain including irpy/ and Z3.

The current verification time is roughly 30 min on our test machine (quad-core i7-7700K). This is longer than the number reported in the paper, as we have added more lemmas since then, and several lemmas are unnecessarily proved more than once (the verifier is not smart enough to cache the results).

Directory structure

hv6/: Contains the implementation of the hv6 kernel

hv6/spec/: Contains the specification for the hv6 kernel

irpy/compiler/: Contains the implementation of the IR -> Python compiler used for symbolic execution

irpy/libirpy/: Contains the Python library and resources for performing symbolic execution over Python generated by the Irpy compiler

A few quick pointers:

  • syscalls: hv6/syscall.c
  • state-machine specification: hv6/spec/kernel/spec/specs.py
  • declarative specification: hv6/spec/kernel/spec/top.py
  • kernel configuration: kernel/config.h

License

Code borrowed from other sources keeps the original copyright and license.

Files we created are licensed under the Apache License, Version 2.0, viewable at http://www.apache.org/licenses/LICENSE-2.0, and are marked as such.

In the copyright notices where we refer to "Hyperkernel Authors", we mean Luke Nelson, Helgi Sigurbjarnarson, Kaiyuan Zhang, Dylan Johnson, James Bornholt, Emina Torlak, and Xi Wang.

Acknowledgments

hv6 borrows code from the following sources:

  • xv6: many of the source files in the hv6/ directory

  • sv6

    • hv6/user/ns.c
    • kernel/tsc.c
  • FreeBSD

    • include/uapi/assym.h
    • kernel/intel_iommu.c
    • kernel/intel_iommu.h
    • kernel/svm.c
    • kernel/svm.h
    • kernel/vmx.c
    • kernel/vmx.h
    • lib/stdlib.c
    • lib/string.c
    • scripts/genassym.sh
  • Linux

    • include/uapi/machine/trap_support.h
  • NetBSD

    • hv6/user/fs/nvmedisk.c
    • include/uapi/nvme.h
    • include/uapi/pcireg.h
    • include/uapi/queue.h
  • QEMU

    • include/uapi/e1000.h
  • lwIP: files under hv6/user/lwip/ (and user/lwip/)

  • ISOLINUX: binaries under boot/isolinux/

  • Linux binaries statically linked with uClibc

    • Dune's bench: hv6/user/linux/bench_linux
    • sparse's compile: hv6/user/linux/compile
    • gzip: hv6/user/linux/gzip
    • lua (patched with Linenoise): hv6/user/linux/lua
    • sha1sum: hv6/user/linux/sha1sum
    • tcc: hv6/user/linux/tcc
  • Terminus font: hv6/user/linux/ter-x16n.psf

  • JavaScript libraries

    • D3.js: web/d3.v4.min.js
    • jQuery: web/jquery.min.js
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].