From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Eric Blake <eblake@redhat.com>,
Richard Henderson <rth@twiddle.net>,
qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] tci: Remove invalid assertions
Date: Fri, 3 Feb 2017 00:12:57 +0200 [thread overview]
Message-ID: <20170203000618-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <a5309467-337b-2827-489d-2abbce8356e4@weilnetz.de>
On Thu, Feb 02, 2017 at 09:10:26PM +0100, Stefan Weil wrote:
> Am 02.02.2017 um 21:00 schrieb Eric Blake:
> > On 02/02/2017 01:56 PM, Stefan Weil wrote:
> > > tb_jmp_insn_offset and tb_jmp_reset_offset are pointers
> > > and cannot be used with ARRAY_SIZE.
> > >
> > > Signed-off-by: Stefan Weil <sw@weilnetz.de>
> > > ---
> > > tcg/tci/tcg-target.inc.c | 2 --
> > > 1 file changed, 2 deletions(-)
> >
> > mst posted an alternative patch:
> > https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00551.html
>
>
> Yes, I noticed that, too. It's not obvious that this new
> assertion will be correct, and none of the other targets
> has that kind of assertion. Only two targets use an
> assertion which detects NULL pointers, but NULL pointers
> will result in an abort anyway.
>
> Do you think that there are reasons why TCI should use
> the assertion suggested by Michael?
>
> Stefan
You know what this code does and I don't, not really.
I just did a monkey patch guessing at what was intended
(value is used as an array index, so we do a bounds check).
I sent the patch before I saw yours simply to fix the build in a way
that's as unintrusive as possible: args[0] seemed to come from guest so
I thought it might be prudent to do a bounds check.
So feel free to ignore mine. Here's an ack for yours
Acked-by: Michael S. Tsirkin <mst@redhat.com>
--
MST
next prev parent reply other threads:[~2017-02-02 22:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-02 19:56 [Qemu-trivial] [PATCH] tci: Remove invalid assertions Stefan Weil
2017-02-02 20:00 ` [Qemu-trivial] [Qemu-devel] " Eric Blake
2017-02-02 20:10 ` Stefan Weil
2017-02-02 20:25 ` Eric Blake
2017-02-02 22:12 ` Michael S. Tsirkin [this message]
2017-02-03 12:32 ` [Qemu-trivial] " Peter Maydell
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=20170203000618-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=eblake@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
/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).