Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10942341ybi; Thu, 25 Jul 2019 07:24:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxRI8jTyVVCyTpyOAKz9SnPV7nXaAQf9FdLfY0urAwL08RziwPfcYwTVV1q/DVXFIPNErft X-Received: by 2002:a63:5823:: with SMTP id m35mr87864133pgb.329.1564064649432; Thu, 25 Jul 2019 07:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564064649; cv=none; d=google.com; s=arc-20160816; b=MtoQe0SUNeb8l43RXjE8ePr/dk7VZz4bmz7VXB+iNCcnLVdGwL2OFljp40NbYF6kcv 57+l0/OvcZOT/MpZcvZ+T3RpmHq4F0LjEVjX+TjZ8Es6iwXhERQU7dmGgDqrtQSVao4Z mkRn3sklpwveZpieEP+q5k2VelQkj7joaNnC+HnV6F17SGsDBCR+hm09/WTznnQwMbVN I06nNdSGr6W+N13gl0rnrjAs/Q+LYDlVKK0xEhVpp4Qxx7HYFHOeLx45X3mh6KnC8Td1 9EWMviYGiLj3bUtHUEV+pSJuFSt9pdKXcu+skTAewbd+LWVha2AzjKKQZJFaRrG255zs QdwA== 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=90j8pwPJbERCSOoptymIMwkhw4ze4sh3LmP3iWCdthg=; b=cz8Wtn1nq9+LRBSb0bokeZ8ArnynL5Np8TgYzc9lczjHOYJGc22J2hwbFb3SpiEQ71 K+Upr0TAUpUoUak3kY+Ud/w0nRzmxxiouvJ0G+ilDA2HkYE5/73hPlO+OXUwz8ttFKc6 Ov1fZqSfrVCSSL5JeEENakpNTPckr7FRCRrmgFJdDvSpWeB1cf4v712Kt87XKBqFo0bM hjILuTsKzmHuW/nBT/pWHwq7lpR5i/XkNKziXWS8s1C9+q3B3N0JneTnx+wrNIRHA6AD nhjbif5hbqf09M6VD4e1VBmSH3LeZsG4uM+U8Q3K2U2a8SOLYTHAhV1G2zsi8qn1YQBV p8pA== 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 124si17747427pgb.11.2019.07.25.07.23.54; Thu, 25 Jul 2019 07:24:09 -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 S2390647AbfGYNvO (ORCPT + 99 others); Thu, 25 Jul 2019 09:51:14 -0400 Received: from foss.arm.com ([217.140.110.172]:57734 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726666AbfGYNvN (ORCPT ); Thu, 25 Jul 2019 09:51:13 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C83D428; Thu, 25 Jul 2019 06:51:12 -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 592483F71F; Thu, 25 Jul 2019 06:51:11 -0700 (PDT) From: Vincenzo Frascino To: linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: vincenzo.frascino@arm.com, Catalin Marinas , Will Deacon , Andrey Konovalov , Szabolcs Nagy Subject: [PATCH v6 0/2] arm64 relaxed ABI Date: Thu, 25 Jul 2019 14:50:42 +0100 Message-Id: <20190725135044.24381-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: References: 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 On arm64 the TCR_EL1.TBI0 bit has been always enabled on the arm64 kernel, hence the userspace (EL0) is allowed to set a non-zero value in the top byte but the resulting pointers are not allowed at the user-kernel syscall ABI boundary. This patchset proposes a relaxation of the ABI with which it is possible to pass tagged tagged pointers to the syscalls, when these pointers are in memory ranges obtained as described in tagged-address-abi.txt contained in this patch series. Since it is not desirable to relax the ABI to allow tagged user addresses into the kernel indiscriminately, this patchset documents a new sysctl interface (/proc/sys/abi/tagged_addr) that is used to prevent the applications from enabling the relaxed ABI and a new prctl() interface that can be used to enable or disable the relaxed ABI. This patchset should be merged together with [1]. [1] https://patchwork.kernel.org/cover/10674351/ Cc: Catalin Marinas Cc: Will Deacon CC: Andrey Konovalov Cc: Szabolcs Nagy Signed-off-by: Vincenzo Frascino Vincenzo Frascino (2): arm64: Define Documentation/arm64/tagged-address-abi.rst arm64: Relax Documentation/arm64/tagged-pointers.rst Documentation/arm64/tagged-address-abi.rst | 148 +++++++++++++++++++++ Documentation/arm64/tagged-pointers.rst | 23 +++- 2 files changed, 164 insertions(+), 7 deletions(-) create mode 100644 Documentation/arm64/tagged-address-abi.rst -- 2.22.0