Re: [PATCH v4] linux-user: Add close_range() syscall

2022-10-24 Thread Richard Henderson
On 10/25/22 11:39, Helge Deller wrote: On 10/25/22 00:39, Richard Henderson wrote: On 10/25/22 06:43, Helge Deller wrote: +    abi_long maxfd = arg2; + +    if ((sizeof(abi_long) == 4 && arg2 == (abi_long)0x7FFFUL) || +    (sizeof(abi_long) == 8 && arg2 == (abi_

Re: [PATCH v4] linux-user: Add close_range() syscall

2022-10-24 Thread Helge Deller
On 10/25/22 03:39, Helge Deller wrote: On 10/25/22 00:39, Richard Henderson wrote: On 10/25/22 06:43, Helge Deller wrote: +    abi_long maxfd = arg2; + +    if ((sizeof(abi_long) == 4 && arg2 == (abi_long)0x7FFFUL) || +    (sizeof(abi_long) == 8 && arg2 == (abi_

Re: [PATCH v4] linux-user: Add close_range() syscall

2022-10-24 Thread Helge Deller
On 10/25/22 00:39, Richard Henderson wrote: On 10/25/22 06:43, Helge Deller wrote: +    abi_long maxfd = arg2; + +    if ((sizeof(abi_long) == 4 && arg2 == (abi_long)0x7FFFUL) || +    (sizeof(abi_long) == 8 && arg2 == (abi_long)0x7FFFULL)) { +

Re: [PATCH v4] linux-user: Add close_range() syscall

2022-10-24 Thread Richard Henderson
On 10/25/22 06:43, Helge Deller wrote: +abi_long maxfd = arg2; + +if ((sizeof(abi_long) == 4 && arg2 == (abi_long)0x7FFFUL) || +(sizeof(abi_long) == 8 && arg2 == (abi_long)0x7FFFULL)) { +maxfd = target_fd_max; +}

[PATCH v4] linux-user: Add close_range() syscall

2022-10-24 Thread Helge Deller
Signed-off-by: Helge Deller --- Changes: v4: Fix check for arg2 v3: fd_trans_unregister() only called if close_range() doesn't fail v2: consider CLOSE_RANGE_CLOEXEC flag diff --git a/linux-user/strace.list b/linux-user/strace.list index 3df2184580..cd995e5d56 100644 --- a/linux-user/strace.list +