qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: cohuck@redhat.com
Subject: Re: [PATCH 4/5] target/s390x: Move DisasFields into DisasContext
Date: Fri, 24 Jan 2020 10:39:27 +0100	[thread overview]
Message-ID: <49e5c963-ae6a-f0da-5943-14f193ae62fc@redhat.com> (raw)
In-Reply-To: <20200123232248.1800-5-richard.henderson@linaro.org>

On 24/01/2020 00.22, Richard Henderson wrote:
> I believe that the separate allocation of DisasFields from DisasContext
> was meant to limit the places from which we could access fields.  But
> that plan did not go unchanged, and since DisasContext contains a pointer
> to fields, the substructure is accessible everywhere.
> 
> By allocating the substructure with DisasContext, we improve the locality
> of the accesses by avoiding one level of pointer chasing.  In addition,
> we avoid a dangling pointer to stack allocated memory, diagnosed by static
> checkers.
> 
> Launchpad: https://bugs.launchpad.net/bugs/1661815
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/s390x/translate.c        | 22 +++++++++---------
>  target/s390x/translate_vx.inc.c | 40 ++++++++++++++++-----------------
>  2 files changed, 30 insertions(+), 32 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2020-01-24  9:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 23:22 [PATCH 0/5] target/s390x: Do not leak stack address in translate_one Richard Henderson
2020-01-23 23:22 ` [PATCH 1/5] target/s390x: Move struct DisasFields definition earlier Richard Henderson
2020-01-24  8:44   ` Thomas Huth
2020-01-23 23:22 ` [PATCH 2/5] target/s390x: Remove DisasFields argument from callbacks Richard Henderson
2020-01-24  9:21   ` Thomas Huth
2020-01-23 23:22 ` [PATCH 3/5] target/s390x: Pass DisasContext to get_field and have_field Richard Henderson
2020-01-24  9:37   ` Thomas Huth
2020-01-23 23:22 ` [PATCH 4/5] target/s390x: Move DisasFields into DisasContext Richard Henderson
2020-01-24  9:39   ` Thomas Huth [this message]
2020-01-23 23:22 ` [PATCH 5/5] target/s390x: Remove DisasFields argument from extract_insn Richard Henderson
2020-01-24  9:42   ` Thomas Huth
2020-01-24  9:43 ` [PATCH 0/5] target/s390x: Do not leak stack address in translate_one Thomas Huth
2020-01-24 14:25   ` Cornelia Huck
2020-01-24 14:25 ` Cornelia Huck

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=49e5c963-ae6a-f0da-5943-14f193ae62fc@redhat.com \
    --to=thuth@redhat.com \
    --cc=cohuck@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).