All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Konopik, Andreas (EFS-GH2)" <andreas.konopik@efs-auto.de>
To: Richard Henderson <richard.henderson@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "kbastian@mail.uni-paderborn.de" <kbastian@mail.uni-paderborn.de>,
	"Brenken, David \(EFS-GH5\)" <david.brenken@efs-auto.de>
Subject: RE: [PATCH 0/1] tricore: fixed faulty conditions for extr and imask
Date: Thu, 11 Feb 2021 10:02:44 +0000	[thread overview]
Message-ID: <DB8PR05MB6107809DB8A933A0178259F9B08C9@DB8PR05MB6107.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <c2854d29-8926-ae13-fbf7-77197728ae96@linaro.org>

Hi Richard,

thank you for your feedback.

> From: Richard Henderson <richard.henderson@linaro.org>
> Sent: Wednesday, February 10, 2021 20:02
> To: David Brenken <david.brenken@efs-auto.org> 
> On 2/10/21 12:26 AM, David Brenken wrote:
> > From: Andreas Konopik <andreas.konopik@efs-auto.de>
> >
> > Hello together,
> >
> > we have fixed a few conditions leading to incorrect intermediate code
> > generation. RCPW_IMASK, RRPW_EXTR, RRPW_EXTR_U and RRPW_IMASK
> invoke
> > undefined behavior for "pos + width > 32", which is also checked in
> > tcg_gen_extract_tl(). RRRW_EXTR_U invokes undefined behavior for
> > "width == 0", hence we removed that condition.
> 
> This is incorrect, because "undefined behavior" should not include a qemu
> abort.

I didn't notice that these checks terminated program execution.

> You could raise a guest exception, you could treat the faulty instruction as a
> nop, you could truncate the inputs to avoid the abort, you could write
> 0xdeadbeef to the destination.
> 
> Or you could fix the couple of faulty conditions and leave the rest of the code
> as-is.

We will submit the patch following your advice as soon as possible.

Kind regards,

Andreas

INTERNAL

  reply	other threads:[~2021-02-11 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10  8:26 [PATCH 0/1] tricore: fixed faulty conditions for extr and imask David Brenken
2021-02-10  8:26 ` [PATCH 1/1] " David Brenken
2021-02-10 19:02 ` [PATCH 0/1] " Richard Henderson
2021-02-11 10:02   ` Konopik, Andreas (EFS-GH2) [this message]
2021-02-11 11:32 ` no-reply

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=DB8PR05MB6107809DB8A933A0178259F9B08C9@DB8PR05MB6107.eurprd05.prod.outlook.com \
    --to=andreas.konopik@efs-auto.de \
    --cc=david.brenken@efs-auto.de \
    --cc=kbastian@mail.uni-paderborn.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.