fix systemmode compilation
This commit is contained in:
parent
9366380915
commit
e0b8df9655
@ -47,6 +47,7 @@
|
||||
|
||||
//// --- Begin LibAFL code ---
|
||||
|
||||
#include "libafl/defs.h"
|
||||
#include "libafl/exit.h"
|
||||
#include "libafl/tcg.h"
|
||||
#include "libafl/hooks/tcg/edge.h"
|
||||
|
@ -35,6 +35,13 @@
|
||||
#include "tcg-accel-ops.h"
|
||||
#include "tcg-accel-ops-mttcg.h"
|
||||
|
||||
//// --- Begin LibAFL code ---
|
||||
|
||||
#include "libafl/defs.h"
|
||||
|
||||
//// --- End LibAFL code ---
|
||||
|
||||
|
||||
typedef struct MttcgForceRcuNotifier {
|
||||
Notifier notifier;
|
||||
CPUState *cpu;
|
||||
@ -55,12 +62,6 @@ static void mttcg_force_rcu(Notifier *notify, void *data)
|
||||
async_run_on_cpu(cpu, do_nothing, RUN_ON_CPU_NULL);
|
||||
}
|
||||
|
||||
//// --- Begin LibAFL code ---
|
||||
|
||||
#include "libafl/exit.h"
|
||||
|
||||
//// --- End LibAFL code ---
|
||||
|
||||
/*
|
||||
* In the multi-threaded case each vCPU has its own thread. The TLS
|
||||
* variable current_cpu can be used deep in the code to find the
|
||||
|
@ -37,6 +37,12 @@
|
||||
#include "tcg-accel-ops-rr.h"
|
||||
#include "tcg-accel-ops-icount.h"
|
||||
|
||||
//// --- Begin LibAFL code ---
|
||||
|
||||
#include "libafl/defs.h"
|
||||
|
||||
//// --- End LibAFL code ---
|
||||
|
||||
/* Kick all RR vCPUs */
|
||||
void rr_kick_vcpu_thread(CPUState *unused)
|
||||
{
|
||||
@ -169,12 +175,6 @@ static int rr_cpu_count(void)
|
||||
return cpu_count;
|
||||
}
|
||||
|
||||
//// --- Begin LibAFL code ---
|
||||
|
||||
#include "libafl/exit.h"
|
||||
|
||||
//// --- End LibAFL code ---
|
||||
|
||||
/*
|
||||
* In the single-threaded case each vCPU is simulated in turn. If
|
||||
* there is more than a single vCPU we create a simple timer to kick
|
||||
|
3
include/libafl/defs.h
Normal file
3
include/libafl/defs.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define EXCP_LIBAFL_EXIT 0xf4775747
|
@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "exec/cpu_ldst.h"
|
||||
#include "hw/core/cpu.h"
|
||||
|
||||
#define EXCP_LIBAFL_EXIT 0xf4775747
|
||||
#include "exec/cpu-defs.h"
|
||||
|
||||
struct libafl_breakpoint {
|
||||
target_ulong addr;
|
||||
|
@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "hw/core/cpu.h"
|
||||
#include "gdbstub/enums.h"
|
||||
#include "sysemu/accel-ops.h"
|
||||
#include "sysemu/cpus.h"
|
||||
|
||||
int libafl_qemu_set_hw_breakpoint(vaddr addr);
|
||||
int libafl_qemu_remove_hw_breakpoint(vaddr addr);
|
||||
|
@ -10,14 +10,9 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "qom/object.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
|
||||
#include "device-save.h"
|
||||
#include "syx-cow-cache.h"
|
||||
|
||||
#include "libafl/syx-misc.h"
|
||||
|
||||
#define SYX_SNAPSHOT_COW_CACHE_DEFAULT_CHUNK_SIZE 64
|
||||
#define SYX_SNAPSHOT_COW_CACHE_DEFAULT_MAX_BLOCKS (1024 * 1024)
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "hw/core/sysemu-cpu-ops.h"
|
||||
|
||||
#include "libafl/cpu.h"
|
||||
|
||||
#include "libafl/exit.h"
|
||||
#include "libafl/hook.h"
|
||||
|
||||
int gdb_write_register(CPUState* cpu, uint8_t* mem_buf, int reg);
|
||||
|
@ -4,8 +4,13 @@
|
||||
#include "tcg/tcg-op.h"
|
||||
|
||||
#include "cpu.h"
|
||||
#include "libafl/defs.h"
|
||||
#include "libafl/cpu.h"
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
#include "system/runstate.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
#define THREAD_MODIFIER __thread
|
||||
#else
|
||||
|
@ -1,14 +1,15 @@
|
||||
#include "libafl/qemu_snapshot.h"
|
||||
|
||||
#include "sysemu/runstate.h"
|
||||
#include "migration/snapshot.h"
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "migration/snapshot.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "qemu/main-loop.h"
|
||||
#include "hw/core/cpu.h"
|
||||
#include "sysemu/hw_accel.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "system/runstate.h"
|
||||
#include "libafl/qemu_snapshot.h"
|
||||
|
||||
static void save_snapshot_cb(void* opaque)
|
||||
{
|
||||
|
@ -1,5 +1,9 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "exec/vaddr.h"
|
||||
#include "system/system.h"
|
||||
#include "system/accel-ops.h"
|
||||
#include "system/cpus.h"
|
||||
#include "gdbstub/enums.h"
|
||||
|
||||
#include "libafl/system.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "libafl/syx-snapshot/syx-cow-cache.h"
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "sysemu/block-backend.h"
|
||||
#include "libafl/syx-snapshot/syx-cow-cache.h"
|
||||
#include "system/block-backend-io.h"
|
||||
|
||||
#define IS_POWER_OF_TWO(x) ((x != 0) && ((x & (x - 1)) == 0))
|
||||
|
||||
|
@ -1,16 +1,14 @@
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "qemu/main-loop.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "cpu.h"
|
||||
|
||||
#include "exec/ramlist.h"
|
||||
#include "exec/ram_addr.h"
|
||||
#include "exec/exec-all.h"
|
||||
|
||||
#include "libafl/syx-snapshot/syx-snapshot.h"
|
||||
#include "libafl/syx-snapshot/device-save.h"
|
||||
#include "libafl/syx-misc.h"
|
||||
|
||||
#define SYX_SNAPSHOT_LIST_INIT_SIZE 4096
|
||||
#define SYX_SNAPSHOT_LIST_GROW_FACTOR 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user