Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-16 Thread Pierrick Bouvier
On 7/16/24 02:02, Simon Hamelin wrote: On 7/16/24 01:08, Pierrick Bouvier wrote: On 7/15/24 01:09, Simon Hamelin wrote: Hello Pierrick, Could you share a bit more information on the final goal, if possible? Is that used for fuzzing binaries, security analysis, or other things? I'm current

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-16 Thread Simon Hamelin
On 7/16/24 01:08, Pierrick Bouvier wrote: On 7/15/24 01:09, Simon Hamelin wrote: Hello Pierrick, Could you share a bit more information on the final goal, if possible? Is that used for fuzzing binaries, security analysis, or other things? I'm currently using this plugin for security analy

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-15 Thread Pierrick Bouvier
On 7/15/24 01:09, Simon Hamelin wrote: Hello Pierrick, Could you share a bit more information on the final goal, if possible? Is that used for fuzzing binaries, security analysis, or other things? I'm currently using this plugin for security analysis purposes. Basically my goal is to simulate

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-15 Thread Simon Hamelin
On 7/15/24 10:09, Simon Hamelin wrote: Hello Pierrick, On 7/12/24 19:23, Pierrick Bouvier wrote: Hello Simon, On 7/12/24 00:53, Simon Hamelin wrote: On 7/11/24 12:03, Alex Bennée wrote: +static void exit_emulation(int return_code) +{ +    exit(return_code); +} + +static void exit_icount

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-15 Thread Simon Hamelin
Hello Pierrick, On 7/12/24 19:23, Pierrick Bouvier wrote: Hello Simon, On 7/12/24 00:53, Simon Hamelin wrote: On 7/11/24 12:03, Alex Bennée wrote: +static void exit_emulation(int return_code) +{ +    exit(return_code); +} + +static void exit_icount_reached(unsigned int cpu_index, void *udat

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-12 Thread Pierrick Bouvier
Hello Simon, On 7/12/24 00:53, Simon Hamelin wrote: On 7/11/24 12:03, Alex Bennée wrote: +static void exit_emulation(int return_code) +{ +exit(return_code); +} + +static void exit_icount_reached(unsigned int cpu_index, void *udata) +{ +qemu_plugin_outs("icount reached, exiting\n"); +

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-12 Thread Simon Hamelin
On 7/11/24 12:03, Alex Bennée wrote: +static void exit_emulation(int return_code) +{ +exit(return_code); +} + +static void exit_icount_reached(unsigned int cpu_index, void *udata) +{ +qemu_plugin_outs("icount reached, exiting\n"); +exit_emulation(icount_exit_code); +} + +static voi

Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-11 Thread Alex Bennée
Simon Hamelin writes: > This new plugin allows to stop emulation using conditions on the > emulation state. By setting this plugin arguments, it is possible > to set an instruction count limit and/or trigger address(es) to stop at. > The code returned at emulation exit can be customized. > > This

[PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions

2024-07-10 Thread Simon Hamelin
This new plugin allows to stop emulation using conditions on the emulation state. By setting this plugin arguments, it is possible to set an instruction count limit and/or trigger address(es) to stop at. The code returned at emulation exit can be customized. This plugin demonstrates how someone co