From patchwork Wed Nov 7 00:39:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Collingbourne X-Patchwork-Id: 10671685 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 603B01709 for ; Wed, 7 Nov 2018 00:39:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E9F42B4C5 for ; Wed, 7 Nov 2018 00:39:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22C822B4C8; Wed, 7 Nov 2018 00:39:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9D5A52B4C5 for ; Wed, 7 Nov 2018 00:39:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lRpn7TUo3F+NKB8Tq2daKOjLO+VYeOB3Dy2heDopWpM=; b=i175RO7b3cICLw D82KelHd+tDIPFjORKSxldUvDX9s0ho57v4JN6DipDJMEKKQgDf/vp7vfG0rCKz1BgxW1fz0dw/TC fMpPSJjLtUCQTWmL0I5fFcmE37zXZDVx7PJYkdNumXc/IioAhRF/ovLx9W4Tw3yvjdBEu1YWM+bDE c1zfh8KWZCFdLt57pVC/zWfhHrRutbNLrkM+Au/8pJzJNwMP3QVXrcT8Hz7jbCqS8tI7QPhQz1nai CJHnH0n7Q9dA+hjsuSJzNWWom1RUOG50REdQ/rOOwx7nb5Mveuej2/i8+eWqDW4+0y5CoGJT9+HpS jcxr2BnHqMxpCrji0Fnw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKBsZ-000523-T2; Wed, 07 Nov 2018 00:39:31 +0000 Received: from mail-pg1-x549.google.com ([2607:f8b0:4864:20::549]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKBsW-00051h-9u for linux-arm-kernel@lists.infradead.org; Wed, 07 Nov 2018 00:39:29 +0000 Received: by mail-pg1-x549.google.com with SMTP id s141-v6so12835250pgs.23 for ; Tue, 06 Nov 2018 16:39:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=RK4AX3Fq/dJW/kfQNYwbfQSukNkxL4ZpotxyVnMK+QA=; b=I5l0xWSiM4iihTWdfmecmJs3SzA1IT8pl2Y+/jnZs8rmMfedxc/zlYc3hRpQ2H2XJy vgeCIVZJzsoUJL+tH6zhWSIo5I0kZxLlzmC8uFN9IwS26Fp3N/AxTu1FWerR4pomJThN mF0WGV/WdVxAOFdrGfI9vXlAjegy9UtOmEpHdAwzJjQuX/FXpETsc6LmhUMzTtPIh5Zq qEFQGCzf4XMA/5z4jEPhu8iJCRLp962Z7xB2rliIeV7+2RqIxhf1G9X20xeJXJZZTqq9 VGAyGh4fuOFLBlSiVOn+pdjb1zum/V5y18ifPHHMXs6QdLFgRjcONhBe6IopG+VlH6pm SNAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=RK4AX3Fq/dJW/kfQNYwbfQSukNkxL4ZpotxyVnMK+QA=; b=VzsyBqqNUPC6JEhBttDloYOSI/fgjRUmN+BlCAFJy84rJAE7wjiUkX7sYT6zv5zUF1 TOs0WJcpnUzqLXctfnkcfYzRtnoEXqNzXowYgb5+k7yy4Kr8/0ZuRxt1KHUrMOkmD//a Dv6irxZOS/Bs/9WFCzlyD7Wtmh47A/EnlNjrNweB+CjIMeBp/LzQnKu6TqSEzKSJcF+L PSFBG2A755QTfspfeJCDVakT9g9IlZEwrrf+OjsAyTFTvMuczQ8w/MJEGF8vpOBepCFf uiZZV8pRCJ2v+KMwFheoLHQXFu4qSP2TFaoVEgtTQNF+XnfqqJuKzhJ120H3NEO4lKBI VqWw== X-Gm-Message-State: AGRZ1gIgUc1yxgi2XxLkQTluDnAS/6rfbEs7JkN3TP4hsT/XcwLdrHUq 6YWx8HHRoGdLawvM0UyWlyI+TW0= X-Google-Smtp-Source: AJdET5e7SkMSQm6Y803MvyTaU4k+FhXxL5lHV3SF+eOipMGMYOtd+xeKutv7AaI1pmETBkoNFfm2K2k= X-Received: by 2002:a62:3307:: with SMTP id z7-v6mr109924pfz.59.1541551156513; Tue, 06 Nov 2018 16:39:16 -0800 (PST) Date: Tue, 6 Nov 2018 16:39:13 -0800 Message-Id: <20181107003913.19061-1-pcc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog Subject: [PATCH] arm64: Build vDSO with -ffixed-x18 From: Peter Collingbourne To: Mark Salyzyn , Will Deacon X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181106_163928_368371_FF017DAE X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Collingbourne , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The vDSO needs to be build with x18 reserved in order to accommodate userspace platform ABIs built on top of Linux that use the register to carry inter-procedural state, as provided for by the AAPCS. An example of such a platform ABI is the one that will be used by an upcoming version of Android. Although this change is currently a no-op due to the fact that the vDSO is currently implemented in pure assembly on arm64, it is necessary in order to prepare for another change [1] that will add C code to the vDSO. [1] https://patchwork.kernel.org/patch/10044501/ Signed-off-by: Peter Collingbourne Cc: Mark Salyzyn Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org --- arch/arm64/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile index b215c712d897..8cd4707f832a 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -12,7 +12,7 @@ obj-vdso := gettimeofday.o note.o sigreturn.o targets := $(obj-vdso) vdso.so vdso.so.dbg obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) -ccflags-y := -shared -fno-common -fno-builtin +ccflags-y := -shared -fno-common -fno-builtin -ffixed-x18 ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \ $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)