From patchwork Wed Aug 16 18:14:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714059 Delivered-To: patch@linaro.org Received: by 2002:a5d:4012:0:b0:317:ecd7:513f with SMTP id n18csp2497188wrp; Wed, 16 Aug 2023 11:16:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEoOxf+F5CGY0/wqsmAqws4ChgXc0Of+fBuFayFaIbQMTWM/MQDF+kDzx1qMyndbUzf5i73 X-Received: by 2002:a05:620a:1908:b0:76c:5715:b45f with SMTP id bj8-20020a05620a190800b0076c5715b45fmr3229925qkb.14.1692209765583; Wed, 16 Aug 2023 11:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692209765; cv=none; d=google.com; s=arc-20160816; b=Or76gcQfEBdtWyKcO768a8c4EXkxPvEZjc6lP23fwCOJoc+85eZg4S8tmZUD3asoY/ PQbbtRbvYMmNk3nU7BDYsMgXW+4qCq5TQ+4j02+NO0y/cXD215T6pxLKPrHVC+iczW4O knEZogA2tUgdBUrrRuT0o1ZZkVyChV8tVopzYLxdpaOU/REM8W8sRJGTxrgh/vTR21VQ N+/SrpvI52OmURshX1q6Gee9LCQQN16IXIXN4Ak+VtfM7IVh4Kwq6XE7HF/ERGRhGF17 y8YqGbEEoZO6t9KEp/AIhd8eutbgIqIre+YN+lUNZ2eHNvDLRkhV/50CfFfJZqJkvHKr wnow== 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=902iWhbQP4VzMfSuKMj7bvmHlg0vdFaz5xqxGaNOCL4=; fh=tvl0UihGnCNMZ5cda0Gq4mk/HXi+Z25jes+ecZ856eA=; b=TyDfPd4jkHe13vJV/c8HfFZuWlmFwGSZ+m1zO0LKZVcZl/vx/p5qVOZ8TpngP7g7+p wlBb7ZeXq8/vx+uAqOZhggx8ANVw9cyuMJl/4Hr0do7lfXPplt0Syuuh0HRC3MHODhdw KtMM4GKbdw2EaS5yqU384Zv3uwc8Oj1MfIp7eFOkUrEIEGAW1iO5kLI2bRgXyhjeSnAX jUiXjl6DzljQNpJgoFF7wbVKQUn59Ihktoqn56zt1gcms2HfLg0CLUJlkiHev78QxGoj BEVgvej8THb2WwuMuZHGa9fw5WaqJfOYRvVW0tcLDxvlojTMeg9U1DxmXQiZP0VoFQtD C6nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IIfTeJgj; 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 m19-20020a05620a291300b0076aeff30307si9402319qkp.312.2023.08.16.11.16.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Aug 2023 11:16:05 -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=IIfTeJgj; 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 1qWL2f-0002Lj-E2; Wed, 16 Aug 2023 14:14:49 -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 1qWL2d-0002L2-3W for qemu-devel@nongnu.org; Wed, 16 Aug 2023 14:14:47 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWL2a-0003gr-PW for qemu-devel@nongnu.org; Wed, 16 Aug 2023 14:14:46 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bc3d94d40fso57609005ad.3 for ; Wed, 16 Aug 2023 11:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692209683; x=1692814483; 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=902iWhbQP4VzMfSuKMj7bvmHlg0vdFaz5xqxGaNOCL4=; b=IIfTeJgjkyJXi8sDe/KAAuiQmw9g7A9YVPabjQkksqfts6OmyZ+ubPderDa2iQioU6 JPDyBU1QBbUgmK5uYq12rC9T/q84wL6mUNTNBnTEje/ENyQH9OBoVQoOn6yBPUcH2oRp tN6X1shHFCcXdKqY/alMZCAzbDzKqQokgoWhc9r9tI0quStHoas2SEhQaN4LKOj/Z3MU 3/ZJpVqz7+9BtIeccfEHeVIBHZrFUJPW/7hD9Y4ZeQ2QPNuuJM7/9zC6XbBkqHY0NaMU NEyx7oepV6ibfiNqzBhAF+fJa6eRru2vL5OKVT2CZjyuh8lcdDGh+EoiAIgKAcdkKRL1 yDnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692209683; x=1692814483; 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=902iWhbQP4VzMfSuKMj7bvmHlg0vdFaz5xqxGaNOCL4=; b=hFUjvBX1sCXQixbMMJFD5Bcjv3mutj1B5Rp7KWycu8GpUzjxtpUKtIiJj7LO2gXCok jBS1Ad+iCqzTFGgq8MWIm5mghxZNgYe/q/IhXmDqiHZNofJAUNywJKcJ3Ubn13o1kAKV o5zNXYTk/DaskyH8GQXsqXyHW9sbGdwUKtm+Y0phQUE2mDJYeWVbTVvIsOzvhRKserO7 cLYHPsqwXQS5uJRoZNAiNFvzqqEV0dqEXa6mnT+S1FKN8ARvSw2GiWHqFjHvcF3mqaos 10E/Xa464em5dNOEU8t/51rA6BPPKIRLgZ/IhIp9bZBoveZYD7ETPDTb/tM3ZUYa0m4C f8oA== X-Gm-Message-State: AOJu0Ywfjwefer7Ry9fKS9i3+IxgGj5A1Tpi1frciqJy+lveCF5DB+6X yUTwWvrMfkc25Zevp4fReCOtQ+WoBiMkrSP4Nac= X-Received: by 2002:a17:902:db0e:b0:1b9:de75:d5bb with SMTP id m14-20020a170902db0e00b001b9de75d5bbmr3343345plx.7.1692209683425; Wed, 16 Aug 2023 11:14:43 -0700 (PDT) Received: from stoup.. ([2602:47:d483:7301:a064:e3f9:a812:973b]) by smtp.gmail.com with ESMTPSA id g14-20020a170902868e00b001b9dab0397bsm13423563plo.29.2023.08.16.11.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 11:14:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: iii@linux.ibm.com, deller@gmx.de Subject: [PATCH 4/6] linux-user: Show heap address in /proc/pid/maps Date: Wed, 16 Aug 2023 11:14:35 -0700 Message-Id: <20230816181437.572997-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230816181437.572997-1-richard.henderson@linaro.org> References: <20230816181437.572997-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 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 658c276e39..5c0fb20e19 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. */