From patchwork Thu Aug 24 01:02:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 716483 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp1091221wrp; Wed, 23 Aug 2023 18:03:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXImEj7RJ6R4YmrHggYrtXtEwNKblApAo+aqFec4Gi5V91LMi8gu8CB1fwoTAATX+On3NK X-Received: by 2002:a05:6214:27eb:b0:647:30f9:4b79 with SMTP id jt11-20020a05621427eb00b0064730f94b79mr15619147qvb.7.1692839021431; Wed, 23 Aug 2023 18:03:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692839021; cv=none; d=google.com; s=arc-20160816; b=v7zz3f7ilLhoQp8LYb/ZwDxOWIfV05exauHMa1UcG22U7E3lRGAQihiNdaXaRJD+RS BU2a1zGiFJqCzxj17VPEltd1O3SkPj39DldFbbOwDDKOI12CvGduHu8gruKZh0FHb9yo eGHB0Wm0+BM/oCm5+WKOGsc7xrPEtUwQb8qyyu3erArkRm0qTM4R7I4Qjix1KkJ8jIhJ 2lvyVGmZlwEslE3j2mOW89dH5mnF9bmiIdRWy+VV/mZ2HHqusstxH8sN5vLn6Q0AdOhF IJqkwZEHrT/4LJzBIfYufJ2Wr/1Z8MdkPNXTQbCfxLfK87DemNHgyj/2XXNh9UGDnpku V1iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=/J3OwiFqVwoYplEY/vkfNER1ejXeddYX7iHD/HQTT+U=; fh=HKkwVadJ/uaTI8+zGemceZF/kgFFDZAwzMS4W0iLuHY=; b=HIjmGLuj2dCIGxp8ekuYHiHk1zHAbj1gfx4ChLHP7rF6HCOwuAbXq5MFRgYEUYi7ah Tm35k7xBcpktqh8zleKGe6RGX+gl/kaCGlrgI/cociVtRcScMT2VOooviXkXk6waVfvn DaNvOqAUVWT6pHkCw2GcIdmiu/Bt80ONX4mjnywtc9LnnRvKWVcR5UGKf4KBxc+tv31+ xgj8bwsMUkluF73kjDLwtR5wncQ+3HTbKPxPJCstERqQ2r+FGUmj7jxYncxeZFvCFGw5 KIGTj3s8FHYGoDlgq1mbjEx03OsR7e8cTY2OvfoSCEcR/OHQgn3BG9t9upSWTLuR4zXZ 3Rig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UM4HUJzD; 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 fi4-20020a0562141a4400b0063d57c2050asi8174583qvb.46.2023.08.23.18.03.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Aug 2023 18:03:41 -0700 (PDT) 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=UM4HUJzD; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYykP-0000R6-Ja; Wed, 23 Aug 2023 21:02:53 -0400 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 1qYykK-00007l-Bl for qemu-devel@nongnu.org; Wed, 23 Aug 2023 21:02:48 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYykI-0000R7-2g for qemu-devel@nongnu.org; Wed, 23 Aug 2023 21:02:48 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-68bec3a81c4so300501b3a.1 for ; Wed, 23 Aug 2023 18:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692838965; x=1693443765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/J3OwiFqVwoYplEY/vkfNER1ejXeddYX7iHD/HQTT+U=; b=UM4HUJzDeqK7nHD1k2rsWAc5JcXBllrpi43v/zcPlh7ajB6pfca6tfwpi4OafMUGVc ucpxPCbY8IaMybuNjgRSWlwAf0D560OxmCLNaKMDb7nyz2d2X1Luzpo5LwETSFvJCoZP AHZAlfngqATCQ4OjrMtCiID3STiwHlfKsd1t892xzQ+d7923M4cbjJM/Q2hqWkmxTMMt fH1or/V1Ybwh9vmgvMPBxbAg+02ePM9ILEFR1nEDm4NQiI8yJHKKzeOGAdDcHUJhxDnU JwZC6Sl54ok7F4H+4qLzHk72s5qUf83PqSw4F6x01KzN4f87UYVo5vLyJ27Ov+rhh1h+ 1isQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692838965; x=1693443765; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/J3OwiFqVwoYplEY/vkfNER1ejXeddYX7iHD/HQTT+U=; b=lip8C66lucWBaoITc7TJ03oz7MRO9zTalq3M16rwGDtOS56d3h0VI7wIogOy2F4Sec YQSUqIeu5g89vP4sZNesEoIFNSXz53ehnH/7hO98RY2anAJVBthm8QFWqKs0PQpwh2hm rMLk+Rt4VqAzQ5NoKNPPPUi36jxrt+gAOzHCZf9tG/V5q2hsN+6ej80UuFo6gMe/EQhf WbyjH3a9XWnmabpQq/pcj/Ff8XsdxddayrGMbnEf/1sic7NNhG5zc6+k1/1CHUIwmF6P cLvUb2nPMFnv2uKpIwEAR3usHtyzc8Kqxsv4GxII+eTPOjecEmg79EDRjbz1pp/4PpHn uXUg== X-Gm-Message-State: AOJu0YywK4w03pB5D248A6cwOxR5kJDwvm4+W61vwdugEUmNd7B8U7Lk AG87cH7o7EaEogErPNZ988b38MuLMoYDESmb1Ug= X-Received: by 2002:a05:6a00:4c07:b0:68b:bedd:c2e9 with SMTP id ea7-20020a056a004c0700b0068bbeddc2e9mr7930697pfb.16.1692838964838; Wed, 23 Aug 2023 18:02:44 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:72f0:1ea7:85d2:141e]) by smtp.gmail.com with ESMTPSA id c10-20020aa78c0a000000b006875df4773fsm2050789pfd.163.2023.08.23.18.02.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Aug 2023 18:02:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , Ilya Leoshkevich Subject: [PATCH 07/13] linux-user: Show heap address in /proc/pid/maps Date: Wed, 23 Aug 2023 18:02:31 -0700 Message-Id: <20230824010237.1379735-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230824010237.1379735-1-richard.henderson@linaro.org> References: <20230824010237.1379735-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Tested-by: Helge Deller Reviewed-by: Ilya Leoshkevich Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0b91f996b7..0641d8f433 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8125,6 +8125,8 @@ static void open_self_maps_4(const struct open_self_maps_data *d, if (test_stack(start, end, info->stack_limit)) { path = "[stack]"; + } else if (start == info->brk) { + path = "[heap]"; } /* Except null device (MAP_ANON), adjust offset for this fragment. */