From patchwork Sun Sep 18 19:45:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979553 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 9C854C6FA82 for ; Sun, 18 Sep 2022 19:52:31 +0000 (UTC) Received: from localhost ([::1]:46858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0L8-0007WF-N1 for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:52:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ew-00071e-GS for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:43085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007ae-Pz for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530356; bh=7aS2o35HsYTsCq2IrHBGKkUUxkKyHtWnOczIq8CEF3Q=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JMWURL7C6r4abJwRqTQ6NAccByMDJRColaSDfo/Hv/0DHBWLH7dxT6pbxih3pG3BO z6pNYHKKNgNUFzIxYfbQXOwxMkWPtxCVclM1o2/1kI/WGalt/XBb6bRaJfumyKw4hS mz+wGV5igx3aC7YrO+iv8gex8gyvWXpeyAedePMg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXp9Y-1ooBYm1eG4-00YBlD; Sun, 18 Sep 2022 21:45:56 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 01/12] linux-user: Add missing signals in strace output Date: Sun, 18 Sep 2022 21:45:44 +0200 Message-Id: <20220918194555.83535-2-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:x4Huu1IRDdNVg8o4c6WOah24K7wejtwJKUQm7Bb6JHoTpTBaB3A TuRw6Oq8PrUorAFIVwfK0scNDxWE3QYoVRU92/JDijDyPfD8MArZXMaynEbNYH7jtMubX/X Gw4ZH6XZK6Pzu8dp6pVMVBrLMFf7iDmGyA7AZFLzuntUFaxFRj9yOPwFJ+Jg646a1TywiHI kijgDbLpgf6o6Xb8F8UKQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:koTVdP/YXBA=:ms9MDCaekm6i0YKmeK9vL7 9WUXHdPFQOZqIqJVk6ypA1ID0x9hy3nKpdO8xpkg30RDM5b84FYkQXzYcgfwN7qTcL9+3oKrj EY/mfYFO5IurzH8xsCndq8BoMbFGrrii8r8oqQnCC0safUElUbuyIx9kiIsgoa7LU5eGaRv0Q 7yTHHY41XfWbo5m+Em1Xr0p7wN2VbVifNJpmUsSFuPHM4WIkNFnbe87yxBIIMQvdA0aPGZEvx l1L6v6Kus04IEKsgZTTyx0YiSDOC3VKZD+BnZm/SI9tSwlbj9OS01HjOowWPsj0Ilq1wLFsFy NOIinGnP15hBbPNpuHtCGaK4GZpxhVX1wF3v7eAcuBPz3MMU7gnvxOWAn7TGVe+N6o+uilMWF 5eSwybUeo39vSOcG6JSj7Q4JjSXtkUKqId1MDgS4SuIiAiXj103UmNFfEmAbMG8VVO9+/MRS8 +aW7vYvIZXUFIRczQyBf8zJ0MnPZ8vGYFG/vZiJhXcvCsLW6T4Nw/a82dYU1+oznzVXmUXoBn THLJpuFWrxBCHXnnTG/xvjNtsHKJUxrFCunDZeRjVKvGlO6dSd2hXcZdSiMzm5L6hy8Nx3Rvu 9JI0CczdePAyDhh9bH1EjR0LDWgY81OoPLImdIaebEkhh9zCwUOeuEgDT78oqI5GPjv4312FQ gUAnIET+ID+GyTCGMOkDKSdREQtMyfj3y4op9JjJj88wbPHo6YRJNZ/DPrePuXYqEGpL84+g6 u9PLeC2a2on3qXc8NbnViYb2Q+/XCZ3cBlVefy5aJ1oRbLYhRcSicDUzQRfP6qCZ8eeV3DvO/ 75NKQMs7pFswCGA16/XAwxzn49UtOSPrKeEOgnrqS1yxlCtTIckYs33rJ6vPVpMfclTwaCmNn axkyc8JxAdgG5sHi4oHPFfeT7LnmnZmz4rbUAHOcBCv7/QF1RsMzUzZclyE3EdC+z4PM3z5Ne v/Thf2LBC7r+dlmxNkgxWXeahWNPNLLQEaGxrnudnLxSsS64Vji4/DEqAzADRVA6fPSdn7Zxo 2m8DXCnZlM8z33aL1javfEqnVUsDEsoZXnCeVYd9dvOdhNIkCFSiyO7T9mX89al0YQTQGXNQb d0EDpZ5QUFHF6DE7GotXoPmk2Q24ZFqaIbhtM8pcmRms00g0J3NkBkLVcYVhXMHB7AMcLU+Nu B3Gip6PLPYUE4/11gih4O0+pyd Received-SPF: pass client-ip=212.227.17.20; envelope-from=deller@gmx.de; helo=mout.gmx.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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, UPPERCASE_50_75=0.008 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" 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 Reviewed-by: Laurent Vivier --- 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.3 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 18 19:45:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979548 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 04DF4ECAAD8 for ; Sun, 18 Sep 2022 19:49:05 +0000 (UTC) Received: from localhost ([::1]:47414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0Hn-0001Vz-Sz for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:49:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Er-00071O-JW for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:47359) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007af-No for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530356; bh=4I4lfp6ArUG8vjJS1EZv295BBfahRZlwlhlm+UEhPH0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=lnEwJMbIRvrX98UMIXtmj7ZcFBgCos6NXELRoqWw2l1CHSbW8+obaE2pXC73cIsUe 5z5J5Zx6QpjTclkLHe4mZ9Cr4EC82reWCdhQy8F8H94rIbJ433d7ZExY0ZyAUuSrkH gqC5nJmPM68MnZCpW19oki+v6ttN7dO1IJfN8vi8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mlw3X-1ozgGt2L1X-00iyBQ; Sun, 18 Sep 2022 21:45:56 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 02/12] linux-user: Add missing clock_gettime64() syscall strace Date: Sun, 18 Sep 2022 21:45:45 +0200 Message-Id: <20220918194555.83535-3-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gm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6ZOeVuA/uaj6j6GxMViaxZ9vt18/Tjv2/Tc7CimDgqPzZF0VUwXGX GXCj5+i3gpQZwQhlLD54GCfn472VZe1CmhF/Mq++obodV6tOncaVBmFRU5R/h539iHpOLuI1q rVglpaQhnQEhHIRQcVlNQM7lsJiTc/cXf20p9IFfGQ+A6ihRIkwpLR+tM7Yzo63L7g+h7+6ze u39lQn3rVx5EohWEFIHKDFnRzbz+dXrdmrsYx+FHGk4xFIB8UaFe1LWFY6x5eSLYVXPItSUNp 1jhrJk9MbwcetjiFk21tcdMBjrGAD0VoWKZzIpZ+So9jcngZu1V5kFMJ+SymOc85suYEoYz5a PF7xbcjASacPvRUzf/XHQ9cjXHlYcgN9RXsR+w+x3EPIkdz4BXdc1R7CLS2MsV1d2T9/txTEW 9fORpYpOpMdWQSdPekNnD4YiiM 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 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 Reviewed-by: Laurent Vivier --- linux-user/strace.c | 53 ++++++++++++++++++++++++++++++++++++++++++ linux-user/strace.list | 4 ++++ 2 files changed, 57 insertions(+) -- 2.37.3 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 18 19:45:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979550 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 DD160C6FA82 for ; Sun, 18 Sep 2022 19:49:15 +0000 (UTC) Received: from localhost ([::1]:39602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0Hy-0001vR-Vl for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:49:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Es-00071X-PH for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:55001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007ad-No for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530356; bh=eOtm8/SMP826aLASyoJ4JmH78WO5pl6ShNUkvz9YRjc=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=O84RgzLJBlAJLW4lndpDy4HnW9T/yI1HWSLgRbSNZgsIdBexWtsws6PseS4oS7GIw Y6AWTBoIlQYEIw46MsPi1vCeDyissGQmSeXoM24p4NaEHRU01iALm/zuCLDLp/ZGvM /J56ABIGMt1sEnNnbjkpUgFzPaRThhix2jHSH+dk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Ma24y-1olydM39QS-00Vztr; Sun, 18 Sep 2022 21:45:56 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 03/12] linux-user: Add pidfd_open(), pidfd_send_signal() and pidfd_getfd() syscalls Date: Sun, 18 Sep 2022 21:45:46 +0200 Message-Id: <20220918194555.83535-4-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Z8VSPQOPb3KPlXG6iouhHw++hJo7mDt9pAEUvJ2nVMNP5hlwxDs t7a/TJZK+Nzlydb+VSmCD7mSoBRNfTV3DsZJiqB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fkAGWDgZjXIuCpf5i1WkNT068nX3D8/2ejSZ1819fpNWi1kkoEwtu1H+Ijt7povd2IE nG1BO31Kty6+rjjKtRQWL1ttl3cMKRYTLarX6zibBrGYjcu+axer+9MAYKcl+Q+d/VCPHeTAR CCMGPf0/G1N9916kEV/pxOiY5rG1T5BloYDWaDC8G/5ZwebxhirqG0yNrTqTXndfepL7YpetQ QuPdwuAUR9XckpI0U5lKL8aP7Rr2gNco50hXZEpictZqVrFVTOyxJMVlgugwSbGx2dgHsZcsd MDVN4bGGkcNPsJHN/5JYsp1YZR 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 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 Reviewed-by: Laurent Vivier --- linux-user/strace.c | 28 ++++++++++++++++++++++++++++ linux-user/strace.list | 9 +++++++++ linux-user/syscall.c | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+) -- 2.37.3 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..ca39acfceb 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) && defined(TARGET_NR_pidfd_open) +_syscall2(int, pidfd_open, pid_t, pid, unsigned int, flags); +#endif +#if defined(__NR_pidfd_send_signal) && defined(TARGET_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) && defined(TARGET_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(__NR_pidfd_open) && defined(TARGET_NR_pidfd_open) + case TARGET_NR_pidfd_open: + return get_errno(pidfd_open(arg1, arg2)); +#endif +#if defined(__NR_pidfd_send_signal) && 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(__NR_pidfd_getfd) && 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 18 19:45:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979556 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 53BEAECAAD8 for ; Sun, 18 Sep 2022 19:55:01 +0000 (UTC) Received: from localhost ([::1]:51062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0NY-0004Cb-Fm for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:55:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Et-00071Z-SL for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.21]:44415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007aj-Rh for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=/gVeQ5FY1ri9znOnzbjiflH84LDpU0qJIjCnWz3aFc0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U/T18sZRWl0/aSPS8c6h9kUQRtKvAtvn4y2FOkFlNqyxN9XfOPODqXSqL7xjjFXY1 ms7auHsk3F40umM+/f3j+zhzrbsQ0Hr3fq6fIN49oXyxmaAn2/YMcpYN8mY/wtkBkL p67VuXzs7rQJn6kba86g3cajqzbBo/DYVxoaxWBA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhD6g-1pDAnu3tic-00eLcT; Sun, 18 Sep 2022 21:45:56 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 04/12] linux-user: Log failing executable in EXCP_DUMP() Date: Sun, 18 Sep 2022 21:45:47 +0200 Message-Id: <20220918194555.83535-5-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:yshcvZX/wtCLDBJnx1VT/0UYof/njximycHTnezHSKD4eiWfsbE Q25qPM0aK8PoCdd6gHqG6b6yQ4zLm/GGZ+Dmnto3By9cTMTzOC/CG1ZVQ4Y0i+I5mVEuaBS i8mj96KyHRyG7vsG36ByHOmSmZ9woiXJpw5t918w9l/qLi06+D7L06TDbBlDzoU2vQ2UUkp 3ZTr9dtsH2uIUuyfPSCzw== X-UI-Out-Filterresults: notjunk:1;V03:K0:W2Rp+si1Olc=:jPmmll5SlhRYfGS1pjypjW 5515PEJL5VS8oUEbmyFI1hKnkYKM9a3v8A2650FUtfKnFUpLAgw1pzwKNs9iNJQ85AB6eKSCZ BWutH1yQslB45Ss6cRLrNKFKalfwDmjzk4kSzm5qKNLg+fP9N7PLWyD2xpMQWt1AATiqxjjNx VFrGM0LTcMpAEPLnlFgvT4I14GKKI8XYS3GgyfdhhjHbZgSGU0hMn9SfcCb2ZIy08Op7TXVOV 0TfLqoGOSi/HGwCQ4Xf1C/DnaT6pjP2DmE5VTxbBoE6J2eMw4XiTOt7mQqRZNA1rX+jgMd2JB p8zszv9FHSSetsXPlnS+n9IttmOGGLS9CLSHZ3Pshd/1kiWu708NVl1UeBrqBt9/WTfEP1xE3 Zup2f/5D1SWuUl3HZhuIJPDfDpmjblY87aPcTqKrQugCjpOZpLoOrm9vleWT+nBdKNndT8p9z Hl7ATcchwBYrA07p8yco1dIRb1TUmjLcSti7Buq4ts4YgeGwPIaQf7/thQZuDL3GjfK964N3l 1w/A9Sb/q+ZIteui3I+2lHuVEPZYp0wdJ6GyP5QQx2rGRS9vfNbYhsxFFUcPuwfvNjHpLAJJE cdZ4Ny/edSuCfhCfgDiyPku9odhtT1oxo4THeLGCTD7oTjcd+YBqxGWJ4HuaXAjXdBI3ptiYO ntGJKOCH+yLwo0I0UJeLG8xqzcvXaGcF7srJrX2w17WYR1UFNpblPgEa5Uf2KlXOegUIk6Q2f 20N8utYQyf9rePa35RVMjXNhOa1BiGWsZl8faLleZnVW8qQzDodJfTLUaiTBPA7tPbRgU70B0 oAA9LpRHx8rMG2Gm/nqAOV5EnvrIv2pPjBRTap96RrjcerlSY8ebEM9FDsFKyOOZLPVdJPCgu qroNzmP5hkUrasrE0T2Dabrm9ooNm2jF7+k7PwlJcky0Y5S3JOusqvgaAPC4rd4CqEceRU03l zt3EnTuc21LeMRPXUFvO1+Kv+b8XjQUtBuVH86swNzYimH46KNZ7wdp6e+axmGfzH/Cn002eV m3hppyfc69AYMWonrXoKnfvyeiKwpn9SyBKnnBA+CQmrPQy662aGOSa3krgSBfBHFmwLxZoKS aR72f1Cis2gjhnVt3bJF/bhA1jGgI1114XLW9ildQjwPCTck4WsmzvEutoH05FaFbsW83g4Jb zMAkutBGKs9iZZSZi1C2pjBWt5 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 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- linux-user/cpu_loop-common.h | 2 ++ 1 file changed, 2 insertions(+) -- 2.37.3 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 18 19:45:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979557 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 E3DE7C6FA82 for ; Sun, 18 Sep 2022 19:55:09 +0000 (UTC) Received: from localhost ([::1]:50006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0Nh-0004Yv-2P for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:55:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ev-00071d-Uf for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:43813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007ah-QO for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=oRRfJEPedHy0ArZycxyZNEYilcWidKpRZKOQkRgiKrg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ZIUrlmfe+9PCrd6Wx1ZU385Uvu7DWN8wC1H2UCaOxHdLVF3uj0R5uaMMa+ceJVzaw G/ohYMsWLRAdTEZfj6aTqlHklm06Xy2nJ3NNyFBOXmbtYpWFo49HBKzceGdLMTYX+O JrombeQc4NfeRPpCUn9asF2GT0Mskt1s4tYilaJA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6bjy-1pMyPj0M2g-0184k5; Sun, 18 Sep 2022 21:45:57 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 05/12] linux-user/hppa: Use EXCP_DUMP() to show enhanced debug info Date: Sun, 18 Sep 2022 21:45:48 +0200 Message-Id: <20220918194555.83535-6-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:yAWQjvXUH7yhPGt2iH1gKGXNe+t829gIoCxZMd7rkr2ApghgxVb QnFHH+gH48UoPNLOAtbUj22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N6Y83 luyOSDi1hW3Zc0KCbPwSsvJes0ANskGClVKH/eVyh7QcS8VGhnuY+mN8nVZpAvzz3nV2Z17lB Ec9IpJ+LqilykdxcXDSLPTWkGZBUpp0tEqKHOXk7e+Gt4BaRysTagIljkmK+ypDIS7H8lSsxt PPBNIHGuM8HImvp9n7Oh2KtnnjjAdTOxQg9N6JfeBdztUZ89SAhHKSxCLpSplj8EIufGALcu/ 5sDQzR8Ea79di6+HJeaUmQhDlz05+CjJOtahdKKAaesY2ChyU84skaHpz/mNGyxfz4wEJ9zaW S1rbUKk5JeYQSS887SXlg52M/T 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 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 Reviewed-by: Laurent Vivier --- linux-user/hppa/cpu_loop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.37.3 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 18 19:45:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979558 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 449C4ECAAD8 for ; Sun, 18 Sep 2022 19:57:29 +0000 (UTC) Received: from localhost ([::1]:46124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0Pv-0007sY-Dc for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:57:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ew-00071g-Gz for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.22]:58411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Et-0007bV-9x for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=gfeMI+E+j/dnapfMa/8omn/Mn/JySKbYTVeEcHy2pbw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hEIRm/apvEKYA0r4yjRylblfb1FFmJI2z77jzEL+Y31FVt2678YBXLuD9dczOtq6i KZwxp0//Kz0w48mT4USNmmm5/3wAnyx/jeM9O+UVa68YXNCrCIrlWV+O01bVe1X9ne qK+tV//gTUoJO03jrde6ooPKUM1E0EoH06NxIUuY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4Qwg-1pGNm714vG-011T2P; Sun, 18 Sep 2022 21:45:57 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 06/12] linux-user/hppa: Dump IIR on register dump Date: Sun, 18 Sep 2022 21:45:49 +0200 Message-Id: <20220918194555.83535-7-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:FS2DbyTAP7j6mPf37QNE5m/gRwvZCIWnG6rvz7qg/fj1mWhmlcp 8d3A3/BZ8lDHT5RqgIoyrR8YlpgIfyv1FogsoUrdEx+fkFh1rIcqPVhasxHw7ZdK9o6VkJv bWYRkCctAvvaCsLaO+vN6o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/UHLVm+oIrwG2S nxSAHKwXA68eW79k8MEKOPDIjYnX41WOsI3B6tnxribe1Hehi8vNwKCoXpOqPtGZtaM+W8dag FU3ZwHRU50PXSZQI6qardkB/9pItImhvpvKSRDr/gmvQVtt3F661upri0mZS0x7kPbPo3gSIF 3sriwaV6lTbdxYDgL2zqhzLMy2qCLyVYU634yxk/eF7G6HaQVqBuQQ2QNKO26ytrMLwKaSI89 JU1ydY5n0mYG6cDlepjRbzVp0y Received-SPF: pass client-ip=212.227.17.22; 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 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- target/hppa/helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.37.3 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 18 19:45:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979559 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 B94CEECAAD8 for ; Sun, 18 Sep 2022 19:58:43 +0000 (UTC) Received: from localhost ([::1]:55300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0R8-0000sx-Pv for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:58:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Es-00071Y-Ra for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:49853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ep-0007an-QH for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=wsABdtA7mc4o7G8R1N8b0kDQgcZ9Rz4G69v+vaVuQF4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=D/lbBf9TqkJX4O05h11mFXLWfLlNyA3YIV0YGpYY7ntmWz3EO9H8Vpo9M0hY08+Pz 0+/9DfXun0J1+2cmxXx+2GpIv7iRDBpYAWPadstcy8E3uipNpiI20zN60uugvklWq1 1e1Cv7FHLilHIJ880sl5StN97BJb6B136C6JT1xU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2nK-1p4L6F1lSs-00n72r; Sun, 18 Sep 2022 21:45:57 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 07/12] linux-user: Fix strace of chmod() if mode == 0 Date: Sun, 18 Sep 2022 21:45:50 +0200 Message-Id: <20220918194555.83535-8-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:1JIt/RjapBNvEonUshqOhDwTJJ6KBRSajqVyfH8H1hD/+GJEJx0 y+mGEjYskaG1pUWL/dpVY6E6CGFcigzNjwuLlRWmE5CfWNQTZv89DcspdDtfORU84s20hV1 Nh7fk/68IfCPd6xBwwwVEN+g4Br5eh36Eoixldl+4oF6bsFu/BWOrJDqmt8ojoR7jh0Fa5K uyqoAbhgobd6Bu9GBF3nw== X-UI-Out-Filterresults: notjunk:1;V03:K0:H+ex7jpOijU=:GqGcFYZu0iNygHvktBkDYJ FzKfbF8uxSmBN344f0jxWB9itc0CTKjTY9kS3EUEgiNsFmh68own1Y77ZpLGYqg/2MoWdZcsd Y/ep9UtX/zrbOd+Z54rLkZ3V6nrv7MtvPUYLPB2x7Sd1F+7O0L1z99ZjYZ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: 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 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier --- linux-user/strace.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.37.3 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 18 19:45:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979555 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 D75AEC6FA82 for ; Sun, 18 Sep 2022 19:54:59 +0000 (UTC) Received: from localhost ([::1]:51060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0NW-0004AO-RB for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:54:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ex-00071i-1j for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.22]:40065) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Et-0007bQ-AM for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=BcxOqfmO/trIQjNo29cpvGdH85hMR3n5nzwaODzaDdI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=AakXdKTCOgodGc/B+QYsC88Yv2rhwRPauKUwEEw7Xzz5acCfGpGsY1JRedPD6kvs7 awMtMDAgSvEghSrqYr/upVehQ+bdHTe/gfTb5BG+II8S0Mcj7nM85IUz2PaHtzeKX7 Wn5L4Ck6T3ZrKp4oFzxAzFj8JqGHIFNGUJCUikG0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRCOK-1ouoL32TvY-00NETT; Sun, 18 Sep 2022 21:45:57 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 08/12] linux-user/hppa: Set TASK_UNMAPPED_BASE to 0xfa000000 for hppa arch Date: Sun, 18 Sep 2022 21:45:51 +0200 Message-Id: <20220918194555.83535-9-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:HY+kf/Y65LgVa5qfzSjc8Krxp4/08TXRzHMpk6DrOjIahBGBAJu HuidJKobczQRsn4uwLYJ9EqDO3Nsw1rdBwcgH6ETZQeVV3AgMj8J4nyfDNvvWdtLa49Sr6k YuL8z5+AZF2FetttEttWy4jWXgCBdb0gEa1DhfBlcw6+s2Io+y1OT8Vyz/5Tzf4eCPWfiUq zJEjX+xjTLZDhxtEqh1Ew== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZV2wiyguwSE=:0aYDMuMusNujKMJslBzTDb tKzNQdJ3fqWxCcXiG5S4lSm/lll3hkCOgw6jkboFd+b8/zstr8pySMLq7eoHIvUH+LwbaAIGU WUUt4xg/gWhFUj6qBGDvtaA3P35Q8AeGADIjzzaZ6o7ta4DJzFlJyVshzR2z8PfHh8tcFbdRq KTaLDWPeDc6Xpii1WTIZGDML1yt5zN4Ro9DoF5WycEKy3GrVOebCyA0naWX7aGVzKUva4ayo6 avF1X/+j9xNMLoJgs+3m81elUsGDeqWtkT8U5LBc+7hKI6I1EwurUdU/2Pk6dJMeM317Lxqry qbDuOv5o6AW3QoGOWx8cE67XicorPJEQQasoVyhEX5XFdxbqqB4NX5NXTSdv+NabXpuC/TMiQ XgXQaDUHdppUq294pNRxVHHsgVb+5fn81FoojfI5eFYe3d1ULerf37KflC5I3CrJNffD9hlgJ vi3aWgsSvu8yGOUpMOA/xWPKlxmE4vwzPO3FMz4X2Bau6+GtnsLvC99UY6Xl9fHQdzWdcXiby KsWWakApdjswHmuJYl94WKJvulL6otcozShrZTBB2RytNu+c48Z8SZZtIbFRVwuFAYif7Km2p 8555noSiRiA7UMbVUU/SwKMTO8/UqjMpXvJPWlzxvsSJbWLo6qPPtezMn2CXVdT9BsbxGRuFZ rJ/1/Jc5H5WBSUBeqbGo2EvuHwLVDO+vebFK2lUBxu3uvu0I2ZYhH7737jCKa3nhvmMrUfbjO QhCk3GfZFFoDGrWIVxsSXEriWgVgvshT+EQQtHd4WRccNmm4G4XpM1d1Rt5DmNkkx2tvETFi1 DZCbofprBp9Ih9epcKvGQT62cP0JBvyMPFmZgLor6nRb8O6Ea1z/DpPm5bP8tp05FlnIQLaJ0 K5iV3lGEBKUD5WVRws8FZ6LVOkG8cGI0Gn5fwj3KoArcLaNy7O0vZP2AWbMmY/XSjRXWJ5UlP Mt4Q0gRLVrFayVUPivksjqK+Dn9C+Hm4U0EUOzoEeLYWIXaWcP4ag7Dck+R7r9r+cO+iekT/Q JgRKY1vx89qhBQI89hT2TKbJxj4mmRUQAdWtIzvJi1Bww+wiVvR8Tx020oKYMnEKJGvQawpdV 9RzAcG6XVUcbQyL7MlJIOG/LiQmlqBidGCLRxuPK90dEsM70BGBrZDgaW3dObh5C4gw4LKYv7 6p3T3Gau+P71BsejOachFaFUOl Received-SPF: pass client-ip=212.227.17.22; 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 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.3 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 18 19:45:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979549 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 09819C6FA82 for ; Sun, 18 Sep 2022 19:49:11 +0000 (UTC) Received: from localhost ([::1]:39594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0Hu-0001ff-0q for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:49:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ew-00071f-Gw for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.22]:50815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Es-0007bR-TP for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530357; bh=cs05Q1ht9PiLq7agrRMMSzOgL2oo2VY1N/Ee55XqK88=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=MvarkniHp/JSqXTm1vD36rGbFSfvLyvEeUcifIYdsisDLp/YuuRL9JqbyF813p0gB 4BaEqEaLzNWF05MvZw+2Syx1wTdmKLzkHZlPzgx8dXKI5lraxemiQPGeVO4CtBfk2O jGSBJiOAT7h+SRDgkT6+9mbqnnZEF3sUTLd3+6f8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXp9Y-1ooBYn3Mc8-00YBlD; Sun, 18 Sep 2022 21:45:57 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 09/12] linux-user: Add strace for clock_nanosleep() Date: Sun, 18 Sep 2022 21:45:52 +0200 Message-Id: <20220918194555.83535-10-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:NbrCc9/Jqrsfm9GdvMnIS2c/t2cOsivm1a48RlYxp3uBTpv0OA/ pZHZznkQb2R9SPGo3Es5C8tgdRZufcGEAMv+YGCqkjX9QDKGtc/Zq6WU8mzkUFB5zO1KZ4C ldvXc+oV1TdL4LimyLBMidCUiRHCq7sh0DK2gqQxWCyOT2+6nw9jOkbGTxesxNgwh30PEhr 8XOX1iTBF1YnhGa5hntRA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TxD7nq7tHSmA gZmnl/65Ha0EXKqBguAf+hE+LFHC+15qBEyZ4iLicgBRiSvFn94hTStxL39wwE19G370HnvzE 5WpEIzlQzD3cfqoASsbi4duyxh1thLmgis0DAAlfBMpkqhwaS2iMddKFVi3W8laD+WpHxP1P3 wbBs1i7U1qqzNuFut+pRJ9Dn29 Received-SPF: pass client-ip=212.227.17.22; 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 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 Reviewed-by: Laurent Vivier --- linux-user/strace.c | 15 +++++++++++++++ linux-user/strace.list | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) -- 2.37.3 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 18 19:45:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979554 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 7D870C6FA82 for ; Sun, 18 Sep 2022 19:52:37 +0000 (UTC) Received: from localhost ([::1]:46862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0LE-0007cc-Kk for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:52:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ew-00071h-Pz for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.20]:35765) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Eq-0007ar-9n for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530358; bh=Ch0VD1RjoPxJVBQy7NTTlp4njBGwmtHPyvXwy03EIcQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Gj/bFJpsMPKIhglrfsNlDvwilZpNOi9mP7ShSvNBYJncFtyH60DQ6e934noLEQ8M3 rDbK8NgJ3V8uSr5zvyRrHRhj0HPQLg2/zV2IaqidD4p+S6F4mHxQ7uAiXMBDCp5+N5 MN6jeTpvZo1F0kEOEpp20dNRKI0qzAnsS+n58kRE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MbzuB-1p9cRG3zFH-00dV4y; Sun, 18 Sep 2022 21:45:58 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 10/12] linux-user: Show timespec on strace for futex() Date: Sun, 18 Sep 2022 21:45:53 +0200 Message-Id: <20220918194555.83535-11-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ujeb0BtHIk85RstnTuKJelaPLSzzEmNh7DjK6kqFuLx7SH5g3Dh 9Pns6ZntvnpiMv+SR0y/vkw8lc6FAWPBfgok8LKl/Lyhur0eeFsBJVO66sQTrO/F07sSjwf DiZMihl9QeLZ3Zyk9KAJiFdhrm0zN7ru6R8gyu0saHIZ3nPgz6TqdD72YtWCHwOLpgVUfPO 5vlagqbncLcbHxiZlRunw== X-UI-Out-Filterresults: notjunk:1;V03:K0:GdzLI8O2Xg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JMiym1dgIQ1NnFor6jRrfOJqEPUjv0/9UiS0mgQuQLmoGhFADg32DQ+ ANHx/6azdjiyhhQIwpQwS/PE1SEEvIJOWm03DD4jFxG365vttoFQXQIwBnKRs2WiLPXf4OLJV OEhut0JvPpDHabBDoilt8+Zg4H 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 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 Reviewed-by: Laurent Vivier --- linux-user/strace.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -- 2.37.3 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 18 19:45:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979552 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 DB7EDECAAD8 for ; Sun, 18 Sep 2022 19:52:23 +0000 (UTC) Received: from localhost ([::1]:36150 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0L0-0007AQ-Tn for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:52:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Eu-00071a-1v for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.21]:57085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Eq-0007b3-Ki for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530358; bh=eTqsOAZEvSr87I7k2ZocXc4S7Y4RRkoU5ruRaHuVfIs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=kFc8JXmL1/HlBeencLNqXP0B2Y8LJmOwvlQVBpOmXL10fOXxKB/gtwwbu3zLrC2X5 jZ2tHjjLPOevtiTotRuz5dYEhKRHiznCZBRux6jNuHSHkio7ESqDUPrqaBbrgI/dh2 iEL2w4feHhbhYS3ykIIJ8vlKiBLG5qBvNa3vxpV0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1McY8T-1pAAP50Xvx-00cwqg; Sun, 18 Sep 2022 21:45:58 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 11/12] linux-user: Add close_range() syscall Date: Sun, 18 Sep 2022 21:45:54 +0200 Message-Id: <20220918194555.83535-12-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:hpGy3QaDJn0nSzDP9DsVrEnnkwzmv7/poBAHCvhsR0I7qzEJ5NF l4gNr3nsJnd16FVNDFTA6+dl048ZNMsN4sktCA77uoDtf4vS8/1Tx/KKcm17xxy5R+xFy6q PbPjs2VgtjzhTefZVuDcyHo6yNxopPF+VItlM4BVezJINX2l/LLgUV3w8Tf1WB7zPieeecn q42qCfZDo6boELMWlD3zw== X-UI-Out-Filterresults: notjunk:1;V03:K0:q5ZJZoJTcBs=:pArOi20xmCcuA4akj11sEE XsY6al+kI/4kQQ7R1xaIvVeCsiJWFtUz8/bwlMNlGvo4X0yrNdtP/w5VMgkBKJ/RSvLBVQVY5 GBlkfRAQFJ0a1U2WfM6Tdek8gmjQvFLnNDbHjNztXW7QoWSMcEPdpBLNCWUHR+AB757US6zHA 3jZPttXTn9VUiouq0l3huwSV0TN6GZo1JmVk/fq4RI1X/HxbZ8dvoNpmM5vZ/goZ/tzNtQ2Sf 8NllxnBGk7a6XLKj5hzzodcFiIp/5nHpOG4dwU+3fyXeHYfahmxKA1H3bg0roht9gL5fzUqoX 5WQjcRmqU4Oa4K4LuOnDtUaF8YKJPl8uXDloLOuS5a/gfPAaxbKXT+aO+lKi1pefvhf0xU/2N 03BcYhZCusRPeQpyKB3/tee056sIkn9+u6O0bQ+5tNrqxbWHvw5vIScTEcbA9LYqhutroutKe zJJ05nwWEOPJCN1TVbbTgHy2vorjZTcRfdXiGAzV8kR3tem5OlIvAZdlLrySPBLgP5zBafQ6D hLilJA4XVqkjffQ1OoxV39RpZGEDVqvv2FIbpjILTOJvAOp5A9QII4MUVHHhubFSWgt5K4bn0 h+V1aKTHLeybdD9sc2qTyHeryK4TRRdnW1U86mSjUMj0/VUFkbqBsLzMOq8jqo2RToTUGtWZ8 IueZh1DpRzvCRct5oNqfm9eFpV+F8aWxJM+fIkVQM2uKVjexf+svX06gkIyPFC1edlelh3J/m Jw9gs6hc0WmEpxWNT8smQYsW6B9+bkT2ckzA/tv9BYStAe4DdBI33H2QwhC8+Ye4Op1zVelwl UTjUR7iWZtAzhVMrRh67gBWuaOS4NAR6BPmCu0cmMSEniJrXbdNGfGMmLHOjBl4zAVJMCK6P7 Ixv8taKgc1pRapRn8dV+e/eYqYtb80bL4cwOxM8ffLlP9zk4aJvmyg0W6fw1SY14u+V4GQjee Cx6ggugiBx3nUgi0Nw+amegvWVy9unPunYvJAWxKNWTr9rTPBp6KibGYAAMW89ZYz621GkNck /NCv/QLx32iaHq1aFu4yPXdmrT/6OkLrs7HrM54CLeSttm4tvNgKzFpQP6KZQ3wKrEqdf4puY W99iDAKdKTnXcU4vAH4jJoSJiWjP8a4E91g+UQFpxpfxMPDf4Q281cADXpjadgdyorCA6psSs CXlPU+qCRDSM/PM8JQ+k1BDKBU 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 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 | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) -- 2.37.3 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 ca39acfceb..2e0e974562 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -338,6 +338,10 @@ _syscall3(int,sys_syslog,int,type,char*,bufp,int,len) #ifdef __NR_exit_group _syscall1(int,exit_group,int,error_code) #endif +#if defined(__NR_close_range) && defined(TARGET_NR_close_range) +#define __NR_sys_close_range __NR_close_range +_syscall3(int,sys_close_range,int,first,int,last,int,flags) +#endif #if defined(__NR_futex) _syscall6(int,sys_futex,int *,uaddr,int,op,int,val, const struct timespec *,timeout,int *,uaddr2,int,val3) @@ -8721,6 +8725,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)); +#if defined(__NR_close_range) && defined(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(sys_close_range(arg1, arg2, arg3)); +#endif case TARGET_NR_brk: return do_brk(arg1); From patchwork Sun Sep 18 19:45:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 12979551 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 244FEC6FA82 for ; Sun, 18 Sep 2022 19:52:23 +0000 (UTC) Received: from localhost ([::1]:36148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oa0L0-00079N-7N for qemu-devel@archiver.kernel.org; Sun, 18 Sep 2022 15:52:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Ew-00071c-0I for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:13 -0400 Received: from mout.gmx.net ([212.227.17.21]:57245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oa0Eq-0007b6-Or for qemu-devel@nongnu.org; Sun, 18 Sep 2022 15:46:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1663530358; bh=roH/tkWQlaK8ZoFaWtgJx1vvKW8Za+SwcdWg6wbUaY4=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Y/cQrpkVdlqqLLZK/cUoSBD8BfOqu6PzL2VCtHHHBBYE2zYmzUUx748rL+BGjgmUO HcZf43e+0gt4liNpyJ/UrRaGnOa9RSbTAdi4ZY/l3Yhj+Vf7upIZzuM56L1MzRd1g3 ZelS2YRwT5QPSq0X4Nt+IO2wGINbqTBckT+z3ksY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from p100.fritz.box ([92.116.165.224]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5G9t-1pGecl1CVx-011Bn0; Sun, 18 Sep 2022 21:45:58 +0200 From: Helge Deller To: Stefan Hajnoczi , Richard Henderson , Laurent Vivier , qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v3 12/12] linux-user: Add parameters of getrandom() syscall for strace Date: Sun, 18 Sep 2022 21:45:55 +0200 Message-Id: <20220918194555.83535-13-deller@gmx.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220918194555.83535-1-deller@gmx.de> References: <20220918194555.83535-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:GgUT+2APbNeTBTtipupm/sVPDjEKZyljdwHTiYgdW6nyMLV5XVS cPZA/9hAs4CuL0qnZjZJxWKQC18n1WuE7/ldfYk2y8baXCs7QZirU+eFEKgU6MOJYmEpLDV G9cyuQKV5B1tYfEso2UqWIyoU2rZN7+6ZXFNa2E0D43n1Nhk7d5EQdZiDFzx7o5JQsOgH5K Q7n//iVZ+0dwerRTRar0g== X-UI-Out-Filterresults: notjunk:1;V03:K0:vrm+OO1mZuE=:9B2qdxvgVfJvhcfuECtwF1 LPwTO9qoduZW0PfuYKLYe7hgNvLXTXcxPiav9i7dCN7i0p+KezapERuwDTKf0m2AQsYCI7xuC 5hNu4NYQFT4euKH4OnR/WbMRxTjsdrZTo1sV36iiFVpi1efpNLxI976X6QSu0lt4zhBf3rCIp 2hgxJxmE4hYV5tnT60dHgZwjDzDQ0M5ifeY/+Vo3uMBFM9BVMBakQX0nCzusjSGAWw1r9Wpn1 3cO1utc0IZHGZ8VUOTN/BixqhCcFozzbazf76DsACieJB42DEJAv6ELYpQ1dkA+zXHayEXgSs TmNwz3q9ydHaUizl5Sy6X3chjZvGXsMhBM57kKkRpJSkIKK0dRPLSWnpw3Rt4Y62p8jUyN4Dy h3E3HbaYnwu/IefL/18abgHDSfPea8JrLFe+MHRz9++LrGj3tCjXUQ44XLhjZr/nw/AFcJV2c R2LhVw/oMGrno5SqeoiCDZ+otDgWsIzwUrbce+OT/J8H+hRZKbVyx8+xkG6MQPAwC/IYPKjlS N45Vqu0ERDFRBafh2GfY3ehty/Sfn24N2eaCvTo2PNn1h6HOlVs5QBIGyb5/AFFCbjoZhCsiq LD7vv7FvFhs2FeQOhjQJB5n21ZZrQD5WOheN7irQBCbCMCKZphPYq1DmpthFNvQW1dPRWuM3V SGPfpIvZPIaTZmgDj6bPze8JCcv4Ikwc02fP910FKy78+yjArSC0IRb7RGDPvUWMLEtFS1B66 Ch30UkP053+PDOdkBq6WZrQYRqi5NBv6qrS4KQy8WCsrsFCfETecXSZd0qub+0fLY31DIH540 38Fl3GyeEBxhZqnsUWCNCihCcURlMdbfoUFMXCB6+wtPgzT4oitiGALdqEfar8GHxD0ATy/cx ggY+ULx5e1pPOfKcIzV17Qw4mWaEu0eaZMIdqhJ46U7Q4zkqKsq4NiQ4/aLN2QnGfYQFtdxho /WIdiFSrcGeGdmcJ34z1niIYkRls36RDOO9g9F2OqoVRsN8GrJiSAbpUxgvi4/3EbfxPXF8W5 R+/7b5S2kLeFKLAzrCvxGyCtziolMGnTduz6WgNgQ9aiHWcm/CLiotiCaMLbGmfiGZxmKPLp2 AJDy+0xic1lDu3gSUvXdmwjcJcqyFha0mwBPauz2Z+oo9blx9AqdaUK+Wsdu6SOcKT9mcrf2M lER2/d6DBwX2NcR90IKCb66DKa 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 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 Reviewed-by: Philippe Mathieu-Daudé --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.37.3 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 },