Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7059291ybi; Thu, 13 Jun 2019 08:54:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+FVKn/4Iy0oklBD69RHxGIE/59y/rZMHBu93dz7H/64gd8IVjjCT26ISsNlVsCDpo3FMg X-Received: by 2002:a17:902:aa88:: with SMTP id d8mr78815993plr.73.1560441240524; Thu, 13 Jun 2019 08:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560441240; cv=none; d=google.com; s=arc-20160816; b=HxUnt0r/a5UgsNOR9QE2BoSf9ntly1w/iI7IlfQ8PnX+yotRNAj2aZ9BhgZXjfp0c5 9z4cqx08GU8PHmGYRLlpBA9bd9viODGaS9IIiAfMMumUBBzm/Rawq7Bxyo9f1ohR2tmx JyUFU/dhMPTfJdTKgvPvyCMcts1R8iBz40RxE8Ai38E1HSpUo4OdoxfsUfn33WJXKvYV w3qsYDeRIofXZhiNm217HkYqEtO8mzExGiBhfqkaG2pAiY9a8D8swWNp7ZSCltO9Gg+A r+14R15J8LPMsxIFTxqh62BhynV3CXK+TV3bYfGM1BBMf64CKEQUAElCkX3KaXrt4XEK Y6/w== 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=r+wLOHNRb7C7zJsh+djyTX1ubbbS6C/CF4H05qQSUvw=; b=szu89tj0GqEnwJ5jZvu6BodsqrPaLvyQOq84kS1x+/baT9t+mtzMSSqj1f2EjJWsT9 EKNaYfrox/uw2XYMduE7sXntQRilAVPadjUswHRsmUbKEVgfAJ8Y7AlTE0mYscEm7Tiv mXtdOEkqEUtA0k0eCjiMUDFRuqRlGPaigqFDsnPBYK+ripNRE9KeB2Gt1SjTrJDK6yfP q9FTLsnlvNYGJDgAuMc0U8OWjIY4IVaPwOplHVeypab/H5s8AjqIjYzIV2aW0r7LUT1H 7XMCcgaU9tebYBLrWmlvF4lDtYpxrWwj7RfUO1hQT+5xQUL0OASaXrytEbOA6JHQxAgi e2BA== 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 p61si17690plb.17.2019.06.13.08.53.45; Thu, 13 Jun 2019 08:54:00 -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 S2389843AbfFMPwL (ORCPT + 99 others); Thu, 13 Jun 2019 11:52:11 -0400 Received: from foss.arm.com ([217.140.110.172]:43848 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389679AbfFMPvz (ORCPT ); Thu, 13 Jun 2019 11:51:55 -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 4D8B5367; Thu, 13 Jun 2019 08:51:54 -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 ED2FB3F246; Thu, 13 Jun 2019 08:51:52 -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: Catalin Marinas , Will Deacon , Andrey Konovalov , Alexander Viro Subject: [PATCH v5 0/2] arm64 relaxed ABI Date: Thu, 13 Jun 2019 16:51:35 +0100 Message-Id: <20190613155137.47675-1-vincenzo.frascino@arm.com> X-Mailer: git-send-email 2.21.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: Alexander Viro Signed-off-by: Vincenzo Frascino Vincenzo Frascino (2): arm64: Define Documentation/arm64/tagged-address-abi.txt arm64: Relax Documentation/arm64/tagged-pointers.txt Documentation/arm64/tagged-address-abi.txt | 134 +++++++++++++++++++++ Documentation/arm64/tagged-pointers.txt | 23 ++-- 2 files changed, 150 insertions(+), 7 deletions(-) create mode 100644 Documentation/arm64/tagged-address-abi.txt -- 2.21.0