Minor bug fix to kleeReadMemory

We forgot to read the third parameter and were just ignoring it.  This
new implementation does not add a constraint when concretizing I/O
memory--the old bugged version did add the constraint.  To add
constraints permanently, it's necessary to change
target-i386/op_helper.c and pass "true" for the third parameter to
tcg_llvm_get_value instead of "false."
SymbolicHardware: bug fix, use delete [] instead of delete

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
exec.c: use proper wrappers to access host memory that is not guest RAM

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
S2EExecutor: no more TB chaining in executeTranslationBlockKlee

Makes no sense given how slow it is to run code in KLEE anyway.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
S2EExecutor: removed memory limiting code

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
S2EExecutor: first round of reduction of throw CpuExitException

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
S2EExecutor: refactored executeOneInstruction into executeInstructions()

Goal: reduce number of throw CpuExitExceptions and try/catch blocks.
Also makes the code easier to read.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
tcg-llvm: don't call forkAndConcretize if the address is a constant

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
S2EExecutor: use host clock for main S2E timer

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
timers: dynamic clock speed adjustment when running LLVM code

Interrupt handlers running in KLEE mode could prevent any progress.
This patch should really prevent that now.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
qemu: virtfs-proxy-helper: use setresuid and setresgid

The setfsuid and setfsgid system calls are obscure and they complicate
the error checking (that glibc's warn_unused_result "feature" forces
us to do).  Switch to the standard setresuid and setresgid functions.

Signed-off-by: Paolo Bonzini <pbonini@redhat.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
qemu: vnc-tls: Fix compilation with newer versions of GNU-TLS

In my installation of GNU-TLS (v3.0.23) the type
gnutls_anon_server_credentials is marked deprecated, so -Werror
breaks compilation.
Simply replacing it with the newer ..._t version fixed the compilation
on my machine (Slackware 14.0). I cannot tell how far back this "new"
type goes, at least the header file in RHEL 5.0 (v1.4.1) seems to have
it already. If someone finds a broken distribution, tell me and I
insert some compat code.

Signed-off-by: Andre Przywara <osp@andrep.de>
stp: Fix missing function return statements

Add return statement to non-void functions

Signed-off-by: Michael Contreras <michael@inetric.com>
s2e: Port to LLVM 3.2

Port S2E to LLVM/CLANG 3.2

Signed-off-by: Michael Contreras <michael@inetric.com>
s2e:qemu:configure Disable _FORTIFY_SOURCE

Disable _FORTIFY_SOURCE because it seems broken with this qemu and clang 3.2

Signed-off-by: Michael Contreras <michael@inetric.com>
Avoid some compiler warnings

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Makefile: fix builds with Address Sanitizer

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Makefile: allow specifying custom -march for clang

Useful to build and use S2E in VirtualBox, which does
not support AVX instructions, causing SIGILL.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
Compilation fix for coverage and address sanitizer if libcacard is present.

Signed-off-by: Vitaly Chipounov <vitaly.chipounov@epfl.ch>
x86_64-s2e-softmmu.mak: create default s2e x86_64 config

Create the default-config file for x86_64-s2e-softmmu

Signed-off-by: Michael Contreras <michael@inetric.com>