From patchwork Wed Aug 16 18:14:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 714053 Delivered-To: patch@linaro.org Received: by 2002:a5d:4012:0:b0:317:ecd7:513f with SMTP id n18csp2496891wrp; Wed, 16 Aug 2023 11:15:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXmojBq/++Gg7nf2khGRafTb3BNiAI2m8l6fUEZ3MrrAfc7h9OxnDN8M/Rekf3OtqgwmaK X-Received: by 2002:a05:620a:40c5:b0:75e:bdee:367e with SMTP id g5-20020a05620a40c500b0075ebdee367emr3076387qko.47.1692209730478; Wed, 16 Aug 2023 11:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692209730; cv=none; d=google.com; s=arc-20160816; b=XUaVVYvDna7nVw3upIcGj7sU43B5FYfC8jGq1Hz4N+LeLdSUbUIgfhQS4gyNhaKqnq xEfF+tE+rnxSLe3xBht1TIJMCTFrw2nuFX/KaSXcjgd3OHldIqN7yKNpeQrdwVs2lDSk UL6uwpRigYa0C+Bmd2jIxXq8zKo1/SnyVRZZfulTvpkfsh5HThxyswatNeAvotnsKfEv P8jQXfEeFGtOauuwwTnkZMzCalfMyuNx/I14/uTz/Q0J2JLtObBzqtvbWyzJdqljxs/v rXvPF1QXdPfOYIbY7e5VtloO3TAnNcmzz3dLCPiIUeAVY0Pt3gyo6QHB4MnyNAzqoNTT q8ig== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=v0SVMZiZZQzHyN2ohKnpzim2pRbcuuTNesX6/I+PcLs=; fh=tvl0UihGnCNMZ5cda0Gq4mk/HXi+Z25jes+ecZ856eA=; b=jA7Hg0cw+6T66DmNu7MDBUaBWyRAEfwNkKYabVfmKNWt5ZC5ZyQtafKcnknWttPXqW Nbv+NEQoEL7GDmBGmchVOQWvPTtkoh6HjVqWhXHSYruh1mTwZ/8G7BsOxDh7rrscLa4o 50fdkIkcd5g4Y0OP0Hc7F93Byr2pExsPjr7DmBfRCWYvMSa+KBLP7fMqIdC6iJc38l3m Z3cLOO+3vFYzV6fjenAZdfsh7UXMG3zsZYbrLNOhZ4zM2wealX7njobTaYTk2GouXZXT a38eJcO+FtihRDvxJX9JTazSoYdbE+EFs/PxQW7iba3ld8YJzFgiFgbh25xyXRraDlYD MypQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XUI7UClq; 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 s3-20020a05620a080300b0076810112e5csi8679149qks.112.2023.08.16.11.15.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Aug 2023 11:15:30 -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=XUI7UClq; 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 1qWL2b-0002Kn-7M; Wed, 16 Aug 2023 14:14:46 -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 1qWL2Z-0002KE-4p for qemu-devel@nongnu.org; Wed, 16 Aug 2023 14:14:43 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWL2X-0003g4-18 for qemu-devel@nongnu.org; Wed, 16 Aug 2023 14:14:42 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1bdf98a6086so17377055ad.0 for ; Wed, 16 Aug 2023 11:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692209679; x=1692814479; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v0SVMZiZZQzHyN2ohKnpzim2pRbcuuTNesX6/I+PcLs=; b=XUI7UClqMQaLMbsaZueaIfu9rMjihLuNP2sSIvesEBkjmgxY5rDsf02Pp9P5L5ok2/ IVem2RvWCHpwzAUF/hTRoU3JNOyx/PRablzwcLBen3Qn6uqNF1gDa0mFt4PQ+uQKTgCZ uqyadTf6mq4row5P+WAdg+20tmd1cmb90yvFdxYqPsXPiPZ8a2ztboHcHvCObmSRfL6M 7CwVmoars1qIrrXNdvouTbXd19c9MJ1c00GYvfyrTX6TkWUy3joMbR1fpqqxDQunSBD7 fIdcSs32yVPwzsXqjN1wbRcnZfnYRM2VrycRuwR/4WvCeHpodDGVNKmjgrMssa/y6Q4p 7Q8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692209679; x=1692814479; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v0SVMZiZZQzHyN2ohKnpzim2pRbcuuTNesX6/I+PcLs=; b=ReApA44+c9ytNw2lOEfLtHhRyR9cNTtt68fQgeG8Kw/aLGYgqGI3at83ZH9e+fFpJw wbS2yd5AQgQfdd4KH+Wzml7t+p9fe2uTAcYx/8kNBG2K8eOqyYJ7Elc5Y5dZoWA/e8jh mh+6cAZ6otk1R/WaiogoI30dRlWekXO+5IY1UBOl3ziZYbLwEJf1B7vaGijnFlx0xQ3F cHkqji4XWjA7bmXdsHCNwNa6mwPwIXxuPIpWZ4FX1t34nYlf+y3Rkf+PYxjwcRZaYS+w lduwtwK3+OkRYFHA3CVNigF8K0hKEtx7fJwq5v456zQFpBkkGVGjkuPI/BuyaYao4ZtY YoJA== X-Gm-Message-State: AOJu0YwJODUKhgkp7yp0r+Efovy/FuG0a6fQxrO2YJ5yU/TcUyTxwSl9 jUTWbYe9rkx8crs6QuU9uLQWQ7AutGARs13Dmw4= X-Received: by 2002:a17:902:b788:b0:1b8:76ce:9d91 with SMTP id e8-20020a170902b78800b001b876ce9d91mr2830511pls.1.1692209679336; Wed, 16 Aug 2023 11:14:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 11:14:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: iii@linux.ibm.com, deller@gmx.de Subject: [PATCH 0/6] linux-user: Rewrite open_self_maps Date: Wed, 16 Aug 2023 11:14:31 -0700 Message-Id: <20230816181437.572997-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x632.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 Based-on: 20230816180338.572576-1-richard.henderson@linaro.org ("[PATCH v4 00/18] linux-user: Implement VDSOs") As promised, a rewrite of /proc/self/{maps,smaps} emulation using interval trees. Incorporate Helge's change to mark [heap], and also mark [vdso]. r~ Richard Henderson (6): util/selfmap: Use dev_t and ino_t in MapInfo linux-user: Use walk_memory_regions for open_self_maps linux-user: Adjust brk for load_bias linux-user: Show heap address in /proc/pid/maps linux-user: Remove ELF_START_MMAP and image_info.start_mmap linux-user: Show vdso address in /proc/pid/maps include/qemu/selfmap.h | 4 +- linux-user/qemu.h | 2 +- linux-user/elfload.c | 41 +-------- linux-user/syscall.c | 194 +++++++++++++++++++++++++---------------- util/selfmap.c | 12 +-- 5 files changed, 131 insertions(+), 122 deletions(-) Tested-by: Helge Deller Reviewed-by: Ilya Leoshkevich