Hello,
I am new to S2E so I apologize if I am asking very basic installation questions. I have set up my own S2E environment, but I'm not completely sure I have everything just right, also based on the outputs I am getting after running S2E, I don't think I'm getting expected output.
I have a Ubuntu 12.04 x64 host on which I downloaded S2E off the git repository. I built everything and installed the dependencies. I then created a Ubuntu 12.04 32-bit qemu image, following the VM setup instructions on the website. I amusing the following config file:
s2e = {
kleeArgs = {
"--use-batching-search=true", "--batch-time=2.0"
}
}
plugins = {
"BaseInstructions",
"RawMonitor",
"ModuleExecutionDetector",
"CodeSelector",
"HostFiles",
"ExecutionTracer"
}
pluginsConfig = {}
pluginsConfig.ModuleExecutionDetector = {}
pluginsConfig.CodeSelector = {}
pluginsConfig.ExecutionTracer = {}
pluginsConfig.HostFiles = {
baseDirs = {"/home/user/stage/build/myfiles"}
}
I launch S2E with the following command:
qemu-release/i386-s2e-softmmu/qemu-system-i386 disk.qcow2 -s2e-config-file config.lua -s2e-verbose -loadvm 3
I then observe the following output in the host console:
S2E: output directory = "/home/user/stage/build/s2e-out-1"
WARNING: Linking two modules of different data layouts!
Creating plugin CorePlugin
Creating plugin BaseInstructions
Creating plugin RawMonitor
Creating plugin ModuleExecutionDetector
Creating plugin CodeSelector
Creating plugin HostFiles
Creating plugin ExecutionTracer
Can not get configuration value 'pluginsConfig['RawMonitor']':
value of type nil can not be converted to lua_table with only string keys
Can not get configuration value 'pluginsConfig['RawMonitor'].kernelStart':
[string "return pluginsConfig['RawMonitor'].kernelSt..."]:1: attempt to index field 'RawMonitor' (a nil value)
You should specify pluginsConfig['RawMonitor'].kernelStart
ModuleExecutionDetector: no configuration keys!
Can not get configuration value 'pluginsConfig['ModuleExecutionDetector'].trackAllModules':
value of type nil can not be converted to boolean
Can not get configuration value 'pluginsConfig['ModuleExecutionDetector'].configureAllModules':
value of type nil can not be converted to boolean
Can not get configuration value 'pluginsConfig['CodeSelector'].moduleIds':
value of type nil can not be converted to lua_list with only string values
You should specify a list of modules in pluginsConfig['CodeSelector'].moduleIds
0 [State 0] Created initial state
Adding CPU (addr = 0x7fe23f7b7820, size = 0x4dc80)
Initing initial device state.
WARNING!!! All writes to disk will be lost after shutdown.
I am concerned about the WARNING in the above, but the VM seems to load. I have copied and built the guest directory on the VM. I then execute the following:
LD_PRELOAD=/home/s2e/guest/init_env/init_env.so /bin/echo --select-process-code --sym-args 0 2 4
Things then seem to run indefinitely. The host console spews info about switch from state to state, but the process never seems to complete. Ideally I want to run my own binaries and see s2e launch all the different paths of the program. Before I post about this issue, maybe I can get some clarification on whether I am running things properly, does the above output make sense? I would love to know what values s2e is using symbollically.
Thanks,
darkthor