From: Peter Maydell <peter.maydell@linaro.org>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: Ido Plat <ido.plat1@ibm.com>,
qemu-devel@nongnu.org, qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH 1/1] target/arm: Fix arithmetic underflow in SETM instruction
Date: Mon, 28 Oct 2024 15:32:24 +0000 [thread overview]
Message-ID: <CAFEAcA-DCiREHP41SDqsx67Z4ajbvQZN4LEiyVXNadK=htOEBw@mail.gmail.com> (raw)
In-Reply-To: <53c424e6-dc51-4b87-b0fc-11c0703b5416@tls.msk.ru>
On Fri, 25 Oct 2024 at 16:50, Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> 25.10.2024 05:48, Ido Plat wrote:
> > Pass the stage size to step function callback,
> > otherwise do_setm would hang when size is larger then page size because stage size would underflow.
> > This fix changes do_setm to be more inline with do_setp.
> >
> > Fixes: 0e92818887dee ("target/arm: Implement the SET* instructions")
> > Signed-off-by: Ido Plat <ido.plat1@ibm.com>
> > ---
> > target/arm/tcg/helper-a64.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c
> > index 56b431faf5..8f42a28d07 100644
> > --- a/target/arm/tcg/helper-a64.c
> > +++ b/target/arm/tcg/helper-a64.c
> > @@ -1348,7 +1348,7 @@ static void do_setm(CPUARMState *env, uint32_t syndrome, uint32_t mtedesc,
> > /* Do the actual memset: we leave the last partial page to SETE */
> > stagesetsize = setsize & TARGET_PAGE_MASK;
> > while (stagesetsize > 0) {
> > - step = stepfn(env, toaddr, setsize, data, memidx, &mtedesc, ra);
> > + step = stepfn(env, toaddr, stagesetsize, data, memidx, &mtedesc, ra);
> > toaddr += step;
> > setsize -= step;
> > stagesetsize -= step;
> This also seems to be:
>
> Cc: qemu-stable@nongnu.org
>
> (Cc'ed now, there's no need to add it again).
>
> Please let me know if it shouldn't.
Yes, I think it's stable material.
Applied to target-arm.next, thanks.
-- PMM
prev parent reply other threads:[~2024-10-28 15:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 2:48 [PATCH 1/1] target/arm: Fix arithmetic underflow in SETM instruction Ido Plat
2024-10-25 15:13 ` Richard Henderson
2024-10-25 15:50 ` Michael Tokarev
2024-10-28 15:32 ` Peter Maydell [this message]
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='CAFEAcA-DCiREHP41SDqsx67Z4ajbvQZN4LEiyVXNadK=htOEBw@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=ido.plat1@ibm.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).