[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] fcntl64 fix
From: |
Thiemo Seufer |
Subject: |
Re: [Qemu-devel] [PATCH] fcntl64 fix |
Date: |
Mon, 19 Mar 2007 17:13:03 +0000 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Kirill A. Shutemov wrote:
> TARGET_F_*64 should be used instead of F_*64, because on 64-bit host
> systems F_GETLK == F_GETLK64(same for SETLK and SETLKW), so we cannot
> determinate if it's a long lock or not on a target 32-bit system.
> Patch in the attachment.
>
> P.S. Please, review my privious patches, which I have added description
> recently. Or should I repost it?
>
> diff -uNr qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c
> qemu-0.9.0.cvs20070304/linux-user/syscall.c
> --- qemu-0.9.0.cvs20070304.orig/linux-user/syscall.c 2007-03-09 20:08:59
> +0200
> +++ qemu-0.9.0.cvs20070304/linux-user/syscall.c 2007-03-09 20:09:54
> +0200
> @@ -4063,7 +4063,7 @@
> #endif
>
> switch(arg2) {
> - case F_GETLK64:
> + case TARGET_F_GETLK64:
> ret = get_errno(fcntl(arg1, arg2, &fl));
This changes the bug from checking the wrong flag to (potentially)
passing down the wrong flag...
> if (ret == 0) {
> #ifdef TARGET_ARM
> @@ -4089,8 +4089,8 @@
> }
> break;
>
> - case F_SETLK64:
> - case F_SETLKW64:
> + case TARGET_F_SETLK64:
> + case TARGET_F_SETLKW64:
> #ifdef TARGET_ARM
> if (((CPUARMState *)cpu_env)->eabi) {
> lock_user_struct(target_efl, arg3, 1);
Likewise here. We should always check TARGET_* flags and pass down the
corresponding host flag.
Thiemo
- [Qemu-devel] [PATCH] fcntl64 fix, Kirill A. Shutemov, 2007/03/09
- Re: [Qemu-devel] [PATCH] fcntl64 fix,
Thiemo Seufer <=
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Stuart Anderson, 2007/03/19
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Kirill A. Shutemov, 2007/03/20
- Message not available
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Kirill A. Shutemov, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Stuart Anderson, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Kirill A. Shutemov, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Stuart Anderson, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Kirill A. Shutemov, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Stuart Anderson, 2007/03/20
- Re: [Qemu-devel] [PATCH] fcntl64 fix, Stuart Anderson, 2007/03/20