qemu-devel
[Top][All Lists]
Advanced

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

Re: Byte-swapping issue on qemu-user for sparc64 guest


From: Philippe Mathieu-Daudé
Subject: Re: Byte-swapping issue on qemu-user for sparc64 guest
Date: Fri, 10 Feb 2023 16:35:40 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.7.2

On 10/2/23 16:23, John Paul Adrian Glaubitz wrote:
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?

Sorry Adrian, this is in my TODO list, but I couldn't find the time to
write a good commit description to this fix yet :~(

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





reply via email to

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