qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] EABI fcntl on x86_64
  2007-03-19 15:30 [Qemu-devel] [PATCH] EABI fcntl on x86_64 Stuart Anderson
@ 2007-03-19 15:25 ` Kirill A. Shutemov
  2007-03-19 15:38 ` Paul Brook
  1 sibling, 0 replies; 5+ messages in thread
From: Kirill A. Shutemov @ 2007-03-19 15:25 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

On [Mon, 19.03.2007 11:30], Stuart Anderson wrote:
> 
> When running ARM EABI binaries on x86_64, the target_eabi_flock64
> structure is already padded correct so the padding is not needed.
>
> This patch adds an #ifdef to only include the _pad member on 32-but
> hosts.

Are you sure that problem is in padding? Please, look at my patch 
in post "[PATCH] fcntl64 fix".
> 
> 
>                                 Stuart
> 
> Stuart R. Anderson                               anderson@netsweng.com
> Network & Software Engineering                   http://www.netsweng.com/
> 1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
>                                                  BD03 0A62 E534 37A7 9149

Content-Description: fcntl fix
> Index: linux-user/syscall_defs.h
> ===================================================================
> RCS file: /sources/qemu/qemu/linux-user/syscall_defs.h,v
> retrieving revision 1.30
> diff -u -r1.30 syscall_defs.h
> --- linux-user/syscall_defs.h	22 Oct 2006 00:18:54 -0000	1.30
> +++ linux-user/syscall_defs.h	19 Mar 2007 15:25:58 -0000
> @@ -1409,7 +1409,9 @@
>  struct target_eabi_flock64 {
>  	short  l_type;
>  	short  l_whence;
> +#if HOST_LONG_BITS == 32
>          int __pad;
> +#endif
>  	unsigned long long l_start;
>  	unsigned long long l_len;
>  	int  l_pid;

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* [Qemu-devel] [PATCH] EABI fcntl on x86_64
@ 2007-03-19 15:30 Stuart Anderson
  2007-03-19 15:25 ` Kirill A. Shutemov
  2007-03-19 15:38 ` Paul Brook
  0 siblings, 2 replies; 5+ messages in thread
From: Stuart Anderson @ 2007-03-19 15:30 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 544 bytes --]


When running ARM EABI binaries on x86_64, the target_eabi_flock64
structure is already padded correct so the padding is not needed.
This patch adds an #ifdef to only include the _pad member on 32-but
hosts.


                                 Stuart

Stuart R. Anderson                               anderson@netsweng.com
Network & Software Engineering                   http://www.netsweng.com/
1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
                                                  BD03 0A62 E534 37A7 9149

[-- Attachment #2: fcntl fix --]
[-- Type: TEXT/PLAIN, Size: 563 bytes --]

Index: linux-user/syscall_defs.h
===================================================================
RCS file: /sources/qemu/qemu/linux-user/syscall_defs.h,v
retrieving revision 1.30
diff -u -r1.30 syscall_defs.h
--- linux-user/syscall_defs.h	22 Oct 2006 00:18:54 -0000	1.30
+++ linux-user/syscall_defs.h	19 Mar 2007 15:25:58 -0000
@@ -1409,7 +1409,9 @@
 struct target_eabi_flock64 {
 	short  l_type;
 	short  l_whence;
+#if HOST_LONG_BITS == 32
         int __pad;
+#endif
 	unsigned long long l_start;
 	unsigned long long l_len;
 	int  l_pid;

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

* Re: [Qemu-devel] [PATCH] EABI fcntl on x86_64
  2007-03-19 15:30 [Qemu-devel] [PATCH] EABI fcntl on x86_64 Stuart Anderson
  2007-03-19 15:25 ` Kirill A. Shutemov
@ 2007-03-19 15:38 ` Paul Brook
  2007-03-19 15:57   ` Stuart Anderson
  1 sibling, 1 reply; 5+ messages in thread
From: Paul Brook @ 2007-03-19 15:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stuart Anderson

On Monday 19 March 2007 15:30, Stuart Anderson wrote:
> When running ARM EABI binaries on x86_64, the target_eabi_flock64
> structure is already padded correct so the padding is not needed.
> This patch adds an #ifdef to only include the _pad member on 32-but
> hosts.

This is wrong. The struct is packed, so its layout should be independent of 
the host. How did you test your change? 

Paul

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

* Re: [Qemu-devel] [PATCH] EABI fcntl on x86_64
  2007-03-19 15:38 ` Paul Brook
@ 2007-03-19 15:57   ` Stuart Anderson
  2007-03-19 16:16     ` Stuart Anderson
  0 siblings, 1 reply; 5+ messages in thread
From: Stuart Anderson @ 2007-03-19 15:57 UTC (permalink / raw)
  To: qemu-devel

On Mon, 19 Mar 2007, Paul Brook wrote:

> On Monday 19 March 2007 15:30, Stuart Anderson wrote:
>> When running ARM EABI binaries on x86_64, the target_eabi_flock64
>> structure is already padded correct so the padding is not needed.
>> This patch adds an #ifdef to only include the _pad member on 32-but
>> hosts.
>
> This is wrong. The struct is packed, so its layout should be independent of
> the host. How did you test your change?

I have a debian arm chroot setup. dpkg was unhappy, and I used gdb to
observe that there seemed to an extra 4 bytes of data in the middle of
the structure being passed into the host function.

I missed Kirill's patch as it came across before I got back on the list,
(and I missedit  when I browsed the archive as well). Since I should be
able to reproduce this, I'll test w/ his fix as well.



                                 Stuart

Stuart R. Anderson                               anderson@netsweng.com
Network & Software Engineering                   http://www.netsweng.com/
1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
                                                  BD03 0A62 E534 37A7 9149

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

* Re: [Qemu-devel] [PATCH] EABI fcntl on x86_64
  2007-03-19 15:57   ` Stuart Anderson
@ 2007-03-19 16:16     ` Stuart Anderson
  0 siblings, 0 replies; 5+ messages in thread
From: Stuart Anderson @ 2007-03-19 16:16 UTC (permalink / raw)
  To: qemu-devel

On Mon, 19 Mar 2007, Stuart Anderson wrote:

> I have a debian arm chroot setup.

Just to clarify, this is from the applieddata.net repository, not the
normal debian one (which is not eabi).


                                 Stuart

Stuart R. Anderson                               anderson@netsweng.com
Network & Software Engineering                   http://www.netsweng.com/
1024D/37A79149:                                  0791 D3B8 9A4C 2CDC A31F
                                                  BD03 0A62 E534 37A7 9149

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

end of thread, other threads:[~2007-03-19 16:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19 15:30 [Qemu-devel] [PATCH] EABI fcntl on x86_64 Stuart Anderson
2007-03-19 15:25 ` Kirill A. Shutemov
2007-03-19 15:38 ` Paul Brook
2007-03-19 15:57   ` Stuart Anderson
2007-03-19 16:16     ` Stuart Anderson

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