From patchwork Sun Sep 11 18:18:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1161EC6FA8B for ; Sun, 11 Sep 2022 18:37:02 +0000 (UTC) Received: from localhost ([::1]:35178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRpF-0006DQ-1n for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:37:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXX-0002S5-GW for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:59789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002lE-8f for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920313; bh=iZy4oWlz4gLRtGY1piJ1Up9ec0SQer8EDDaNHLcum+s=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=O1YPVof6d32/GuywkQDTxEhGqqbdGM7641MpaO9/suA6GTshzzaKY1fkjp6WBGAMf ropBvHeNeklubGsuUE42v9lnORl84UCk/F0t369TP+rW7he6AhTBC+N9xdrVYHID/N ZJ0BXt+v/PWl925SxkAGXrUyVoUhggMwkIM84IWI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MsYqv-1pLyks2E6l-00u582; Sun, 11 Sep 2022 20:18:33 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 01/12] linux-user: Add missing signals in strace output Date: Sun, 11 Sep 2022 20:18:19 +0200 Message-Id: <20220911181830.15851-2-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:l3nioEHCuAtTKG5EkdNb3nJnUQ+yAUj1/s+v9KwrC8amL18zuIF rD+N5CwKrXhicykZ7oxtF++zop8Up+1lBC5AH84ID+XIzvd8d+YxDWTAu14kKyOc6POtZGr vOES56qY1vcyhMXOAnZX0thjkOQb7EK1mAt3ZfKxe6x3EI8QR5pWwBlOKaqwKXxsSczTXZE dYjV7c6gmSTPtptJfQjYQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:ccx2wq0TOlY=:OlTSYM4qy+oEXJEib4JWUZ wxXugDQrqRoa6bW32hySNM72FQBgRn9ruQcUTD6t8q53C8h09sjcgVhblIjo+rS+7zzi1hMSr k0brotP4vq9RGv6+otAX6KCEOYQFMAQ/msANsIGHgvFxmOgtu4Bj8Oj1ctemKyZsqsGxOvXfy RCrDt9YVaRVT9XljM1AemL992y5Azsw4/gp88xtQT2YUei2Lqz2wrxFoD4mJOOK81WBY+4a/D PUK2gCBnALR6gkzV11kOkkXDOpJSI3zyJBTCTQGM9sAq1TFrW7aAEJ3siYx4EwvHPbO49Vvg7 +zw5sHBW03u9De9yD+3itirys6NLqm/weGztk7iyzPS4PnmtGki/hf9PfbDe6MwRLQFcQjXkH Gws8oahyFlA7kownHKAS6/ZuQQ7UYtwbURkpVNUyFjBpOylPj7+HZqrmgd6PkHqFX7a3RConn 9my3CQpSAY7AlPqf1TPM3X72/8/RpMUANPHNVRbkjqpm9CWBKOL2X8evOdGLGaeosSwc9EFyy KRE7pZwoKyDTKMTcDooTusYVrBhmqDK7nHDkNHV+Ji+uKiZDRyy6RhVOh4oE3u/7/HGV5xUWn ukqe/nsINYksCmfZ3KDiIa0vrKaDbekJo5rncYemQs+kVndwngcUdvwpD0rzSq9ZkPMig2XFn 1b7BWIkCFDPDZ9QaGdWTtWZGK68PiebejXMhF/tL3oe+iUFeycVEcPoDj0dYQsOdePfHHBHvC Tw+EOMWT4TTSOsQlZxUBG8AYMqK27749Dz3dZcsIFZFfJzJgASomWtFj1KblxcNwNeR/+esHD OjhR8NtEog0zqaXK8Szt/9KGYpPrsYghAoIzN6h7kJMhL2AIpj0fBZ3Fyt222o1nqw8i+CzoW 9e4BCsaZjHXt50BQruUP5oS3h+GZMWTg8+oiAGKtpzSylnLmomeSH9mFC4r9WMqACc/jtgQr+ fcBqwcedlkwXOTHHXp75Dvsa5d/H7bRJTPxXMOJy/SGCAhFwnKn3Aytl0KjpGRXCjKaAny3ed 5FgrnId+qvhEhp3xg+sQ+rBqQaWexUst9xBhUrQb2Oua3WhjmCMS395ZPnfIqj/6AfLzlc+Pt r3jXf0VDQKgTlfbFkRAiAz/xrA4/3GfuLmRIMM89OLDiB9Q8ZYSbs4b311M0Rk3ze8rHbdBZp KpWI8= Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UPPERCASE_50_75=0.008 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Some of the guest signal numbers are currently not converted to their representative names in the strace output, e.g. SIGVTALRM. This patch introduces a smart way to generate and keep in sync the host-to-guest and guest-to-host signal conversion tables for usage in the qemu signal and strace code. This ensures that any signals will now show up in both tables. There is no functional change in this patch - with the exception that yet missing signal names now show up in the strace code too. Signed-off-by: Helge Deller --- linux-user/signal-common.h | 46 ++++++++++++++++++++++++++++++++++++++ linux-user/signal.c | 37 +++--------------------------- linux-user/strace.c | 30 +++++++++---------------- 3 files changed, 60 insertions(+), 53 deletions(-) -- 2.37.2 diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h index 6a7e4a93fc..3e2dc604c2 100644 --- a/linux-user/signal-common.h +++ b/linux-user/signal-common.h @@ -118,4 +118,50 @@ static inline void finish_sigsuspend_mask(int ret) } } +#if defined(SIGSTKFLT) && defined(TARGET_SIGSTKFLT) +#define MAKE_SIG_ENTRY_SIGSTKFLT MAKE_SIG_ENTRY(SIGSTKFLT) +#else +#define MAKE_SIG_ENTRY_SIGSTKFLT +#endif + +#if defined(SIGIOT) && defined(TARGET_SIGIOT) +#define MAKE_SIG_ENTRY_SIGIOT MAKE_SIG_ENTRY(SIGIOT) +#else +#define MAKE_SIG_ENTRY_SIGIOT +#endif + +#define MAKE_SIGNAL_LIST \ + MAKE_SIG_ENTRY(SIGHUP) \ + MAKE_SIG_ENTRY(SIGINT) \ + MAKE_SIG_ENTRY(SIGQUIT) \ + MAKE_SIG_ENTRY(SIGILL) \ + MAKE_SIG_ENTRY(SIGTRAP) \ + MAKE_SIG_ENTRY(SIGABRT) \ + MAKE_SIG_ENTRY(SIGBUS) \ + MAKE_SIG_ENTRY(SIGFPE) \ + MAKE_SIG_ENTRY(SIGKILL) \ + MAKE_SIG_ENTRY(SIGUSR1) \ + MAKE_SIG_ENTRY(SIGSEGV) \ + MAKE_SIG_ENTRY(SIGUSR2) \ + MAKE_SIG_ENTRY(SIGPIPE) \ + MAKE_SIG_ENTRY(SIGALRM) \ + MAKE_SIG_ENTRY(SIGTERM) \ + MAKE_SIG_ENTRY(SIGCHLD) \ + MAKE_SIG_ENTRY(SIGCONT) \ + MAKE_SIG_ENTRY(SIGSTOP) \ + MAKE_SIG_ENTRY(SIGTSTP) \ + MAKE_SIG_ENTRY(SIGTTIN) \ + MAKE_SIG_ENTRY(SIGTTOU) \ + MAKE_SIG_ENTRY(SIGURG) \ + MAKE_SIG_ENTRY(SIGXCPU) \ + MAKE_SIG_ENTRY(SIGXFSZ) \ + MAKE_SIG_ENTRY(SIGVTALRM) \ + MAKE_SIG_ENTRY(SIGPROF) \ + MAKE_SIG_ENTRY(SIGWINCH) \ + MAKE_SIG_ENTRY(SIGIO) \ + MAKE_SIG_ENTRY(SIGPWR) \ + MAKE_SIG_ENTRY(SIGSYS) \ + MAKE_SIG_ENTRY_SIGSTKFLT \ + MAKE_SIG_ENTRY_SIGIOT + #endif diff --git a/linux-user/signal.c b/linux-user/signal.c index 8d29bfaa6b..61c6fa3fcf 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -53,40 +53,9 @@ abi_ulong default_rt_sigreturn; QEMU_BUILD_BUG_ON(__SIGRTMAX + 1 != _NSIG); #endif static uint8_t host_to_target_signal_table[_NSIG] = { - [SIGHUP] = TARGET_SIGHUP, - [SIGINT] = TARGET_SIGINT, - [SIGQUIT] = TARGET_SIGQUIT, - [SIGILL] = TARGET_SIGILL, - [SIGTRAP] = TARGET_SIGTRAP, - [SIGABRT] = TARGET_SIGABRT, -/* [SIGIOT] = TARGET_SIGIOT,*/ - [SIGBUS] = TARGET_SIGBUS, - [SIGFPE] = TARGET_SIGFPE, - [SIGKILL] = TARGET_SIGKILL, - [SIGUSR1] = TARGET_SIGUSR1, - [SIGSEGV] = TARGET_SIGSEGV, - [SIGUSR2] = TARGET_SIGUSR2, - [SIGPIPE] = TARGET_SIGPIPE, - [SIGALRM] = TARGET_SIGALRM, - [SIGTERM] = TARGET_SIGTERM, -#ifdef SIGSTKFLT - [SIGSTKFLT] = TARGET_SIGSTKFLT, -#endif - [SIGCHLD] = TARGET_SIGCHLD, - [SIGCONT] = TARGET_SIGCONT, - [SIGSTOP] = TARGET_SIGSTOP, - [SIGTSTP] = TARGET_SIGTSTP, - [SIGTTIN] = TARGET_SIGTTIN, - [SIGTTOU] = TARGET_SIGTTOU, - [SIGURG] = TARGET_SIGURG, - [SIGXCPU] = TARGET_SIGXCPU, - [SIGXFSZ] = TARGET_SIGXFSZ, - [SIGVTALRM] = TARGET_SIGVTALRM, - [SIGPROF] = TARGET_SIGPROF, - [SIGWINCH] = TARGET_SIGWINCH, - [SIGIO] = TARGET_SIGIO, - [SIGPWR] = TARGET_SIGPWR, - [SIGSYS] = TARGET_SIGSYS, +#define MAKE_SIG_ENTRY(sig) [sig] = TARGET_##sig, + MAKE_SIGNAL_LIST +#undef MAKE_SIG_ENTRY /* next signals stay the same */ }; diff --git a/linux-user/strace.c b/linux-user/strace.c index 7d882526da..a4eeef7ae1 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -17,6 +17,7 @@ #include "qemu.h" #include "user-internals.h" #include "strace.h" +#include "signal-common.h" struct syscallname { int nr; @@ -141,30 +142,21 @@ if( cmd == val ) { \ qemu_log("%d", cmd); } +static const char * const target_signal_name[] = { +#define MAKE_SIG_ENTRY(sig) [TARGET_##sig] = #sig, + MAKE_SIGNAL_LIST +#undef MAKE_SIG_ENTRY +}; + static void print_signal(abi_ulong arg, int last) { const char *signal_name = NULL; - switch(arg) { - case TARGET_SIGHUP: signal_name = "SIGHUP"; break; - case TARGET_SIGINT: signal_name = "SIGINT"; break; - case TARGET_SIGQUIT: signal_name = "SIGQUIT"; break; - case TARGET_SIGILL: signal_name = "SIGILL"; break; - case TARGET_SIGABRT: signal_name = "SIGABRT"; break; - case TARGET_SIGFPE: signal_name = "SIGFPE"; break; - case TARGET_SIGKILL: signal_name = "SIGKILL"; break; - case TARGET_SIGSEGV: signal_name = "SIGSEGV"; break; - case TARGET_SIGPIPE: signal_name = "SIGPIPE"; break; - case TARGET_SIGALRM: signal_name = "SIGALRM"; break; - case TARGET_SIGTERM: signal_name = "SIGTERM"; break; - case TARGET_SIGUSR1: signal_name = "SIGUSR1"; break; - case TARGET_SIGUSR2: signal_name = "SIGUSR2"; break; - case TARGET_SIGCHLD: signal_name = "SIGCHLD"; break; - case TARGET_SIGCONT: signal_name = "SIGCONT"; break; - case TARGET_SIGSTOP: signal_name = "SIGSTOP"; break; - case TARGET_SIGTTIN: signal_name = "SIGTTIN"; break; - case TARGET_SIGTTOU: signal_name = "SIGTTOU"; break; + + if (arg < ARRAY_SIZE(target_signal_name)) { + signal_name = target_signal_name[arg]; } + if (signal_name == NULL) { print_raw_param("%ld", arg, last); return; From patchwork Sun Sep 11 18:18:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 532A7C6FA86 for ; Sun, 11 Sep 2022 18:20:33 +0000 (UTC) Received: from localhost ([::1]:43208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRZI-00057L-DX for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:20:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002RN-GI for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 Received: from mout.gmx.net ([212.227.15.18]:60903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXR-0002lF-9u for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920313; bh=/icehtdKOzzoj9/rDZrbGqnt2FX/FH/xuZNyulOUMzM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Nt2VBEgiSpJm2ISsh4brsYk40rDFpGvgA761CKy0+i+zVkT4RNLcNB0AbulCinIe5 elZ3kIpF9mM3m+wDGqPH8UjNKxn6vJgaU/P7DX8PZvEdhxSK1IGrMXOIw8jxzi+oHc Rz7taR+9LxbPLojnLdJaHah2fvQjzAGqYpOWDMv8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7QxL-1pPoEG2qgH-017mWO; Sun, 11 Sep 2022 20:18:33 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 02/12] linux-user: Add missing clock_gettime64() syscall strace Date: Sun, 11 Sep 2022 20:18:20 +0200 Message-Id: <20220911181830.15851-3-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:ChpyiuahJdX6XQ6Hre2rDkDQjMU9wrBslDol+uVkI3iqQ7ep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zFeKlN7ZA/dTI/AZDaqwt0+MxhAwRPTMmn /r/bh+Bee74rx5g6XPpy9NTVVxoK5VA2zzMEPVo2fsbxemIOjmeh3V8/LoXrPVAtGNs73dOVO zcwoXse/+gp9IAJION73DsxGUCqOszH92bAzhslL2sQog64T0fFoOza7xbuBysqoZUxFtYjZJ Aoc3UioedyoqaErUHqoSG0xfHmKikzEwSyppjg8AHhT49zentJMBGX3GDT8jd6NjfEEIb+UGQ iELbePm8yOwnkAmp1NYj3W7EXXSLEO6y7t2pcSC+1N4rDysU67HSYF0r3E/wKJ+4DalTM+lDd NCTTI5+tyCEiTjzLXoV/kXKK1g Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Allow linux-user to strace the clock_gettime64() syscall. This syscall is used a lot on 32-bit guest architectures which use newer glibc versions. Signed-off-by: Helge Deller --- linux-user/strace.c | 53 ++++++++++++++++++++++++++++++++++++++++++ linux-user/strace.list | 4 ++++ 2 files changed, 57 insertions(+) -- 2.37.2 diff --git a/linux-user/strace.c b/linux-user/strace.c index a4eeef7ae1..816e679995 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -82,6 +82,7 @@ UNUSED static void print_buf(abi_long addr, abi_long len, int last); UNUSED static void print_raw_param(const char *, abi_long, int); UNUSED static void print_timeval(abi_ulong, int); UNUSED static void print_timespec(abi_ulong, int); +UNUSED static void print_timespec64(abi_ulong, int); UNUSED static void print_timezone(abi_ulong, int); UNUSED static void print_itimerval(abi_ulong, int); UNUSED static void print_number(abi_long, int); @@ -795,6 +796,24 @@ print_syscall_ret_clock_gettime(CPUArchState *cpu_env, const struct syscallname #define print_syscall_ret_clock_getres print_syscall_ret_clock_gettime #endif +#if defined(TARGET_NR_clock_gettime64) +static void +print_syscall_ret_clock_gettime64(CPUArchState *cpu_env, const struct syscallname *name, + abi_long ret, abi_long arg0, abi_long arg1, + abi_long arg2, abi_long arg3, abi_long arg4, + abi_long arg5) +{ + if (!print_syscall_err(ret)) { + qemu_log(TARGET_ABI_FMT_ld, ret); + qemu_log(" ("); + print_timespec64(arg1, 1); + qemu_log(")"); + } + + qemu_log("\n"); +} +#endif + #ifdef TARGET_NR_gettimeofday static void print_syscall_ret_gettimeofday(CPUArchState *cpu_env, const struct syscallname *name, @@ -1652,6 +1671,27 @@ print_timespec(abi_ulong ts_addr, int last) } } +static void +print_timespec64(abi_ulong ts_addr, int last) +{ + if (ts_addr) { + struct target__kernel_timespec *ts; + + ts = lock_user(VERIFY_READ, ts_addr, sizeof(*ts), 1); + if (!ts) { + print_pointer(ts_addr, last); + return; + } + qemu_log("{tv_sec = %lld" + ",tv_nsec = %lld}%s", + (long long)tswap64(ts->tv_sec), (long long)tswap64(ts->tv_nsec), + get_comma(last)); + unlock_user(ts, ts_addr, 0); + } else { + qemu_log("NULL%s", get_comma(last)); + } +} + static void print_timezone(abi_ulong tz_addr, int last) { @@ -2267,6 +2307,19 @@ print_clock_gettime(CPUArchState *cpu_env, const struct syscallname *name, #define print_clock_getres print_clock_gettime #endif +#if defined(TARGET_NR_clock_gettime64) +static void +print_clock_gettime64(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_enums(clockids, arg0, 0); + print_pointer(arg1, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_clock_settime static void print_clock_settime(CPUArchState *cpu_env, const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 72e17b1acf..a78cdf3cdf 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1676,3 +1676,7 @@ #ifdef TARGET_NR_copy_file_range { TARGET_NR_copy_file_range, "copy_file_range", "%s(%d,%p,%d,%p,"TARGET_ABI_FMT_lu",%u)", NULL, NULL }, #endif +#ifdef TARGET_NR_clock_gettime64 +{ TARGET_NR_clock_gettime64, "clock_gettime64" , NULL, print_clock_gettime64, + print_syscall_ret_clock_gettime64 }, +#endif From patchwork Sun Sep 11 18:18:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973014 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9AA2FC54EE9 for ; Sun, 11 Sep 2022 18:28:58 +0000 (UTC) Received: from localhost ([::1]:51854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRhR-0000Ak-FB for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:28:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXX-0002S4-Dv for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:45461) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002lJ-8k for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=Ny5Bq2KxQ3ykP1Enntmr9piHIvdc1WrGIrxLctjRt1I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JRTfWvlSEjOYzxbovzf/wNIMeHC5H+HUgtB4bcnfx03JejABdJIzbmlylQ3oGry/k 0/QgZfFWa7VaCxLqTBOc2nAPIoh/TYau+n3D+dRiRHS0HO8WqmUUBdSQex/KY670vE jLJAXnXlDkuF/N9ZZ4sOOsZoJVMdYur9ED1Y5qfI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmlXA-1pDt5b3RQ6-00joeR; Sun, 11 Sep 2022 20:18:33 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 03/12] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls Date: Sun, 11 Sep 2022 20:18:21 +0200 Message-Id: <20220911181830.15851-4-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:AkDZjWbGJmYZSPGreK1pQsA1e/gS09TMYKnvmhAXSNnES7kmv4z lsbhaE39gnW/y+mI+SluQi1PJ5JppMHci/q389VU5Eyn/Cwn0GsZEFovCkfUFH6SNlTxOjJ k1KNm2+ba75kUZW5XFHVZBPZuzn1ac+rWBj6YuVYW2jHIYk5tXvjTdPhfG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1IysA72MowOlnykB6G/Cj0JpjoyeJIf46z8jXpXQXI3d29SvX+JSTdacjQ9 yOhr60PqEnn+6VHfna4re32uDVsKiCojCRB9Tc8A6mmWk8hHZ3wbeqiLs9/RUOtL4U9Et9326 uibezof70IJhwiKf5Wjah6yV8ryJxaB2XMwSfhSP6iCHYpUEEF4c6kJalrdAM78OnfQc8Dm1F ZLqODtI/le851d2qiCgEwDctW/ Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" I noticed those were missing when running the glib2.0 testsuite. Add the syscalls including the strace output. Signed-off-by: Helge Deller --- linux-user/strace.c | 28 ++++++++++++++++++++++++++++ linux-user/strace.list | 9 +++++++++ linux-user/syscall.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) -- 2.37.2 diff --git a/linux-user/strace.c b/linux-user/strace.c index 816e679995..5ac64df02b 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3317,6 +3317,34 @@ print_openat(CPUArchState *cpu_env, const struct syscallname *name, } #endif +#ifdef TARGET_NR_pidfd_send_signal +static void +print_pidfd_send_signal(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + void *p; + target_siginfo_t uinfo; + + print_syscall_prologue(name); + print_raw_param("%d", arg0, 0); + print_signal(arg1, 0); + + p = lock_user(VERIFY_READ, arg2, sizeof(target_siginfo_t), 1); + if (p) { + get_target_siginfo(&uinfo, p); + print_siginfo(&uinfo); + + unlock_user(p, arg2, 0); + } else { + print_pointer(arg2, 1); + } + + print_raw_param("%u", arg3, 0); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_mq_unlink static void print_mq_unlink(CPUArchState *cpu_env, const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index a78cdf3cdf..4d8b7f6a5e 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -1664,6 +1664,15 @@ #ifdef TARGET_NR_pipe2 { TARGET_NR_pipe2, "pipe2", NULL, NULL, NULL }, #endif +#ifdef TARGET_NR_pidfd_open +{ TARGET_NR_pidfd_open, "pidfd_open", "%s(%d,%u)", NULL, NULL }, +#endif +#ifdef TARGET_NR_pidfd_send_signal +{ TARGET_NR_pidfd_send_signal, "pidfd_send_signal", NULL, print_pidfd_send_signal, NULL }, +#endif +#ifdef TARGET_NR_pidfd_getfd +{ TARGET_NR_pidfd_getfd, "pidfd_getfd", "%s(%d,%d,%u)", NULL, NULL }, +#endif #ifdef TARGET_NR_atomic_cmpxchg_32 { TARGET_NR_atomic_cmpxchg_32, "atomic_cmpxchg_32", NULL, NULL, NULL }, #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f409121202..df018f0e32 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -346,6 +346,16 @@ _syscall6(int,sys_futex,int *,uaddr,int,op,int,val, _syscall6(int,sys_futex_time64,int *,uaddr,int,op,int,val, const struct timespec *,timeout,int *,uaddr2,int,val3) #endif +#if defined(__NR_pidfd_open) +_syscall2(int, pidfd_open, pid_t, pid, unsigned int, flags); +#endif +#if defined(__NR_pidfd_send_signal) +_syscall4(int, pidfd_send_signal, int, pidfd, int, sig, siginfo_t *, info, + unsigned int, flags); +#endif +#if defined(__NR_pidfd_getfd) +_syscall3(int, pidfd_getfd, int, pidfd, int, targetfd, unsigned int, flags); +#endif #define __NR_sys_sched_getaffinity __NR_sched_getaffinity _syscall3(int, sys_sched_getaffinity, pid_t, pid, unsigned int, len, unsigned long *, user_mask_ptr); @@ -8683,6 +8693,30 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, ret = do_open_by_handle_at(arg1, arg2, arg3); fd_trans_unregister(ret); return ret; +#endif +#if defined(TARGET_NR_pidfd_open) + case TARGET_NR_pidfd_open: + return get_errno(pidfd_open(arg1, arg2)); +#endif +#if defined(TARGET_NR_pidfd_send_signal) + case TARGET_NR_pidfd_send_signal: + { + siginfo_t uinfo; + + p = lock_user(VERIFY_READ, arg3, sizeof(target_siginfo_t), 1); + if (!p) { + return -TARGET_EFAULT; + } + target_to_host_siginfo(&uinfo, p); + unlock_user(p, arg3, 0); + ret = get_errno(pidfd_send_signal(arg1, target_to_host_signal(arg2), + &uinfo, arg4)); + } + return ret; +#endif +#if defined(TARGET_NR_pidfd_getfd) + case TARGET_NR_pidfd_getfd: + return get_errno(pidfd_getfd(arg1, arg2, arg3)); #endif case TARGET_NR_close: fd_trans_unregister(arg1); From patchwork Sun Sep 11 18:18:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C053BC6FA83 for ; Sun, 11 Sep 2022 18:37:00 +0000 (UTC) Received: from localhost ([::1]:45730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRpD-000676-HQ for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:36:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXW-0002S2-Pd for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.18]:47233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXR-0002lL-E5 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=+t9TnZiLd8rHKtd7DNCL/ZYGAwF3CfcJ9/nMiBzejt8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Kg1LqgJqzVV6pUGar50xfP9RfDGP6bQGaKCkZQU6OfZ4vdGc70n6qiJlgVxfZbG75 NAPiNuvkU/2dtiLxbwpErtXbALt3F7BDZwchWgAFqW9UEyOj9INNT6rOhiMAtmOmqA to6UxS3bFzMQvfMRG//cQCnrL4kwiAM8WgafyhgY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6bk4-1pOysp46T0-0183db; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 04/12] linux-user: Log failing executable in EXCP_DUMP() Date: Sun, 11 Sep 2022 20:18:22 +0200 Message-Id: <20220911181830.15851-5-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ks0nRtvOEX/b7KP8pT3ZHSCgo1yb1iT/DaOHpbT30iez4cVp7OV h5DG8jqWCbsmMFahl7cZD0Zfx7vx4bLeWcuP6bvZuEjFEDOMwGmGakhbUaEQ//iJM58yXmQ r/JvEetC6NGy0AKs7iJuc5DS4dWJ1b3YZZCQWObBQL+18GBseduxRXqSp6chi0q0YKX/7Sl dcXyuJRQ503gKeYE03bLg== X-UI-Out-Filterresults: notjunk:1;V03:K0:4ik7UIc406o=:4c9Bh8vMnTTZB8BtJ+mON8 KjXozjQWh/WFPq57NIMs62gjF+qORKUtTnoUVVN5uKq6VLY5yW8Pcdh4aI5cMcqPEAMEvyE4n wQv7qsq/Zn1JevcezVX8vRND1I5D9VZDqUX718KOWTRQvYuYPCu90GK06a8bB3+c4P/2yBJr5 Rpk6YoG2nJ2E01jALdnAjLrJ8hAaeo2wEDA8OAvqlMT+MqEU7Mh66ePOXzMYbkhvOcusOjAGc 4dwU+JCnw0AEcZ/05803YfuirUdSL4fWwVkWai70P3weEeKCKEmc/L+f3n0ttbpWnURqnqRhp J9XZJ/mBIJajkL1HZCzZeb3liVW12byLtni11VIvhI45Q7DWAIm1O7Hrz9zBHcsuO9oCKBH/w +wIk0FvCsPVxukHX7g/Y/2q2BX+GBbpAzg0iPFvUNOYWuPTbyrFYZ6UgFEKIdAVArW6ntw/pU hioKgha0SebwK1ewqGa+cabae42ElG66QcjW7ZgfJ6ensZE0MtzDiH7tH4M8S4XL36WkS0IWg 4KslQEZ/D/mytVko0j/SaEp6RWwApr8JjI3y2r/2YSZpwA7edZ2fxha4V4EwX54I9+6Mc4KHa n7ac8CunAVAQt+U+ArdsafptSIZasZ62tB6/MCAzVdc9JtNrxPNeRTXBT8cemtAYvXvSM2jOI BoDEIBYXxqx5fBUuko1alUMtgOr9srDMvC/lfYZGunpNSvG8DooZaSqS91dkvRwSFTW/BXwCQ fXywZtXp05dXM9FX4wG2dD+NAoffd86QEsSaHpOOtc/+MmbNdPZwnfhitOqHqWNX3UYTSr9zH 95AYLSSrP58XOcMufuDtR7ls7FkyQ8JKZMzh6BYuk/jaBQ4lyA0NqDVkequQaVuVJkfJk7Mlz ObxlkzPfbUhJG+4bb5Cr02yyR3xoPtSQb5wnRdaD3agK9S7mBZExoZqFqnwQ0oE4CpFEOFxwJ QChoTnD7AcWJ6RZeSFI4xrth/SNX9KANFxGES0kQdln0ePvXFUvQzMiF62YHFjB2MqJpwVx7i 9vf4iJGkpl4eVsUZrAhHeLy7fIqUZGxQAWtdXIG1uVbzEfVEws2y7Df9zucsDpj7pJbpAai89 FTdRdkGFf3Rhr2aPjgJKXDLcg/VkcUdzEbpqzVn9OBKbqM64uFxJOHCo0p0QdgIkXUHvADjWu XmXxSUBsm4bqdcAMHV3MbENqgF Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Enhance the EXCP_DUMP() macro to print out the failing program too. During debugging it's sometimes hard to track down the actual failing program if you are e.g. building a whole debian package. Signed-off-by: Helge Deller --- linux-user/cpu_loop-common.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.37.2 diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h index dc0042e4de..36ff5b14f2 100644 --- a/linux-user/cpu_loop-common.h +++ b/linux-user/cpu_loop-common.h @@ -27,9 +27,11 @@ do { \ CPUState *cs = env_cpu(env); \ fprintf(stderr, fmt , ## __VA_ARGS__); \ + fprintf(stderr, "Failing executable: %s\n", exec_path); \ cpu_dump_state(cs, stderr, 0); \ if (qemu_log_separate()) { \ qemu_log(fmt, ## __VA_ARGS__); \ + qemu_log("Failing executable: %s\n", exec_path); \ log_cpu_state(cs, 0); \ } \ } while (0) From patchwork Sun Sep 11 18:18:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53270ECAAD3 for ; Sun, 11 Sep 2022 18:20:31 +0000 (UTC) Received: from localhost ([::1]:43212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRZG-0005CZ-0P for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:20:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002RP-RL for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 Received: from mout.gmx.net ([212.227.15.19]:34375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXR-0002lM-Kq for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=gOzGCQ60hMjauReMswDRPOey73euwoUtnmC0Mkn8oTk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=EXGOT3XelEsieeqBQOrgsoJ9Ypkz19i8ywQNOCM2Gtc4QdBGZs8kGKTaswQYX9qv2 9zgTZazea5Tf5fe9G/U9BO9zcTKej9yYjLyUJMzaZoc8b5C/zWwQi/tmga3cbl45qT Qc+JAWA3vgBCgKhtr/ZpOcmomiVavawEbidwupUA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MlNpH-1pCWZj0V4v-00ljOK; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 05/12] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info Date: Sun, 11 Sep 2022 20:18:23 +0200 Message-Id: <20220911181830.15851-6-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:mnifReIl8FMW9AgPGN1s4xEUXI/l+1UvzIF5bIRvY0okmHrPF2r 66lU4ONOixqtKBJzaJ7DmgWXPOwiR/1suTCDqQY+7VzQ3uH9pLfRJGfU2vFLVE3bAISSG3z 0grXg+fDXtQWrejYBRw3J6s3vDLRlJgMKFibrVMMJlhDrg7Hfd5JR6ah3yrVUPCiona8dih F+lyQZi7mtzLMkqcVOllg== X-UI-Out-Filterresults: notjunk:1;V03:K0:1UizG2KzTQA=:Pqd0bfgAFjP9Y0bNDUlays Qz/SB7xKW+Npzion1ufWb8eYdPTjG9PXztcbIwzX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Wp9M6ZjVtsB/3Y9cCD+77TfoTLyOyCkL/eTFdBw5vrDtRsMT1Pd2LG7K 4cPRa4EhAYOg8ermbWDpisyONf Received-SPF: pass client-ip=212.227.15.19; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Enhance the hppa linux-user cpu_loop() to show more debugging info on hard errors. Signed-off-by: Helge Deller --- linux-user/hppa/cpu_loop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.37.2 diff --git a/linux-user/hppa/cpu_loop.c b/linux-user/hppa/cpu_loop.c index 64263c3dc4..1ef3b46191 100644 --- a/linux-user/hppa/cpu_loop.c +++ b/linux-user/hppa/cpu_loop.c @@ -147,12 +147,15 @@ void cpu_loop(CPUHPPAState *env) force_sig_fault(TARGET_SIGSEGV, TARGET_SEGV_MAPERR, env->iaoq_f); break; case EXCP_ILL: + EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr); force_sig_fault(TARGET_SIGILL, TARGET_ILL_ILLOPN, env->iaoq_f); break; case EXCP_PRIV_OPR: + EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr); force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVOPC, env->iaoq_f); break; case EXCP_PRIV_REG: + EXCP_DUMP(env, "qemu: got CPU exception 0x%x - aborting\n", trapnr); force_sig_fault(TARGET_SIGILL, TARGET_ILL_PRVREG, env->iaoq_f); break; case EXCP_OVERFLOW: @@ -171,7 +174,8 @@ void cpu_loop(CPUHPPAState *env) /* just indicate that signals should be handled asap */ break; default: - g_assert_not_reached(); + EXCP_DUMP(env, "qemu: unhandled CPU exception 0x%x - aborting\n", trapnr); + abort(); } process_pending_signals(env); } From patchwork Sun Sep 11 18:18:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34E7CECAAD3 for ; Sun, 11 Sep 2022 18:24:43 +0000 (UTC) Received: from localhost ([::1]:53708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRdK-0002mE-6x for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:24:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002RQ-R3 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 Received: from mout.gmx.net ([212.227.15.19]:57811) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXR-0002lN-OV for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=mY+wLW2vmfGlhMsU/mvzcZXQorGEa3wiKqNw2eh+Pek=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=J4h7bQika8mASeGlPZ6mXCaQzTvqfMBsoFvE0Qw9U1bQO/u0JNtpP15ty8LNI1BMy DOceVfkNKwllaS3vwrbdCYKvsdViS87WM5FvAb8pvG686BMKoUXXPFYP3HfW4vk5/H jPXQfikkrTTGKnfmCjBmYbVkUS3lSHgZAivfaDR8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFKGZ-1oZuUt129B-00Ffts; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 06/12] linux-user/hppa: Dump IIR on register dump Date: Sun, 11 Sep 2022 20:18:24 +0200 Message-Id: <20220911181830.15851-7-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:JKLGHdANE9gt3JYOI3lV/J84wSserbqzfQBPsfghP6vPpzgyavC IzYWo5349MNDeMP69Qricc7jCo7AhTAxoxgUANXBB1uCwKf+6hxap03l61JBXKaHg2U/eIB rYIactzcA5K7a5QiMlYYei7ZXKK+27LNRpKV3AWIdMTetcWOj9utSzzu4AVtH2yo4LvuSI4 ltX9uRvDMk2tKaHWpjqZA== X-UI-Out-Filterresults: notjunk:1;V03:K0:B/UiCn3xcEA=:G89b47vCUG4UoD42/XqLfK GRT9c3V2Lu8N339QJVYkN+5mSsGnAeQaRMg+7LAntgOOdult/e800G9Lc+q4p5Setow8Wd4TX fqy3IS5qvRLjZ6rtGPvlD+LGcuCQ77xijnlw1W873/JQj06i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=212.227.15.19; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Include the IIR register (which holds the opcode of the failing instruction) when dumping the hppa registers. Signed-off-by: Helge Deller --- target/hppa/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.37.2 diff --git a/target/hppa/helper.c b/target/hppa/helper.c index e2758d8df3..74b8747083 100644 --- a/target/hppa/helper.c +++ b/target/hppa/helper.c @@ -85,9 +85,11 @@ void hppa_cpu_dump_state(CPUState *cs, FILE *f, int flags) char psw_c[20]; int i; - qemu_fprintf(f, "IA_F " TARGET_FMT_lx " IA_B " TARGET_FMT_lx "\n", + qemu_fprintf(f, "IA_F " TARGET_FMT_lx " IA_B " TARGET_FMT_lx + " IIR " TREG_FMT_lx "\n", hppa_form_gva_psw(psw, env->iasq_f, env->iaoq_f), - hppa_form_gva_psw(psw, env->iasq_b, env->iaoq_b)); + hppa_form_gva_psw(psw, env->iasq_b, env->iaoq_b), + env->cr[CR_IIR]); psw_c[0] = (psw & PSW_W ? 'W' : '-'); psw_c[1] = (psw & PSW_E ? 'E' : '-'); From patchwork Sun Sep 11 18:18:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973015 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE9B9C6FA83 for ; Sun, 11 Sep 2022 18:28:58 +0000 (UTC) Received: from localhost ([::1]:51852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRhR-00009Z-S9 for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:28:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXV-0002RR-S6 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 Received: from mout.gmx.net ([212.227.15.15]:46775) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXR-0002lR-Od for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=hdJ42ybplqITg2E5Kl2mdXF9WOlHmOsWF08yplJbwKI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=aZGw5lB5DesF2a7+R53Z/jNbzuls9MUqa3RuQhDi3q4fO6K9DYVjvV+fH2TDPPO2Q xuiDx1y0HYwmRIjgFM3slqqOg0STz9pZ2eRQF9EqOwfpFxE8Q0ui+MSjQSoYP4jJjF R60jG+XVoCfV7KKkNn5ZQi+vi/0webTzGaWvlmpY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MWRRZ-1or1dp1czb-00XtXa; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 07/12] linux-user: Fix strace of chmod() if mode == 0 Date: Sun, 11 Sep 2022 20:18:25 +0200 Message-Id: <20220911181830.15851-8-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:8772qsfz1VsEAPA1zJQdG0XHErySVdSGGoVQvf+E0NjSCSIQ6+D T6JVp8nv3rPaUd5GQPr0VWO3XoLwjpq/ejyTzPksOP/vm5rR64LVlRXJHWMObFfQJxR5t+m 0ATWQfCwWRDBJ2iqhui88S5HZObaGRqYQAer7Lxtq4poNnAw5i4NqfCPpqG1XeOVHXYgrKu lIGXQMpJsMll1zy0MYqxg== X-UI-Out-Filterresults: notjunk:1;V03:K0:aLRe+wcNTx4=:tLborNuD6axDrL8tj4iV/2 ypcEGGIsrPMlMrTTRdcaDT+jXkEzqj4ANsDKifPum6U8FxdI/B2OAbwcpVHoOl7+XQ7daGmM4 4njdz4Rc9oeRR2P2ht+TzG+vMQAFgaEF/NFxtYTAqL+Rh8Ix8T9M8z/8QX2s3CKjB3SHjQR0m tRjEI85hvkF8C8TQEVXqSZw4XTMB8bTN1eBSh9qEnNNTDHPcx7Nly8of9Kn29NxXbxvG8UrIv c48QLUJfS65W5OnpzQANZ3QzR/daHaOQkoAPOc35EMM36uPvvb8wTmWhai/sQI/87TsFb3Oqt UqZ+wMHwKo5J4KiVsRlLARDBmBG+s82CAWJ3ec/px72zP66nP+TcJaeNkihn1mbrZlCv0vBe/ xILo1j+acY79LBDCk6Jez6h6ZTZ41vNmE2jxPjVmGLLfcs0kdGIhqKRtx3lFkK4fwZ7G0ziTf atJdyOic5Q5d8EVY+l1vxY5L1CDW7FVcwZZ7sqsT4IU+odvQVLwprd7zbLR+wOyJoyr2gIenn uz5YoIC7eHIsxKGYA0OXj9orvSwy9ShcSV57YR4+o1qdTkHBKsiTcyJqsvbwP5VgPonr5lVRj VDhONDqHYyGUK2b2CkV77nDU49sEEqc3hkmYsGR8J96dY/TDVvDDM72x3nxMLhYnBxsnRYnS+ /ci6yKuLEnuWYvYy9TyNi47/w04M0fbxvdmQPWnXm/tciL4d6p9h4SaK3DHstO52WiVdR8QAq u7vGKhQsWOdLfvwEmwEIYbMcHouGoVwjloFyark9VovZgDGBqMO22ZYeHV71EAGrGZjdhiNHD sS/SIGxsY5S3b2imNN+T2gIFDH2z2fgyh2gFAo60cTHTsuCdamt1hgG6G9ZQojWMygkroKKWk QJWe05vSyGXSLFoAC1F9edcoLqoDHMR3M9+7gjh3b7mpFopPPybFZ+HsfpXP0QPsMGjo+MCkb BvONXfy/EveOOcsVLTKsiu9wHNFO6r+fdAitD+2V15wKezSgqMd9soA+1dugAVMckEtvX4099 7k47rEWKBsa65tGu0Bm1g/zxB1doIHMyJlKutueeA5MiPzvgJlBNmmOfgfEwz6C6uPu9wkK3p sL9MRhRpZX3kEZjwo3Xgek6ylc2VzuB0OZyVkYELNn6IhcqE7OsXYEVrvPlCEQufrD9/Yr2c4 wHPs4Z9vUoruSzOMkLFp1YE7ka Received-SPF: pass client-ip=212.227.15.15; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" If the mode parameter of chmod() is zero, this value isn't shown when stracing a program: chmod("filename",) This patch fixes it up to show the zero-value as well: chmod("filename",000) Signed-off-by: Helge Deller --- linux-user/strace.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.37.2 diff --git a/linux-user/strace.c b/linux-user/strace.c index 5ac64df02b..2f539845bb 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1505,6 +1505,11 @@ print_file_mode(abi_long mode, int last) const char *sep = ""; const struct flags *m; + if (mode == 0) { + qemu_log("000%s", get_comma(last)); + return; + } + for (m = &mode_flags[0]; m->f_string != NULL; m++) { if ((m->f_value & mode) == m->f_value) { qemu_log("%s%s", m->f_string, sep); From patchwork Sun Sep 11 18:18:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A77BC6FA83 for ; Sun, 11 Sep 2022 18:24:43 +0000 (UTC) Received: from localhost ([::1]:53704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRdK-0002kN-EP for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:24:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33170) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXW-0002Rz-9a for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.15]:51709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002lX-7t for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=9HKRSmBH0uIQursAz/Lfos/ipwIs650RLsxkMdvi+zc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jc1R6nJlvTAbRidnhGtb2sYvLRd7SJOU42RjhGqXjzdqjtJEto2o7aVt1Y4p8oyu1 WC1p0zQ4yTRpNk6WpPxvejaPe6JNpoKc2X9cA5JczbLyCbK1hddoZF2Tzq1yB6Abs6 nuRujNYkn8H47Y351+/5e/9fUSLwU6f2Xb0uAB/c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MjS9I-1pCngm2DEY-00ku2x; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 08/12] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch Date: Sun, 11 Sep 2022 20:18:26 +0200 Message-Id: <20220911181830.15851-9-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:H2dp5pajeCCYJA/AFKO5UL6waakRPRAWdN3MNlSSXdbbTOATrHt ct/x7ENH9g6+mKHl3hMPuWZ4KIU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2uhbx041fdpFuxUxwuxTFFlouCe+z0uKhtvdkRwqClolYOvCpc0uInLSrav7zAop Cj8U4s3VRdHwlz7886PNHhQ7KTotYv+OVPsFXPrO+Pgx5dijy5UaP+7+NgviAnNioLrtVmaHW vwXXtQX0RyrRH1/0n6tNI58vkV1REmGQuGAG/VMp6VYrCTyX2Hwws/DJjPuwajWRtiwYZTBeO Ttof3sN6gSYFI3yGI1Wv9e5VkcGVWGrHAlsDW6Zjn5V0yLepQYsujWnrponDkhZI+fsNi4aoh WpC7L1qJDpMrSVziUn49NCs4Hf Received-SPF: pass client-ip=212.227.15.15; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On the parisc architecture the stack grows upwards. Move the TASK_UNMAPPED_BASE to high memory area as it's done by the kernel on physical machines. Signed-off-by: Helge Deller --- linux-user/mmap.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.37.2 diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 048c4135af..dba6823668 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -251,8 +251,12 @@ static int mmap_frag(abi_ulong real_start, # define TASK_UNMAPPED_BASE (1ul << 38) #endif #else +#ifdef TARGET_HPPA +# define TASK_UNMAPPED_BASE 0xfa000000 +#else # define TASK_UNMAPPED_BASE 0x40000000 #endif +#endif abi_ulong mmap_next_start = TASK_UNMAPPED_BASE; unsigned long last_brk; From patchwork Sun Sep 11 18:18:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D01C6ECAAD3 for ; Sun, 11 Sep 2022 18:21:44 +0000 (UTC) Received: from localhost ([::1]:44190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRaR-0007Oi-Nq for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:21:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXX-0002S3-6R for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.15]:38787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXU-0002ld-82 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920314; bh=a+VzLr3Jr6Stg5DkRL6y+jodPcSdR3H4tkNT2D1+lps=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=b/Ly4DRHpQrqJsmaFeIIjlxmMUnQs3qUta0x/ZpxdFz/FUSrpGk7poHL3sO6VFuk1 k59v/xBQ2yV46BtAMvtF4pZePcyz6peQfLE9BOwKCkhjgf6pg56qLPd7d2XKzM1yXy r7kki14ju/HDcZNZjNPdBob9f35FZ0ULrQt50hOY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McY8d-1p3l9L2xmH-00cxwu; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 09/12] linux-user: Add strace for clock_nanosleep() Date: Sun, 11 Sep 2022 20:18:27 +0200 Message-Id: <20220911181830.15851-10-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:lff3e/Y929NxN/7Z6B6B/XT78SfpRqrRcBbMphcg4ZcEyfGIgTF WCbN3tgVwbZ4JMGCod83RjZ6BWfFReLH+kMSBh4/KX4Ug5YFjl0ZwcN1BiCqOHsicqbln6+ FsEc6UAgsPUk1r1wowdAy8FCsOutQ1+YHZzyKBDjqDbG5hqXKOIaf5+Ki4g8el2Gi1h2CN0 Gc6cAeYD1X+lWYVfxc+Ag== X-UI-Out-Filterresults: notjunk:1;V03:K0:lnMJ7uGgnVc=:c39rW3mynBI6g0WP4TdvaL mTnjp1D1dXnIYfLId3JFmX/qKIQEUHFxFC/rqtedSIHLFkuC2j1RnCGrmFaflT6LsWqI+jlUE WA8CaLYkxDQVhiy/NWuD+kYJyoQRnmy9mqO6ia+Xka2mRjYSrAXgD90NXAYrO7B/Esj8llPdB /VfPzZGMnW13uhzuKxBaN/3OyKF+y/wK9ap9KJ7eHV6Qr0BZRdxMtdYs341BlAnmyGnJidLiu epvpd1Dyup2V5FFh44t4XARNTM9yPo03UKymrhxdVwyeP/J8HekVlCfKIMf5wJUz8d345Zsrw zGEqKBNpVABjZlEAHwePbXF5ueeoZ4pvNieEQbZas7QLDhYzCK9UafL87QqFid5uWWJw21cgA zaheob9Oez2I0snsD/v3zxFmUKdet8NvuBpZm56bR4bmasTi2W1w28pgbT5k8MJblbTuNUByb nnGuGJ6QDVc7khnFcCDuDoy6WX8o/wGq8pmsk1d11fkNzGbY/byG6Df2SaccsHezfD1R5JHZC qnOrkimwSN6sYrfnnD7XCIUPBI0C+w8ah74rBv5LiPkMkSJwFZBAm131eRBn7aQ474eWhv2UG OZSy3BEiRcwrnqYmOkVU4z3ZR55Uo49zVgdDTfXYxVU7xDBqpxiJlW+SBQRMHc6kXsDp1jRnZ G+Z8pU6Pd0v8rc8/9Hsvii6Fe2+TcdFKE8OofGNkvYMox3+qRqkZ7t4oHHJcbNZclqxE/T06/ khzN0/QoCz/7eWYfElqG1PQfFjGNmqvsTDuMg31pRwkezv1Jsv04QCSx3q2rdPDXD6okWFWRF 2yGoW5Go1IUMvAcwRg4hq/YZOP6r+0PFR93Qb2HNLq4cea7KcZSSod1yTD6kKOFVWIy1RUoLH z8tCEbMrhnJcUgWC4wG9Xhdg8MAVa3Ut3qRgQgr+fbELEUyi8wQmLEcZbapysmW8sK502GEQ2 VLYyiAMf6THtBPWucFYC8IkNWYjPZmg3Nz8UfrdOXIFIncocv8e8EpWhO9/nC2bf+kC6skeW6 wmA71NNxCYLP3unexHdIMW9IUn3BcqCm2j0r9RQprMd+rmVuX3b4wbW0WWGRhyEcAkFIGKZq9 pwFX3nAXTuACeSFb1qt8AsvAjf4aCmD/OnkEEQEfBb21ZWzL/BbNVahNibppyXu8qNw412G2w 0KsDqR9ZFtHj9C9My27OUZUN58 Received-SPF: pass client-ip=212.227.15.15; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- linux-user/strace.c | 15 +++++++++++++++ linux-user/strace.list | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) -- 2.37.2 diff --git a/linux-user/strace.c b/linux-user/strace.c index 2f539845bb..6f818212d5 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3567,6 +3567,21 @@ print_unshare(CPUArchState *cpu_env, const struct syscallname *name, } #endif +#ifdef TARGET_NR_clock_nanosleep +static void +print_clock_nanosleep(CPUArchState *cpu_env, const struct syscallname *name, + abi_long arg0, abi_long arg1, abi_long arg2, + abi_long arg3, abi_long arg4, abi_long arg5) +{ + print_syscall_prologue(name); + print_enums(clockids, arg0, 0); + print_raw_param("%d", arg1, 0); + print_timespec(arg2, 0); + print_timespec(arg3, 1); + print_syscall_epilogue(name); +} +#endif + #ifdef TARGET_NR_utime static void print_utime(CPUArchState *cpu_env, const struct syscallname *name, diff --git a/linux-user/strace.list b/linux-user/strace.list index 4d8b7f6a5e..215d971b2a 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -91,7 +91,8 @@ print_syscall_ret_clock_gettime }, #endif #ifdef TARGET_NR_clock_nanosleep -{ TARGET_NR_clock_nanosleep, "clock_nanosleep" , NULL, NULL, NULL }, +{ TARGET_NR_clock_nanosleep, "clock_nanosleep" , NULL, print_clock_nanosleep, + NULL }, #endif #ifdef TARGET_NR_clock_settime { TARGET_NR_clock_settime, "clock_settime" , NULL, print_clock_settime, NULL }, From patchwork Sun Sep 11 18:18:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B46A9C54EE9 for ; Sun, 11 Sep 2022 18:24:43 +0000 (UTC) Received: from localhost ([::1]:53706 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRdK-0002ld-NI for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:24:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXW-0002S1-9s for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.19]:39569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXS-0002lf-VL for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920315; bh=11LtDJ/FRxnL1hOwc6wuQJsp9XSl32r0mSiKAp9ljjg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=AQPZqeVL4xmEqY24Gi78JWzYhyQ38D1Pyot4OJTJ9qCmFEpukhcvFkYtZ09EpG2FI wQEvXAZwJl+KRg/I3FwLXprauTkax/mdjUExHNE1CdNW2w8QnT2+NGTJrSOECWGznQ Q/Ty/4DxFjSYE8hYA02MtYvw6V/k2q0UDcMIpZb0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M5fMe-1oQJiy3c6c-007BZf; Sun, 11 Sep 2022 20:18:34 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 10/12] linux-user: Show timespec on strace for futex() Date: Sun, 11 Sep 2022 20:18:28 +0200 Message-Id: <20220911181830.15851-11-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Cj1zdcw6wfMQ5UeEoIW8ov6XhMGBK3qS0pijJ5KhFifYiKWldnW Vkr5Q2as/tQPA85kQ8SXGF9vbUFNIsq2Jx/k4o+MP3XTOCNlLUygzO2lns+LBx6zgVHY8wP cPofdyTQBzmZLw+yeSq6qTHt/fzYmNSWQaMO4fIhoidGYpIMQaJ0Wr5pq8cCEReU/tVn7JD N9FTHFbN1gNmYyNC17KMQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:FyW1ve7ylm8=:GtjX6eQgnOLQzJKP6ffpzm tWq6jSahJvgCpYOubMhqEScVGYPftUOPVVFvnqE120Duydn0Dk+nKlwYHHfY/gRC0miQBGSZ6 S4swklfVOokR7nN7nrmHiH566YK0ppreCHnXsXscMEI8lodlcslI6kDsvgV2ZV/9OBm6ECrQ1 Xbk3VbYCWM+5quRWVA1Dm0aBLxSu/RBAuUvCKWFRVxD2djcJJlzy5RLbJEOQABw9t+PLJjxl/ xVNY0LjHj1xz0Dvytvn5a1OvZy+Nr3P0FMVzXErancU5SCwY0OubsYfmLXf/tDw3VSTzcXCgj W8pXKOrMSjSr/oXUK+L3g2BeSYYfX7xCHCjeLGijr/TBV9jH0eCrZFgnMSWn509mmHXxihlKT 1axKDQkhMKqMTp3txFn70Q/HtA7/fxAWExMCreRZVGlmE6bDY3ZpZc6enK2MQezFsVnwzAAdX 1yIQSWCa2QMphFqVASi0F6hL1e43LczsGWu74mQrtz4x8SwEtNd4nyFEXpcWjoUl8gzlL1lOS 6vKS/Yy7w/YDoKzcO7G4PJbi+gmLwg9ob6p38lN2+/OCNrL3uOURvcs2AUgZexspsKZM+qS++ obOckouBHWfcoBnNUIc/dkzUjl20lwkfuVvNQ0IP1kOTJ001znj6Z2J/WG3Qsq+CpyuA5TPKu Zf3Ew4c0FiPiNfpjcwzmfGdXnwYicjCQAsfM9x7I4vw0LM8twlTBNg9i8LZnOiIWMXBskAagW xx8wt7HllR4wKyGlM947GRknWZkTlX9VJeMRXf/itDlPnNPmUFFlHZ2taty2TiNi5cfsnQRdW PnQN1aAWfabVCBd4TXTuKweYKNRSqNolHYT036q3u8sPE5WEVRMdu4JvPrRPGuPFNqIJnnTP1 xf8AgrpEAV+NQxS3LeGs5SBp3Ttna3a7f3I6uXczAcPvcRTAt3G2ftu1r/7sgA12yYoLd3eG4 L1D3cplH49KtOqoJrSHsKab7gwDqlY8xodvDDArlmIr1aQg8v0/9SUiLYHp6fKcKD9QuRoexR PJFUMta1E7Aly0fsTzM1ie32sRNxV7RkpC5JVImv4UrKJGwCDa+UnUdwN2ZrGn+hY4r8DOaQW OcpKw+uhulNCQmetIUFc5qQmJo/vT5oD5gclGJFjviNBH8Cb6UgLqAYBAJTOX5fqqYv6dfC+O SmkLg= Received-SPF: pass client-ip=212.227.15.19; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- linux-user/strace.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.37.2 diff --git a/linux-user/strace.c b/linux-user/strace.c index 6f818212d5..b6b9abaea4 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -3714,11 +3714,20 @@ print_futex(CPUArchState *cpu_env, const struct syscallname *name, abi_long arg0, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5) { + abi_long op = arg1 & FUTEX_CMD_MASK; print_syscall_prologue(name); print_pointer(arg0, 0); print_futex_op(arg1, 0); print_raw_param(",%d", arg2, 0); - print_pointer(arg3, 0); /* struct timespec */ + switch (op) { + case FUTEX_WAIT: + case FUTEX_WAIT_BITSET: + print_timespec(arg3, 0); + break; + default: + print_pointer(arg3, 0); + break; + } print_pointer(arg4, 0); print_raw_param("%d", arg4, 1); print_syscall_epilogue(name); From patchwork Sun Sep 11 18:18:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4DC57C54EE9 for ; Sun, 11 Sep 2022 18:20:32 +0000 (UTC) Received: from localhost ([::1]:43210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRZH-0005Bp-AM for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:20:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXV-0002RS-ST for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:42 -0400 Received: from mout.gmx.net ([212.227.15.18]:49401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXS-0002ll-42 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920315; bh=Hpg5DACac3hGaxdzOdQRYHv676xvOkEBzGXsw79EJAw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MGlbfR2YvDMR0m+n0BKG3AbrLp4TrffxpLtvGYfjjnmmzt44fzyVDRRAPUwpZdT1j a4EXv3bKv+6id+Ie5UTxr4XGT2rF4U7Wj7T9vPpfS4Xy5JlZqgdJmbqiJ0iOF/wyIt inAR5UCPeS/ANzDfPn4OAxIf595ABQpvtYznIHBM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFKGZ-1oZuUs00wj-00Ffts; Sun, 11 Sep 2022 20:18:35 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 11/12] linux-user: Add close_range() syscall Date: Sun, 11 Sep 2022 20:18:29 +0200 Message-Id: <20220911181830.15851-12-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:7TNSPUfZA1GM5ijRE+KIZ9qzi6iddoF8EeRN40y6gz8kVpMLF/+ xWwedCRZHV9Pk7hSIwKMxpmJU8+BXTco8MW2foReQ7umJs2NdQszlH7Vz+yFa2gu2c/0zGD SjdymfJXZBB9UK8R+ERnqa1v7LG1dqxpooxf1r0BbJdWKvYrc3BHIonWNGbxltKC26uj5Es 7hjROcD0V1D2ogZeMccmw== X-UI-Out-Filterresults: notjunk:1;V03:K0:Lon/2+bO5r0=:m6uyx678ij6Pcy/l3aUcgI ld/DI3SDKykDX+MPd2C+CCIme0X4wUCdcbCjhMbuvyQxL/kWiP+U3Zcp1WAHoVqfiwFfynqfU icOIfK6wDOKOrygejaHrv5VObGiCp9SBdh11uAXrK0dmqHwmnhbCk7qmIJbqMEKnPvYQLDfpz 0clBTvSUg7lGrhNsh4L/03tOsxMyAtToNHVRfpAZLXCmC38Bnn9+BPA/ovQ3h549ivFO+m/X+ IBeqY47gIGCZNyT5W+3akkIt8det5GFvbScV5tytBVeY1/Dos5gFcF30PqnTvZ0p3C9IZYumR FdBN7NuXr/xOarEkzDpnFejL4fZ+37Rysz1uUKBlStfZ8fBku1LwtzgII0mg+W4mWX1kuIwdG vK34QzXaDJOiL9JMDql1giz2RD26djE6TQKWh5RD3yJBMXxuNHYXuLqXCcLXWh6SUH3ke93/f IVfebkPSaWLER/bOkMfBP8S673zx6M2kuRh62hgSmoVhbCsRQLovvGxWHmlUkb/iFfOBDd+6N /Ut4sAnq6Hix0XdmiHJkeKAFxYDYX8bRpJA3eCJemqETDBoIPqlSuCnuUdxOCY5VwwqhW1HOk 533MTR9CilfZzrKtp5JBcLkXrFHaZTAwJRWkgjG4W2HRP+TjDsCI2YOxC7PfuVSwkABWTBywa dWtfDXR9CNjtOCCZIY5/mEzDu8RirqffOyuJYVmhJcB5STsCtFqzm5tGhsV8oZRXte2UyUv98 5tPkbNsk1ZP9MG9L1yf+dDxthORHLfYcMTr24Bk4fnc31HDcy1FfAR9UfvYcxg5wblx+JZK4e KC3sSDINKChUryYziJUKT2xdAbKquglKhFk4Xsnwc62euN7D3xzufBNigLOhLVF9TLoBsFzsC 9VFVIvWE7PSsQtCCAU4pMYy/CzsSXA/1R8Tbnih7oO5avfrEcmoMjWZWq1/zmm92v/4aCJvnI YFGm5rRaJmGdBta1Wt0cnG1UYkgawUSXUSdcrQJkS/CcihRsbwAfNldazd2L7R+U/EcM9j+bj ZIv1y33ablmDYVG+7MUGKswbXGTXNTJ39+qGT2e8PL4uW9Rg1lJWaRFhyXHtZBhw/8Mz/D4Wm KhMAy7kRq9b3GfhOay2GjW/+iX7KWDutlfvyY2qIVrBRleKzjZ9OKckYvYIRytdmMNd38qR7d gTfDOWOjHZDwgMOjiaBoSap7A9 Received-SPF: pass client-ip=212.227.15.18; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- linux-user/strace.list | 3 +++ linux-user/syscall.c | 12 ++++++++++++ 2 files changed, 15 insertions(+) -- 2.37.2 diff --git a/linux-user/strace.list b/linux-user/strace.list index 215d971b2a..ad9ef94689 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -103,6 +103,9 @@ #ifdef TARGET_NR_close { TARGET_NR_close, "close" , "%s(%d)", NULL, NULL }, #endif +#ifdef TARGET_NR_close_range +{ TARGET_NR_close_range, "close_range" , "%s(%d,%d,%d)", NULL, NULL }, +#endif #ifdef TARGET_NR_connect { TARGET_NR_connect, "connect" , "%s(%d,%#x,%d)", NULL, NULL }, #endif diff --git a/linux-user/syscall.c b/linux-user/syscall.c index df018f0e32..e63025a5e3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8721,6 +8721,18 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, case TARGET_NR_close: fd_trans_unregister(arg1); return get_errno(close(arg1)); +#ifdef TARGET_NR_close_range + case TARGET_NR_close_range: + { + abi_long fd; + abi_long maxfd = (arg2 == (abi_long)-1) ? target_fd_max : arg2; + + for (fd = arg1; fd <= maxfd; fd++) { + fd_trans_unregister(fd); + } + } + return get_errno(close_range(arg1, arg2, arg3)); +#endif case TARGET_NR_brk: return do_brk(arg1); From patchwork Sun Sep 11 18:18:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12973013 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34B29ECAAD3 for ; Sun, 11 Sep 2022 18:28:56 +0000 (UTC) Received: from localhost ([::1]:51850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXRhP-000088-9a for qemu-devel@archiver.kernel.org; Sun, 11 Sep 2022 14:28:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXW-0002Rx-94 for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:43 -0400 Received: from mout.gmx.net ([212.227.15.15]:47099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXRXS-0002lp-DL for qemu-devel@nongnu.org; Sun, 11 Sep 2022 14:18:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1662920315; bh=xI95ZtW2YAxB1bA4cBpkjh3a9HRqZTZ0Mu1f3lPFvkc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=PCqcJkgO8feKm/2wv63/DYfJEWxicJ/nG9xv0SR/XQDK7Cyy38RPU4KGA3HdKjYhl nDR4LlVtPcCRRTYmBfKfIm2Xbc/To6kd8FC4UBCbU52gzT7SGwVTQrs7endvxW/r9x CSLLj+NYd4FzRZrpfm9b1VQj1VnsgZUJI/xq5u/U= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.178.88]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKyI-1ovgTj0Ziq-00SgTN; Sun, 11 Sep 2022 20:18:35 +0200 From: Helge Deller To: qemu-devel@nongnu.org, Laurent Vivier Cc: deller@gmx.de, Richard Henderson Subject: [PATCH v2 12/12] linux-user: Add parameters of getrandom() syscall for strace Date: Sun, 11 Sep 2022 20:18:30 +0200 Message-Id: <20220911181830.15851-13-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220911181830.15851-1-deller@gmx.de> References: <20220911181830.15851-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:v6XiL6IY3YlyZnnm7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+RCg68ZUs8HSy0bJ2OX1X/fDcOmLfJaJ0BGxAzsJnu8KlvZy7l05PQdczOH s93yUjqVAvbVw9QpkUOOIXhBMg2GhNSdG2IJ4nWAvAPDwWAjnUt9en8D2MjzCaQGI3b+o9RJp 5+lZqucIhd3SwA36RELxRNmOj6Ayh5AEsO6qJFW/rl4kvVkT26C+3wndI2GyHRhVPjqIOaUeG JnopQ6h8Z5gIB+svvadpmzH2KTrM2DYvaWAVKn9coJXg7m3jmL7UO63pVBoVya63u6YrDruGX ZRVrHlkV3+OdELZ8lIk5dDdw9L9EpEKT4nZRM+DlObSf1ciV6qVme5o2T6ZHjVZgBCTgH/oGW s6bRnfha8CTHUhGQo6xmu+h7Ef Received-SPF: pass client-ip=212.227.15.15; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Helge Deller --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.37.2 diff --git a/linux-user/strace.list b/linux-user/strace.list index ad9ef94689..97d8ccadac 100644 --- a/linux-user/strace.list +++ b/linux-user/strace.list @@ -355,7 +355,7 @@ { TARGET_NR_getpriority, "getpriority", "%s(%#x,%#x)", NULL, NULL }, #endif #ifdef TARGET_NR_getrandom -{ TARGET_NR_getrandom, "getrandom", NULL, NULL, NULL }, +{ TARGET_NR_getrandom, "getrandom", "%s(%p,%u,%d)", NULL, NULL }, #endif #ifdef TARGET_NR_getresgid { TARGET_NR_getresgid, "getresgid" , NULL, NULL, NULL },