qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] fcntl64 fix


From: Kirill A. Shutemov
Subject: Re: [Qemu-devel] [PATCH] fcntl64 fix
Date: Wed, 21 Mar 2007 00:59:57 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On [Tue, 20.03.2007 21:47], Thiemo Seufer wrote:
> Stuart Anderson wrote:
> [snip]
> > --- linux-user/syscall_defs.h.orig  2007-02-23 15:44:47.000000000 -0500
> > +++ linux-user/syscall_defs.h       2007-02-23 15:44:26.000000000 -0500
> > @@ -1414,7 +1414,9 @@
> >  struct target_eabi_flock64 {
> >     short  l_type;
> >     short  l_whence;
> > +#if HOST_LONG_BITS == 32
> >          int __pad;
> > +#endif
> 
> Still, this part makes no sense to me since it is in a packed struct.
> Can you explain why this works better for you?

Primarily, I also thought that problem is in padding, because, without the
patch F_GETLK, on 32-bit target recognises as F_GETLK64 on 64-bit host.
It's happen because on 64-bit host and 32-bit target F_GETLK == F_GETLK64 ==
TARGET_F_GETLK. So if you're using qemu-arm on 64-bit host and a target eabi
program calls fcntl(fd,F_GETLK,...), target_eabi_flock64 will be used by
mistake. Disabling padding can helps in some trivial cases to pass
pseudo-correct args to fcntl. I guess this part of patch wrong.

Stuart, am I right?

-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + Velesys LLC, http://www.velesys.com/
 + ALT Linux Team, http://www.altlinux.com/

Attachment: signature.asc
Description: Digital signature


reply via email to

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