qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Buono <dbuono@linux.vnet.ibm.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI
Date: Mon, 1 Mar 2021 15:39:42 -0500	[thread overview]
Message-ID: <950b36a4-ec19-84df-9292-c88c390ce5fc@linux.vnet.ibm.com> (raw)
In-Reply-To: <YD0Day/wGawuWdpi@redhat.com>

Hi Daniel,

On 3/1/2021 10:08 AM, Daniel P. Berrangé wrote:
> What are the unique failure scenarios for CFI that these jobs are
> likely to expose ? Is it likely that we'll have cases where
> CFI succeeds in say, x86_64 target, but fails in aarch64 target ?

For CFI to fail (even if it shouldn't) you'll need code that is calling 
a function pointer that was not well defined at compile time. Although
unlikely, that could happen everywhere in the code.

So by just testing one (or few) targets we are are not covering the code 
in the TCG frontend used to compile the target ISA to tcg ops, which 
should be the in target/, and the architecture-dependent code in linux-user.

That code seems unlikely (at least to me) to cause a false positive with 
CFI. Examples that I've seen in QEMU so far are:
- Calling code that was JIT-ed at runtime
- Callbacks to functions that were loaded from shared libraries
- Signal Handlers
And none of those should happen there IMHO. But you know, corner cases 
are still possible, and it's quite difficult to predict what new code 
may bring.

We could also consider always testing one or two targets, and keep an 
optional job to test them all when deemed necessary. I'm thinking for
example full testing when code in target/ or linux-user/ is considered, 
or for testing pre-release code. Would be nice to have this automated 
but I am not sure that's possible.

Regards,
Daniele


  reply	other threads:[~2021-03-01 20:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 15:21 [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI Daniele Buono
2021-02-26 15:21 ` [PATCH v2 1/2] gitlab-ci.yml: Allow custom # of parallel linkers Daniele Buono
2021-02-26 15:21 ` [PATCH v2 2/2] gitlab-ci.yml: Add jobs to test CFI flags Daniele Buono
2021-03-01 10:06 ` [PATCH v2 0/2] gitlab-ci.yml: Add jobs to test CFI Daniel P. Berrangé
2021-03-01 14:59   ` Daniele Buono
2021-03-01 15:08     ` Daniel P. Berrangé
2021-03-01 20:39       ` Daniele Buono [this message]
2021-03-02 10:30         ` Daniel P. Berrangé
2021-03-02 13:18           ` Daniele Buono
2021-03-02 15:38             ` Daniel P. Berrangé
2021-03-02 16:31               ` Daniele Buono
2021-03-02 16:40                 ` Daniel P. Berrangé
2021-03-02 21:01                   ` Daniele Buono
2021-03-03 10:04                     ` Daniel P. Berrangé

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=950b36a4-ec19-84df-9292-c88c390ce5fc@linux.vnet.ibm.com \
    --to=dbuono@linux.vnet.ibm.com \
    --cc=berrange@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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).