* [Qemu-devel] [PULL 0/2] target/hppa updates
@ 2019-03-08 1:58 Richard Henderson
2019-03-08 16:28 ` Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2019-03-08 1:58 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
The following changes since commit 6cb4f6db4f4367faa33da85b15f75bbbd2bed2a6:
Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging (2019-03-07 16:16:02 +0000)
are available in the Git repository at:
https://github.com/rth7680/qemu.git tags/pull-hppa-20190307
for you to fetch changes up to b35aec8597e86911d5553c94769f914a52a8b389:
target/hppa: Optimize blr r0,rn (2019-03-07 17:43:12 -0800)
----------------------------------------------------------------
Fix use after free on temporary.
Optmize branch to next insn via br r0.
----------------------------------------------------------------
Richard Henderson (2):
target/hppa: Do not return freed temporary
target/hppa: Optimize blr r0,rn
target/hppa/translate.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] target/hppa updates
2019-03-08 1:58 Richard Henderson
@ 2019-03-08 16:28 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-03-08 16:28 UTC (permalink / raw)
To: Richard Henderson; +Cc: QEMU Developers
On Fri, 8 Mar 2019 at 01:58, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 6cb4f6db4f4367faa33da85b15f75bbbd2bed2a6:
>
> Merge remote-tracking branch 'remotes/cleber/tags/python-next-pull-request' into staging (2019-03-07 16:16:02 +0000)
>
> are available in the Git repository at:
>
> https://github.com/rth7680/qemu.git tags/pull-hppa-20190307
>
> for you to fetch changes up to b35aec8597e86911d5553c94769f914a52a8b389:
>
> target/hppa: Optimize blr r0,rn (2019-03-07 17:43:12 -0800)
>
> ----------------------------------------------------------------
> Fix use after free on temporary.
> Optmize branch to next insn via br r0.
>
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 0/2] target/hppa updates
@ 2019-09-15 13:49 Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Richard Henderson @ 2019-09-15 13:49 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell
The following changes since commit 85182c96de61f0b600bbe834d5a23e713162e892:
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20190912a' into staging (2019-09-13 14:37:48 +0100)
are available in the Git repository at:
https://github.com/rth7680/qemu.git tags/pull-hppa-20190915
for you to fetch changes up to a6deecce5b11827fff8a3de2142d02c5388aee1c:
target/hppa: prevent trashing of temporary in do_depw_sar() (2019-09-14 15:39:24 -0400)
----------------------------------------------------------------
Two temp live across branch fixes.
----------------------------------------------------------------
Sven Schnelle (2):
target/hppa: prevent trashing of temporary in trans_mtctl()
target/hppa: prevent trashing of temporary in do_depw_sar()
target/hppa/translate.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl()
2019-09-15 13:49 [Qemu-devel] [PULL 0/2] target/hppa updates Richard Henderson
@ 2019-09-15 13:49 ` Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 2/2] target/hppa: prevent trashing of temporary in do_depw_sar() Richard Henderson
2019-09-16 13:38 ` [Qemu-devel] [PULL 0/2] target/hppa updates Peter Maydell
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2019-09-15 13:49 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, Sven Schnelle
From: Sven Schnelle <svens@stackframe.org>
nullify_over() calls brcond which destroys all temporaries.
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-Id: <20190913101714.29019-2-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 53e17d8963..b12525d535 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -2214,10 +2214,11 @@ static bool trans_mtsp(DisasContext *ctx, arg_mtsp *a)
static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a)
{
unsigned ctl = a->t;
- TCGv_reg reg = load_gpr(ctx, a->r);
+ TCGv_reg reg;
TCGv_reg tmp;
if (ctl == CR_SAR) {
+ reg = load_gpr(ctx, a->r);
tmp = tcg_temp_new();
tcg_gen_andi_reg(tmp, reg, TARGET_REGISTER_BITS - 1);
save_or_nullify(ctx, cpu_sar, tmp);
@@ -2232,6 +2233,8 @@ static bool trans_mtctl(DisasContext *ctx, arg_mtctl *a)
#ifndef CONFIG_USER_ONLY
nullify_over(ctx);
+ reg = load_gpr(ctx, a->r);
+
switch (ctl) {
case CR_IT:
gen_helper_write_interval_timer(cpu_env, reg);
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PULL 2/2] target/hppa: prevent trashing of temporary in do_depw_sar()
2019-09-15 13:49 [Qemu-devel] [PULL 0/2] target/hppa updates Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() Richard Henderson
@ 2019-09-15 13:49 ` Richard Henderson
2019-09-16 13:38 ` [Qemu-devel] [PULL 0/2] target/hppa updates Peter Maydell
2 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2019-09-15 13:49 UTC (permalink / raw)
To: qemu-devel; +Cc: peter.maydell, Sven Schnelle
From: Sven Schnelle <svens@stackframe.org>
nullify_over() calls brcond which destroys all temporaries.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Message-Id: <20190913101714.29019-3-svens@stackframe.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hppa/translate.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index b12525d535..c1b2822f60 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -3404,10 +3404,6 @@ static bool do_depw_sar(DisasContext *ctx, unsigned rt, unsigned c,
TCGv_reg mask, tmp, shift, dest;
unsigned msb = 1U << (len - 1);
- if (c) {
- nullify_over(ctx);
- }
-
dest = dest_gpr(ctx, rt);
shift = tcg_temp_new();
tmp = tcg_temp_new();
@@ -3440,11 +3436,17 @@ static bool do_depw_sar(DisasContext *ctx, unsigned rt, unsigned c,
static bool trans_depw_sar(DisasContext *ctx, arg_depw_sar *a)
{
+ if (a->c) {
+ nullify_over(ctx);
+ }
return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_gpr(ctx, a->r));
}
static bool trans_depwi_sar(DisasContext *ctx, arg_depwi_sar *a)
{
+ if (a->c) {
+ nullify_over(ctx);
+ }
return do_depw_sar(ctx, a->t, a->c, a->nz, a->clen, load_const(ctx, a->i));
}
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] target/hppa updates
2019-09-15 13:49 [Qemu-devel] [PULL 0/2] target/hppa updates Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 2/2] target/hppa: prevent trashing of temporary in do_depw_sar() Richard Henderson
@ 2019-09-16 13:38 ` Peter Maydell
2 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2019-09-16 13:38 UTC (permalink / raw)
To: Richard Henderson; +Cc: QEMU Developers
On Sun, 15 Sep 2019 at 14:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 85182c96de61f0b600bbe834d5a23e713162e892:
>
> Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20190912a' into staging (2019-09-13 14:37:48 +0100)
>
> are available in the Git repository at:
>
> https://github.com/rth7680/qemu.git tags/pull-hppa-20190915
>
> for you to fetch changes up to a6deecce5b11827fff8a3de2142d02c5388aee1c:
>
> target/hppa: prevent trashing of temporary in do_depw_sar() (2019-09-14 15:39:24 -0400)
>
> ----------------------------------------------------------------
> Two temp live across branch fixes.
>
> ----------------------------------------------------------------
> Sven Schnelle (2):
> target/hppa: prevent trashing of temporary in trans_mtctl()
> target/hppa: prevent trashing of temporary in do_depw_sar()
>
> target/hppa/translate.c | 15 ++++++++++-----
> 1 file changed, 10 insertions(+), 5 deletions(-)
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-09-16 13:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-15 13:49 [Qemu-devel] [PULL 0/2] target/hppa updates Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 1/2] target/hppa: prevent trashing of temporary in trans_mtctl() Richard Henderson
2019-09-15 13:49 ` [Qemu-devel] [PULL 2/2] target/hppa: prevent trashing of temporary in do_depw_sar() Richard Henderson
2019-09-16 13:38 ` [Qemu-devel] [PULL 0/2] target/hppa updates Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2019-03-08 1:58 Richard Henderson
2019-03-08 16:28 ` Peter Maydell
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).