qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] linux-user: Use target abi_int type for pipefd[1] in pipe()


From: Laurent Vivier
Subject: Re: [PATCH] linux-user: Use target abi_int type for pipefd[1] in pipe()
Date: Sun, 24 Jul 2022 00:22:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Le 17/07/2022 à 18:21, Helge Deller a écrit :
When writing back the fd[1] pipe file handle to emulated userspace
memory, use sizeof(abi_int) as offset insted of the hosts's int type.
There is no functional change in this patch.

Signed-off-by: Helge Deller <deller@gmx.de>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 991b85e6b4..1e6e814871 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1624,7 +1624,7 @@ static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong 
pipedes,
      }

      if (put_user_s32(host_pipe[0], pipedes)
-        || put_user_s32(host_pipe[1], pipedes + sizeof(host_pipe[0])))
+        || put_user_s32(host_pipe[1], pipedes + sizeof(abi_int)))
          return -TARGET_EFAULT;
      return get_errno(ret);
  }


Applied to my linux-user-for-7.1 branch.

Thanks,
Laurent




reply via email to

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