From nobody Tue Feb 10 23:14:03 2026 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; 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=1585207500; cv=none; d=zohomail.com; s=zohoarc; b=Zlf7TbZ+wkf04vT/QWfvw1eNa/Y7/jUKfxENndk+NDYN63yH9PatmImM3cGwhnII08lTI8KfG1Ipo1aia39qHHAIWU8BS+J3lGIh+/2b2lG4w3SXSEjQklkLr5IfIAn1BSJRnK/xk6mJ8T3hIC0lHPVc/1wR0F2oCaxvCd+C0UM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585207500; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mCV/6oi7njnCoIzMHyWV2UoCZd8lSLJWcIDwV87Mbcc=; b=Kk2VmUL87YWp+9dZsEVPBQ/BNGwgAz0v/d9Xz31aMp9yQH5UsLYdfWuwPhyyCBVWjMYP7XXDqQRCrL4KoDMnH4zOlZSiiDW26j42s2vMYtyiAvCwQtrm5SVGlTU+gl6lrqXrh9fIoH92LlFBVAKeWD28Y21py2A7jLlAR7PXioU= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 1585207500033854.6693711907096; Thu, 26 Mar 2020 00:25:00 -0700 (PDT) Received: from localhost ([::1]:47484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHMss-0006D8-H1 for importer@patchew.org; Thu, 26 Mar 2020 03:24:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57146) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHMs7-0005LZ-A6 for qemu-devel@nongnu.org; Thu, 26 Mar 2020 03:24:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHMs6-0007tK-9Z for qemu-devel@nongnu.org; Thu, 26 Mar 2020 03:24:11 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:42019) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHMs6-0007sv-1D for qemu-devel@nongnu.org; Thu, 26 Mar 2020 03:24:10 -0400 Received: from localhost.localdomain ([82.252.135.106]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MHXSD-1j4SiM1ZFB-00DYn9; Thu, 26 Mar 2020 08:23:59 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 5/6] linux-user: Add x86_64 vsyscall page to /proc/self/maps Date: Thu, 26 Mar 2020 08:23:51 +0100 Message-Id: <20200326072352.2056553-6-laurent@vivier.eu> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200326072352.2056553-1-laurent@vivier.eu> References: <20200326072352.2056553-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:N9BloZddGoEI8aaMOWZioelpXj+OrVHQl9zigrnZcP/MsKXmp2Q bfT24knouSbYlvmSXFeyzQ4IdT2X9DEIAmFSwwAAjYSUV4N12AGO1d2yo/IxzaK4mBTwgt8 I4cMOT6+rrHZex8D6hZypm72a8zfey21qHguss0uuZVSqXu6Khc7yP2dYtpMohlt2RRrlMI +5FLf2955LFmL5mpfLLcA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZYP8560LjSM=:msR9P5Q/I1q2yMQwfo8mtW Z+DydHO9oCRc2UOW9O/G8VTjHxN4mHq7c8I86RKuP8NfdV3IwNbtY46eiwways+Vj24M7o54H WNDKzJKfRuzdxZIdvtOGCXEu1P57zLbcBhsaEtZUOWnxTYpirEAlHT1BLxHC7/W6yrcdlOOIw F+4+KM4k1CTfVXB6Wkud11fdcewTrWc2qBo7I/CJTIYqHbkXKa70FHMqbZs0LrXDNzeC3fH4x eWi4A5P8L3hGgiOtfvTIJUvwzduxtNqQZOjZ6Vpy1VFqxe4udBTzhNonHaRPVgDQPGjY0hXfI 4AodIDG0N4u0j85Vy8+V0vHN3UkMWdTfZt1tPf5ceHoMoA2Tp6Zk7VvDT1846hPhQFnHo9839 oCgKEAFTua+RlULRH4iUey9EqPPTcc7spFLiCxsM2M3JRLeUjvYlrtLU/YLW3PB8aJ8iZIvHb yDAfmD0TRSJtAwa20/rxkOnsj/WOq+9sEwO+QEJC4xMYTjYOVqlEMNJYnXO+wYVWV7z+1R5kx ws6uDQk3ZVGcsjxmeQ/EaJievGBptens6B7c+qx9pyE2gFKEyb/E+2h0WKoNJLg2WOmgiPzJY dYb2QYgFWDpANeWEq4GRaQoG+BREia+FikLHDaYfVT/lTUAAhlrEX4VzHTKwF1fu19vJhLEzk QfOj/BLs0MdHU7nsYvvXiKyFEdK2YhsEi0Lh0tYYhNonVbxWKIeotW+gr8zmbYf1QUzS9AaJy ygEXiOicbUTdAVf4z4VcnYqjFNAjx+oODq3o58L42VpZPF1aIOoJIQkIIYfNnMb3NOFDIEufN C3pPUZNJDdf0jhzsMaW/UL070+0FnFlI70P9hn00DJuwZPbHg+cbftEV3TzCVYK826JBvCy X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.126.133 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Richard Henderson , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Richard Henderson The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to the "[vsyscall]" note at the end of line, is to special case it. Signed-off-by: Richard Henderson Message-Id: <20200213032223.14643-5-richard.henderson@linaro.org> [lv: remove trailing space] Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 35f414666243..dbdd56e42077 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7144,6 +7144,16 @@ static int open_self_maps(void *cpu_env, int fd) } } =20 +#ifdef TARGET_VSYSCALL_PAGE + /* + * We only support execution from the vsyscall page. + * This is as if CONFIG_LEGACY_VSYSCALL_XONLY=3Dy from v5.3. + */ + dprintf(fd, TARGET_FMT_lx "-" TARGET_FMT_lx + " --xp 00000000 00:00 0 [vsyscall]\n", + TARGET_VSYSCALL_PAGE, TARGET_VSYSCALL_PAGE + TARGET_PAGE_SIZE); +#endif + free(line); fclose(fp); =20 --=20 2.25.1