public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <drjones@redhat.com>
To: kvm@vger.kernel.org
Cc: nikos.nikoleris@arm.com, alexandru.elisei@arm.com
Subject: [PATCH kvm-unit-tests 1/2] arm64: argc is an int
Date: Thu, 25 Mar 2021 16:56:56 +0100	[thread overview]
Message-ID: <20210325155657.600897-2-drjones@redhat.com> (raw)
In-Reply-To: <20210325155657.600897-1-drjones@redhat.com>

If argc isn't aligned to eight bytes then loading it as if it's
eight bytes wide is a bad idea. It's only four bytes wide, so we
should only load four bytes.

Reported-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 arm/cstart64.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arm/cstart64.S b/arm/cstart64.S
index 89321dad7aba..0a85338bcdae 100644
--- a/arm/cstart64.S
+++ b/arm/cstart64.S
@@ -100,7 +100,7 @@ start:
 1:
 	/* run the test */
 	adrp	x0, __argc
-	ldr	x0, [x0, :lo12:__argc]
+	ldr	w0, [x0, :lo12:__argc]
 	adrp	x1, __argv
 	add	x1, x1, :lo12:__argv
 	adrp	x2, __environ
-- 
2.26.3


  reply	other threads:[~2021-03-25 15:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 15:56 [PATCH kvm-unit-tests 0/2] arm64: One fix and one improvement Andrew Jones
2021-03-25 15:56 ` Andrew Jones [this message]
2021-03-25 16:15   ` [PATCH kvm-unit-tests 1/2] arm64: argc is an int Nikos Nikoleris
2021-03-25 15:56 ` [PATCH kvm-unit-tests 2/2] arm64: Output PC load offset on unhandled exceptions Andrew Jones
2021-03-25 16:20   ` Nikos Nikoleris
2021-03-25 16:28 ` [PATCH kvm-unit-tests 0/2] arm64: One fix and one improvement Andrew Jones

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=20210325155657.600897-2-drjones@redhat.com \
    --to=drjones@redhat.com \
    --cc=alexandru.elisei@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=nikos.nikoleris@arm.com \
    /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