From nobody Tue Feb 10 02:42:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1571658707; cv=none; d=zoho.com; s=zohoarc; b=RsGuyRTkY7vzLVg08OOJnB1nLmi1ntXZo5v/wgOPhK2FWqu1RxbOuulPlCVri2MM9Ly9cSKq3BlZ7GaKDxOpXm877GemiygbmY6JahZBuoPl7slAwquCWinACiXBPYB5a6tw8aQ5l9PNvOI+9LjwMIWxkM6eqoxst5jtvu9p5CE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571658707; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vNMFynTjAmTxUUIwIswr/6MOiNNDJT5kgZOoy66ko1A=; b=ZnriXtimt/2qJgYnxweKKY+tykCKuRbsKfoqH+QHPW8rSWZSDoOICbuHimnLthQU9jDjnWXy8IUgE3J55nTAoDOZ+jEXe1FEcCeWmDE0KSEZH+h6ERjBDwL/6EMkTxj+rt+KyvykUL5hN59B3AHjYMRdwzETFy5x2vV4V4PIy9g= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15716587077901002.4360667065156; Mon, 21 Oct 2019 04:51:47 -0700 (PDT) Received: from localhost ([::1]:38986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMWDv-0007Iq-PZ for importer@patchew.org; Mon, 21 Oct 2019 07:51:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52716) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMWBW-0005UE-ID for qemu-devel@nongnu.org; Mon, 21 Oct 2019 07:49:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMWBR-00039U-PB for qemu-devel@nongnu.org; Mon, 21 Oct 2019 07:49:13 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:37096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMWBP-000381-EN for qemu-devel@nongnu.org; Mon, 21 Oct 2019 07:49:09 -0400 Received: by mail-wr1-x444.google.com with SMTP id e11so4889576wrv.4 for ; Mon, 21 Oct 2019 04:49:02 -0700 (PDT) Received: from localhost.localdomain (129.red-83-57-174.dynamicip.rima-tde.net. [83.57.174.129]) by smtp.gmail.com with ESMTPSA id x5sm17156137wrt.75.2019.10.21.04.49.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 04:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vNMFynTjAmTxUUIwIswr/6MOiNNDJT5kgZOoy66ko1A=; b=nuDilwroNJijyV1WSInoXJb25iNFWyRxRGMtDGhqvLqjpMAkuCjMQDHLGOTfW8BTKG XSeXLYlV3YZpHJk1vtwtQzyWEscD3yV3OWaYMAw2zfNlKwXyrpveb5ehmaYi6r4D8fWS +6wSdTZpwE/erOseZecq86W68SxW7l1ezu7CSzuwN4Ha96g7U0Ji+nRvAiSianxG7vOW q4IENIO+3Ps2mH9UdYDrNTimZ0EgGy3IBzWy8zFAgenL8Wmjm3VD13HRbT4nfCDkj9kq w48tLEbg0pAQPmPJ3063+n2jhRNS0DE9DHkffbVAtqTCwN+1jZbeoQfErFYyLWCESEGl oOgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vNMFynTjAmTxUUIwIswr/6MOiNNDJT5kgZOoy66ko1A=; b=JpcZRExNU3uMWK6l0wIuj2NYtiddvy7fJgaerMKVrMvzRY8eu2jYLE0JR3Glkn4wmP lJuoUHNCBFxeoto6wfFJmEXaqG/iXxE2t1UB66/vd2V3gsPnXLBnCRiDZ8gEziPok3FA 1DuM9wAawLntPE+kKKlkdqQfNfgfLfuW30Zozf01u71Ofau0kB4hRPyFG1GWUPA6R0Un AynCEXp77+f6EuUld7CIbCclNkMyk23rScPnSQvWNlnUcTBaukgZcQrqMiKuHMxTWjXx 3FGGNMVjfgGdZFUOob2lrRfNzlpvRL+OjzR5WLeMQeJfbLf26vV1scl4LMCqKAb6AUeX Bzlg== X-Gm-Message-State: APjAAAUaoKJUKoVTZ7lLrS3d9t0p+jHVq/ZTviIQas7lUD7IHMZBB9D9 RXJm2xON4oYPbeg+fGfYapudXVLX X-Google-Smtp-Source: APXvYqwVJ0air9VZ4mVA/BMhrx7laBNxaLO2+49JsWC8jmbYilD1ZO6xWaEVrDSnfM+m7di9g8w/Tw== X-Received: by 2002:a05:6000:149:: with SMTP id r9mr14753575wrx.90.1571658541947; Mon, 21 Oct 2019 04:49:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v8 1/9] linux-user/strace: Display invalid pointer in print_timeval() Date: Mon, 21 Oct 2019 13:48:49 +0200 Message-Id: <20191021114857.20538-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191021114857.20538-1-f4bug@amsat.org> References: <20191021114857.20538-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Suggested-by: Laurent Vivier Reviewed-by: Laurent Vivier Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/strace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index c80e93b5db..f326c357a2 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -1243,8 +1243,10 @@ print_timeval(abi_ulong tv_addr, int last) struct target_timeval *tv; =20 tv =3D lock_user(VERIFY_READ, tv_addr, sizeof(*tv), 1); - if (!tv) + if (!tv) { + print_pointer(tv_addr, last); return; + } gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}%s", tswapal(tv->tv_sec), tswapal(tv->tv_usec), get_comma(last)); unlock_user(tv, tv_addr, 0); --=20 2.21.0