* [PULL 0/3] Linux user for 7.1 patches
@ 2022-06-24 9:49 Laurent Vivier
2022-06-24 17:50 ` Richard Henderson
0 siblings, 1 reply; 9+ messages in thread
From: Laurent Vivier @ 2022-06-24 9:49 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
The following changes since commit c8b2d413761af732a0798d8df45ce968732083fe:
Merge tag 'bsd-user-syscall-2022q2-pull-request' of ssh://github.com/qemu-bsd-user/qemu-bsd-user into staging (2022-06-19 13:56:13 -0700)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
for you to fetch changes up to 9a7f682c26acae5bc8bfd1f7c774070da54f1625:
linux-user: Adjust child_tidptr on set_tid_address() syscall (2022-06-24 10:00:01 +0200)
----------------------------------------------------------------
linux-user pull request 20220624
----------------------------------------------------------------
Helge Deller (1):
linux-user: Adjust child_tidptr on set_tid_address() syscall
Ilya Leoshkevich (1):
linux-user: Add partial support for MADV_DONTNEED
Richard Henderson (1):
linux-user/x86_64: Fix ELF_PLATFORM
linux-user/elfload.c | 30 +++++++++--------
linux-user/mmap.c | 64 +++++++++++++++++++++++++++++++++++++
linux-user/syscall.c | 20 ++++++------
linux-user/user-internals.h | 1 +
linux-user/user-mmap.h | 1 +
5 files changed, 92 insertions(+), 24 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user for 7.1 patches
2022-06-24 9:49 Laurent Vivier
@ 2022-06-24 17:50 ` Richard Henderson
0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2022-06-24 17:50 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
On 6/24/22 02:49, Laurent Vivier wrote:
> The following changes since commit c8b2d413761af732a0798d8df45ce968732083fe:
>
> Merge tag 'bsd-user-syscall-2022q2-pull-request' of ssh://github.com/qemu-bsd-user/qemu-bsd-user into staging (2022-06-19 13:56:13 -0700)
>
> are available in the Git repository at:
>
> https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
>
> for you to fetch changes up to 9a7f682c26acae5bc8bfd1f7c774070da54f1625:
>
> linux-user: Adjust child_tidptr on set_tid_address() syscall (2022-06-24 10:00:01 +0200)
>
> ----------------------------------------------------------------
> linux-user pull request 20220624
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
>
> ----------------------------------------------------------------
>
> Helge Deller (1):
> linux-user: Adjust child_tidptr on set_tid_address() syscall
>
> Ilya Leoshkevich (1):
> linux-user: Add partial support for MADV_DONTNEED
>
> Richard Henderson (1):
> linux-user/x86_64: Fix ELF_PLATFORM
>
> linux-user/elfload.c | 30 +++++++++--------
> linux-user/mmap.c | 64 +++++++++++++++++++++++++++++++++++++
> linux-user/syscall.c | 20 ++++++------
> linux-user/user-internals.h | 1 +
> linux-user/user-mmap.h | 1 +
> 5 files changed, 92 insertions(+), 24 deletions(-)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/3] Linux user for 7.1 patches
@ 2022-07-26 9:44 Laurent Vivier
2022-07-26 9:44 ` [PULL 1/3] linux-user/hppa: Fix segfaults on page zero Laurent Vivier
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Laurent Vivier @ 2022-07-26 9:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
The following changes since commit 5288bee45fbd33203b61f8c76e41b15bb5913e6e:
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-07-21 11:13:01 +0100)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
for you to fetch changes up to 6f200f51869ff0de7ea0343dd7104362e994b382:
linux-user: Use target abi_int type for pipefd[1] in pipe() (2022-07-25 10:42:11 +0200)
----------------------------------------------------------------
linux-user pull request 20220726
----------------------------------------------------------------
Helge Deller (3):
linux-user/hppa: Fix segfaults on page zero
linux-user: Unconditionally use pipe2() syscall
linux-user: Use target abi_int type for pipefd[1] in pipe()
linux-user/hppa/cpu_loop.c | 3 +++
linux-user/syscall.c | 13 ++-----------
meson.build | 9 ---------
3 files changed, 5 insertions(+), 20 deletions(-)
--
2.37.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 1/3] linux-user/hppa: Fix segfaults on page zero
2022-07-26 9:44 [PULL 0/3] Linux user for 7.1 patches Laurent Vivier
@ 2022-07-26 9:44 ` Laurent Vivier
2022-07-26 9:44 ` [PULL 2/3] linux-user: Unconditionally use pipe2() syscall Laurent Vivier
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2022-07-26 9:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Helge Deller, Peter Maydell
From: Helge Deller <deller@gmx.de>
This program:
int main(void) { asm("bv %r0(%r0)"); return 0; }
produces on real hppa hardware the expected segfault:
SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x3} ---
killed by SIGSEGV +++
Segmentation fault
But when run on linux-user you get instead internal qemu errors:
ERROR: linux-user/hppa/cpu_loop.c:172:cpu_loop: code should not be reached
Bail out! ERROR: linux-user/hppa/cpu_loop.c:172:cpu_loop: code should not be reached
ERROR: accel/tcg/cpu-exec.c:933:cpu_exec: assertion failed: (cpu == current_cpu)
Bail out! ERROR: accel/tcg/cpu-exec.c:933:cpu_exec: assertion failed: (cpu == current_cpu)
Fix it by adding the missing case for the EXCP_IMP trap in
cpu_loop() and raise a segfault.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <YtWNC56seiV6VenA@p100>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/hppa/cpu_loop.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c
index a576d1a249fd..64263c3dc406 100644
--- a/linux-user/hppa/cpu_loop.c
+++ b/linux-user/hppa/cpu_loop.c
@@ -143,6 +143,9 @@ void cpu_loop(CPUHPPAState *env)
env->iaoq_f = env->gr[31];
env->iaoq_b = env->gr[31] + 4;
break;
+ case EXCP_IMP:
+ force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, env->iaoq_f);
+ break;
case EXCP_ILL:
force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f);
break;
--
2.37.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 2/3] linux-user: Unconditionally use pipe2() syscall
2022-07-26 9:44 [PULL 0/3] Linux user for 7.1 patches Laurent Vivier
2022-07-26 9:44 ` [PULL 1/3] linux-user/hppa: Fix segfaults on page zero Laurent Vivier
@ 2022-07-26 9:44 ` Laurent Vivier
2022-07-26 9:44 ` [PULL 3/3] linux-user: Use target abi_int type for pipefd[1] in pipe() Laurent Vivier
2022-07-26 14:29 ` [PULL 0/3] Linux user for 7.1 patches Peter Maydell
3 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2022-07-26 9:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Helge Deller, Peter Maydell
From: Helge Deller <deller@gmx.de>
The pipe2() syscall is available on all Linux platforms since kernel
2.6.27, so use it unconditionally to emulate pipe() and pipe2().
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <YtbZ2ojisTnzxN9Y@p100>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 11 +----------
meson.build | 9 ---------
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 991b85e6b4dd..4f89184d0585 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1586,21 +1586,12 @@ static abi_long do_ppoll(abi_long arg1, abi_long arg2, abi_long arg3,
}
#endif
-static abi_long do_pipe2(int host_pipe[], int flags)
-{
-#ifdef CONFIG_PIPE2
- return pipe2(host_pipe, flags);
-#else
- return -ENOSYS;
-#endif
-}
-
static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes,
int flags, int is_pipe2)
{
int host_pipe[2];
abi_long ret;
- ret = flags ? do_pipe2(host_pipe, flags) : pipe(host_pipe);
+ ret = pipe2(host_pipe, flags);
if (is_error(ret))
return get_errno(ret);
diff --git a/meson.build b/meson.build
index 8a8c415fc1f8..75aaca8462e8 100644
--- a/meson.build
+++ b/meson.build
@@ -2026,15 +2026,6 @@ config_host_data.set('CONFIG_OPEN_BY_HANDLE', cc.links(gnu_source_prefix + '''
#else
int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
#endif'''))
-config_host_data.set('CONFIG_PIPE2', cc.links(gnu_source_prefix + '''
- #include <unistd.h>
- #include <fcntl.h>
-
- int main(void)
- {
- int pipefd[2];
- return pipe2(pipefd, O_CLOEXEC);
- }'''))
config_host_data.set('CONFIG_POSIX_MADVISE', cc.links(gnu_source_prefix + '''
#include <sys/mman.h>
#include <stddef.h>
--
2.37.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PULL 3/3] linux-user: Use target abi_int type for pipefd[1] in pipe()
2022-07-26 9:44 [PULL 0/3] Linux user for 7.1 patches Laurent Vivier
2022-07-26 9:44 ` [PULL 1/3] linux-user/hppa: Fix segfaults on page zero Laurent Vivier
2022-07-26 9:44 ` [PULL 2/3] linux-user: Unconditionally use pipe2() syscall Laurent Vivier
@ 2022-07-26 9:44 ` Laurent Vivier
2022-07-26 14:29 ` [PULL 0/3] Linux user for 7.1 patches Peter Maydell
3 siblings, 0 replies; 9+ messages in thread
From: Laurent Vivier @ 2022-07-26 9:44 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Helge Deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <YtQ3Id6z8slpVr7r@p100>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 4f89184d0585..b27a6552aa34 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1615,7 +1615,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);
}
--
2.37.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user for 7.1 patches
2022-07-26 9:44 [PULL 0/3] Linux user for 7.1 patches Laurent Vivier
` (2 preceding siblings ...)
2022-07-26 9:44 ` [PULL 3/3] linux-user: Use target abi_int type for pipefd[1] in pipe() Laurent Vivier
@ 2022-07-26 14:29 ` Peter Maydell
3 siblings, 0 replies; 9+ messages in thread
From: Peter Maydell @ 2022-07-26 14:29 UTC (permalink / raw)
To: Laurent Vivier; +Cc: qemu-devel
On Tue, 26 Jul 2022 at 10:49, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 5288bee45fbd33203b61f8c76e41b15bb5913e6e:
>
> Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-07-21 11:13:01 +0100)
>
> are available in the Git repository at:
>
> https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
>
> for you to fetch changes up to 6f200f51869ff0de7ea0343dd7104362e994b382:
>
> linux-user: Use target abi_int type for pipefd[1] in pipe() (2022-07-25 10:42:11 +0200)
>
> ----------------------------------------------------------------
> linux-user pull request 20220726
>
> ----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/7.1
for any user-visible changes.
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PULL 0/3] Linux user for 7.1 patches
@ 2022-08-03 14:56 Laurent Vivier
2022-08-03 17:12 ` Richard Henderson
0 siblings, 1 reply; 9+ messages in thread
From: Laurent Vivier @ 2022-08-03 14:56 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier
The following changes since commit 3e4abe2c92964aadd35344a635b0f32cb487fd5c:
Merge tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu into staging (2022-07-27 20:10:15 -0700)
are available in the Git repository at:
https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
for you to fetch changes up to 5b63de6b54add51822db3c89325c6fc05534a54c:
linux-user: Use memfd for open syscall emulation (2022-08-02 15:44:27 +0200)
----------------------------------------------------------------
Pull request linux-user 20220803
----------------------------------------------------------------
Ilya Leoshkevich (1):
linux-user: Do not treat madvise()'s advice as a bitmask
Peter Maydell (1):
linux-user/flatload.c: Fix setting of image_info::end_code
Rainer Müller (1):
linux-user: Use memfd for open syscall emulation
linux-user/flatload.c | 2 +-
linux-user/mmap.c | 2 +-
linux-user/syscall.c | 22 ++++++++++++++--------
3 files changed, 16 insertions(+), 10 deletions(-)
--
2.37.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PULL 0/3] Linux user for 7.1 patches
2022-08-03 14:56 Laurent Vivier
@ 2022-08-03 17:12 ` Richard Henderson
0 siblings, 0 replies; 9+ messages in thread
From: Richard Henderson @ 2022-08-03 17:12 UTC (permalink / raw)
To: Laurent Vivier, qemu-devel
On 8/3/22 07:56, Laurent Vivier wrote:
> The following changes since commit 3e4abe2c92964aadd35344a635b0f32cb487fd5c:
>
> Merge tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu into staging (2022-07-27 20:10:15 -0700)
>
> are available in the Git repository at:
>
> https://gitlab.com/laurent_vivier/qemu.git tags/linux-user-for-7.1-pull-request
>
> for you to fetch changes up to 5b63de6b54add51822db3c89325c6fc05534a54c:
>
> linux-user: Use memfd for open syscall emulation (2022-08-02 15:44:27 +0200)
>
> ----------------------------------------------------------------
> Pull request linux-user 20220803
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
>
> ----------------------------------------------------------------
>
> Ilya Leoshkevich (1):
> linux-user: Do not treat madvise()'s advice as a bitmask
>
> Peter Maydell (1):
> linux-user/flatload.c: Fix setting of image_info::end_code
>
> Rainer Müller (1):
> linux-user: Use memfd for open syscall emulation
>
> linux-user/flatload.c | 2 +-
> linux-user/mmap.c | 2 +-
> linux-user/syscall.c | 22 ++++++++++++++--------
> 3 files changed, 16 insertions(+), 10 deletions(-)
>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-08-03 17:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 9:44 [PULL 0/3] Linux user for 7.1 patches Laurent Vivier
2022-07-26 9:44 ` [PULL 1/3] linux-user/hppa: Fix segfaults on page zero Laurent Vivier
2022-07-26 9:44 ` [PULL 2/3] linux-user: Unconditionally use pipe2() syscall Laurent Vivier
2022-07-26 9:44 ` [PULL 3/3] linux-user: Use target abi_int type for pipefd[1] in pipe() Laurent Vivier
2022-07-26 14:29 ` [PULL 0/3] Linux user for 7.1 patches Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2022-08-03 14:56 Laurent Vivier
2022-08-03 17:12 ` Richard Henderson
2022-06-24 9:49 Laurent Vivier
2022-06-24 17:50 ` Richard Henderson
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).