From patchwork Tue Sep 13 19:13:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975174 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 613BBC54EE9 for ; Tue, 13 Sep 2022 19:26:38 +0000 (UTC) Received: from localhost ([::1]:46536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBYL-0006eD-A8 for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:26:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLp-0008S4-13 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:41 -0400 Received: from mout.gmx.net ([212.227.17.20]:43307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007ea-UD for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096404; bh=iZy4oWlz4gLRtGY1piJ1Up9ec0SQer8EDDaNHLcum+s=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=EGXJxFgctTPXyGGv05DWqK+C4HEGU+6uEbF12Gvwn+omfgYdn1J+FUyA82hNyzmCO HFcIYcT/EeLOpHs/OpZFoZYymaPY0TCyHQmhbrpkt2fOY3VzpvEzTF6DEouhHBYhOV nfucE8emPFyc1tQlxwpv+efJtgVDtglPxmgD7oG4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MqJqN-1p3gU30hGd-00nMNG; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 01/12] linux-user: Add missing signals in strace output Date: Tue, 13 Sep 2022 21:13:10 +0200 Message-Id: <20220913191321.96747-2-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:0y6MOUtEM81PotWcZup72e6ipCQdPHy8oAukko5CEcRggvyGoVM Nxp4myf83H5w4/7v4sVeurgJd1gd3ZUNiWPWJ4wzP+4jPCxchGMhNWUGu1eakqVAx+sLRp/ 1ylTzmr9t2925AwmD7Wd6XR4jPOSxisu18RWuttQQHa+rowEht6VTyFvtNh8+sFoy/4MGU5 PI3c6AWwuQEoBh+TM/OYQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:CsM1wbk+SqA=:8uH9rMC2SCcYJoWvltLvqo UF3uIcID1biKJn3rk5IAgAFoVn8a0Rm5Rh0DfTVrHESn2F8RiWUV9xBzDg3eXRtdhTAjlyo+2 saXEmLkJfZuHLXuqJC1/b2y4XzFnWzmVPnLQ93dq9xshIywyA+9Vlc4KuKwkrYLdR8hI3e8/H DAPSW/hnhwqkMmNb4g8flHh6BIbOj/owk0K02YylkCnYJpG8ZOIAVHyoAdevc2Lj96ZWgZqe/ Ve72UXez5XWvIwIacHOksEuCPBBtaoZXXSt4wfvLFGz3WFJaFkh1eNMtthNIwlPldBhIsceDZ v2pmt0YkS3Znak8TRw3OAiU9i/uMFO7HzcJAy8E7S3cGWcZafh94POZl2XK9JQEikEmVqBDc+ QYbluN76qixhk8Fm4BVNg7PFxwtsYHGGyBHtsKR/FrpGejeMyu2NEFPIAbD+V21RJp0SbrkxD kjvnBluZlHqOucTJSRGF8qikf/wNLBETKXNSrfEWuMcvmvvbNY++y31z/f+J8h62itVLh0qwS 76ddKRPl5SASF0boqF5kMEo59+2zLeXjHk/TXL42LNewyPXZgAC0FZHygrewhWYQYUo455edD xdUnEV3CfJjmODpcgCYv7AK9KNl7Y0gY733TC/fDA82phS7D+3qMW6q1fTk7gIKIpxdOUb/KV UWuS8NWFkdp9yQSiTz7+6ne3ebGz/0cKlfUWxGxOaqXNUOGa1cZZhZbcK26OCBeaUDR2epIMG kn3yqYYG4zZkoUNlwd0Ei1eQ+lcjtLzIEOw4W2vVwC1KlNnWwmzDhbxjZpHi7NzdmYYk16xg7 PIu2wzzDOlxxpRFDx/iCVPdFAAjH2FRnd9wIRhNnvpZONVktmgSnUgBHG/lwjD41RlUYHQVw/ LkpcdkGRmfCv3exuzpzVvHxa0UIrHbGko3kfT+zCv+xjjNqu0SeVAfd1oMB0jDRupjf8Yx67u QIjABRuFcciIFIXDPEI5iLAkxsDDFqIM1dI2d9Nu37+5fhdJs/uhfg7o7v738jdLnmXs3CZ/8 pGsCDJT0Xbk0P1dOzCJsYX/CDjo1SWS332juZGUtlceawnMMQjg+/8KNF5E0vMTPXktV1nS9k I1s7CSj707JXX12FWBJ13dNMy0o4NBx0jLlQZbRoweTUchV4pc9NLYJsPXj5ClzMuHaFmhtDo rHGN6BA5iOPyG3SNIwoGRNan4x Received-SPF: pass client-ip=212.227.17.20; 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 Tue Sep 13 19:13:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975170 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 F077EC54EE9 for ; Tue, 13 Sep 2022 19:21:59 +0000 (UTC) Received: from localhost ([::1]:42332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBTr-0000At-2C for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:21:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLn-0008NC-Sj for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 Received: from mout.gmx.net ([212.227.17.20]:55455) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007eY-Tz for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096404; bh=/icehtdKOzzoj9/rDZrbGqnt2FX/FH/xuZNyulOUMzM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MeqdKkAD5MuzuD29qywUIVpsRi1qNSvqJWOGd07AnC4bDr7PM/mS2mXotWIz880bK 7cwVhsZMgxuun2QQfZfS8ltl4L972oON/xSysT5DCT4DJEoZceC3QcMrxn9PFXQl+G uSP2sSlgXzAM9Byo/rjEAMSlFCJo4K1oWac9GY4k= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N17UQ-1pIlQs1Gyg-012Zq7; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 02/12] linux-user: Add missing clock_gettime64() syscall strace Date: Tue, 13 Sep 2022 21:13:11 +0200 Message-Id: <20220913191321.96747-3-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:BoAp5IQAqWdGcWD9fJgYkXxpD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b5/t/qdvXsm9ZxQdMeJDeAECALkaRYlFNN1a193KwCg/ENmsD6v7al6LM01 1Eq1ce1QDUX0L4X3vvHezkDWKcl36YNgwHz8lNMgdkPLGskrQW5gPXoTTFsWwBktC+8UqS8s5 yqz2B4xLrg965oPGWQAU0UH5ujTfRZH9zl+070YatXoVx0IOjmKozIb5GN8ZFycHWEDCzKs2z pNZ4X3S0aUjNAVGTnHewymmQwfpb+5EvYxP9vCfHVKgUYwUj6XT5bgbV8FhuDSc0pdl8h40dr 2VzggeWRYjmLPeu26CRfzJjlv2xP5NOuL4dhozZq0YuIVj2n8aU0frtSj2Qdy3xmyUzpL3u0q qGmk/hkeUq49AIUaG+qjlwr5LO Received-SPF: pass client-ip=212.227.17.20; 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 Tue Sep 13 19:13:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975176 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 2A436C54EE9 for ; Tue, 13 Sep 2022 19:26:50 +0000 (UTC) Received: from localhost ([::1]:60946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBYX-0006tw-4c for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:26:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLn-0008Ll-I1 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 Received: from mout.gmx.net ([212.227.17.21]:57269) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007ef-TM for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096404; bh=Ny5Bq2KxQ3ykP1Enntmr9piHIvdc1WrGIrxLctjRt1I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fyVn7bML2gKNKu8PJFrrASiLu3cnxB5rb+SxcPmZpyaYGejXMkuRAis+ewKqh7EAO 08BJ3Q6XISOPfS3/euIf6w9v+rTrv+7PmhB5IxY5q4Vu0Zj6siFX43r9Yc85pVmlvq 9T0f+AFpoI4pC+X+TKgLn+vwV5y3GORgGHnwJkm0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M1Ygt-1obDLz1uHL-0035Ny; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 03/12] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls Date: Tue, 13 Sep 2022 21:13:12 +0200 Message-Id: <20220913191321.96747-4-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:MHuvEmB/UY+VsTnY7qBTFXNVIpB9ESLfv3zF8urq193WU1Qasaf QJQgEQABLjOv08cw2evtHqk+32lPI9QIRMI/b2i1rgtmG62MJc3y8CxUy71tcTBKzTe97q+ DurzHs5XHM9kVUbnsh0gjv7InfBYxIqQmF6N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Ntf8ikTVzg2I7xI4EZfqaxmBdZ6BUFTjeXqjeJsE6wusY6YEos/qRkt/wnaNZA wO3rMbCGU2w6JwjdwqDkPZpDkaPmiqPcMUn91pABvsc4SfLSzf+gabrF5RKNAlslKssKHC9E2 RSC9EO5EWQv7PHPa6HHk6410gVchJLGt/NLI5gjkMB/c4EL5ZVxgBF6bcKKAxbyVX8+4k1DRo OD2exjVCKq/3qZ2x32y0Xg9l83 Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975187 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 3FBB7ECAAD8 for ; Tue, 13 Sep 2022 19:30:58 +0000 (UTC) Received: from localhost ([::1]:38710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBcX-0002sY-Cw for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:30:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLn-0008LX-G2 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 Received: from mout.gmx.net ([212.227.17.20]:39223) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007ed-Ty for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096404; bh=+t9TnZiLd8rHKtd7DNCL/ZYGAwF3CfcJ9/nMiBzejt8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=DSDpEQ7Sr8U/xZtjFj93gvLfVgZhWETOBGUphKKjUWxzYZDmbpy0eG1vOdCpA4CUe YcZ20jqDEY1fhVeTX8lRBE5zYUTHRyIaLTASekbLTk7/ljSgnPcs0dTvczsFQQz6+H ObciT2rk9K5zXgbBHJPjv0FxwG8cVmjqxszBP8N0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOA3F-1owZx72Yen-00OaW8; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 04/12] linux-user: Log failing executable in EXCP_DUMP() Date: Tue, 13 Sep 2022 21:13:13 +0200 Message-Id: <20220913191321.96747-5-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:JKdiBZwCbpVwUNA/U+LHoz0/LNlYh7olXYexNV1cdWzB2j29pLp H62uYnoogSk7evxISPbbc/VpIQdpBARnXtp7c6Hi1OwbwkJu7UNQoz4Zvy6ZD5bJbQJthoe PynnUmUulBH7MMVz5cNvK1WoucAljursLLTQZl19ezsilQWE5j0zsQzQlSIQZmbsQ9CSlZ6 riewzuOswGf2P7tJvBikg== X-UI-Out-Filterresults: notjunk:1;V03:K0:CzzVpX012Us=:qmv4AyfXvSEMD/AmXYOyso oG8DdrRqv84ZHPopV00kS6oYDOtki5VdXeFABKgIqXDm8zW9+5kSAD9GTNZ03X4gUQ6d1Z8+m 3PZcsR8yA5SuQzbI72FctlaehTFOKvEiphZEWJoXBoyfFRbpIcz5C3AhgFrRo5pj19baYVouO CsMVC/sp2GOJWB0DCKAOkjV6VS1+nYmBLlVuJx66lB6SEq1ek96BhjU3gqvvQ2DeZK+ohfHqw oDWkHPJLKKkFBYS37cjJ3TCBMKU+dBFWCoYHvgky2LWVWnXYZnKQcY98BFHKDg1CjUO90pWOj fqbUjrjpo5Iws7if/06v+hQT8rqTQcHjL3Qud0U/CcXfZnYFlTDEETuWpz+iGf1xdGrXce897 uS5Ofz7i4tSvwbpe7MdZ2Ho19tK4k0kkOYRh7iaumMdhT1RKOrScZWycquRzvwGxc/KAEfTe9 3vTmwmbuU9iM1dGJkYJaNh9sJf16J9+iPqA/vRM8BDVg+4dKKAJls+QjHQXFI8DjKwf93Y02q /o7ZD0zr7HaIGbVFnDXKN2+1fgh+M0YNbk2dma/07il2GWKBAkLW+mpIDXxvGk4OA9zuOvwzw NhvZ8ViwI6nVN7YiEL9qWxcUZPMSTkXkuk5CKkJkAlPWK1VvOCZrKT/E66I+ui46okodhRxZB JNvha7zSnUj23sfT5+i3kBz6z60wdDUK5HXy78FVETmHF5xPMmOc3CX9UyxH1s4d3mry2yicf xhKLC4fknHBhJ12yjbvsBOVAVCAN5a7KYJsY21eKs/Zr0TEhQpO8atFTW5foXqnWNNMiciaKg gguLawJrGBvNLmzqYAzgpvOEFQHtYgzHwXfPTAwJyGRe5tn0CkjGnrVjoo2xwEpYtg20VgyB0 1z4IngXGM3cApvpx7Rt/SZ8qIpNiMdEaJJtuIdSHdVeQnI+fGeUQ5wKtyp6DS6flPoO7sOPG0 yYM8IxNPc3y9RdJppgW4VVPB6z2yfq6juVTmiNevNCibA8K6zqdySq2kODDw8btYcKeZjdwQe MxlGTKd2yJEW7+K5/UXA0HYLAHZdU6/Pr7SLMi7LWgxImgQNGhE4po8XI5lr9Y0WAPYxKHwcp +nQah3jPvoFCTGBvOu07X0N8FZwJRRBAt5NO8aMCFOHPGqVgy/Hr+wIcWdm5LxOkFnAp9i0SI 6WhvwM5D1DIn+wo22bE7/zCn40 Received-SPF: pass client-ip=212.227.17.20; 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 Tue Sep 13 19:13:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975168 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 85E88C54EE9 for ; Tue, 13 Sep 2022 19:17:31 +0000 (UTC) Received: from localhost ([::1]:57542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBPW-0002sC-3H for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:17:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLk-0008Db-Un for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:37 -0400 Received: from mout.gmx.net ([212.227.17.21]:35123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007ei-Px for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096404; bh=gOzGCQ60hMjauReMswDRPOey73euwoUtnmC0Mkn8oTk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Y5WBszzskLyEdtDtsFwEajdo3ebxzwWaPlm1zNyF7u5Fhsksyd5YGUKcc7XTWHciv uF5c6pPv1OfJn2yxNHFudzuWHYXv+qBTspuaqIOnMsy42ssZZOFYIJGLDaFXtg+Yt0 FwkwhSsl9kSc8szIhdkdeR17pAsz0iZHQ58o21WE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MCKBm-1oPxt03C8Q-009Mmp; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 05/12] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info Date: Tue, 13 Sep 2022 21:13:14 +0200 Message-Id: <20220913191321.96747-6-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:KIYApavx8bNzzwOrKJriprdAOSyu43pvEjSsFucxyDJpiPGE0+F HXtWIkDxXtB6zjFQPHqWHgUjf9AJ2IHpYPG7wXRq7N4WhNX558+whPWtosDONmyIvk2odAr uXmywYzmL/B00l1qWEyuEYgATA3OCM1/fQzE4zq4IJ4ZkohXm2ThH9/qc6mA54F9BYNa/wc IDXGhSuBNM9p/0HU3DljQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:PSZv3LTvJhc=:9e5HCpoIYJECnnsSAw3988 TO3D8bpGk3R06ZldwdyFzLhvldEHvR2QdCFu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Tbsr1Tiy32AWR1aoPSg0d+6cDESLUhRibttUL4nrfYcugGA2uV48JFmN08SDELh 8OtuzE3sxna2Ddd/SA3j7DgpeF Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975166 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 79714C54EE9 for ; Tue, 13 Sep 2022 19:16:44 +0000 (UTC) Received: from localhost ([::1]:34112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBOl-0002cl-HX for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:16:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLh-0008C1-Ne for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:33 -0400 Received: from mout.gmx.net ([212.227.17.21]:36737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007en-Pz for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=mY+wLW2vmfGlhMsU/mvzcZXQorGEa3wiKqNw2eh+Pek=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=XPiz1S6pHhmxPiH4WTapyDq2szT+T6sOLpFtO6UulH1xMRrMu+VLjcrOnhrejU9yY k/Ay5K9UnGSDsbquvuUcFnv+uTnbD8X4TnUuWpvlHhzrEkA51oO0kqBFVE95WIkEKb l/ciobos30RrPMzPy/gjb6+5okOz4yQA837+g4lM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWici-1onXPY3piS-00X4qP; Tue, 13 Sep 2022 21:13:24 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 06/12] linux-user/hppa: Dump IIR on register dump Date: Tue, 13 Sep 2022 21:13:15 +0200 Message-Id: <20220913191321.96747-7-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:xd4shsXSZeDiYGJ/7ZxBtGJD4TmK+eSEC9ox5hFfQn9JyQZOyy9 V8MGM8/gA8BSS0/mrCWk4YhfTLh4iYNfxSFZdUOmeNXkLXO2zgutWTaVg17VeEOmXWl0Mvj ZA060i/3IDDwhRLNOdYjMGzYv7ZGGluMZRkEnI0cx2hvxp5S4QjAM8oTcQEpSDjPSDcSk7v WA/ZUHXuPxQrUUPXE4gIg== X-UI-Out-Filterresults: notjunk:1;V03:K0:QqXrFxFbq0A=:aTYxd8rWZdCrqRoKE1cNM1 aNmcm3mOFsYj11f4lWrQS9o5eRsiMKhLDBW3rwIl0TvMGadB+t5A6JPweozgg6uPbBVpZRUlI Rlu9jW4c936P7OoTL+hVR1aRnZ1aC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yySkXkI Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975173 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 539F4ECAAD8 for ; Tue, 13 Sep 2022 19:22:11 +0000 (UTC) Received: from localhost ([::1]:36438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBU2-0000PD-FN for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:22:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLn-0008L1-CX for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 Received: from mout.gmx.net ([212.227.17.21]:37159) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007el-U8 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=hdJ42ybplqITg2E5Kl2mdXF9WOlHmOsWF08yplJbwKI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Y7GzL4QfaV042fe9rYRK76eVq56cT/nepqwkZOmmytH0Gtwi9r+/XN3oSEIJYqsif XIJwVyHQyFCygmT0FjC+DqqFdjfBvaHvDmtNMhFkQiSicZQhm8PifyCC3/1DN8b921 AIgZcXrq5eP+daBx/rLurPxjbbBnWWjEitSN3rxY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mgeo8-1pEvgP0Hoy-00h5Ez; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 07/12] linux-user: Fix strace of chmod() if mode == 0 Date: Tue, 13 Sep 2022 21:13:16 +0200 Message-Id: <20220913191321.96747-8-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:1Olp6EPYRrYCix8ILN0lr1tUUp1lH/Fj3F8S3Sbk5PrllI4YCl7 BU3HASEskRJ/ONgiit41DVWe2cykqkZUdtLa4yLBoef8iWXpRnBgfEeo7ozr36GEEPDFUzU Ig6ZiQEfh4ySeQKbevg4y7FRT9wWpNNf5VCKR5bJ6CeX6zmqpWcRFbSfQD5+iC5THz8KJ4m bKgai5ILEL1Xe6qAuMolQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:fgUxVMeBU+M=:tCuWD9Gi9AJUMPKORkOVa8 L6/zCVbF1E2J+vmbIJkU+9CALsg57/no2LgRqjkXLzH7OkaDva/V/lmdfDUAUQGnMxFSGP27W lHqVhlp7XoZxZwBzvAxOBfeeMH0lxx3Mt64sAO8TjZLMIpJpdKDf44N9sT4HXQS5sidn1BNkL yaZP7RxYbczcEe5lSzmUXyz0OlQdxIhpU803lTLgG/T/ts/fcwhUFWb1bsDVNQ2fxJopDP2dd szyRPfQecjyPEyiadCBAKwhH3AbRhasVnmaKminBkoscGnVJt8Lk5WA3RMwlEifCEeP18pSht DtVk4zqv759G7xwEc/NAAt5PxDVoeynSapOMmosLeaeec9oYIsCUWtUfbVERnUpkulb5AH8Zo 5uOh3XM9Wf30VorF7ShoXr+PRZ8mswuTpWQVGo9nQ8DphoVCfooGsCsR6gGDqGD4qKuhpN/zm JeISENvYPEtmdyciL4PoTDtm9zN/G9UFWYnhBp8HCGF2AWXsyVtH1MYaFJNrTXGqSpoazpyb2 yhiqP4cAS+qrzTLGPhF35swPH8BlTa7lRzs2/oiNtmt+0AND8xF5Mn+cNqSk2w4Zr3muEIRTG 9FJAVIV7KLK+9F2rLq1EqAlxL8jUmjPOCxVlFYZDI6MHvMAbPguuNn+o1nilXvgggUMhP80gB 3ObbI3G/YF0rgZe8B6UHnns8jx2goftcfeWrSAKJ4rbullU1lKCjMvd3vxR5NgvaN4eHMzCtw 9UWlLa+58kbCuRSGT4Urn7Z9p0LjyoF4+5ClnMx/nxHLWiol63eZ8RFMHMbb5qFUNYbfohR5W CHA1qM7t+LF9YNHyR9nFJ/LHSE5lqhsWc80omyio1yIQd6jvTQKqxYXdX/3y6jWVi2yN7OKrT QPEdHv4a3K8x3DTbXZNshLZt0H40GK/egGmxWKeZssixbzD7Q6XZp66Mj0xQXP/w+FaF2IPcJ YlXmQAPcrWVDNNcKPgHNiTdGZ/FXhpdjSCCsxHS6+ERLxCbStombkgI/jzP+/WH2CMoH4rxi7 n+ZsxcHGWVkwtmwzTMSP8IdkXr/WYAdcWDHgKenAqqHRcHxxXEjhIK01m+2N2CVNTad42jRhN +jywEI4BkI5XyMMk0OZHqHlGSzpg08GWDin2ajTKu/IfGWFQL0yWWpWG7IhkoNx0TsLqpe6aI 8ziohsnzDcbrA1JgdjRJP6pxMz Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975175 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 63910ECAAD8 for ; Tue, 13 Sep 2022 19:26:47 +0000 (UTC) Received: from localhost ([::1]:60944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBYU-0006n0-H2 for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLy-0000QE-EB for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:50 -0400 Received: from mout.gmx.net ([212.227.17.22]:37783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007fR-Ty for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=9HKRSmBH0uIQursAz/Lfos/ipwIs650RLsxkMdvi+zc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dN33Do1cNNxG1FCyutSc9bnGj5kgoSDU54aU/IWbHNYBAKVPssRMSvtGVdZsjf0o3 sBX9J/hiVeaJAhzkwvxV2QLTTUb5RUwCRk4hn+ct20p/bOXzFAYuHPDhzhwXQDto/Y 1pv3HcyuErXGP+8BdLwaZOQfgOt9iZ09zFObkx/E= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXXyJ-1opSQ60sdr-00Z0O6; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 08/12] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch Date: Tue, 13 Sep 2022 21:13:17 +0200 Message-Id: <20220913191321.96747-9-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:BaB1jCiMvlUM99S/4gpyeypF6Kj8ZwEq7V+wU39vhYmn1O5tsdC DCO3DjKk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wYZuZ4SbTxcJYGxSt ydbK/R1+dDItUYl1zhkQLSwxzDTZmyYeUDWzBob3DKCnHJSdbfSGXog9pX5xwh0p1wn2XVkbV CUjugUyNwRgsi/cIDKYiga0beTN8Ohhh1DTELXkaBL0kfspWCmwHSLkYp7imiS1XOjMKlAyln 1+A5gdHphaMJhpkUHe3zBulJlkNmFc8QjHI7yDVIyy5SmR/RpBzHpSINNLRjGUJ+aA5T7as/G 7PO7qyKLzFTmROPSIS4C5xsEQ5vz/aRimRJJQFhfTLNlA25XZ2+BQwxbu55d8KtcU5DdMUQo3 Tnc8X9gJm6o32WuTBXD0P5vYXn Received-SPF: pass client-ip=212.227.17.22; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 Tue Sep 13 19:13:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12975169 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 67531C54EE9 for ; Tue, 13 Sep 2022 19:17:58 +0000 (UTC) Received: from localhost ([::1]:57544 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBPx-0002vG-DN for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:17:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLm-0008Go-8f for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:51985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007es-TC for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=a+VzLr3Jr6Stg5DkRL6y+jodPcSdR3H4tkNT2D1+lps=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=BM3XmJMtzvK3oib35mS566x9JaQ81ZehfeV5yc73XT7NSkZSUqP/XOy67xDm+obwI q0aC0BVR56P6aAP2otMsI6Hf/IpHpIzGCcTIHJCF6i2/loaB/86d3VTT9dTNexXpbO Z8RIpFozaDVcCFr66gG6Yi5BduE3flETe7yJupFo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWici-1onXPZ1iie-00X4qP; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 09/12] linux-user: Add strace for clock_nanosleep() Date: Tue, 13 Sep 2022 21:13:18 +0200 Message-Id: <20220913191321.96747-10-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:iPNylO9zymu/eCpdsQDUpaWSkfd0jlCBzmVkhIlMztxPWr56KxX m7oPUb3hweYUi+Dzn/qWiSX9MvpbagQSFUKX6Jcson5c9cN7f/+nqBA5l+HHEEHG7jKunyq JIsBb/lQ8QgoD/K8IXXPStxz+OnYOXBkbMMzMi/9QqX4dLhrSJ3rT2RzD/sm0uwtt8r9vom 9aulI1wORyjkWezbli6pQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:5P3xOZsCswg=:VFNGtSv1109o5i/DKcVI/a f7UNtaAa3kXRqzUQI9a35CL881UNzqGMuNTK3zsVP6JIDMB+1vAhcZ8L12q4w5OA0d3rJOnaK 481W3MymteZsX36UcAy4QYnn/qi2t0q/DX5CCZwg5zwpBhCaztf3hFBCE2TOsUtKajskO4cue +dK04F/B6gKDuF/d9/C5vq1PN7GR/La8U2DIYp2p686tuzau7LauawQICl58hs7UNuBBiDqii cOBMNEl6tHlDc6rBQ9nIp+PawtrtWwvTJtsWuzhwQgC7fb9//w9TsPDs9GqgTvTusF+vVAPzK l1e1i33HlWnrhJXAZk8UK9SaFrQuAJ6SSdBtkbWsM0T58onhgLxd+N1o6BWl/Qw1yTCfht7Fl vTU0HJcYB48RmXYu2VsMfNQcXDXRJJAKOXcEout93g+4+yu6/U+pOm2U/LX6/5uUtH0ViXasv qKdgfAUogqFNbU0WPHn44PjdGdlwLksCfdBYWts3ZoOx/LzmvRrrVzAYWpGtZrD2fq0kh4te/ cB+FIW3TgXTLJC6ExOsbtG5EcX+tfh8VH4cyNeesYFh6GK1Xz+OdMWi8hvkQBGLpIT4xOhqTZ RoEaigwqWy5D8fzwR4ONYhqLa6GiE0dJoluleNnZejiLIVXYBNleC+vbYRE279XTlXCqzyxuU k58B/WB930sAej7oXqivk3SpwwkChT05T0HoJGJA7EYmuz2KpkmSjaVnX/L9Ru63WB4asAjx4 kl3SngFhajRXjIuGbI30/m9w7t94kwU5JwWxmeVIlCq4F/84knubGsrbb1nXyh0VsWDcaVD1D 9+6VugG1gvGEikK7CYH2XIqKNQOlxSM8XTYcTzY1blcOSZZDxy3UxEFtoJW/Av8st58zeak2N eKoMTBRfqO2mnzyK5/SQiF43CJWymseRNunf3gdfF4J2adt2OWOv/MezfIgJAlWqYAci2aQZy RpB3eRazDRT7FQXDeys56R02JDN0vAnKtgJwHfWo0z2f1hgnXjvlBPfTtNWwWABIH7IF5NB7i cQiJjjj327XN03p/DSvYEfuNh7JKRpHHkd3tW8HCGhD/HBaesiwbkxDg4ToNL12cZ5mUsAEz9 0ezCovo2vXSLEX7yKkCjL6o3TXJ0C63Xjl3o176GKbDdFD/3TyWcXF8HLJX8SFGe9GGAohmLy 2oZovn5bdtME0nJVfggdSLC3AO Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13: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: 12975172 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 A2405C6FA82 for ; Tue, 13 Sep 2022 19:22:10 +0000 (UTC) Received: from localhost ([::1]:36436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBU1-0000Ov-Qw for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:22:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLm-0008GS-6G for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:37217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007ew-TL for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=11LtDJ/FRxnL1hOwc6wuQJsp9XSl32r0mSiKAp9ljjg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=NzSh2UuHmZL/Dfg2P2JlKiaSfRoyw2wesVgSZeLOwUSqt+n5BVMMR21eLEmaiJH8H BE9+zJpoJOjiqbi/6xS8Tx9MIzCh4QrC4jrc4USlD8zMlwseUUtFr1kNyiJD+wPx1P lldMIZVpmUkoR+p7S0/TkoMN/03wgOh5HZ4gy/lo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N79u8-1pNh6n2PZk-017W3h; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 10/12] linux-user: Show timespec on strace for futex() Date: Tue, 13 Sep 2022 21:13:19 +0200 Message-Id: <20220913191321.96747-11-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:hAuncdms70yxwvNHGMuygil0SpgPD4XaIhrT9T0rjtAF6bzNFnu BrLdD5v+9QjeSmEUw8A9K0zhvCaIgTxd7PnS2B+J/e1DCc2zXVpNMDWyyF3RBn7VNaoGZsf Af7jXrl3JPGNJK4WDhJIn0nu1uhaNsiG4dENH1pZbORodN3KXYGS3ETZItV4826GVmP1Vd3 Zdo/K7NTYzLAJP/jooutg== X-UI-Out-Filterresults: notjunk:1;V03:K0:N6+jsa3cfow=:dwjZNFArF5+DhCTX1faow5 OwjA+hKfXXLljnk7d/k5gJtkxNvXPQsuriH2em9tF7VhMK3NKCHIWNUW+oV+1rWHI8I9LmYl7 jyFyKBbWTR7oein6/nFYminEFUAWcaxR5Mu4TztBqKAABPF7DquqlRb5C/SJi25uAPHUSCpfo Lb3owl2VUBHr656Lnfhv54h4jnHDOTHlzw4tOXrXVx3wPW8YuVqtAH4VopX6GnlWKilkpqhEf aXwqj4ShcS2LelluIMjnJPtjI1L5llSuxcSQFP9aWXC6udpXXTQtWTJ3PslFPYRPAA2hKJK60 q3QslQd36Ja4UXmliRrxYaaLfk3Xty5vVJYzLgHVToKHkhAOOCfhDnW6+5H+PbzCbZ8Lbkxbt 7pwBH0ZfsRCqYMuuESU08geUBrePA2kqbcJesVezOn0y9wFbDa4SYLAnl4sItVdyXiuZAxiZT gO3yByNXb6eJ7PYSyN5JV8WKPkAV7O4JLShFZlJyTCT9KgA0EY8ju/ovYoh1S0k76P9OEKrie sDfXiI67SE56yYZhziQe3xiAVCKnloGVtF5lk8WZ7qbpBoO5bKv1R1xtVivTOOcnTCahPaCrK P0fHModu7+OEeC0bxTCtT6YRz7MRDj1NThMACHVD/lM7TIoMwe5H/z+WV23hA+NIxj14MkNAr Gcp6D5GN4OQAc/u1mS8hfs6ggMasnfddtyqeCTO1UPqqjQUT8W9Deo/a+mDwdY0jsmw2ZlA5Y t2ndL3y+E1DUg1ItESUnRyA7MOlCSNCgBFH9QV7xg6Upv0KQ/ABRRbUs8sXJDJYx9b4aGpCV+ TcYW4RMoMeqWu+SF2L0or4F65albgaIAsljCb4oUt0SyEj2SWBm6lgGKyZ6FcJR5K/n79k7Zs JodJ3Onh0ddJ3Ci8riw0wSUjUa5RtIPkGKMW2zn1xq1QO8382pckaosuWIFnb1LlvQhqnyYiY SE22t2xYk/G6mkRLDpOacgpWAOx+/qLbgBdK3Qk0ZoxDJrX5h+YhPmw/V0ZiMdzm5ckM+xUcf XfLt4Y1YjpCqra+pRifygGX5PqwB5cDk4QmDOdfsmDlDThRHrubL0VSjbh+HWCxzqhRslF12x Kpm0zbVgZq+VkKCUxHfcZivhSloEi/UJUaYyRYdVTHSU60BWRnPkhm+uCc8yNdxqceDFIHQ3S abroxyicf0xjDmsd3VLQh+46Zc Received-SPF: pass client-ip=212.227.17.21; 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 Tue Sep 13 19:13: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: 12975177 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 3F6ECC6FA82 for ; Tue, 13 Sep 2022 19:26:50 +0000 (UTC) Received: from localhost ([::1]:44866 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBYX-0006wE-1z for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:26:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLm-0008GG-3X for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:38 -0400 Received: from mout.gmx.net ([212.227.17.20]:60469) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007f3-U0 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096405; bh=Hpg5DACac3hGaxdzOdQRYHv676xvOkEBzGXsw79EJAw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=F3mrlhp4xXWytSo0R/GbONBCWYdFlzoDaRufg7BEr59gQFY8iNJSMc++WGLq5eWFC CRRvVV3II/Tm5vbip4cRaksz6EV0LmGIC4TG3p6FScoyMow4XfLD/oWkxRV9ZFWb2s nQML3XhRc+iHkC1uLo8TJCtrbMQBNx5yCE+IoTIQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MA7GM-1oSAoR31DO-00BZiF; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 11/12] linux-user: Add close_range() syscall Date: Tue, 13 Sep 2022 21:13:20 +0200 Message-Id: <20220913191321.96747-12-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.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6OgeOUgk3YIYpaTs//Gpbg/HpSiNZSLktH7/X81ADIndsFu/6FvS6Uy5bu+8vS cBSuk7Uc5tAXNJT/SmSTiA8BL++VCGa0W2PM+D8U1v7Z9vou3oL4X78iBMuJRAq4L8XZv7pg5 dnS69aKR4/tXrRCVkMHAmetqcA19Z5ZgzXLcOGRXq8nQfMDmzAjDAnIrvKskkOTSiYakZm5xn Gyt+ZcTK0EDvQ/Yp/gXKIOUrjY0RGfTyW6CTytyHF7Fbbbfs5Pf1ruFYjTPLRpLdNIkut4sRX WvAa0LbEo37yuLs/gQvRGRRtRH4tEvKR00CpTwMTXgi+aGHeOFEoam0Rc/khqOidrTKhRHPG8 qTeva34SQGBTgxlAIcR2ij2Mey0kIORQ4Kyg1lws2OfNWaYpBzaOx2ghOES9Te0TodQuPnTms 7wRw9aeA7qrCZwoy7fPpbwMENf Received-SPF: pass client-ip=212.227.17.20; 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 Tue Sep 13 19:13: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: 12975167 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 65027C6FA82 for ; Tue, 13 Sep 2022 19:17:24 +0000 (UTC) Received: from localhost ([::1]:34118 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYBPP-0002mh-9W for qemu-devel@archiver.kernel.org; Tue, 13 Sep 2022 15:17:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLj-0008CM-W0 for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:36 -0400 Received: from mout.gmx.net ([212.227.17.21]:37083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYBLf-0007fI-TB for qemu-devel@nongnu.org; Tue, 13 Sep 2022 15:13:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663096406; bh=xI95ZtW2YAxB1bA4cBpkjh3a9HRqZTZ0Mu1f3lPFvkc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FK8ecSQcdBkCmViA0Aymzh18jie/etD6mjWLzZ4rPODjbVYYBAwFUWdx6wIy+uZ2A K1+kOK/CsuF3WSw2AzVi1MPFUIt1vcvhnu9/b3DzCBd1xOkOgUJq6JiO54loAiMFxY OvfrWP24sKAcWT6BSyVIaLxTuWBxdKu7JO3iNLeA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.190.164]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MybKf-1pWjeK3fkj-00z1jQ; Tue, 13 Sep 2022 21:13:25 +0200 From: Helge Deller To: Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PULL 12/12] linux-user: Add parameters of getrandom() syscall for strace Date: Tue, 13 Sep 2022 21:13:21 +0200 Message-Id: <20220913191321.96747-13-deller@gmx.de> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220913191321.96747-1-deller@gmx.de> References: <20220913191321.96747-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:azYWimxoSM4DEdxyKlyUUieOZ3pKDlPAkDlOR/Yh6lA5pm43vW+ 79tmEPXn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ica98Qf5xho Oc8IrQcVhgnyzHiiWpGsvM7G7ZjmbUqptfY3NZe807uAtUAiLfMjFK4/Cvv6/ZCuMC1/bCtdE qAoyjXfz0zx2KKia6LKIjBjdqD+YSCV0+VG8kZ9i9uvPgJSgNihma1oCacn+yp8Q9L+3oJBVq l/Xc+1eRpJRxqBrEB1i6eEB564tyR2NArj6ZeJNl7njigOKZHX5rYFm15lsinQgET1MpPFAZy t12IBKK1NraYLz3UeqCclIQYccyvch+ZCTiekyS7UBfjy0OkE/OzkoJj0Cz4UPzeloeU9dwoG TguCoYqItX+m6tge5oZhQqmwRu Received-SPF: pass client-ip=212.227.17.21; 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 },