17 Commits

Author SHA1 Message Date
9a0a6ebc35 add libafl_qemu_read_user_sp_unchecked 2024-06-14 13:54:57 +02:00
19f046ef6a fix build 2024-01-04 12:14:15 +01:00
e144fb9fdf re-introduce native breakpoints 2023-12-22 13:02:50 +01:00
Romain Malmain
c386a5a9b9 fix: check if get_paging_id is implemented. 2023-11-30 18:09:17 +01:00
Romain Malmain
9928452ab6 Added paging id boilerplate code + x86_64 implementation. 2023-11-30 17:27:34 +01:00
Andrea Fioraldi
e61d1f93b0 Refactor hooks and multiple newthread/syscalls hooks 2023-11-22 14:25:03 +01:00
Andrea Fioraldi
8db5524416 Remove unused and duplicate code 2023-11-21 15:28:07 +01:00
Andrea Fioraldi
4fc66b672e
Merge pull request #30 from rmalmain/sync_exit
Sync Exit
2023-11-21 11:41:27 +01:00
Romain Malmain
466658fc52 Sync Exit:
- Now the VM can trigger a synchronous backdoor stopping the VM and returning to LibAFL.
- LibAFL will exit with a corresponding exit reason to perform actions accordingly (checkout the LibAFL patch for more details).
- The breakpoint mechanism has been merged with this system (not tested yet, may not work out of the box).
- The main difference with the backdoor is that it will always stop the VM.
2023-11-21 10:48:27 +01:00
Andrea Fioraldi
b0c8272465 Fix translation but not execution of edge TB 2023-11-17 14:48:04 +01:00
Akihiko Odaki
b4ff21284b cpu: Call plugin hooks only when ready
The initialization and exit hooks will not affect the state of vCPU
outside TCG context, but they may depend on the state of vCPU.
Therefore, it's better to call plugin hooks after the vCPU state is
fully initialized and before it gets uninitialized.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231025093128.33116-16-akihiko.odaki@daynix.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231106185112.2755262-12-alex.bennee@linaro.org>
2023-11-08 15:15:23 +00:00
Philippe Mathieu-Daudé
79a99091c1 exec/cpu: Have cpu_exec_realize() return a boolean
Following the example documented since commit e3fe3988d7 ("error:
Document Error API usage rules"), have cpu_exec_realizefn()
return a boolean indicating whether an error is set or not.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230918160257.30127-22-philmd@linaro.org>
2023-11-07 13:08:48 +01:00
Andrea Fioraldi
9bdf5e5843 Non thread local bpt globals in fullsystem 2023-10-31 16:36:33 +01:00
Andrea Fioraldi
e42124c0c8 Fix TLS ref for libafl_breakpoint_cpu 2023-10-25 11:58:10 +02:00
Andrea Fioraldi
d86aae8ed9 Merge 2023-10-25 11:36:37 +02:00
Philippe Mathieu-Daudé
54b99122eb cpu: Correct invalid mentions of 'softmmu' by 'system-mode'
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231004090629.37473-4-philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-10-07 19:02:33 +02:00
Philippe Mathieu-Daudé
fe0007f3c1 exec: Rename cpu.c -> cpu-target.c
We have exec/cpu code split in 2 files for target agnostic
("common") and specific. Rename 'cpu.c' which is target
specific using the '-target' suffix. Update MAINTAINERS.
Remove the 's from 'cpus-common.c' to match the API cpu_foo()
functions.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-Id: <20230914185718.76241-7-philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-10-04 11:03:54 -07:00