Re: [PATCH kvm-unit-tests 1/2] arm64: argc is an int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/03/2021 15:56, Andrew Jones wrote:
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@xxxxxxx>
Signed-off-by: Andrew Jones <drjones@xxxxxxxxxx>

Thanks for fixing this.

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@xxxxxxx>

---
  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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux