Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Helge Deller
On 7/18/22 18:17, Peter Maydell wrote: > On Mon, 18 Jul 2022 at 16:50, Helge Deller wrote: >> On 7/18/22 16:33, Peter Maydell wrote: >>> So my preference would be that we should just say "we can assume >>> that pipe2 is always available and implemented on linux hosts" and >>> remove the code that

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Peter Maydell
On Mon, 18 Jul 2022 at 16:50, Helge Deller wrote: > On 7/18/22 16:33, Peter Maydell wrote: > > So my preference would be that we should just say "we can assume > > that pipe2 is always available and implemented on linux hosts" and > > remove the code that handles the possibility that it isn't. > >

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Helge Deller
On 7/18/22 16:33, Peter Maydell wrote: > On Mon, 18 Jul 2022 at 15:21, Helge Deller wrote: >> On 7/18/22 14:51, Peter Maydell wrote: >>> Why do we need to do this? >> >> Yep, we don't *need* to... >> >>> If the flags argument is 0, >>> then pipe2() is the same as pipe(), so we can safely >>> emula

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Peter Maydell
On Mon, 18 Jul 2022 at 15:21, Helge Deller wrote: > On 7/18/22 14:51, Peter Maydell wrote: > > Why do we need to do this? > > Yep, we don't *need* to... > > > If the flags argument is 0, > > then pipe2() is the same as pipe(), so we can safely > > emulate it with the host pipe() call. It is, or at

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Helge Deller
On 7/18/22 14:51, Peter Maydell wrote: > On Sun, 17 Jul 2022 at 17:10, Helge Deller wrote: >> >> In 2010, the commit b41a66edd0c added a thrird parameter "is_pipe2" to the > > typo in commit hash (lost the first letter). Should be > fb41a66edd0c7bd6 ("alpha-linux-user: Fix pipe return mechanism."

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-18 Thread Peter Maydell
On Sun, 17 Jul 2022 at 17:10, Helge Deller wrote: > > In 2010, the commit b41a66edd0c added a thrird parameter "is_pipe2" to the typo in commit hash (lost the first letter). Should be fb41a66edd0c7bd6 ("alpha-linux-user: Fix pipe return mechanism." I think ? > internal do_pipe() function, but mi

Re: [PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-17 Thread Helge Deller
On 7/17/22 18:08, Helge Deller wrote: > In 2010, the commit b41a66edd0c added a thrird parameter "is_pipe2" to the > internal do_pipe() function, but missed to actually use this parameter to > decide if the pipe() or pipe2() syscall should be used. > Instead it just continued to check the flags par

[PATCH] linux-user: Fix pipe() vs. pipe2() usage for ALPHA, MIPS, SH4 and SPARC

2022-07-17 Thread Helge Deller
In 2010, the commit b41a66edd0c added a thrird parameter "is_pipe2" to the internal do_pipe() function, but missed to actually use this parameter to decide if the pipe() or pipe2() syscall should be used. Instead it just continued to check the flags parameter and used pipe2() unconditionally if fla