S2E/s2e-linux-kernel

Name: s2e-linux-kernel

Owner: S2E

Description: Linux kernels (CGC DECREE and vanilla) with S2E extensions

Created: 2017-04-03 16:01:13.0

Updated: 2017-11-07 04:29:57.0

Pushed: 2017-11-07 20:33:00.0

Homepage: null

Size: 195672

Language: null

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

S2E Linux Source

This repository contains modified versions of the Linux kernel enhanced for use with the S2E software analysis platform. The kernel extensions mainly include tracking process and thread creation/termination as well as signal monitoring (segfaults, etc.). The LinuxMonitor/DecreeMonitor plugins capture these events and expose them to other analysis plugins.

Building the kernel

This section describes how to build the kernel manually. We recommend that you use the appropriate docker scripts in the guest-images repository.

If you just want to build the kernel without building a complete S2E image (e.g. if you want to experiment with kernel changes without rebuilding a new image each time), then you can do the following:

 apt-get build-dep fakeroot linux-image$(uname -r)

KERNEL_DIR
 defconfig

is will generate a default config that you can make changes to as
cessary. For example, you may want to enable the S2E debug option.

ild the kernel in a fakeroot environment
CLUDE_PATH=../include:$C_INCLUDE_PATH fakeroot -- make deb-pkg LOCALVERSION=-s2e

.

You can then transfer the generated deb files to your image and install with dpkg -i.

Extending

We recommend that you follow these steps for modifying your own kernel for use with S2E:

  1. Add the kernel source code directory at the root of this repo

  2. Copy include/s2e/*/*_monitor.h from an existing kernel

  3. Add/remove/modify any commands (and their invoke functions) that you require in include/s2e/*/*_monitor.h

  4. Copy kernel/s2e and modify any relevant kernel code to issue commands to S2E

  5. Write an S2E plugin that includes the same *_monitor.h file. The plugin class should extend the BaseLinuxMonitor class and implement the virtual handleCommand method to handle a command sent from the modified kernel


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.