qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: "Simon Hamelin" <Simon.Hamelin@grenoble-inp.org>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, Alexandre Iooss <erdnaxe@crans.org>,
	Mahmoud Mandour <ma.mandourr@gmail.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions
Date: Mon, 15 Jul 2024 16:08:53 -0700	[thread overview]
Message-ID: <4967cfde-65d0-46ac-8956-a23eb9836e90@linaro.org> (raw)
In-Reply-To: <ceab7747-1baa-46d3-860d-b99247e3a65c@grenoble-inp.org>

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 fault injection using QEMU. To do so
> I'm using this plugin along with another plugin that skips an
> instruction at a given address. With this plugin I'm able to see how the
> program reacts to the fault and stop it with a custom return code.
> Basically there are 4 cases:
>      - The fault does not disrupt the program and it reaches the expected
> address.
>      - The fault disrupt the program and it reaches an unexpected address
> known as the "target" address.
>      - The fault disrupt the program in such a way that it executes a lot
> of instructions without reaching the expected address, this situation is
> known as a "timeout".
>      - The fault crashes the guest, causing it to reach an error handler
> address.
> 

Thanks for sharing this, it's an interesting use case.

How did you implement instruction skipping?
Is that based on current API, or do you have a QEMU fork?

> In short, here's a command line that illustrates how I use the plugin:
> 
> $ qemu-system-aarch64 $(QEMU_ARGS) -plugin
> ./contrib/plugins/libstoptrigger.so,icount=timeout_count,addr=addr=expected_addr:0,error_handler_addr:1,target_addr:2
> -d plugin
> 
> --
> Simon Hamelin


  parent reply	other threads:[~2024-07-15 23:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-10 12:08 [PATCH v2] plugins/stoptrigger: TCG plugin to stop execution under conditions Simon Hamelin
2024-07-11 10:03 ` Alex Bennée
2024-07-12  7:53   ` Simon Hamelin
2024-07-12 17:23     ` Pierrick Bouvier
2024-07-15  8:09       ` Simon Hamelin
2024-07-15  8:25         ` Simon Hamelin
2024-07-15 23:08         ` Pierrick Bouvier [this message]
2024-07-16  9:02           ` Simon Hamelin
2024-07-16 15:35             ` Pierrick Bouvier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4967cfde-65d0-46ac-8956-a23eb9836e90@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=Simon.Hamelin@grenoble-inp.org \
    --cc=alex.bennee@linaro.org \
    --cc=erdnaxe@crans.org \
    --cc=ma.mandourr@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).