qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] linux-user: fix bug about missing signum convert of sigqueue
@ 2022-08-31  4:10 fanwj
  2022-09-05 17:54 ` Richard Henderson
  2022-09-05 21:00 ` Philippe Mathieu-Daudé via
  0 siblings, 2 replies; 5+ messages in thread
From: fanwj @ 2022-08-31  4:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: laurent

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

From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001
From: fanwenjie <fanwj@mail.ustc.edu.cn>
Date: Wed, 31 Aug 2022 11:55:25 +0800
Subject: [PATCH] linux-user: fix bug about missing signum convert of sigqueue


Signed-off-by: fanwenjie <fanwj@mail.ustc.edu.cn>
---
 linux-user/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f409121202..3e5ab4f0b2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9690,7 +9690,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
             }
             target_to_host_siginfo(&uinfo, p);
             unlock_user(p, arg3, 0);
-            ret = get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo));
+            ret = get_errno(sys_rt_sigqueueinfo(arg1, target_to_host_signal(arg2), &uinfo));
         }
         return ret;
     case TARGET_NR_rt_tgsigqueueinfo:
@@ -9703,7 +9703,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1,
             }
             target_to_host_siginfo(&uinfo, p);
             unlock_user(p, arg4, 0);
-            ret = get_errno(sys_rt_tgsigqueueinfo(arg1, arg2, arg3, &uinfo));
+            ret = get_errno(sys_rt_tgsigqueueinfo(arg1, arg2, target_to_host_signal(arg3), &uinfo));
         }
         return ret;
 #ifdef TARGET_NR_sigreturn
-- 


[-- Attachment #2: Type: text/html, Size: 2242 bytes --]

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

* Re: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
  2022-08-31  4:10 [PATCH] linux-user: fix bug about missing signum convert of sigqueue fanwj
@ 2022-09-05 17:54 ` Richard Henderson
  2022-09-27  7:36   ` Laurent Vivier
  2022-09-05 21:00 ` Philippe Mathieu-Daudé via
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2022-09-05 17:54 UTC (permalink / raw)
  To: fanwj, qemu-devel; +Cc: laurent

On 8/31/22 05:10, fanwj@mail.ustc.edu.cn wrote:
>  From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001
> From: fanwenjie <fanwj@mail.ustc.edu.cn>
> Date: Wed, 31 Aug 2022 11:55:25 +0800
> Subject: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
> 
> Signed-off-by: fanwenjie <fanwj@mail.ustc.edu.cn>

Queued to linux-user-next.


r~


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

* Re: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
  2022-08-31  4:10 [PATCH] linux-user: fix bug about missing signum convert of sigqueue fanwj
  2022-09-05 17:54 ` Richard Henderson
@ 2022-09-05 21:00 ` Philippe Mathieu-Daudé via
  1 sibling, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-09-05 21:00 UTC (permalink / raw)
  To: fanwj, qemu-devel; +Cc: laurent, Alex Bennée

On 31/8/22 06:10, fanwj@mail.ustc.edu.cn wrote:
>  From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001
> From: fanwenjie <fanwj@mail.ustc.edu.cn>
> Date: Wed, 31 Aug 2022 11:55:25 +0800
> Subject: [PATCH] linux-user: fix bug about missing signum convert of 
> sigqueue
> 
> Signed-off-by: fanwenjie <fanwj@mail.ustc.edu.cn>
> ---
>   linux-user/syscall.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index f409121202..3e5ab4f0b2 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -9690,7 +9690,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, 
> int num, abi_long arg1,
>               }
>               target_to_host_siginfo(&uinfo, p);
>               unlock_user(p, arg3, 0);
> -            ret = get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo));
> +            ret = get_errno(sys_rt_sigqueueinfo(arg1, 
> target_to_host_signal(arg2), &uinfo));

Fixes: 66fb9763af ("basic signal handling")

Date:   Sun Mar 23 01:06:05 2003 +0000

!@#% ALMOST 20 YEARS %#!@#$

Cc'ing Alex for an entry in the oldest bug fixed table.

>       case TARGET_NR_rt_tgsigqueueinfo:
> @@ -9703,7 +9703,7 @@ static abi_long do_syscall1(CPUArchState *cpu_env, 
> int num, abi_long arg1,
>               }
>               target_to_host_siginfo(&uinfo, p);
>               unlock_user(p, arg4, 0);
> -            ret = get_errno(sys_rt_tgsigqueueinfo(arg1, arg2, arg3, 
> &uinfo));
> +            ret = get_errno(sys_rt_tgsigqueueinfo(arg1, arg2, 
> target_to_host_signal(arg3), &uinfo));

Fixes: cf8b8bfc50 ("linux-user: add support for rt_tgsigqueueinfo() 
system call")

>           }
>           return ret;
>   #ifdef TARGET_NR_sigreturn
> -- 
> 

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


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

* Re: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
  2022-09-05 17:54 ` Richard Henderson
@ 2022-09-27  7:36   ` Laurent Vivier
  2022-09-28 11:35     ` Richard Henderson
  0 siblings, 1 reply; 5+ messages in thread
From: Laurent Vivier @ 2022-09-27  7:36 UTC (permalink / raw)
  To: Richard Henderson; +Cc: fanwj, qemu-devel

Le 05/09/2022 à 19:54, Richard Henderson a écrit :
> On 8/31/22 05:10, fanwj@mail.ustc.edu.cn wrote:
>>  From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001
>> From: fanwenjie <fanwj@mail.ustc.edu.cn>
>> Date: Wed, 31 Aug 2022 11:55:25 +0800
>> Subject: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
>>
>> Signed-off-by: fanwenjie <fanwj@mail.ustc.edu.cn>
> 
> Queued to linux-user-next.

I'm preparing a PR, do you want I take it?

Thanks,
Laurent



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

* Re: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
  2022-09-27  7:36   ` Laurent Vivier
@ 2022-09-28 11:35     ` Richard Henderson
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-09-28 11:35 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: fanwj, qemu-devel

On 9/27/22 00:36, Laurent Vivier wrote:
> Le 05/09/2022 à 19:54, Richard Henderson a écrit :
>> On 8/31/22 05:10, fanwj@mail.ustc.edu.cn wrote:
>>>  From 4ebe8a67ed7c4b1220957b2b67a62ba60e0e80ec Mon Sep 17 00:00:00 2001
>>> From: fanwenjie <fanwj@mail.ustc.edu.cn>
>>> Date: Wed, 31 Aug 2022 11:55:25 +0800
>>> Subject: [PATCH] linux-user: fix bug about missing signum convert of sigqueue
>>>
>>> Signed-off-by: fanwenjie <fanwj@mail.ustc.edu.cn>
>>
>> Queued to linux-user-next.
> 
> I'm preparing a PR, do you want I take it?

Yes please, though I may have been too slow for this one.


r~


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

end of thread, other threads:[~2022-09-28 13:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31  4:10 [PATCH] linux-user: fix bug about missing signum convert of sigqueue fanwj
2022-09-05 17:54 ` Richard Henderson
2022-09-27  7:36   ` Laurent Vivier
2022-09-28 11:35     ` Richard Henderson
2022-09-05 21:00 ` Philippe Mathieu-Daudé via

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