From patchwork Thu Dec 2 20:48:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 519764 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp1171564imb; Thu, 2 Dec 2021 12:56:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJx2u51FYALQL7FRZZHE93tffpgckkm+JsXJU1pMjoweCQbA0QLyGw44ADyKkXCylgM0I8ls X-Received: by 2002:ac8:7d0f:: with SMTP id g15mr16501936qtb.531.1638478616976; Thu, 02 Dec 2021 12:56:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638478616; cv=none; d=google.com; s=arc-20160816; b=TMLtqBPXq31y8phMnBdOJC4V9u9bhMky6W998aKGICTPW109EZNBwR6eleDGpY34fJ S3TRx1pk3t/R9/6WtupUFMaLc7paCh9Oxr6qf66dUObigGdbe0+V5P7hn/fLzqcgzxfM zd6gnpROReDH+De/kA78vsWuOXOw5ior5kP99SzQxf+N6aJOcG8bZYvjsoyQWWeOJJoU rkTlQGWj2ZT8Fii6LUR0BwfApMtjSDsHEgvXImT7pA5rM64dmds+K8tYWAF0j4wx16BP Si9atrw3iCt7II2dai8VkCK0IhjtWkBBPrBnzL3CNJrKKBQs+t7ar76KpdgsQRVvTGaY 7ORA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TanATbqLIZD4sdWdXDqq/ZctU6NkzIRRa3wOfm+DVqE=; b=m+H5ZpnLoxuRVFp1GS58u9yik2eB6FoEMyzKEixBMvn5Wlb6pa3/VMA3mxKqAOZCyn knqd56779RBUjRaWd2Z9JkqZakbiv+nSF7YouTLa0uu7Sl5KggElHFAH4jv1o+8RFAZH k3loL1cZNJgy7e1vUwIC52duB3d4RA+3jN5ecyHI2Qp0IB6ZxHizcLShARuXysdOEYLc 5RPIEjv8aZvGZjz46o1+s0RSGfeZE1sZxChvK/OvECod2VdlGzZK2QCTZ68xEKqseDSx nIO+zEpNKbvaBARCJLDFnDSefLh/k+0xlJtWU+NAXRTSu0tyJOE422n5jkVrkeBWGpbT 0LxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjR0MnPI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 135si778968qkm.660.2021.12.02.12.56.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 02 Dec 2021 12:56:56 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjR0MnPI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55330 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mst8S-00062G-D5 for patch@linaro.org; Thu, 02 Dec 2021 15:56:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mst10-00009i-14 for qemu-devel@nongnu.org; Thu, 02 Dec 2021 15:49:14 -0500 Received: from [2607:f8b0:4864:20::1036] (port=53869 helo=mail-pj1-x1036.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mst0y-0005W3-Gq for qemu-devel@nongnu.org; Thu, 02 Dec 2021 15:49:13 -0500 Received: by mail-pj1-x1036.google.com with SMTP id iq11so668075pjb.3 for ; Thu, 02 Dec 2021 12:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TanATbqLIZD4sdWdXDqq/ZctU6NkzIRRa3wOfm+DVqE=; b=UjR0MnPIyaXR7mpSxqL9bfkeSEu2iIRdoKKXmieCQljG6HZEhIfvVtNYsmcjlNHqJg MeuuGluvYl4244wsBc9kdrguVGg+06GoFrzEL1ez7ESWPb45qG2rlIKGxT6lULWnvtMD gMCFT1ToORkzJU8t03qAJ8WIm4sAxDcPkyFvQJ+yfQlGHeHBbfbeDp9RlGicAwVDySzH wq8D0fuwpkqAHR8Xouwmvz6hoX3qDb/GnAh6oJ6gY9xbENaSq5cE9MaMTk59nskNQYkP pXLAgipu18bCL2qquev+WSc9a7WeEuG651RsE4Hur+cJM9DQY8glu0rq+t6Es0JumqQE OKrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TanATbqLIZD4sdWdXDqq/ZctU6NkzIRRa3wOfm+DVqE=; b=E6cRrJ5OFUZfHiG0dn10iXPbXCnDoN/Qyx34gVXch6yfmrVAAurQxuuppfEH4mOBCT 9LTDv+ZBYp9xgUI0s5/yHl07SU09JpUQushiZJ3oBWLLBewvrw+BkXLSlXyxLMP2JQTP 4rr5at4eqvsCPvUdWRCyQQfNMh+ffapjfaaJOV0Zf6DBrEMsrKKQ0Hdt9RI5Q+rBvUDd ZbGpnka73zhziBsTITRUvjt2zJmALOIdZtlTFZFY/f1w/GLhoi1nXSLAqQNVfwJ9jBv3 o2si8QSEagElxlHFu4qHJR0tWDHN2CUuTsI7bTfa78ANSqcaocB21WhKbUX7OHGtpGnF 0UHw== X-Gm-Message-State: AOAM531bPe0opreqWiIbxMsJT3TsOeCbWHE4NPhx9Q12rDJZlN5Z+UPP qMLlTmcbPbuok0bp5MYnmkvDz/lTqSBtKg== X-Received: by 2002:a17:90b:4b4d:: with SMTP id mi13mr8041131pjb.192.1638478151247; Thu, 02 Dec 2021 12:49:11 -0800 (PST) Received: from localhost.localdomain (174-21-75-75.tukw.qwest.net. [174.21.75.75]) by smtp.gmail.com with ESMTPSA id pi17sm3721391pjb.34.2021.12.02.12.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Dec 2021 12:49:10 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 14/15] linux-user/strace: Fix print_syscall_err Date: Thu, 2 Dec 2021 12:48:59 -0800 Message-Id: <20211202204900.50973-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211202204900.50973-1-richard.henderson@linaro.org> References: <20211202204900.50973-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::1036 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::1036; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1036.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Cc: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Errors are not all negative numbers, but only the top 4k. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 2cdbf030ba..f235118fb6 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -684,12 +684,12 @@ print_ipc(void *cpu_env, const struct syscallname *name, */ static bool -print_syscall_err(abi_long ret) +print_syscall_err(abi_ulong ret) { const char *errstr; qemu_log(" = "); - if (ret < 0) { + if (ret > -4096) { errstr = target_strerror(-ret); if (errstr) { qemu_log("-1 errno=%d (%s)", (int)-ret, errstr);