qemu-devel
[Top][All Lists]
Advanced

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

Byte-swapping issue on qemu-user for sparc64 guest


From: John Paul Adrian Glaubitz
Subject: Byte-swapping issue on qemu-user for sparc64 guest
Date: Fri, 10 Feb 2023 16:23:29 +0100
User-agent: Evolution 3.46.3

Hi!

There is an unaddressed issue in qemu-user [1] which results in getresuid()
returning an incorrect UID due to a byte-swapping issue on sparc64.

This issue is fixed by the patch below which was suggested by Phillippe
Mathieu-Daudé, but the corresponding line [2] has not been patched yet.

Could anyone step up and fix the bug?

Thanks,
Adrian

diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 77864de57f..4d4b4a22e8 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -61,7 +61,7 @@
  
  #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \
      || (defined(TARGET_ARM) && defined(TARGET_ABI32)) \
-     || defined(TARGET_SPARC) \
+     || (defined(TARGET_SPARC) && defined(TARGET_ABI32)) \
      || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS)
      /* 16 bit uid wrappers emulation */
  #define USE_UID16

> [1] https://gitlab.com/qemu-project/qemu/-/issues/1394
> [2] 
> https://gitlab.com/qemu-project/qemu/-/blob/master/linux-user/syscall_defs.h#L64

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



reply via email to

[Prev in Thread] Current Thread [Next in Thread]