Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp822085ybi; Thu, 30 May 2019 07:17:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVYPowqdsn7TRxJn6D2JrDr/5SHjokVGlC/LHrAIf6fXIgCTIuMzuWpNVKdcWJvhlqsHFG X-Received: by 2002:a17:902:2907:: with SMTP id g7mr3819548plb.114.1559225870538; Thu, 30 May 2019 07:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559225870; cv=none; d=google.com; s=arc-20160816; b=vKmiMQtoIOxXJPLe63WygiUSKLf9/x+f//cHUO9ZEzkK6Aw6g68AiG/M1QnV3bH3MX hvmhWCZyFGYfK70pdPCMJYMK5XeEkBc+QeumJqEMEG2MaQ4m/J8fzFLrlFtRWs/onZPR kaDMHQEgePStShxB4i3hHdb2E+9csf1FGADh9x/oSgCgVainfyuR4JbL8fqjh8nQCIV4 LHSkks0VuWH+cUvZkfuSspmbMimI2QErnG4LfoZnQWcSA7DWRv9EhNNnav4pP7tjr7ea YxpLj1b6P2zLCmR6uzEis/PXO0oZpQRm/+4ARWMv8aOc8VfrKaYJFFYeZcMsOerJ+OtS YsJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jgcYwA7dXm6vLhag/uDNE/BATuFmLmzSsAgHYg3xrJw=; b=PyQnOycTrr5vFUcnIaNsqg1XZ2rMU69UzmnvfeYim20aCh6DkRGeXh8PSA5wO6Ovj6 phbUcaS856UiDJW5ztSb3i35kuXml/Hxlhh9v4Z2sr7/PxYx9JHTipbioRXu7/TTSpw3 Ti+kn7YrgB7vlMFCqBWBn07cv3uBdDWE6bO74lpeWqnQwsAj8WW5hghu9UBFQhcQM77E YqFMnPAHfIHi0S7lIJdSSQ4+LZ+X5291lhlWETzcedjwtoW0Q9D0efSzZIRcolikDIi0 ag3GVfC4tw56tfiUDX1+WhsMJxZeigVX/BUb7A/zNFQlEIDA3g7M96YBaub0rzf1Guwp hhQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si3682339pfc.265.2019.05.30.07.17.32; Thu, 30 May 2019 07:17:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727277AbfE3OQE (ORCPT + 99 others); Thu, 30 May 2019 10:16:04 -0400 Received: from foss.arm.com ([217.140.101.70]:36514 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbfE3OQC (ORCPT ); Thu, 30 May 2019 10:16:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4BF231684; Thu, 30 May 2019 07:16:02 -0700 (PDT) Received: from e119884-lin.cambridge.arm.com (e119884-lin.cambridge.arm.com [10.1.196.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 10BDC3F59C; Thu, 30 May 2019 07:15:58 -0700 (PDT) From: Vincenzo Frascino To: linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Arnd Bergmann , Russell King , Ralf Baechle , Paul Burton , Daniel Lezcano , Thomas Gleixner , Mark Salyzyn , Peter Collingbourne , Shuah Khan , Dmitry Safonov <0x7f454c46@gmail.com>, Rasmus Villemoes , Huw Davies , Mark Salyzyn Subject: [PATCH v6 05/19] arm64: Build vDSO with -ffixed-x18 Date: Thu, 30 May 2019 15:15:17 +0100 Message-Id: <20190530141531.43462-6-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530141531.43462-1-vincenzo.frascino@arm.com> References: <20190530141531.43462-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peter Collingbourne 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 Signed-off-by: Vincenzo Frascino 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 00bcfd2672cf..d98230f70caf 100644 --- a/arch/arm64/kernel/vdso/Makefile +++ b/arch/arm64/kernel/vdso/Makefile @@ -20,7 +20,7 @@ obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) ldflags-y := -shared -nostdlib -soname=linux-vdso.so.1 --hash-style=sysv \ --build-id -n -T -ccflags-y := -fno-common -fno-builtin -fno-stack-protector +ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18 ccflags-y += -DDISABLE_BRANCH_PROFILING VDSO_LDFLAGS := -Bsymbolic -- 2.21.0