From nobody Tue Nov 26 08:58:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.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=1709463178; cv=none; d=zohomail.com; s=zohoarc; b=TMYwNq7f3qUfUi/GXVBfhLEpAw4wk7Rd/j34092gU5LT4vKPuE6JooDvrqKZmcuAKcrIKuizlis1NK9qILsFFvX6Gi4ysOBaH4zQ1wlBPvI04iWurMHxs0SnLZqZPOidGvhw9x2TMZw2MCnd1lNK2mcAnjTtWl/rPnPOl9lxtdE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709463178; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MDPpZdzkFCU5J1swCsSX5D8I/lTikuo3763zNkmYNM8=; b=hln1+VaXDsg8xbgha7I88N29rTPsAteCvgAZrFX8UX9L/9kk1Z6Q65mgX2u8DRHkjdaM0B169IfF8UzNUCYh1QCveIbT+wa7tluqbuv2T98WD7E+hJES+4mINCU54UwANPxBL5Kzh8xt1f6oaSK83bt3fmc16q5C3uTRL48wYF0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.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 1709463178080106.20207922260511; Sun, 3 Mar 2024 02:52:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgjRA-0002Gt-1y; Sun, 03 Mar 2024 05:51:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgjR8-0002Gg-Ib for qemu-devel@nongnu.org; Sun, 03 Mar 2024 05:51:18 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rgjR7-0001mn-I7 for qemu-devel@nongnu.org; Sun, 03 Mar 2024 05:51:18 -0500 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-1dca160163dso35136675ad.3 for ; Sun, 03 Mar 2024 02:51:17 -0800 (PST) Received: from localhost ([2400:4050:a840:1e00:9ac7:6d57:2b16:6932]) by smtp.gmail.com with UTF8SMTPSA id w1-20020a170902d10100b001dbb14e6feesm6468768plw.189.2024.03.03.02.51.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Mar 2024 02:51:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1709463076; x=1710067876; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=MDPpZdzkFCU5J1swCsSX5D8I/lTikuo3763zNkmYNM8=; b=dKvhJnRaQacLN9Iwj/STwIp5LwfCRpb6Hzxq0hLGQ1UlbnSqhA4PiyFj3Jtn5cFqZL GfIGapSJdV/pwdswbUUkLnwX8MSTup12dwzqj5KBQSf97m8SwtSl6enOnMi8ivwjimGR t+gld7Al6wZB/sHCHMjEX7NYliEeUoV63z97FKndHQUbvY9UQCJmKmmg7UK+p9rpl7dX oXDCgTRCIl4joJ6KuPQp72mLjcUpROPTtb5DcPyUePzrInEkxGxJ9NIsScfrdpfeKAR5 xx0bt0Pdjwsn/2lsaVRcEZ7AMWt+kjyewmrlHtT6T524E6tfYiOmeOB27m7kVyvy6TZv 0yKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709463076; x=1710067876; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MDPpZdzkFCU5J1swCsSX5D8I/lTikuo3763zNkmYNM8=; b=pXRoFqE9CDydrXIPAm7zQM3eNk8d6UwLfkUw4KeaTZouMj6BAWdMJcHiqEJPHNQ3Ot Cw/766Q3mHUKd8gdMzjDMI7pg/XpCuDKvgVgG75AmjC7KGz7L2eJDaXVYaRmIiMP6Bfd pWTqOq8pDscjrgdYIrSphB0ErETCnhK3Od9J6TZ44A5mpToNGQGLbBmlDUNAbwYrnK1v 7o16mWuubYvUiGZLq+mFbW2nh17m43ZjJbcbOOMvsRyiPVb9GQNJ2LeX5OoOxSCpM3MQ V52BI096hddLQbOVA/ENERyZXOer9yjy/Iz4HRZT8aRTBsU6l/dyzZA6RYgFtXjch+Kp GrDw== X-Gm-Message-State: AOJu0YwDWouQy7yIXBqrjt2vKZZCLTQyEyEdTFXpexGo3x7++ER5NJcN WUwCZ3JeBqMo67w+T60ydeqjOGyge3jcizR4hwi4kHUg1zu12xtc6H4+LnX9gLBLc6MU0wIuxPq I X-Google-Smtp-Source: AGHT+IHVajiJxUowtWrpP3NYpx/+EN/bjBAVRYuyrEDurRGn/xOzYR+hrGPvl2zYLkmq9Y9lx21QXA== X-Received: by 2002:a17:902:e843:b0:1db:9a7d:2e6 with SMTP id t3-20020a170902e84300b001db9a7d02e6mr9807762plg.48.1709463076028; Sun, 03 Mar 2024 02:51:16 -0800 (PST) From: Akihiko Odaki Date: Sun, 03 Mar 2024 19:50:36 +0900 Subject: [PATCH 2/7] contrib/elf2dmp: Always destroy PA space MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240303-elf2dmp-v1-2-bea6649fe3e6@daynix.com> References: <20240303-elf2dmp-v1-0-bea6649fe3e6@daynix.com> In-Reply-To: <20240303-elf2dmp-v1-0-bea6649fe3e6@daynix.com> To: Viktor Prutyanov Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.12.3 Received-SPF: pass (zohomail.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; Received-SPF: none client-ip=2607:f8b0:4864:20::634; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x634.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1709463179654100002 Destroy PA space even if paging base couldn't be found, fixing memory leak. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell --- contrib/elf2dmp/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index cbc38a7c103a..dd686280f981 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp/main.c @@ -553,7 +553,7 @@ int main(int argc, char *argv[]) if (fix_dtb(&vs, &qemu_elf)) { eprintf("Failed to find paging base\n"); err =3D 1; - goto out_elf; + goto out_ps; } =20 printf("CPU #0 IDT is at 0x%016"PRIx64"\n", state->idt.base); --=20 2.44.0