qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] fstat bug on armeb stll exists!
@ 2007-11-29 13:43 Claudio Scordino
  2007-12-02  7:12 ` Thiemo Seufer
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Scordino @ 2007-11-29 13:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: michael trimarchi

Hi all,

   more than one year ago we sent a patch on this mailing list to fix 
a problem of the fstat syscall for armeb. See

http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00137.html

We found the bug compiling a Linux kernel for armeb on scratchbox.

Qemu seemed to ignore the fact that in big endian systems the fields
st_blocks and its padding are swapped (to allow future expansion of 
the field,) so the fix consisted only in swapping the two fields (only 
in big endian systems, of course).

The patch just changed  qemu/linux-user/syscall_defs.h to

#ifndef TARGET_WORDS_BIGENDIAN
        target_ulong    st_blocks;
        target_ulong    __pad4;
#else
       target_ulong    __pad4;
       target_ulong    st_blocks;
#endif

I've just dowloaded a fresh 0.9 Qemu, and I saw that there is still 
the bug...

Do you mind integrate such change, so we don't have to patch Qemu any 
time ?

Regards,

         Claudio Scordino



-- 
=================================
Claudio Scordino		
Software Engineer

Evidence Srl
Embedded Real-Time solutions
http://www.evidence.eu.com
=================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] fstat bug on armeb stll exists!
  2007-11-29 13:43 [Qemu-devel] fstat bug on armeb stll exists! Claudio Scordino
@ 2007-12-02  7:12 ` Thiemo Seufer
  0 siblings, 0 replies; 2+ messages in thread
From: Thiemo Seufer @ 2007-12-02  7:12 UTC (permalink / raw)
  To: Claudio Scordino; +Cc: michael trimarchi, qemu-devel

Claudio Scordino wrote:
> Hi all,
>
>   more than one year ago we sent a patch on this mailing list to fix a 
> problem of the fstat syscall for armeb. See
>
> http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00137.html
>
> We found the bug compiling a Linux kernel for armeb on scratchbox.
>
> Qemu seemed to ignore the fact that in big endian systems the fields
> st_blocks and its padding are swapped (to allow future expansion of the 
> field,) so the fix consisted only in swapping the two fields (only in big 
> endian systems, of course).
>
> The patch just changed  qemu/linux-user/syscall_defs.h to
>
> #ifndef TARGET_WORDS_BIGENDIAN
>        target_ulong    st_blocks;
>        target_ulong    __pad4;
> #else
>       target_ulong    __pad4;
>       target_ulong    st_blocks;
> #endif

AFAICS this assumption matches neither the glibc 2.6 nor the Linux
2.6.23 definitions. There is, however, an endianness difference in
handling the st_dev and st_rdev fields which is not handled properly
in QEMU.

I think this needs a separate struct stat definition for (non-EABI)
big endian ARM.


Thiemo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-02  7:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 13:43 [Qemu-devel] fstat bug on armeb stll exists! Claudio Scordino
2007-12-02  7:12 ` Thiemo Seufer

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