* [PATCH] linux-user: Fix strace output for s390x mmap()
@ 2024-11-19 21:11 Ilya Leoshkevich
2024-11-20 20:01 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Ilya Leoshkevich @ 2024-11-19 21:11 UTC (permalink / raw)
To: Laurent Vivier, Thomas Huth
Cc: Richard Henderson, qemu-devel, qemu-s390x, Ilya Leoshkevich,
qemu-stable
print_mmap() assumes that mmap() receives arguments via memory if
mmap2() is present. s390x (as opposed to s390) does not fit this
pattern: it does not have mmap2(), but mmap() still receives arguments
via memory.
Fix by special-casing s390x.
Cc: qemu-stable@nongnu.org
Fixes: d971040c2d16 ("linux-user: Fix strace output for old_mmap")
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
linux-user/strace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index b70eadc19ef..50f41e746ec 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -3971,7 +3971,7 @@ print_mmap(CPUArchState *cpu_env, const struct syscallname *name,
{
return print_mmap_both(cpu_env, name, arg0, arg1, arg2, arg3,
arg4, arg5,
-#if defined(TARGET_NR_mmap2)
+#if defined(TARGET_NR_mmap2) || defined(TARGET_S390X)
true
#else
false
--
2.47.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linux-user: Fix strace output for s390x mmap()
2024-11-19 21:11 [PATCH] linux-user: Fix strace output for s390x mmap() Ilya Leoshkevich
@ 2024-11-20 20:01 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2024-11-20 20:01 UTC (permalink / raw)
To: Ilya Leoshkevich, Laurent Vivier, Thomas Huth
Cc: qemu-devel, qemu-s390x, qemu-stable
On 11/19/24 15:11, Ilya Leoshkevich wrote:
> print_mmap() assumes that mmap() receives arguments via memory if
> mmap2() is present. s390x (as opposed to s390) does not fit this
> pattern: it does not have mmap2(), but mmap() still receives arguments
> via memory.
>
> Fix by special-casing s390x.
>
> Cc: qemu-stable@nongnu.org
> Fixes: d971040c2d16 ("linux-user: Fix strace output for old_mmap")
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> linux-user/strace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index b70eadc19ef..50f41e746ec 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -3971,7 +3971,7 @@ print_mmap(CPUArchState *cpu_env, const struct syscallname *name,
> {
> return print_mmap_both(cpu_env, name, arg0, arg1, arg2, arg3,
> arg4, arg5,
> -#if defined(TARGET_NR_mmap2)
> +#if defined(TARGET_NR_mmap2) || defined(TARGET_S390X)
I think we should explicitly match syscalls.c:
#if (defined(TARGET_I386) && defined(TARGET_ABI32)) || \
(defined(TARGET_ARM) && defined(TARGET_ABI32)) || \
defined(TARGET_M68K) || defined(TARGET_MICROBLAZE) \
|| defined(TARGET_S390X)
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-20 20:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 21:11 [PATCH] linux-user: Fix strace output for s390x mmap() Ilya Leoshkevich
2024-11-20 20:01 ` 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).