From patchwork Tue May 19 19:44:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186961 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4145253ilb; Tue, 19 May 2020 12:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+A4gHSTvH3BKv9DAiOi/GQnApAaDwUEnZHgV2DSU3D2QP4RJfFUVhVi0fatntL6KOkJr1 X-Received: by 2002:a37:a04b:: with SMTP id j72mr1068902qke.139.1589917531358; Tue, 19 May 2020 12:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589917531; cv=none; d=google.com; s=arc-20160816; b=ftp1lqLN3Nb8hwPc7NqY28sTzXkCyyck+AbcECgfx7leKM4EolbtzGCIQDFZvp88Vx p7H7tg6iNS6PDYcuvOrRmWMnGdmVrl00VhluiKzw1mAeIyuN92nN+F8B8hitO0IACo0+ 4IrKQmLq61rdr+CLACWLW++molNZ5n59ZjuFfGHcjh95p6jV1B7Wuz7tjK+uOXKaYWcj S/so7kggZpvJUiKkeQfI8MNBTBFumtnekK/cRxjLFXsTWV9WZIKdabFfDh2nwRpXwh/b 3dn5XX8hxkf4j5ocC/rp0sIBmKJY3WZ1YLuP4fD9dhvkzzSgyw2zpp06gvs3Z7469AeM xlFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=RG3hI9oqiS8E92zFf8hbgJUm1VaZnqdP6j+3nmOYRfU=; b=whfpxcAVGAs4BVMkznBOwh0EECrBcIxIXt3bdE6cd6B2YOK3k4jUq4Dm1HZFztx3f2 nb1UjDxD33zPGcJ1/Ir1yavz1cV2O3simyP/V5DVm8dG5OVQ62spkYd0ZFT8b5cD4tFw qF6yIrnutilatN9kX+Xjxpw7gTDVNGwVrqvryJyEXFqg+IlRnjiv48e5zxwNJkDdaDBT 2qzGlh0SK7xIUHXbYz5WvHgYkh8lgByGR+QxU3OmHM0kWnEdw7rs3clCuEwG40gN6Hyf 7dwukwd2vLFmQ+KFPTfulMpvS1ReAp8a8iDhPMho05OnGN3+aFsn2NRhpG0KXVZLd5CG NpFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YDQwfi7S; 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 s26si299653qts.120.2020.05.19.12.45.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 May 2020 12:45:31 -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=YDQwfi7S; 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]:46626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb8B8-0002Cc-T0 for patch@linaro.org; Tue, 19 May 2020 15:45:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb8Ac-0002Br-9q for qemu-devel@nongnu.org; Tue, 19 May 2020 15:44:58 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:33201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb8Aa-0002FA-UC for qemu-devel@nongnu.org; Tue, 19 May 2020 15:44:57 -0400 Received: by mail-pg1-x541.google.com with SMTP id s10so323088pgm.0 for ; Tue, 19 May 2020 12:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RG3hI9oqiS8E92zFf8hbgJUm1VaZnqdP6j+3nmOYRfU=; b=YDQwfi7S7pysnK5IATP1Og2ieOJ3PjnUw6unbt4E14KqIbpl/VhtSNNXaytxGn7DJY 2bWEU7/5MtslSqOnPUwj2YQUy5sh3m7Uceq2C/YwNgdM14tYWUKM3ip2mPdGydEfPZ6M AE4OXPXjJMEIZ/IQJ9N11/kPiROBHRVePySQgeQOQ/F8SY8VwVyX7TvsXwJ4zpWylEg6 U9xeulFSNnEfkPIxqUuEBn89byJgCirBmsYOK4xpE7jcedMlibsDJ5MK65+qgp+/dUnF H5oZCm8ROmoLr00oEZcMwU8gtcmBVTQvdBFLgW1oWouAiwI63ASjgW34+2rsD5O0kbLO lUwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RG3hI9oqiS8E92zFf8hbgJUm1VaZnqdP6j+3nmOYRfU=; b=oNDhCl8g/Zt1Ul14hJuXsegQ7DKueBCE3RwYgBXkl1V2+QCIujZonxv+up7cXc2MAP JreIzfbBQiICp26M/vdYOnC7Bg269nWnq1JAuQ4EoRPhFFuZc+iL4Gkyyzz2cuop1/fj qoTZPgEZoL6Mnu02xc+ol0TNrAT58u1bdSR7dq6OvKMFL38adLm0sF/yr7PYVqkZuY74 sLOJSa0OXRKXye3L5JDO5pbKux+49pdfFpiCSNiGEORVN7hJYYmjGGLbJYI76DqjzGeq Us4g4au72FsCKITp5VOdCU6BC557SZndu0ULK4JOWhJ+40BsX2KHsHjtNj7FCdIbmhQC I/Pg== X-Gm-Message-State: AOAM5332rrHOidKyKPYt1t1RPVen3Lh8L+ZbSl3aGIC+qOxrCpPh4XFm QfhCJIAcAvigB2825gHgjuLErPhXbVY= X-Received: by 2002:a65:4487:: with SMTP id l7mr758935pgq.221.1589917494980; Tue, 19 May 2020 12:44:54 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id i7sm285744pjj.33.2020.05.19.12.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 12:44:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 0/2] linux-user: Load a vdso for x86_64 Date: Tue, 19 May 2020 12:44:50 -0700 Message-Id: <20200519194452.9009-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::541; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x541.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The subject of AT_SYSINFO came up on launchpad recently. There is definite room for improvement in all of this: (1) We could build the vdso binary into qemu instead of really loading it from the file system. This would obviate the several problems of locating the .so file. It would also mean that --static builds continue to create a standalone qemu binary. (2) We could use our cross-build system to build the vdso. Though we'd still likely want to keep the image in git along side the other rom images for when cross-build is not available. (3) There are some ??? comments where some decisions could be made, and other ??? that are merely commenting on weirdness. (4) It shouldn't take too much effort to create vdsos for the other architectures. But we should get this one as clean as we can first. Amusingly, this patch set has just turned 10 years old. First posted April 4, 2010. I don't recall ever seeing any review on the several postings over the years. r~ Richard Henderson (2): linux-user: Build vdso for x64. linux-user: Load a VDSO for x86-64. Makefile | 4 +- linux-user/elfload.c | 203 +++++++++++++++++++++++++++++++++++++- pc-bios/Makefile | 5 + pc-bios/vdso-linux-x64.S | 115 +++++++++++++++++++++ pc-bios/vdso-linux-x64.ld | 81 +++++++++++++++ pc-bios/vdso-linux-x64.so | Bin 0 -> 7500 bytes 6 files changed, 401 insertions(+), 7 deletions(-) create mode 100644 pc-bios/vdso-linux-x64.S create mode 100644 pc-bios/vdso-linux-x64.ld create mode 100755 pc-bios/vdso-linux-x64.so -- 2.20.1