From patchwork Mon Oct 30 21:17:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 739283 Delivered-To: patch@linaro.org Received: by 2002:a5d:4c47:0:b0:32d:baff:b0ca with SMTP id n7csp1337013wrt; Mon, 30 Oct 2023 14:19:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3d1k+Cha2ZK/mQ6jK9gK106OtOQNtwjFlfgOBh05LExw//gCbjXy3YcDRcCE7zpVOvOF6 X-Received: by 2002:a05:6808:308c:b0:3a8:1877:2d28 with SMTP id bl12-20020a056808308c00b003a818772d28mr14675573oib.50.1698700796438; Mon, 30 Oct 2023 14:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698700796; cv=none; d=google.com; s=arc-20160816; b=ljdMYxBuV0cvVbtXMgE7MZ2afYJ1D8T+h50CQ4uk8h4YOTEHHV1jhNlMrUBWeBQHG5 0sk3IH0fiscdKfBmLrR4r+mNfOqifw8rG9WhaJ98h8d/2X1E/aAr1EYCfa18+xZlrXY7 y3g9+VvkzZJQA2MiHTNLNzZ8rQpM6Vw+qp5t6jNUoUktduZBwDvRQCI5rlQQZEf3M8Fu ww4EZqguHwUj0VEFjRxSFSB72yWfNaUJmXJ1PdyCen8e0H/KXelH6aVyFGsU0XSkTF9E mC8yyflEcZSMiQzgbToydMS0vu73d+tRWOETRRD63lP1YIQWaz0jtHFkqaH0FA1b0sCT ilwQ== 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=8pyDCZsxNfETKywVTX+e7wkZvY5QpmtSHCpOlxwyOrU=; fh=34AiJwL3uD6/r8nj7RDXRG8mDmXJQy5R4F6EYwwWnXc=; b=TaZdhF1Lc0SBs977SPoaZ44rGhohjVyL9qDVyyvOzJ/HrDv5hxH2UW2g0wSddKVx5M tTYC/dnTpodoJsP3AK1osQyLbfL9jHZl4NlviDo0Jmtpi73uG8kNLhr3AzqHPr/ErlFC VE+PRoinRwV69+Cgid2soS1j460/d8mUxYJl71AdH9eP+1KFAfyMY1pAA3oZwrHJMtjU 5uHZjLjjCMygH0BeBqBbxF7DFJuyyc7BZstISi9nWl/L8dclHn7Msqc8UdOxBPokxl6C m9dBYd5z8ls9e1c2nS2YN2+3+vUeCfKWQnHBzluZxjIIYNgJ0uZT4pUX6lQ8pA+qsW1d 9oCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p+VxXUF4; 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 y16-20020a05620a25d000b0077744988681si3556052qko.504.2023.10.30.14.19.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Oct 2023 14:19:56 -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=p+VxXUF4; 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 1qxZeW-0001nW-HD; Mon, 30 Oct 2023 17:18:28 -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 1qxZdy-00011f-DF for qemu-devel@nongnu.org; Mon, 30 Oct 2023 17:17:54 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxZdt-0006WQ-8B for qemu-devel@nongnu.org; Mon, 30 Oct 2023 17:17:54 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1cc3bc5df96so13191425ad.2 for ; Mon, 30 Oct 2023 14:17:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698700666; x=1699305466; darn=nongnu.org; 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=8pyDCZsxNfETKywVTX+e7wkZvY5QpmtSHCpOlxwyOrU=; b=p+VxXUF4Zf48YmGCH4w9p5Gp3jkrteP0WW112jRI0rx7pue9vdEE8NL7fWO9lAAVwO mRhgj34mZrusSN4ZHNsF5PwlDPehHK6B7SK9yFm1Fpp6gpjCNBWgLYU9wroz1nQNG7Ey W7lgAkPk5sr7kR+9Fw0FkbpkgD8axJha2mbor1fCPbFiYWcLStypiLrCRI9T5C8IjGHy phqIH91+bZqIWT2L0X3kx727+Y3EHTKQvDJHhfyQPas3f/GDm+MmFReg86JfMNszRRwI 11SKkecahKYJuKNaqrI4b4FxGqEroJ/oHItNd+tMJt4fPovJzRY47N1I9XtMh4B3zbSn q9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698700666; x=1699305466; 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=8pyDCZsxNfETKywVTX+e7wkZvY5QpmtSHCpOlxwyOrU=; b=OSGnQ3ZB341LdEYA6YZUFysSbKkagr/wRy5oQ68Y/tEgC+/clXbcmlHCpmJ1G0R7lh mdfsBrFfmATeQkeVFKspJjaA0kj0Erg9CkU6NKMznLuLza4uaZx+fVbq4fc7Mk0/en0B zhc0jtu0lF6IY0l1DuqPU/dfOwU+uzDLGJlVud5yn3BkNI01hM5Dyxj9obtsdPOBs7pz hWtcTH/HUqL1h4lL7lU0wkS+uBkfpULcMx8/Zw+wXNzO7BfqEoqzWH0QA4PITQeVHjUh CqZ5wLyriZrPpPTlMzVtgw8DeS74JSfw1lSt/ff+E9Xf8yxAugzIyPgk28kE9od2+Kae QZew== X-Gm-Message-State: AOJu0YyvEPwSqJOANYc21ZwxLWGOCHmDX5h0+vkA5YMWNgb7kI+wuXvI 4+1E816kj4lM6VQzYBTjUvWB2RPovP+OwBaDV3s= X-Received: by 2002:a17:902:d30c:b0:1ca:b820:74ed with SMTP id b12-20020a170902d30c00b001cab82074edmr5633668plc.14.1698700666380; Mon, 30 Oct 2023 14:17:46 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id jf2-20020a170903268200b001cc32261bdfsm4670350plb.38.2023.10.30.14.17.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 14:17:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Helge Deller , Ilya Leoshkevich Subject: [PULL 20/21] linux-user: Show vdso address in /proc/pid/maps Date: Mon, 30 Oct 2023 14:17:26 -0700 Message-Id: <20231030211727.165090-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231030211727.165090-1-richard.henderson@linaro.org> References: <20231030211727.165090-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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 --- linux-user/qemu.h | 1 + linux-user/elfload.c | 1 + linux-user/syscall.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 12f638336a..4de9ec783f 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -32,6 +32,7 @@ struct image_info { abi_ulong brk; abi_ulong start_stack; abi_ulong stack_limit; + abi_ulong vdso; abi_ulong entry; abi_ulong code_offset; abi_ulong data_offset; diff --git a/linux-user/elfload.c b/linux-user/elfload.c index a1583883fa..46832358b0 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -3919,6 +3919,7 @@ int load_elf_binary(struct linux_binprm *bprm, struct image_info *info) const VdsoImageInfo *vdso = vdso_image_info(); if (vdso) { load_elf_vdso(&vdso_info, vdso); + info->vdso = vdso_info.load_bias; } else if (TARGET_ARCH_HAS_SIGTRAMP_PAGE) { abi_long tramp_page = target_mmap(0, TARGET_PAGE_SIZE, PROT_READ | PROT_WRITE, diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d49cd314a2..65ac3ac796 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7992,6 +7992,8 @@ static void open_self_maps_4(const struct open_self_maps_data *d, path = "[stack]"; } else if (start == info->brk) { path = "[heap]"; + } else if (start == info->vdso) { + path = "[vdso]"; } /* Except null device (MAP_ANON), adjust offset for this fragment. */